static void BootpVendorProcess (u8 * ext, int size) { u8 *end = ext + size; debug_ext ("[BOOTP] Checking extension (%d bytes)...\n", size); while ((ext < end) && (*ext != 0xff)) { if (*ext == 0) { ext++; } else { u8 *opt = ext; ext += ext[1] + 2; if (ext <= end) BootpVendorFieldProcess (opt); } } #ifdef DEBUG_BOOTP_EXT puts ("[BOOTP] Received fields: \n"); if (NetOurSubnetMask) { puts ("NetOurSubnetMask : "); print_IPaddr (NetOurSubnetMask); putc ('\n'); } if (NetOurGatewayIP) { puts ("NetOurGatewayIP : "); print_IPaddr (NetOurGatewayIP); putc ('\n'); } if (NetBootFileSize) { printf ("NetBootFileSize : %d\n", NetBootFileSize); } if (NetOurHostName[0]) { printf ("NetOurHostName : %s\n", NetOurHostName); } if (NetOurRootPath[0]) { printf ("NetOurRootPath : %s\n", NetOurRootPath); } if (NetOurNISDomain[0]) { printf ("NetOurNISDomain : %s\n", NetOurNISDomain); } if (NetBootFileSize) { printf ("NetBootFileSize: %d\n", NetBootFileSize); } #endif /* DEBUG_BOOTP_EXT */ }
static void BootpVendorProcess(u8 *ext, int size) { u8 *end = ext + size; debug("[BOOTP] Checking extension (%d bytes)...\n", size); while ((ext < end) && (*ext != 0xff)) { if (*ext == 0) { ext++; } else { u8 *opt = ext; ext += ext[1] + 2; if (ext <= end) BootpVendorFieldProcess(opt); } } debug("[BOOTP] Received fields:\n"); if (NetOurSubnetMask) debug("NetOurSubnetMask : %pI4\n", &NetOurSubnetMask); if (NetOurGatewayIP) debug("NetOurGatewayIP : %pI4", &NetOurGatewayIP); if (NetBootFileSize) debug("NetBootFileSize : %d\n", NetBootFileSize); if (NetOurHostName[0]) debug("NetOurHostName : %s\n", NetOurHostName); if (NetOurRootPath[0]) debug("NetOurRootPath : %s\n", NetOurRootPath); if (NetOurNISDomain[0]) debug("NetOurNISDomain : %s\n", NetOurNISDomain); if (NetBootFileSize) debug("NetBootFileSize: %d\n", NetBootFileSize); #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER) if (NetNtpServerIP) debug("NetNtpServerIP : %pI4\n", &NetNtpServerIP); #endif }