Home
last modified time | relevance | path

Searched refs:subPriority (Results 1 – 13 of 13) sorted by relevance

/system/netd/server/
DUnreachableNetwork.cpp29 int UnreachableNetwork::addUsers(const UidRanges& uidRanges, int32_t subPriority) { in addUsers() argument
30 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges)) { 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, int32_t subPriority) { in removeUsers() argument
44 if (!isValidSubPriority(subPriority)) return -EINVAL; in removeUsers()
47 RouteController::removeUsersFromUnreachableNetwork(mNetId, {{subPriority, uidRanges}}); in removeUsers()
52 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DVirtualNetwork.cpp35 int VirtualNetwork::addUsers(const UidRanges& uidRanges, int32_t subPriority) { in addUsers() argument
36 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges)) { in addUsers()
42 {{subPriority, uidRanges}}, in addUsers()
49 addToUidRangeMap(uidRanges, subPriority); in addUsers()
53 int VirtualNetwork::removeUsers(const UidRanges& uidRanges, int32_t subPriority) { in removeUsers() argument
54 if (!isValidSubPriority(subPriority)) return -EINVAL; in removeUsers()
58 {{subPriority, uidRanges}}, in removeUsers()
65 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DNetwork.cpp96 bool Network::appliesToUser(uid_t uid, int32_t* subPriority) const { in appliesToUser()
99 *subPriority = priority; in appliesToUser()
106 void Network::addToUidRangeMap(const UidRanges& uidRanges, int32_t subPriority) { in addToUidRangeMap() argument
107 auto iter = mUidRangeMap.find(subPriority); in addToUidRangeMap()
111 mUidRangeMap[subPriority] = uidRanges; in addToUidRangeMap()
115 void Network::removeFromUidRangeMap(const UidRanges& uidRanges, int32_t subPriority) { in removeFromUidRangeMap() argument
116 auto iter = mUidRangeMap.find(subPriority); in removeFromUidRangeMap()
120 mUidRangeMap.erase(subPriority); in removeFromUidRangeMap()
123 ALOGW("uidRanges with priority %d not found", subPriority); in removeFromUidRangeMap()
DPhysicalNetwork.cpp170 int PhysicalNetwork::addUsers(const UidRanges& uidRanges, int32_t subPriority) { in addUsers() argument
171 if (!isValidSubPriority(subPriority) || !canAddUidRanges(uidRanges)) { in addUsers()
177 mNetId, interface.c_str(), {{subPriority, uidRanges}}, mIsLocalNetwork); in addUsers()
183 addToUidRangeMap(uidRanges, subPriority); in addUsers()
187 int PhysicalNetwork::removeUsers(const UidRanges& uidRanges, int32_t subPriority) { in removeUsers() argument
188 if (!isValidSubPriority(subPriority)) return -EINVAL; in removeUsers()
192 mNetId, interface.c_str(), {{subPriority, uidRanges}}, mIsLocalNetwork); in removeUsers()
198 removeFromUidRangeMap(uidRanges, subPriority); in removeUsers()
DNetwork.h52 bool appliesToUser(uid_t uid, int32_t* subPriority) const;
66 virtual void addToUidRangeMap(const UidRanges& uidRanges, int32_t subPriority);
67 virtual void removeFromUidRangeMap(const UidRanges& uidRanges, int32_t subPriority);
DUnreachableNetwork.h27 [[nodiscard]] int addUsers(const UidRanges& uidRanges, int32_t subPriority) override;
28 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, int32_t subPriority) override;
DRouteController.cpp518 int32_t subPriority, bool secure, bool add, in modifyVpnUidRangeRule() argument
538 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority + subPriority, table, in modifyVpnUidRangeRule()
580 uid_t uidEnd, int32_t subPriority, bool add) { in modifyExplicitNetworkRule() argument
594 RULE_PRIORITY_EXPLICIT_NETWORK + subPriority, table, fwmark.intValue, in modifyExplicitNetworkRule()
632 uid_t uidEnd, int32_t subPriority, bool add) { in modifyOutputInterfaceRules() argument
651 RULE_PRIORITY_OUTPUT_INTERFACE + subPriority, table, fwmark.intValue, in modifyOutputInterfaceRules()
837 uid_t uidEnd, int32_t subPriority, bool add, in modifyUidNetworkRule() argument
858 explicitSelect ? (RULE_PRIORITY_UID_EXPLICIT_NETWORK + subPriority) in modifyUidNetworkRule()
859 : (RULE_PRIORITY_UID_IMPLICIT_NETWORK + subPriority), in modifyUidNetworkRule()
865 int32_t subPriority, bool add) { in modifyUidDefaultNetworkRule() argument
[all …]
DVirtualNetwork.h39 [[nodiscard]] int addUsers(const UidRanges& uidRanges, int32_t subPriority) override;
40 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, int32_t subPriority) override;
DNetworkController.cpp638 int32_t subPriority) { in addUsersToNetwork() argument
644 return network->addUsers(uidRanges, subPriority); in addUsersToNetwork()
648 int32_t subPriority) { in removeUsersFromNetwork() argument
654 return network->removeUsers(uidRanges, subPriority); in removeUsersFromNetwork()
859 int32_t subPriority; in getVirtualNetworkForUserLocked() local
861 if (network->isVirtual() && network->appliesToUser(uid, &subPriority)) { in getVirtualNetworkForUserLocked()
883 int32_t subPriority; in getPhysicalOrUnreachableNetworkForUserLocked() local
885 if (!network->appliesToUser(uid, &subPriority)) continue; in getPhysicalOrUnreachableNetworkForUserLocked()
886 if (subPriority == UidRanges::SUB_PRIORITY_NO_DEFAULT) continue; in getPhysicalOrUnreachableNetworkForUserLocked()
888 if (subPriority < bestSubPriority) { in getPhysicalOrUnreachableNetworkForUserLocked()
[all …]
DPhysicalNetwork.h45 [[nodiscard]] int addUsers(const UidRanges& uidRanges, int32_t subPriority) override;
46 [[nodiscard]] int removeUsers(const UidRanges& uidRanges, int32_t subPriority) override;
DNetworkController.h124 int32_t subPriority);
126 int32_t subPriority);
DNetdNativeService.cpp348 config.subPriority); in networkAddUidRangesParcel()
355 config.subPriority); in networkRemoveUidRangesParcel()
/system/netd/tests/
Dbinder_test.cpp820 int32_t subPriority) { in makeNativeUidRangeConfig() argument
824 res.subPriority = subPriority; in makeNativeUidRangeConfig()
4083 const std::string& iface, int32_t subPriority) { in verifyAppUidRules() argument
4090 ipRuleExistsForRange(RULE_PRIORITY_UID_EXPLICIT_NETWORK + subPriority, in verifyAppUidRules()
4093 ipRuleExistsForRange(RULE_PRIORITY_UID_IMPLICIT_NETWORK + subPriority, in verifyAppUidRules()
4096 ipRuleExistsForRange(RULE_PRIORITY_UID_DEFAULT_NETWORK + subPriority, in verifyAppUidRules()
4105 ipRuleExistsForRange(RULE_PRIORITY_UID_EXPLICIT_NETWORK + subPriority, in verifyAppUidRules()
4108 ipRuleExistsForRange(RULE_PRIORITY_UID_IMPLICIT_NETWORK + subPriority, in verifyAppUidRules()
4111 ipRuleExistsForRange(RULE_PRIORITY_UID_DEFAULT_UNREACHABLE + subPriority, in verifyAppUidRules()
4120 uidRangeConfig.subPriority); in verifyAppUidRules()
[all …]