Lines Matching full:ep

299 	endpt *			ep;
722 for (ifi.ep = ep_list; ifi.ep != NULL; ifi.ep = ifi.ep->elink)
731 endpt *ep
734 ZERO(*ep);
735 ep->fd = INVALID_SOCKET;
736 ep->bfd = INVALID_SOCKET;
737 ep->phase = sys_interphase;
778 endpt *ep
782 io_completion_port_remove_interface(ep);
784 free(ep);
793 endpt * ep
803 ep->addr_refid = addr2refid(&ep->sin);
805 if (IS_IPV6(&ep->sin)) {
806 ep->old_refid = BYTESWAP32(ep->addr_refid);
810 LINK_TAIL_SLIST(ep_list, ep, elink, endpt);
814 if (ep->ignore_packets || !(INT_MULTICAST & ep->flags) ||
815 INT_LOOPBACK & ep->flags)
818 if (AF_INET6 == ep->family)
821 pmclisthead = (AF_INET == ep->family)
831 if ( ep->family != scan->family
832 || ep->ifindex != scan->ifindex) {
835 same_subnet = addr_samesubnet(&ep->sin, &ep->mask,
840 stoa(&ep->sin), stoa(&scan->sin)));
844 LINK_SLIST(*pmclisthead, ep, mclink);
845 if (INVALID_SOCKET == ep->fd)
851 switch (AF(&ep->sin)) {
854 rc = setsockopt(ep->fd, IPPROTO_IP,
856 (void *)&NSRCADR(&ep->sin),
857 sizeof(NSRCADR(&ep->sin)));
861 stoa(&ep->sin));
866 rc = setsockopt(ep->fd, IPPROTO_IPV6,
868 (void *)&ep->ifindex,
869 sizeof(ep->ifindex));
871 if (rc && ep->ifindex != SCOPE(&ep->sin))
874 ep->ifindex, stoa(&ep->sin));
888 endpt * ep
896 UNLINK_SLIST(unlinked, ep_list, ep, elink, endpt);
897 if (!ep->ignore_packets && INT_MULTICAST & ep->flags) {
898 pmclisthead = (AF_INET == ep->family)
901 UNLINK_SLIST(unlinked, *pmclisthead, ep, mclink, endpt);
903 stoa(&ep->sin),
907 (AF_INET == ep->family)
911 delete_interface_from_list(ep);
913 if (ep->fd != INVALID_SOCKET) {
918 ep->ifnum,
919 ep->name,
920 stoa(&ep->sin),
921 SRCPORT(&ep->sin),
922 ep->received,
923 ep->sent,
924 ep->notsent,
925 current_time - ep->starttime);
926 close_and_delete_fd_from_list(ep->fd, ep);
927 ep->fd = INVALID_SOCKET;
930 if (ep->bfd != INVALID_SOCKET) {
933 stoa(&ep->bcast), ep->ifnum, ep->name);
934 close_and_delete_fd_from_list(ep->bfd, ep);
935 ep->bfd = INVALID_SOCKET;
938 io_completion_port_remove_interface(ep);
942 mon_clearinterface(ep);
945 SET_HOSTMASK(&resmask, AF(&ep->sin));
946 success = hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask, 0,
951 stoa(&ep->sin));
959 endpt * ep
963 (ep->ignore_packets)
966 ep->ifnum,
967 ep->name,
968 sptoa(&ep->sin));
1685 endpt * ep;
1806 ep = getinterface(&enumep.sin, INT_WILDCARD);
1808 if (NULL == ep) {
1809 ep = emalloc(sizeof(*ep));
1810 memcpy(ep, &enumep, sizeof(*ep));
1812 newaddrs_tail->elink = ep;
1813 newaddrs_tail = ep;
1815 newaddrs_tail = newaddrs = ep;
1820 if (!refresh_interface(ep)) {
1833 if (ep->phase != sys_interphase) {
1842 strlcpy(ep->name, enumep.name, sizeof(ep->name));
1843 ep->ignore_packets = enumep.ignore_packets;
1850 stoa(&ep->sin), ep->ifnum, ep->name);
1852 strlcpy(ep->name, "*multiple*", sizeof(ep->name));
1855 DPRINT_INTERFACE(4, (ep, "updating ", " present\n"));
1857 if (ep->ignore_packets != enumep.ignore_packets) {
1876 enumep.name, ep->name, stoa(&enumep.sin));
1878 ep->ignore_packets = TRUE;
1881 ep->phase = sys_interphase;
1884 ifi.ep = ep;
1895 for (ep = newaddrs; ep != NULL; ep = ep->elink) {
1896 if (IS_IPV6(&ep->sin) && is_linklocal(&ep->sin)) {
1899 && ep != ep2
1902 ep->flags |= INT_LL_OF_GLOB;
1911 ep = create_interface(port, ep2);
1912 if (ep != NULL) {
1914 ifi.ep = ep;
1920 (ep, "updating ", " new - created\n"));
1924 (ep, "updating ", " new - FAILED"));
1928 stoa(&ep->sin));
1937 for (ep = ep_list; ep != NULL; ep = next_ep) {
1938 next_ep = ep->elink;
1947 if (((INT_WILDCARD | INT_MCASTIF) & ep->flags) ||
1948 ep->phase == sys_interphase)
1951 DPRINT_INTERFACE(3, (ep, "updating ",
1953 remove_interface(ep);
1956 ifi.ep = ep;
1961 while (ep->peers != NULL) {
1962 set_peerdstadr(ep->peers, NULL);
1968 if (ep == loopback_interface) {
1971 delete_interface(ep);
1990 for (ep = ep_list; ep != NULL; ep = ep->elink) {
1993 if (!(INT_MCASTIF & ep->flags) || (INT_MCASTOPEN & ep->flags)) {
2000 if (entry->ep == ep) {
2001 if (socket_multicast_enable(ep, &entry->addr)) {
2004 stoa(&ep->sin),
2286 endpt *ep;
2288 for (ep = ep_list; ep != NULL; ep = ep->elink) {
2289 if (ep->flags & INT_WILDCARD)
2293 * if ep->fd is INVALID_SOCKET, we might have a adapter
2297 ep->name, stoa(&ep->sin),
2300 if (ep->fd != INVALID_SOCKET) {
2301 if (setsockopt(ep->fd, SOL_SOCKET, SO_REUSEADDR,
2304 stoa(&ep->sin), flag ? "on" : "off");
2649 endpt * ep;
2655 for (ep = ep_list; ep != NULL; ep = ep->elink) {
2659 if (AF_INET == ep->family) {
2663 if (ep->flags & (INT_WILDCARD | INT_LOOPBACK))
2667 if (ep->ignore_packets)
2671 if (!(ep->flags & INT_BROADCAST))
2675 REQUIRE(IS_IPV4(&ep->bcast));
2678 if (ep->flags & INT_BCASTOPEN) {
2690 ep->family = AF_INET;
2691 ep->bfd = open_socket(&ep->bcast, 1, 0, ep);
2697 if (ep->bfd != INVALID_SOCKET) {
2699 ep->flags |= INT_BCASTOPEN;
2702 stoa(&ep->bcast), ep->ifnum, ep->name);
2716 if (ep->fd != INVALID_SOCKET) {
2717 ep->flags |= INT_BCASTOPEN;
2726 stoa(&ep->bcast), ep->ifnum, ep->name);
2758 endpt *ep;
2760 for (ep = ep_list; ep != NULL; ep = ep->elink) {
2761 if (INT_WILDCARD & ep->flags)
2763 if (!(INT_BCASTOPEN & ep->flags))
2766 if (ep->bfd != INVALID_SOCKET) {
2770 stoa(&ep->bcast), ep->ifnum, ep->name);
2771 close_and_delete_fd_from_list(ep->bfd, ep);
2772 ep->bfd = INVALID_SOCKET;
2774 ep->flags &= ~INT_BCASTOPEN;
2789 endpt * ep;
2804 ep = new_interface(NULL);
2809 ep->sin = *addr;
2810 SET_PORT(&ep->sin, NTP_PORT);
2811 ep->family = AF(&ep->sin);
2812 AF(&ep->mask) = ep->family;
2813 SET_ONESMASK(&ep->mask);
2816 ep->bfd = INVALID_SOCKET;
2817 ep->fd = open_socket(&ep->sin, 0, 0, ep);
2818 if (ep->fd != INVALID_SOCKET) {
2819 ep->ignore_packets = ISC_FALSE;
2820 ep->flags |= INT_MCASTIF;
2821 ep->ifindex = SCOPE(addr);
2823 strlcpy(ep->name, "multicast", sizeof(ep->name));
2824 DPRINT_INTERFACE(2, (ep, "multicast add ", "\n"));
2825 add_interface(ep);
2826 log_listen_address(ep);
2829 delete_interface(ep);
2832 ep = wildipv4;
2834 ep = wildipv6;
2836 ep = NULL;
2838 if (ep != NULL) {
2841 ep->bcast = *addr;
2844 stoa(addr), ep->ifnum, ep->name);
2853 one_ep = ep;
2863 for (ep = ep_list; ep != NULL; ep = ep->elink) {
2864 if (ep->ignore_packets || AF(&ep->sin) != AF(addr) ||
2865 !(INT_MULTICAST & ep->flags) ||
2866 (INT_LOOPBACK | INT_WILDCARD) & ep->flags)
2868 one_ep = ep;
2870 if (socket_multicast_enable(ep, addr))
2873 stoa(&ep->sin),
3170 endpt * ep,
3186 src = ep;
3831 endpt * ep;
3886 for (ep = ep_list; ep != NULL; ep = ep->elink) {
3889 fd = ep->fd;
3891 if (!(ep->flags & INT_BCASTOPEN))
3893 fd = ep->bfd;
3900 fd, ep, ts);
3962 endpt *ep;
3977 ep = loopback_interface;
3980 ep = findbcastinter(srcadr);
3981 if (ep != NULL)
3983 stoa(&ep->sin), stoa(srcadr)));
3988 ep = dstadr;
3989 if (NULL == ep) {
3990 ep = wild;
3999 if (wild == ep) {
4000 ep = findinterface(srcadr);
4007 if (ep != NULL && (INT_WILDCARD & ep->flags)) {
4009 ep = NULL;
4013 ep = loopback_interface;
4016 return ep;
4168 endpt * ep;
4176 for (ep = ep_list; ep != NULL; ep = ep->elink) {
4177 if (ep->ignore_packets ||
4178 AF(addr) != ep->family ||
4179 flags & ep->flags)
4182 calc_addr_distance(&addr_dist, addr, &ep->sin);
4186 winner = ep;
4568 endpt *ep /* req. if fd is in struct endpt */
4583 if (ep != NULL) {
4584 io_completion_port_remove_socket(fd, ep);
4612 endpt * ep
4623 laddr->ep = ep;
4664 UNLINK_EXPR_SLIST_CURRENT()->ep, link,
4692 return entry->ep;
4719 && (entry->ep->flags & flags) == flags) {
4722 return entry->ep;