Home
last modified time | relevance | path

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

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DInet6AddressTest.java34 InetAddress addr = null; in test_isMulticastAddress() local
43 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
44 assertTrue("Multicast address " + addrName + " not detected.", addr in test_isMulticastAddress()
48 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
50 + " reporting as a multicast address.", !addr in test_isMulticastAddress()
61 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
63 + " reported incorrectly as multicast.", !addr in test_isMulticastAddress()
67 addr = InetAddress.getByName(addrName); in test_isMulticastAddress()
69 + " reported incorrectly as multicast.", !addr in test_isMulticastAddress()
80 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
DInetAddressTest.java63 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()
274 InetAddress addr = InetAddress.getByAddress(addressStr, ipAddress); in test_getByAddressLjava_lang_String$B() local
275 addr = InetAddress.getByAddress(ipAddress); in test_getByAddressLjava_lang_String$B()
285 InetAddress addr = InetAddress.getByAddress(addressStr, ipAddress2); in test_getByAddressLjava_lang_String$B() local
286 addr = InetAddress.getByAddress(ipAddress); in test_getByAddressLjava_lang_String$B()
DInterfaceAddressTest.java98 InetAddress addr = interfaceAddr.getAddress(); in test_getBroadcast() local
101 if (addr instanceof Inet4Address) { in test_getBroadcast()
103 } else if (addr instanceof Inet6Address) { in test_getBroadcast()
DMulticastSocketTest.java787 InetSocketAddress addr = new InetSocketAddress("0.0.0.0", 0); in test_ConstructorLjava_net_SocketAddress() local
788 MulticastSocket s = new MulticastSocket(addr); in test_ConstructorLjava_net_SocketAddress()
865 InetSocketAddress addr = new InetSocketAddress(Inet4Address.getLocalHost(), 0); in test_setReuseAddressZ() local
866 theSocket1.bind(addr); in test_setReuseAddressZ()
867 addr = new InetSocketAddress(Inet4Address.getLocalHost(), theSocket1.getLocalPort()); in test_setReuseAddressZ()
869 theSocket2.bind(addr); in test_setReuseAddressZ()
882 addr = new InetSocketAddress(Inet4Address.getLocalHost(), 0); in test_setReuseAddressZ()
883 theSocket1.bind(addr); in test_setReuseAddressZ()
884 addr = new InetSocketAddress(Inet4Address.getLocalHost(), theSocket1.getLocalPort()); in test_setReuseAddressZ()
885 theSocket2.bind(addr); in test_setReuseAddressZ()
[all …]
/libcore/luni/src/main/java/java/net/
DInetSocketAddress.java32 private final InetAddress addr; field in InetSocketAddress
41 this.addr = null; in InetSocketAddress()
73 this.addr = (address == null) ? Inet4Address.ANY : address; in InetSocketAddress()
102 InetAddress addr = null; in InetSocketAddress() local
105 addr = InetAddress.getByName(hostname); in InetSocketAddress()
110 this.addr = addr; in InetSocketAddress()
144 return addr; in getAddress()
153 return (addr != null) ? addr.getHostName() : hostname; in getHostName()
162 return (hostname != null) ? hostname : addr.getHostAddress(); in getHostString()
172 return addr == null; in isUnresolved()
[all …]
DDatagramSocketImpl.java57 protected abstract void bind(int port, InetAddress addr) throws SocketException; in bind() argument
126 protected abstract void join(InetAddress addr) throws IOException; in join() argument
142 protected abstract void joinGroup(SocketAddress addr, in joinGroup() argument
154 protected abstract void leave(InetAddress addr) throws IOException; in leave() argument
167 protected abstract void leaveGroup(SocketAddress addr, in leaveGroup() argument
DInet6Address.java85 public static Inet6Address getByAddress(String host, byte[] addr, int scope_id) in getByAddress() argument
87 if (addr == null || addr.length != 16) { in getByAddress()
88 throw new UnknownHostException("Not an IPv6 address: " + Arrays.toString(addr)); in getByAddress()
94 return new Inet6Address(addr, host, scope_id); in getByAddress()
115 public static Inet6Address getByAddress(String host, byte[] addr, in getByAddress() argument
118 Inet6Address address = Inet6Address.getByAddress(host, addr, 0); in getByAddress()
145 … throw new UnknownHostException("Scope id not found for address: " + Arrays.toString(addr)); in getByAddress()
DPlainDatagramSocketImpl.java127 public void join(InetAddress addr) throws IOException { in join() argument
128 setOption(IoBridge.JAVA_MCAST_JOIN_GROUP, makeGroupReq(addr, null)); in join()
132 public void joinGroup(SocketAddress addr, NetworkInterface netInterface) throws IOException { in joinGroup() argument
133 if (addr instanceof InetSocketAddress) { in joinGroup()
134 InetAddress groupAddr = ((InetSocketAddress) addr).getAddress(); in joinGroup()
140 public void leave(InetAddress addr) throws IOException { in leave() argument
141 setOption(IoBridge.JAVA_MCAST_LEAVE_GROUP, makeGroupReq(addr, null)); in leave()
145 public void leaveGroup(SocketAddress addr, NetworkInterface netInterface) throws IOException { in leaveGroup() argument
146 if (addr instanceof InetSocketAddress) { in leaveGroup()
147 InetAddress groupAddr = ((InetSocketAddress) addr).getAddress(); in leaveGroup()
DAuthenticator.java37 private InetAddress addr; field in Authenticator
74 return this.addr; in getRequestingSite()
131 thisAuthenticator.addr = rAddr; in requestPasswordAuthentication()
182 thisAuthenticator.addr = rAddr; in requestPasswordAuthentication()
237 thisAuthenticator.addr = rAddr; in requestPasswordAuthentication()
DDatagramSocket.java95 public DatagramSocket(int aPort, InetAddress addr) throws SocketException { in DatagramSocket() argument
97 createSocket(aPort, (addr == null) ? Inet4Address.ANY : addr); in DatagramSocket()
154 synchronized void createSocket(int aPort, InetAddress addr) throws SocketException { in createSocket() argument
159 impl.bind(aPort, addr); in createSocket()
467 InetAddress addr; in bind() local
470 addr = Inet4Address.ANY; in bind()
477 addr = inetAddr.getAddress(); in bind()
478 if (addr == null) { in bind()
484 impl.bind(localPort, addr); in bind()
DServerSocket.java100 InetAddress addr = (localAddress == null) ? Inet4Address.ANY : localAddress; in ServerSocket() local
105 impl.bind(addr, port); in ServerSocket()
316 InetAddress addr; in bind() local
319 addr = Inet4Address.ANY; in bind()
327 if ((addr = inetAddr.getAddress()) == null) { in bind()
335 impl.bind(addr, port); in bind()
DSocket.java272 public Socket(InetAddress addr, int port, boolean streaming) throws IOException { in Socket() argument
274 checkDestination(addr, port); in Socket()
275 startupSocket(addr, port, null, 0, streaming); in Socket()
580 InetAddress addr = localAddress == null ? Inet4Address.ANY : localAddress; in startupSocket() local
586 impl.bind(addr, localPort); in startupSocket()
772 InetAddress addr; in bind() local
775 addr = Inet4Address.ANY; in bind()
782 if ((addr = inetAddr.getAddress()) == null) { in bind()
790 impl.bind(addr, port); in bind()
863 InetAddress addr; in connect() local
[all …]
DPlainSocketImpl.java69 public PlainSocketImpl(FileDescriptor fd, int localport, InetAddress addr, int port) { in PlainSocketImpl() argument
72 this.address = addr; in PlainSocketImpl()
296 InetSocketAddress addr = (InetSocketAddress) proxy.address(); in socksGetServerPort() local
297 return addr.getPort(); in socksGetServerPort()
308 InetSocketAddress addr = (InetSocketAddress) proxy.address(); in socksGetServerAddress() local
309 proxyName = addr.getHostName(); in socksGetServerAddress()
311 proxyName = addr.getAddress().getHostAddress(); in socksGetServerAddress()
DDatagramPacket.java173 public synchronized void setAddress(InetAddress addr) { in setAddress() argument
174 address = addr; in setAddress()
/libcore/luni/src/main/native/
Djava_util_regex_Matcher.cpp124 static jint Matcher_findImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jint startIndex, ji… in Matcher_findImpl() argument
125 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_findImpl()
133 static jint Matcher_findNextImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jintArray offse… in Matcher_findNextImpl() argument
134 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_findNextImpl()
145 static jint Matcher_groupCountImpl(JNIEnv* env, jclass, jlong addr) { in Matcher_groupCountImpl() argument
146 MatcherAccessor matcher(env, addr); in Matcher_groupCountImpl()
150 static jint Matcher_hitEndImpl(JNIEnv* env, jclass, jlong addr) { in Matcher_hitEndImpl() argument
151 MatcherAccessor matcher(env, addr); in Matcher_hitEndImpl()
155 static jint Matcher_lookingAtImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jintArray offs… in Matcher_lookingAtImpl() argument
156 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_lookingAtImpl()
[all …]
Dlibcore_icu_NativeDecimalFormat.cpp42 static DecimalFormat* toDecimalFormat(jlong addr) { in toDecimalFormat() argument
43 return reinterpret_cast<DecimalFormat*>(static_cast<uintptr_t>(addr)); in toDecimalFormat()
46 static UNumberFormat* toUNumberFormat(jlong addr) { in toUNumberFormat() argument
47 return reinterpret_cast<UNumberFormat*>(static_cast<uintptr_t>(addr)); in toUNumberFormat()
95 static void NativeDecimalFormat_setDecimalFormatSymbols(JNIEnv* env, jclass, jlong addr, in NativeDecimalFormat_setDecimalFormatSymbols() argument
106 toDecimalFormat(addr)->adoptDecimalFormatSymbols(symbols); in NativeDecimalFormat_setDecimalFormatSymbols()
134 static void NativeDecimalFormat_close(JNIEnv*, jclass, jlong addr) { in NativeDecimalFormat_close() argument
135 delete toDecimalFormat(addr); in NativeDecimalFormat_close()
138 static void NativeDecimalFormat_setRoundingMode(JNIEnv*, jclass, jlong addr, jint mode, jdouble inc… in NativeDecimalFormat_setRoundingMode() argument
139 DecimalFormat* fmt = toDecimalFormat(addr); in NativeDecimalFormat_setRoundingMode()
[all …]
Djava_util_regex_Pattern.cpp30 static RegexPattern* toRegexPattern(jlong addr) { in toRegexPattern() argument
31 return reinterpret_cast<RegexPattern*>(static_cast<uintptr_t>(addr)); in toRegexPattern()
74 static void Pattern_closeImpl(JNIEnv*, jclass, jlong addr) { in Pattern_closeImpl() argument
75 delete toRegexPattern(addr); in Pattern_closeImpl()
DPortability.h60 static inline int mincore(void* addr, size_t length, unsigned char* vec) { in mincore() argument
61 return mincore(addr, length, reinterpret_cast<char*>(vec)); in mincore()
/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()
DInetAddressTest.java205 InetAddress addr = InetAddress.getByName("239.191.255.255"); in test_equals() local
206 assertTrue(addr.equals(addr)); in test_equals()
208 assertFalse(addr.equals(loopback6())); in test_equals()
/libcore/luni/src/main/java/java/util/regex/
DMatcher.java616 private static native void closeImpl(long addr); in closeImpl() argument
617 private static native boolean findImpl(long addr, String s, int startIndex, int[] offsets); in findImpl() argument
618 private static native boolean findNextImpl(long addr, String s, int[] offsets); in findNextImpl() argument
619 private static native int groupCountImpl(long addr); in groupCountImpl() argument
620 private static native boolean hitEndImpl(long addr); in hitEndImpl() argument
621 private static native boolean lookingAtImpl(long addr, String s, int[] offsets); in lookingAtImpl() argument
622 private static native boolean matchesImpl(long addr, String s, int[] offsets); in matchesImpl() argument
624 private static native boolean requireEndImpl(long addr); in requireEndImpl() argument
625 private static native void setInputImpl(long addr, String s, int start, int end); in setInputImpl() argument
626 private static native void useAnchoringBoundsImpl(long addr, boolean value); in useAnchoringBoundsImpl() argument
[all …]
/libcore/luni/src/main/java/libcore/icu/
DNativeDecimalFormat.java549 private static void applyPattern(long addr, boolean localized, String pattern) { in applyPattern() argument
551 applyPatternImpl(addr, localized, pattern); in applyPattern()
618 private static native void applyPatternImpl(long addr, boolean localized, String pattern); in applyPatternImpl() argument
619 private static native long cloneImpl(long addr); in cloneImpl() argument
620 private static native void close(long addr); in close() argument
621 private static native char[] formatLong(long addr, long value, FieldPositionIterator iter); in formatLong() argument
622 private static native char[] formatDouble(long addr, double value, FieldPositionIterator iter); in formatDouble() argument
623 … private static native char[] formatDigitList(long addr, String value, FieldPositionIterator iter); in formatDigitList() argument
624 private static native int getAttribute(long addr, int symbol); in getAttribute() argument
625 private static native String getTextAttribute(long addr, int symbol); in getTextAttribute() argument
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_Configuration.java199 byte[] addr = new byte[4]; in loadProperties()
204 addr[i] = (byte) Integer.parseInt(InetTestIP.substring( in loadProperties()
208 addr[3] = (byte) Integer.parseInt(InetTestIP.substring(last)); in loadProperties()
209 InetTestCaddr = addr; in loadProperties()
220 byte[] addr = new byte[4]; in loadProperties()
225 addr[i] = (byte) Integer in loadProperties()
230 addr[3] = (byte) Integer.parseInt(nonLocalAddressBytesString in loadProperties()
232 nonLocalAddressBytes = addr; in loadProperties()

12