Lines Matching refs:costName

362 std::string BandwidthController::makeIptablesQuotaCmd(IptFullOp op, const char *costName, int64_t q…  in makeIptablesQuotaCmd()  argument
382 …asprintf(&buff, "%s bw_costly_%s -m quota2 ! --quota %" PRId64" --name %s", opFlag, costName, quot… in makeIptablesQuotaCmd()
383 costName); in makeIptablesQuotaCmd()
486 const char *costName = "shared"; in setInterfaceSharedQuota() local
515 quotaCmd = makeIptablesQuotaCmd(IptFullOpInsert, costName, maxBytes); in setInterfaceSharedQuota()
528 res |= updateQuota(costName, maxBytes); in setInterfaceSharedQuota()
530 ALOGE("Failed update quota for %s", costName); in setInterfaceSharedQuota()
554 const char *costName = "shared"; in removeInterfaceSharedQuota() local
578 quotaCmd = makeIptablesQuotaCmd(IptFullOpDelete, costName, sharedQuotaBytes); in removeInterfaceSharedQuota()
593 const char *costName; in setInterfaceQuota() local
614 costName = iface; in setInterfaceQuota()
630 quotaCmd = makeIptablesQuotaCmd(IptFullOpAppend, costName, maxBytes); in setInterfaceQuota()
640 res |= updateQuota(costName, maxBytes); in setInterfaceQuota()
664 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) { in getInterfaceQuota() argument
669 if (!isIfaceName(costName)) in getInterfaceQuota()
672 asprintf(&fname, "/proc/net/xt_quota/%s", costName); in getInterfaceQuota()
676 ALOGE("Reading quota %s failed (%s)", costName, strerror(errno)); in getInterfaceQuota()
906 int BandwidthController::setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes) { in setCostlyAlert() argument
912 if (!isIfaceName(costName)) { in setCostlyAlert()
913 ALOGE("setCostlyAlert: Invalid costName \"%s\"", costName); in setCostlyAlert()
921 asprintf(&alertName, "%sAlert", costName); in setCostlyAlert()
925 asprintf(&chainName, "bw_costly_%s", costName); in setCostlyAlert()
936 int BandwidthController::removeCostlyAlert(const char *costName, int64_t *alertBytes) { in removeCostlyAlert() argument
942 if (!isIfaceName(costName)) { in removeCostlyAlert()
943 ALOGE("removeCostlyAlert: Invalid costName \"%s\"", costName); in removeCostlyAlert()
948 ALOGE("No prior alert set for %s alert", costName); in removeCostlyAlert()
952 asprintf(&alertName, "%sAlert", costName); in removeCostlyAlert()
953 asprintf(&chainName, "bw_costly_%s", costName); in removeCostlyAlert()