summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorAbhishek N R <abnr@vmware.com>2022-06-09 10:59:58 +0200
committerAbhishek N R <abnr@vmware.com>2022-06-09 10:59:58 +0200
commit19296b58e4ceb9539a20e08777f90cea7a49c77e (patch)
tree6aa97687b764d1c1285474005f63cb1d522e8de6 /pimd/pim_cmd.c
parentpim6d: Moving reusable code to common api for "show pim secondary" command (diff)
downloadfrr-19296b58e4ceb9539a20e08777f90cea7a49c77e.tar.xz
frr-19296b58e4ceb9539a20e08777f90cea7a49c77e.zip
pim6d: Moving reusable code to common api for "show pim statistics" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index f8d0cf7ea..1bdd68bf4 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -3442,28 +3442,7 @@ DEFPY (show_ip_pim_statistics,
"PIM interface\n"
JSON_STR)
{
- struct pim_instance *pim;
- struct vrf *v;
- bool uj = !!json;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- pim = pim_get_pim_instance(v->vrf_id);
-
- if (!pim) {
- vty_out(vty, "%% Unable to find pim instance\n");
- return CMD_WARNING;
- }
-
- if (word)
- pim_show_statistics(pim, vty, word, uj);
- else
- pim_show_statistics(pim, vty, NULL, uj);
-
- return CMD_SUCCESS;
+ return pim_show_statistics_helper(vrf, vty, word, !!json);
}
DEFPY (show_ip_multicast,