Lines Matching refs:res
155 int res = 0; in runIpxtablesCmd() local
158 res |= runIptablesCmd(cmd, jumpHandling, IptIpV4, failureHandling); in runIpxtablesCmd()
159 res |= runIptablesCmd(cmd, jumpHandling, IptIpV6, failureHandling); in runIpxtablesCmd()
160 return res; in runIpxtablesCmd()
177 int res; in runIptablesCmd() local
216 res = android_fork_execvp(argc, (char **)argv, &status, false, in runIptablesCmd()
218 res = res || !WIFEXITED(status) || WEXITSTATUS(status); in runIptablesCmd()
219 if (res && failureHandling == IptFailShow) { in runIptablesCmd()
220 ALOGE("runIptablesCmd(): res=%d status=%d failed %s", res, status, in runIptablesCmd()
223 return res; in runIptablesCmd()
251 int res; in enableBandwidthControl() local
270 res = runCommands(sizeof(IPT_BASIC_ACCOUNTING_COMMANDS) / sizeof(char*), in enableBandwidthControl()
273 return res; in enableBandwidthControl()
285 int res = 0; in runCommands() local
292 res = runIpxtablesCmd(commands[cmdNum], IptJumpNoAdd, failureLogging); in runCommands()
293 if (res && cmdErrHandling != RunCmdFailureOk) in runCommands()
294 return res; in runCommands()
300 std::string res; in makeIptablesSpecialAppCmd() local
310 res = ""; in makeIptablesSpecialAppCmd()
311 return res; in makeIptablesSpecialAppCmd()
322 res = buff; in makeIptablesSpecialAppCmd()
324 return res; in makeIptablesSpecialAppCmd()
329 int res = 0; in enableHappyBox() local
343 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
348 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
354 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
356 return res; in enableHappyBox()
474 std::string res; in makeIptablesQuotaCmd() local
499 res = buff; in makeIptablesQuotaCmd()
501 return res; in makeIptablesQuotaCmd()
506 int res = 0, res1, res2; in prepCostlyIface() local
526 res = (res1 && res2) || (!res1 && !res2); in prepCostlyIface()
529 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
548 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
554 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
555 return res; in prepCostlyIface()
560 int res = 0; in cleanupCostlyIface() local
579 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
581 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
586 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
588 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
590 return res; in cleanupCostlyIface()
596 int res = 0; in setInterfaceSharedQuota() local
625 res |= prepCostlyIface(ifn, QuotaShared); in setInterfaceSharedQuota()
628 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in setInterfaceSharedQuota()
629 if (res) { in setInterfaceSharedQuota()
640 res |= updateQuota(costName, maxBytes); in setInterfaceSharedQuota()
641 if (res) { in setInterfaceSharedQuota()
663 int res = 0; in removeInterfaceSharedQuota() local
683 res |= cleanupCostlyIface(ifn, QuotaShared); in removeInterfaceSharedQuota()
689 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in removeInterfaceSharedQuota()
696 return res; in removeInterfaceSharedQuota()
701 int res = 0; in setInterfaceQuota() local
731 res |= prepCostlyIface(ifn, QuotaUnique); in setInterfaceQuota()
738 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in setInterfaceQuota()
739 if (res) { in setInterfaceQuota()
747 res |= updateQuota(costName, maxBytes); in setInterfaceQuota()
748 if (res) { in setInterfaceQuota()
792 int res = 0; in removeInterfaceQuota() local
815 res |= cleanupCostlyIface(ifn, QuotaUnique); in removeInterfaceQuota()
819 return res; in removeInterfaceQuota()
839 int res = 0; in runIptablesAlertCmd() local
861 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertCmd()
865 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertCmd()
867 return res; in runIptablesAlertCmd()
871 int res = 0; in runIptablesAlertFwdCmd() local
893 res = runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertFwdCmd()
895 return res; in runIptablesAlertFwdCmd()
900 int res = 0; in setGlobalAlert() local
907 res = updateQuota(alertName, bytes); in setGlobalAlert()
909 res = runIptablesAlertCmd(IptOpInsert, alertName, bytes); in setGlobalAlert()
912 res |= runIptablesAlertFwdCmd(IptOpInsert, alertName, bytes); in setGlobalAlert()
916 return res; in setGlobalAlert()
921 int res = 0; in setGlobalAlertInForwardChain() local
936 res = runIptablesAlertFwdCmd(IptOpInsert, alertName, globalAlertBytes); in setGlobalAlertInForwardChain()
937 return res; in setGlobalAlertInForwardChain()
943 int res = 0; in removeGlobalAlert() local
949 res = runIptablesAlertCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlert()
951 res |= runIptablesAlertFwdCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlert()
954 return res; in removeGlobalAlert()
958 int res = 0; in removeGlobalAlertInForwardChain() local
977 res = runIptablesAlertFwdCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlertInForwardChain()
978 return res; in removeGlobalAlertInForwardChain()
1036 int res = 0; in setCostlyAlert() local
1045 res = updateQuota(alertName, *alertBytes); in setCostlyAlert()
1049 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in setCostlyAlert()
1055 return res; in setCostlyAlert()
1062 int res = 0; in removeCostlyAlert() local
1072 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in removeCostlyAlert()
1078 return res; in removeCostlyAlert()
1092 int res; in parseForwardChainStats() local
1113 res = sscanf(buffPtr, "%lld %lld RETURN all -- %s %s 0.%s", in parseForwardChainStats()
1115 … ALOGV("parse res=%d iface0=<%s> iface1=<%s> pkts=%lld bytes=%lld rest=<%s> orig line=<%s>", res, in parseForwardChainStats()
1119 if (res != 5) { in parseForwardChainStats()
1194 int res; in getTetherStats() local
1215 res = parseForwardChainStats(cli, stats, iptOutput, extraProcessingInfo); in getTetherStats()
1219 return res; in getTetherStats()
1223 int res; in flushExistingCostlyTables() local
1242 int res; in parseAndFlushCostlyTables() local
1250 res = sscanf(buffPtr, "-N bw_costly_%s", costlyIfaceName); in parseAndFlushCostlyTables()
1251 ALOGV("parse res=%d costly=<%s> orig line=<%s>", res, in parseAndFlushCostlyTables()
1253 if (res != 1) { in parseAndFlushCostlyTables()