/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 …]
|
D | DatagramSocketImplTest.java | 67 protected void bind(int port, InetAddress addr) throws SocketException { in bind() argument 96 protected void join(InetAddress addr) throws IOException { in join() argument 101 protected void joinGroup(SocketAddress addr, NetworkInterface netInterface) in joinGroup() argument 107 protected void leave(InetAddress addr) throws IOException { in leave() argument 112 protected void leaveGroup(SocketAddress addr, NetworkInterface netInterface) in leaveGroup() argument
|
D | InetAddressTest.java | 63 byte[] addr = ia.getAddress(); in test_getAddress() 64 for (int i = 0; i < addr.length; i++) in test_getAddress() 65 assertTrue("Incorrect address returned", caddr[i] == addr[i]); in test_getAddress() 108 for (InetAddress addr : list) { in test_getAllByNameLjava_lang_String() 110 addr.getClass().equals(InetAddress.class)); in test_getAllByNameLjava_lang_String() 257 InetAddress addr = InetAddress.getByAddress(addressStr, ipAddress); in test_getByAddressLjava_lang_String$B() local 258 addr = InetAddress.getByAddress(ipAddress); in test_getByAddressLjava_lang_String$B() 268 InetAddress addr = InetAddress.getByAddress(addressStr, ipAddress2); in test_getByAddressLjava_lang_String$B() local 269 addr = InetAddress.getByAddress(ipAddress); in test_getByAddressLjava_lang_String$B()
|
/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 | 114 Inet4Address(String hostName, byte addr[]) { in Inet4Address() argument 117 if (addr != null) { in Inet4Address() 118 if (addr.length == INADDRSZ) { in Inet4Address() 119 int address = addr[3] & 0xFF; in Inet4Address() 120 address |= ((addr[2] << 8) & 0xFF00); in Inet4Address() 121 address |= ((addr[1] << 16) & 0xFF0000); in Inet4Address() 122 address |= ((addr[0] << 24) & 0xFF000000); in Inet4Address() 316 byte[] addr = new byte[INADDRSZ]; in getAddress() 318 addr[0] = (byte) ((address >>> 24) & 0xFF); in getAddress() 319 addr[1] = (byte) ((address >>> 16) & 0xFF); in getAddress() [all …]
|
D | Inet6Address.java | 236 void setAddr(byte addr[]) { in setAddr() argument 237 if (addr.length == INADDRSZ) { // normal IPv6 address in setAddr() 238 System.arraycopy(addr, 0, ipaddress, 0, INADDRSZ); in setAddr() 242 void init(byte addr[], int scope_id) { in init() argument 243 setAddr(addr); in init() 252 void init(byte addr[], NetworkInterface nif) in init() argument 255 setAddr(addr); in init() 391 Inet6Address(String hostName, byte addr[], int scope_id) { in Inet6Address() argument 394 holder6.init(addr, scope_id); in Inet6Address() 397 Inet6Address(String hostName, byte addr[]) { in Inet6Address() argument [all …]
|
D | InetAddress.java | 264 public String getHostByAddr(byte[] addr) 266 return impl.getHostByAddr(addr); 565 private static String getHostFromNameService(InetAddress addr) { in getHostFromNameService() argument 569 host = nameService.getHostByAddr(addr.getAddress()); in getHostFromNameService() 580 ok = addr.equals(arr[i]); in getHostFromNameService() 586 host = addr.getHostAddress(); in getHostFromNameService() 590 host = addr.getHostAddress(); in getHostFromNameService() 684 public static InetAddress getByAddress(String host, byte[] addr) throws UnknownHostException { in getByAddress() argument 685 return getByAddress(host, addr, -1 /* scopeId */); in getByAddress() 689 private static InetAddress getByAddress(String host, byte[] addr, int scopeId) in getByAddress() argument [all …]
|
D | Inet6AddressImpl.java | 146 public String getHostByAddr(byte[] addr) throws UnknownHostException { in getHostByAddr() argument 149 return getHostByAddr0(addr); in getHostByAddr() 158 …public boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, int ttl) throws … in isReachable() argument 172 if (inetaddr.getClass().isInstance(addr)) { in isReachable() 186 if (icmpEcho(addr, timeout, sourceAddr, ttl)) { in isReachable() 191 return tcpEcho(addr, timeout, sourceAddr, ttl); in isReachable() 194 private boolean tcpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in tcpEcho() argument 205 IoBridge.connect(fd, addr, 7 /* Echo-protocol port */, timeout); in tcpEcho() 218 protected boolean icmpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in icmpEcho() argument 223 boolean isIPv4 = addr instanceof Inet4Address; in icmpEcho() [all …]
|
D | Authenticator.java | 161 InetAddress addr, in requestPasswordAuthentication() argument 180 a.requestingSite = addr; in requestPasswordAuthentication() 223 InetAddress addr, in requestPasswordAuthentication() argument 243 a.requestingSite = addr; in requestPasswordAuthentication() 288 InetAddress addr, in requestPasswordAuthentication() argument 310 a.requestingSite = addr; in requestPasswordAuthentication()
|
D | DatagramSocket.java | 391 public synchronized void bind(SocketAddress addr) throws SocketException { in bind() argument 396 if (addr == null) in bind() 397 addr = new InetSocketAddress(0); in bind() 398 if (!(addr instanceof InetSocketAddress)) in bind() 400 InetSocketAddress epoint = (InetSocketAddress) addr; in bind() 419 void checkAddress (InetAddress addr, String op) { in checkAddress() argument 420 if (addr == null) { in checkAddress() 423 if (!(addr instanceof Inet4Address || addr instanceof Inet6Address)) { in checkAddress() 509 public void connect(SocketAddress addr) throws SocketException { in connect() argument 510 if (addr == null) in connect() [all …]
|
D | DatagramPacket.java | 331 InetSocketAddress addr = (InetSocketAddress) address; in setSocketAddress() local 332 if (addr.isUnresolved()) in setSocketAddress() 334 setAddress(addr.getAddress()); in setSocketAddress() 335 setPort(addr.getPort()); in setSocketAddress()
|
D | InetAddressImpl.java | 46 String getHostByAddr(byte[] addr) throws UnknownHostException; in getHostByAddr() argument 66 boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, in isReachable() argument
|
D | Socket.java | 602 InetAddress addr = epoint.getAddress (); in connect() local 604 checkAddress(addr, "connect"); in connect() 611 security.checkConnect(addr.getHostAddress(), port); in connect() 619 impl.connect(addr.getHostName(), port); in connect() 621 impl.connect(addr, port); in connect() 664 InetAddress addr = epoint.getAddress(); in bind() local 666 checkAddress (addr, "bind"); in bind() 671 getImpl().bind (addr, port); in bind() 675 private void checkAddress (InetAddress addr, String op) { in checkAddress() argument 676 if (addr == null) { in checkAddress() [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/luni/src/main/native/ |
D | java_util_regex_Matcher.cpp | 167 static jint Matcher_findImpl(JNIEnv* env, jclass, jlong addr, jint startIndex, jintArray offsets) { in Matcher_findImpl() argument 168 MatcherState* state = toMatcherState(addr); in Matcher_findImpl() 176 static jint Matcher_findNextImpl(JNIEnv* env, jclass, jlong addr, jintArray offsets) { in Matcher_findNextImpl() argument 177 MatcherState* state = toMatcherState(addr); in Matcher_findNextImpl() 185 static jint Matcher_groupCountImpl(JNIEnv*, jclass, jlong addr) { in Matcher_groupCountImpl() argument 186 MatcherState* state = toMatcherState(addr); in Matcher_groupCountImpl() 190 static jint Matcher_hitEndImpl(JNIEnv*, jclass, jlong addr) { in Matcher_hitEndImpl() argument 191 MatcherState* state = toMatcherState(addr); in Matcher_hitEndImpl() 195 static jint Matcher_lookingAtImpl(JNIEnv* env, jclass, jlong addr, jintArray offsets) { in Matcher_lookingAtImpl() argument 196 MatcherState* state = toMatcherState(addr); in Matcher_lookingAtImpl() [all …]
|
/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/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/ojluni/src/main/native/ |
D | java_util_zip_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 | java_util_zip_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 …]
|
D | net_util.c | 132 jobject holder, addr; in getInet6Address_ipaddress() local 138 addr = (*env)->GetObjectField(env, holder, ia6_ipaddressID); in getInet6Address_ipaddress() 139 CHECK_NULL_RETURN(addr, JNI_FALSE); in getInet6Address_ipaddress() 140 (*env)->GetByteArrayRegion(env, addr, 0, 16, (jbyte *)dest); in getInet6Address_ipaddress() 146 jbyteArray addr; in setInet6Address_ipaddress() local 151 addr = (jbyteArray)(*env)->GetObjectField(env, holder, ia6_ipaddressID); in setInet6Address_ipaddress() 152 if (addr == NULL) { in setInet6Address_ipaddress() 153 addr = (*env)->NewByteArray(env, 16); in setInet6Address_ipaddress() 154 CHECK_NULL_RETURN(addr, JNI_FALSE); in setInet6Address_ipaddress() 155 (*env)->SetObjectField(env, holder, ia6_ipaddressID, addr); in setInet6Address_ipaddress() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | Inflater.java | 375 long addr = zsRef.address(); in end() local 377 if (addr != 0) { in end() 378 end(addr); in end() 412 private native static void setDictionary(long addr, byte[] b, int off, in setDictionary() argument 414 private native int inflateBytes(long addr, byte[] b, int off, int len) in inflateBytes() argument 416 private native static int getAdler(long addr); in getAdler() argument 417 private native static void reset(long addr); in reset() argument 418 private native static void end(long addr); in end() argument
|
D | Deflater.java | 544 long addr = zsRef.address(); in end() local 546 if (addr != 0) { in end() 547 end(addr); in end() 573 private native static void setDictionary(long addr, byte[] b, int off, int len); in setDictionary() argument 574 private native int deflateBytes(long addr, byte[] b, int off, int len, in deflateBytes() argument 576 private native static int getAdler(long addr); in getAdler() argument 577 private native static void reset(long addr); in reset() argument 578 private native static void end(long addr); in end() argument
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldAuthenticatorTest.java | 29 InetAddress addr = InetAddress.getLocalHost(); in test_setDefault() local 31 addr, 8080, "http", "promt", "HTTP"); in test_setDefault() 37 addr = InetAddress.getLocalHost(); in test_setDefault() 38 pa = Authenticator.requestPasswordAuthentication(addr, 80, "http", "promt", "HTTP"); in test_setDefault()
|
/libcore/ojluni/src/main/java/java/util/regex/ |
D | Matcher.java | 1192 private static native boolean findImpl(long addr, int startIndex, int[] offsets); in findImpl() argument 1193 private static native boolean findNextImpl(long addr, int[] offsets); in findNextImpl() argument 1195 private static native int groupCountImpl(long addr); in groupCountImpl() argument 1196 private static native boolean hitEndImpl(long addr); in hitEndImpl() argument 1197 private static native boolean lookingAtImpl(long addr, int[] offsets); in lookingAtImpl() argument 1198 private static native boolean matchesImpl(long addr, int[] offsets); in matchesImpl() argument 1201 private static native boolean requireEndImpl(long addr); in requireEndImpl() argument 1202 private static native void setInputImpl(long addr, String s, int start, int end); in setInputImpl() argument 1203 private static native void useAnchoringBoundsImpl(long addr, boolean value); in useAnchoringBoundsImpl() argument 1204 private static native void useTransparentBoundsImpl(long addr, boolean value); in useTransparentBoundsImpl() argument
|