Home
last modified time | relevance | path

Searched refs:networkInterface (Results 1 – 13 of 13) sorted by relevance

/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DNetworkInterfaceWrapper.java26 private final NetworkInterface networkInterface; field in NetworkInterfaceWrapper
28 public NetworkInterfaceWrapper(NetworkInterface networkInterface) { in NetworkInterfaceWrapper() argument
29 this.networkInterface = networkInterface; in NetworkInterfaceWrapper()
33 return networkInterface; in getNetworkInterface()
37 return networkInterface.isUp(); in isUp()
41 return networkInterface.isLoopback(); in isLoopback()
45 return networkInterface.isPointToPoint(); in isPointToPoint()
49 return networkInterface.isVirtual(); in isVirtual()
53 return networkInterface.supportsMulticast(); in supportsMulticast()
57 return networkInterface.getInterfaceAddresses(); in getInterfaceAddresses()
[all …]
DMulticastNetworkInterfaceProvider.java153 private static boolean canScanOnInterface(@Nullable NetworkInterfaceWrapper networkInterface, in canScanOnInterface() argument
156 if ((networkInterface == null) in canScanOnInterface()
157 || networkInterface.isLoopback() in canScanOnInterface()
158 || networkInterface.isPointToPoint() in canScanOnInterface()
159 || networkInterface.isVirtual() in canScanOnInterface()
160 || !networkInterface.isUp() in canScanOnInterface()
161 || !networkInterface.supportsMulticast()) { in canScanOnInterface()
164 return hasInet4Address(networkInterface) || hasInet6Address(networkInterface); in canScanOnInterface()
167 networkInterface.getNetworkInterface().getDisplayName()), e); in canScanOnInterface()
173 private static boolean hasInet4Address(@NonNull NetworkInterfaceWrapper networkInterface) { in hasInet4Address() argument
[all …]
DMdnsSocket.java74 for (NetworkInterfaceWrapper networkInterface : networkInterfaces) { in send()
75 multicastSocket.setNetworkInterface(networkInterface.getNetworkInterface()); in send()
94 for (NetworkInterfaceWrapper networkInterface : networkInterfaces) { in joinGroup()
95 multicastSocket.joinGroup(multicastAddress, networkInterface.getNetworkInterface()); in joinGroup()
98 MULTICAST_IPV6_ADDRESS, networkInterface.getNetworkInterface()); in joinGroup()
110 for (NetworkInterfaceWrapper networkInterface : networkInterfaces) { in leaveGroup()
111 multicastSocket.leaveGroup(multicastAddress, networkInterface.getNetworkInterface()); in leaveGroup()
114 MULTICAST_IPV6_ADDRESS, networkInterface.getNetworkInterface()); in leaveGroup()
DMdnsInterfaceSocket.java65 public MdnsInterfaceSocket(@NonNull NetworkInterface networkInterface, int port, in MdnsInterfaceSocket() argument
68 mNetworkInterface = networkInterface; in MdnsInterfaceSocket()
72 mMulticastSocket.setNetworkInterface(networkInterface); in MdnsInterfaceSocket()
85 mPacketReader = new MulticastPacketReader(networkInterface.getName(), mFileDescriptor, in MdnsInterfaceSocket()
DMdnsSocketProvider.java236 @NonNull NetworkInterface networkInterface, int port, @NonNull Looper looper, in createMdnsInterfaceSocket()
238 return new MdnsInterfaceSocket(networkInterface, port, looper, packetReadBuffer, in createMdnsInterfaceSocket()
506 final NetworkInterfaceWrapper networkInterface = in createSocket() local
524 if (networkInterface == null || !isMdnsCapableInterface(networkInterface, transports)) { in createSocket()
530 networkInterface.getNetworkInterface(), MdnsConstants.MDNS_PORT, mLooper, in createSocket()
536 final SocketKey socketKey = new SocketKey(network, networkInterface.getIndex()); in createSocket()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsSocketTests.java60 private NetworkInterface networkInterface; field in MdnsSocketTests
68 networkInterface = createEmptyNetworkInterface(); in setUp()
69 when(mockNetworkInterfaceWrapper.getNetworkInterface()).thenReturn(networkInterface); in setUp()
83 verify(mockMulticastSocket).setNetworkInterface(networkInterface); in mdnsSocket_basicFunctionality()
90 verify(mockMulticastSocket).joinGroup(socketIPv4Address, networkInterface); in mdnsSocket_basicFunctionality()
93 verify(mockMulticastSocket).leaveGroup(socketIPv4Address, networkInterface); in mdnsSocket_basicFunctionality()
102 networkInterface = createEmptyNetworkInterface(); in ipv6OnlyNetwork_ipv6Enabled()
103 when(mockNetworkInterfaceWrapper.getNetworkInterface()).thenReturn(networkInterface); in ipv6OnlyNetwork_ipv6Enabled()
115 verify(mockMulticastSocket).joinGroup(socketIPv6Address, networkInterface); in ipv6OnlyNetwork_ipv6Enabled()
118 verify(mockMulticastSocket).leaveGroup(socketIPv6Address, networkInterface); in ipv6OnlyNetwork_ipv6Enabled()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/
DMacAddressPreferenceController.java72 for (NetworkInterface networkInterface : in updateConnectivity()
74 byte[] mac = networkInterface.getHardwareAddress(); in updateConnectivity()
76 networkInterface.getName())) { in updateConnectivity()
/packages/services/BuiltInPrintService/src/com/android/bips/p2p/
DP2pUtils.java44 NetworkInterface networkInterface = toNetworkInterface(interfaceName); in isOnInterface() local
46 return networkInterface != null && inet4Address != null in isOnInterface()
47 && isOnInterface(networkInterface, inet4Address); in isOnInterface()
DP2pPrinterConnection.java110 public void onConnectionOpen(String networkInterface, WifiP2pInfo info) { in onConnectionOpen() argument
116 mInterface = NetworkInterface.getByName(networkInterface); in onConnectionOpen()
121 if (DEBUG) Log.d(TAG, "Failed to get interface from " + networkInterface); in onConnectionOpen()
DP2pMonitor.java136 public void onConnectionOpen(String networkInterface, WifiP2pInfo info) { in connect()
137 mConnectedInterface = networkInterface; in connect()
DP2pConnectionListener.java31 void onConnectionOpen(String networkInterface, WifiP2pInfo info); in onConnectionOpen() argument
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/
DHdHomeRunDiscover.java175 NetworkInterface networkInterface = interfaces.nextElement(); in getLocalIpInfo() local
176 for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) { in getLocalIpInfo()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DBpfCoordinator.java368 final NetworkInterface networkInterface = NetworkInterface.getByName(iface); in getNetworkInterfaceMtu() local
369 return networkInterface == null ? INVALID_MTU : networkInterface.getMTU(); in getNetworkInterfaceMtu()