Searched refs:ifa (Results 1 – 3 of 3) sorted by relevance
/bionic/tests/ |
D | ifaddrs_test.cpp | 227 for (ifaddrs* ifa = addrs; ifa != nullptr; ifa = ifa->ifa_next) { in TEST() local 228 int family = ifa->ifa_addr ? ifa->ifa_addr->sa_family : in TEST() 229 ifa->ifa_broadaddr ? ifa->ifa_broadaddr->sa_family : AF_UNSPEC; in TEST() 233 ifa->ifa_name, FamilyToName(family), family, in TEST() 234 ifa->ifa_flags, FlagsToString(ifa->ifa_flags).c_str()); in TEST() 237 if (ifa->ifa_addr) print_sockaddr_ll("hwaddr", ifa->ifa_addr); in TEST() 238 if (ifa->ifa_broadaddr) print_sockaddr_ll("hwbroad", ifa->ifa_addr); in TEST() 240 if (ifa->ifa_addr) print_sockaddr_inet("address", ifa->ifa_addr); in TEST() 241 if (ifa->ifa_broadaddr && (ifa->ifa_flags & (IFF_BROADCAST | IFF_POINTOPOINT)) != 0) { in TEST() 242 print_sockaddr_inet((ifa->ifa_flags & IFF_BROADCAST) ? "broadcast" : "destination", in TEST() [all …]
|
D | net_if_test.cpp | 59 ifaddrs* ifa; in TEST() local 60 ASSERT_EQ(0, getifaddrs(&ifa)); in TEST() 61 for (ifaddrs* it = ifa; it != nullptr; it = it->ifa_next) { in TEST() 64 freeifaddrs(ifa); in TEST()
|
/bionic/libc/bionic/ |
D | ifaddrs.cpp | 50 ifaddrs ifa; member 66 ifa.ifa_next = *list; in ifaddrs_storage() 73 if (ifa.ifa_addr == nullptr) { in SetAddress() 76 ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr); in SetAddress() 79 ifa.ifa_dstaddr = CopyAddress(family, data, byteCount, &ifa_ifu); in SetAddress() 90 ifa.ifa_broadaddr = CopyAddress(family, data, byteCount, &ifa_ifu); in SetBroadcastAddress() 99 if (ifa.ifa_addr != nullptr) { in SetLocalAddress() 100 ifa.ifa_dstaddr = reinterpret_cast<sockaddr*>(memcpy(&ifa_ifu, &addr, sizeof(addr))); in SetLocalAddress() 103 ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr); in SetLocalAddress() 116 ifa.ifa_netmask = reinterpret_cast<sockaddr*>(&netmask); in SetNetmask() [all …]
|