Lines Matching refs:ent
772 struct ifaddrs* ent) { in uv__set_phys_addr() argument
780 sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); in uv__set_phys_addr()
814 static int uv__ifaddr_exclude(struct ifaddrs *ent) { in uv__ifaddr_exclude() argument
815 if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) in uv__ifaddr_exclude()
817 if (ent->ifa_addr == NULL) in uv__ifaddr_exclude()
819 if (ent->ifa_addr->sa_family != AF_INET && in uv__ifaddr_exclude()
820 ent->ifa_addr->sa_family != AF_INET6) in uv__ifaddr_exclude()
828 struct ifaddrs* ent; in uv_interface_addresses() local
837 for (ent = addrs; ent != NULL; ent = ent->ifa_next) { in uv_interface_addresses()
838 if (uv__ifaddr_exclude(ent)) in uv_interface_addresses()
856 for (ent = addrs; ent != NULL; ent = ent->ifa_next) { in uv_interface_addresses()
857 if (uv__ifaddr_exclude(ent)) in uv_interface_addresses()
860 address->name = uv__strdup(ent->ifa_name); in uv_interface_addresses()
862 if (ent->ifa_addr->sa_family == AF_INET6) { in uv_interface_addresses()
863 address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); in uv_interface_addresses()
865 address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); in uv_interface_addresses()
868 if (ent->ifa_netmask->sa_family == AF_INET6) { in uv_interface_addresses()
869 address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); in uv_interface_addresses()
871 address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); in uv_interface_addresses()
874 address->is_internal = !!((ent->ifa_flags & IFF_PRIVATE) || in uv_interface_addresses()
875 (ent->ifa_flags & IFF_LOOPBACK)); in uv_interface_addresses()
877 uv__set_phys_addr(address, ent); in uv_interface_addresses()