Home | History | Annotate | Download | only in src

Lines Matching refs:daemon

57   if (daemon->options & OPT_NOWILD)
70 saddr.sin_port = htons(daemon->dhcp_server_port);
79 daemon->dhcpfd = fd;
86 if (daemon->options & OPT_NO_PING)
87 daemon->dhcp_icmp_fd = -1;
88 else if ((daemon->dhcp_icmp_fd = make_icmp_sock()) == -1 ||
89 setsockopt(daemon->dhcp_icmp_fd, SOL_SOCKET, SO_RCVBUF, &oneopt, sizeof(oneopt)) == -1 )
98 daemon->dhcp_packet.iov_len = sizeof(struct dhcp_packet);
99 daemon->dhcp_packet.iov_base = safe_malloc(daemon->dhcp_packet.iov_len);
132 msg.msg_iov = &daemon->dhcp_packet;
138 while ((sz = recvmsg(daemon->dhcpfd, &msg, MSG_PEEK | MSG_TRUNC)) == -1 && errno == EINTR);
148 if ((size_t)sz == daemon->dhcp_packet.iov_len)
150 if (!expand_buf(&daemon->dhcp_packet, sz + 100))
155 expand_buf(&daemon->dhcp_packet, sz);
161 mess = (struct dhcp_packet *)daemon->dhcp_packet.iov_base;
168 while ((sz = recvmsg(daemon->dhcpfd, &msg, 0)) == -1 && errno == EINTR);
198 if (!indextoname(daemon->dhcpfd, iface_index, ifr.ifr_name))
208 if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) != -1 )
217 for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
224 if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) == -1)
234 for (context = daemon->dhcp; context; context = context->next)
258 iov.iov_base = daemon->dhcp_packet.iov_base;
261 mess = (struct dhcp_packet *)daemon->dhcp_packet.iov_base;
270 dest.sin_port = htons(daemon->dhcp_server_port);
282 dest.sin_port = htons(daemon->dhcp_client_port);
302 dest.sin_port = htons(daemon->dhcp_client_port);
310 dest.sin_port = htons(daemon->dhcp_client_port);
316 ioctl(daemon->dhcpfd, SIOCSARP, &req);
323 dest.sin_port = htons(daemon->dhcp_client_port);
335 dest.sin_port = htons(daemon->dhcp_client_port);
340 ioctl(daemon->dhcpfd, SIOCSARP, &req);
351 setsockopt(daemon->dhcpfd, IPPROTO_IP, IP_BOUND_IF, &iface_index, sizeof(iface_index));
354 while(sendmsg(daemon->dhcpfd, &msg, 0) == -1 && retry_send());
373 for (context = daemon->dhcp; context; context = context->next)
383 strcpy(daemon->dhcp_buff, inet_ntoa(context->start));
384 strcpy(daemon->dhcp_buff2, inet_ntoa(context->end));
386 daemon->dhcp_buff, daemon->dhcp_buff2, inet_ntoa(netmask));
573 !config_find_by_address(daemon->dhcp_conf, addr) &&
583 if (daemon->options & OPT_NO_PING)
592 for (count = 0, r = daemon->ping_results; r; r = r->next)
609 victim->next = daemon->ping_results;
610 daemon->ping_results = victim;
722 char *buff = daemon->namebuff;
739 for (up = &daemon->dhcp_conf, config = daemon->dhcp_conf; config; config = tmp)
791 for (config = daemon->dhcp_conf; config; config = config->next)
808 for (config = daemon->dhcp_conf; config; config = config->next)
821 for (config = daemon->dhcp_conf; config; config = config->next)
840 config->next = daemon->dhcp_conf;
841 daemon->dhcp_conf = config;
887 for (configs = daemon->dhcp_conf; configs; configs = configs->next)
901 inet_ntoa(cp->addr), daemon->dhcp_hosts_file);
929 if (daemon->port != 0)
968 if (daemon->port == 0)
974 hostname = daemon->dhcp_buff;