/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | Inet6AddressTest.java | 35 InetAddress addr = null; in test_isMulticastAddress() local 44 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 45 assertTrue("Multicast address " + addrName + " not detected.", addr in test_isMulticastAddress() 49 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 51 + " reporting as a multicast address.", !addr in test_isMulticastAddress() 62 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 64 + " reported incorrectly as multicast.", !addr in test_isMulticastAddress() 68 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 70 + " reported incorrectly as multicast.", !addr in test_isMulticastAddress() 81 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() [all …]
|
D | Inet4AddressTest.java | 40 InetAddress addr = InetAddress.getByName(addrName); in test_isMulticastAddress() local 41 assertTrue("Multicast address " + addrName + " not detected.", addr in test_isMulticastAddress() 45 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 46 assertTrue("Multicast address " + addrName + " not detected.", addr in test_isMulticastAddress() 50 addr = InetAddress.getByName(addrName); in test_isMulticastAddress() 52 + " reporting as a multicast address.", !addr in test_isMulticastAddress() 68 InetAddress addr = InetAddress.getByName(addrName); in test_isLoopbackAddress() local 69 assertTrue("Loopback address " + addrName + " not detected.", addr in test_isLoopbackAddress() 74 addr = InetAddress.getByName(addrName); in test_isLoopbackAddress() 75 assertTrue("Loopback address " + addrName + " not detected.", addr in test_isLoopbackAddress() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | InetSocketAddress.java | 61 private InetAddress addr; field in InetSocketAddress.InetSocketAddressHolder 65 private InetSocketAddressHolder(String hostname, InetAddress addr, int port) { in InetSocketAddressHolder() argument 67 this.addr = addr; in InetSocketAddressHolder() 76 return addr; in getAddress() 82 if (addr != null) in getHostName() 83 return addr.getHostName(); in getHostName() 90 if (addr != null) { in getHostString() 91 if (addr.holder().getHostName() != null) in getHostString() 92 return addr.holder().getHostName(); in getHostString() 94 return addr.getHostAddress(); in getHostString() [all …]
|
D | Inet4Address.java | 139 Inet4Address(String hostName, byte addr[]) { in Inet4Address() argument 142 if (addr != null) { in Inet4Address() 143 if (addr.length == INADDRSZ) { in Inet4Address() 144 int address = addr[3] & 0xFF; in Inet4Address() 145 address |= ((addr[2] << 8) & 0xFF00); in Inet4Address() 146 address |= ((addr[1] << 16) & 0xFF0000); in Inet4Address() 147 address |= ((addr[0] << 24) & 0xFF000000); in Inet4Address() 333 byte[] addr = new byte[INADDRSZ]; in getAddress() 335 addr[0] = (byte) ((address >>> 24) & 0xFF); in getAddress() 336 addr[1] = (byte) ((address >>> 16) & 0xFF); in getAddress() [all …]
|
D | Inet6Address.java | 254 void setAddr(byte addr[]) { in setAddr() argument 255 if (addr.length == INADDRSZ) { // normal IPv6 address in setAddr() 256 System.arraycopy(addr, 0, ipaddress, 0, INADDRSZ); in setAddr() 260 void init(byte addr[], int scope_id) { in init() argument 261 setAddr(addr); in init() 270 void init(byte addr[], NetworkInterface nif) in init() argument 273 setAddr(addr); in init() 416 Inet6Address(String hostName, byte addr[], int scope_id) { in Inet6Address() argument 419 holder6.init(addr, scope_id); in Inet6Address() 422 Inet6Address(String hostName, byte addr[]) { in Inet6Address() argument [all …]
|
D | InetAddress.java | 284 public String getHostByAddr(byte[] addr) 286 return impl.getHostByAddr(addr); 651 private static String getHostFromNameService(InetAddress addr) { in getHostFromNameService() argument 656 host = nameService.getHostByAddr(addr.getAddress()); in getHostFromNameService() 667 ok = addr.equals(arr[i]); in getHostFromNameService() 673 host = addr.getHostAddress(); in getHostFromNameService() 677 host = addr.getHostAddress(); in getHostFromNameService() 1045 public static InetAddress getByAddress(String host, byte[] addr) throws UnknownHostException { in getByAddress() argument 1046 return getByAddress(host, addr, -1 /* scopeId */); in getByAddress() 1051 private static InetAddress getByAddress(String host, byte[] addr, int scopeId) in getByAddress() argument [all …]
|
D | Inet6AddressImpl.java | 161 public String getHostByAddr(byte[] addr) throws UnknownHostException { in getHostByAddr() argument 164 return getHostByAddr0(addr); in getHostByAddr() 174 …public boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, int ttl) throws … in isReachable() argument 188 if (inetaddr.getClass().isInstance(addr)) { in isReachable() 208 if (icmpEcho(addr, timeout, sourceAddr, ttl)) { in isReachable() 213 return tcpEcho(addr, timeout, sourceAddr, ttl); in isReachable() 217 private boolean tcpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in tcpEcho() argument 228 IoBridge.connect(fd, addr, 7 /* Echo-protocol port */, timeout); in tcpEcho() 241 protected boolean icmpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in icmpEcho() argument 246 boolean isIPv4 = addr instanceof Inet4Address; in icmpEcho() [all …]
|
/libcore/ojluni/src/main/java/sun/net/util/ |
D | IPAddressUtil.java | 267 public static byte[] convertFromIPv4MappedAddress(byte[] addr) { in convertFromIPv4MappedAddress() argument 268 if (isIPv4MappedAddress(addr)) { in convertFromIPv4MappedAddress() 270 System.arraycopy(addr, 12, newAddr, 0, INADDR4SZ); in convertFromIPv4MappedAddress() 283 private static boolean isIPv4MappedAddress(byte[] addr) { in isIPv4MappedAddress() argument 284 if (addr.length < INADDR16SZ) { in isIPv4MappedAddress() 287 if ((addr[0] == 0x00) && (addr[1] == 0x00) && in isIPv4MappedAddress() 288 (addr[2] == 0x00) && (addr[3] == 0x00) && in isIPv4MappedAddress() 289 (addr[4] == 0x00) && (addr[5] == 0x00) && in isIPv4MappedAddress() 290 (addr[6] == 0x00) && (addr[7] == 0x00) && in isIPv4MappedAddress() 291 (addr[8] == 0x00) && (addr[9] == 0x00) && in isIPv4MappedAddress() [all …]
|
/libcore/ojluni/src/test/java/net/InetSocketAddress/ |
D | ToString.java | 50 String addr = loopback.getHostAddress(); 52 addr = "[" + addr + "]"; 54 loopbackAddr = addr; 57 addr = isa.getAddress().toString(); 59 addr = "::/[0:0:0:0:0:0:0:0]"; 61 wildcardAddr = addr; 64 addr = ia.toString(); 66 addr = ia.getHostName() + "/[" + ia.getHostAddress() + "]"; 68 localAddr = addr;
|
D | B6469803.java | 39 InetSocketAddress addr = new InetSocketAddress("192.168.1.1", 12345); in testLocalHost() local 40 String s = addr.getHostString(); in testLocalHost() 42 addr = new InetSocketAddress("localhost", 12345); in testLocalHost() 43 s = addr.getHostString(); in testLocalHost()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | Net.java | 108 InetAddress addr = isa.getAddress(); in checkAddress() local 109 if (!(addr instanceof Inet4Address || addr instanceof Inet6Address)) in checkAddress() 178 static InetSocketAddress getRevealedLocalAddress(InetSocketAddress addr) { in getRevealedLocalAddress() argument 180 if (addr == null || sm == null) in getRevealedLocalAddress() 181 return addr; in getRevealedLocalAddress() 184 sm.checkConnect(addr.getAddress().getHostAddress(), -1); in getRevealedLocalAddress() 188 addr = getLoopbackAddress(addr.getPort()); in getRevealedLocalAddress() 190 return addr; in getRevealedLocalAddress() 193 static String getRevealedLocalAddressAsString(InetSocketAddress addr) { in getRevealedLocalAddressAsString() argument 194 return System.getSecurityManager() == null ? addr.toString() : in getRevealedLocalAddressAsString() [all …]
|
/libcore/ojluni/src/test/java/net/DatagramSocket/ |
D | ReuseAddressTest.java | 116 InetSocketAddress addr = createSocketAddress(0); in DatagramSocket0030() local 122 ms1.bind(addr); in DatagramSocket0030() 124 fail("cannot bind first socket to " + addr in DatagramSocket0030() 128 addr = createSocketAddress(ms1.getLocalPort()); in DatagramSocket0030() 133 ms2.bind(addr); in DatagramSocket0030() 135 fail("cannot bind second socket to " + addr in DatagramSocket0030() 139 if (ms1.getLocalPort() != addr.getPort() || !ms1.isBound() in DatagramSocket0030() 140 || ms2.getLocalPort() != addr.getPort() || !ms2.isBound()) { in DatagramSocket0030() 141 fail("bind() fails with: " + addr); in DatagramSocket0030() 169 InetSocketAddress addr = createSocketAddress(0); in DatagramSocket0031() local [all …]
|
/libcore/ojluni/src/main/native/ |
D | Inflater.c | 94 Inflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, in Inflater_setDictionary() argument 101 res = inflateSetDictionary(jlong_to_ptr(addr), buf + off, len); in Inflater_setDictionary() 108 JNU_ThrowIllegalArgumentException(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Inflater_setDictionary() 111 JNU_ThrowInternalError(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Inflater_setDictionary() 117 Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, in Inflater_inflateBytes() argument 120 z_stream *strm = jlong_to_ptr(addr); in Inflater_inflateBytes() 181 Inflater_getAdler(JNIEnv *env, jclass cls, jlong addr) in Inflater_getAdler() argument 183 return ((z_stream *)jlong_to_ptr(addr))->adler; in Inflater_getAdler() 187 Inflater_reset(JNIEnv *env, jclass cls, jlong addr) in Inflater_reset() argument 189 if (inflateReset(jlong_to_ptr(addr)) != Z_OK) { in Inflater_reset() [all …]
|
D | Deflater.c | 102 Deflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, in Deflater_setDictionary() argument 110 res = deflateSetDictionary((z_stream *)jlong_to_ptr(addr), buf + off, len); in Deflater_setDictionary() 119 JNU_ThrowInternalError(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Deflater_setDictionary() 125 Deflater_deflateBytes(JNIEnv *env, jobject this, jlong addr, in Deflater_deflateBytes() argument 128 z_stream *strm = jlong_to_ptr(addr); in Deflater_deflateBytes() 220 Deflater_getAdler(JNIEnv *env, jclass cls, jlong addr) in Deflater_getAdler() argument 222 return ((z_stream *)jlong_to_ptr(addr))->adler; in Deflater_getAdler() 226 Deflater_reset(JNIEnv *env, jclass cls, jlong addr) in Deflater_reset() argument 228 if (deflateReset((z_stream *)jlong_to_ptr(addr)) != Z_OK) { in Deflater_reset() 234 Deflater_end(JNIEnv *env, jclass cls, jlong addr) in Deflater_end() argument [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | Inet6Address.java | 39 Inet6Address(java.lang.String hostName, byte[] addr, int scope_id) { in Inet6Address() argument 43 Inet6Address(java.lang.String hostName, byte[] addr) { in Inet6Address() argument 47 Inet6Address(java.lang.String hostName, byte[] addr, java.net.NetworkInterface nif) in Inet6Address() argument 52 Inet6Address(java.lang.String hostName, byte[] addr, java.lang.String ifname) in Inet6Address() argument 58 java.lang.String host, byte[] addr, java.net.NetworkInterface nif) in getByAddress() argument 64 java.lang.String host, byte[] addr, int scope_id) throws java.net.UnknownHostException { in getByAddress() argument 68 private void initstr(java.lang.String hostName, byte[] addr, java.lang.String ifname) in initstr() argument 73 private void initif(java.lang.String hostName, byte[] addr, java.net.NetworkInterface nif) in initif() argument 240 void setAddr(byte[] addr) { in setAddr() argument 244 void init(byte[] addr, int scope_id) { in init() argument [all …]
|
D | Inet6AddressImpl.java | 46 public java.lang.String getHostByAddr(byte[] addr) throws java.net.UnknownHostException { in getHostByAddr() argument 55 java.net.InetAddress addr, int timeout, java.net.NetworkInterface netif, int ttl) in isReachable() argument 61 java.net.InetAddress addr, int timeout, java.net.InetAddress sourceAddr, int ttl) in tcpEcho() argument 67 java.net.InetAddress addr, int timeout, java.net.InetAddress sourceAddr, int ttl) in icmpEcho() argument 80 private java.lang.String getHostByAddr0(byte[] addr) throws java.net.UnknownHostException { in getHostByAddr0() argument
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | Inflater.java | 392 long addr = zsRef.address(); in end() local 394 if (addr != 0) { in end() 395 end(addr); in end() 428 private native static void setDictionary(long addr, byte[] b, int off, in setDictionary() argument 430 private native int inflateBytes(long addr, byte[] b, int off, int len) in inflateBytes() argument 432 private native static int getAdler(long addr); in getAdler() argument 433 private native static void reset(long addr); in reset() argument 434 private native static void end(long addr); in end() argument
|
D | Deflater.java | 560 long addr = zsRef.address(); in end() local 562 if (addr != 0) { in end() 563 end(addr); in end() 589 private native static void setDictionary(long addr, byte[] b, int off, int len); in setDictionary() argument 590 private native int deflateBytes(long addr, byte[] b, int off, int len, in deflateBytes() argument 592 private native static int getAdler(long addr); in getAdler() argument 593 private native static void reset(long addr); in reset() argument 594 private native static void end(long addr); in end() argument
|
/libcore/ojluni/src/main/java/sun/net/ |
D | SocksProxy.java | 37 private SocksProxy(SocketAddress addr, int version) { in SocksProxy() argument 38 super(Proxy.Type.SOCKS, addr); in SocksProxy() 42 public static SocksProxy create(SocketAddress addr, int version) { in create() argument 43 return new SocksProxy(addr, version); in create()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | AuthenticatorTest.java | 84 final InetAddress addr = InetAddress.getByName("localhost"); in testRequestPasswordAuthentication() local 98 addr, port, protocol, prompt, scheme); in testRequestPasswordAuthentication() 105 assertEquals(addr, auth.getAddr()); in testRequestPasswordAuthentication() 112 host, addr, port, protocol, prompt, scheme); in testRequestPasswordAuthentication() 120 assertEquals(addr, auth.getAddr()); in testRequestPasswordAuthentication() 130 final InetAddress addr = InetAddress.getByName("localhost"); in testRequestPasswordAuthenticationWithNullAuthenticator() local 138 addr, port, protocol, prompt, scheme)); in testRequestPasswordAuthenticationWithNullAuthenticator() 141 host, addr, port, protocol, prompt, scheme)); in testRequestPasswordAuthenticationWithNullAuthenticator()
|
/libcore/ojluni/annotations/hiddenapi/java/util/regex/ |
D | Matcher.java | 205 private static native boolean findImpl(long addr, int startIndex, int[] offsets); in findImpl() argument 207 private static native boolean findNextImpl(long addr, int[] offsets); in findNextImpl() argument 211 private static native int groupCountImpl(long addr); in groupCountImpl() argument 213 private static native boolean hitEndImpl(long addr); in hitEndImpl() argument 215 private static native boolean lookingAtImpl(long addr, int[] offsets); in lookingAtImpl() argument 217 private static native boolean matchesImpl(long addr, int[] offsets); in matchesImpl() argument 223 private static native boolean requireEndImpl(long addr); in requireEndImpl() argument 225 private static native void setInputImpl(long addr, java.lang.String s, int start, int end); in setInputImpl() argument 227 private static native void useAnchoringBoundsImpl(long addr, boolean value); in useAnchoringBoundsImpl() argument 229 private static native void useTransparentBoundsImpl(long addr, boolean value); in useTransparentBoundsImpl() argument
|
/libcore/ojluni/src/test/java/net/InetAddress/ |
D | IsReachable.java | 40 InetAddress addr = InetAddress.getByName("localhost"); in testIsReachable() local 41 if (!addr.isReachable(10000)) in testIsReachable() 43 NetworkInterface inf = NetworkInterface.getByInetAddress(addr); in testIsReachable() 45 if (!addr.isReachable(inf, 20, 10000)) in testIsReachable()
|
D | IsReachableViaLoopbackTest.java | 42 InetAddress addr = InetAddress.getByName("localhost"); in testReachableViaLoopback() local 46 if (!addr.isReachable(10000)) in testReachableViaLoopback() 48 NetworkInterface inf = NetworkInterface.getByInetAddress(addr); in testReachableViaLoopback() 50 if (!addr.isReachable(inf, 20, 10000)) { in testReachableViaLoopback()
|
/libcore/ojluni/src/test/java/net/UnixDomainSocketAddress/ |
D | UnixDomainSocketAddressSerializationTest.java | 49 private static final UnixDomainSocketAddress addr = field in UnixDomainSocketAddressSerializationTest 54 assertTrue(addr instanceof Serializable); in test() 56 byte[] serialized = serialize(addr); in test() 61 assertEquals(deserialized.getPath(), addr.getPath()); in test() 62 assertEquals(deserialized.toString(), addr.toString()); in test() 63 assertEquals(deserialized.hashCode(), addr.hashCode()); in test() 64 assertEquals(deserialized, addr); in test()
|
/libcore/ojluni/annotations/hiddenapi/java/util/zip/ |
D | Inflater.java | 124 private static native void setDictionary(long addr, byte[] b, int off, int len); in setDictionary() argument 126 private native int inflateBytes(long addr, byte[] b, int off, int len) in inflateBytes() argument 129 private static native int getAdler(long addr); in getAdler() argument 131 private static native void reset(long addr); in reset() argument 133 private static native void end(long addr); in end() argument
|