/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | IpSecManagerTunnelTest.java | 32 import static android.system.OsConstants.AF_INET; 284 expectedPacketSize += innerFamily == AF_INET ? IP4_HDRLEN : IP6_HDRLEN; in getPacketSize() 295 expectedPacketSize += outerFamily == AF_INET ? IP4_HDRLEN : IP6_HDRLEN; in getPacketSize() 569 int innerFamily = localInner instanceof Inet4Address ? AF_INET : AF_INET6; 570 int outerFamily = localOuter instanceof Inet4Address ? AF_INET : AF_INET6; 685 InetAddress localInner = innerFamily == AF_INET ? LOCAL_INNER_4 : LOCAL_INNER_6; 686 InetAddress remoteInner = innerFamily == AF_INET ? REMOTE_INNER_4 : REMOTE_INNER_6; 688 InetAddress localOuter = outerFamily == AF_INET ? LOCAL_OUTER_4 : LOCAL_OUTER_6; 689 InetAddress remoteOuter = outerFamily == AF_INET ? REMOTE_OUTER_4 : REMOTE_OUTER_6; 765 InetAddress localInner = innerFamily == AF_INET ? LOCAL_INNER_4 : LOCAL_INNER_6; [all …]
|
/packages/modules/DnsResolver/tests/ |
D | resolv_unit_test.cpp | 228 if (family == AF_UNSPEC || family == AF_INET || family == AF_INET6) { in TEST_F() 246 for (const auto& family : {AF_INET, AF_INET6, AF_UNSPEC}) { in TEST_F() 301 (family == AF_INET && socktype == SOCK_DGRAM && protocol == IPPROTO_UDP) || in TEST_F() 302 (family == AF_INET && socktype == SOCK_STREAM && protocol == IPPROTO_TCP) || in TEST_F() 347 {0, AF_INET, SOCK_RAW /*bad*/, http_portno, EAI_SERVICE}, in TEST_F() 350 {0, AF_INET, ANY, invalid_portno /*bad*/, EAI_SERVICE}, in TEST_F() 351 {0, AF_INET, SOCK_STREAM, invalid_portno /*bad*/, EAI_SERVICE}, in TEST_F() 352 {0, AF_INET, SOCK_DGRAM, invalid_portno /*bad*/, EAI_SERVICE}, in TEST_F() 359 {AI_NUMERICSERV, AF_INET, ANY, http_portname /*bad*/, EAI_NONAME}, in TEST_F() 360 {AI_NUMERICSERV, AF_INET, SOCK_STREAM, http_portname /*bad*/, EAI_NONAME}, in TEST_F() [all …]
|
D | resolv_integration_test.cpp | 496 result = gethostbyname2("hello", AF_INET); in TEST_F() 541 result = gethostbyname2("hello", AF_INET); in TEST_F() 776 const addrinfo hints = {.ai_family = AF_INET}; in TEST_F() 851 addrinfo hints = {.ai_family = AF_INET}; in TEST_F() 926 addrinfo hints = {.ai_family = AF_INET}; in TEST_F() 946 addrinfo hints = {.ai_family = AF_INET}; in TEST_F() 964 addrinfo hints = {.ai_family = AF_INET}; in TEST_F() 1235 const addrinfo hints = {.ai_family = AF_INET, .ai_socktype = SOCK_DGRAM}; in TEST_F() 1290 const addrinfo hints = {.ai_family = AF_INET, .ai_socktype = SOCK_DGRAM}; in TEST_F() 1722 const addrinfo hints = {.ai_family = AF_INET, .ai_socktype = SOCK_DGRAM}; in TEST_F() [all …]
|
D | resolv_cache_unit_test.cpp | 751 sockaddr_in sin = {.sin_family = AF_INET, .sin_port = htons(DNS_PORT)}; in TEST_F() 752 ASSERT_TRUE(inet_pton(AF_INET, setup.servers[0].c_str(), &sin.sin_addr)); in TEST_F() 777 AF_INET)); in TEST_F() 782 AF_INET)); in TEST_F() 801 AF_INET)); in TEST_F() 807 AF_INET)); in TEST_F() 814 AF_INET)); in TEST_F() 821 AF_INET)); in TEST_F()
|
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/ |
D | TunnelModeChildSessionParamsTest.java | 23 import static android.system.OsConstants.AF_INET; 141 .addInternalAddressRequest(AF_INET) in testBuildChildSessionParamsWithAddressReq() 163 .addInternalDnsServerRequest(AF_INET) in testBuildChildSessionParamsWithDnsServerReq() 183 .addInternalDhcpServerRequest(AF_INET) in testBuildChildSessionParamsWithDhcpServerReq() 184 .addInternalDhcpServerRequest(AF_INET) in testBuildChildSessionParamsWithDhcpServerReq() 185 .addInternalDhcpServerRequest(AF_INET) in testBuildChildSessionParamsWithDhcpServerReq() 276 .addInternalAddressRequest(AF_INET) in testConstructTunnelModeChildParamsCopy() 280 .addInternalDnsServerRequest(AF_INET) in testConstructTunnelModeChildParamsCopy() 282 .addInternalDhcpServerRequest(AF_INET) in testConstructTunnelModeChildParamsCopy()
|
/packages/modules/Connectivity/tests/cts/net/native/dns/ |
D | NativeDnsAsyncTest.cpp | 112 expectAnswersValid(fd2, AF_INET, ns_r_noerror); in TEST() 113 expectAnswersValid(fd1, AF_INET, ns_r_noerror); in TEST() 143 expectAnswersValid(fd2, AF_INET, ns_r_noerror); in TEST() 144 expectAnswersValid(fd1, AF_INET, ns_r_noerror); in TEST() 179 expectAnswersValid(fd2, AF_INET, ns_r_nxdomain); in TEST() 180 expectAnswersValid(fd1, AF_INET, ns_r_nxdomain); in TEST() 211 expectAnswersValid(fd, AF_INET, ns_r_noerror); in TEST()
|
/packages/modules/DnsResolver/ |
D | gethnamaddr.cpp | 360 if (hent->h_addrtype == AF_INET) pad_v4v6_hostent(hent, &bp, ep); in getanswer() 400 case AF_INET: in resolv_gethostbyname() 497 af = AF_INET; in resolv_gethostbyaddr() 501 case AF_INET: in resolv_gethostbyaddr() 570 if (inet_pton(AF_INET, p, &host_addr) <= 0) continue; in netbsd_gethostent_r() 571 af = AF_INET; in netbsd_gethostent_r() 600 if (hent->h_addrtype == AF_INET) { in netbsd_gethostent_r() 624 if (hp->h_addrtype != AF_INET || hp->h_length != NS_INADDRSZ) return; in convert_v4v6_hostent() 658 case AF_INET: in dns_gethtbyname() 697 case AF_INET: in dns_gethtbyaddr() [all …]
|
D | DnsProxyListener.cpp | 165 sockaddr_in sin = {.sin_family = AF_INET}; in extractResNsendAnswers() 200 if (hp->h_addrtype == AF_INET) { in extractGetHostByNameAnswers() 203 sockaddr_in sin = {.sin_family = AF_INET, .sin_addr = *list[i]}; in extractGetHostByNameAnswers() 395 if (ai->ai_family != AF_INET) return false; in onlyIPv4Answers() 412 if (sa->sa_family != AF_INET) return false; in isSpecialUseIPv4Address() 420 if (hp->h_addrtype != AF_INET) return false; in onlyNonSpecialUseIPv4Addresses() 432 if (ai->ai_family != AF_INET) return false; in onlyNonSpecialUseIPv4Addresses() 462 if ((ai->ai_family != AF_INET) && (ai->ai_family != AF_INET6)) continue; in logDnsQueryResult() 507 inet_ntop(AF_INET, &iaOriginal.s_addr, buf, sizeof(buf)); in synthesizeNat64PrefixWithARecord() 545 inet_ntop(AF_INET, &sinOriginal.sin_addr.s_addr, buf, sizeof(buf)); in synthesizeNat64PrefixWithARecord() [all …]
|
D | DnsTlsServer.cpp | 61 if (x.ss_family == AF_INET) { in operator <() 78 if (x.ss_family == AF_INET) { in operator ==() 99 if (x.ss.ss_family == AF_INET) { in operator ()()
|
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/ |
D | ChildSessionParamsTest.java | 19 import static android.system.OsConstants.AF_INET; 182 .addInternalAddressRequest(AF_INET) in testBuildChildSessionParamsWithConfigReq() 187 .addInternalDnsServerRequest(AF_INET) in testBuildChildSessionParamsWithConfigReq() 189 .addInternalDhcpServerRequest(AF_INET) in testBuildChildSessionParamsWithConfigReq() 190 .addInternalDhcpServerRequest(AF_INET) in testBuildChildSessionParamsWithConfigReq()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/ |
D | ShadowOs.java | 19 import static android.system.OsConstants.AF_INET; 44 if ((AF_INET == family && IPV4_PATTERN.matcher(address).find()) || in inet_pton() 47 return InetAddress.getByAddress((AF_INET == family) ? IPV4_BYTES : IPV6_BYTES); in inet_pton()
|
/packages/modules/Connectivity/tests/cts/net/jni/ |
D | NativeDnsJni.c | 51 if (current->ai_addr->sa_family == AF_INET) { in Java_android_net_cts_DnsTest_testNativeDns() 84 if (current->ai_addr->sa_family == AF_INET) { in Java_android_net_cts_DnsTest_testNativeDns() 108 sa4.sin_family = AF_INET; in Java_android_net_cts_DnsTest_testNativeDns() 110 inet_pton(AF_INET, GoogleDNSIpV4Address, &(sa4.sin_addr)); in Java_android_net_cts_DnsTest_testNativeDns()
|
D | NativeMultinetworkJni.cpp | 158 EXPECT_EQ(env, 0, expectAnswersValid(env, fd, AF_INET, ns_r_noerror), in Java_android_net_cts_MultinetworkApiTest_runResNqueryCheck() 164 EXPECT_EQ(env, 0, expectAnswersValid(env, fd, AF_INET, ns_r_noerror), in Java_android_net_cts_MultinetworkApiTest_runResNqueryCheck() 187 EXPECT_EQ(env, 0, expectAnswersValid(env, fd2, AF_INET, ns_r_noerror), in Java_android_net_cts_MultinetworkApiTest_runResNsendCheck() 189 EXPECT_EQ(env, 0, expectAnswersValid(env, fd1, AF_INET, ns_r_noerror), in Java_android_net_cts_MultinetworkApiTest_runResNsendCheck() 219 EXPECT_EQ(env, 0, expectAnswersValid(env, fd, AF_INET, ns_r_nxdomain), in Java_android_net_cts_MultinetworkApiTest_runResNnxDomainCheck() 234 EXPECT_EQ(env, 0, expectAnswersValid(env, fd, AF_INET, ns_r_nxdomain), in Java_android_net_cts_MultinetworkApiTest_runResNnxDomainCheck() 270 EXPECT_EQ(env, 0, expectAnswersValid(env, fd, AF_INET, ns_r_noerror), in Java_android_net_cts_MultinetworkApiTest_runResNapiMalformedCheck()
|
/packages/modules/Connectivity/tests/unit/java/com/android/internal/net/ |
D | NetworkUtilsInternalTest.java | 19 import static android.system.OsConstants.AF_INET; 70 AF_INET, SOCK_DGRAM); in expectHasNetworking() 80 AF_INET, SOCK_DGRAM); in expectNoNetworking()
|
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/ |
D | MockIpSecTestUtils.java | 19 import static android.system.OsConstants.AF_INET; 69 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))); in MockIpSecTestUtils() 85 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)); in buildDummyIpSecUdpEncapResponse()
|
/packages/modules/adb/sysdeps/posix/ |
D | network.cpp | 42 addr4->sin_family = AF_INET; in loopback_addr4() 59 unique_fd s(socket(ipv6 ? AF_INET6 : AF_INET, type, 0)); in _network_loopback_client() 94 unique_fd s(socket(ipv6 ? AF_INET6 : AF_INET, type, 0)); in _network_loopback_server()
|
/packages/modules/IPsec/src/java/android/net/ipsec/ike/ |
D | TunnelModeChildSessionParams.java | 19 import static android.system.OsConstants.AF_INET; 372 if (addressFamily == AF_INET) { in addInternalAddressRequest() 440 if (addressFamily == AF_INET) { in addInternalDnsServerRequest() 490 if (addressFamily == AF_INET) { in addInternalDhcpServerRequest()
|
/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/ |
D | InetDiagSocketTest.java | 21 import static android.system.OsConstants.AF_INET; 79 final byte[] msg = InetDiagMessage.InetDiagReqV2(IPPROTO_UDP, local, remote, AF_INET, in testInetDiagReqV2UdpInet4() 151 byte[] msg = InetDiagMessage.InetDiagReqV2(IPPROTO_TCP, local, remote, AF_INET, in testInetDiagReqV2TcpInetWithExt()
|
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/ |
D | InetDiagMessage.java | 24 import static android.system.OsConstants.AF_INET; 134 private static final int FAMILY[] = {AF_INET6, AF_INET}; 174 uid = lookupUidByFamily(protocol, local, wildcard, AF_INET, in lookupUid()
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/ |
D | IkeUdp4Socket.java | 19 import static android.system.OsConstants.AF_INET; 69 FileDescriptor sock = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in getInstance()
|
/packages/apps/Test/connectivity/sl4n/ |
D | main.cpp | 52 listen_fd = socket(AF_INET, SOCK_STREAM, 0); in SockTest() 54 servaddr.sin_family = AF_INET; in SockTest()
|
/packages/modules/Connectivity/framework/src/android/net/util/ |
D | DnsUtils.java | 19 import static android.system.OsConstants.AF_INET; 161 domain = AF_INET; in findSrcAddress() 346 return checkConnectivity(network, AF_INET, addrIpv4); in haveIpv4()
|
/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | IpSecManagerTest.java | 19 import static android.system.OsConstants.AF_INET; 189 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)); in testOpenEncapsulationSocket() 237 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)); in testOpenEncapsulationSocketOnRandomPort()
|
/packages/modules/Connectivity/tests/common/java/android/net/util/ |
D | SocketUtilsTest.kt | 22 import android.system.OsConstants.AF_INET 82 val fd = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) in testCloseSocket()
|
/packages/modules/adb/ |
D | test_adb.py | 45 def fake_adbd(protocol=socket.AF_INET, port=0): 50 if protocol == socket.AF_INET: 336 socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as listener: 404 socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock: 425 for protocol in (socket.AF_INET, socket.AF_INET6):
|