Home
last modified time | relevance | path

Searched refs:InetAddress (Results 1 – 25 of 372) sorted by relevance

12345678910>>...15

/packages/services/Iwlan/test/com/google/android/iwlan/epdg/
DEpdgSelectorTest.java78 import java.net.InetAddress;
213 ArrayList<InetAddress> testInetAddresses = in testStaticMethodPass()
216 InetAddress expectedAddress = InetAddress.getByName(TEST_IP_ADDRESS); in testStaticMethodPass()
231 ArrayList<InetAddress> testInetAddresses = in testStaticMethodDirectIpAddress_noDnsResolution()
256 ArrayList<InetAddress> testInetAddresses = in testRoamStaticMethodPass()
259 InetAddress expectedAddress = InetAddress.getByName(TEST_IP_ADDRESS); in testRoamStaticMethodPass()
288 ArrayList<InetAddress> testInetAddresses = in testPlmnResolutionMethodWithNoPlmnInCarrierConfig()
292 assertTrue(testInetAddresses.contains(InetAddress.getByName(TEST_IP_ADDRESS_1))); in testPlmnResolutionMethodWithNoPlmnInCarrierConfig()
293 assertTrue(testInetAddresses.contains(InetAddress.getByName(TEST_IP_ADDRESS_2))); in testPlmnResolutionMethodWithNoPlmnInCarrierConfig()
327 ArrayList<InetAddress> testInetAddresses = in testPlmnResolutionMethod()
[all …]
DTunnelLinkPropertiesTest.java27 import java.net.InetAddress;
44 List<InetAddress> mDNSAddressList = new ArrayList<>(); in createTestTunnelLinkProperties()
45 List<InetAddress> mPCSFAddressList = new ArrayList<>(); in createTestTunnelLinkProperties()
48 mInternalAddressList.add(new LinkAddress(InetAddress.getByName(IP_ADDRESS), 3)); in createTestTunnelLinkProperties()
50 mInternalAddressList.add(new LinkAddress(InetAddress.getByName(IPV6_ADDRESS), 3)); in createTestTunnelLinkProperties()
52 mInternalAddressList.add(new LinkAddress(InetAddress.getByName(IP_ADDRESS), 3)); in createTestTunnelLinkProperties()
53 mInternalAddressList.add(new LinkAddress(InetAddress.getByName(IPV6_ADDRESS), 3)); in createTestTunnelLinkProperties()
55 mDNSAddressList.add(InetAddress.getByName(DNS_ADDRESS)); in createTestTunnelLinkProperties()
56 mPCSFAddressList.add(InetAddress.getByName(PSCF_ADDRESS)); in createTestTunnelLinkProperties()
69 List<InetAddress> mDNSAddressList = new ArrayList<>(); in testGetProtocolType_emptyInternalAddresses_returnsUnknown()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIpSecManagerTunnelTest.java80 import java.net.InetAddress;
91 private static final InetAddress LOCAL_OUTER_4 = InetAddress.parseNumericAddress("192.0.2.1");
92 private static final InetAddress REMOTE_OUTER_4 = InetAddress.parseNumericAddress("192.0.2.2");
93 private static final InetAddress LOCAL_OUTER_6 =
94 InetAddress.parseNumericAddress("2001:db8:1::1");
95 private static final InetAddress REMOTE_OUTER_6 =
96 InetAddress.parseNumericAddress("2001:db8:1::2");
98 private static final InetAddress LOCAL_OUTER_4_NEW =
99 InetAddress.parseNumericAddress("192.0.2.101");
100 private static final InetAddress REMOTE_OUTER_4_NEW =
[all …]
DDnsTest.java33 import java.net.InetAddress;
76 InetAddress addrs[] = {}; in testDnsWorks()
78 addrs = InetAddress.getAllByName("www.google.com"); in testDnsWorks()
83 for (InetAddress addr : addrs) { in testDnsWorks()
101 addrs = new InetAddress[0]; in testDnsWorks()
104 addrs = InetAddress.getAllByName("ipv6.google.com"); in testDnsWorks()
110 for (InetAddress addr : addrs) { in testDnsWorks()
202 InetAddress addr = InetAddress.getByName(URLS[urlIndex]); in skiptestDnsPerf()
207 InetAddress addr = InetAddress.getByName(URLS[urlIndex]); in skiptestDnsPerf()
227 InetAddress addr = InetAddress.getByName(url); in skiptestDnsPerf()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DDnsManagerTest.java78 import java.net.InetAddress;
145 lp.addDnsServer(InetAddress.getByName("3.3.3.3")); in testTrackedValidationUpdates()
146 lp.addDnsServer(InetAddress.getByName("4.4.4.4")); in testTrackedValidationUpdates()
159 InetAddress.parseNumericAddress("4.4.4.4"), "", in testTrackedValidationUpdates()
169 assertEquals(Arrays.asList(InetAddress.getByName("4.4.4.4")), in testTrackedValidationUpdates()
174 lp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("192.0.2.4"), in testTrackedValidationUpdates()
177 lp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("2001:db8:1::1"), in testTrackedValidationUpdates()
183 new PrivateDnsConfig("strictmode.com", new InetAddress[] { in testTrackedValidationUpdates()
184 InetAddress.parseNumericAddress("6.6.6.6"), in testTrackedValidationUpdates()
185 InetAddress.parseNumericAddress("2001:db8:66:66::1") in testTrackedValidationUpdates()
[all …]
/packages/modules/Connectivity/framework/src/android/net/util/
DDnsUtils.java38 import java.net.InetAddress;
116 public final InetAddress address;
118 public SortableAddress(@NonNull InetAddress addr, @Nullable InetAddress srcAddr) { in SortableAddress()
140 public static @NonNull List<InetAddress> rfc6724Sort(@Nullable Network network, in rfc6724Sort()
141 @NonNull List<InetAddress> answers) { in rfc6724Sort()
143 for (InetAddress addr : answers) { in rfc6724Sort()
149 final List<InetAddress> sortedAnswers = new ArrayList<>(); in rfc6724Sort()
157 private static @Nullable InetAddress findSrcAddress(@Nullable Network network, in findSrcAddress()
158 @NonNull InetAddress addr) { in findSrcAddress()
191 private static int findLabel(@NonNull InetAddress addr) { in findLabel()
[all …]
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DNetworkDiagnostics.java63 import java.net.InetAddress;
112 private static final InetAddress TEST_DNS4 = InetAddresses.parseNumericAddress("8.8.8.8");
113 private static final InetAddress TEST_DNS6 = InetAddresses.parseNumericAddress(
187 private final Map<Pair<InetAddress, Integer>, Measurement> mIcmpChecks = new HashMap<>();
188 private final Map<Pair<InetAddress, InetAddress>, Measurement> mExplicitSourceIcmpChecks =
190 private final Map<InetAddress, Measurement> mDnsUdpChecks = new HashMap<>();
191 private final Map<InetAddress, Measurement> mDnsTlsChecks = new HashMap<>();
222 final InetAddress gateway = route.getGateway(); in NetworkDiagnostics()
230 for (InetAddress nameserver : mLinkProperties.getDnsServers()) { in NetworkDiagnostics()
239 for (InetAddress tlsNameserver : mPrivateDnsCfg.ips) { in NetworkDiagnostics()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/shared/
DPrivateDnsConfigTest.java32 import java.net.InetAddress;
40 private static final InetAddress[] TEST_ADDRS = new InetAddress[] {
41 InetAddress.parseNumericAddress("1.2.3.4"),
42 InetAddress.parseNumericAddress("2001:db8::2"),
45 private String[] toStringArray(InetAddress[] ips) { in toStringArray()
48 for (InetAddress ip : ips) { in toStringArray()
123 final InetAddress ip = InetAddress.parseNumericAddress("1.2.3.4"); in testIpAddressArrayIsCopied()
124 final InetAddress[] ipArray = new InetAddress[] { ip }; in testIpAddressArrayIsCopied()
129 ipArray[0] = InetAddress.parseNumericAddress("2001:db8::2"); in testIpAddressArrayIsCopied()
130 assertArrayEquals(new InetAddress[] { ip }, cfg.ips); in testIpAddressArrayIsCopied()
[all …]
/packages/services/Iwlan/src/com/google/android/iwlan/epdg/
DEpdgSelector.java57 import java.net.InetAddress;
99 private final Set<InetAddress> mTemporaryExcludedAddresses;
127 final Comparator<InetAddress> inetAddressComparator =
154 void onServerListChanged(int transactionId, List<InetAddress> validIPList); in onServerListChanged()
271 void onEpdgConnectionFailed(InetAddress ipAddress) { in onEpdgConnectionFailed()
275 private void excludeIpAddress(InetAddress ipAddress) { in excludeIpAddress()
291 private boolean isInExcludedIpAddresses(InetAddress ipAddress) { in isInExcludedIpAddresses()
295 private CompletableFuture<Map.Entry<String, List<InetAddress>>> submitDnsResolverQuery( in submitDnsResolverQuery()
297 CompletableFuture<Map.Entry<String, List<InetAddress>>> result = new CompletableFuture(); in submitDnsResolverQuery()
299 final DnsResolver.Callback<List<InetAddress>> cb = in submitDnsResolverQuery()
[all …]
DSrvDnsResolver.java32 import java.net.InetAddress;
64 public final InetAddress mInetAddress;
68 public SrvRecordInetAddress(InetAddress inetAddress, int port) { in SrvRecordInetAddress()
176 public @NonNull Map<String, List<InetAddress>> parseIpAddresses() throws ParseException { in parseIpAddresses()
177 final HashMap<String, List<InetAddress>> domainNameToIpAddress = new HashMap<>(); in parseIpAddresses()
187 final InetAddress ipAddress = InetAddress.getByAddress(ansSec.getRR()); in parseIpAddresses()
237 private List<InetAddress> queryDns(String domainName) throws DnsException { in queryDns()
238 final CompletableFuture<List<InetAddress>> result = new CompletableFuture(); in queryDns()
239 final DnsResolver.Callback<List<InetAddress>> cb = in queryDns()
240 new DnsResolver.Callback<List<InetAddress>>() { in queryDns()
[all …]
DEpdgMonitor.java21 import java.net.InetAddress;
26 private InetAddress mEpdgAddressForNormalSession;
27 private InetAddress mSeparateEpdgAddressForEmergencySession;
40 public void onApnConnectToEpdg(@NonNull String apnName, @NonNull InetAddress address) { in onApnConnectToEpdg()
100 public InetAddress getEpdgAddressForNormalSession() { in getEpdgAddressForNormalSession()
109 public InetAddress getEpdgAddressForEmergencySession() { in getEpdgAddressForEmergencySession()
158 public void onEpdgConnectionFailed(boolean isEmergency, InetAddress epdgAddress) { in onEpdgConnectionFailed()
173 public boolean isConnectedEpdg(InetAddress epdgAddress) { in isConnectedEpdg()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DInetAddressUtilsTest.java36 import java.net.InetAddress;
42 private InetAddress parcelUnparcelAddress(InetAddress addr) { in parcelUnparcelAddress()
51 InetAddress out = InetAddressUtils.unparcelInetAddress(p); in parcelUnparcelAddress()
58 InetAddress ipv4 = InetAddress.getByName("192.0.2.1"); in testParcelUnparcelIpv4Address()
64 InetAddress ipv6 = InetAddress.getByName("2001:db8::1"); in testParcelUnparcelIpv6Address()
70 InetAddress ipv6 = InetAddress.getByName("fe80::1%42"); in testParcelUnparcelScopedIpv6Address()
100 final Inet4Address v4Addr = (Inet4Address) InetAddress.getByName("192.0.2.1"); in testV4MappedV6Address()
/packages/modules/NetworkStack/src/com/android/networkstack/util/
DDnsUtils.java35 import java.net.InetAddress;
62 public static InetAddress[] getAllByName(@NonNull final DnsResolver dnsResolver, in getAllByName()
65 final List<InetAddress> result = new ArrayList<InetAddress>(); in getAllByName()
90 return result.toArray(new InetAddress[0]); in getAllByName()
98 public static InetAddress[] getAllByName(@NonNull final DnsResolver dnsResolver, in getAllByName()
101 final CompletableFuture<List<InetAddress>> resultRef = new CompletableFuture<>(); in getAllByName()
105 final DnsResolver.Callback<List<InetAddress>> callback = in getAllByName()
106 new DnsResolver.Callback<List<InetAddress>>() { in getAllByName()
108 public void onAnswer(List<InetAddress> answer, int rcode) { in getAllByName()
142 List<InetAddress> result = null; in getAllByName()
[all …]
/packages/modules/IPsec/src/java/android/net/ipsec/ike/
DIkeTrafficSelector.java32 import java.net.InetAddress;
121 @NonNull public final InetAddress startingAddress;
123 @NonNull public final InetAddress endingAddress;
131 InetAddress startingAddress, in IkeTrafficSelector()
132 InetAddress endingAddress) { in IkeTrafficSelector()
158 @NonNull InetAddress startingAddress, in IkeTrafficSelector()
159 @NonNull InetAddress endingAddress) { in IkeTrafficSelector()
163 private static int getTsType(InetAddress address) { in getTsType()
184 InetAddress startingAddress, in IkeTrafficSelector()
185 InetAddress endingAddress) { in IkeTrafficSelector()
[all …]
DIkeSessionConnectionInfo.java22 import java.net.InetAddress;
32 private final InetAddress mLocalAddress;
33 private final InetAddress mRemoteAddress;
44 @NonNull InetAddress localAddress, in IkeSessionConnectionInfo()
45 @NonNull InetAddress remoteAddress, in IkeSessionConnectionInfo()
62 public InetAddress getLocalAddress() { in getLocalAddress()
72 public InetAddress getRemoteAddress() { in getRemoteAddress()
/packages/modules/Connectivity/framework/src/android/net/
DRouteInfo.java35 import java.net.InetAddress;
80 private final InetAddress mGateway;
146 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo()
171 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo()
248 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo()
257 public RouteInfo(@Nullable LinkAddress destination, @Nullable InetAddress gateway, in RouteInfo()
279 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway) { in RouteInfo()
289 public RouteInfo(@Nullable LinkAddress destination, @Nullable InetAddress gateway) { in RouteInfo()
301 public RouteInfo(@NonNull InetAddress gateway) { in RouteInfo()
334 public static RouteInfo makeHostRoute(@NonNull InetAddress host, @Nullable String iface) { in makeHostRoute()
[all …]
DStaticIpConfiguration.java30 import java.net.InetAddress;
46 public InetAddress gateway;
50 public final ArrayList<InetAddress> dnsServers;
94 public @Nullable InetAddress getGateway() { in getGateway()
101 public @NonNull List<InetAddress> getDnsServers() { in getDnsServers()
118 private InetAddress mGateway;
119 private Iterable<InetAddress> mDnsServers;
140 public @NonNull Builder setGateway(@Nullable InetAddress gateway) { in setGateway()
153 public @NonNull Builder setDnsServers(@NonNull Iterable<InetAddress> dnsServers) { in setDnsServers()
155 for (InetAddress inetAddress: dnsServers) { in setDnsServers()
[all …]
DLinkProperties.java37 import java.net.InetAddress;
64 private final ArrayList<InetAddress> mDnses = new ArrayList<>();
66 private final ArrayList<InetAddress> mPcscfs = new ArrayList<InetAddress>();
67 private final ArrayList<InetAddress> mValidatedPrivateDnses = new ArrayList<>();
258 public @NonNull List<InetAddress> getAddresses() { in getAddresses()
259 final List<InetAddress> addresses = new ArrayList<>(); in getAddresses()
271 public @NonNull List<InetAddress> getAllAddresses() { in getAllAddresses()
272 List<InetAddress> addresses = new ArrayList<>(); in getAllAddresses()
381 public boolean addDnsServer(@NonNull InetAddress dnsServer) { in addDnsServer()
397 public boolean removeDnsServer(@NonNull InetAddress dnsServer) { in removeDnsServer()
[all …]
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/shared/
DPrivateDnsConfig.java30 import java.net.InetAddress;
42 public final InetAddress[] ips;
48 public final InetAddress[] dohIps;
79 public PrivateDnsConfig(@Nullable String hostname, @Nullable InetAddress[] ips) { in PrivateDnsConfig()
90 public PrivateDnsConfig(int mode, @Nullable String hostname, @Nullable InetAddress[] ips, in PrivateDnsConfig()
91 @Nullable String dohName, @Nullable InetAddress[] dohIps, @Nullable String dohPath, in PrivateDnsConfig()
95 this.ips = (ips != null) ? ips.clone() : new InetAddress[0]; in PrivateDnsConfig()
97 this.dohIps = (dohIps != null) ? dohIps.clone() : new InetAddress[0]; in PrivateDnsConfig()
168 InetAddress[] ips = new InetAddress[parcel.ips.length]; in fromParcel()
187 InetAddress[] dohIps = new InetAddress[parcel.dohIps.length]; in fromParcel()
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsConstants.java21 import java.net.InetAddress;
50 private static InetAddress mdnsAddress;
54 public static InetAddress getMdnsIPv4Address() { in getMdnsIPv4Address()
56 InetAddress addr = null; in getMdnsIPv4Address()
58 addr = InetAddress.getByName(MDNS_IPV4_HOST_ADDRESS); in getMdnsIPv4Address()
67 public static InetAddress getMdnsIPv6Address() { in getMdnsIPv6Address()
69 InetAddress addr = null; in getMdnsIPv6Address()
71 addr = InetAddress.getByName(MDNS_IPV6_HOST_ADDRESS); in getMdnsIPv6Address()
/packages/services/Iwlan/src/com/google/android/iwlan/
DIwlanHelper.java40 import java.net.InetAddress;
119 public static List<InetAddress> getAllAddressesForNetwork(Context context, Network network) { in getAllAddressesForNetwork()
122 List<InetAddress> gatewayList = new ArrayList<>(); in getAllAddressesForNetwork()
127 InetAddress inetAddr = linkAddr.getAddress(); in getAllAddressesForNetwork()
147 public static boolean isIpv4EmbeddedIpv6Address(@NonNull InetAddress ipAddress) { in isIpv4EmbeddedIpv6Address()
151 public static boolean hasIpv6Address(List<InetAddress> localAddresses) { in hasIpv6Address()
153 for (InetAddress address : localAddresses) { in hasIpv6Address()
162 public static boolean hasIpv4Address(List<InetAddress> localAddresses) { in hasIpv4Address()
164 for (InetAddress address : localAddresses) { in hasIpv4Address()
173 public static InetAddress getIpv4Address(List<InetAddress> localAddresses) { in getIpv4Address()
[all …]
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeSessionPskTestBase.java30 import java.net.InetAddress;
48 protected IkeSession openIkeSessionWithTunnelModeChild(InetAddress remoteAddress) { in openIkeSessionWithTunnelModeChild()
53 InetAddress remoteAddress, IkeSessionParams ikeParams) { in openIkeSessionWithTunnelModeChild()
57 protected IkeSession openIkeSessionWithTransportModeChild(InetAddress remoteAddress) { in openIkeSessionWithTransportModeChild()
61 protected IkeSessionParams.Builder createIkeParamsBuilderBase(InetAddress remoteAddress) { in createIkeParamsBuilderBase()
69 InetAddress remoteAddress, IkeSaProposal... saProposals) { in createIkeParamsBuilderBase()
85 protected abstract IkeSessionParams getIkeSessionParams(InetAddress remoteAddress); in getIkeSessionParams()
87 private IkeSession openIkeSession(InetAddress remoteAddress, ChildSessionParams childParams) { in openIkeSession()
92 InetAddress remoteAddress, IkeSessionParams ikeParams, ChildSessionParams childParams) { in openIkeSession()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/
DIkeSecurityParameterIndex.java24 import java.net.InetAddress;
45 static final Set<Pair<InetAddress, Long>> sAssignedIkeSpis = new HashSet<>();
47 private InetAddress mSourceAddress;
52 IkeSecurityParameterIndex(InetAddress sourceAddress, long spi) { in IkeSecurityParameterIndex()
69 public InetAddress getSourceAddress() { in getSourceAddress()
76 sAssignedIkeSpis.remove(new Pair<InetAddress, Long>(mSourceAddress, mSpi)); in close()
90 public void migrate(InetAddress newSourceAddress) throws IOException { in migrate()
106 sAssignedIkeSpis.remove(new Pair<InetAddress, Long>(mSourceAddress, mSpi)); in migrate()
/packages/modules/Connectivity/tests/unit/java/android/net/
DQosSocketFilterTest.java42 import java.net.InetAddress;
53 final InetAddress addressA = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortExactMatch()
54 final InetAddress addressB = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortExactMatch()
61 final InetAddress addressA = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortLessThanStart()
62 final InetAddress addressB = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortLessThanStart()
69 final InetAddress addressA = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortGreaterThanEnd()
70 final InetAddress addressB = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortGreaterThanEnd()
77 final InetAddress addressA = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortBetweenStartAndEnd()
78 final InetAddress addressB = InetAddresses.parseNumericAddress("1.2.3.4"); in testPortBetweenStartAndEnd()
85 final InetAddress addressA = InetAddresses.parseNumericAddress("1.2.3.4"); in testAddressesDontMatch()
[all …]
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/util/
DProcfsParsingUtilsTest.kt23 import java.net.InetAddress
50 InetAddress.getByAddress( in testParseAnycast6Address()
53 InetAddress.getByAddress( in testParseAnycast6Address()
116 InetAddress.getByAddress( in testParseIpv6MulticastAddress()
119 InetAddress.getByAddress( in testParseIpv6MulticastAddress()
122 InetAddress.getByAddress( in testParseIpv6MulticastAddress()
125 InetAddress.getByAddress( in testParseIpv6MulticastAddress()
128 InetAddress.getByAddress( in testParseIpv6MulticastAddress()

12345678910>>...15