Home
last modified time | relevance | path

Searched refs:AF_INET (Results 1 – 19 of 19) 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 …]
Difaddrs_test.cpp52 if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) lo_inet4 = addr; in TEST()
116 ifr.ifr_addr.sa_family = AF_INET; in CheckAddressIsInSet()
119 int fd = socket(AF_INET, SOCK_DGRAM, 0); in CheckAddressIsInSet()
146 if (addr->ifa_name && addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) { in TEST()
150 if (addr->ifa_name && addr->ifa_broadaddr && addr->ifa_broadaddr->sa_family == AF_INET) { in TEST()
177 (family == AF_INET) ? sizeof(sockaddr_in) : sizeof(sockaddr_in6), in print_sockaddr_inet()
187 if (family == AF_INET) return "AF_INET"; in FamilyToName()
241 } else if (family == AF_INET || family == AF_INET6) { in TEST()
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()
Dfdtrack_test.cpp303 int listener = socket(AF_INET, SOCK_STREAM, 0); in CreateListener()
307 .sin_family = AF_INET, in CreateListener()
318 int connector = socket(AF_INET, SOCK_STREAM, 0); in CreateListener()
/bionic/libc/bionic/
Dnetinet_in.cpp47 sin->sin_family = AF_INET; in bindresvport()
50 if (sin->sin_family != AF_INET) { in bindresvport()
Difaddrs.cpp148 if (family == AF_INET) { in SockaddrBytes()
223 if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) { in __getifaddrs_callback()
228 if (msg->ifa_family == AF_INET) { in __getifaddrs_callback()
237 if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) { in __getifaddrs_callback()
281 ScopedFd s(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in get_interface_flags_via_ioctl()
Dnet_if.cpp48 ScopedFd s(socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0)); in if_indextoname()
57 ScopedFd s(socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0)); in if_nametoindex()
/bionic/libc/dns/net/
Dgethnamaddr.c546 *result = gethostbyname_internal(name, AF_INET, res, hp, buf, buflen, errorp, in gethostbyname_r()
691 case AF_INET: in gethostbyname_internal_real()
860 af = AF_INET; in android_gethostbyaddrfornetcontext_real()
864 case AF_INET: in android_gethostbyaddrfornetcontext_real()
976 if (inet_pton(AF_INET, p, &host_addr) <= 0) in netbsd_gethostent_r()
987 af = AF_INET; in netbsd_gethostent_r()
1071 if (hp->h_addrtype != AF_INET || hp->h_length != NS_INADDRSZ) in map_v4v6_hostent()
1152 case AF_INET: in _dns_gethtbyname()
1220 case AF_INET: in _dns_gethtbyaddr()
1289 if (info->hp->h_addrtype == AF_INET && (res->options & RES_USE_INET6)) { in _dns_gethtbyaddr()
[all …]
Dgetnameinfo.c128 case AF_INET: in android_getnameinfofornet()
240 case AF_INET: in getnameinfo_inet()
Dgetaddrinfo.c387 .sin_family = AF_INET, in _have_ipv4()
958 case AF_INET: in explore_numeric()
1155 case AF_INET: in get_port()
1212 case AF_INET: in get_port()
1471 ai.ai_family = (type == T_A) ? AF_INET : AF_INET6; in getanswer()
1530 } else if (addr->sa_family == AF_INET) { in _get_scope()
1576 if (addr->sa_family == AF_INET) { in _get_label()
1618 if (addr->sa_family == AF_INET) { in _get_precedence()
1794 case AF_INET: in _find_src_addr()
1957 case AF_INET: in _dns_getaddrinfo()
Dsethostent.c122 hp = _hf_gethtbyname2(name, AF_INET, info); in _hf_gethtbyname()
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_pton.c50 case AF_INET: in inet_pton()
Dinet_ntop.c48 case AF_INET: in inet_ntop()
/bionic/libc/include/sys/
Dsocket.h140 #define AF_INET 2 macro
185 #define PF_INET AF_INET
/bionic/libc/dns/resolv/
Dres_send.c172 case AF_INET: in random_bind()
189 if (family == AF_INET) in random_bind()
200 if (family == AF_INET) in random_bind()
229 case AF_INET: in res_ourserver_p()
693 if (sa->sa_family == AF_INET)
1334 case AF_INET: in sock_eq()
Dres_init.c208 u[nserv].sin.sin_family = AF_INET; in __res_vinit()
686 case AF_INET: in res_setservers()
737 case AF_INET: in res_getservers()
Dres_debug.c749 case AF_INET: in p_sockun()
750 inet_ntop(AF_INET, &u.sin.sin_addr, ret, (socklen_t)sizeof ret); in p_sockun()
/bionic/tests/headers/posix/
Dsys_socket_h.c123 MACRO(AF_INET); in sys_socket_h()
/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()