Home
last modified time | relevance | path

Searched refs:inetAddress (Results 1 – 18 of 18) sorted by relevance

/libcore/luni/src/test/java/libcore/java/net/
DInetAddressTest.java250 InetAddress inetAddress = InetAddress.getByName("www.google.com"); in test_isReachable() local
251 new SerializationTester<InetAddress>(inetAddress, s) { in test_isReachable() argument
267 InetAddress inetAddress = InetAddress.getByName("www.google.com"); in test_isReachable_neverThrows() local
275 assertFalse(inetAddress.isReachable(netIf, 256, 500)); in test_isReachable_neverThrows()
479 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK6_BYTES); in test_getHostNameCaches() local
482 assertEquals("::1", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches()
485 assertEquals("ip6-localhost", inetAddress.getHostName()); in test_getHostNameCaches()
488 assertEquals("ip6-localhost", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches()
493 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK4_BYTES); in test_getByAddress_loopbackIpv4() local
494 checkInetAddress(LOOPBACK4_BYTES, "localhost", inetAddress); in test_getByAddress_loopbackIpv4()
[all …]
DInetSocketAddressTest.java176 InetAddress inetAddress = InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }); in test_getHostString_cachingBehavior() local
177 InetSocketAddress socketAddress = new InetSocketAddress(inetAddress, 1234); in test_getHostString_cachingBehavior()
182 inetAddress = InetAddress.getByName("127.0.0.1"); in test_getHostString_cachingBehavior()
183 socketAddress = new InetSocketAddress(inetAddress, 1234); in test_getHostString_cachingBehavior()
DURLTest.java70 for (InetAddress inetAddress : InetAddress.getAllByName("localhost")) { in testEqualsDoesNotDoHostnameResolution()
71 String address = inetAddress.getHostAddress(); in testEqualsDoesNotDoHostnameResolution()
72 if (inetAddress instanceof Inet6Address) { in testEqualsDoesNotDoHostnameResolution()
/libcore/luni/src/test/java/libcore/libcore/net/
DInetAddressUtilsTest.java85 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(address); in parseNumericAddress() local
86 assertEquals(expectedString, inetAddress.getHostAddress()); in parseNumericAddress()
93 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(address); in test_parseNonNumericAddress() local
95 "Address %s is not numeric but was parsed as %s", address, inetAddress)); in test_parseNonNumericAddress()
104 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(null); in test_parseNumericAddress_null() local
105 fail(String.format("null is not numeric but was parsed as %s", inetAddress)); in test_parseNumericAddress_null()
/libcore/luni/src/main/native/
DNetworkUtilities.cpp93 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
97 if (inetAddress == NULL) { in inetAddressToSockaddr()
107 ScopedLocalRef<jobject> holder(env, env->GetObjectField(inetAddress, holderFid)); in inetAddressToSockaddr()
131 …ray> addressBytes(env, reinterpret_cast<jbyteArray>(env->CallObjectMethod(inetAddress, bytesMid))); in inetAddressToSockaddr()
160 ScopedLocalRef<jobject> holder6(env, env->GetObjectField(inetAddress, holder6Fid)); in inetAddressToSockaddr()
194 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss… in inetAddressToSockaddrVerbatim() argument
195 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false); in inetAddressToSockaddrVerbatim()
198 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, sockle… in inetAddressToSockaddr() argument
199 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, true); in inetAddressToSockaddr()
DNetworkUtilities.h29 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port,
38 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port,
Dlibcore_io_Linux.cpp400 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); in makeSocketAddress() local
401 if (inetAddress == NULL) { in makeSocketAddress()
409 … return env->NewObject(JniConstants::GetInetSocketAddressClass(env), ctor, inetAddress, port); in makeSocketAddress()
1369 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL)); in Linux_android_getaddrinfo() local
1370 if (inetAddress.get() == NULL) { in Linux_android_getaddrinfo()
1373 env->SetObjectArrayElement(result, index, inetAddress.get()); in Linux_android_getaddrinfo()
/libcore/luni/src/main/java/libcore/io/
DIoBridge.java120 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketExce… in connect() argument
122 IoBridge.connect(fd, inetAddress, port, 0); in connect()
132 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) th… in connect() argument
134 connectErrno(fd, inetAddress, port, timeoutMs); in connect()
142 throw new ConnectException(createMessageForException(fd, inetAddress, port, timeoutMs, in connect()
153 …private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeout… in connectErrno() argument
156 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
173 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
190 createMessageForException(fd, inetAddress, port, timeoutMs, null)); in connectErrno()
192 } while (!IoBridge.isConnected(fd, inetAddress, port, timeoutMs, remainingTimeoutMs)); in connectErrno()
[all …]
DLinux.java217 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument
222 … bytesSent = sendtoBytes(fd, buffer, position, buffer.remaining(), flags, inetAddress, port); in sendto()
224 …fer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, inetAddress, port); in sendto()
230 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
232 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
237 …, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendtoBytes() argument
DBlockGuardOs.java358 …nt sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
360 return super.sendto(fd, buffer, flags, inetAddress, port); in sendto()
363 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
365 if (inetAddress != null) { in sendto()
368 return super.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
DForwardingOs.java192 …t flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sen… in sendto() argument
193 …etAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, byt… in sendto() argument
DOs.java160 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument
161 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DDatagramSocketTest.java151 InetAddress inetAddress = InetAddress.getLocalHost(); in test_connectLjava_net_InetAddressI() local
152 ds.connect(inetAddress, 0); in test_connectLjava_net_InetAddressI()
153 assertEquals("Incorrect InetAddress", inetAddress, ds.getInetAddress()); in test_connectLjava_net_InetAddressI()
159 InetAddress inetAddress = in test_connectLjava_net_InetAddressI() local
161 ds.connect(inetAddress, 0); in test_connectLjava_net_InetAddressI()
162 assertEquals(inetAddress, ds.getInetAddress()); in test_connectLjava_net_InetAddressI()
316 InetAddress inetAddress = InetAddress.getByAddress(addressBytes); in testConnect_zeroAddress() local
317 ds.connect(inetAddress, 0); in testConnect_zeroAddress()
323 InetAddress inetAddress = InetAddress.getByAddress(addressTestBytes); in testConnect_zeroAddress() local
324 ds.connect(inetAddress, 0); in testConnect_zeroAddress()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/channels/
DDatagramChannelTest.java283 InetAddress inetAddress = inetAddresses.nextElement(); in getNonLoopbackNetworkInterfaceAddress() local
284 if ( (ipv4 && inetAddress instanceof Inet4Address) in getNonLoopbackNetworkInterfaceAddress()
285 || (!ipv4 && inetAddress instanceof Inet6Address)) { in getNonLoopbackNetworkInterfaceAddress()
286 return inetAddress; in getNonLoopbackNetworkInterfaceAddress()
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java1489 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress); in testInetPtonIpv4() local
1490 assertEquals(srcAddress, inetAddress.getHostAddress()); in testInetPtonIpv4()
1495 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress); in testInetPtonIpv6() local
1496 assertEquals(srcAddress, inetAddress.getHostAddress()); in testInetPtonIpv6()
1501 InetAddress inetAddress = Os.inet_pton(AF_UNIX, srcAddress); in testInetPtonInvalidFamily() local
1502 assertNull(inetAddress); in testInetPtonInvalidFamily()
1507 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress); in testInetPtonWrongFamily() local
1508 assertNull(inetAddress); in testInetPtonWrongFamily()
1513 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress); in testInetPtonInvalidData() local
1514 assertNull(inetAddress); in testInetPtonInvalidData()
/libcore/ojluni/src/main/java/java/net/
DNetworkInterface.java367 for (InetAddress inetAddress : Collections.list(ni.getInetAddresses())) { in getByInetAddress()
368 if (inetAddress.equals(addr)) { in getByInetAddress()
/libcore/luni/src/main/java/android/system/
DOs.java525 …ags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os… in sendto() argument
530 …dress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os.sendto(fd,… in sendto() argument
/libcore/ojluni/annotations/hiddenapi/java/net/
DInetAddress.java197 java.lang.String address, java.net.InetAddress inetAddress) { in disallowDeprecatedFormats() argument