Lines Matching refs:addr

50   for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) {  in TEST()  local
51 if (addr->ifa_name && strcmp(addr->ifa_name, "lo") == 0) { in TEST()
52 if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) lo_inet4 = addr; in TEST()
53 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET6) lo_inet6 = addr; in TEST()
54 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_PACKET) lo_packet = addr; in TEST()
83 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local
84 int family = addr->ifa_addr ? addr->ifa_addr->sa_family : in TEST()
85 addr->ifa_broadaddr ? addr->ifa_broadaddr->sa_family : in TEST()
89 ifaddrs_socks.push_back(std::string(addr->ifa_name)); in TEST()
133 in_addr_t addr = sock->sin_addr.s_addr; in CheckAddressIsInSet() local
135 EXPECT_TRUE(addrs.find(addr) != addrs.end()) << if_name << ' ' << std::hex << ntohl(addr); in CheckAddressIsInSet()
145 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local
146 if (addr->ifa_name && addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) { in TEST()
147 auto sock = reinterpret_cast<sockaddr_in*>(addr->ifa_addr); in TEST()
148 inet_addrs[addr->ifa_name].insert(sock->sin_addr.s_addr); in TEST()
150 if (addr->ifa_name && addr->ifa_broadaddr && addr->ifa_broadaddr->sa_family == AF_INET) { in TEST()
151 auto sock = reinterpret_cast<sockaddr_in*>(addr->ifa_broadaddr); in TEST()
152 broad_addrs[addr->ifa_name].insert(sock->sin_addr.s_addr); in TEST()
173 static void print_sockaddr_inet(const char* what, const sockaddr* addr) { in print_sockaddr_inet() argument
175 int family = addr->sa_family; in print_sockaddr_inet()
176 int error = getnameinfo(addr, in print_sockaddr_inet()