mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
pimd: Add 'show ip mroute vrf all [json]' command
Add the ability to dump all the vrf's associated with pim. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
0885a9f1f4
commit
b283a4ca38
@ -4322,6 +4322,38 @@ DEFUN (show_ip_mroute,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (show_ip_mroute_vrf_all,
|
||||||
|
show_ip_mroute_vrf_all_cmd,
|
||||||
|
"show ip mroute vrf all [json]",
|
||||||
|
SHOW_STR
|
||||||
|
IP_STR
|
||||||
|
MROUTE_STR
|
||||||
|
VRF_CMD_HELP_STR
|
||||||
|
JSON_STR)
|
||||||
|
{
|
||||||
|
u_char uj = use_json(argc, argv);
|
||||||
|
struct vrf *vrf;
|
||||||
|
bool first = true;
|
||||||
|
|
||||||
|
if (uj)
|
||||||
|
vty_out(vty, "{ ");
|
||||||
|
RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name)
|
||||||
|
{
|
||||||
|
if (uj) {
|
||||||
|
if (!first)
|
||||||
|
vty_out(vty, ", ");
|
||||||
|
vty_out(vty, " \"%s\": ", vrf->name);
|
||||||
|
first = false;
|
||||||
|
} else
|
||||||
|
vty_out(vty, "VRF: %s\n", vrf->name);
|
||||||
|
show_mroute(vty, vrf->info, uj);
|
||||||
|
}
|
||||||
|
if (uj)
|
||||||
|
vty_out(vty, "}");
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static void show_mroute_count(struct vty *vty, struct pim_instance *pim)
|
static void show_mroute_count(struct vty *vty, struct pim_instance *pim)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
@ -7803,6 +7835,7 @@ void pim_cmd_init(void)
|
|||||||
install_element(VIEW_NODE, &show_ip_pim_rp_cmd);
|
install_element(VIEW_NODE, &show_ip_pim_rp_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_multicast_cmd);
|
install_element(VIEW_NODE, &show_ip_multicast_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_mroute_cmd);
|
install_element(VIEW_NODE, &show_ip_mroute_cmd);
|
||||||
|
install_element(VIEW_NODE, &show_ip_mroute_vrf_all_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_mroute_count_cmd);
|
install_element(VIEW_NODE, &show_ip_mroute_count_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_rib_cmd);
|
install_element(VIEW_NODE, &show_ip_rib_cmd);
|
||||||
install_element(VIEW_NODE, &show_ip_ssmpingd_cmd);
|
install_element(VIEW_NODE, &show_ip_ssmpingd_cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user