Home
last modified time | relevance | path

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

12

/system/netd/server/
DUnreachableNetwork.cpp29 int UnreachableNetwork::addUsers(const UidRanges& uidRanges, uint32_t subPriority) { in addUsers() argument
30 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges, subPriority)) { in addUsers()
34 int ret = RouteController::addUsersToUnreachableNetwork(mNetId, {{subPriority, uidRanges}}); in addUsers()
39 addToUidRangeMap(uidRanges, subPriority); in addUsers()
43 int UnreachableNetwork::removeUsers(const UidRanges& uidRanges, uint32_t subPriority) { in removeUsers() argument
47 RouteController::removeUsersFromUnreachableNetwork(mNetId, {{subPriority, uidRanges}}); in removeUsers()
52 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DNetwork.cpp90 for (const auto& [priority, uidRanges] : mUidRangeMap) { in appliesToUser()
91 if (uidRanges.hasUid(uid)) { in appliesToUser()
99 void Network::addToUidRangeMap(const UidRanges& uidRanges, uint32_t subPriority) { in addToUidRangeMap() argument
102 iter->second.add(uidRanges); in addToUidRangeMap()
104 mUidRangeMap[subPriority] = uidRanges; in addToUidRangeMap()
108 void Network::removeFromUidRangeMap(const UidRanges& uidRanges, uint32_t subPriority) { in removeFromUidRangeMap() argument
111 iter->second.remove(uidRanges); in removeFromUidRangeMap()
120 bool Network::canAddUidRanges(const UidRanges& uidRanges, uint32_t subPriority) const { in canAddUidRanges() argument
121 if (uidRanges.overlapsSelf()) { in canAddUidRanges()
122 ALOGE("uid range %s overlaps self", uidRanges.toString().c_str()); in canAddUidRanges()
[all …]
DVirtualNetwork.cpp34 int VirtualNetwork::addUsers(const UidRanges& uidRanges, uint32_t subPriority) { in addUsers() argument
35 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges, subPriority)) { in addUsers()
41 {{subPriority, uidRanges}}); in addUsers()
47 addToUidRangeMap(uidRanges, subPriority); in addUsers()
51 int VirtualNetwork::removeUsers(const UidRanges& uidRanges, uint32_t subPriority) { in removeUsers() argument
56 {{subPriority, uidRanges}}); in removeUsers()
62 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DPhysicalNetwork.cpp161 int PhysicalNetwork::addUsers(const UidRanges& uidRanges, uint32_t subPriority) { in addUsers() argument
162 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges, subPriority)) { in addUsers()
168 {{subPriority, uidRanges}}); in addUsers()
174 addToUidRangeMap(uidRanges, subPriority); in addUsers()
178 int PhysicalNetwork::removeUsers(const UidRanges& uidRanges, uint32_t subPriority) { in removeUsers() argument
183 {{subPriority, uidRanges}}); in removeUsers()
189 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DNetwork.h63 virtual void addToUidRangeMap(const UidRanges& uidRanges, uint32_t subPriority);
64 virtual void removeFromUidRangeMap(const UidRanges& uidRanges, uint32_t subPriority);
68 bool canAddUidRanges(const UidRanges& uidRanges, uint32_t subPriority) const;
DUnreachableNetwork.h26 [[nodiscard]] int addUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
27 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
DVirtualNetwork.h36 [[nodiscard]] int addUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
37 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
DPhysicalNetwork.h45 [[nodiscard]] int addUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
46 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, uint32_t subPriority) override;
DRouteController.cpp802 for (const auto& [subPriority, uidRanges] : uidRangeMap) { in modifyPhysicalNetwork()
803 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyPhysicalNetwork()
915 for (const auto& [subPriority, uidRanges] : uidRangeMap) { in modifyUnreachableNetwork()
916 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyUnreachableNetwork()
935 [[nodiscard]] static int modifyRejectNonSecureNetworkRule(const UidRanges& uidRanges, bool add) { in modifyRejectNonSecureNetworkRule() argument
941 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyRejectNonSecureNetworkRule()
960 for (const auto& [subPriority, uidRanges] : uidRangeMap) { in modifyVirtualNetwork()
961 for (const UidRangeParcel& range : uidRanges.getRanges()) { in modifyVirtualNetwork()
1257 int RouteController::addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges) { in addUsersToRejectNonSecureNetworkRule() argument
1258 return modifyRejectNonSecureNetworkRule(uidRanges, true); in addUsersToRejectNonSecureNetworkRule()
[all …]
DNetworkController.h122 [[nodiscard]] int addUsersToNetwork(unsigned netId, const UidRanges& uidRanges,
124 [[nodiscard]] int removeUsersFromNetwork(unsigned netId, const UidRanges& uidRanges,
DRouteController.h134 [[nodiscard]] static int addUsersToRejectNonSecureNetworkRule(const UidRanges& uidRanges);
135 [[nodiscard]] static int removeUsersFromRejectNonSecureNetworkRule(const UidRanges& uidRanges);
DSockDiag.h77 int destroySockets(const UidRanges& uidRanges, const std::set<uid_t>& skipUids,
/system/netd/server/aidl_api/netd_aidl_interface/7/android/net/netd/aidl/
DNativeUidRangeConfig.aidl39 android.net.UidRangeParcel[] uidRanges;
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/netd/aidl/
DNativeUidRangeConfig.aidl39 android.net.UidRangeParcel[] uidRanges;
/system/netd/server/binder/android/net/netd/aidl/
DNativeUidRangeConfig.aidl33 UidRangeParcel[] uidRanges;
/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/tests/
Dbinder_test.cpp616 std::vector<UidRangeParcel>&& uidRanges, in makeNativeUidRangeConfig() argument
620 res.uidRanges = uidRanges; in makeNativeUidRangeConfig()
658 std::vector<UidRangeParcel> uidRanges = {makeUidRangeParcel(BASE_UID + 8005, BASE_UID + 8012), in TEST_F() local
663 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
665 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], action)); in TEST_F()
667 EXPECT_TRUE(mNetd->networkRemoveUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
668 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[0], action)); in TEST_F()
670 EXPECT_TRUE(mNetd->networkAddUidRanges(TEST_NETID1, uidRanges).isOk()); in TEST_F()
671 EXPECT_TRUE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], action)); in TEST_F()
673 EXPECT_FALSE(ipRuleExistsForRange(RULE_PRIORITY_SECURE_VPN, uidRanges[1], action)); in TEST_F()
[all …]
/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/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/server/aidl_api/netd_aidl_interface/7/android/net/
DINetd.aidl51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
53 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
54 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/6/android/net/
DINetd.aidl51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
53 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
54 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/binder/android/net/
DINetd.aidl142 void networkAddUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
155 void networkRemoveUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
178 void networkRejectNonSecureVpn(boolean add, in UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
183 void socketDestroy(in UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/
DINetd.aidl51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument
52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument
53 void networkRejectNonSecureVpn(boolean add, in android.net.UidRangeParcel[] uidRanges); in networkRejectNonSecureVpn() argument
54 void socketDestroy(in android.net.UidRangeParcel[] uidRanges, in int[] exemptUids); in socketDestroy() argument
/system/netd/server/aidl_api/netd_aidl_interface/5/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

12