summaryrefslogtreecommitdiffstats
path: root/pimd/pim_join.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2017-05-09 17:50:56 +0200
committerGitHub <noreply@github.com>2017-05-09 17:50:56 +0200
commit54f12d6f77c4069a7c636f95e563c030a5345d5b (patch)
treee6479f8ddda642808908f15b3e08a0378b42acdb /pimd/pim_join.c
parentMerge remote-tracking branch 'origin/stable/3.0' (diff)
parentpimd: fix compilation failure. (diff)
downloadfrr-54f12d6f77c4069a7c636f95e563c030a5345d5b.tar.xz
frr-54f12d6f77c4069a7c636f95e563c030a5345d5b.zip
Merge pull request #435 from chiragshah6/pim_dev
pimd: Introduce show command for protocol counters
Diffstat (limited to 'pimd/pim_join.c')
-rw-r--r--pimd/pim_join.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index 828781a46..ae7fedc62 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -59,6 +59,8 @@ static void recv_join(struct interface *ifp,
struct prefix_sg *sg,
uint8_t source_flags)
{
+ struct pim_interface *pim_ifp = NULL;
+
if (PIM_DEBUG_PIM_TRACE) {
char up_str[INET_ADDRSTRLEN];
char neigh_str[INET_ADDRSTRLEN];
@@ -72,6 +74,11 @@ static void recv_join(struct interface *ifp,
up_str, holdtime, neigh_str, ifp->name);
}
+ pim_ifp = ifp->info;
+ zassert(pim_ifp);
+
+ ++pim_ifp->pim_ifstat_join_recv;
+
/*
* If the RPT and WC are set it's a (*,G)
* and the source is the RP
@@ -104,6 +111,8 @@ static void recv_prune(struct interface *ifp,
struct prefix_sg *sg,
uint8_t source_flags)
{
+ struct pim_interface *pim_ifp = NULL;
+
if (PIM_DEBUG_PIM_TRACE) {
char up_str[INET_ADDRSTRLEN];
char neigh_str[INET_ADDRSTRLEN];
@@ -117,6 +126,11 @@ static void recv_prune(struct interface *ifp,
up_str, holdtime, neigh_str, ifp->name);
}
+ pim_ifp = ifp->info;
+ zassert(pim_ifp);
+
+ ++pim_ifp->pim_ifstat_prune_recv;
+
if ((source_flags & PIM_RPT_BIT_MASK) &&
(source_flags & PIM_WILDCARD_BIT_MASK))
{
@@ -502,6 +516,9 @@ int pim_joinprune_send(struct pim_rpf *rpf,
packet_size += group_size;
pim_msg_build_jp_groups (grp, group, group_size);
+ pim_ifp->pim_ifstat_join_send += ntohs(grp->joins);
+ pim_ifp->pim_ifstat_prune_send += ntohs(grp->prunes);
+
grp = (struct pim_jp_groups *)curr_ptr;
if (packet_left < sizeof (struct pim_jp_groups) || msg->num_groups == 255)
{