/libcore/luni/src/test/java/libcore/java/net/ |
D | InetAddressTest.java | 249 InetAddress inetAddress = InetAddress.getByName("www.google.com"); in test_isReachable() local 250 new SerializationTester<InetAddress>(inetAddress, s) { in test_isReachable() argument 266 InetAddress inetAddress = InetAddress.getByName("www.google.com"); in test_isReachable_neverThrows() local 274 assertFalse(inetAddress.isReachable(netIf, 256, 500)); in test_isReachable_neverThrows() 467 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK6_BYTES); in test_getHostNameCaches() local 470 assertEquals("::1", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches() 473 assertEquals("ip6-localhost", inetAddress.getHostName()); in test_getHostNameCaches() 476 assertEquals("ip6-localhost", getHostStringWithoutReverseDns(inetAddress)); in test_getHostNameCaches() 481 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK4_BYTES); in test_getByAddress_loopbackIpv4() local 482 checkInetAddress(LOOPBACK4_BYTES, "localhost", inetAddress); in test_getByAddress_loopbackIpv4() [all …]
|
D | InetSocketAddressTest.java | 176 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()
|
D | URLTest.java | 70 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/ |
D | InetAddressUtilsTest.java | 85 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/ |
D | NetworkUtilities.cpp | 93 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()
|
D | NetworkUtilities.h | 29 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, 38 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port,
|
D | libcore_io_Linux.cpp | 387 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); in makeSocketAddress() local 388 if (inetAddress == NULL) { in makeSocketAddress() 396 … return env->NewObject(JniConstants::GetInetSocketAddressClass(env), ctor, inetAddress, port); in makeSocketAddress() 1380 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL)); in Linux_android_getaddrinfo() local 1381 if (inetAddress.get() == NULL) { in Linux_android_getaddrinfo() 1384 env->SetObjectArrayElement(result, index, inetAddress.get()); in Linux_android_getaddrinfo()
|
/libcore/luni/src/main/java/libcore/io/ |
D | IoBridge.java | 121 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketExce… in connect() argument 123 IoBridge.connect(fd, inetAddress, port, 0); in connect() 133 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) th… in connect() argument 135 connectErrno(fd, inetAddress, port, timeoutMs); in connect() 143 throw new ConnectException(createMessageForException(fd, inetAddress, port, timeoutMs, in connect() 154 …private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeout… in connectErrno() argument 157 Libcore.os.connect(fd, inetAddress, port); in connectErrno() 174 Libcore.os.connect(fd, inetAddress, port); in connectErrno() 191 createMessageForException(fd, inetAddress, port, timeoutMs, null)); in connectErrno() 193 } while (!IoBridge.isConnected(fd, inetAddress, port, timeoutMs, remainingTimeoutMs)); in connectErrno() [all …]
|
D | Linux.java | 218 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument 223 … bytesSent = sendtoBytes(fd, buffer, position, buffer.remaining(), flags, inetAddress, port); in sendto() 225 …fer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, inetAddress, port); in sendto() 231 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument 233 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto() 238 …, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendtoBytes() argument
|
D | BlockGuardOs.java | 356 …nt sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) thro… in sendto() argument 358 return super.sendto(fd, buffer, flags, inetAddress, port); in sendto() 361 …d, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) thro… in sendto() argument 363 if (inetAddress != null) { in sendto() 366 return super.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); in sendto()
|
D | ForwardingOs.java | 193 …t flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sen… in sendto() argument 194 …etAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, byt… in sendto() argument
|
D | Os.java | 161 …public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int po… in sendto() argument 162 …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/ |
D | DatagramSocketTest.java | 151 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/ |
D | DatagramChannelTest.java | 283 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/ |
D | OsTest.java | 1390 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress); in testInetPtonIpv4() local 1391 assertEquals(srcAddress, inetAddress.getHostAddress()); in testInetPtonIpv4() 1396 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress); in testInetPtonIpv6() local 1397 assertEquals(srcAddress, inetAddress.getHostAddress()); in testInetPtonIpv6() 1402 InetAddress inetAddress = Os.inet_pton(AF_UNIX, srcAddress); in testInetPtonInvalidFamily() local 1403 assertNull(inetAddress); in testInetPtonInvalidFamily() 1408 InetAddress inetAddress = Os.inet_pton(AF_INET6, srcAddress); in testInetPtonWrongFamily() local 1409 assertNull(inetAddress); in testInetPtonWrongFamily() 1414 InetAddress inetAddress = Os.inet_pton(AF_INET, srcAddress); in testInetPtonInvalidData() local 1415 assertNull(inetAddress); in testInetPtonInvalidData()
|
/libcore/ojluni/src/main/java/java/net/ |
D | NetworkInterface.java | 356 for (InetAddress inetAddress : Collections.list(ni.getInetAddresses())) { in getByInetAddress() 357 if (inetAddress.equals(addr)) { in getByInetAddress()
|
/libcore/luni/src/main/java/android/system/ |
D | Os.java | 522 …ags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os… in sendto() argument 527 …dress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os.sendto(fd,… in sendto() argument
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | InetAddress.java | 194 java.lang.String address, java.net.InetAddress inetAddress) { in disallowDeprecatedFormats() argument
|