Add L2~L4 information to packet wakeup logs and metrics
Example of $ adb shell dumpsys connmetrics list:
...
WakeupStats(wlan0, 21851s, total: 85, root: 0, system: 4, apps: 63, non-apps: 0, no uid: 18, l2 unicast/multicast/broadcast: 85/0/0, ethertype 0x800: 23, ethertype 0x86dd: 62, ipNxtHdr 6: 74, ipNxtHdr 17: 1, ipproto 58: 10)
...
WakeupEvent(06:55:54.094, wlan0, -1, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=216.58.200.110, dstIp=100.112.108.29, srcPort=443, dstPort=46878)
WakeupEvent(06:57:14.379, wlan0, -1, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=58, srcIp=ff02::1, dstIp=fe80::fa00:4:fd00:1)
WakeupEvent(06:57:52.786, wlan0, 1000, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=172.217.27.67, dstIp=100.112.108.29, srcPort=80, dstPort=49360)
WakeupEvent(06:58:02.919, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:809::200a, srcPort=443, dstPort=46197)
WakeupEvent(06:58:05.586, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:803::200a, srcPort=443, dstPort=46096)
Bug: 66869042
Test: runtest frameworks-net
+ manual testing by monitoring $ dumpsys connmetrics list
Change-Id: I03215c0c9fb7feda3e6ceb1b916f61f4ffb15344
diff --git a/proto/src/ipconnectivity.proto b/proto/src/ipconnectivity.proto
index 82a3415..7979302 100644
--- a/proto/src/ipconnectivity.proto
+++ b/proto/src/ipconnectivity.proto
@@ -489,7 +489,7 @@
// Represents statistics from NFLOG wakeup events due to ingress packets.
// Since oc-mr1.
-// Next tag: 8.
+// Next tag: 13.
message WakeupStats {
// The time duration in seconds covered by these stats, for deriving
// exact wakeup rates.
@@ -517,6 +517,24 @@
// The total number of wakeup packets with no associated socket or uid.
optional int64 no_uid_wakeups = 7;
+
+ // Counts of all different ethertype values from wakeup packets received.
+ repeated Pair ethertype_counts = 8;
+
+ // Counts of all different IP next header values from wakeup packets received.
+ repeated Pair ip_next_header_counts = 9;
+
+ // The total number of wakeup packets whose destination hardware address was
+ // a unicast address.
+ optional int64 l2_unicast_count = 10;
+
+ // The total number of wakeup packets whose destination hardware address was
+ // a multicast address.
+ optional int64 l2_multicast_count = 11;
+
+ // The total number of wakeup packets whose destination hardware address was
+ // a broadcast address.
+ optional int64 l2_broadcast_count = 12;
}
// Represents one of the IP connectivity event defined in this file.