summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd_common.c
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2022-06-01 21:54:44 -0700
committerSai Gomathi N <nsaigomathi@vmware.com>2022-06-08 23:25:51 -0700
commitb6bf33775de493676cad5ae27c5545550d8a99c8 (patch)
treedfa72dcf7c0551e7e2ceed89f013805d5bfc31dd /pimd/pim_cmd_common.c
parentf5b2f86ac0ccaecaed248e8cc80569c3c274e70b (diff)
pim6d: Moving the common lines of pim_show_channel cli
Moving the common lines of pim_show_channel 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_common.c')
-rw-r--r--pimd/pim_cmd_common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c
index d5eb763df3..895ac0c81e 100644
--- a/pimd/pim_cmd_common.c
+++ b/pimd/pim_cmd_common.c
@@ -1945,6 +1945,20 @@ void pim_show_channel(struct pim_instance *pim, struct vty *vty, bool uj)
vty_json(vty, json);
}
+int pim_show_channel_cmd_helper(const char *vrf, struct vty *vty, bool uj)
+{
+ struct vrf *v;
+
+ v = vrf_lookup_by_name(vrf ? vrf : VRF_DEFAULT_NAME);
+
+ if (!v)
+ return CMD_WARNING;
+
+ pim_show_channel(v->info, vty, uj);
+
+ return CMD_SUCCESS;
+}
+
void pim_show_interfaces(struct pim_instance *pim, struct vty *vty, bool mlag,
json_object *json)
{