diff options
| author | Chirag Shah <chirag@cumulusnetworks.com> | 2017-04-03 13:11:58 -0700 | 
|---|---|---|
| committer | Chirag Shah <chirag@cumulusnetworks.com> | 2017-05-01 18:47:00 -0700 | 
| commit | 394381887e3a4826e256a89e35a122a6d4af338b (patch) | |
| tree | 777c04fe39ccec4c9577be4ca47a27d5e1321bbc /pimd/pim_assert.c | |
| parent | e81b8616177b53251a6a08a3b252d1fa77d97f26 (diff) | |
pimd: Introduce show command for protocol counters
For all pim enabled interfaces and single pim enable interface command.
Clear command to clear protocol counters stats.
'show ip pim interface traffic {WORD} {json}'
'clear ip pim interface traffic'
Testing Done: bringup Pim configuration and form RPT and SPT and check
show ip pim interface traffic command output,
perform clear form of interface traffic command and
verified all counters reset via show form of command.
tor-21# show ip pim interface traffic swp2
Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp2             22/22             0/10            0/0             0/0             0/0             0/0
leaf-22# show ip pim interface traffic swp3
Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp3             23/22            10/0             0/0             0/0             0/0             0/0
spine-1#show ip pim interface traffic
Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
br1               0/1              0/0             0/0             0/0             0/0             0/0
lo                0/0              0/0             0/0             0/0             0/0             0/0
swp1              0/1              0/0             0/0             0/0             0/0             0/0
swp2              0/1              0/0             0/0             0/0             0/0             0/0
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_assert.c')
| -rw-r--r-- | pimd/pim_assert.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c index f2bfb846dd..17f5fcfe0f 100644 --- a/pimd/pim_assert.c +++ b/pimd/pim_assert.c @@ -230,6 +230,7 @@ int pim_assert_recv(struct interface *ifp,    int offset;    uint8_t *curr;    int curr_size; +  struct pim_interface *pim_ifp = NULL;    on_trace(__PRETTY_FUNCTION__, ifp, src_addr); @@ -311,6 +312,10 @@ int pim_assert_recv(struct interface *ifp,    msg_metric.ip_address = src_addr; +  pim_ifp = ifp->info; +  zassert(pim_ifp); +  ++pim_ifp->pim_ifstat_assert_recv; +    return dispatch_assert(ifp,  			 msg_source_addr.u.prefix4,  			 sg.grp, @@ -473,6 +478,7 @@ static int pim_assert_do(struct pim_ifchannel *ch,  	       metric.route_metric,  	       PIM_FORCE_BOOLEAN(metric.rpt_bit_flag));    } +  ++pim_ifp->pim_ifstat_assert_send;    if (pim_msg_send(pim_ifp->pim_sock_fd,  		   pim_ifp->primary_address,  | 
