Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 75) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DInet6AddressTest.java35 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 …]
DInet4AddressTest.java40 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 …]
DDatagramSocketImplTest.java67 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
/libcore/ojluni/src/main/java/java/net/
DInetSocketAddress.java61 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 …]
DInet4Address.java139 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()
343 byte[] addr = new byte[INADDRSZ]; in getAddress()
345 addr[0] = (byte) ((address >>> 24) & 0xFF); in getAddress()
346 addr[1] = (byte) ((address >>> 16) & 0xFF); in getAddress()
[all …]
DInet6Address.java254 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 …]
DInetAddress.java284 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 …]
DInet6AddressImpl.java161 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 …]
DAuthenticator.java161 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()
DDatagramSocket.java392 public synchronized void bind(SocketAddress addr) throws SocketException { in bind() argument
397 if (addr == null) in bind()
398 addr = new InetSocketAddress(0); in bind()
399 if (!(addr instanceof InetSocketAddress)) in bind()
401 InetSocketAddress epoint = (InetSocketAddress) addr; in bind()
420 void checkAddress (InetAddress addr, String op) { in checkAddress() argument
421 if (addr == null) { in checkAddress()
424 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 …]
DDatagramPacket.java340 InetSocketAddress addr = (InetSocketAddress) address; in setSocketAddress() local
341 if (addr.isUnresolved()) in setSocketAddress()
343 setAddress(addr.getAddress()); in setSocketAddress()
344 setPort(addr.getPort()); in setSocketAddress()
/libcore/ojluni/src/main/java/sun/net/util/
DIPAddressUtil.java267 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/main/java/sun/nio/ch/
DNet.java108 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/native/
DInflater.c94 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 …]
DDeflater.c102 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 …]
Dnet_util.c132 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/annotations/hiddenapi/java/net/
DInet6Address.java39 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 …]
DInet6AddressImpl.java46 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/sun/net/
DSocksProxy.java37 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/java/java/util/zip/
DInflater.java392 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
DDeflater.java560 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/annotations/hiddenapi/java/util/regex/
DMatcher.java205 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/annotations/hiddenapi/java/util/zip/
DInflater.java124 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
DDeflater.java131 private static native void setDictionary(long addr, byte[] b, int off, int len); in setDictionary() argument
133 private native int deflateBytes(long addr, byte[] b, int off, int len, int flush); in deflateBytes() argument
135 private static native int getAdler(long addr); in getAdler() argument
137 private static native void reset(long addr); in reset() argument
139 private static native void end(long addr); in end() argument
/libcore/luni/src/test/java/libcore/java/net/
DOldAuthenticatorTest.java29 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()

123