Lines Matching refs:extIface

564 int TetherController::enableNat(const char* intIface, const char* extIface) {  in enableNat()  argument
565 ALOGV("enableNat(intIface=<%s>, extIface=<%s>)",intIface, extIface); in enableNat()
567 if (!isIfaceName(intIface) || !isIfaceName(extIface)) { in enableNat()
572 if (!strcmp(intIface, extIface)) { in enableNat()
573 ALOGE("Duplicate interface specified: %s %s", intIface, extIface); in enableNat()
577 if (isForwardingPairEnabled(intIface, extIface)) { in enableNat()
582 if (!isAnyForwardingEnabledOnUpstream(extIface)) { in enableNat()
585 StringPrintf("-A %s -o %s -j MASQUERADE", LOCAL_NAT_POSTROUTING, extIface), in enableNat()
591 ALOGE("Error setting postroute rule: iface=%s", extIface); in enableNat()
600 if (setForwardRules(true, intIface, extIface) != 0) { in enableNat()
643 const std::string& intIface, const std::string& extIface) { in findForwardingDownstream() argument
644 auto extIfaceMatches = mFwdIfaces.equal_range(extIface); in findForwardingDownstream()
653 void TetherController::addForwardingPair(const std::string& intIface, const std::string& extIface) { in addForwardingPair() argument
654 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in addForwardingPair()
660 mFwdIfaces.insert(std::pair<std::string, ForwardingDownstream>(extIface, { in addForwardingPair()
667 const std::string& intIface, const std::string& extIface) { in markForwardingPairDisabled() argument
668 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in markForwardingPairDisabled()
677 const std::string& intIface, const std::string& extIface) { in isForwardingPairEnabled() argument
678 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in isForwardingPairEnabled()
682 bool TetherController::isAnyForwardingEnabledOnUpstream(const std::string& extIface) { in isAnyForwardingEnabledOnUpstream() argument
683 auto extIfaceMatches = mFwdIfaces.equal_range(extIface); in isAnyForwardingEnabledOnUpstream()
715 int TetherController::setForwardRules(bool add, const char *intIface, const char *extIface) { in setForwardRules() argument
735 LOCAL_FORWARD, extIface, intIface, LOCAL_TETHER_COUNTERS_CHAIN), in setForwardRules()
737 intIface, extIface), in setForwardRules()
738 StringPrintf("%s %s -i %s -o %s -g %s", op, LOCAL_FORWARD, intIface, extIface, in setForwardRules()
747 if (add && !tetherCountingRuleExists(intIface, extIface)) { in setForwardRules()
748 v4.push_back(makeTetherCountingRule(intIface, extIface)); in setForwardRules()
749 v4.push_back(makeTetherCountingRule(extIface, intIface)); in setForwardRules()
750 v6.push_back(makeTetherCountingRule(intIface, extIface)); in setForwardRules()
751 v6.push_back(makeTetherCountingRule(extIface, intIface)); in setForwardRules()
770 setForwardRules(false, intIface, extIface); in setForwardRules()
776 addForwardingPair(intIface, extIface); in setForwardRules()
778 markForwardingPairDisabled(intIface, extIface); in setForwardRules()
784 int TetherController::disableNat(const char* intIface, const char* extIface) { in disableNat() argument
785 if (!isIfaceName(intIface) || !isIfaceName(extIface)) { in disableNat()
790 setForwardRules(false, intIface, extIface); in disableNat()
886 stats.extIface = iface1; in addForwardChainStats()
889 } else if (stats.intIface == iface1 && stats.extIface == iface0) { in addForwardChainStats()