Home
last modified time | relevance | path

Searched refs:chainName (Results 1 – 5 of 5) sorted by relevance

/system/netd/tests/
Dbinder_test.cpp119 static std::vector<std::string> listIptablesRule(const char *binary, const char *chainName) { in listIptablesRule() argument
120 std::string command = StringPrintf("%s -n -L %s", binary, chainName); in listIptablesRule()
124 static int iptablesRuleLineLength(const char *binary, const char *chainName) { in iptablesRuleLineLength() argument
125 return listIptablesRule(binary, chainName).size(); in iptablesRuleLineLength()
129 std::string chainName = StringPrintf("netd_binder_test_%u", arc4random_uniform(10000)); in TEST_F() local
140 mNetd->firewallReplaceUidChain(String16(chainName.c_str()), true, uids, &ret); in TEST_F()
143 EXPECT_EQ((int) uids.size() + 5, iptablesRuleLineLength(IPTABLES_PATH, chainName.c_str())); in TEST_F()
144 EXPECT_EQ((int) uids.size() + 11, iptablesRuleLineLength(IP6TABLES_PATH, chainName.c_str())); in TEST_F()
147 mNetd->firewallReplaceUidChain(String16(chainName.c_str()), false, noUids, &ret); in TEST_F()
150 EXPECT_EQ(3, iptablesRuleLineLength(IPTABLES_PATH, chainName.c_str())); in TEST_F()
[all …]
/system/netd/server/binder/android/net/
DINetd.aidl41 boolean firewallReplaceUidChain(String chainName, boolean isWhitelist, in int[] uids); in firewallReplaceUidChain() argument
/system/netd/server/
DBandwidthController.cpp1029 char *chainName; in setCostlyAlert() local
1046 asprintf(&chainName, "bw_costly_%s", costName); in setCostlyAlert()
1047 asprintf(&alertQuotaCmd, ALERT_IPT_TEMPLATE, "-A", chainName, bytes, alertName); in setCostlyAlert()
1050 free(chainName); in setCostlyAlert()
1059 char *chainName; in removeCostlyAlert() local
1074 asprintf(&chainName, "bw_costly_%s", costName); in removeCostlyAlert()
1075 asprintf(&alertQuotaCmd, ALERT_IPT_TEMPLATE, "-D", chainName, *alertBytes, alertName); in removeCostlyAlert()
1078 free(chainName); in removeCostlyAlert()
DNetdNativeService.cpp112 binder::Status NetdNativeService::firewallReplaceUidChain(const android::String16& chainName, in firewallReplaceUidChain() argument
116 android::String8 name = android::String8(chainName); in firewallReplaceUidChain()
DNetdNativeService.h38 const String16& chainName, bool isWhitelist,