Lines Matching refs:runCmd
48 int NatController::runCmd(const char *path, const char *cmd) { in runCmd() function in NatController
72 if (runCmd(IPTABLES_PATH, "-F natctrl_FORWARD")) in setDefaults()
74 if (runCmd(IPTABLES_PATH, "-t nat -F natctrl_nat_POSTROUTING")) in setDefaults()
77 runCmd(IP_PATH, "rule flush"); in setDefaults()
78 runCmd(IP_PATH, "-6 rule flush"); in setDefaults()
79 runCmd(IP_PATH, "rule add from all lookup default prio 32767"); in setDefaults()
80 runCmd(IP_PATH, "rule add from all lookup main prio 32766"); in setDefaults()
81 runCmd(IP_PATH, "-6 rule add from all lookup default prio 32767"); in setDefaults()
82 runCmd(IP_PATH, "-6 rule add from all lookup main prio 32766"); in setDefaults()
83 runCmd(IP_PATH, "route flush cache"); in setDefaults()
125 runCmd(IP_PATH, "route flush cache"); in enableNat()
135 runCmd(IP_PATH, "route flush cache"); in enableNat()
144 runCmd(IPTABLES_PATH, cmd); in enableNat()
146 runCmd(IPTABLES_PATH, cmd); in enableNat()
153 if (runCmd(IPTABLES_PATH, cmd)) { in enableNat()
176 if (runCmd(IPTABLES_PATH, cmd) && add) { in setForwardRules()
184 if (runCmd(IPTABLES_PATH, cmd) && add) { in setForwardRules()
190 runCmd(IPTABLES_PATH, cmd); in setForwardRules()
196 if (runCmd(IPTABLES_PATH, cmd) && add) { in setForwardRules()
202 runCmd(IPTABLES_PATH, cmd); in setForwardRules()
208 runCmd(IPTABLES_PATH, cmd); in setForwardRules()
248 runCmd(IP_PATH, "route flush cache"); in disableNat()