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/java/libcore/io/
DIoBridge.java164 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketExce… in connect() argument
166 IoBridge.connect(fd, inetAddress, port, 0); in connect()
178 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) th… in connect() argument
180 connectErrno(fd, inetAddress, port, timeoutMs); in connect()
188 throw new ConnectException(createMessageForException(fd, inetAddress, port, timeoutMs, in connect()
199 …private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeout… in connectErrno() argument
202 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
219 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
236 createMessageForException(fd, inetAddress, port, timeoutMs, null)); in connectErrno()
238 } 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.java387 …nt sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
389 return super.sendto(fd, buffer, flags, inetAddress, port); in sendto()
392 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument
394 if (inetAddress != null) { in sendto()
397 return super.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
DForwardingOs.java719 …t flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sen… in sendto() argument
724 …etAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, byt… in sendto() argument
DOs.java575 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument
580 …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.cpp97 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
101 if (inetAddress == NULL) { in inetAddressToSockaddr()
111 ScopedLocalRef<jobject> holder(env, env->GetObjectField(inetAddress, holderFid)); in inetAddressToSockaddr()
135 …ray> addressBytes(env, reinterpret_cast<jbyteArray>(env->CallObjectMethod(inetAddress, bytesMid))); in inetAddressToSockaddr()
164 ScopedLocalRef<jobject> holder6(env, env->GetObjectField(inetAddress, holder6Fid)); in inetAddressToSockaddr()
198 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss… in inetAddressToSockaddrVerbatim() argument
199 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false); in inetAddressToSockaddrVerbatim()
202 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, sockle… in inetAddressToSockaddr() argument
203 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, true); in inetAddressToSockaddr()
Dlibcore_io_Linux.cpp398 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); in makeSocketAddress() local
399 if (inetAddress == NULL) { in makeSocketAddress()
407 … return env->NewObject(JniConstants::GetInetSocketAddressClass(env), ctor, inetAddress, port); in makeSocketAddress()
1418 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL)); in Linux_android_getaddrinfo() local
1419 if (inetAddress.get() == NULL) { in Linux_android_getaddrinfo()
1422 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.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/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/test/java/libcore/android/system/
DOsTest.java1950 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress);
1951 assertEquals(srcAddress, inetAddress.getHostAddress());
1957 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress);
1958 assertEquals(srcAddress, inetAddress.getHostAddress());
1964 InetAddress inetAddress = Os.inet_pton(AF_UNIX, srcAddress);
1965 assertNull(inetAddress);
1971 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress);
1972 assertNull(inetAddress);
1978 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress);
1979 assertNull(inetAddress);
/libcore/luni/src/main/java/android/system/
DOs.java662 …ags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os… in sendto() argument
667 …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