Lines Matching refs:iface
69 if (strncmp(name, alias->iface, IF_NAMESIZE) == 0) in iface_check()
73 if (!(newindex = if_nametoindex(bridge->iface))) in iface_check()
81 strncpy(name, bridge->iface, IF_NAMESIZE); in iface_check()
125 struct irec *iface; in iface_allowed() local
133 for (iface = *irecp; iface; iface = iface->next) in iface_allowed()
134 if (sockaddr_isequal(&iface->addr, addr)) in iface_allowed()
196 if ((iface = whine_malloc(sizeof(struct irec)))) in iface_allowed()
198 iface->addr = *addr; in iface_allowed()
199 iface->netmask = netmask; in iface_allowed()
200 iface->dhcp_ok = dhcp_ok; in iface_allowed()
201 iface->mtu = mtu; in iface_allowed()
202 iface->next = *irecp; in iface_allowed()
203 *irecp = iface; in iface_allowed()
325 l->iface = NULL; in create_ipv6_listener()
398 l->iface = NULL; in create_wildcard_listeners()
417 void create_bound_listener(struct listener **listeners, struct irec *iface) in create_bound_listener() argument
425 new->family = iface->addr.sa.sa_family; in create_bound_listener()
426 new->iface = iface; in create_bound_listener()
435 if ((new->tcpfd = socket(iface->addr.sa.sa_family, SOCK_STREAM, 0)) == -1 || in create_bound_listener()
436 (new->fd = socket(iface->addr.sa.sa_family, SOCK_DGRAM, 0)) == -1 || in create_bound_listener()
444 if (iface->addr.sa.sa_family == AF_INET6) in create_bound_listener()
454 if ((rc = bind(new->fd, &iface->addr.sa, sa_len(&iface->addr))) != -1) in create_bound_listener()
463 if (iface->addr.sa.sa_family == AF_INET6 && (errno == ENODEV || errno == EADDRNOTAVAIL) && in create_bound_listener()
473 if (rc == -1 || bind(new->tcpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listener()
475 prettyprint_addr(&iface->addr, daemon->namebuff); in create_bound_listener()
484 if ((daemon->options & OPT_TFTP) && iface->addr.sa.sa_family == AF_INET && iface->dhcp_ok) in create_bound_listener()
486 short save = iface->addr.in.sin_port; in create_bound_listener()
487 iface->addr.in.sin_port = htons(TFTP_PORT); in create_bound_listener()
491 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listener()
493 iface->addr.in.sin_port = save; in create_bound_listener()
513 struct irec *listener_iface = l->iface; in fixup_possible_existing_listener()
516 l->iface = new_iface; in fixup_possible_existing_listener()
532 if (listener->iface) { in delete_listener()
533 int port = prettyprint_addr(&listener->iface->addr, daemon->namebuff); in delete_listener()
569 int close_bound_listener(struct irec *iface) in close_bound_listener() argument
575 struct irec *listener_iface = (*l)->iface; in close_bound_listener()
577 if (iface && listener_iface && sockaddr_isequal(&listener_iface->addr, &iface->addr)) { in close_bound_listener()
582 if (iface == NULL && listener_iface == NULL) { in close_bound_listener()
596 struct irec *iface; in create_bound_listeners() local
604 for (iface = daemon->interfaces; iface; iface = iface->next) in create_bound_listeners()
607 create_bound_listener(&listeners, iface); in create_bound_listeners()
610 new->family = iface->addr.sa.sa_family; in create_bound_listeners()
611 new->iface = iface; in create_bound_listeners()
620 if ((new->tcpfd = socket(iface->addr.sa.sa_family, SOCK_STREAM, 0)) == -1 || in create_bound_listeners()
621 (new->fd = socket(iface->addr.sa.sa_family, SOCK_DGRAM, 0)) == -1 || in create_bound_listeners()
629 if (iface->addr.sa.sa_family == AF_INET6) in create_bound_listeners()
639 if ((rc = bind(new->fd, &iface->addr.sa, sa_len(&iface->addr))) != -1) in create_bound_listeners()
646 if (iface->addr.sa.sa_family == AF_INET6 && (errno == ENODEV || errno == EADDRNOTAVAIL) && in create_bound_listeners()
656 if (rc == -1 || bind(new->tcpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listeners()
658 prettyprint_addr(&iface->addr, daemon->namebuff); in create_bound_listeners()
668 if ((daemon->options & OPT_TFTP) && iface->addr.sa.sa_family == AF_INET && iface->dhcp_ok) in create_bound_listeners()
670 short save = iface->addr.in.sin_port; in create_bound_listeners()
671 iface->addr.in.sin_port = htons(TFTP_PORT); in create_bound_listeners()
675 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listeners()
677 iface->addr.in.sin_port = save; in create_bound_listeners()
883 struct irec *iface; in check_servers() local
903 for (iface = daemon->interfaces; iface; iface = iface->next) in check_servers()
904 if (sockaddr_isequal(&new->addr, &iface->addr)) in check_servers()
906 if (iface) in check_servers()