/packages/modules/Connectivity/tests/unit/java/com/android/server/ |
D | NetworkManagementServiceTest.java | 35 import android.net.INetd; 75 @Mock private INetd.Stub mNetdService; 101 public INetd getNetd() { in getNetd() 268 isRestrictedForDozable.put(INetd.FIREWALL_RULE_ALLOW, false); in testFirewallChains() 269 isRestrictedForDozable.put(INetd.FIREWALL_RULE_DENY, true); in testFirewallChains() 270 expected.put(INetd.FIREWALL_CHAIN_DOZABLE, isRestrictedForDozable); in testFirewallChains() 274 isRestrictedForPowerSave.put(INetd.FIREWALL_RULE_ALLOW, false); in testFirewallChains() 275 isRestrictedForPowerSave.put(INetd.FIREWALL_RULE_DENY, true); in testFirewallChains() 276 expected.put(INetd.FIREWALL_CHAIN_POWERSAVE, isRestrictedForPowerSave); in testFirewallChains() 280 isRestrictedForStandby.put(INetd.FIREWALL_RULE_ALLOW, false); in testFirewallChains() [all …]
|
D | IpSecServiceParameterizedTest.java | 21 import static android.net.INetd.IF_STATE_DOWN; 22 import static android.net.INetd.IF_STATE_UP; 46 import android.net.INetd; 191 INetd mMockNetd; 220 mMockNetd = mock(INetd.class); in setUp()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | PermissionMonitorTest.java | 70 import android.net.INetd; 129 @Mock private INetd mNetdService; 465 NetdMonitor(INetd mockNetd) throws Exception { in NetdMonitor() 469 final Boolean isSystem = args[0].equals(INetd.PERMISSION_SYSTEM); in NetdMonitor() 694 NetdServiceMonitor(INetd mockNetdService) throws Exception { in NetdServiceMonitor() 727 netdPermissionsAppIds.put(MOCK_UID1, INetd.PERMISSION_INTERNET); in testPackagePermissionUpdate() 728 netdPermissionsAppIds.put(MOCK_UID2, INetd.PERMISSION_NONE); in testPackagePermissionUpdate() 729 netdPermissionsAppIds.put(SYSTEM_UID1, INetd.PERMISSION_INTERNET in testPackagePermissionUpdate() 730 | INetd.PERMISSION_UPDATE_DEVICE_STATS); in testPackagePermissionUpdate() 731 netdPermissionsAppIds.put(SYSTEM_UID2, INetd.PERMISSION_UPDATE_DEVICE_STATS); in testPackagePermissionUpdate() [all …]
|
/packages/modules/NetworkStack/common/moduleutils/src/android/net/shared/ |
D | RouteUtils.java | 22 import android.net.INetd; 46 nextHop = INetd.NEXTHOP_NONE; in findNextHop() 50 nextHop = INetd.NEXTHOP_UNREACHABLE; in findNextHop() 53 nextHop = INetd.NEXTHOP_THROW; in findNextHop() 56 nextHop = INetd.NEXTHOP_NONE; in findNextHop() 63 public static void addRoutesToLocalNetwork(final INetd netd, final String iface, in addRoutesToLocalNetwork() 68 modifyRoute(netd, ModifyOperation.ADD, INetd.LOCAL_NET_ID, route); in addRoutesToLocalNetwork() 73 modifyRoute(netd, ModifyOperation.ADD, INetd.LOCAL_NET_ID, in addRoutesToLocalNetwork() 78 public static int removeRoutesFromLocalNetwork(final INetd netd, final List<RouteInfo> routes) { in removeRoutesFromLocalNetwork() 83 modifyRoute(netd, ModifyOperation.REMOVE, INetd.LOCAL_NET_ID, route); in removeRoutesFromLocalNetwork() [all …]
|
D | NetdUtils.java | 22 import android.net.INetd; 42 public static void tetherStart(final INetd netd, final boolean usingLegacyDnsProxy, in tetherStart() 51 public static void tetherInterface(final INetd netd, final String iface, final IpPrefix dest) in tetherInterface() 57 public static void tetherInterface(final INetd netd, final String iface, final IpPrefix dest, in tetherInterface() 74 private static void networkAddInterface(final INetd netd, final String iface, in networkAddInterface() 79 netd.networkAddInterface(INetd.LOCAL_NET_ID, iface); in networkAddInterface() 94 public static void untetherInterface(final INetd netd, String iface) in untetherInterface() 99 netd.networkRemoveInterface(INetd.LOCAL_NET_ID, iface); in untetherInterface()
|
/packages/modules/DnsResolver/tests/ |
D | resolv_test_utils.h | 33 using INetd = aidl::android::net::INetd; variable 36 ScopeBlockedUIDRule(INetd* netSrv, uid_t testUid) in ScopeBlockedUIDRule() 43 EXPECT_TRUE(mNetSrv->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, true).isOk()); in ScopeBlockedUIDRule() 44 EXPECT_TRUE(mNetSrv->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, mTestUid, in ScopeBlockedUIDRule() 45 INetd::FIREWALL_RULE_DENY) in ScopeBlockedUIDRule() 53 EXPECT_TRUE(mNetSrv->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, mTestUid, in ~ScopeBlockedUIDRule() 54 INetd::FIREWALL_RULE_ALLOW) in ~ScopeBlockedUIDRule() 56 EXPECT_TRUE(mNetSrv->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, false).isOk()); in ~ScopeBlockedUIDRule() 60 INetd* mNetSrv;
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | PermissionMonitor.java | 45 import android.net.INetd; 90 private final INetd mNetd; 176 public PermissionMonitor(@NonNull final Context context, @NonNull final INetd netd) { in PermissionMonitor() 181 PermissionMonitor(@NonNull final Context context, @NonNull final INetd netd, in PermissionMonitor() 264 netdPermToSystemPerm.put(INetd.PERMISSION_INTERNET, INTERNET); in startMonitoring() 265 netdPermToSystemPerm.put(INetd.PERMISSION_UPDATE_DEVICE_STATS, UPDATE_DEVICE_STATS); in startMonitoring() 372 mNetd.networkSetPermissionForUser(INetd.PERMISSION_NETWORK, toIntArray(network)); in update() 373 mNetd.networkSetPermissionForUser(INetd.PERMISSION_SYSTEM, toIntArray(system)); in update() 442 int permission = INetd.PERMISSION_NONE; in getPermissionForUid() 456 permission = INetd.PERMISSION_UNINSTALLED; in getPermissionForUid() [all …]
|
D | Nat464Xlat.java | 26 import android.net.INetd; 73 private final INetd mNetd; 103 public Nat464Xlat(NetworkAgentInfo nai, INetd netd, IDnsResolver dnsResolver, in Nat464Xlat()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | NetdWrapper.java | 20 import android.net.INetd; 51 private final INetd mNetdService; 153 mNetdService = INetd.Stub.asInterface( in NetdWrapper() 187 nextHop = INetd.NEXTHOP_NONE; in modifyRoute() 191 nextHop = INetd.NEXTHOP_UNREACHABLE; in modifyRoute() 194 nextHop = INetd.NEXTHOP_THROW; in modifyRoute() 197 nextHop = INetd.NEXTHOP_NONE; in modifyRoute() 215 modifyInterfaceInNetwork(MODIFY_OPERATION_ADD, INetd.LOCAL_NET_ID, iface); in addInterfaceToLocalNetwork() 219 modifyRoute(MODIFY_OPERATION_ADD, INetd.LOCAL_NET_ID, route); in addInterfaceToLocalNetwork() 224 modifyRoute(MODIFY_OPERATION_ADD, INetd.LOCAL_NET_ID, in addInterfaceToLocalNetwork() [all …]
|
/packages/modules/NetworkStack/common/moduleutils/src/android/net/ip/ |
D | InterfaceController.java | 19 import static android.net.INetd.IF_STATE_DOWN; 20 import static android.net.INetd.IF_STATE_UP; 22 import android.net.INetd; 45 private final INetd mNetd; 48 public InterfaceController(String ifname, INetd netd, SharedLog log) { in InterfaceController()
|
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/ |
D | DadProxyTest.java | 29 import android.net.INetd; 76 private static INetd sNetd; 85 sNetd = INetd.Stub.asInterface(netdIBinder); in setupOnce() 115 sNetd.networkRemoveInterface(INetd.LOCAL_NET_ID, mTetheredParams.name); in tearDown() 118 sNetd.networkRemoveInterface(INetd.LOCAL_NET_ID, mUpstreamParams.name); in tearDown() 211 sNetd.networkAddInterface(INetd.LOCAL_NET_ID, mUpstreamParams.name); in setupProxy() 212 sNetd.networkAddInterface(INetd.LOCAL_NET_ID, mTetheredParams.name); in setupProxy()
|
D | RouterAdvertisementDaemonTest.java | 42 import android.net.INetd; 102 private static INetd sNetd; 109 sNetd = INetd.Stub.asInterface(netdIBinder); in setupOnce() 126 sNetd.networkAddInterface(INetd.LOCAL_NET_ID, mTetheredParams.name); in setUp() 138 sNetd.networkRemoveInterface(INetd.LOCAL_NET_ID, mTetheredParams.name); in tearDown() 325 sNetd.setProcSysNet(INetd.IPV6, INetd.CONF, mTetheredParams.name, "forwarding", "1"); in testSolicitRouterAdvertisement()
|
/packages/modules/NetworkStack/src/android/net/ip/ |
D | IpReachabilityMonitor.java | 26 import android.net.INetd; 192 private final INetd mNetd; 202 boolean usingMultinetworkPolicyTracker, final INetd netd) { 210 final IpConnectivityLog metricsLog, final INetd netd) { 462 for (int family : new Integer[]{INetd.IPV4, INetd.IPV6}) { 463 mNetd.setProcSysNet(family, INetd.NEIGH, mInterfaceParams.name, "retrans_time_ms", 465 mNetd.setProcSysNet(family, INetd.NEIGH, mInterfaceParams.name, "ucast_solicit",
|
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
D | TetheringDependencies.java | 22 import android.net.INetd; 119 public INetd getINetd(Context context) { in getINetd() 120 return INetd.Stub.asInterface( in getINetd()
|
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/ip/ |
D | IpServerTest.java | 19 import static android.net.INetd.IF_STATE_UP; 69 import android.net.INetd; 173 @Mock private INetd mNetd; 291 public INetd getNetd() { in setUp() 409 inOrder.verify(mNetd).networkAddInterface(INetd.LOCAL_NET_ID, IFACE_NAME); in canBeTethered() 411 inOrder.verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(IFACE_NAME), in canBeTethered() 428 inOrder.verify(mNetd).networkRemoveInterface(INetd.LOCAL_NET_ID, IFACE_NAME); in canUnrequestTethering() 448 inOrder.verify(mNetd).networkAddInterface(INetd.LOCAL_NET_ID, IFACE_NAME); in canBeTetheredAsUsb() 449 inOrder.verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(IFACE_NAME), in canBeTetheredAsUsb() 469 inOrder.verify(mNetd).networkAddInterface(INetd.LOCAL_NET_ID, IFACE_NAME); in canBeTetheredAsWifiP2p() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/shared/ |
D | NetdUtilsTest.java | 19 import static android.net.INetd.LOCAL_NET_ID; 35 import android.net.INetd; 55 @Mock private INetd mNetd;
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder_client_ndk.cpp | 32 using aidl::android::net::INetd; 182 TEST_NETID, NativeNetworkType::PHYSICAL, INetd::PERMISSION_NONE, /*secure=*/false); in SetupOemNetwork() 188 ret = mNetdSrv->networkCreatePhysical(TEST_NETID, INetd::PERMISSION_NONE); in SetupOemNetwork() 217 mNetdSrv = INetd::fromBinder(netdBinder); in SetUp()
|
D | dns_responder_client_ndk.h | 140 aidl::android::net::INetd* netdService() const { return mNetdSrv.get(); } in netdService() 143 std::shared_ptr<aidl::android::net::INetd> mNetdSrv;
|
/packages/modules/Connectivity/service/src/com/android/server/ |
D | TestNetworkService.java | 26 import android.net.INetd; 69 @NonNull private final INetd mNetd; 88 INetd.Stub.asInterface((IBinder) context.getSystemService(Context.NETD_SERVICE)), in TestNetworkService() 321 if (!(iface.startsWith(INetd.IPSEC_INTERFACE_PREFIX) in setupTestNetwork()
|
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | TetheringTest.java | 124 import android.net.INetd; 256 @Mock private INetd mNetd; 456 public INetd getINetd(Context context) { in getINetd() 793 verify(mNetd, times(1)).networkAddInterface(INetd.LOCAL_NET_ID, ifname); in verifyInterfaceServingModeStarted() 794 verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(ifname), in verifyInterfaceServingModeStarted() 920 verify(mNetd, times(1)).networkRemoveInterface(INetd.LOCAL_NET_ID, TEST_WLAN_IFNAME); in workingLocalOnlyHotspotEnrichedApBroadcast() 1454 verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(TEST_WLAN_IFNAME), in workingWifiTetheringEnrichedApBroadcast() 1493 verify(mNetd, times(1)).networkRemoveInterface(INetd.LOCAL_NET_ID, TEST_WLAN_IFNAME); in workingWifiTetheringEnrichedApBroadcast() 1532 verify(mNetd, times(1)).networkAddInterface(INetd.LOCAL_NET_ID, TEST_WLAN_IFNAME); in failureEnablingIpForwarding() 1533 verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(TEST_WLAN_IFNAME), in failureEnablingIpForwarding() [all …]
|
/packages/modules/NetworkStack/src/com/android/networkstack/netlink/ |
D | TcpSocketTracker.java | 42 import android.net.INetd; 121 private final INetd mNetd; 600 public INetd getNetd() { in getNetd() 601 return INetd.Stub.asInterface( in getNetd()
|
/packages/modules/NetworkStack/tests/unit/src/android/net/ip/ |
D | InterfaceControllerTest.java | 26 import android.net.INetd; 52 @Mock private INetd mNetd;
|
/packages/modules/Connectivity/Tethering/apishim/30/com/android/networkstack/tethering/apishim/api30/ |
D | BpfCoordinatorShimImpl.java | 19 import android.net.INetd; 48 private final INetd mNetd;
|
/packages/modules/NetworkStack/src/com/android/server/ |
D | NetworkObserverRegistry.java | 20 import android.net.INetd; 52 public void register(@NonNull INetd netd) throws RemoteException { in register()
|
/packages/modules/Connectivity/Tethering/src/android/net/ip/ |
D | IpServer.java | 31 import android.net.INetd; 232 private final INetd mNetd; 288 INetd netd, @NonNull BpfCoordinator coordinator, Callback callback, in IpServer() 786 mNetd.networkAddInterface(INetd.LOCAL_NET_ID, mIfaceName); in addRoutesToLocalNetwork() 1042 mNetd.getProcSysNet(INetd.IPV6, INetd.CONF, upstreamIface, "hop_limit")); in getHopLimit()
|