Lines Matching refs:dw

878 void dumpBpfMap(const std::string& mapName, DumpWriter& dw, const std::string& header) {  in dumpBpfMap()  argument
879 dw.blankline(); in dumpBpfMap()
880 dw.println("%s:", mapName.c_str()); in dumpBpfMap()
882 dw.println(header); in dumpBpfMap()
888 void TrafficController::dump(DumpWriter& dw, bool verbose) { in dump() argument
890 ScopedIndent indentTop(dw); in dump()
891 dw.println("TrafficController"); in dump()
893 ScopedIndent indentPreBpfModule(dw); in dump()
894 dw.println("BPF module status: %s", mBpfEnabled ? "enabled" : "disabled"); in dump()
895 dw.println("BPF support level: %s", BpfLevelToString(getBpfSupportLevel()).c_str()); in dump()
901 dw.blankline(); in dump()
902 dw.println("mCookieTagMap status: %s", in dump()
904 dw.println("mUidCounterSetMap status: %s", in dump()
906 dw.println("mAppUidStatsMap status: %s", in dump()
908 dw.println("mStatsMapA status: %s", in dump()
910 dw.println("mStatsMapB status: %s", in dump()
912 dw.println("mIfaceIndexNameMap status: %s", in dump()
914 dw.println("mIfaceStatsMap status: %s", in dump()
916 dw.println("mConfigurationMap status: %s", in dump()
918 dw.println("mUidOwnerMap status: %s", in dump()
921 dw.blankline(); in dump()
922 dw.println("Cgroup ingress program status: %s", in dump()
924 dw.println("Cgroup egress program status: %s", getProgramStatus(BPF_EGRESS_PROG_PATH).c_str()); in dump()
925 dw.println("xt_bpf ingress program status: %s", in dump()
927 dw.println("xt_bpf egress program status: %s", in dump()
929 dw.println("xt_bpf bandwidth allowlist program status: %s", in dump()
931 dw.println("xt_bpf bandwidth denylist program status: %s", in dump()
938 dw.blankline(); in dump()
939 dw.println("BPF map content:"); in dump()
941 ScopedIndent indentForMapContent(dw); in dump()
944 dumpBpfMap("mCookieTagMap", dw, ""); in dump()
945 const auto printCookieTagInfo = [&dw](const uint64_t& key, const UidTagValue& value, in dump()
947 dw.println("cookie=%" PRIu64 " tag=0x%x uid=%u", key, value.tag, value.uid); in dump()
952 dw.println("mCookieTagMap print end with error: %s", res.error().message().c_str()); in dump()
956 dumpBpfMap("mUidCounterSetMap", dw, ""); in dump()
957 const auto printUidInfo = [&dw](const uint32_t& key, const uint8_t& value, in dump()
959 dw.println("%u %u", key, value); in dump()
964 dw.println("mUidCounterSetMap print end with error: %s", res.error().message().c_str()); in dump()
969 dumpBpfMap("mAppUidStatsMap:", dw, appUidStatsHeader); in dump()
970 auto printAppUidStatsInfo = [&dw](const uint32_t& key, const StatsValue& value, in dump()
972 dw.println("%u %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64, key, value.rxBytes, in dump()
978 dw.println("mAppUidStatsMap print end with error: %s", res.error().message().c_str()); in dump()
984 dumpBpfMap("mStatsMapA", dw, statsHeader); in dump()
985 const auto printStatsInfo = [&dw, this](const StatsKey& key, const StatsValue& value, in dump()
992 dw.println("%u %s 0x%x %u %u %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64, ifIndex, in dump()
999 dw.println("mStatsMapA print end with error: %s", res.error().message().c_str()); in dump()
1003 dumpBpfMap("mStatsMapB", dw, statsHeader); in dump()
1006 dw.println("mStatsMapB print end with error: %s", res.error().message().c_str()); in dump()
1010 dumpBpfMap("mIfaceIndexNameMap", dw, ""); in dump()
1011 const auto printIfaceNameInfo = [&dw](const uint32_t& key, const IfaceValue& value, in dump()
1014 dw.println("ifaceIndex=%u ifaceName=%s", key, ifname); in dump()
1019 dw.println("mIfaceIndexNameMap print end with error: %s", res.error().message().c_str()); in dump()
1025 dumpBpfMap("mIfaceStatsMap:", dw, ifaceStatsHeader); in dump()
1026 const auto printIfaceStatsInfo = [&dw, this](const uint32_t& key, const StatsValue& value, in dump()
1032 dw.println("%u %s %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64, key, ifname.value().name, in dump()
1038 dw.println("mIfaceStatsMap print end with error: %s", res.error().message().c_str()); in dump()
1041 dw.blankline(); in dump()
1046 dw.println("current ownerMatch configuration: %d%s", configuration.value(), in dump()
1049 dw.println("mConfigurationMap read ownerMatch configure failed with error: %s", in dump()
1066 dw.println("current statsMap configuration: %d %s", configuration.value(), in dump()
1069 dw.println("mConfigurationMap read stats map configure failed with error: %s", in dump()
1072 dumpBpfMap("mUidOwnerMap", dw, ""); in dump()
1073 const auto printUidMatchInfo = [&dw, this](const uint32_t& key, const UidOwnerValue& value, in dump()
1078 dw.println("%u %s %s", key, uidMatchTypeToString(value.rule).c_str(), in dump()
1081 dw.println("%u %s %u", key, uidMatchTypeToString(value.rule).c_str(), value.iif); in dump()
1084 dw.println("%u %s", key, uidMatchTypeToString(value.rule).c_str()); in dump()
1090 dw.println("mUidOwnerMap print end with error: %s", res.error().message().c_str()); in dump()
1092 dumpBpfMap("mUidPermissionMap", dw, ""); in dump()
1093 const auto printUidPermissionInfo = [&dw](const uint32_t& key, const int& value, in dump()
1095 dw.println("%u %s", key, UidPermissionTypeToString(value).c_str()); in dump()
1100 dw.println("mUidPermissionMap print end with error: %s", res.error().message().c_str()); in dump()
1103 dumpBpfMap("mPrivilegedUser", dw, ""); in dump()
1105 dw.println("%u ALLOW_UPDATE_DEVICE_STATS", (uint32_t)uid); in dump()