• Home
  • Raw
  • Download

Lines Matching refs:daemon

125     struct dhcp_packet* mess = (struct dhcp_packet*) daemon->dhcp_packet.iov_base;  in dhcp_reply()
175 if (expand_buf(&daemon->dhcp_packet, size)) { in dhcp_reply()
176 mess = (struct dhcp_packet*) daemon->dhcp_packet.iov_base; in dhcp_reply()
212 for (vendor = daemon->dhcp_vendors; vendor; vendor = vendor->next) { in dhcp_reply()
259 for (mac = daemon->dhcp_macs; mac; mac = mac->next) in dhcp_reply()
298 for (context_tmp = daemon->dhcp; context_tmp; context_tmp = context_tmp->next) in dhcp_reply()
321 if (daemon->options & OPT_LOG_OPTS) { in dhcp_reply()
324 strcpy(daemon->namebuff, inet_ntoa(context_tmp->start)); in dhcp_reply()
327 ntohl(mess->xid), daemon->namebuff, inet_ntoa(context_tmp->netmask)); in dhcp_reply()
330 ntohl(mess->xid), daemon->namebuff, inet_ntoa(context_tmp->end)); in dhcp_reply()
336 config = find_config(daemon->dhcp_conf, context, clid, clid_len, mess->chaddr, mess->hlen, in dhcp_reply()
370 memcpy(daemon->dhcp_buff2, mess->file, sizeof(mess->file)); in dhcp_reply()
371 daemon->dhcp_buff2[sizeof(mess->file) + 1] = 0; /* ensure zero term. */ in dhcp_reply()
372 id.net = (char*) daemon->dhcp_buff2; in dhcp_reply()
383 for (id_list = daemon->dhcp_ignore; id_list; id_list = id_list->next) in dhcp_reply()
420 for (id_list = daemon->bootp_dynamic; id_list; id_list = id_list->next) in dhcp_reply()
452 char* pq = daemon->dhcp_buff; in dhcp_reply()
479 if (pq != daemon->dhcp_buff) pq--; in dhcp_reply()
483 if (legal_hostname(daemon->dhcp_buff)) offer_hostname = client_hostname = daemon->dhcp_buff; in dhcp_reply()
486 memcpy(daemon->dhcp_buff, option_ptr(opt, 0), len); in dhcp_reply()
490 if (len > 0 && daemon->dhcp_buff[len - 1] == 0) in dhcp_reply()
493 daemon->dhcp_buff[len] = 0; in dhcp_reply()
494 if (legal_hostname(daemon->dhcp_buff)) client_hostname = daemon->dhcp_buff; in dhcp_reply()
497 if (client_hostname && daemon->options & OPT_LOG_OPTS) in dhcp_reply()
518 find_config(daemon->dhcp_conf, context, NULL, 0, mess->chaddr, mess->hlen, in dhcp_reply()
539 for (o = daemon->dhcp_match; o; o = o->next) { in dhcp_reply()
590 for (vendor = daemon->dhcp_vendors; vendor; vendor = vendor->next) { in dhcp_reply()
612 match_vendor_opts(option_find(mess, sz, OPTION_VENDOR_ID, 1), daemon->dhcp_opts); in dhcp_reply()
614 if (daemon->options & OPT_LOG_OPTS) { in dhcp_reply()
615 if (sanitise(option_find(mess, sz, OPTION_VENDOR_ID, 1), daemon->namebuff)) in dhcp_reply()
617 daemon->namebuff); in dhcp_reply()
618 if (sanitise(option_find(mess, sz, OPTION_USER_CLASS, 1), daemon->namebuff)) in dhcp_reply()
620 daemon->namebuff); in dhcp_reply()
624 for (id_list = daemon->dhcp_ignore; id_list; id_list = id_list->next) in dhcp_reply()
631 if (daemon->enable_pxe && (opt = option_find(mess, sz, OPTION_VENDOR_ID, 9)) && in dhcp_reply()
658 for (service = daemon->pxe_services; service; service = service->next) in dhcp_reply()
683 opt71.next = daemon->dhcp_opts; in dhcp_reply()
735 req_options = (unsigned char*) daemon->dhcp_buff2; in dhcp_reply()
747 sanitise(option_find(mess, sz, OPTION_MESSAGE, 1), daemon->dhcp_buff); in dhcp_reply()
752 daemon->dhcp_buff, mess->xid); in dhcp_reply()
757 prettyprint_time(daemon->dhcp_buff, DECLINE_BACKOFF); in dhcp_reply()
759 inet_ntoa(config->addr), daemon->dhcp_buff); in dhcp_reply()
806 addrs, print_mac(daemon->namebuff, mac, len)); in dhcp_reply()
830 !config_find_by_address(daemon->dhcp_conf, lease->addr)) in dhcp_reply()
834 !config_find_by_address(daemon->dhcp_conf, addr)) in dhcp_reply()
893 if (!(daemon->options & OPT_AUTHORITATIVE)) return 0; in dhcp_reply()
905 if (!lease && !(daemon->options & OPT_AUTHORITATIVE)) return 0; in dhcp_reply()
921 (!lease && !(daemon->options & OPT_AUTHORITATIVE))) { in dhcp_reply()
965 else if ((addr_config = config_find_by_address(daemon->dhcp_conf, mess->yiaddr)) && in dhcp_reply()
975 print_mac(daemon->namebuff, ltmp->hwaddr, ltmp->hwaddr_len), in dhcp_reply()
1067 for (id_list = daemon->dhcp_ignore_names; id_list; id_list = id_list->next) in dhcp_reply()
1235 print_mac(daemon->namebuff, ext_mac, mac_len); in log_packet()
1237 if (daemon->options & OPT_LOG_OPTS) in log_packet()
1239 … addr ? inet_ntoa(a) : "", addr ? " " : "", daemon->namebuff, string ? string : ""); in log_packet()
1242 addr ? " " : "", daemon->namebuff, string ? string : ""); in log_packet()
1252 for (daemon->namebuff[0] = 0, i = 0; i <= trunc - INADDRSZ; i += INADDRSZ) { in log_options()
1253 if (i != 0) strncat(daemon->namebuff, ", ", 256 - strlen(daemon->namebuff)); in log_options()
1254 strncat(daemon->namebuff, inet_ntoa(option_addr_arr(start, i)), in log_options()
1255 256 - strlen(daemon->namebuff)); in log_options()
1257 else if (!is_name || !sanitise(start, daemon->namebuff)) { in log_options()
1259 print_mac(daemon->namebuff, option_ptr(start, 0), trunc); in log_options()
1264 trunc == 0 ? "" : " ", trunc == 0 ? "" : daemon->namebuff, in log_options()
1372 if (netid && (daemon->options & OPT_LOG_OPTS)) { in dhcp_packet_size()
1373 char* s = daemon->namebuff; in dhcp_packet_size()
1392 if (daemon->options & OPT_LOG_OPTS) log_options(mess->file, mess->xid); in dhcp_packet_size()
1393 } else if ((daemon->options & OPT_LOG_OPTS) && strlen((char*) mess->file) != 0) in dhcp_packet_size()
1399 if (daemon->options & OPT_LOG_OPTS) log_options(mess->sname, mess->xid); in dhcp_packet_size()
1400 } else if ((daemon->options & OPT_LOG_OPTS) && strlen((char*) mess->sname) != 0) in dhcp_packet_size()
1406 if (daemon->options & OPT_LOG_OPTS) { in dhcp_packet_size()
1414 for (id_list = daemon->force_broadcast; id_list; id_list = id_list->next) in dhcp_packet_size()
1608 for (opt = daemon->dhcp_opts; opt; opt = opt->next) in prune_vendor_opts()
1638 ret = daemon->dhcp_opts; in pxe_opts()
1649 p = (unsigned char*) daemon->dhcp_buff; in pxe_opts()
1650 q = (unsigned char*) daemon->dhcp_buff2; in pxe_opts()
1652 for (i = 0, service = daemon->pxe_services; service; service = service->next) in pxe_opts()
1657 if (p - (unsigned char*) daemon->dhcp_buff + len + 3 < 253) { in pxe_opts()
1667 return daemon->dhcp_opts; in pxe_opts()
1672 if (q - (unsigned char*) daemon->dhcp_buff2 + 3 + INADDRSZ >= 253) goto toobig; in pxe_opts()
1695 ret->len = p - (unsigned char*) daemon->dhcp_buff; in pxe_opts()
1696 ret->val = (unsigned char*) daemon->dhcp_buff; in pxe_opts()
1699 if (q - (unsigned char*) daemon->dhcp_buff2 != 0) { in pxe_opts()
1701 ret->len = q - (unsigned char*) daemon->dhcp_buff2; in pxe_opts()
1702 ret->val = (unsigned char*) daemon->dhcp_buff2; in pxe_opts()
1707 for (o = daemon->dhcp_opts; o; o = o->next) in pxe_opts()
1738 for (boot = daemon->boot_config; boot; boot = boot->next) in find_boot()
1741 for (boot = daemon->boot_config; boot; boot = boot->next) in find_boot()
1751 struct dhcp_opt *opt, *config_opts = daemon->dhcp_opts; in do_options()
1763 if ((daemon->options & OPT_LOG_OPTS) && req_options) { in do_options()
1764 char* q = daemon->namebuff; in do_options()
1767 q += snprintf(q, MAXDNAME - (q - daemon->namebuff), "%d%s%s%s", req_options[i], in do_options()
1769 if (req_options[i + 1] == OPTION_END || (q - daemon->namebuff) > 40) { in do_options()
1770 q = daemon->namebuff; in do_options()
1772 daemon->namebuff); in do_options()
1787 if (!(daemon->options & OPT_NO_OVERRIDE) && req_options && in do_options()
1795 if (!(daemon->options & OPT_NO_OVERRIDE) && req_options && in do_options()
1830 if (!req_options || (daemon->options & OPT_NO_OVERRIDE)) { in do_options()
1993 if (!req_options || (daemon->options & OPT_NO_OVERRIDE)) { in do_options()