/libcore/luni/src/main/native/ |
NetworkUtilities.h | 20 // Convert from sockaddr_storage to InetAddress and an optional int port. 23 // Convert from InetAddress to sockaddr_storage. An Inet4Address will be converted to 26 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss); 28 // Convert from InetAddress to sockaddr_storage. An Inet6Address will be converted to 33 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss);
|
NetworkUtilities.cpp | 82 "getByAddress", "(Ljava/lang/String;[BI)Ljava/net/InetAddress;"); 90 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss, bool map) { 93 if (inetAddress == NULL) { 100 ss->ss_family = env->GetIntField(inetAddress, familyFid); 112 // Get the byte array that stores the IP address bytes in the InetAddress. 114 ScopedLocalRef<jbyteArray> addressBytes(env, reinterpret_cast<jbyteArray>(env->GetObjectField(inetAddress, bytesFid))); 129 sin6->sin6_scope_id = env->GetIntField(inetAddress, scopeFid); 156 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss) { 157 return inetAddressToSockaddr(env, inetAddress, port, ss, false); 160 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss) [all...] |
libcore_io_Posix.cpp | 222 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); 223 if (inetAddress == NULL) { 227 "(Ljava/net/InetAddress;I)V"); 228 return env->NewObject(JniConstants::inetSocketAddressClass, ctor, inetAddress, port); 312 static jfieldID addressFid = env->GetFieldID(JniConstants::inetSocketAddressClass, "addr", "Ljava/net/InetAddress;"); 593 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL)); 594 if (inetAddress.get() == NULL) { 597 env->SetObjectArrayElement(result, index, inetAddress.get()); [all...] |
/external/nist-sip/java/gov/nist/core/ |
Host.java | 60 * at the end of IPv6 addresses generated by InetAddress.getHostAddress(). 81 private InetAddress inetAddress; 174 if (inetAddress == null) 175 inetAddress = InetAddress.getByName(hostname); 176 rawIpAddress = inetAddress.getHostAddress(); 208 //set inetAddress to null so that it would be reinited 210 inetAddress = null; 267 public InetAddress getInetAddress() throws java.net.UnknownHostException [all...] |
/frameworks/base/core/java/android/net/ |
DhcpInfoInternal.java | 22 import java.net.InetAddress; 62 InetAddress inetAddress = NetworkUtils.numericToInetAddress(addr); 63 if (inetAddress instanceof Inet4Address) { 64 return NetworkUtils.inetAddressToInt(inetAddress); 81 InetAddress inetAddress = NetworkUtils.numericToInetAddress(ipAddress);
|
ConnectivityManager.java | 28 import java.net.InetAddress; 481 InetAddress inetAddress = NetworkUtils.intToInetAddress(hostAddress); 483 if (inetAddress == null) { 487 return requestRouteToHostAddress(networkType, inetAddress); 500 public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
|
/libcore/luni/src/main/java/libcore/io/ |
IoBridge.java | 27 import java.net.InetAddress; 73 public static void bind(FileDescriptor fd, InetAddress address, int port) throws SocketException { 95 * Connects socket 'fd' to 'inetAddress' on 'port', with no timeout. The lack of a timeout 98 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketException { 100 return IoBridge.connect(fd, inetAddress, port, 0); 107 * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. 110 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { 112 return connectErrno(fd, inetAddress, port, timeoutMs) [all...] |
BlockGuardOs.java | 22 import java.net.InetAddress; 83 @Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException { 167 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException { 169 return os.sendto(fd, buffer, flags, inetAddress, port); 172 @Override public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException { 174 if (inetAddress != null) { 177 return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
|
Posix.java | 20 import java.net.InetAddress; 33 public native void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException; 36 public native void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException; 49 public native InetAddress[] getaddrinfo(String node, StructAddrinfo hints) throws GaiException; 54 public native String getnameinfo(InetAddress address, int flags) throws GaiException; 61 public native InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException; 67 public native InetAddress inet_pton(int family, String address); 68 public native InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException; 137 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException [all...] |
ForwardingOs.java | 20 import java.net.InetAddress; 39 public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException { os.bind(fd, address, port); } 42 public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException { os.connect(fd, address, port); } 55 public InetAddress[] getaddrinfo(String node, StructAddrinfo hints) throws GaiException { return os.getaddrinfo(node, hints); } 60 public String getnameinfo(InetAddress address, int flags) throws GaiException { return os.getnameinfo(address, flags); } 67 public InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptInAddr(fd, level, option); } 73 public InetAddress inet_pton(int family, String address) { return os.inet_pton(family, address); } 74 public InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException { return os.ioctlInetAddress(fd, cmd, interfaceName); } 103 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException { return os.sendto(fd, buffer, flags, inetAddress, port); [all...] |
Os.java | 20 import java.net.InetAddress; 30 public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException; 33 public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException; 46 public InetAddress[] getaddrinfo(String node, StructAddrinfo hints) throws GaiException; 52 public String getnameinfo(InetAddress address, int flags) throws GaiException; 59 public InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException; 65 public InetAddress inet_pton(int family, String address); 66 public InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException; 95 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException [all...] |
/cts/tests/tests/net/src/android/net/cts/ |
SSLCertificateSocketFactoryTest.java | 20 import java.net.InetAddress; 77 args = {java.net.InetAddress.class, int.class} 92 args = {java.lang.String.class, int.class, java.net.InetAddress.class, int.class} 97 args = {java.net.InetAddress.class, int.class, java.net.InetAddress.class, int.class} 109 InetAddress inetAddress = null; 110 inetAddress = InetAddress.getLocalHost(); 112 mFactory.createSocket(inetAddress, port) [all...] |
/packages/apps/Mms/src/com/android/mms/transaction/ |
Transaction.java | 29 import java.net.InetAddress; 250 InetAddress inetAddress; 252 inetAddress = InetAddress.getByName(hostname); 258 addrBytes = inetAddress.getAddress();
|
/libcore/luni/src/test/java/libcore/java/net/ |
OldDatagramSocketTest.java | 29 import java.net.InetAddress; 92 public DatagramServer(int aPort, InetAddress address) 184 // Test for method java.net.DatagramSocket(int, java.net.InetAddress) 187 ds = new java.net.DatagramSocket(portNumber, InetAddress 192 .getLocalAddress().equals(InetAddress.getLocalHost())); 211 new java.net.DatagramSocket(8080, InetAddress 226 new java.net.DatagramSocket(1, InetAddress 241 dp = new DatagramPacket("Test String".getBytes(), 11, InetAddress 259 InetAddress inetAddress = InetAddress.getLocalHost() [all...] |
URLTest.java | 20 import java.net.InetAddress; 54 for (InetAddress inetAddress : InetAddress.getAllByName("localhost")) { 55 String address = inetAddress.getHostAddress(); 56 if (inetAddress instanceof Inet6Address) {
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/ |
DatagramSocketTest.java | 29 import java.net.InetAddress; 89 public DatagramServer(int aPort, InetAddress address) 115 * @tests java.net.DatagramSocket#DatagramSocket(int, java.net.InetAddress) 118 DatagramSocket ds = new DatagramSocket(0, InetAddress.getLocalHost()); 120 assertEquals("Created socket with incorrect address", InetAddress 130 InetAddress.getLocalHost(), 0); 142 InetAddress inetAddress = InetAddress.getLocalHost(); 143 ds.connect(inetAddress, 0) [all...] |
/libcore/luni/src/main/java/java/net/ |
InetAddress.java | 48 * families, and should use {@code InetAddress}. 50 * <p>An {@code InetAddress} may have a hostname (accessible via {@code getHostName}), but may not, 51 * depending on how the {@code InetAddress} was created. 132 public class InetAddress implements Serializable { 148 public static final InetAddress UNSPECIFIED = new InetAddress(AF_UNSPEC, null, null); 151 * Constructs an {@code InetAddress}. 155 InetAddress(int family, byte[] ipaddress, String hostName) { 162 * Compares this {@code InetAddress} instance against the specified address 172 if (!(obj instanceof InetAddress)) { [all...] |
/development/apps/Development/src/com/android/development/ |
Connectivity.java | 65 import java.net.InetAddress; 410 InetAddress inetAddress = null; 412 inetAddress = InetAddress.getByName(url); 418 mCm.requestRouteToHostAddress(ConnectivityManager.TYPE_MOBILE_HIPRI, inetAddress); 449 Log.d(TAG, " inetAddress:" + ((InetAddress)inetAddressess.nextElement())); 491 Log.d(TAG, " addr:" + ((InetAddress)inetAddressess.nextElement())); 493 InetAddress local = null [all...] |
/libcore/luni/src/main/java/java/nio/ |
SocketChannelImpl.java | 26 import java.net.InetAddress; 77 private InetAddress localAddress = null; 113 InetAddress addr = null; 155 InetAddress normalAddr = inetSocketAddress.getAddress(); 160 normalAddr = InetAddress.getLocalHost(); 235 InetAddress inetAddress = connectAddress.getAddress(); 237 finished = IoBridge.isConnected(fd, inetAddress, port, 0, 0); // Return immediately. 430 public InetAddress getLocalAddress() throws UnknownHostException { 496 public InetAddress getLocalAddress() [all...] |
/frameworks/base/services/java/com/android/server/ |
ConnectivityService.java | 94 import java.net.InetAddress; 289 private InetAddress mDefaultDns; [all...] |
/external/nist-sip/java/gov/nist/javax/sip/stack/ |
SIPDialog.java | 67 import java.net.InetAddress; [all...] |