Home
last modified time | relevance | path

Searched refs:AF_INET (Results 1 – 17 of 17) sorted by relevance

/bionic/tests/
Dnetdb_test.cpp56 ASSERT_TRUE(p->ai_family == AF_INET || p->ai_family == AF_INET6); in TEST()
83 hints.ai_family = AF_INET; in TEST()
94 ASSERT_EQ(AF_INET, tai->ai_family); in TEST()
120 ss.ss_family = AF_INET; in TEST()
147 addr.sin_family = AF_INET; in TEST()
178 ASSERT_EQ(hent->h_addrtype, AF_INET); in VerifyLocalhost()
191 hostent* hp = gethostbyname2("localhost", AF_INET); in TEST()
222 int result = gethostbyname2_r("localhost", AF_INET, &hent, buf, sizeof(buf), &hp, &err); in TEST()
232 result = gethostbyname2_r("localhost", AF_INET, &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST()
241 hostent *hp = gethostbyaddr(&addr, sizeof(addr), AF_INET); in TEST()
[all …]
Darpa_inet_test.cpp136 ASSERT_EQ(1, inet_pton(AF_INET, "127.0.0.1", &ss)); in TEST()
139 ASSERT_STREQ("127.0.0.1", inet_ntop(AF_INET, &ss, s, INET_ADDRSTRLEN)); in TEST()
148 ASSERT_EQ(1, inet_pton(AF_INET, "127.0.0.1", &ss4)); in TEST()
155 ASSERT_STREQ("127.0.0.1", inet_ntop(AF_INET, &ss4, s4, INET_ADDRSTRLEN)); in TEST()
156 ASSERT_STREQ("127.0.0.1", inet_ntop(AF_INET, &ss4, s4, 2*INET_ADDRSTRLEN)); in TEST()
Difaddrs_test.cpp50 if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) lo_inet4 = addr; in TEST()
114 ifr.ifr_addr.sa_family = AF_INET; in CheckAddressIsInSet()
117 int fd = socket(AF_INET, SOCK_DGRAM, 0); in CheckAddressIsInSet()
144 if (addr->ifa_name && addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) { in TEST()
148 if (addr->ifa_name && addr->ifa_broadaddr && addr->ifa_broadaddr->sa_family == AF_INET) { in TEST()
175 (family == AF_INET) ? sizeof(sockaddr_in) : sizeof(sockaddr_in6), in print_sockaddr_inet()
185 if (family == AF_INET) return "AF_INET"; in FamilyToName()
239 } else if (family == AF_INET || family == AF_INET6) { in TEST()
/bionic/libc/bionic/
Dnetinet_in.cpp46 sin->sin_family = AF_INET; in bindresvport()
49 if (sin->sin_family != AF_INET) { in bindresvport()
Difaddrs.cpp146 if (family == AF_INET) { in SockaddrBytes()
218 if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) { in __getifaddrs_callback()
223 if (msg->ifa_family == AF_INET) { in __getifaddrs_callback()
227 if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) { in __getifaddrs_callback()
Dnet_if.cpp48 int s = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0); in if_indextoname()
62 int s = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0); in if_nametoindex()
/bionic/libc/dns/net/
Dgethnamaddr.c532 *result = gethostbyname_internal(name, AF_INET, res, hp, buf, buflen, errorp, NETID_UNSET, in gethostbyname_r()
716 case AF_INET: in gethostbyname_internal_real()
891 af = AF_INET; in android_gethostbyaddrfornet_real()
895 case AF_INET: in android_gethostbyaddrfornet_real()
1008 if (inet_pton(AF_INET, p, &host_addr) <= 0) in netbsd_gethostent_r()
1019 af = AF_INET; in netbsd_gethostent_r()
1103 if (hp->h_addrtype != AF_INET || hp->h_length != NS_INADDRSZ) in map_v4v6_hostent()
1184 case AF_INET: in _dns_gethtbyname()
1253 case AF_INET: in _dns_gethtbyaddr()
1323 if (info->hp->h_addrtype == AF_INET && (res->options & RES_USE_INET6)) { in _dns_gethtbyaddr()
[all …]
Dgetnameinfo.c121 case AF_INET: in android_getnameinfofornet()
233 case AF_INET: in getnameinfo_inet()
Dgetaddrinfo.c386 .sin_family = AF_INET, in _have_ipv4()
953 case AF_INET: in explore_numeric()
1150 case AF_INET: in get_port()
1207 case AF_INET: in get_port()
1452 ai.ai_family = (type == T_A) ? AF_INET : AF_INET6; in getanswer()
1511 } else if (addr->sa_family == AF_INET) { in _get_scope()
1557 if (addr->sa_family == AF_INET) { in _get_label()
1599 if (addr->sa_family == AF_INET) { in _get_precedence()
1775 case AF_INET: in _find_src_addr()
1934 case AF_INET: in _dns_getaddrinfo()
Dsethostent.c112 hp = _hf_gethtbyname2(name, AF_INET, info); in _hf_gethtbyname()
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_pton.c51 case AF_INET: in inet_pton()
Dinet_ntop.c49 case AF_INET: in inet_ntop()
/bionic/libc/include/sys/
Dsocket.h131 #define AF_INET 2 macro
174 #define PF_INET AF_INET
/bionic/libc/dns/resolv/
Dres_send.c182 case AF_INET: in random_bind()
199 if (family == AF_INET) in random_bind()
210 if (family == AF_INET) in random_bind()
239 case AF_INET: in res_ourserver_p()
699 if (sa->sa_family == AF_INET)
1356 case AF_INET: in sock_eq()
Dres_init.c209 u[nserv].sin.sin_family = AF_INET; in __res_vinit()
685 case AF_INET: in res_setservers()
736 case AF_INET: in res_getservers()
Dres_debug.c731 case AF_INET: in p_sockun()
732 inet_ntop(AF_INET, &u.sin.sin_addr, ret, (socklen_t)sizeof ret); in p_sockun()
/bionic/libc/dns/nameser/
Dns_print.c163 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
424 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()
963 (void) inet_ntop(AF_INET, rdata, buf, (socklen_t)buflen); in ns_sprintrrf()