diff options
| author | Abhishek N R <abnr@vmware.com> | 2022-04-13 23:30:28 -0700 |
|---|---|---|
| committer | Abhishek N R <abnr@vmware.com> | 2022-04-27 04:25:51 -0700 |
| commit | ca3b5906fcca3d6a42d0e72516854dac0e1a34f0 (patch) | |
| tree | 8ab87f9764a44f203e31864c9cbbf92e260c061d /pimd/pim6_cmd.c | |
| parent | be126d919a2aeac79f63582055f13498ae326256 (diff) | |
pim6d: Implementing "show ipv6 multicast" CLI
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim6_cmd.c')
| -rw-r--r-- | pimd/pim6_cmd.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index f0ea4a03a1..7f7c3979c7 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1569,6 +1569,52 @@ DEFPY (show_ipv6_pim_nexthop_lookup, return CMD_SUCCESS; } +DEFPY (show_ipv6_multicast, + show_ipv6_multicast_cmd, + "show ipv6 multicast [vrf NAME]", + SHOW_STR + IPV6_STR + "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; +} + +DEFPY (show_ipv6_multicast_vrf_all, + show_ipv6_multicast_vrf_all_cmd, + "show ipv6 multicast vrf all", + SHOW_STR + IPV6_STR + "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; +} + void pim_cmd_init(void) { if_cmd_init(pim_interface_config_write); @@ -1665,4 +1711,6 @@ void pim_cmd_init(void) install_element(VIEW_NODE, &show_ipv6_pim_neighbor_vrf_all_cmd); install_element(VIEW_NODE, &show_ipv6_pim_nexthop_cmd); install_element(VIEW_NODE, &show_ipv6_pim_nexthop_lookup_cmd); + install_element(VIEW_NODE, &show_ipv6_multicast_cmd); + install_element(VIEW_NODE, &show_ipv6_multicast_vrf_all_cmd); } |
