Lines Matching refs:ent
620 static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) { in uv__ifaddr_exclude() argument
621 if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING))) in uv__ifaddr_exclude()
623 if (ent->ifa_addr == NULL) in uv__ifaddr_exclude()
629 if (ent->ifa_addr->sa_family == PF_PACKET) in uv__ifaddr_exclude()
641 struct ifaddrs *addrs, *ent; in uv_interface_addresses()
653 for (ent = addrs; ent != NULL; ent = ent->ifa_next) { in uv_interface_addresses()
654 if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFADDR)) in uv_interface_addresses()
674 for (ent = addrs; ent != NULL; ent = ent->ifa_next) { in uv_interface_addresses()
675 if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFADDR)) in uv_interface_addresses()
678 address->name = uv__strdup(ent->ifa_name); in uv_interface_addresses()
680 if (ent->ifa_addr->sa_family == AF_INET6) { in uv_interface_addresses()
681 address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr); in uv_interface_addresses()
683 address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr); in uv_interface_addresses()
686 if (ent->ifa_netmask->sa_family == AF_INET6) { in uv_interface_addresses()
687 address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask); in uv_interface_addresses()
689 address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask); in uv_interface_addresses()
692 address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK); in uv_interface_addresses()
698 for (ent = addrs; ent != NULL; ent = ent->ifa_next) { in uv_interface_addresses()
699 if (uv__ifaddr_exclude(ent, UV__EXCLUDE_IFPHYS)) in uv_interface_addresses()
705 size_t namelen = strlen(ent->ifa_name); in uv_interface_addresses()
707 if (strncmp(address->name, ent->ifa_name, namelen) == 0 && in uv_interface_addresses()
709 sll = (struct sockaddr_ll*)ent->ifa_addr; in uv_interface_addresses()