Home
last modified time | relevance | path

Searched refs:family (Results 1 – 23 of 23) sorted by relevance

/libcore/ojluni/src/main/java/sun/nio/ch/
DSocketOptionRegistry.java39 private final ProtocolFamily family; field in SocketOptionRegistry.RegistryKey
40 RegistryKey(SocketOption<?> name, ProtocolFamily family) { in RegistryKey() argument
42 this.family = family; in RegistryKey()
45 return name.hashCode() + family.hashCode(); in hashCode()
52 if (this.family != other.family) return false; in equals()
80 public static OptionKey findOption(SocketOption<?> name, ProtocolFamily family) { in findOption() argument
81 RegistryKey key = new RegistryKey(name, family); in findOption()
DDatagramChannelImpl.java67 private final ProtocolFamily family; field in DatagramChannelImpl
125 this.family = Net.isIPv6Available() ? in DatagramChannelImpl()
127 this.fd = Net.socket(family, false); in DatagramChannelImpl()
140 public DatagramChannelImpl(SelectorProvider sp, ProtocolFamily family) in DatagramChannelImpl() argument
144 if ((family != StandardProtocolFamily.INET) && in DatagramChannelImpl()
145 (family != StandardProtocolFamily.INET6)) in DatagramChannelImpl()
147 if (family == null) in DatagramChannelImpl()
152 if (family == StandardProtocolFamily.INET6) { in DatagramChannelImpl()
157 this.family = family; in DatagramChannelImpl()
158 this.fd = Net.socket(family, false); in DatagramChannelImpl()
[all …]
DNet.java280 static void setSocketOption(FileDescriptor fd, ProtocolFamily family,
329 OptionKey key = SocketOptionRegistry.findOption(name, family);
341 boolean mayNeedConversion = (family == UNSPEC);
342 boolean isIPv6 = (family == StandardProtocolFamily.INET6);
346 static Object getSocketOption(FileDescriptor fd, ProtocolFamily family,
367 OptionKey key = SocketOptionRegistry.findOption(name, family);
371 boolean mayNeedConversion = (family == UNSPEC);
416 static FileDescriptor socket(ProtocolFamily family, boolean stream)
419 (family != StandardProtocolFamily.INET);
437 static void bind(ProtocolFamily family, FileDescriptor fd,
[all …]
DSelectorProviderImpl.java45 public DatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException { in openDatagramChannel() argument
46 return new DatagramChannelImpl(this, family); in openDatagramChannel()
DSocketChannelImpl.java218 ProtocolFamily family = Net.isIPv6Available() ? in setOption() local
220 Net.setSocketOption(fd, family, name, value); in setOption()
259 ProtocolFamily family = Net.isIPv6Available() ? in getOption() local
261 return (T) Net.getSocketOption(fd, family, name); in getOption()
DServerSocketChannelImpl.java138 ProtocolFamily family = Net.isIPv6Available() ? in setOption() local
140 Net.setSocketOption(fd, family, name, value); in setOption()
/libcore/ojluni/src/main/java/java/net/
DInetAddress.java220 InetAddressHolder(String hostName, int address, int family) { in InetAddressHolder() argument
224 this.family = family; in InetAddressHolder()
227 void init(String hostName, int family) { in init() argument
230 if (family != -1) { in init()
231 this.family = family; in init()
259 int family; field in InetAddress.InetAddressHolder
262 return family; in getFamily()
1573 int family= gf.get("family", 0); in readObject() local
1574 holder = new InetAddressHolder(host, address, family); in readObject()
1599 pf.put("family", holder().family); in writeObject()
DInet4Address.java123 holder().family = AF_INET; in Inet4Address()
128 holder().family = AF_INET; in Inet4Address()
142 holder().family = AF_INET; in Inet4Address()
167 inet.holder().family = 2; in writeReplace()
DPlainDatagramSocketImpl.java238 protected void disconnect0(int family) { in disconnect0() argument
244 inetAddressUnspec.holder().family = AF_UNSPEC; in disconnect0()
DInet6Address.java522 int family = -1; in initif() local
526 family = AF_INET6; in initif()
528 holder.init(hostName, family); in initif()
DAbstractPlainDatagramSocketImpl.java419 protected abstract void disconnect0(int family); in disconnect0() argument
/libcore/ojluni/src/main/native/
Dnet_util.c168 void setInetAddress_family(JNIEnv *env, jobject iaObj, int family) { in setInetAddress_family() argument
172 (*env)->SetIntField(env, holder, iac_familyID, family); in setInetAddress_family()
286 jint family = AF_INET; in NET_SockaddrEqualsInetAddress() local
289 family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6; in NET_SockaddrEqualsInetAddress()
300 if (family == AF_INET6) { in NET_SockaddrEqualsInetAddress()
315 if (family == AF_INET) { in NET_SockaddrEqualsInetAddress()
331 if (family != AF_INET) { in NET_SockaddrEqualsInetAddress()
Dnet_util_md.c756 jint family; in NET_InetAddressToSockaddr() local
757 family = getInetAddress_family(env, iaObj); in NET_InetAddressToSockaddr()
760 if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) { in NET_InetAddressToSockaddr()
767 if (family == IPv4) { /* will convert to IPv4-mapped address */ in NET_InetAddressToSockaddr()
799 if (family != IPv4) { in NET_InetAddressToSockaddr()
812 if (family == IPv6) { in NET_InetAddressToSockaddr()
Dnet_util.h73 extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family);
/libcore/ojluni/src/main/java/java/nio/channels/
DDatagramChannel.java181 public static DatagramChannel open(ProtocolFamily family) throws IOException { in open() argument
182 return SelectorProvider.provider().openDatagramChannel(family); in open()
/libcore/ojluni/annotations/hiddenapi/java/net/
DInetAddress.java268 InetAddressHolder(java.lang.String hostName, int address, int family) { in InetAddressHolder() argument
272 void init(java.lang.String hostName, int family) { in init() argument
296 int family; field in InetAddress.InetAddressHolder
/libcore/ojluni/src/main/java/java/nio/channels/spi/
DSelectorProvider.java208 public abstract DatagramChannel openDatagramChannel(ProtocolFamily family)
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java288 int family, InetAddress loopback) throws Exception { in checkByteBufferPositions_sendto_recvfrom() argument
289 final FileDescriptor serverFd = Os.socket(family, SOCK_STREAM, 0); in checkByteBufferPositions_sendto_recvfrom()
323 FileDescriptor clientFd = Os.socket(family, SOCK_STREAM, 0); in checkByteBufferPositions_sendto_recvfrom()
546 for (int family : new int[] { AF_INET, AF_INET6, AF_NETLINK }) { in testUnknownSocketAddressSubclass()
547 FileDescriptor s = Os.socket(family, SOCK_DGRAM, 0); in testUnknownSocketAddressSubclass()
552 fail("bind socket family " + family in testUnknownSocketAddressSubclass()
559 fail("connect socket family " + family in testUnknownSocketAddressSubclass()
567 fail("sendto socket family " + family in testUnknownSocketAddressSubclass()
680 private void checkSendToSocketAddress(int family, InetAddress loopback) throws Exception { in checkSendToSocketAddress() argument
681 FileDescriptor recvFd = Os.socket(family, SOCK_DGRAM, 0); in checkSendToSocketAddress()
[all …]
/libcore/luni/src/main/java/android/system/
DOs.java312 …public static InetAddress inet_pton(int family, String address) { return Libcore.os.inet_pton(fami… in inet_pton() argument
/libcore/luni/src/main/java/libcore/io/
DForwardingOs.java137 … public InetAddress inet_pton(int family, String address) { return os.inet_pton(family, address); } in inet_pton() argument
DOs.java113 public InetAddress inet_pton(int family, String address); in inet_pton() argument
DLinux.java111 public native InetAddress inet_pton(int family, String address); in inet_pton() argument
/libcore/luni/src/main/native/
Dlibcore_io_Linux.cpp1710 static jobject Linux_inet_pton(JNIEnv* env, jobject, jint family, jstring javaName) { in Linux_inet_pton() argument
1718 if (family == AF_INET) { in Linux_inet_pton()
1720 } else if (family == AF_INET6) { in Linux_inet_pton()
1725 if (inet_pton(family, name.c_str(), dst) != 1) { in Linux_inet_pton()
1728 ss.ss_family = family; in Linux_inet_pton()