Home | History | Annotate | Download | only in src

Lines Matching defs:config

80 #define have_config(config, mask) ((config) && ((config)->flags & (mask))) 
86 static unsigned int calc_time(struct dhcp_context *context, struct dhcp_config *config, unsigned char *opt);
138 struct dhcp_config *config;
362 config = find_config(daemon->dhcp_conf, context, clid, clid_len,
366 if (config)
383 if (have_config(config, CONFIG_DISABLE))
388 if (have_config(config, CONFIG_NAME))
390 hostname = config->hostname;
391 domain = config->domain;
394 if (have_config(config, CONFIG_NETID))
396 config->netid.next = netid;
397 netid = &config->netid;
424 if (have_config(config, CONFIG_ADDR))
427 logaddr = &config->addr;
428 mess->yiaddr = config->addr;
429 if ((lease = lease_find_by_addr(config->addr)) &&
484 have_config(config, CONFIG_TIME) ? config->lease_time : 0xffffffff,
560 if (have_config(config, CONFIG_NAME))
562 hostname = config->hostname;
563 domain = config->domain;
576 if (!config)
586 config = new;
596 if (have_config(config, CONFIG_NETID))
598 config->netid.next = netid;
599 netid = &config->netid;
707 if (have_config(config, CONFIG_NOCLID))
849 if (have_config(config, CONFIG_ADDR) &&
850 config->addr.s_addr == option_addr(opt).s_addr)
854 inet_ntoa(config->addr), daemon->dhcp_buff);
855 config->flags |= CONFIG_DECLINED;
856 config->decline_time = now;
881 if (ignore || have_config(config, CONFIG_DISABLE))
895 if (have_config(config, CONFIG_ADDR))
897 char *addrs = inet_ntoa(config->addr);
899 if ((ltmp = lease_find_by_addr(config->addr)) &&
901 !config_has_mac(config, ltmp->hwaddr, ltmp->hwaddr_len, ltmp->hwaddr_type))
913 if (context->router.s_addr == config->addr.s_addr)
917 else if (have_config(config, CONFIG_DECLINED) &&
918 difftime(now, config->decline_time) < (float)DECLINE_BACKOFF)
921 conf = config->addr;
953 time = calc_time(context, config, option_find(mess, sz, OPTION_LEASE_TIME, 4));
970 if (ignore || have_config(config, CONFIG_DISABLE))
1055 if (have_config(config, CONFIG_ADDR))
1057 if (context->router.s_addr == config->addr.s_addr)
1070 (!have_config(config, CONFIG_ADDR) || config->addr.s_addr != mess->yiaddr.s_addr))
1077 have_config(config, CONFIG_ADDR) &&
1078 (!have_config(config, CONFIG_DECLINED) ||
1079 difftime(now, config->decline_time) > (float)DECLINE_BACKOFF) &&
1080 config->addr.s_addr != mess->yiaddr.s_addr &&
1081 (!(ltmp = lease_find_by_addr(config->addr)) || ltmp == lease))
1085 else if ((addr_config = config_find_by_address(daemon->dhcp_conf, mess->yiaddr)) && addr_config != config)
1092 if (config && config_has_mac(config, ltmp->hwaddr, ltmp->hwaddr_len, ltmp->hwaddr_type))
1198 time = calc_time(context, config, option_find(mess, sz, OPTION_LEASE_TIME, 4));
1241 if (ignore || have_config(config, CONFIG_DISABLE))
1337 static unsigned int calc_time(struct dhcp_context *context, struct dhcp_config *config, unsigned char *opt)
1339 unsigned int time = have_config(config, CONFIG_TIME) ? config->lease_time : context->lease_time;
1772 config-supplied vendor class */