• Home
  • Raw
  • Download

Lines Matching refs:daemon

66       for (bridge = daemon->bridges; bridge; bridge = bridge->next)  in iface_check()
90 if (daemon->if_names || (addr && daemon->if_addrs)) in iface_check()
94 for (tmp = daemon->if_names; tmp; tmp = tmp->next) in iface_check()
98 for (tmp = daemon->if_addrs; tmp; tmp = tmp->next) in iface_check()
115 for (tmp = daemon->if_except; tmp; tmp = tmp->next) in iface_check()
159 if (daemon->if_names && loopback) in iface_allowed()
162 for (lo = daemon->if_names; lo; lo = lo->next) in iface_allowed()
175 lo->next = daemon->if_names; in iface_allowed()
176 daemon->if_names = lo; in iface_allowed()
184 for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next) in iface_allowed()
226 addr.in6.sin6_port = htons(daemon->port); in iface_allowed_v6()
253 addr.in.sin_port = htons(daemon->port); in iface_allowed_v4()
261 return iface_enumerate(&daemon->interfaces, iface_allowed_v4, iface_allowed_v6); in enumerate_interfaces()
263 return iface_enumerate(&daemon->interfaces, iface_allowed_v4, NULL); in enumerate_interfaces()
343 addr.in.sin_port = htons(daemon->port); in create_wildcard_listeners()
348 if (daemon->port != 0) in create_wildcard_listeners()
360 !create_ipv6_listener(&l6, daemon->port) || in create_wildcard_listeners()
375 if (daemon->options & OPT_TFTP) in create_wildcard_listeners()
433 if (daemon->port != 0) in create_bound_listener()
475 prettyprint_addr(&iface->addr, daemon->namebuff); in create_bound_listener()
476 die(_("failed to bind listening socket for %s: %s"), daemon->namebuff, EC_BADNET); in create_bound_listener()
484 if ((daemon->options & OPT_TFTP) && iface->addr.sa.sa_family == AF_INET && iface->dhcp_ok) in create_bound_listener()
512 for (l = daemon->listeners; l; l = l->next) { in fixup_possible_existing_listener()
533 int port = prettyprint_addr(&listener->iface->addr, daemon->namebuff); in delete_listener()
534 my_syslog(LOG_INFO, _("Closing listener [%s]:%d"), daemon->namebuff, port); in delete_listener()
573 struct listener **l = &daemon->listeners; in close_bound_listener()
604 for (iface = daemon->interfaces; iface; iface = iface->next) in create_bound_listeners()
618 if (daemon->port != 0) in create_bound_listeners()
658 prettyprint_addr(&iface->addr, daemon->namebuff); in create_bound_listeners()
660 daemon->namebuff, EC_BADNET); in create_bound_listeners()
668 if ((daemon->options & OPT_TFTP) && iface->addr.sa.sa_family == AF_INET && iface->dhcp_ok) in create_bound_listeners()
696 unsigned int ports_avail = 65536u - (unsigned short)daemon->min_port; in random_sock()
709 if (daemon->min_port != 0) in random_sock()
710 port = htons(daemon->min_port + (port % ((unsigned short)ports_avail))); in random_sock()
782 if (!daemon->osport && intname[0] == 0) in allocate_sfd()
800 for (sfd = daemon->sfds; sfd; sfd = sfd->next ) in allocate_sfd()
829 sfd->next = daemon->sfds; in allocate_sfd()
830 daemon->sfds = sfd; in allocate_sfd()
840 if (daemon->query_port != 0) in pre_allocate_sfds()
846 addr.in.sin_port = htons(daemon->query_port); in pre_allocate_sfds()
855 addr.in6.sin6_port = htons(daemon->query_port); in pre_allocate_sfds()
863 for (srv = daemon->servers; srv; srv = srv->next) in pre_allocate_sfds()
867 (daemon->options & OPT_NOWILD)) in pre_allocate_sfds()
869 prettyprint_addr(&srv->addr, daemon->namebuff); in pre_allocate_sfds()
872 strcat(daemon->namebuff, " "); in pre_allocate_sfds()
873 strcat(daemon->namebuff, srv->interface); in pre_allocate_sfds()
876 daemon->namebuff, EC_BADNET); in pre_allocate_sfds()
887 for (new = daemon->servers; new; new = tmp) in check_servers()
893 port = prettyprint_addr(&new->addr, daemon->namebuff); in check_servers()
903 for (iface = daemon->interfaces; iface; iface = iface->next) in check_servers()
908 my_syslog(LOG_WARNING, _("ignoring nameserver %s - local interface"), daemon->namebuff); in check_servers()
920 daemon->namebuff, strerror(errno)); in check_servers()
943 my_syslog(LOG_INFO, _("using nameserver %s#%d for %s %s"), daemon->namebuff, port, s1, s2); in check_servers()
946 my_syslog(LOG_INFO, _("using nameserver %s#%d(via %s)"), daemon->namebuff, port, new->interface); in check_servers()
948 my_syslog(LOG_INFO, _("using nameserver %s#%d"), daemon->namebuff, port); in check_servers()
951 daemon->servers = ret; in check_servers()
975 prev_if_names = daemon->if_names; in set_interfaces()
976 daemon->if_names = NULL; in set_interfaces()
978 prev_interfaces = daemon->interfaces; in set_interfaces()
979 daemon->interfaces = NULL; in set_interfaces()
991 if_tmp->next = daemon->if_names; in set_interfaces()
992 daemon->if_names = if_tmp; in set_interfaces()
999 for (if_tmp = daemon->if_names; if_tmp; if_tmp = if_tmp->next) { in set_interfaces()
1008 for (new_iface = daemon->interfaces; new_iface; new_iface = new_iface->next) { in set_interfaces()
1030 if (was_wild) daemon->options |= OPT_NOWILD; in set_interfaces()
1033 for (new_iface = daemon->interfaces; new_iface; new_iface = new_iface->next) { in set_interfaces()
1051 create_bound_listener(&(daemon->listeners), new_iface); in set_interfaces()
1090 for (serv = daemon->servers; serv;) in set_servers()
1125 source_addr.in.sin_port = htons(daemon->query_port); in set_servers()
1133 source_addr.in6.sin6_port = htons(daemon->query_port); in set_servers()
1169 daemon->servers = new_servers; in set_servers()
1195 for (serv = daemon->servers; serv;) in reload_servers()
1213 while ((line = fgets(daemon->namebuff, MAXDNAME, f))) in reload_servers()
1233 source_addr.in.sin_port = htons(daemon->query_port); in reload_servers()
1241 source_addr.in6.sin6_port = htons(daemon->query_port); in reload_servers()
1278 daemon->servers = new_servers; in reload_servers()
1291 for (l = daemon->listeners; l && l->family != AF_INET; l = l->next); in get_ifaddr()