Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 60) 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.java60 protected void bind(int port, InetAddress addr) throws SocketException { in bind() argument
89 protected void join(InetAddress addr) throws IOException { in join() argument
94 protected void joinGroup(SocketAddress addr, NetworkInterface netInterface) in joinGroup() argument
100 protected void leave(InetAddress addr) throws IOException { in leave() argument
105 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 …]
DInet6Address.java223 Inet6Address(String hostName, byte addr[], int scope_id) { in Inet6Address() argument
225 if (addr.length == INADDRSZ) { // normal IPv6 address in Inet6Address()
227 ipaddress = addr.clone(); in Inet6Address()
236 Inet6Address(String hostName, byte addr[]) { in Inet6Address() argument
238 initif (hostName, addr, null); in Inet6Address()
242 Inet6Address (String hostName, byte addr[], NetworkInterface nif) throws UnknownHostException { in Inet6Address() argument
243 initif (hostName, addr, nif); in Inet6Address()
246 Inet6Address (String hostName, byte addr[], String ifname) throws UnknownHostException { in Inet6Address() argument
247 initstr (hostName, addr, ifname); in Inet6Address()
269 public static Inet6Address getByAddress(String host, byte[] addr, NetworkInterface nif) in getByAddress() argument
[all …]
DInet4Address.java116 Inet4Address(String hostName, byte addr[]) { in Inet4Address() argument
119 if (addr != null) { in Inet4Address()
120 if (addr.length == INADDRSZ) { in Inet4Address()
121 int address = addr[3] & 0xFF; in Inet4Address()
122 address |= ((addr[2] << 8) & 0xFF00); in Inet4Address()
123 address |= ((addr[1] << 16) & 0xFF0000); in Inet4Address()
124 address |= ((addr[0] << 24) & 0xFF000000); in Inet4Address()
319 byte[] addr = new byte[INADDRSZ]; in getAddress()
321 addr[0] = (byte) ((address >>> 24) & 0xFF); in getAddress()
322 addr[1] = (byte) ((address >>> 16) & 0xFF); in getAddress()
[all …]
DInetAddress.java237 public String getHostByAddr(byte[] addr)
239 return impl.getHostByAddr(addr);
530 private static String getHostFromNameService(InetAddress addr) { in getHostFromNameService() argument
534 host = nameService.getHostByAddr(addr.getAddress()); in getHostFromNameService()
545 ok = addr.equals(arr[i]); in getHostFromNameService()
551 host = addr.getHostAddress(); in getHostFromNameService()
555 host = addr.getHostAddress(); in getHostFromNameService()
649 public static InetAddress getByAddress(String host, byte[] addr) throws UnknownHostException { in getByAddress() argument
650 return getByAddress(host, addr, -1 /* scopeId */); in getByAddress()
654 private static InetAddress getByAddress(String host, byte[] addr, int scopeId) in getByAddress() argument
[all …]
DInet6AddressImpl.java130 public String getHostByAddr(byte[] addr) throws UnknownHostException { in getHostByAddr() argument
133 return getHostByAddr0(addr); in getHostByAddr()
142 …public boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, int ttl) throws … in isReachable() argument
157 if (inetaddr.getClass().isInstance(addr)) { in isReachable()
171 if (addr instanceof Inet6Address) in isReachable()
172 scope = ((Inet6Address) addr).getScopeId(); in isReachable()
180 return isReachable0(addr.getAddress(), scope, timeout, ifaddr, ttl, netif_scope); in isReachable()
218 private native String getHostByAddr0(byte[] addr) throws UnknownHostException; in getHostByAddr0() argument
219 …private native boolean isReachable0(byte[] addr, int scope, int timeout, byte[] inf, int ttl, int … in isReachable0() argument
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.java370 public synchronized void bind(SocketAddress addr) throws SocketException { in bind() argument
375 if (addr == null) in bind()
376 addr = new InetSocketAddress(0); in bind()
377 if (!(addr instanceof InetSocketAddress)) in bind()
379 InetSocketAddress epoint = (InetSocketAddress) addr; in bind()
398 void checkAddress (InetAddress addr, String op) { in checkAddress() argument
399 if (addr == null) { in checkAddress()
402 if (!(addr instanceof Inet4Address || addr instanceof Inet6Address)) { in checkAddress()
488 public void connect(SocketAddress addr) throws SocketException { in connect() argument
489 if (addr == null) in connect()
[all …]
DInetAddressImpl.java46 String getHostByAddr(byte[] addr) throws UnknownHostException; in getHostByAddr() argument
66 boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, in isReachable() argument
DDatagramPacket.java320 InetSocketAddress addr = (InetSocketAddress) address; in setSocketAddress() local
321 if (addr.isUnresolved()) in setSocketAddress()
323 setAddress(addr.getAddress()); in setSocketAddress()
324 setPort(addr.getPort()); in setSocketAddress()
/libcore/ojluni/src/main/java/sun/net/util/
DIPAddressUtil.java269 public static byte[] convertFromIPv4MappedAddress(byte[] addr) { in convertFromIPv4MappedAddress() argument
270 if (isIPv4MappedAddress(addr)) { in convertFromIPv4MappedAddress()
272 System.arraycopy(addr, 12, newAddr, 0, INADDR4SZ); in convertFromIPv4MappedAddress()
285 private static boolean isIPv4MappedAddress(byte[] addr) { in isIPv4MappedAddress() argument
286 if (addr.length < INADDR16SZ) { in isIPv4MappedAddress()
289 if ((addr[0] == 0x00) && (addr[1] == 0x00) && in isIPv4MappedAddress()
290 (addr[2] == 0x00) && (addr[3] == 0x00) && in isIPv4MappedAddress()
291 (addr[4] == 0x00) && (addr[5] == 0x00) && in isIPv4MappedAddress()
292 (addr[6] == 0x00) && (addr[7] == 0x00) && in isIPv4MappedAddress()
293 (addr[8] == 0x00) && (addr[9] == 0x00) && in isIPv4MappedAddress()
[all …]
/libcore/luni/src/main/native/
Djava_util_regex_Matcher.cpp133 static jint Matcher_findImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jint startIndex, ji… in Matcher_findImpl() argument
134 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_findImpl()
142 static jint Matcher_findNextImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jintArray offse… in Matcher_findNextImpl() argument
143 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_findNextImpl()
154 static jint Matcher_groupCountImpl(JNIEnv* env, jclass, jlong addr) { in Matcher_groupCountImpl() argument
155 MatcherAccessor matcher(env, addr); in Matcher_groupCountImpl()
159 static jint Matcher_hitEndImpl(JNIEnv* env, jclass, jlong addr) { in Matcher_hitEndImpl() argument
160 MatcherAccessor matcher(env, addr); in Matcher_hitEndImpl()
164 static jint Matcher_lookingAtImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jintArray offs… in Matcher_lookingAtImpl() argument
165 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_lookingAtImpl()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DNet.java135 InetAddress addr = isa.getAddress(); in checkAddress() local
136 if (!(addr instanceof Inet4Address || addr instanceof Inet6Address)) in checkAddress()
205 static InetSocketAddress getRevealedLocalAddress(InetSocketAddress addr) { in getRevealedLocalAddress() argument
207 if (addr == null || sm == null) in getRevealedLocalAddress()
208 return addr; in getRevealedLocalAddress()
213 sm.checkConnect(addr.getAddress().getHostAddress(), -1); in getRevealedLocalAddress()
217 addr = getLoopbackAddress(addr.getPort()); in getRevealedLocalAddress()
220 return addr; in getRevealedLocalAddress()
223 static String getRevealedLocalAddressAsString(InetSocketAddress addr) { in getRevealedLocalAddressAsString() argument
225 addr = getLoopbackAddress(addr.getPort()); in getRevealedLocalAddressAsString()
[all …]
/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/native/
DInet4AddressImpl.c195 jint addr; in Inet4AddressImpl_isReachable0() local
213 addr = ((caddr[0]<<24) & 0xff000000); in Inet4AddressImpl_isReachable0()
214 addr |= ((caddr[1] <<16) & 0xff0000); in Inet4AddressImpl_isReachable0()
215 addr |= ((caddr[2] <<8) & 0xff00); in Inet4AddressImpl_isReachable0()
216 addr |= (caddr[3] & 0xff); in Inet4AddressImpl_isReachable0()
217 addr = htonl(addr); in Inet4AddressImpl_isReachable0()
218 him.sin_addr.s_addr = addr; in Inet4AddressImpl_isReachable0()
228 addr = ((caddr[0]<<24) & 0xff000000); in Inet4AddressImpl_isReachable0()
229 addr |= ((caddr[1] <<16) & 0xff0000); in Inet4AddressImpl_isReachable0()
230 addr |= ((caddr[2] <<8) & 0xff00); in Inet4AddressImpl_isReachable0()
[all …]
Djava_util_zip_Inflater.c87 Inflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, in Inflater_setDictionary() argument
94 res = inflateSetDictionary(jlong_to_ptr(addr), buf + off, len); in Inflater_setDictionary()
101 JNU_ThrowIllegalArgumentException(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Inflater_setDictionary()
104 JNU_ThrowInternalError(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Inflater_setDictionary()
110 Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, in Inflater_inflateBytes() argument
113 z_stream *strm = jlong_to_ptr(addr); in Inflater_inflateBytes()
174 Inflater_getAdler(JNIEnv *env, jclass cls, jlong addr) in Inflater_getAdler() argument
176 return ((z_stream *)jlong_to_ptr(addr))->adler; in Inflater_getAdler()
180 Inflater_reset(JNIEnv *env, jclass cls, jlong addr) in Inflater_reset() argument
182 if (inflateReset(jlong_to_ptr(addr)) != Z_OK) { in Inflater_reset()
[all …]
Djava_util_zip_Deflater.c97 Deflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, in Deflater_setDictionary() argument
105 res = deflateSetDictionary((z_stream *)jlong_to_ptr(addr), buf + off, len); in Deflater_setDictionary()
114 JNU_ThrowInternalError(env, ((z_stream *)jlong_to_ptr(addr))->msg); in Deflater_setDictionary()
120 Deflater_deflateBytes(JNIEnv *env, jobject this, jlong addr, in Deflater_deflateBytes() argument
123 z_stream *strm = jlong_to_ptr(addr); in Deflater_deflateBytes()
215 Deflater_getAdler(JNIEnv *env, jclass cls, jlong addr) in Deflater_getAdler() argument
217 return ((z_stream *)jlong_to_ptr(addr))->adler; in Deflater_getAdler()
221 Deflater_reset(JNIEnv *env, jclass cls, jlong addr) in Deflater_reset() argument
223 if (deflateReset((z_stream *)jlong_to_ptr(addr)) != Z_OK) { in Deflater_reset()
229 Deflater_end(JNIEnv *env, jclass cls, jlong addr) in Deflater_end() argument
[all …]
DNetworkInterface.c57 struct sockaddr *addr; member
71 netaddr *addr; member
267 netaddr *addrP = curr->addr; in NetworkInterface_getByInetAddress0()
276 int address1 = htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr); in NetworkInterface_getByInetAddress0()
286 jbyte *bytes = (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr); in NetworkInterface_getByInetAddress0()
533 addrP = ifs->addr; in createNetworkInterface()
551 addrP = ifs->addr; in createNetworkInterface()
561 setInetAddress_addr(env, iaObj, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr)); in createNetworkInterface()
588 (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); in createNetworkInterface()
590 scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id; in createNetworkInterface()
[all …]
/libcore/ojluni/src/main/java/java/util/zip/
DInflater.java373 long addr = zsRef.address(); in end() local
375 if (addr != 0) { in end()
376 end(addr); in end()
407 private native static void setDictionary(long addr, byte[] b, int off, in setDictionary() argument
409 private native int inflateBytes(long addr, byte[] b, int off, int len) in inflateBytes() argument
411 private native static int getAdler(long addr); in getAdler() argument
412 private native static void reset(long addr); in reset() argument
413 private native static void end(long addr); in end() argument
DDeflater.java528 long addr = zsRef.address(); in end() local
530 if (addr != 0) { in end()
531 end(addr); in end()
555 private native static void setDictionary(long addr, byte[] b, int off, int len); in setDictionary() argument
556 private native int deflateBytes(long addr, byte[] b, int off, int len, in deflateBytes() argument
558 private native static int getAdler(long addr); in getAdler() argument
559 private native static void reset(long addr); in reset() argument
560 private native static void end(long addr); in end() argument
/libcore/ojluni/src/main/java/sun/net/www/protocol/http/
DHttpCallerInfo.java50 final public InetAddress addr; field in HttpCallerInfo
62 this.addr = old.addr; in HttpCallerInfo()
88 addr = ia; in HttpCallerInfo()
103 addr = null; in HttpCallerInfo()
/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()
/libcore/ojluni/src/main/java/java/util/regex/
DMatcher.java1097 private static native boolean findImpl(long addr, String s, int startIndex, int[] offsets); in findImpl() argument
1098 private static native boolean findNextImpl(long addr, String s, int[] offsets); in findNextImpl() argument
1100 private static native int groupCountImpl(long addr); in groupCountImpl() argument
1101 private static native boolean hitEndImpl(long addr); in hitEndImpl() argument
1102 private static native boolean lookingAtImpl(long addr, String s, int[] offsets); in lookingAtImpl() argument
1103 private static native boolean matchesImpl(long addr, String s, int[] offsets); in matchesImpl() argument
1106 private static native boolean requireEndImpl(long addr); in requireEndImpl() argument
1107 private static native void setInputImpl(long addr, String s, int start, int end); in setInputImpl() argument
1108 private static native void useAnchoringBoundsImpl(long addr, boolean value); in useAnchoringBoundsImpl() argument
1109 private static native void useTransparentBoundsImpl(long addr, boolean value); in useTransparentBoundsImpl() argument

123