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()
493 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK6_BYTES); in test_getHostNameCaches() local
496 assertEquals("::1", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches()
499 assertEquals("ip6-localhost", inetAddress.getHostName()); in test_getHostNameCaches()
502 assertEquals("ip6-localhost", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches()
507 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK4_BYTES); in test_getByAddress_loopbackIpv4() local
508 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.java84 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(address); in parseNumericAddress() local
85 assertEquals(expectedString, inetAddress.getHostAddress()); in parseNumericAddress()
92 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(address); in test_parseNonNumericAddress() local
94 "Address %s is not numeric but was parsed as %s", address, inetAddress)); in test_parseNonNumericAddress()
103 InetAddress inetAddress = InetAddressUtils.parseNumericAddress(null); in test_parseNumericAddress_null() local
104 fail(String.format("null is not numeric but was parsed as %s", inetAddress)); in test_parseNumericAddress_null()
/libcore/luni/src/main/java/libcore/io/
DIoBridge.java163 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketExce… in connect() argument
165 IoBridge.connect(fd, inetAddress, port, 0); in connect()
177 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) th… in connect() argument
179 connectErrno(fd, inetAddress, port, timeoutMs); in connect()
187 throw new ConnectException(createMessageForException(fd, inetAddress, port, timeoutMs, in connect()
198 …private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeout… in connectErrno() argument
201 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
218 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
235 createMessageForException(fd, inetAddress, port, timeoutMs, null)); in connectErrno()
237 } while (!IoBridge.isConnected(fd, inetAddress, port, timeoutMs, remainingTimeoutMs)); in connectErrno()
[all …]
DLinux.java220 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument
225 … bytesSent = sendtoBytes(fd, buffer, position, buffer.remaining(), flags, inetAddress, port); in sendto()
227 …fer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, inetAddress, port); in sendto()
233 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
235 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
240 …, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendtoBytes() argument
DBlockGuardOs.java388 …nt sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
390 return super.sendto(fd, buffer, flags, inetAddress, port); in sendto()
393 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
395 if (inetAddress != null) { in sendto()
398 return super.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
DForwardingOs.java713 …t flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sen… in sendto() argument
718 …etAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, byt… in sendto() argument
DOs.java574 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument
579 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
/libcore/luni/src/main/native/
DNetworkUtilities.h30 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port,
39 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port,
DNetworkUtilities.cpp105 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
109 if (inetAddress == NULL) { in inetAddressToSockaddr()
119 ScopedLocalRef<jobject> holder(env, env->GetObjectField(inetAddress, holderFid)); in inetAddressToSockaddr()
143 …ray> addressBytes(env, reinterpret_cast<jbyteArray>(env->CallObjectMethod(inetAddress, bytesMid))); in inetAddressToSockaddr()
172 ScopedLocalRef<jobject> holder6(env, env->GetObjectField(inetAddress, holder6Fid)); in inetAddressToSockaddr()
206 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss… in inetAddressToSockaddrVerbatim() argument
207 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false); in inetAddressToSockaddrVerbatim()
210 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, sockle… in inetAddressToSockaddr() argument
211 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, true); in inetAddressToSockaddr()
Dlibcore_io_Linux.cpp400 … jobject inetAddress = sockaddrToInetAddress(env, reinterpret_cast<const sockaddr*>(&ss), &port); in makeSocketAddress() local
401 if (inetAddress == NULL) { in makeSocketAddress()
409 … return env->NewObject(JniConstants::GetInetSocketAddressClass(env), ctor, inetAddress, port); in makeSocketAddress()
1424 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, ai->ai_addr, NULL)); in Linux_android_getaddrinfo() local
1425 if (inetAddress.get() == NULL) { in Linux_android_getaddrinfo()
1428 env->SetObjectArrayElement(result, index, inetAddress.get()); in Linux_android_getaddrinfo()
/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.java307 InetAddress inetAddress = inetAddresses.nextElement(); in getNonLoopbackNetworkInterfaceAddress() local
308 if ( (ipv4 && inetAddress instanceof Inet4Address) in getNonLoopbackNetworkInterfaceAddress()
309 || (!ipv4 && inetAddress instanceof Inet6Address)) { in getNonLoopbackNetworkInterfaceAddress()
310 return inetAddress; in getNonLoopbackNetworkInterfaceAddress()
/libcore/ojluni/src/main/java/java/net/
DNetworkInterface.java388 for (InetAddress inetAddress : Collections.list(ni.getInetAddresses())) { in getByInetAddress()
389 if (inetAddress.equals(addr)) { in getByInetAddress()
/libcore/luni/src/main/java/android/system/
DOs.java653 …ags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os… in sendto() argument
658 …dress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os.sendto(fd,… in sendto() argument
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java2037 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress);
2038 assertEquals(srcAddress, inetAddress.getHostAddress());
2044 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress);
2045 assertEquals(srcAddress, inetAddress.getHostAddress());
2051 InetAddress inetAddress = Os.inet_pton(AF_UNIX, srcAddress);
2052 assertNull(inetAddress);
2058 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress);
2059 assertNull(inetAddress);
2065 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress);
2066 assertNull(inetAddress);
/libcore/ojluni/annotations/hiddenapi/java/net/
DInetAddress.java197 java.lang.String address, java.net.InetAddress inetAddress) { in disallowDeprecatedFormats() argument