Lines Matching refs:ifn
389 int BandwidthController::prepCostlyIface(const char *ifn, QuotaType quotaType) { in prepCostlyIface() argument
400 costString += ifn; in prepCostlyIface()
426 snprintf(cmd, sizeof(cmd), "-D bw_INPUT -i %s --jump %s", ifn, costCString); in prepCostlyIface()
429 snprintf(cmd, sizeof(cmd), "-I bw_INPUT %d -i %s --jump %s", ruleInsertPos, ifn, costCString); in prepCostlyIface()
432 snprintf(cmd, sizeof(cmd), "-D bw_OUTPUT -o %s --jump %s", ifn, costCString); in prepCostlyIface()
435 snprintf(cmd, sizeof(cmd), "-I bw_OUTPUT %d -o %s --jump %s", ruleInsertPos, ifn, costCString); in prepCostlyIface()
438 snprintf(cmd, sizeof(cmd), "-D bw_FORWARD -o %s --jump %s", ifn, costCString); in prepCostlyIface()
440 snprintf(cmd, sizeof(cmd), "-A bw_FORWARD -o %s --jump %s", ifn, costCString); in prepCostlyIface()
446 int BandwidthController::cleanupCostlyIface(const char *ifn, QuotaType quotaType) { in cleanupCostlyIface() argument
455 costString += ifn; in cleanupCostlyIface()
463 snprintf(cmd, sizeof(cmd), "-D bw_INPUT -i %s --jump %s", ifn, costCString); in cleanupCostlyIface()
466 snprintf(cmd, sizeof(cmd), "-D %s -o %s --jump %s", tableName, ifn, costCString); in cleanupCostlyIface()
481 char ifn[MAX_IFACENAME_LEN]; in setInterfaceSharedQuota() local
496 if (StrncpyAndCheck(ifn, iface, sizeof(ifn))) { in setInterfaceSharedQuota()
500 ifaceName = ifn; in setInterfaceSharedQuota()
503 return removeInterfaceSharedQuota(ifn); in setInterfaceSharedQuota()
513 res |= prepCostlyIface(ifn, QuotaShared); in setInterfaceSharedQuota()
544 removeInterfaceSharedQuota(ifn); in setInterfaceSharedQuota()
550 char ifn[MAX_IFACENAME_LEN]; in removeInterfaceSharedQuota() local
558 if (StrncpyAndCheck(ifn, iface, sizeof(ifn))) { in removeInterfaceSharedQuota()
562 ifaceName = ifn; in removeInterfaceSharedQuota()
569 ALOGE("No such iface %s to delete", ifn); in removeInterfaceSharedQuota()
573 res |= cleanupCostlyIface(ifn, QuotaShared); in removeInterfaceSharedQuota()
590 char ifn[MAX_IFACENAME_LEN]; in setInterfaceQuota() local
609 if (StrncpyAndCheck(ifn, iface, sizeof(ifn))) { in setInterfaceQuota()
613 ifaceName = ifn; in setInterfaceQuota()
624 res |= prepCostlyIface(ifn, QuotaUnique); in setInterfaceQuota()
656 removeInterfaceSharedQuota(ifn); in setInterfaceQuota()
687 char ifn[MAX_IFACENAME_LEN]; in removeInterfaceQuota() local
694 if (StrncpyAndCheck(ifn, iface, sizeof(ifn))) { in removeInterfaceQuota()
698 ifaceName = ifn; in removeInterfaceQuota()
706 ALOGE("No such iface %s to delete", ifn); in removeInterfaceQuota()
711 res |= cleanupCostlyIface(ifn, QuotaUnique); in removeInterfaceQuota()