/system/netd/server/ |
D | VirtualNetwork.cpp | 49 int VirtualNetwork::maybeCloseSockets(bool add, const UidRanges& uidRanges, in maybeCloseSockets() argument 60 if (int ret = sd.destroySockets(uidRanges, protectableUsers, true /* excludeLoopback */)) { in maybeCloseSockets() 62 add ? "adding" : "removing", uidRanges.toString().c_str(), mNetId, strerror(-ret)); in maybeCloseSockets() 69 int VirtualNetwork::addUsers(const UidRanges& uidRanges, const std::set<uid_t>& protectableUsers) { in addUsers() argument 70 maybeCloseSockets(true, uidRanges, protectableUsers); in addUsers() 74 uidRanges)) { in addUsers() 79 mUidRanges.add(uidRanges); in addUsers() 83 int VirtualNetwork::removeUsers(const UidRanges& uidRanges, in removeUsers() argument 85 maybeCloseSockets(false, uidRanges, protectableUsers); in removeUsers() 89 mSecure, uidRanges)) { in removeUsers() [all …]
|
D | RouteController.h | 67 const UidRanges& uidRanges) WARN_UNUSED_RESULT; 69 const UidRanges& uidRanges) WARN_UNUSED_RESULT; 76 const UidRanges& uidRanges) WARN_UNUSED_RESULT; 78 const UidRanges& uidRanges) WARN_UNUSED_RESULT; 80 static int addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges) 82 static int removeUsersFromRejectNonSecureNetworkRule(const UidRanges& uidRanges) 133 const UidRanges& uidRanges, bool secure, bool add,
|
D | VirtualNetwork.h | 44 int addUsers(const UidRanges& uidRanges, 46 int removeUsers(const UidRanges& uidRanges, 53 int maybeCloseSockets(bool add, const UidRanges& uidRanges,
|
D | RouteController.cpp | 763 WARN_UNUSED_RESULT int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) { in modifyRejectNonSecureNetworkRule() argument 769 for (const UidRange& range : uidRanges.getRanges()) { in modifyRejectNonSecureNetworkRule() 782 const UidRanges& uidRanges, in modifyVirtualNetwork() argument 790 for (const UidRange& range : uidRanges.getRanges()) { in modifyVirtualNetwork() 1001 bool secure, const UidRanges& uidRanges) { in addInterfaceToVirtualNetwork() argument 1002 if (int ret = modifyVirtualNetwork(netId, interface, uidRanges, secure, ACTION_ADD, in addInterfaceToVirtualNetwork() 1011 bool secure, const UidRanges& uidRanges) { in removeInterfaceFromVirtualNetwork() argument 1012 if (int ret = modifyVirtualNetwork(netId, interface, uidRanges, secure, ACTION_DEL, in removeInterfaceFromVirtualNetwork() 1033 int RouteController::addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges) { in addUsersToRejectNonSecureNetworkRule() argument 1034 return modifyRejectNonSecureNetworkRule(uidRanges, true); in addUsersToRejectNonSecureNetworkRule() [all …]
|
D | NetworkController.h | 115 int addUsersToNetwork(unsigned netId, const UidRanges& uidRanges) WARN_UNUSED_RESULT; 116 int removeUsersFromNetwork(unsigned netId, const UidRanges& uidRanges) WARN_UNUSED_RESULT;
|
D | SockDiag.h | 78 int destroySockets(const UidRanges& uidRanges, const std::set<uid_t>& skipUids,
|
D | NetdNativeService.cpp | 242 UidRanges uidRanges(uidRangeArray); in networkRejectNonSecureVpn() local 246 err = RouteController::addUsersToRejectNonSecureNetworkRule(uidRanges); in networkRejectNonSecureVpn() 248 err = RouteController::removeUsersFromRejectNonSecureNetworkRule(uidRanges); in networkRejectNonSecureVpn() 265 UidRanges uidRanges(uids); in socketDestroy() local 266 int err = sd.destroySockets(uidRanges, std::set<uid_t>(skipUids.begin(), skipUids.end()), in socketDestroy()
|
D | SockDiag.cpp | 406 int SockDiag::destroySockets(const UidRanges& uidRanges, const std::set<uid_t>& skipUids, in destroySockets() argument 413 uidRanges.hasUid(msg->idiag_uid) && in destroySockets() 434 mSocketsDestroyed, uidRanges.toString().c_str(), in destroySockets()
|
D | NetworkController.cpp | 565 int NetworkController::addUsersToNetwork(unsigned netId, const UidRanges& uidRanges) { in addUsersToNetwork() argument 576 if (int ret = static_cast<VirtualNetwork*>(network)->addUsers(uidRanges, mProtectableUsers)) { in addUsersToNetwork() 582 int NetworkController::removeUsersFromNetwork(unsigned netId, const UidRanges& uidRanges) { in removeUsersFromNetwork() argument 593 if (int ret = static_cast<VirtualNetwork*>(network)->removeUsers(uidRanges, in removeUsersFromNetwork()
|
D | SockDiagTest.cpp | 386 UidRanges uidRanges; in destroySockets() local 387 uidRanges.parseFrom(ARRAY_SIZE(uidRangeStrings), (char **) uidRangeStrings); in destroySockets() 388 ret = mSd.destroySockets(uidRanges, skipUids, excludeLoopback); in destroySockets()
|
D | CommandListener.cpp | 1502 UidRanges uidRanges; in runCommand() local 1503 if (!uidRanges.parseFrom(argc - 4, argv + 4)) { in runCommand() 1507 if (int ret = gCtls->netCtrl.addUsersToNetwork(netId, uidRanges)) { in runCommand() 1511 if (int ret = gCtls->netCtrl.removeUsersFromNetwork(netId, uidRanges)) { in runCommand()
|
/system/netd/tests/ |
D | binder_test.cpp | 480 std::vector<UidRange> uidRanges = { in TEST_F() local 487 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F() 489 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], suffix)); in TEST_F() 491 EXPECT_TRUE(mNetd->networkRemoveUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F() 492 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], suffix)); in TEST_F() 494 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F() 495 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], suffix)); in TEST_F() 497 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], suffix)); in TEST_F() 505 std::vector<UidRange> uidRanges = { in TEST_F() local 514 ASSERT_TRUE(mNetd->networkRejectNonSecureVpn(true, uidRanges).isOk()); in TEST_F() [all …]
|
/system/netd/server/binder/android/net/ |
D | INetd.aidl | 135 void networkAddUidRanges(int netId, in UidRange[] uidRanges); in networkAddUidRanges() argument 148 void networkRemoveUidRanges(int netId, in UidRange[] uidRanges); in networkRemoveUidRanges() argument 171 void networkRejectNonSecureVpn(boolean add, in UidRange[] uidRanges); in networkRejectNonSecureVpn() argument 176 void socketDestroy(in UidRange[] uidRanges, in int[] exemptUids); in socketDestroy() argument
|