Home | History | Annotate | Download | only in src

Lines Matching refs:daemon

130   struct dhcp_packet *mess = (struct dhcp_packet *)daemon->dhcp_packet.iov_base;
174 so reassign mess from daemon->packet. Also, the size
185 if (expand_buf(&daemon->dhcp_packet, size))
187 mess = (struct dhcp_packet *)daemon->dhcp_packet.iov_base;
223 for (vendor = daemon->dhcp_vendors; vendor; vendor = vendor->next)
273 for (mac = daemon->dhcp_macs; mac; mac = mac->next)
320 for (context_tmp = daemon->dhcp; context_tmp; context_tmp = context_tmp->next)
345 if (daemon->options & OPT_LOG_OPTS)
350 strcpy(daemon->namebuff, inet_ntoa(context_tmp->start));
353 ntohl(mess->xid), daemon->namebuff, inet_ntoa(context_tmp->netmask));
356 ntohl(mess->xid), daemon->namebuff, inet_ntoa(context_tmp->end));
362 config = find_config(daemon->dhcp_conf, context, clid, clid_len,
403 memcpy(daemon->dhcp_buff2, mess->file, sizeof(mess->file));
404 daemon->dhcp_buff2[sizeof(mess->file) + 1] = 0; /* ensure zero term. */
405 id.net = (char *)daemon->dhcp_buff2;
416 for (id_list = daemon->dhcp_ignore; id_list; id_list = id_list->next)
463 for (id_list = daemon->bootp_dynamic; id_list; id_list = id_list->next)
503 char *pq = daemon->dhcp_buff;
534 if (pq != daemon->dhcp_buff)
539 if (legal_hostname(daemon->dhcp_buff))
540 offer_hostname = client_hostname = daemon->dhcp_buff;
545 memcpy(daemon->dhcp_buff, option_ptr(opt, 0), len);
549 if (len > 0 && daemon->dhcp_buff[len-1] == 0)
552 daemon->dhcp_buff[len] = 0;
553 if (legal_hostname(daemon->dhcp_buff))
554 client_hostname = daemon->dhcp_buff;
557 if (client_hostname && daemon->options & OPT_LOG_OPTS)
581 struct dhcp_config *new = find_config(daemon->dhcp_conf, context, NULL, 0,
605 for (o = daemon->dhcp_match; o; o = o->next)
666 for (vendor = daemon->dhcp_vendors; vendor; vendor = vendor->next)
691 match_vendor_opts(option_find(mess, sz, OPTION_VENDOR_ID, 1), daemon->dhcp_opts);
693 if (daemon->options & OPT_LOG_OPTS)
695 if (sanitise(option_find(mess, sz, OPTION_VENDOR_ID, 1), daemon->namebuff))
696 my_syslog(MS_DHCP | LOG_INFO, _("%u Vendor class: %s"), ntohl(mess->xid), daemon->namebuff);
697 if (sanitise(option_find(mess, sz, OPTION_USER_CLASS, 1), daemon->namebuff))
698 my_syslog(MS_DHCP | LOG_INFO, _("%u User class: %s"), ntohl(mess->xid), daemon->namebuff);
702 for (id_list = daemon->dhcp_ignore; id_list; id_list = id_list->next)
711 if (daemon->enable_pxe &&
743 for (service = daemon->pxe_services; service; service = service->next)
770 opt71.next = daemon->dhcp_opts;
826 req_options = (unsigned char *)daemon->dhcp_buff2;
839 sanitise(option_find(mess, sz, OPTION_MESSAGE, 1), daemon->dhcp_buff);
844 log_packet("DHCPDECLINE", option_ptr(opt, 0), emac, emac_len, iface_name, daemon->dhcp_buff, mess->xid);
852 prettyprint_time(daemon->dhcp_buff, DECLINE_BACKOFF);
854 inet_ntoa(config->addr), daemon->dhcp_buff);
907 addrs, print_mac(daemon->namebuff, mac, len));
929 !config_find_by_address(daemon->dhcp_conf, lease->addr))
932 !config_find_by_address(daemon->dhcp_conf, addr))
1001 if (!(daemon->options & OPT_AUTHORITATIVE))
1017 if (!lease && !(daemon->options & OPT_AUTHORITATIVE))
1037 (!lease && !(daemon->options & OPT_AUTHORITATIVE)))
1085 else if ((addr_config = config_find_by_address(daemon->dhcp_conf, mess->yiaddr)) && addr_config != config)
1095 print_mac(daemon->namebuff, ltmp->hwaddr, ltmp->hwaddr_len),
1204 for (id_list = daemon->dhcp_ignore_names; id_list; id_list = id_list->next)
1395 print_mac(daemon->namebuff, ext_mac, mac_len);
1397 if(daemon->options & OPT_LOG_OPTS)
1404 daemon->namebuff,
1412 daemon->namebuff,
1425 for (daemon->namebuff[0]= 0, i = 0; i <= trunc - INADDRSZ; i += INADDRSZ)
1428 strncat(daemon->namebuff, ", ", 256 - strlen(daemon->namebuff));
1429 strncat(daemon->namebuff, inet_ntoa(option_addr_arr(start, i)), 256 - strlen(daemon->namebuff));
1431 else if (!is_name || !sanitise(start, daemon->namebuff))
1435 print_mac(daemon->namebuff, option_ptr(start, 0), trunc);
1442 trunc == 0 ? "" : daemon->namebuff,
1566 if (netid && (daemon->options & OPT_LOG_OPTS))
1568 char *s = daemon->namebuff;
1592 if (daemon->options & OPT_LOG_OPTS)
1595 else if ((daemon->options & OPT_LOG_OPTS) && strlen((char *)mess->file) != 0)
1601 if (daemon->options & OPT_LOG_OPTS)
1604 else if ((daemon->options & OPT_LOG_OPTS) && strlen((char *)mess->sname) != 0)
1610 if (daemon->options & OPT_LOG_OPTS)
1618 for (id_list = daemon->force_broadcast; id_list; id_list = id_list->next)
1853 for (opt = daemon->dhcp_opts; opt; opt = opt->next)
1885 ret = daemon->dhcp_opts;
1898 p = (unsigned char *)daemon->dhcp_buff;
1899 q = (unsigned char *)daemon->dhcp_buff2;
1901 for (i = 0, service = daemon->pxe_services; service; service = service->next)
1907 if (p - (unsigned char *)daemon->dhcp_buff + len + 3 < 253)
1920 return daemon->dhcp_opts;
1927 if (q - (unsigned char *)daemon->dhcp_buff2 + 3 + INADDRSZ >= 253)
1953 ret->len = p - (unsigned char *)daemon->dhcp_buff;
1954 ret->val = (unsigned char *)daemon->dhcp_buff;
1957 if (q - (unsigned char *)daemon->dhcp_buff2 != 0)
1960 ret->len = q - (unsigned char *)daemon->dhcp_buff2;
1961 ret->val = (unsigned char *)daemon->dhcp_buff2;
1966 for (o = daemon->dhcp_opts; o; o = o->next)
2002 for (boot = daemon->boot_config; boot; boot = boot->next)
2007 for (boot = daemon->boot_config; boot; boot = boot->next)
2026 struct dhcp_opt *opt, *config_opts = daemon->dhcp_opts;
2037 if ((daemon->options & OPT_LOG_OPTS) && req_options)
2039 char *q = daemon->namebuff;
2043 q += snprintf(q, MAXDNAME - (q - daemon->namebuff),
2049 if (req_options[i+1] == OPTION_END || (q - daemon->namebuff) > 40)
2051 q = daemon->namebuff;
2052 my_syslog(MS_DHCP | LOG_INFO, _("%u requested options: %s"), ntohl(mess->xid), daemon->namebuff);
2070 if (!(daemon->options & OPT_NO_OVERRIDE) &&
2080 if (!(daemon->options & OPT_NO_OVERRIDE) &&
2119 if (!req_options || (daemon->options & OPT_NO_OVERRIDE))
2318 if (!req_options || (daemon->options & OPT_NO_OVERRIDE))