Home
last modified time | relevance | path

Searched refs:ifaceIndex (Results 1 – 12 of 12) 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()
[all …]
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.cpp481 int TrafficController::addInterface(const char* name, uint32_t ifaceIndex) { in addInterface() argument
483 if (ifaceIndex == 0) { in addInterface()
484 ALOGE("Unknown interface %s(%d)", name, ifaceIndex); in addInterface()
489 Status res = mIfaceIndexNameMap.writeValue(ifaceIndex, iface, BPF_ANY); in addInterface()
491 ALOGE("Failed to add iface %s(%d): %s", name, ifaceIndex, strerror(res.code())); in addInterface()
915 uint32_t ifIndex = key.ifaceIndex; in dump()
DTrafficController.h88 int addInterface(const char* name, uint32_t ifaceIndex);
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.h42 uint32_t ifaceIndex; member
/system/netd/libnetdbpf/
DBpfNetworkStatsTest.cpp106 void populateFakeStats(uid_t uid, uint32_t tag, uint32_t ifaceIndex, uint32_t counterSet, in populateFakeStats() argument
109 .uid = (uint32_t)uid, .tag = tag, .counterSet = counterSet, .ifaceIndex = ifaceIndex}; in populateFakeStats()
113 void updateIfaceMap(const char* ifaceName, uint32_t ifaceIndex) { in updateIfaceMap() argument
116 EXPECT_RESULT_OK(mFakeIfaceIndexNameMap.writeValue(ifaceIndex, iface, BPF_ANY)); in updateIfaceMap()
363 uint32_t ifaceIndex = UNKNOWN_IFACE; in TEST_F() local
364 populateFakeStats(TEST_UID1, 0, ifaceIndex, TEST_COUNTERSET0, value1, mFakeStatsMap); in TEST_F()
377 .ifaceIndex = ifaceIndex, in TEST_F()
381 ASSERT_EQ(-ENODEV, getIfaceNameFromMap(mFakeIfaceIndexNameMap, mFakeStatsMap, ifaceIndex, in TEST_F()
384 curKey.ifaceIndex = IFACE_INDEX2; in TEST_F()
385 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.cpp153 .ifaceIndex = 1}; in TEST_F()
/system/netd/bpf_progs/
Dnetd.c265 StatsKey key = {.uid = uid, .tag = tag, .counterSet = 0, .ifaceIndex = skb->ifindex}; in bpf_traffic_account()