Home
last modified time | relevance | path

Searched refs:ifaceIndex (Results 1 – 13 of 13) sorted by relevance

/system/netd/server/
DNetlinkHandler.cpp92 long ifaceIndex = strtol(ifIndex, nullptr, 10); in parseIfIndex() local
94 if (errno == ERANGE && (ifaceIndex == LONG_MAX || ifaceIndex == LONG_MIN)) { in parseIfIndex()
97 return ifaceIndex; in parseIfIndex()
114 long ifaceIndex = parseIfIndex(ifIndex); in onEvent() local
115 if (ifaceIndex) { in onEvent()
116 gCtls->trafficCtrl.addInterface(iface, ifaceIndex); in onEvent()
146 long ifaceIndex = parseIfIndex(ifIndex); in onEvent() local
147 if (!ifaceIndex) { in onEvent()
152 gCtls->netCtrl.addInterfaceAddress(ifaceIndex, address); in onEvent()
154 bool shouldDestroy = gCtls->netCtrl.removeInterfaceAddress(ifaceIndex, address); in onEvent()
DInterfaceControllerTest.cpp200 uint32_t ifaceIndex = if_nametoindex(ifa->ifa_name); in TEST_F() local
203 EXPECT_EQ(ifaceIndex, ifacePair->second); in TEST_F()
DInterfaceController.cpp442 uint32_t ifaceIndex = if_nametoindex(name.c_str()); in getIfaceList() local
443 if (ifaceIndex) { in getIfaceList()
444 ifacePairs.insert(std::pair<std::string, uint32_t>(name, ifaceIndex)); in getIfaceList()
DTrafficController.cpp503 int TrafficController::addInterface(const char* name, uint32_t ifaceIndex) { in addInterface() argument
507 if (ifaceIndex == 0) { in addInterface()
508 ALOGE("Unknown interface %s(%d)", name, ifaceIndex); in addInterface()
513 Status res = mIfaceIndexNameMap.writeValue(ifaceIndex, iface, BPF_ANY); in addInterface()
515 ALOGE("Failed to add iface %s(%d): %s", name, ifaceIndex, strerror(res.code())); in addInterface()
987 uint32_t ifIndex = key.ifaceIndex; in dump()
DTrafficController.h94 int addInterface(const char* name, uint32_t ifaceIndex);
DTetherControllerTest.cpp96 void updateMaps(uint32_t ifaceIndex, uint64_t rxBytes, uint64_t rxPackets, uint64_t txBytes, in updateMaps() argument
101 ASSERT_RESULT_OK(mFakeTetherStatsMap.writeValue(ifaceIndex, tetherStats, BPF_ANY)); in updateMaps()
DTrafficControllerTest.cpp154 *key = {.uid = uid, .tag = tag, .counterSet = TEST_COUNTERSET, .ifaceIndex = 1}; in populateFakeStats()
/system/netd/libnetdbpf/include/netdbpf/
DBpfNetworkStats.h75 const BpfMap<Key, StatsValue>& statsMap, uint32_t ifaceIndex, char* ifname, in getIfaceNameFromMap() argument
77 auto iface = ifaceMap.readValue(ifaceIndex); in getIfaceNameFromMap()
79 maybeLogUnknownIface(ifaceIndex, statsMap, curKey, unknownIfaceBytesTotal); in getIfaceNameFromMap()
87 void maybeLogUnknownIface(int ifaceIndex, const BpfMap<Key, StatsValue>& statsMap, in maybeLogUnknownIface() argument
103 ALOGE("Unknown name for ifindex %d with more than %" PRId64 " bytes of traffic", ifaceIndex, in maybeLogUnknownIface()
Dbpf_shared.h36 uint32_t ifaceIndex; member
/system/netd/libnetdbpf/
DBpfNetworkStatsTest.cpp107 void populateFakeStats(uid_t uid, uint32_t tag, uint32_t ifaceIndex, uint32_t counterSet, in populateFakeStats() argument
110 .uid = (uint32_t)uid, .tag = tag, .counterSet = counterSet, .ifaceIndex = ifaceIndex}; in populateFakeStats()
114 void updateIfaceMap(const char* ifaceName, uint32_t ifaceIndex) { in updateIfaceMap() argument
117 EXPECT_RESULT_OK(mFakeIfaceIndexNameMap.writeValue(ifaceIndex, iface, BPF_ANY)); in updateIfaceMap()
380 uint32_t ifaceIndex = UNKNOWN_IFACE; in TEST_F() local
381 populateFakeStats(TEST_UID1, 0, ifaceIndex, TEST_COUNTERSET0, value1, mFakeStatsMap); in TEST_F()
394 .ifaceIndex = ifaceIndex, in TEST_F()
398 ASSERT_EQ(-ENODEV, getIfaceNameFromMap(mFakeIfaceIndexNameMap, mFakeStatsMap, ifaceIndex, in TEST_F()
401 curKey.ifaceIndex = IFACE_INDEX2; in TEST_F()
402 ASSERT_EQ(-ENODEV, getIfaceNameFromMap(mFakeIfaceIndexNameMap, mFakeStatsMap, ifaceIndex, in TEST_F()
DBpfNetworkStats.cpp143 if (getIfaceNameFromMap(ifaceMap, statsMap, key.ifaceIndex, ifname, key, in parseBpfNetworkStatsDetailInternal()
/system/netd/tests/
Dbpf_base_test.cpp173 .ifaceIndex = 1}; in TEST_F()
/system/netd/bpf_progs/
Dnetd.c262 StatsKey key = {.uid = uid, .tag = tag, .counterSet = 0, .ifaceIndex = skb->ifindex}; in bpf_traffic_account()