/system/netd/server/ |
D | NetlinkHandler.cpp | 92 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 …]
|
D | InterfaceControllerTest.cpp | 200 uint32_t ifaceIndex = if_nametoindex(ifa->ifa_name); in TEST_F() local 203 EXPECT_EQ(ifaceIndex, ifacePair->second); in TEST_F()
|
D | InterfaceController.cpp | 442 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()
|
D | TrafficController.cpp | 481 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()
|
D | TrafficController.h | 88 int addInterface(const char* name, uint32_t ifaceIndex);
|
D | TrafficControllerTest.cpp | 154 *key = {.uid = uid, .tag = tag, .counterSet = TEST_COUNTERSET, .ifaceIndex = 1}; in populateFakeStats()
|
/system/netd/libnetdbpf/include/netdbpf/ |
D | BpfNetworkStats.h | 75 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()
|
D | bpf_shared.h | 42 uint32_t ifaceIndex; member
|
/system/netd/libnetdbpf/ |
D | BpfNetworkStatsTest.cpp | 106 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()
|
D | BpfNetworkStats.cpp | 143 if (getIfaceNameFromMap(ifaceMap, statsMap, key.ifaceIndex, ifname, key, in parseBpfNetworkStatsDetailInternal()
|
/system/netd/tests/ |
D | bpf_base_test.cpp | 153 .ifaceIndex = 1}; in TEST_F()
|
/system/netd/bpf_progs/ |
D | netd.c | 265 StatsKey key = {.uid = uid, .tag = tag, .counterSet = 0, .ifaceIndex = skb->ifindex}; in bpf_traffic_account()
|