Home
last modified time | relevance | path

Searched refs:InetAddress (Results 1 – 25 of 142) sorted by relevance

123456

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DInetAddressTest.java24 import java.net.InetAddress;
42 InetAddress.getByName("1.2.3.4hello"); in test_getByName_exceptionContainsUsefulMessage()
50 InetAddress ia1 = InetAddress.getByName("ip6-localhost"); in test_equalsLjava_lang_Object()
51 InetAddress ia2 = InetAddress.getByName("::1"); in test_equalsLjava_lang_Object()
61 InetAddress ia = InetAddress.getByName("127.0.0.1"); in test_getAddress()
70 InetAddress address = InetAddress.getByAddress(origBytes); in test_getAddress()
83 InetAddress[] all = InetAddress.getAllByName("localhost"); in test_getAllByNameLjava_lang_String()
87 for (InetAddress alias : all) { in test_getAllByNameLjava_lang_String()
94 InetAddress[] ias = InetAddress.getAllByName(null); in test_getAllByNameLjava_lang_String()
96 for (InetAddress ia : ias) { in test_getAllByNameLjava_lang_String()
[all …]
DInet6AddressTest.java23 import java.net.InetAddress;
35 InetAddress addr = null; in test_isMulticastAddress()
44 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
49 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
62 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
68 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
81 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
86 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
95 InetAddress addr = null; in test_isAnyLocalAddress()
99 addr = InetAddress.getByName(addrName); in test_isAnyLocalAddress()
[all …]
DInet4AddressTest.java22 import java.net.InetAddress;
40 InetAddress addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
45 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
50 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
58 assertTrue(InetAddress.getByName("0.0.0.0").isAnyLocalAddress()); in test_isAnyLocalAddress()
59 assertFalse(InetAddress.getByName("127.0.0.1").isAnyLocalAddress()); in test_isAnyLocalAddress()
68 InetAddress addr = InetAddress.getByName(addrName); in test_isLoopbackAddress()
74 addr = InetAddress.getByName(addrName); in test_isLoopbackAddress()
80 addr = InetAddress.getByName(addrName); in test_isLoopbackAddress()
96 InetAddress addr = InetAddress.getByName(addrName); in test_isLinkLocalAddress()
[all …]
DNetworkInterfaceTest.java20 import java.net.InetAddress;
68 InetAddress theAddress = (InetAddress) theAddresses in test_getInetAddresses()
77 InetAddress theAddress = (InetAddress) theAddresses in test_getInetAddresses()
90 InetAddress theAddress = (InetAddress) addresses.nextElement(); in test_getInetAddresses()
100 InetAddress theAddress = (InetAddress) addresses in test_getInetAddresses()
112 InetAddress nextAddress = (InetAddress) reducedAddresses in test_getInetAddresses()
121 InetAddress nextAddress = (InetAddress) reducedAddresses in test_getInetAddresses()
136 InetAddress nextAddress = (InetAddress) reducedAddresses in test_getInetAddresses()
145 InetAddress nextAddress = (InetAddress) reducedAddresses in test_getInetAddresses()
162 .getByInetAddress((InetAddress) notOkAddresses in test_getInetAddresses()
[all …]
DDatagramPacketTest.java23 import java.net.InetAddress;
70 InetAddress.getLocalHost(), 0); in test_Constructor$BIILjava_net_InetAddressI()
71 assertEquals("Wrong host", InetAddress.getLocalHost(), dp.getAddress()); in test_Constructor$BIILjava_net_InetAddressI()
83 InetAddress.getLocalHost(), 0); in test_Constructor$BILjava_net_InetAddressI()
84 assertEquals("Wrong address", InetAddress.getLocalHost(), dp in test_Constructor$BILjava_net_InetAddressI()
95 InetAddress.getLocalHost(), 0); in test_getAddress()
96 assertEquals("Incorrect address returned", InetAddress.getLocalHost(), in test_getAddress()
130 InetAddress.getLocalHost(), 1000); in test_getPort()
133 final InetAddress localhost = InetAddress.getLocalHost(); in test_getPort()
151 InetAddress ia = InetAddress.getByName("127.0.0.1"); in test_setAddressLjava_net_InetAddress()
[all …]
DSocketTest.java24 import java.net.InetAddress;
164 InetSocketAddress bogusAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress()
176 theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); in test_bindLjava_net_SocketAddress()
182 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress()
187 InetSocketAddress theAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress()
192 InetSocketAddress boundAddress = new InetSocketAddress(InetAddress in test_bindLjava_net_SocketAddress()
199 new InetSocketAddress(InetAddress.getLocalHost(), portNumber), in test_bindLjava_net_SocketAddress()
217 theAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0); in test_bindLjava_net_SocketAddress()
251 InetAddress address = InetAddress.getByName("localhost"); in test_bindLjava_net_SocketAddress_Proxy()
262 Socket client = new Socket(InetAddress.getLocalHost(), server.getLocalPort()); in test_close()
[all …]
DInetAddressThreadTest.java20 import java.net.InetAddress;
42 private InetAddress testAddress;
58 InetAddress testAddress, int type) { in threadsafeTestThread()
85 InetAddress ia = InetAddress.getByName(lookupName); in run()
134 InetAddress lookup1 = InetAddress.getByName("localhost"); in test_getHostName()
136 InetAddress lookup2 = InetAddress.getByName("localhost"); in test_getHostName()
DDatagramSocketImplTest.java24 import java.net.InetAddress;
49 InetAddress localhost = InetAddress.getByName("localhost"); //$NON-NLS-1$ in test_connect()
67 protected void bind(int port, InetAddress addr) throws SocketException { in bind()
96 protected void join(InetAddress addr) throws IOException { in join()
107 protected void leave(InetAddress addr) throws IOException { in leave()
118 protected int peek(InetAddress sender) throws IOException { in peek()
152 public void test_connect(InetAddress inetAddr, int port) throws SocketException { in test_connect()
/libcore/luni/src/test/java/libcore/java/net/
DInetAddressTest.java28 import java.net.InetAddress;
111 return (Inet6Address) InetAddress.getByAddress(LOOPBACK6_BYTES); in loopback6()
115 return (Inet6Address) InetAddress.getByAddress("ip6-localhost", LOOPBACK6_BYTES); in localhost6()
141 assertEquals(expectedString, InetAddress.parseNumericAddress(address).toString()); in test_parseNumericAddress()
147 InetAddress.parseNumericAddress("example.com"); // Not numeric. in test_parseNumericAddress_notNumeric()
153 assertTrue(InetAddress.parseNumericAddress(null).isLoopbackAddress()); in test_parseNumericAddress_notNumeric()
154 assertTrue(InetAddress.parseNumericAddress("").isLoopbackAddress()); in test_parseNumericAddress_notNumeric()
161 InetAddress.parseNumericAddress(invalid); in test_parseNumericAddress_invalid()
192 assertTrue(InetAddress.isNumeric(valid)); in test_isNumeric()
198 boolean result = InetAddress.isNumeric(null); in test_isNumeric_notNumeric_null()
[all …]
DInetSocketAddressTest.java19 import java.net.InetAddress;
59 InetAddress ia = InetAddress.getByName(validIPAddresses[i]); in test_ConstructorLInetAddressI()
65 InetSocketAddress isa = new InetSocketAddress((InetAddress)null, 80); in test_ConstructorLInetAddressI()
69 new InetSocketAddress(InetAddress.getByName("localhost"), 65536); in test_ConstructorLInetAddressI()
75 new InetSocketAddress(InetAddress.getByName("localhost"), -1); in test_ConstructorLInetAddressI()
106 InetAddress localhost = InetAddress.getByName("localhost"); in test_equals()
121 InetAddress ia = InetAddress.getByName(validIPAddresses[i]); in test_getAddress()
125 InetSocketAddress isa = new InetSocketAddress((InetAddress) null, 0); in test_getAddress()
130 InetAddress localhost = InetAddress.getByName("localhost"); in test_hashCode()
155 InetAddress.getByAddress("some host", new byte[] { 127, 0, 0, 1 }), in test_getHostString()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/
DSocketFactoryTest.java26 import java.net.InetAddress;
63 Socket s = sf.createSocket(InetAddress.getLocalHost().getHostName(), sport); in test_createSocket_StringI()
75 sf.createSocket(InetAddress.getLocalHost().getHostName(), invalidPorts[i]); in test_createSocket_StringI()
82 sf.createSocket(InetAddress.getLocalHost().getHostName(), s.getLocalPort()); in test_createSocket_StringI()
89 f.createSocket(InetAddress.getLocalHost().getHostName(), 8082); in test_createSocket_StringI()
100 Socket s = sf.createSocket(InetAddress.getLocalHost(), sport); in test_createSocket_InetAddressI()
106 sf.createSocket(InetAddress.getLocalHost(), invalidPorts[i]); in test_createSocket_InetAddressI()
113 sf.createSocket(InetAddress.getLocalHost(), s.getLocalPort()); in test_createSocket_InetAddressI()
120 f.createSocket(InetAddress.getLocalHost(), 8081); in test_createSocket_InetAddressI()
130 Socket s = sf.createSocket(InetAddress.getLocalHost(), sport, in test_createSocket_InetAddressIInetAddressI()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DMembershipKeyImpl.java29 import java.net.InetAddress;
42 private final InetAddress group;
44 private final InetAddress source;
53 private HashSet<InetAddress> blockedSet;
56 InetAddress group, in MembershipKeyImpl()
58 InetAddress source) in MembershipKeyImpl()
75 InetAddress group, in Type4()
77 InetAddress source, in Type4()
110 InetAddress group, in Type6()
112 InetAddress source, in Type6()
[all …]
DMembershipRegistry.java29 import java.net.InetAddress;
42 private Map<InetAddress,List<MembershipKeyImpl>> groups = null;
51 MembershipKey checkMembership(InetAddress group, NetworkInterface interf, in checkMembership()
52 InetAddress source) in checkMembership()
84 InetAddress group = key.group(); in add()
87 groups = new HashMap<InetAddress,List<MembershipKeyImpl>>(); in add()
103 InetAddress group = key.group(); in remove()
124 for (InetAddress group: groups.keySet()) { in invalidateAll()
/libcore/ojluni/annotations/hiddenapi/java/net/
DInet6AddressImpl.java36 public java.net.InetAddress[] lookupAllHostAddr(java.lang.String host, int netId) in lookupAllHostAddr()
41 private static java.net.InetAddress[] lookupHostByName(java.lang.String host, int netId) in lookupHostByName()
55 java.net.InetAddress addr, int timeout, java.net.NetworkInterface netif, int ttl) in isReachable()
61 java.net.InetAddress addr, int timeout, java.net.InetAddress sourceAddr, int ttl) in tcpEcho()
67 java.net.InetAddress addr, int timeout, java.net.InetAddress sourceAddr, int ttl) in icmpEcho()
72 public java.net.InetAddress anyLocalAddress() { in anyLocalAddress()
76 public java.net.InetAddress[] loopbackAddresses() { in loopbackAddresses()
91 private static java.net.InetAddress anyLocalAddress;
93 private static java.net.InetAddress[] loopbackAddresses;
DInetAddress.java33 public class InetAddress implements java.io.Serializable { class
35 InetAddress() { in InetAddress() method in InetAddress
40 java.net.InetAddress.InetAddressHolder holder() { in holder()
109 private static java.lang.String getHostFromNameService(java.net.InetAddress addr) { in getHostFromNameService()
133 public static java.net.InetAddress getByAddress(java.lang.String host, byte[] addr) in getByAddress()
138 private static java.net.InetAddress getByAddress( in getByAddress()
143 public static java.net.InetAddress getByName(java.lang.String host) in getByName()
148 public static java.net.InetAddress[] getAllByName(java.lang.String host) in getAllByName()
153 public static java.net.InetAddress getLoopbackAddress() { in getLoopbackAddress()
157 public static java.net.InetAddress getByAddress(byte[] addr) in getByAddress()
[all …]
DInterfaceAddress.java39 java.net.InetAddress address, in InterfaceAddress()
41 java.net.InetAddress netmask) { in InterfaceAddress()
45 private short countPrefixLength(java.net.InetAddress netmask) { in countPrefixLength()
49 public java.net.InetAddress getAddress() { in getAddress()
53 public java.net.InetAddress getBroadcast() { in getBroadcast()
73 private java.net.InetAddress address;
/libcore/luni/src/main/java/android/system/
DStructIfaddrs.java21 import java.net.InetAddress;
32 public final InetAddress ifa_addr;
33 public final InetAddress ifa_netmask;
34 public final InetAddress ifa_broadaddr;
40 …public StructIfaddrs(String ifa_name, int ifa_flags, InetAddress ifa_addr, InetAddress ifa_netmask, in StructIfaddrs()
41 InetAddress ifa_broadaddr, byte[] hwaddr) { in StructIfaddrs()
/libcore/ojluni/src/main/java/java/net/
DInet6AddressImpl.java75 private static InetAddress anyLocalAddress;
77 private static InetAddress[] loopbackAddresses;
90 public InetAddress[] lookupAllHostAddr(String host, int netId) throws UnknownHostException { in lookupAllHostAddr()
98 InetAddress result = InetAddressUtils.parseNumericAddressNoThrowStripOptionalBrackets(host); in lookupAllHostAddr()
100 return new InetAddress[] { result }; in lookupAllHostAddr()
113 private static InetAddress[] lookupHostByName(String host, int netId) in lookupHostByName()
119 if (cachedResult instanceof InetAddress[]) { in lookupHostByName()
121 return (InetAddress[]) cachedResult; in lookupHostByName()
135 InetAddress[] addresses = Libcore.os.android_getaddrinfo(host, hints, netId); in lookupHostByName()
137 for (InetAddress address : addresses) { in lookupHostByName()
[all …]
DInetAddress.java181 class InetAddress implements java.io.Serializable { class
280 public InetAddress[] lookupAllHostAddr(String host, int netId)
322 InetAddress() { in InetAddress() method in InetAddress
565 holder().hostName = InetAddress.getHostFromNameService(this); in getHostName()
627 canonicalHostName = InetAddress.getHostFromNameService(this); in getCanonicalHostName()
651 private static String getHostFromNameService(InetAddress addr) { in getHostFromNameService()
662 InetAddress[] arr = nameService.lookupAllHostAddr(host, NETID_UNSET); in getHostFromNameService()
1045 public static InetAddress getByAddress(String host, byte[] addr) throws UnknownHostException { in getByAddress()
1051 private static InetAddress getByAddress(String host, byte[] addr, int scopeId) in getByAddress()
1103 public static InetAddress getByName(String host) in getByName()
[all …]
DAbstractPlainDatagramSocketImpl.java55 protected InetAddress connectedAddress = null;
110 protected synchronized void bind(int lport, InetAddress laddr) in bind()
115 protected abstract void bind0(int lport, InetAddress laddr) in bind0()
132 protected void connect(InetAddress address, int port) throws SocketException { in connect()
156 protected abstract int peek(InetAddress i) throws IOException; in peek()
198 protected void join(InetAddress inetaddr) throws IOException { in join()
206 protected void leave(InetAddress inetaddr) throws IOException { in leave()
226 protected abstract void join(InetAddress inetaddr, NetworkInterface netIf) in join()
244 protected abstract void leave(InetAddress inetaddr, NetworkInterface netIf) in leave()
324 if (o == null || !(o instanceof InetAddress)) in setOption()
[all …]
DInterfaceAddress.java38 private InetAddress address = null;
50 InterfaceAddress(InetAddress address, Inet4Address broadcast, InetAddress netmask) { in InterfaceAddress()
62 private short countPrefixLength(InetAddress netmask) { in countPrefixLength()
76 public InetAddress getAddress() { in getAddress()
90 public InetAddress getBroadcast() { in getBroadcast()
/libcore/ojluni/src/main/java/javax/net/
DSocketFactory.java30 import java.net.InetAddress;
195 createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket()
221 public abstract Socket createSocket(InetAddress host, int port) in createSocket()
252 createSocket(InetAddress address, int port, in createSocket()
253 InetAddress localAddress, int localPort) in createSocket()
282 public Socket createSocket(InetAddress address, int port) in createSocket()
289 InetAddress clientAddress, int clientPort) in createSocket()
295 public Socket createSocket(InetAddress address, int port, in createSocket()
296 InetAddress clientAddress, int clientPort) in createSocket()
/libcore/ojluni/annotations/mmodule/java/net/
DInetAddress.annotated.java34 public class InetAddress implements java.io.Serializable { class
36 InetAddress() { throw new RuntimeException("Stub!"); } in InetAddress() method in InetAddress
78 public static java.net.InetAddress getByAddress(java.lang.String host, byte[] addr) throws java.net… in getByAddress()
80 public static java.net.InetAddress getByName(java.lang.String host) throws java.net.UnknownHostExce… in getByName()
82 public static java.net.InetAddress[] getAllByName(java.lang.String host) throws java.net.UnknownHos… in getAllByName()
84 public static java.net.InetAddress getLoopbackAddress() { throw new RuntimeException("Stub!"); } in getLoopbackAddress()
86 public static java.net.InetAddress getByAddress(byte[] addr) throws java.net.UnknownHostException {… in getByAddress()
88 public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException { throw new … in getLocalHost()
94 public static java.net.InetAddress parseNumericAddress(java.lang.String numericAddress) { throw new… in parseNumericAddress()
100 public static java.net.InetAddress getByNameOnNet(java.lang.String host, int netId) throws java.net… in getByNameOnNet()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLSocketTest.java21 import java.net.InetAddress;
67 SSLSocket ssl = getSSLSocket(InetAddress.getLocalHost(), sport); in testConstructor_InetAddressI()
73 getSSLSocket(InetAddress.getLocalHost(), sport + 1); in testConstructor_InetAddressI()
80 getSSLSocket(InetAddress.getLocalHost(), invalidPort[i]); in testConstructor_InetAddressI()
94 SSLSocket ssl = getSSLSocket(InetAddress.getLocalHost(), sport, in testConstructor_InetAddressIInetAddressI()
95 InetAddress.getLocalHost(), 0); in testConstructor_InetAddressIInetAddressI()
101 getSSLSocket(InetAddress.getLocalHost(), 8081, InetAddress.getLocalHost(), 8082); in testConstructor_InetAddressIInetAddressI()
107 getSSLSocket(InetAddress.getLocalHost(), -1, InetAddress.getLocalHost(), sport + 1); in testConstructor_InetAddressIInetAddressI()
112 getSSLSocket(InetAddress.getLocalHost(), sport, InetAddress.getLocalHost(), -1); in testConstructor_InetAddressIInetAddressI()
118 getSSLSocket(InetAddress.getLocalHost(), Integer.MIN_VALUE, in testConstructor_InetAddressIInetAddressI()
[all …]
/libcore/ojluni/src/main/java/java/nio/channels/
DMembershipKey.java28 import java.net.InetAddress;
125 public abstract MembershipKey block(InetAddress source) throws IOException; in block()
140 public abstract MembershipKey unblock(InetAddress source); in unblock()
158 public abstract InetAddress group(); in group()
176 public abstract InetAddress sourceAddress(); in sourceAddress()

123456