/system/netd/tests/ |
D | test_utils.cpp | 66 std::vector<std::string> listIptablesRule(const char* binary, const char* chainName) { in listIptablesRule() argument 67 std::string command = StringPrintf("%s -w -n -L %s", binary, chainName); in listIptablesRule() 71 int iptablesRuleLineLength(const char* binary, const char* chainName) { in iptablesRuleLineLength() argument 72 return listIptablesRule(binary, chainName).size(); in iptablesRuleLineLength() 75 bool iptablesRuleExists(const char* binary, const char* chainName, in iptablesRuleExists() argument 77 std::vector<std::string> rules = listIptablesRule(binary, chainName); in iptablesRuleExists()
|
D | test_utils.h | 30 std::vector<std::string> listIptablesRule(const char* binary, const char* chainName); 32 int iptablesRuleLineLength(const char* binary, const char* chainName); 34 bool iptablesRuleExists(const char* binary, const char* chainName, const std::string& expectedRule);
|
D | binder_test.cpp | 202 static bool iptablesNoSocketAllowRuleExists(const char *chainName){ in iptablesNoSocketAllowRuleExists() argument 203 return iptablesRuleExists(IPTABLES_PATH, chainName, NO_SOCKET_ALLOW_RULE) && in iptablesNoSocketAllowRuleExists() 204 iptablesRuleExists(IP6TABLES_PATH, chainName, NO_SOCKET_ALLOW_RULE); in iptablesNoSocketAllowRuleExists() 207 static bool iptablesEspAllowRuleExists(const char *chainName){ in iptablesEspAllowRuleExists() argument 208 return iptablesRuleExists(IPTABLES_PATH, chainName, ESP_ALLOW_RULE) && in iptablesEspAllowRuleExists() 209 iptablesRuleExists(IP6TABLES_PATH, chainName, ESP_ALLOW_RULE); in iptablesEspAllowRuleExists() 215 std::string chainName = StringPrintf("netd_binder_test_%u", arc4random_uniform(10000)); in TEST_F() local 226 mNetd->firewallReplaceUidChain(chainName, true, uids, &ret); in TEST_F() 229 EXPECT_EQ((int) uids.size() + 9, iptablesRuleLineLength(IPTABLES_PATH, chainName.c_str())); in TEST_F() 230 EXPECT_EQ((int) uids.size() + 15, iptablesRuleLineLength(IP6TABLES_PATH, chainName.c_str())); in TEST_F() [all …]
|
/system/netd/server/ |
D | BandwidthController.cpp | 336 const char *chainName = "bw_data_saver"; in makeDataSaverCommand() local 339 FirewallController::makeCriticalCommands(target, chainName) : ""; in makeDataSaverCommand() 345 "COMMIT\n", chainName, criticalCommands.c_str(), chainName, op); in makeDataSaverCommand() 769 std::string chainName = "bw_costly_" + costName; in setCostlyAlert() local 775 StringPrintf(ALERT_IPT_TEMPLATE, "-A", chainName.c_str(), bytes, alertName.c_str()), in setCostlyAlert() 802 std::string chainName = "bw_costly_" + costName; in removeCostlyAlert() local 805 StringPrintf(ALERT_IPT_TEMPLATE, "-D", chainName.c_str(), *alertBytes, alertName.c_str()), in removeCostlyAlert() 834 std::string chainName; in parseAndFlushCostlyTables() local 839 chainName = rule.substr(NEW_CHAIN_COMMAND.size()); in parseAndFlushCostlyTables() 840 ALOGV("parse chainName=<%s> orig line=<%s>", chainName.c_str(), rule.c_str()); in parseAndFlushCostlyTables() [all …]
|
D | FirewallController.cpp | 266 for (const std::string& chainName : chainNames) { in setUidRule() local 268 op, chainName.c_str(), uid, target); in setUidRule() 281 std::string FirewallController::makeCriticalCommands(IptablesTarget target, const char* chainName) { in makeCriticalCommands() argument 287 chainName, ICMPV6_TYPES[i]); in makeCriticalCommands()
|
D | FirewallController.h | 76 static std::string makeCriticalCommands(IptablesTarget target, const char* chainName);
|
D | NetdNativeService.h | 40 binder::Status firewallReplaceUidChain(const std::string& chainName, bool isAllowlist,
|
D | NetdNativeService.cpp | 270 binder::Status NetdNativeService::firewallReplaceUidChain(const std::string& chainName, in firewallReplaceUidChain() argument 275 int err = gCtls->firewallCtrl.replaceUidChain(chainName, isAllowlist, uids); in firewallReplaceUidChain()
|
/system/netd/server/aidl_api/netd_aidl_interface/1/android/net/ |
D | INetd.aidl | 4 …boolean firewallReplaceUidChain(in @utf8InCpp String chainName, boolean isWhitelist, in int[] uids… in firewallReplaceUidChain() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/2/android/net/ |
D | INetd.aidl | 21 …boolean firewallReplaceUidChain(in @utf8InCpp String chainName, boolean isWhitelist, in int[] uids… in firewallReplaceUidChain() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/3/android/net/ |
D | INetd.aidl | 22 …boolean firewallReplaceUidChain(in @utf8InCpp String chainName, boolean isWhitelist, in int[] uids… in firewallReplaceUidChain() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/ |
D | INetd.aidl | 22 …boolean firewallReplaceUidChain(in @utf8InCpp String chainName, boolean isWhitelist, in int[] uids… in firewallReplaceUidChain() argument
|
/system/netd/server/binder/android/net/ |
D | INetd.aidl | 48 boolean firewallReplaceUidChain(in @utf8InCpp String chainName, in firewallReplaceUidChain() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/4/android/net/ |
D | INetd.aidl | 22 …boolean firewallReplaceUidChain(in @utf8InCpp String chainName, boolean isWhitelist, in int[] uids… in firewallReplaceUidChain() argument
|