summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2022-06-08 23:10:22 -0700
committerSai Gomathi N <nsaigomathi@vmware.com>2022-06-08 23:27:00 -0700
commit8282b988388af5598ef64af3950a785de515fce6 (patch)
treecaa06f9fe773af8e966dc72b1a00557478fba18f /pimd/pim_cmd.c
parentb6bf33775de493676cad5ae27c5545550d8a99c8 (diff)
pim6d: Moving the common lines of pim_show_interface cli
Moving the common lines of pim_show_interface cli in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 3cdf53709d..0d66b9e79b 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -2427,29 +2427,8 @@ DEFPY (show_ip_pim_interface,
"interface name\n"
JSON_STR)
{
- struct vrf *v;
- bool uj = !!json;
- bool is_mlag = !!mlag;
- json_object *json_parent = NULL;
-
- v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
-
- if (!v)
- return CMD_WARNING;
-
- if (uj)
- json_parent = json_object_new_object();
-
- if (interface)
- pim_show_interfaces_single(v->info, vty, interface, is_mlag,
- json_parent);
- else
- pim_show_interfaces(v->info, vty, is_mlag, json_parent);
-
- if (uj)
- vty_json(vty, json_parent);
-
- return CMD_SUCCESS;
+ return pim_show_interface_cmd_helper(vrf, vty, !!json, !!mlag,
+ interface);
}
DEFPY (show_ip_pim_interface_vrf_all,