/* Never bind to the CD-Rom emulation interface */ if (iface_desc->bInterfaceClass == 0x08) return -ENODEV;
/* * Don't bind reserved interfaces (like network ones) which often have * the same class/subclass/protocol as the serial interfaces. Look at * the Windows driver .INF files for reserved interface numbers. */ blacklist = (void *)id->driver_info; if (blacklist && test_bit(iface_desc->bInterfaceNumber, &blacklist->reserved)) return -ENODEV;
//-f,--foreground Run in foreground //-b,--background Background if lease is not obtained //-n,--now Exit if lease is not obtained //-q,--quit Exit after obtaining lease //-t,--retries N Send up to N discover packets (default 3) // 注释定义的获取IP命令 //snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname); #endif // 注释掉命令线程 //pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd)); sleep(1); }
/* Never bind to the CD-Rom emulation interface */ if (iface_desc->bInterfaceClass == 0x08) return -ENODEV;
/* * Don't bind reserved interfaces (like network ones) which often have * the same class/subclass/protocol as the serial interfaces. Look at * the Windows driver .INF files for reserved interface numbers. */ blacklist = (void *)id->driver_info; if (blacklist && test_bit(iface_desc->bInterfaceNumber, &blacklist->reserved)) return -ENODEV;
//-f,--foreground Run in foreground //-b,--background Background if lease is not obtained //-n,--now Exit if lease is not obtained //-q,--quit Exit after obtaining lease //-t,--retries N Send up to N discover packets (default 3) // 注释定义的获取IP命令 //snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname); #endif // 注释掉命令线程 //pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd)); sleep(1); }