Lines Matching refs:res

159     int res = 0;  in runIpxtablesCmd()  local
162 res |= runIptablesCmd(cmd, jumpHandling, IptIpV4, failureHandling); in runIpxtablesCmd()
163 res |= runIptablesCmd(cmd, jumpHandling, IptIpV6, failureHandling); in runIpxtablesCmd()
164 return res; in runIpxtablesCmd()
181 int res; in runIptablesCmd() local
220 res = android_fork_execvp(argc, (char **)argv, &status, false, in runIptablesCmd()
222 res = res || !WIFEXITED(status) || WEXITSTATUS(status); in runIptablesCmd()
223 if (res && failureHandling == IptFailShow) { in runIptablesCmd()
224 ALOGE("runIptablesCmd(): res=%d status=%d failed %s", res, status, in runIptablesCmd()
227 return res; in runIptablesCmd()
255 int res; in enableBandwidthControl() local
274 res = runCommands(sizeof(IPT_BASIC_ACCOUNTING_COMMANDS) / sizeof(char*), in enableBandwidthControl()
277 return res; in enableBandwidthControl()
289 int res = 0; in runCommands() local
296 res = runIpxtablesCmd(commands[cmdNum], IptJumpNoAdd, failureLogging); in runCommands()
297 if (res && cmdErrHandling != RunCmdFailureOk) in runCommands()
298 return res; in runCommands()
304 std::string res; in makeIptablesSpecialAppCmd() local
314 res = ""; in makeIptablesSpecialAppCmd()
315 return res; in makeIptablesSpecialAppCmd()
326 res = buff; in makeIptablesSpecialAppCmd()
328 return res; in makeIptablesSpecialAppCmd()
333 int res = 0; in enableHappyBox() local
347 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
352 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
358 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in enableHappyBox()
360 return res; in enableHappyBox()
477 std::string res; in makeIptablesQuotaCmd() local
502 res = buff; in makeIptablesQuotaCmd()
504 return res; in makeIptablesQuotaCmd()
509 int res = 0, res1, res2; in prepCostlyIface() local
529 res = (res1 && res2) || (!res1 && !res2); in prepCostlyIface()
532 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
551 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
557 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in prepCostlyIface()
558 return res; in prepCostlyIface()
563 int res = 0; in cleanupCostlyIface() local
582 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
584 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
589 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
591 res |= runIpxtablesCmd(cmd, IptJumpNoAdd); in cleanupCostlyIface()
593 return res; in cleanupCostlyIface()
598 int res = 0; in setInterfaceSharedQuota() local
629 res |= prepCostlyIface(ifn, QuotaShared); in setInterfaceSharedQuota()
632 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in setInterfaceSharedQuota()
633 if (res) { in setInterfaceSharedQuota()
644 res |= updateQuota(costName, maxBytes); in setInterfaceSharedQuota()
645 if (res) { in setInterfaceSharedQuota()
667 int res = 0; in removeInterfaceSharedQuota() local
689 res |= cleanupCostlyIface(ifn, QuotaShared); in removeInterfaceSharedQuota()
695 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in removeInterfaceSharedQuota()
702 return res; in removeInterfaceSharedQuota()
707 int res = 0; in setInterfaceQuota() local
740 res |= prepCostlyIface(ifn, QuotaUnique); in setInterfaceQuota()
747 res |= runIpxtablesCmd(quotaCmd.c_str(), IptJumpReject); in setInterfaceQuota()
748 if (res) { in setInterfaceQuota()
756 res |= updateQuota(costName, maxBytes); in setInterfaceQuota()
757 if (res) { in setInterfaceQuota()
804 int res = 0; in removeInterfaceQuota() local
829 res |= cleanupCostlyIface(ifn, QuotaUnique); in removeInterfaceQuota()
833 return res; in removeInterfaceQuota()
858 int res = 0; in runIptablesAlertCmd() local
880 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertCmd()
884 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertCmd()
886 return res; in runIptablesAlertCmd()
890 int res = 0; in runIptablesAlertFwdCmd() local
912 res = runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in runIptablesAlertFwdCmd()
914 return res; in runIptablesAlertFwdCmd()
919 int res = 0; in setGlobalAlert() local
926 res = updateQuota(alertName, bytes); in setGlobalAlert()
928 res = runIptablesAlertCmd(IptOpInsert, alertName, bytes); in setGlobalAlert()
931 res |= runIptablesAlertFwdCmd(IptOpInsert, alertName, bytes); in setGlobalAlert()
935 return res; in setGlobalAlert()
940 int res = 0; in setGlobalAlertInForwardChain() local
955 res = runIptablesAlertFwdCmd(IptOpInsert, alertName, globalAlertBytes); in setGlobalAlertInForwardChain()
956 return res; in setGlobalAlertInForwardChain()
962 int res = 0; in removeGlobalAlert() local
968 res = runIptablesAlertCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlert()
970 res |= runIptablesAlertFwdCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlert()
973 return res; in removeGlobalAlert()
977 int res = 0; in removeGlobalAlertInForwardChain() local
996 res = runIptablesAlertFwdCmd(IptOpDelete, alertName, globalAlertBytes); in removeGlobalAlertInForwardChain()
997 return res; in removeGlobalAlertInForwardChain()
1065 int res = 0; in setCostlyAlert() local
1079 res = updateQuota(alertName, *alertBytes); in setCostlyAlert()
1083 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in setCostlyAlert()
1089 return res; in setCostlyAlert()
1096 int res = 0; in removeCostlyAlert() local
1111 res |= runIpxtablesCmd(alertQuotaCmd, IptJumpNoAdd); in removeCostlyAlert()
1117 return res; in removeCostlyAlert()
1133 int res; in parseForwardChainStats() local
1155 res = sscanf(buffPtr, "%" SCNd64" %" SCNd64" RETURN all -- %s %s 0.%s", in parseForwardChainStats()
1157 …rse res=%d iface0=<%s> iface1=<%s> pkts=%" PRId64" bytes=%" PRId64" rest=<%s> orig line=<%s>", res, in parseForwardChainStats()
1161 if (res != 5) { in parseForwardChainStats()
1240 int res; in getTetherStats() local
1260 res = parseForwardChainStats(cli, stats, iptOutput, extraProcessingInfo); in getTetherStats()
1264 return res; in getTetherStats()
1285 int res; in parseAndFlushCostlyTables() local
1293 res = sscanf(buffPtr, "-N bw_costly_%s", costlyIfaceName); in parseAndFlushCostlyTables()
1294 ALOGV("parse res=%d costly=<%s> orig line=<%s>", res, in parseAndFlushCostlyTables()
1296 if (res != 1) { in parseAndFlushCostlyTables()