• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/networking/udhcp/

Lines Matching defs:client_config

40 struct client_config_t client_config;
122 write_pidfile(client_config.pidfile);
125 client_config.foreground = 1;
126 client_config.background_if_no_lease = 0;
207 client_config.interface = "eth0";
208 client_config.script = DEFAULT_SCRIPT;
209 client_config.retries = 3;
210 client_config.timeout = 3;
220 &client_config.interface, &client_config.pidfile, &str_r,
221 &client_config.script, &str_T, &str_t
225 client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0);
228 client_config.vendorclass = alloc_dhcp_option(DHCP_VENDOR, str_V, 0);
230 client_config.foreground = 1;
232 client_config.background_if_no_lease = 1;
234 client_config.hostname = alloc_dhcp_option(DHCP_HOST_NAME, str_h, 0);
236 client_config.fqdn = alloc_dhcp_option(DHCP_FQDN, str_F, 3);
243 client_config.fqdn[OPT_DATA + 0] = 0x1;
244 /* client_config.fqdn[OPT_DATA + 1] = 0; - redundant */
245 /* client_config.fqdn[OPT_DATA + 2] = 0; - redundant */
247 // if (opt & OPT_i) client_config.interface = ...
249 client_config.abort_if_no_lease = 1;
250 // if (opt & OPT_p) client_config.pidfile = ...
252 client_config.quit_after_lease = 1;
254 client_config.release_on_quit = 1;
257 // if (opt & OPT_s) client_config.script = ...
259 client_config.timeout = xatoi_u(str_T);
261 client_config.retries = xatoi_u(str_t);
272 if (read_interface(client_config.interface, &client_config.ifindex,
273 NULL, client_config.arp))
282 write_pidfile(client_config.pidfile);
289 if (!client_config.clientid && !(opt & OPT_C)) {
290 client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, "", 7);
291 client_config.clientid[OPT_DATA] = 1;
292 memcpy(client_config.clientid + OPT_DATA+1, client_config.arp, 6);
295 if (!client_config.vendorclass)
296 client_config.vendorclass = alloc_dhcp_option(DHCP_VENDOR, "udhcp "BB_VER, 0);
314 sockfd = listen_socket(/*INADDR_ANY,*/ CLIENT_PORT, client_config.interface);
316 sockfd = raw_socket(client_config.ifindex);
337 if (packet_num < client_config.retries) {
344 timeout = now + client_config.timeout;
348 if (client_config.background_if_no_lease) {
351 } else if (client_config.abort_if_no_lease) {
363 if (packet_num < client_config.retries) {
443 if (memcmp(packet.chaddr, client_config.arp, 6)) {
505 if (client_config.quit_after_lease) {
506 if (client_config.release_on_quit)
510 if (!client_config.foreground)
540 if (client_config.release_on_quit)
549 /*if (client_config.pidfile) - remove_pidfile has it's own check */
550 remove_pidfile(client_config.pidfile);