Lines Matching refs:mNetd

134             mNetd = android::interface_cast<INetd>(binder);  in NetdBinderTest()
139 ASSERT_NE(nullptr, mNetd.get()); in SetUp()
143 mNetd->networkDestroy(TEST_NETID1); in TearDown()
144 mNetd->networkDestroy(TEST_NETID2); in TearDown()
147 if (mStoredDefaultNetwork >= 0) mNetd->networkSetDefault(mStoredDefaultNetwork); in TearDown()
176 sp<INetd> mNetd; member in NetdBinderTest
198 mNetd->isAlive(&isAlive); in TEST_F()
226 mNetd->firewallReplaceUidChain(chainName, true, uids, &ret); in TEST_F()
235 mNetd->firewallReplaceUidChain(chainName, false, noUids, &ret); in TEST_F()
243 mNetd->firewallReplaceUidChain(chainName, false, uids, &ret); in TEST_F()
253 mNetd->firewallReplaceUidChain(chainName, false, noUids, &ret); in TEST_F()
261 mNetd->firewallReplaceUidChain(veryLongStringName, true, noUids, &ret); in TEST_F()
286 status = mNetd->ipSecAddTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, in TEST_F()
294 status = mNetd->ipSecUpdateTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, in TEST_F()
299 status = mNetd->ipSecRemoveTunnelInterface(td.deviceName); in TEST_F()
314 binder::Status res = mNetd->ipSecSetEncapSocketOwner(sockFd, 1001); in TEST_F()
357 status = mNetd->ipSecAddSecurityPolicy(0, addrFamily, direction, "127.0.0.5", in TEST_F()
367 status = mNetd->ipSecDeleteSecurityPolicy(0, addrFamily, direction, 0, 0, 0); in TEST_F()
381 status = mNetd->ipSecAddSecurityPolicy(0, addrFamily, direction, "2001:db8::f00d", in TEST_F()
391 status = mNetd->ipSecDeleteSecurityPolicy(0, addrFamily, direction, 0, 0, 0); in TEST_F()
490 ASSERT_TRUE(enableDataSaver(mNetd, false)); in TEST_F()
494 ASSERT_TRUE(enableDataSaver(mNetd, false)); in TEST_F()
497 ASSERT_TRUE(enableDataSaver(mNetd, true)); in TEST_F()
500 ASSERT_TRUE(enableDataSaver(mNetd, true)); in TEST_F()
504 ASSERT_TRUE(enableDataSaver(mNetd, false)); in TEST_F()
547 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
548 EXPECT_EQ(EEXIST, mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE) in TEST_F()
550 EXPECT_EQ(EEXIST, mNetd->networkCreateVpn(TEST_NETID1, true).serviceSpecificErrorCode()); in TEST_F()
551 EXPECT_TRUE(mNetd->networkCreateVpn(TEST_NETID2, true).isOk()); in TEST_F()
553 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
555 mNetd->networkAddInterface(TEST_NETID2, sTun.name()).serviceSpecificErrorCode()); in TEST_F()
557 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
558 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID2, sTun.name()).isOk()); in TEST_F()
559 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID2).isOk()); in TEST_F()
560 EXPECT_EQ(ENONET, mNetd->networkDestroy(TEST_NETID1).serviceSpecificErrorCode()); in TEST_F()
566 EXPECT_TRUE(mNetd->networkCreateVpn(TEST_NETID1, true).isOk()); in TEST_F()
567 EXPECT_EQ(EEXIST, mNetd->networkCreateVpn(TEST_NETID1, true).serviceSpecificErrorCode()); in TEST_F()
568 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
575 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
579 EXPECT_TRUE(mNetd->networkRemoveUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
582 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
584 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
587 EXPECT_EQ(ENONET, mNetd->networkDestroy(TEST_NETID1).serviceSpecificErrorCode()); in TEST_F()
600 ASSERT_TRUE(mNetd->networkRejectNonSecureVpn(true, uidRanges).isOk()); in TEST_F()
606 ASSERT_TRUE(mNetd->networkRejectNonSecureVpn(false, uidRanges).isOk()); in TEST_F()
612 binder::Status status = mNetd->networkRejectNonSecureVpn(false, uidRanges); in TEST_F()
683 EXPECT_TRUE(mNetd->socketDestroy(uidRanges, skipUids).isOk()); in TEST_F()
696 EXPECT_TRUE(mNetd->socketDestroy(uidRanges, skipUids).isOk()); in TEST_F()
701 EXPECT_TRUE(mNetd->socketDestroy(uidRanges, skipUids).isOk()); in TEST_F()
834 binder::Status status = mNetd->interfaceAddAddress( in TEST_F()
851 status = mNetd->interfaceDelAddress(sTun.name(), td.addrString, td.prefixLength); in TEST_F()
869 mNetd->setProcSysNet(INetd::IPV6, INetd::CONF, tun.name(), "disable_ipv6", "1"); in TEST_F()
871 status = mNetd->interfaceAddAddress(tun.name(), "2001:db8::1", 64); in TEST_F()
901 mNetd->getProcSysNet(td.ipversion, td.which, td.ifname, td.parameter, &value); in TEST_F()
937 mNetd->setProcSysNet(td.ipversion, td.which, td.ifname, td.parameter, td.value); in TEST_F()
958 EXPECT_TRUE(mNetd->getProcSysNet(ipversion, category, tun, parameter, &value).isOk()); in TEST_F()
963 EXPECT_TRUE(mNetd->setProcSysNet(ipversion, category, tun, parameter, std::to_string(2 * ival)) in TEST_F()
965 EXPECT_TRUE(mNetd->getProcSysNet(ipversion, category, tun, parameter, &value).isOk()); in TEST_F()
968 EXPECT_TRUE(mNetd->setProcSysNet(ipversion, category, tun, parameter, std::to_string(ival)) in TEST_F()
970 EXPECT_TRUE(mNetd->getProcSysNet(ipversion, category, tun, parameter, &value).isOk()); in TEST_F()
1046 binder::Status status = mNetd->tetherGetStats(&statsVec); in TEST_F()
1131 status = mNetd->idletimerAddInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1135 status = mNetd->idletimerRemoveInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1185 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_LOG); in TEST_F()
1190 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_ACCEPT); in TEST_F()
1194 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_REJECT); in TEST_F()
1199 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_ACCEPT); in TEST_F()
1204 status = mNetd->strictUidCleartextPenalty(uid, wrongPolicy); in TEST_F()
1253 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1258 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1259 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1262 status = mNetd->clatdStart(sTun.name(), "2001:db8:cafe:f00d::/64", &clatAddress); in TEST_F()
1267 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1272 EXPECT_TRUE(mNetd->networkAddRoute(TEST_NETID1, sTun.name(), "::/0", "").isOk()); in TEST_F()
1275 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1284 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1289 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1296 status = mNetd->clatdStop(sTun.name()); in TEST_F()
1301 status = mNetd->clatdStop(sTun.name()); in TEST_F()
1307 EXPECT_TRUE(mNetd->networkRemoveRoute(TEST_NETID1, sTun.name(), "::/0", "").isOk()); in TEST_F()
1309 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
1368 binder::Status status = mNetd->ipfwdGetRequesterList(&requesterList); in TEST_F()
1375 status = mNetd->ipfwdEnableForwarding("TestRequester"); in TEST_F()
1379 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1384 status = mNetd->ipfwdDisableForwarding("TestRequester"); in TEST_F()
1388 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1394 status = mNetd->ipfwdDisableForwarding(requester); in TEST_F()
1400 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1406 status = mNetd->ipfwdEnableForwarding(requester); in TEST_F()
1412 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1420 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1421 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1422 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID2, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1423 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID2, sTun2.name()).isOk()); in TEST_F()
1425 binder::Status status = mNetd->ipfwdAddInterfaceForward(sTun.name(), sTun2.name()); in TEST_F()
1429 status = mNetd->ipfwdRemoveInterfaceForward(sTun.name(), sTun2.name()); in TEST_F()
1555 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1556 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1558 binder::Status status = mNetd->bandwidthSetInterfaceQuota(sTun.name(), testQuotaBytes); in TEST_F()
1562 status = mNetd->bandwidthRemoveInterfaceQuota(sTun.name()); in TEST_F()
1567 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
1573 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1574 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1576 binder::Status status = mNetd->bandwidthSetInterfaceQuota(sTun.name(), testAlertBytes); in TEST_F()
1577 status = mNetd->bandwidthSetInterfaceAlert(sTun.name(), testAlertBytes); in TEST_F()
1581 status = mNetd->bandwidthRemoveInterfaceAlert(sTun.name()); in TEST_F()
1586 status = mNetd->bandwidthRemoveInterfaceQuota(sTun.name()); in TEST_F()
1591 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
1597 binder::Status status = mNetd->bandwidthSetGlobalAlert(testAlertBytes); in TEST_F()
1602 status = mNetd->bandwidthSetGlobalAlert(testAlertBytes); in TEST_F()
1615 binder::Status status = mNetd->bandwidthAddNaughtyApp(uid); in TEST_F()
1620 status = mNetd->bandwidthRemoveNaughtyApp(uid); in TEST_F()
1625 status = mNetd->bandwidthAddNiceApp(uid); in TEST_F()
1630 status = mNetd->bandwidthRemoveNiceApp(uid); in TEST_F()
1807 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1808 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1816 mNetd->networkAddRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1822 EXPECT_TRUE(mNetd->networkSetPermissionForUser(INetd::PERMISSION_SYSTEM, testUids).isOk()); in TEST_F()
1824 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1831 EXPECT_TRUE(mNetd->networkClearPermissionForUser(testUids).isOk()); in TEST_F()
1833 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1844 mNetd->networkAddRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1854 status = mNetd->networkRemoveRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1865 EXPECT_TRUE(mNetd->networkSetPermissionForUser(INetd::PERMISSION_SYSTEM, testUids).isOk()); in TEST_F()
1867 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1878 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1890 EXPECT_TRUE(mNetd->networkClearPermissionForUser(testUids).isOk()); in TEST_F()
1892 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1903 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1924 binder::Status status = mNetd->networkAddRouteParcel(TEST_NETID1, parcel); in TEST_F()
1935 status = mNetd->networkUpdateRouteParcel(TEST_NETID1, parcel); in TEST_F()
1945 status = mNetd->networkRemoveRouteParcel(TEST_NETID1, parcel); in TEST_F()
1956 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
1961 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
1962 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
1965 binder::Status status = mNetd->networkGetDefault(&mStoredDefaultNetwork); in TEST_F()
1969 status = mNetd->networkSetDefault(TEST_NETID1); in TEST_F()
1973 status = mNetd->networkClearDefault(); in TEST_F()
1978 status = mNetd->networkSetDefault(mStoredDefaultNetwork); in TEST_F()
1982 status = mNetd->networkSetPermissionForNetwork(TEST_NETID1, INetd::PERMISSION_SYSTEM); in TEST_F()
1987 status = mNetd->networkSetPermissionForNetwork(TEST_NETID1, INetd::PERMISSION_NONE); in TEST_F()
1993 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
1997 binder::Status status = mNetd->networkSetProtectAllow(TEST_UID1); in TEST_F()
2000 status = mNetd->networkCanProtect(TEST_UID1, &ret); in TEST_F()
2003 status = mNetd->networkSetProtectDeny(TEST_UID1); in TEST_F()
2008 EXPECT_TRUE(mNetd->networkClearPermissionForUser({TEST_UID1}).isOk()); in TEST_F()
2010 status = mNetd->networkCanProtect(TEST_UID1, &ret); in TEST_F()
2089 binder::Status status = mNetd->tetherStartWithConfiguration(config); in TEST_F()
2099 status = mNetd->tetherIsEnabled(&tetherEnabled); in TEST_F()
2103 status = mNetd->tetherStop(); in TEST_F()
2107 status = mNetd->tetherIsEnabled(&tetherEnabled); in TEST_F()
2116 binder::Status status = mNetd->tetherInterfaceAdd(sTun.name()); in TEST_F()
2121 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2125 status = mNetd->tetherInterfaceRemove(sTun.name()); in TEST_F()
2129 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2139 binder::Status status = mNetd->tetherDnsSet(TEST_NETID1, testDnsAddrs); in TEST_F()
2143 status = mNetd->tetherDnsList(&dnsList); in TEST_F()
2203 mNetd->tetherStop(); in TEST_F()
2204 mNetd->tetherInterfaceRemove(tun1.name()); in TEST_F()
2205 mNetd->tetherInterfaceRemove(tun2.name()); in TEST_F()
2215 binder::Status status = mNetd->tetherStop(); in TEST_F()
2220 status = mNetd->tetherInterfaceAdd(tun1.name()); in TEST_F()
2231 status = mNetd->tetherStartWithConfiguration(config); in TEST_F()
2239 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2255 status = mNetd->tetherInterfaceAdd(tun2.name()); in TEST_F()
2265 status = mNetd->tetherStop(); in TEST_F()
2270 status = mNetd->tetherInterfaceRemove(tun1.name()); in TEST_F()
2273 status = mNetd->tetherInterfaceRemove(tun2.name()); in TEST_F()
2444 binder::Status status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2448 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2453 mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2454 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2459 mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2460 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2465 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2472 binder::Status status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2475 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2479 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2482 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2486 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_DENY); in TEST_F()
2491 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2502 binder::Status status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_DOZABLE, uid, in TEST_F()
2508 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_DOZABLE, uid, in TEST_F()
2514 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_POWERSAVE, uid, in TEST_F()
2520 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_POWERSAVE, uid, in TEST_F()
2526 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, uid, in TEST_F()
2532 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, uid, in TEST_F()
2538 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_DENY); in TEST_F()
2544 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2550 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2555 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2561 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_DENY); in TEST_F()
2567 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2575 binder::Status status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_DOZABLE, true); in TEST_F()
2579 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, true); in TEST_F()
2583 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_POWERSAVE, true); in TEST_F()
2587 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_DOZABLE, false); in TEST_F()
2591 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, false); in TEST_F()
2595 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_POWERSAVE, false); in TEST_F()
2791 binder::Status status = mNetd->interfaceGetList(&interfaceListResult); in TEST_F()
2800 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
2801 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
2803 binder::Status status = mNetd->interfaceGetCfg(sTun.name(), &interfaceCfgResult); in TEST_F()
2809 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
2819 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
2820 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
2824 binder::Status status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F()
2830 status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F()
2832 status = mNetd->interfaceClearAddrs(sTun.name()); in TEST_F()
2836 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
2841 binder::Status status = mNetd->interfaceSetIPv6PrivacyExtensions(sTun.name(), true); in TEST_F()
2846 status = mNetd->interfaceSetIPv6PrivacyExtensions(sTun.name(), false); in TEST_F()
2857 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
2858 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
2861 binder::Status status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F()
2865 status = mNetd->interfaceClearAddrs(sTun.name()); in TEST_F()
2870 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
2875 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
2876 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
2879 binder::Status status = mNetd->interfaceSetEnableIPv6(sTun.name(), false); in TEST_F()
2884 status = mNetd->interfaceSetEnableIPv6(sTun.name(), true); in TEST_F()
2889 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
2896 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
2897 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
2899 binder::Status status = mNetd->interfaceSetMtu(sTun.name(), testMtu); in TEST_F()
2904 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
2993 binder::Status status = mNetd->tetherAddForward(sTun.name(), sTun2.name()); in TEST_F()
2997 status = mNetd->tetherRemoveForward(sTun.name(), sTun2.name()); in TEST_F()
3039 updateAndCheckTcpBuffer(mNetd, testRmemValue, testWmemValue); in TEST_F()
3040 updateAndCheckTcpBuffer(mNetd, rmemValue, wmemValue); in TEST_F()
3066 mNetd->trafficSetNetPermForUids(INetd::PERMISSION_INTERNET, appUids); in TEST_F()
3068 mNetd->trafficSetNetPermForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()
3070 mNetd->trafficSetNetPermForUids(INetd::PERMISSION_UNINSTALLED, appUids); in TEST_F()
3082 binder::Status status = mNetd->registerUnsolicitedEventListener( in TEST_F()
3184 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
3185 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
3209 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
3214 binder::Status status = mNetd->getOemNetd(&binder); in TEST_F()
3274 EXPECT_TRUE(mNetd->networkCreatePhysical(fallthroughNetId, INetd::PERMISSION_NONE).isOk()); in createVpnNetworkWithUid()
3275 EXPECT_TRUE(mNetd->networkAddInterface(fallthroughNetId, sTun.name()).isOk()); in createVpnNetworkWithUid()
3278 EXPECT_TRUE(mNetd->networkCreateVpn(vpnNetId, secure).isOk()); in createVpnNetworkWithUid()
3281 EXPECT_TRUE(mNetd->networkAddUidRanges(vpnNetId, {makeUidRangeParcel(uid, uid)}).isOk()); in createVpnNetworkWithUid()
3282 EXPECT_TRUE(mNetd->networkAddInterface(vpnNetId, sTun2.name()).isOk()); in createVpnNetworkWithUid()
3285 EXPECT_TRUE(mNetd->networkAddRoute(TEST_NETID1, sTun.name(), "::/0", "").isOk()); in createVpnNetworkWithUid()
3287 EXPECT_TRUE(mNetd->networkAddRoute(TEST_NETID2, sTun2.name(), "2001:db8::/32", "").isOk()); in createVpnNetworkWithUid()
3442 ASSERT_TRUE(mNetd->networkGetDefault(&mStoredDefaultNetwork).isOk()); in TEST_F()
3443 expectVpnFallthroughWorks(mNetd.get(), false /* bypassable */, TEST_UID1, sTun, sTun2); in TEST_F()
3449 ASSERT_TRUE(mNetd->networkGetDefault(&mStoredDefaultNetwork).isOk()); in TEST_F()
3450 expectVpnFallthroughWorks(mNetd.get(), true /* bypassable */, TEST_UID1, sTun, sTun2); in TEST_F()
3478 ASSERT_TRUE(mNetd->networkGetDefault(&mStoredDefaultNetwork).isOk()); in TEST_F()
3484 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
3485 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
3486 EXPECT_TRUE(mNetd->networkAddRoute(TEST_NETID1, sTun.name(), "2001:db8::/32", "").isOk()); in TEST_F()
3487 EXPECT_TRUE(mNetd->networkSetDefault(TEST_NETID1).isOk()); in TEST_F()
3489 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID2, INetd::PERMISSION_NONE).isOk()); in TEST_F()
3490 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID2, sTun2.name()).isOk()); in TEST_F()
3494 ASSERT_TRUE(mNetd->getFwmarkForNetwork(TEST_NETID1, &maskMarkNet1).isOk()); in TEST_F()
3503 ASSERT_TRUE(mNetd->getFwmarkForNetwork(TEST_NETID2, &maskMarkNet2).isOk()); in TEST_F()
3508 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID2).isOk()); in TEST_F()
3509 EXPECT_TRUE(mNetd->networkDestroy(TEST_NETID1).isOk()); in TEST_F()
3551 auto status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3558 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3565 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3572 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3578 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3581 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3587 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3591 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3597 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3603 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3609 EXPECT_TRUE(mNetd->tetherOffloadRuleRemove(rule).isOk()); in TEST_F()
3613 EXPECT_TRUE(mNetd->tetherOffloadRuleAdd(rule).isOk()); in TEST_F()
3614 EXPECT_TRUE(mNetd->tetherOffloadRuleRemove(rule).isOk()); in TEST_F()
3675 EXPECT_TRUE(mNetd->networkCreatePhysical(TEST_NETID1, INetd::PERMISSION_NONE).isOk()); in TEST_F()
3676 EXPECT_TRUE(mNetd->networkAddInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()
3690 binder::Status status = mNetd->networkAddInterface(INetd::LOCAL_NET_ID, tap.name()); in TEST_F()
3692 status = mNetd->tetherInterfaceAdd(tap.name()); in TEST_F()
3697 status = mNetd->networkAddRoute(INetd::LOCAL_NET_ID, tap.name(), kDownstreamPrefix, ""); in TEST_F()
3701 status = mNetd->tetherAddForward(tap.name(), sTun.name()); in TEST_F()
3703 status = mNetd->ipfwdAddInterfaceForward(tap.name(), sTun.name()); in TEST_F()
3712 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3718 status = mNetd->tetherOffloadSetInterfaceQuota(sTun.ifindex(), sizeof(pkt) * 2 - 1); in TEST_F()
3737 EXPECT_TRUE(mNetd->tetherOffloadRuleRemove(rule).isOk()); in TEST_F()
3740 EXPECT_TRUE(mNetd->tetherOffloadGetAndClearStats(sTun.ifindex(), &tetherStats).isOk()); in TEST_F()
3748 EXPECT_TRUE(mNetd->ipfwdRemoveInterfaceForward(tap.name(), sTun.name()).isOk()); in TEST_F()
3749 EXPECT_TRUE(mNetd->tetherRemoveForward(tap.name(), sTun.name()).isOk()); in TEST_F()
3750 EXPECT_TRUE(mNetd->networkRemoveRoute(INetd::LOCAL_NET_ID, tap.name(), kDownstreamPrefix, "") in TEST_F()
3752 EXPECT_TRUE(mNetd->tetherInterfaceRemove(tap.name()).isOk()); in TEST_F()
3753 EXPECT_TRUE(mNetd->networkRemoveInterface(INetd::LOCAL_NET_ID, tap.name()).isOk()); in TEST_F()
3754 EXPECT_TRUE(mNetd->networkRemoveInterface(TEST_NETID1, sTun.name()).isOk()); in TEST_F()