/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()
|
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 | 503 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()
|
D | TrafficController.h | 94 int addInterface(const char* name, uint32_t ifaceIndex);
|
D | TetherControllerTest.cpp | 96 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()
|
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 | 36 uint32_t ifaceIndex; member
|
/system/netd/libnetdbpf/ |
D | BpfNetworkStatsTest.cpp | 107 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()
|
D | BpfNetworkStats.cpp | 143 if (getIfaceNameFromMap(ifaceMap, statsMap, key.ifaceIndex, ifname, key, in parseBpfNetworkStatsDetailInternal()
|
/system/netd/tests/ |
D | bpf_base_test.cpp | 173 .ifaceIndex = 1}; in TEST_F()
|
/system/netd/bpf_progs/ |
D | netd.c | 262 StatsKey key = {.uid = uid, .tag = tag, .counterSet = 0, .ifaceIndex = skb->ifindex}; in bpf_traffic_account()
|