• Home
  • Raw
  • Download

Lines Matching refs:extIface

541 int TetherController::enableNat(const char* intIface, const char* extIface) {  in enableNat()  argument
542 ALOGV("enableNat(intIface=<%s>, extIface=<%s>)",intIface, extIface); in enableNat()
544 if (!isIfaceName(intIface) || !isIfaceName(extIface)) { in enableNat()
549 if (!strcmp(intIface, extIface)) { in enableNat()
550 ALOGE("Duplicate interface specified: %s %s", intIface, extIface); in enableNat()
554 if (isForwardingPairEnabled(intIface, extIface)) { in enableNat()
559 if (!isAnyForwardingEnabledOnUpstream(extIface)) { in enableNat()
562 StringPrintf("-A %s -o %s -j MASQUERADE", LOCAL_NAT_POSTROUTING, extIface), in enableNat()
568 ALOGE("Error setting postroute rule: iface=%s", extIface); in enableNat()
577 if (setForwardRules(true, intIface, extIface) != 0) { in enableNat()
620 const std::string& intIface, const std::string& extIface) { in findForwardingDownstream() argument
621 auto extIfaceMatches = mFwdIfaces.equal_range(extIface); in findForwardingDownstream()
630 void TetherController::addForwardingPair(const std::string& intIface, const std::string& extIface) { in addForwardingPair() argument
631 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in addForwardingPair()
637 mFwdIfaces.insert(std::pair<std::string, ForwardingDownstream>(extIface, { in addForwardingPair()
644 const std::string& intIface, const std::string& extIface) { in markForwardingPairDisabled() argument
645 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in markForwardingPairDisabled()
654 const std::string& intIface, const std::string& extIface) { in isForwardingPairEnabled() argument
655 ForwardingDownstream* existingEntry = findForwardingDownstream(intIface, extIface); in isForwardingPairEnabled()
659 bool TetherController::isAnyForwardingEnabledOnUpstream(const std::string& extIface) { in isAnyForwardingEnabledOnUpstream() argument
660 auto extIfaceMatches = mFwdIfaces.equal_range(extIface); in isAnyForwardingEnabledOnUpstream()
692 int TetherController::setForwardRules(bool add, const char *intIface, const char *extIface) { in setForwardRules() argument
712 LOCAL_FORWARD, extIface, intIface, LOCAL_TETHER_COUNTERS_CHAIN), in setForwardRules()
714 intIface, extIface), in setForwardRules()
715 StringPrintf("%s %s -i %s -o %s -g %s", op, LOCAL_FORWARD, intIface, extIface, in setForwardRules()
724 if (add && !tetherCountingRuleExists(intIface, extIface)) { in setForwardRules()
725 v4.push_back(makeTetherCountingRule(intIface, extIface)); in setForwardRules()
726 v4.push_back(makeTetherCountingRule(extIface, intIface)); in setForwardRules()
727 v6.push_back(makeTetherCountingRule(intIface, extIface)); in setForwardRules()
728 v6.push_back(makeTetherCountingRule(extIface, intIface)); in setForwardRules()
747 setForwardRules(false, intIface, extIface); in setForwardRules()
753 addForwardingPair(intIface, extIface); in setForwardRules()
755 markForwardingPairDisabled(intIface, extIface); in setForwardRules()
761 int TetherController::disableNat(const char* intIface, const char* extIface) { in disableNat() argument
762 if (!isIfaceName(intIface) || !isIfaceName(extIface)) { in disableNat()
767 setForwardRules(false, intIface, extIface); in disableNat()
865 stats.extIface = iface1; in addForwardChainStats()
868 } else if (stats.intIface == iface1 && stats.extIface == iface0) { in addForwardChainStats()