diff options
| author | Abhishek N R <abnr@vmware.com> | 2022-04-14 00:07:41 -0700 |
|---|---|---|
| committer | Abhishek N R <abnr@vmware.com> | 2022-04-27 04:26:35 -0700 |
| commit | 3e55b3b5fdfd6676db0574ebf97f3dc904014c75 (patch) | |
| tree | 75c135eac231d84c827e23972862f91295309ad7 /pimd/pim_cmd_common.c | |
| parent | ca3b5906fcca3d6a42d0e72516854dac0e1a34f0 (diff) | |
pim6d: Implementing "show ipv6 multicast count" CLI
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim_cmd_common.c')
| -rw-r--r-- | pimd/pim_cmd_common.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 784ef2e311..5bcde48e2e 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -2882,17 +2882,14 @@ static void show_scan_oil_stats(struct pim_instance *pim, struct vty *vty, } void show_multicast_interfaces(struct pim_instance *pim, struct vty *vty, - bool uj) + json_object *json) { struct interface *ifp; - json_object *json = NULL; json_object *json_row = NULL; vty_out(vty, "\n"); - if (uj) - json = json_object_new_object(); - else + if (!json) vty_out(vty, "Interface Address ifi Vif PktsIn PktsOut BytesIn BytesOut\n"); @@ -2930,7 +2927,7 @@ void show_multicast_interfaces(struct pim_instance *pim, struct vty *vty, } #endif - if (uj) { + if (json) { json_row = json_object_new_object(); json_object_string_add(json_row, "name", ifp->name); json_object_string_add(json_row, "state", @@ -2960,9 +2957,6 @@ void show_multicast_interfaces(struct pim_instance *pim, struct vty *vty, (unsigned long)vreq.obytes); } } - - if (uj) - vty_json(vty, json); } void pim_cmd_show_ip_multicast_helper(struct pim_instance *pim, struct vty *vty) @@ -3011,5 +3005,5 @@ void pim_cmd_show_ip_multicast_helper(struct pim_instance *pim, struct vty *vty) show_scan_oil_stats(pim, vty, now); - show_multicast_interfaces(pim, vty, false); + show_multicast_interfaces(pim, vty, NULL); } |
