Home
last modified time | relevance | path

Searched refs:uidRanges (Results 1 – 18 of 18) sorted by relevance

/system/netd/server/
DVirtualNetwork.cpp44 int VirtualNetwork::maybeCloseSockets(bool add, const UidRanges& uidRanges, in maybeCloseSockets() argument
55 if (int ret = sd.destroySockets(uidRanges, protectableUsers, true /* excludeLoopback */)) { in maybeCloseSockets()
57 add ? "adding" : "removing", uidRanges.toString().c_str(), mNetId, strerror(-ret)); in maybeCloseSockets()
64 int VirtualNetwork::addUsers(const UidRanges& uidRanges, const std::set<uid_t>& protectableUsers) { in addUsers() argument
65 maybeCloseSockets(true, uidRanges, protectableUsers); in addUsers()
69 uidRanges)) { in addUsers()
74 mUidRanges.add(uidRanges); in addUsers()
78 int VirtualNetwork::removeUsers(const UidRanges& uidRanges, in removeUsers() argument
80 maybeCloseSockets(false, uidRanges, protectableUsers); in removeUsers()
84 mSecure, uidRanges)) { in removeUsers()
[all …]
DRouteController.h68 bool secure, const UidRanges& uidRanges);
71 const UidRanges& uidRanges);
78 bool secure, const UidRanges& uidRanges);
80 bool secure, const UidRanges& uidRanges);
82 [[nodiscard]] static int addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges);
83 [[nodiscard]] static int removeUsersFromRejectNonSecureNetworkRule(const UidRanges& uidRanges);
138 const UidRanges& uidRanges, bool secure, bool add,
DVirtualNetwork.h41 [[nodiscard]] int addUsers(const UidRanges& uidRanges, const std::set<uid_t>& protectableUsers);
42 [[nodiscard]] int removeUsers(const UidRanges& uidRanges,
49 int maybeCloseSockets(bool add, const UidRanges& uidRanges,
DRouteController.cpp798 [[nodiscard]] static int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) { in modifyRejectNonSecureNetworkRule() argument
804 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyRejectNonSecureNetworkRule()
816 const UidRanges& uidRanges, bool secure, bool add, in modifyVirtualNetwork() argument
823 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyVirtualNetwork()
1076 bool secure, const UidRanges& uidRanges) { in addInterfaceToVirtualNetwork() argument
1077 if (int ret = modifyVirtualNetwork(netId, interface, uidRanges, secure, ACTION_ADD, in addInterfaceToVirtualNetwork()
1086 bool secure, const UidRanges& uidRanges) { in removeInterfaceFromVirtualNetwork() argument
1087 if (int ret = modifyVirtualNetwork(netId, interface, uidRanges, secure, ACTION_DEL, in removeInterfaceFromVirtualNetwork()
1108 int RouteController::addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges) { in addUsersToRejectNonSecureNetworkRule() argument
1109 return modifyRejectNonSecureNetworkRule(uidRanges, true); in addUsersToRejectNonSecureNetworkRule()
[all …]
DNetworkController.h119 [[nodiscard]] int addUsersToNetwork(unsigned netId, const UidRanges& uidRanges);
120 [[nodiscard]] int removeUsersFromNetwork(unsigned netId, const UidRanges& uidRanges);
DSockDiag.h77 int destroySockets(const UidRanges& uidRanges, const std::set<uid_t>& skipUids,
DSockDiag.cpp408 int SockDiag::destroySockets(const UidRanges& uidRanges, const std::set<uid_t>& skipUids, in destroySockets() argument
415 uidRanges.hasUid(msg->idiag_uid) && in destroySockets()
430 uidRanges.toString().c_str(), android::base::Join(skipUids, " ").c_str(), in destroySockets()
DNetworkController.cpp577 int NetworkController::addUsersToNetwork(unsigned netId, const UidRanges& uidRanges) { in addUsersToNetwork() argument
588 if (int ret = static_cast<VirtualNetwork*>(network)->addUsers(uidRanges, mProtectableUsers)) { in addUsersToNetwork()
594 int NetworkController::removeUsersFromNetwork(unsigned netId, const UidRanges& uidRanges) { in removeUsersFromNetwork() argument
605 if (int ret = static_cast<VirtualNetwork*>(network)->removeUsers(uidRanges, in removeUsersFromNetwork()
DSockDiagTest.cpp389 UidRanges uidRanges; in destroySockets() local
390 uidRanges.parseFrom(ARRAY_SIZE(uidRangeStrings), (char **) uidRangeStrings); in destroySockets()
391 ret = mSd.destroySockets(uidRanges, skipUids, excludeLoopback); in destroySockets()
DNdcDispatcher.cpp1180 UidRanges uidRanges; in runCommand() local
1181 if (!uidRanges.parseFrom(argc - 4, argv + 4)) { in runCommand()
1185 if (Status status = mNetd->networkAddUidRanges(netId, uidRanges.getRanges()); in runCommand()
1191 if (Status status = mNetd->networkRemoveUidRanges(netId, uidRanges.getRanges()); in runCommand()
DNetdNativeService.cpp402 UidRanges uidRanges(uidRangeArray); in networkRejectNonSecureVpn() local
406 err = RouteController::addUsersToRejectNonSecureNetworkRule(uidRanges); in networkRejectNonSecureVpn()
408 err = RouteController::removeUsersFromRejectNonSecureNetworkRule(uidRanges); in networkRejectNonSecureVpn()
423 UidRanges uidRanges(uids); in socketDestroy() local
424 int err = sd.destroySockets(uidRanges, std::set<uid_t>(skipUids.begin(), skipUids.end()), in socketDestroy()
/system/netd/server/aidl_api/netd_aidl_interface/1/android/net/
DINetd.aidl11 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
12 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
13 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
14 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/2/android/net/
DINetd.aidl28 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
29 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
30 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
31 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/3/android/net/
DINetd.aidl29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
31 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
32 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/
DINetd.aidl29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
31 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
32 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/binder/android/net/
DINetd.aidl138 void networkAddUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
151 void networkRemoveUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
174 void networkRejectNonSecureVpn(boolean add, in UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
179 void socketDestroy(in UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/4/android/net/
DINetd.aidl29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
31 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
32 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/tests/
Dbinder_test.cpp570 std::vector<UidRangeParcel> uidRanges = {makeUidRangeParcel(BASE_UID + 8005, BASE_UID + 8012), in TEST_F() local
575 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
577 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], suffix)); in TEST_F()
579 EXPECT_TRUE(mNetd->networkRemoveUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
580 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], suffix)); in TEST_F()
582 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
583 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], suffix)); in TEST_F()
585 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], suffix)); in TEST_F()
593 std::vector<UidRangeParcel> uidRanges = {makeUidRangeParcel(BASE_UID + 150, BASE_UID + 224), in TEST_F() local
596 for (auto const& range : uidRanges) { in TEST_F()
[all …]