• Home
  • Raw
  • Download

Lines Matching refs:netid

97 static size_t dhcp_packet_size(struct dhcp_packet *mess, struct dhcp_netid *netid,
106 struct dhcp_netid *netid,
116 static int prune_vendor_opts(struct dhcp_netid *netid);
117 static struct dhcp_opt *pxe_opts(int pxe_arch, struct dhcp_netid *netid);
118 struct dhcp_boot *find_boot(struct dhcp_netid *netid);
139 struct dhcp_netid *netid; in dhcp_reply() local
156 netid = &iface_id; in dhcp_reply()
240 vendor->netid.next = netid; in dhcp_reply()
241 netid = &vendor->netid; in dhcp_reply()
278 mac->netid.next = netid; in dhcp_reply()
279 netid = &mac->netid; in dhcp_reply()
369 known_id.next = netid; in dhcp_reply()
370 netid = &known_id; in dhcp_reply()
396 config->netid.next = netid; in dhcp_reply()
397 netid = &config->netid; in dhcp_reply()
406 id.next = netid; in dhcp_reply()
407 netid = &id; in dhcp_reply()
413 bootp_id.next = netid; in dhcp_reply()
414 netid = &bootp_id; in dhcp_reply()
417 if (match_netid(id_list->list, netid, 0)) in dhcp_reply()
438 !address_available(context, lease->addr, netid)) in dhcp_reply()
446 if (!address_allocate(context, &mess->yiaddr, mess->chaddr, mess->hlen, netid, now)) in dhcp_reply()
453 if (!message && !(context = narrow_context(context, mess->yiaddr, netid))) in dhcp_reply()
455 else if (context->netid.net) in dhcp_reply()
457 context->netid.next = netid; in dhcp_reply()
458 netid = &context->netid; in dhcp_reply()
464 if ((!id_list->list) || match_netid(id_list->list, netid, 0)) in dhcp_reply()
490 domain, netid, subnet_addr, 0, 0, 0, NULL); in dhcp_reply()
496 return message ? 0 : dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
589 known_id.next = netid; in dhcp_reply()
590 netid = &known_id; in dhcp_reply()
598 config->netid.next = netid; in dhcp_reply()
599 netid = &config->netid; in dhcp_reply()
637 o->netid->next = netid; in dhcp_reply()
638 netid = o->netid; in dhcp_reply()
683 vendor->netid.next = netid; in dhcp_reply()
684 netid = &vendor->netid; in dhcp_reply()
703 if (match_netid(id_list->list, netid, 0)) in dhcp_reply()
764 prune_vendor_opts(netid); in dhcp_reply()
769 opt71.netid = NULL; in dhcp_reply()
774 return dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
785 struct dhcp_boot *boot = find_boot(netid); in dhcp_reply()
811 prune_vendor_opts(netid); in dhcp_reply()
812 …do_encap_opts(pxe_opts(pxearch, netid), OPTION_VENDOR_CLASS_OPT, DHOPT_VENDOR_MATCH, mess, end, 0); in dhcp_reply()
815 return ignore ? 0 : dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
866 if (!(context = narrow_context(context, mess->ciaddr, netid)) || in dhcp_reply()
928 address_available(context, lease->addr, netid) && in dhcp_reply()
931 else if (opt && address_available(context, addr, netid) && !lease_find_by_addr(addr) && in dhcp_reply()
936 else if (!address_allocate(context, &mess->yiaddr, emac, emac_len, netid, now)) in dhcp_reply()
942 if (message || !(context = narrow_context(context, mess->yiaddr, netid))) in dhcp_reply()
947 if (context->netid.net) in dhcp_reply()
949 context->netid.next = netid; in dhcp_reply()
950 netid = &context->netid; in dhcp_reply()
965 domain, netid, subnet_addr, fqdn_flags, borken_opt, pxearch, uuid); in dhcp_reply()
967 return dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
1060 if (!(context = narrow_context(context, mess->yiaddr, netid))) in dhcp_reply()
1069 else if (!address_available(context, mess->yiaddr, netid) && in dhcp_reply()
1192 if (context->netid.net) in dhcp_reply()
1194 context->netid.next = netid; in dhcp_reply()
1195 netid = &context->netid; in dhcp_reply()
1205 if ((!id_list->list) || match_netid(id_list->list, netid, 0)) in dhcp_reply()
1235 domain, netid, subnet_addr, fqdn_flags, borken_opt, pxearch, uuid); in dhcp_reply()
1238 return dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
1250 context = narrow_context(context, mess->ciaddr, netid); in dhcp_reply()
1264 if (context && context->netid.net) in dhcp_reply()
1266 context->netid.next = netid; in dhcp_reply()
1267 netid = &context->netid; in dhcp_reply()
1293 domain, netid, subnet_addr, fqdn_flags, borken_opt, pxearch, uuid); in dhcp_reply()
1296 return dhcp_packet_size(mess, netid, agent_id, real_end); in dhcp_reply()
1548 static size_t dhcp_packet_size(struct dhcp_packet *mess, struct dhcp_netid *netid, in dhcp_packet_size() argument
1566 if (netid && (daemon->options & OPT_LOG_OPTS)) in dhcp_packet_size()
1569 for (*s = 0; netid; netid = netid->next) in dhcp_packet_size()
1572 for (n = netid->next; n; n = n->next) in dhcp_packet_size()
1573 if (strcmp(netid->net, n->net) == 0) in dhcp_packet_size()
1578 strncat (s, netid->net, (MAXDNAME-1) - strlen(s)); in dhcp_packet_size()
1579 if (netid->next) in dhcp_packet_size()
1619 if (match_netid(id_list->list, netid, 0)) in dhcp_packet_size()
1760 static struct dhcp_opt *option_find2(struct dhcp_netid *netid, struct dhcp_opt *opts, int opt) in option_find2() argument
1765 if (match_netid(tmp->netid, netid, netid ? 0 : 1)) in option_find2()
1768 return netid ? option_find2(NULL, opts, opt) : NULL; in option_find2()
1847 static int prune_vendor_opts(struct dhcp_netid *netid) in prune_vendor_opts() argument
1856 if (!match_netid(opt->netid, netid, 1)) in prune_vendor_opts()
1864 static struct dhcp_opt *pxe_opts(int pxe_arch, struct dhcp_netid *netid) in pxe_opts() argument
1893 fake_opts[i].netid = NULL; in pxe_opts()
1902 if (pxe_arch == service->CSA && match_netid(service->netid, netid, 1)) in pxe_opts()
1997 struct dhcp_boot *find_boot(struct dhcp_netid *netid) in find_boot() argument
2003 if (match_netid(boot->netid, netid, 0)) in find_boot()
2008 if (match_netid(boot->netid, netid, 1)) in find_boot()
2020 struct dhcp_netid *netid, in do_options() argument
2066 if ((boot = find_boot(netid))) in do_options()
2098 (opt = option_find2(netid, config_opts, OPTION_FILENAME)) && !(opt->flags & DHOPT_FORCE)) in do_options()
2105 (opt = option_find2(netid, config_opts, OPTION_SNAME)) && !(opt->flags & DHOPT_FORCE)) in do_options()
2111 if ((opt = option_find2(netid, config_opts, OPTION_END))) in do_options()
2139 if (!option_find2(netid, config_opts, OPTION_NETMASK)) in do_options()
2145 !option_find2(netid, config_opts, OPTION_BROADCAST)) in do_options()
2152 !option_find2(netid, config_opts, OPTION_ROUTER)) in do_options()
2156 !option_find2(netid, config_opts, OPTION_DNSSERVER)) in do_options()
2161 !option_find2(netid, config_opts, OPTION_DOMAINNAME)) in do_options()
2168 !option_find2(netid, config_opts, OPTION_HOSTNAME)) in do_options()
2236 if (opt != option_find2(netid, config_opts, optno)) in do_options()
2290 if (match_netid(o->netid, netid, 1) && in do_options()
2304 force_encap = prune_vendor_opts(netid); in do_options()
2311 config_opts = pxe_opts(pxe_arch, netid); in do_options()