Home
last modified time | relevance | path

Searched refs:NetworkInterface (Results 1 – 25 of 36) sorted by relevance

12

/libcore/ojluni/src/main/java/java/net/
DNetworkInterface.java60 public final class NetworkInterface { class
68 private List<NetworkInterface> childs;
69 private NetworkInterface parent = null;
71 private static final NetworkInterface defaultInterface;
104 NetworkInterface() { in NetworkInterface() method in NetworkInterface
107 NetworkInterface(String name, int index, InetAddress[] addrs) { in NetworkInterface() method in NetworkInterface
223 public Enumeration<NetworkInterface> getSubInterfaces() { in getSubInterfaces()
236 public NetworkInterface getParent() { in getParent()
284 public static NetworkInterface getByName(String name) throws SocketException { in getByName()
289 NetworkInterface[] nis = getAll(); in getByName()
[all …]
DMulticastSocket.java317 NetworkInterface defaultInterface = NetworkInterface.getDefault(); in joinGroup()
385 public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) in joinGroup()
432 public void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) in leaveGroup()
519 NetworkInterface ni = NetworkInterface.getByInetAddress(ia); in getInterface()
550 public void setNetworkInterface(NetworkInterface netIf) in setNetworkInterface()
569 public NetworkInterface getNetworkInterface() throws SocketException { in getNetworkInterface()
576 return new NetworkInterface(addrs[0].getHostName(), 0, addrs); in getNetworkInterface()
578 return NetworkInterface.getByIndex(niIndex); in getNetworkInterface()
DInet6Address.java207 NetworkInterface ifname, boolean scope_ifname_set) in Inet6AddressHolder()
238 NetworkInterface scope_ifname; // null
262 void init(byte addr[], NetworkInterface nif) in init()
421 Inet6Address (String hostName, byte addr[], NetworkInterface nif) in Inet6Address()
456 NetworkInterface nif) in getByAddress()
509 NetworkInterface nif = NetworkInterface.getByName (ifname); in initstr()
519 private void initif(String hostName, byte addr[], NetworkInterface nif) in initif()
551 …private static int deriveNumericScope (byte[] thisAddr, NetworkInterface ifc) throws UnknownHostEx… in deriveNumericScope()
571 Enumeration<NetworkInterface> en; in deriveNumericScope()
573 en = NetworkInterface.getNetworkInterfaces(); in deriveNumericScope()
[all …]
DAbstractPlainDatagramSocketImpl.java217 protected void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) in joinGroup()
224 protected abstract void join(InetAddress inetaddr, NetworkInterface netIf) in join()
235 protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) in leaveGroup()
242 protected abstract void leave(InetAddress inetaddr, NetworkInterface netIf) in leave()
328 if (o == null || !(o instanceof Integer || o instanceof NetworkInterface)) in setOption()
330 if (o instanceof NetworkInterface) { in setOption()
331 o = new Integer(((NetworkInterface)o).getIndex()); in setOption()
400 NetworkInterface networkInterface = NetworkInterface.getByIndex(niIndex); in getNIFirstAddress()
DStandardSocketOptions.java273 public static final SocketOption<NetworkInterface> IP_MULTICAST_IF =
274 new StdSocketOption<NetworkInterface>("IP_MULTICAST_IF", NetworkInterface.class);
DDefaultInterface.java38 static NetworkInterface getDefault() { in getDefault()
DInetAddressImpl.java76 boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, in isReachable()
DDatagramSocketImpl.java228 NetworkInterface netIf) in joinGroup()
240 NetworkInterface netIf) in leaveGroup()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DNetworkInterfaceTest.java22 import java.net.NetworkInterface;
31 Enumeration<NetworkInterface> theInterfaces = null;
37 private NetworkInterface networkInterface1 = null;
39 private NetworkInterface sameAsNetworkInterface1 = null;
41 private NetworkInterface networkInterface2 = null;
161 NetworkInterface in test_getInetAddresses()
171 NetworkInterface in test_getInetAddresses()
203 NetworkInterface.getByName(null)); in test_getByNameLjava_lang_String()
209 NetworkInterface.getByName("8not a name4")); in test_getByNameLjava_lang_String()
218 networkInterface1, NetworkInterface.getByName(theName)); in test_getByNameLjava_lang_String()
[all …]
DInterfaceAddressTest.java24 import java.net.NetworkInterface;
126 Enumeration<NetworkInterface> netifs = NetworkInterface in setUp()
128 NetworkInterface theInterface = null; in setUp()
149 NetworkInterface anotherNetworkInter = NetworkInterface in setUp()
DMulticastSocketTest.java28 import java.net.NetworkInterface;
61 private NetworkInterface loopbackInterface;
62 private NetworkInterface ipv4NetworkInterface;
63 private NetworkInterface ipv6NetworkInterface;
70 loopbackInterface = NetworkInterface.getByInetAddress(InetAddress.getLoopbackAddress()); in setUp()
75 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); in setUp()
88 NetworkInterface nextInterface = interfaces.nextElement(); in setUp()
154 ipv4NetworkInterface, NetworkInterface.getByInetAddress(mss.getInterface())); in test_getInterface()
166 NetworkInterface theInterface = mss.getNetworkInterface(); in test_getNetworkInterface()
329 NetworkInterface networkInterface, InetAddress group, InetAddress group2) in test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface()
[all …]
DInetAddressTest.java25 import java.net.NetworkInterface;
337 Enumeration<NetworkInterface> nif = NetworkInterface.getNetworkInterfaces(); in test_isReachableLjava_net_NetworkInterfaceII()
338 NetworkInterface netif; in test_isReachableLjava_net_NetworkInterfaceII()
367 NetworkInterface loopbackInterface = null; in test_isReachableLjava_net_NetworkInterfaceII_loopbackInterface()
369 Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); in test_isReachableLjava_net_NetworkInterfaceII_loopbackInterface()
372 NetworkInterface networkInterface = networkInterfaces.nextElement(); in test_isReachableLjava_net_NetworkInterfaceII_loopbackInterface()
DDatagramSocketImplTest.java25 import java.net.NetworkInterface;
101 protected void joinGroup(SocketAddress addr, NetworkInterface netInterface) in joinGroup()
112 protected void leaveGroup(SocketAddress addr, NetworkInterface netInterface) in leaveGroup()
/libcore/luni/src/test/java/libcore/java/net/
DNetworkInterfaceTest.java30 import java.net.NetworkInterface;
48 import static java.net.NetworkInterface.getNetworkInterfaces;
54 NetworkInterface lo = NetworkInterface.getByName("lo"); in testIPv6()
95 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testInterfaceProperties()
96 assertEquals(nif, NetworkInterface.getByName(nif.getName())); in testInterfaceProperties()
114 NetworkInterface lo = NetworkInterface.getByName("lo"); in testLoopback()
124 for (NetworkInterface nif : Collections.list(getNetworkInterfaces())) { in testDumpAll()
164 NetworkInterface lo = NetworkInterface.getByName("lo"); in testInterfaceRemoval()
169 Field nameField = NetworkInterface.class.getDeclaredField("name"); in testInterfaceRemoval()
224 Enumeration<NetworkInterface> nifs = NetworkInterface.getNetworkInterfaces(); in testGetNetworkInterfaces()
[all …]
DOldDatagramSocketImplFactoryTest.java26 import java.net.NetworkInterface;
161 protected void joinGroup(SocketAddress arg0, NetworkInterface arg1) throws IOException { in joinGroup()
169 protected void leaveGroup(SocketAddress arg0, NetworkInterface arg1) throws IOException { in leaveGroup()
DInetAddressTest.java30 import java.net.NetworkInterface;
239 for (NetworkInterface nif in test_isReachable()
240 : Collections.list(NetworkInterface.getNetworkInterfaces())) { in test_isReachable()
254 final NetworkInterface netIf = NetworkInterface.getByName("dummy0"); in test_isReachable_neverThrows()
/libcore/ojluni/src/main/java/java/nio/channels/
DMulticastChannel.java29 import java.net.NetworkInterface;
180 MembershipKey join(InetAddress group, NetworkInterface interf) in join()
228 MembershipKey join(InetAddress group, NetworkInterface interf, InetAddress source) in join()
DMembershipKey.java29 import java.net.NetworkInterface;
167 public abstract NetworkInterface networkInterface(); in networkInterface()
/libcore/ojluni/src/main/java/sun/nio/ch/
DMembershipKeyImpl.java30 import java.net.NetworkInterface;
43 private final NetworkInterface interf;
57 NetworkInterface interf, in MembershipKeyImpl()
76 NetworkInterface interf, in Type4()
111 NetworkInterface interf, in Type6()
161 public NetworkInterface networkInterface() { in networkInterface()
DMembershipRegistry.java30 import java.net.NetworkInterface;
51 MembershipKey checkMembership(InetAddress group, NetworkInterface interf, in checkMembership()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DDatagramChannelMulticastTest.java27 import java.net.NetworkInterface;
76 private NetworkInterface ipv4NetworkInterface;
77 private NetworkInterface ipv6NetworkInterface;
78 private NetworkInterface loopbackInterface;
86 loopbackInterface = NetworkInterface.getByInetAddress(InetAddress.getLoopbackAddress()); in setUp()
91 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); in setUp()
103 NetworkInterface nextInterface = interfaces.nextElement(); in setUp()
229 NetworkInterface networkInterface) throws Exception { in check_joinAnySource()
321 ArrayList<NetworkInterface> realInterfaces = new ArrayList<NetworkInterface>(); in test_joinAnySource_networkInterfaces()
322 Enumeration<NetworkInterface> theInterfaces = NetworkInterface.getNetworkInterfaces(); in test_joinAnySource_networkInterfaces()
[all …]
DServerSocketChannelTest.java22 import java.net.NetworkInterface;
95 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); in test_bind_nullBindsToAll()
97 NetworkInterface nic = interfaces.nextElement(); in test_bind_nullBindsToAll()
126 Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); in test_bind_loopback()
128 NetworkInterface nic = interfaces.nextElement(); in test_bind_loopback()
DMembershipKeyTest.java26 import java.net.NetworkInterface;
42 private final static NetworkInterface NETWORK_INTERFACE = getNetworkInterface();
262 private static NetworkInterface getNetworkInterface() { in getNetworkInterface()
264 return NetworkInterface.getByName("lo"); in getNetworkInterface()
DDatagramChannelTest.java28 import java.net.NetworkInterface;
275 Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); in getNonLoopbackNetworkInterfaceAddress()
277 NetworkInterface networkInterface = networkInterfaces.nextElement(); in getNonLoopbackNetworkInterfaceAddress()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DMockDatagramChannel.java23 import java.net.NetworkInterface;
120 public MembershipKey join(InetAddress group, NetworkInterface interf) { in join()
125 public MembershipKey join(InetAddress group, NetworkInterface interf, InetAddress source) in join()

12