Searched refs:inetAddress (Results 1 - 16 of 16) sorted by relevance

/libcore/luni/src/main/native/
H A DNetworkUtilities.h29 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port,
38 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port,
H A DNetworkUtilities.cpp91 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len, bool map) { argument
95 if (inetAddress == NULL) {
105 ScopedLocalRef<jobject> holder(env, env->GetObjectField(inetAddress, holderFid));
129 ScopedLocalRef<jbyteArray> addressBytes(env, reinterpret_cast<jbyteArray>(env->CallObjectMethod(inetAddress, bytesMid)));
158 ScopedLocalRef<jobject> holder6(env, env->GetObjectField(inetAddress, holder6Fid));
190 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len) { argument
191 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false);
194 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len) { argument
195 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, true);
H A Dlibcore_io_Linux.cpp379 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); local
380 if (inetAddress == NULL) {
388 return env->NewObject(JniConstants::inetSocketAddressClass, ctor, inetAddress, port);
1302 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL));
1303 if (inetAddress.get() == NULL) {
1306 env->SetObjectArrayElement(result, index, inetAddress.get());
/libcore/luni/src/test/java/libcore/java/net/
H A DInetAddressTest.java235 InetAddress inetAddress = InetAddress.getByName("www.google.com");
236 new SerializationTester<InetAddress>(inetAddress, s) {
252 InetAddress inetAddress = InetAddress.getByName("www.google.com");
260 assertFalse(inetAddress.isReachable(netIf, 256, 500));
453 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK6_BYTES);
456 assertEquals("::1", getHostStringWithoutReverseDns(inetAddress));
459 assertEquals("ip6-localhost", inetAddress.getHostName());
462 assertEquals("ip6-localhost", getHostStringWithoutReverseDns(inetAddress));
467 InetAddress inetAddress = InetAddress.getByAddress(LOOPBACK4_BYTES);
468 checkInetAddress(LOOPBACK4_BYTES, "localhost", inetAddress);
576 getHostStringWithoutReverseDns(InetAddress inetAddress) argument
[all...]
H A DInetSocketAddressTest.java176 InetAddress inetAddress = InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 });
177 InetSocketAddress socketAddress = new InetSocketAddress(inetAddress, 1234);
182 inetAddress = InetAddress.getByName("127.0.0.1");
183 socketAddress = new InetSocketAddress(inetAddress, 1234);
H A DURLTest.java70 for (InetAddress inetAddress : InetAddress.getAllByName("localhost")) {
71 String address = inetAddress.getHostAddress();
72 if (inetAddress instanceof Inet6Address) {
/libcore/luni/src/main/java/libcore/io/
H A DIoBridge.java112 * Connects socket 'fd' to 'inetAddress' on 'port', with no timeout. The lack of a timeout
115 public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketException { argument
117 IoBridge.connect(fd, inetAddress, port, 0);
124 * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'.
127 public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { argument
129 connectErrno(fd, inetAddress, port, timeoutMs);
137 throw new ConnectException(createMessageForException(fd, inetAddress, port, timeoutMs,
148 private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws ErrnoException, IOException { argument
151 Libcore.os.connect(fd, inetAddress, port);
168 Libcore.os.connect(fd, inetAddress, por
194 createMessageForException(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs, Exception causeOrNull) argument
252 isConnected(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs, int remainingTimeoutMs) argument
535 sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument
549 sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) argument
[all...]
H A DLinux.java212 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
217 bytesSent = sendtoBytes(fd, buffer, position, buffer.remaining(), flags, inetAddress, port);
219 bytesSent = sendtoBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), flags, inetAddress, port);
225 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
227 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
232 private native int sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException; argument
H A DBlockGuardOs.java297 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
299 return os.sendto(fd, buffer, flags, inetAddress, port);
302 @Override public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
304 if (inetAddress != null) {
307 return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
H A DOs.java143 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException; argument
144 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException; argument
H A DForwardingOs.java157 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, buffer, flags, inetAddress, port); } argument
158 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); } argument
/libcore/ojluni/src/main/java/java/net/
H A DInetAddress.java1618 InetAddress inetAddress = parseNumericAddressNoThrow(address);
1619 return inetAddress != null && disallowDeprecatedFormats(address, inetAddress) != null;
1637 static InetAddress disallowDeprecatedFormats(String address, InetAddress inetAddress) { argument
1639 if (!(inetAddress instanceof Inet4Address) || address.indexOf(':') != -1) {
1640 return inetAddress;
H A DNetworkInterface.java356 for (InetAddress inetAddress : Collections.list(ni.getInetAddresses())) {
357 if (inetAddress.equals(addr)) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DDatagramSocketTest.java151 InetAddress inetAddress = InetAddress.getLocalHost();
152 ds.connect(inetAddress, 0);
153 assertEquals("Incorrect InetAddress", inetAddress, ds.getInetAddress());
159 InetAddress inetAddress =
161 ds.connect(inetAddress, 0);
162 assertEquals(inetAddress, ds.getInetAddress());
316 InetAddress inetAddress = InetAddress.getByAddress(addressBytes);
317 ds.connect(inetAddress, 0);
323 InetAddress inetAddress = InetAddress.getByAddress(addressTestBytes);
324 ds.connect(inetAddress,
[all...]
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DDatagramChannelTest.java283 InetAddress inetAddress = inetAddresses.nextElement();
284 if ( (ipv4 && inetAddress instanceof Inet4Address)
285 || (!ipv4 && inetAddress instanceof Inet6Address)) {
286 return inetAddress;
/libcore/luni/src/main/java/android/system/
H A DOs.java466 public static int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os.sendto(fd, buffer, flags, inetAddress, port); } argument
471 public static int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return Libcore.os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); } argument

Completed in 276 milliseconds