summaryrefslogtreecommitdiffstats
path: root/pimd/pim_igmp_stats.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-03-14 21:45:28 +0100
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-03-14 21:49:23 +0100
commitca3e7807f6640c0b08042088e069e206b148e1e7 (patch)
treebba82e81dc7b53477135f3dc71f9917fd375e3bd /pimd/pim_igmp_stats.c
parentMerge pull request #10788 from opensourcerouting/feature/igmp_stats_queries_sent (diff)
downloadfrr-ca3e7807f6640c0b08042088e069e206b148e1e7.tar.xz
frr-ca3e7807f6640c0b08042088e069e206b148e1e7.zip
pimd: Show total received messages IGMP stats
``` exit1-debian-11# do sh ip igmp statistics IGMP statistics Interface : global V1 query : 0 V2 query : 0 V3 query : 3 V2 leave : 0 V1 report : 0 V2 report : 0 V3 report : 18 mtrace response : 0 mtrace request : 0 unsupported : 0 total received messages : 21 joins failed : 0 joins sent : 16 general queries sent : 6 group queries sent : 3 total groups : 4 total source groups : 1 exit1-debian-11# do sh ip igmp statistics json { "global":{ "name":"global", "queryV1":0, "queryV2":0, "queryV3":4, "leaveV2":0, "reportV1":0, "reportV2":0, "reportV3":18, "mtraceResponse":0, "mtraceRequest":0, "unsupported":0, "totalReceivedMessage":22, "totalGroups":3, "totalSourceGroups":1, "joinsFailed":0, "joinsSent":16, "generalQueriesSent":6, "groupQueriesSent":4 } } ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_igmp_stats.c')
-rw-r--r--pimd/pim_igmp_stats.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pimd/pim_igmp_stats.c b/pimd/pim_igmp_stats.c
index b2f1d6b3c..6a5ce4dc8 100644
--- a/pimd/pim_igmp_stats.c
+++ b/pimd/pim_igmp_stats.c
@@ -49,4 +49,7 @@ void igmp_stats_add(struct igmp_stats *a, struct igmp_stats *b)
a->joins_failed += b->joins_failed;
a->general_queries_sent += b->general_queries_sent;
a->group_queries_sent += b->group_queries_sent;
+ a->total_recv_messages += b->query_v1 + b->query_v2 + b->query_v3 +
+ b->report_v1 + b->report_v2 + b->report_v3 +
+ b->leave_v2 + b->mtrace_rsp + b->mtrace_req;
}