mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 12:22:47 +00:00
pim6d: Adding 'clear ipv6 pim statistics [vrf NAME]' cmd
Adding clear ipv6 pim statistics cli for resetting pimv6 statistics Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
parent
fe0c6838c5
commit
ef1b0a2d8c
@ -1935,6 +1935,25 @@ DEFPY (show_ipv6_mroute_summary_vrf_all,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFPY (clear_ipv6_pim_statistics,
|
||||
clear_ipv6_pim_statistics_cmd,
|
||||
"clear ipv6 pim statistics [vrf NAME]$name",
|
||||
CLEAR_STR
|
||||
IPV6_STR
|
||||
CLEAR_IP_PIM_STR
|
||||
VRF_CMD_HELP_STR
|
||||
"Reset PIM statistics\n")
|
||||
{
|
||||
struct vrf *v = pim_cmd_lookup(vty, name);
|
||||
|
||||
if (!v)
|
||||
return CMD_WARNING;
|
||||
|
||||
clear_pim_statistics(v->info);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
void pim_cmd_init(void)
|
||||
{
|
||||
if_cmd_init(pim_interface_config_write);
|
||||
@ -2041,4 +2060,6 @@ void pim_cmd_init(void)
|
||||
install_element(VIEW_NODE, &show_ipv6_mroute_count_vrf_all_cmd);
|
||||
install_element(VIEW_NODE, &show_ipv6_mroute_summary_cmd);
|
||||
install_element(VIEW_NODE, &show_ipv6_mroute_summary_vrf_all_cmd);
|
||||
|
||||
install_element(ENABLE_NODE, &clear_ipv6_pim_statistics_cmd);
|
||||
}
|
||||
|
@ -1821,22 +1821,22 @@ DEFUN (clear_ip_igmp_interfaces,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN (clear_ip_pim_statistics,
|
||||
DEFPY (clear_ip_pim_statistics,
|
||||
clear_ip_pim_statistics_cmd,
|
||||
"clear ip pim statistics [vrf NAME]",
|
||||
"clear ip pim statistics [vrf NAME]$name",
|
||||
CLEAR_STR
|
||||
IP_STR
|
||||
CLEAR_IP_PIM_STR
|
||||
VRF_CMD_HELP_STR
|
||||
"Reset PIM statistics\n")
|
||||
{
|
||||
int idx = 2;
|
||||
struct vrf *vrf = pim_cmd_lookup_vrf(vty, argv, argc, &idx);
|
||||
struct vrf *v = pim_cmd_lookup(vty, name);
|
||||
|
||||
if (!vrf)
|
||||
if (!v)
|
||||
return CMD_WARNING;
|
||||
|
||||
clear_pim_statistics(vrf->info);
|
||||
clear_pim_statistics(v->info);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user