diff options
author | Abhishek N R <abnr@vmware.com> | 2022-06-09 12:51:41 +0200 |
---|---|---|
committer | Abhishek N R <abnr@vmware.com> | 2022-06-09 12:51:41 +0200 |
commit | 8e15c9aa064d92f290ace12d578274a3c575a98e (patch) | |
tree | 3ea143bad2300225ef80bc0913c1fe10d0d83bfe /pimd/pim_cmd.c | |
parent | pim6d: Moving reusable code to common api for "show pim state" command (diff) | |
download | frr-8e15c9aa064d92f290ace12d578274a3c575a98e.tar.xz frr-8e15c9aa064d92f290ace12d578274a3c575a98e.zip |
pim6d: Moving reusable code to common api for "show ip/ipv6 multicast" command
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r-- | pimd/pim_cmd.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 6cd9e5fbd..1766bd1fa 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3317,24 +3317,7 @@ DEFPY (show_ip_multicast, "Multicast global information\n" VRF_CMD_HELP_STR) { - struct vrf *v; - struct pim_instance *pim; - - 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; - } - - pim_cmd_show_ip_multicast_helper(pim, vty); - - return CMD_SUCCESS; + return pim_show_multicast_helper(vrf, vty); } DEFPY (show_ip_multicast_vrf_all, @@ -3345,14 +3328,7 @@ DEFPY (show_ip_multicast_vrf_all, "Multicast global information\n" VRF_CMD_HELP_STR) { - struct vrf *vrf; - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { - vty_out(vty, "VRF: %s\n", vrf->name); - pim_cmd_show_ip_multicast_helper(vrf->info, vty); - } - - return CMD_SUCCESS; + return pim_show_multicast_vrf_all_helper(vty); } DEFPY (show_ip_multicast_count, |