Lines Matching refs:costName

435 std::string BandwidthController::makeIptablesQuotaCmd(IptOp op, const char *costName, int64_t quota…  in makeIptablesQuotaCmd()  argument
459 …asprintf(&buff, "%s bw_costly_%s -m quota2 ! --quota %" PRId64" --name %s", opFlag, costName, quot… in makeIptablesQuotaCmd()
460 costName); in makeIptablesQuotaCmd()
569 const char *costName = "shared"; in setInterfaceSharedQuota() local
598 quotaCmd = makeIptablesQuotaCmd(IptOpInsert, costName, maxBytes); in setInterfaceSharedQuota()
611 res |= updateQuota(costName, maxBytes); in setInterfaceSharedQuota()
613 ALOGE("Failed update quota for %s", costName); in setInterfaceSharedQuota()
637 const char *costName = "shared"; in removeInterfaceSharedQuota() local
661 quotaCmd = makeIptablesQuotaCmd(IptOpDelete, costName, sharedQuotaBytes); in removeInterfaceSharedQuota()
676 const char *costName; in setInterfaceQuota() local
697 costName = iface; in setInterfaceQuota()
713 quotaCmd = makeIptablesQuotaCmd(IptOpAppend, costName, maxBytes); in setInterfaceQuota()
723 res |= updateQuota(costName, maxBytes); in setInterfaceQuota()
747 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) { in getInterfaceQuota() argument
752 if (!isIfaceName(costName)) in getInterfaceQuota()
755 asprintf(&fname, "/proc/net/xt_quota/%s", costName); in getInterfaceQuota()
759 ALOGE("Reading quota %s failed (%s)", costName, strerror(errno)); in getInterfaceQuota()
1027 int BandwidthController::setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes) { in setCostlyAlert() argument
1033 if (!isIfaceName(costName)) { in setCostlyAlert()
1034 ALOGE("setCostlyAlert: Invalid costName \"%s\"", costName); in setCostlyAlert()
1042 asprintf(&alertName, "%sAlert", costName); in setCostlyAlert()
1046 asprintf(&chainName, "bw_costly_%s", costName); in setCostlyAlert()
1057 int BandwidthController::removeCostlyAlert(const char *costName, int64_t *alertBytes) { in removeCostlyAlert() argument
1063 if (!isIfaceName(costName)) { in removeCostlyAlert()
1064 ALOGE("removeCostlyAlert: Invalid costName \"%s\"", costName); in removeCostlyAlert()
1069 ALOGE("No prior alert set for %s alert", costName); in removeCostlyAlert()
1073 asprintf(&alertName, "%sAlert", costName); in removeCostlyAlert()
1074 asprintf(&chainName, "bw_costly_%s", costName); in removeCostlyAlert()