pim6d: Add 'debug pimv6 zebra'

Implementing debug pimv6 zebra command for debugging about
the events from zebra that come up through the ZAPI.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
Sai Gomathi N 2022-03-27 23:44:08 -07:00
parent 904dbf5310
commit fa5138d676
3 changed files with 24 additions and 16 deletions

View File

@ -2145,6 +2145,21 @@ DEFPY (debug_pimv6_trace_detail,
return CMD_SUCCESS;
}
DEFPY (debug_pimv6_zebra,
debug_pimv6_zebra_cmd,
"[no] debug pimv6 zebra",
NO_STR
DEBUG_STR
DEBUG_PIMV6_STR
DEBUG_PIMV6_ZEBRA_STR)
{
if (!no)
PIM_DO_DEBUG_ZEBRA;
else
PIM_DONT_DEBUG_ZEBRA;
return CMD_SUCCESS;
}
void pim_cmd_init(void)
{
if_cmd_init(pim_interface_config_write);
@ -2265,6 +2280,7 @@ void pim_cmd_init(void)
install_element(ENABLE_NODE, &debug_pimv6_packetdump_recv_cmd);
install_element(ENABLE_NODE, &debug_pimv6_trace_cmd);
install_element(ENABLE_NODE, &debug_pimv6_trace_detail_cmd);
install_element(ENABLE_NODE, &debug_pimv6_zebra_cmd);
install_element(CONFIG_NODE, &debug_pimv6_cmd);
install_element(CONFIG_NODE, &debug_pimv6_nht_cmd);
@ -2275,4 +2291,5 @@ void pim_cmd_init(void)
install_element(CONFIG_NODE, &debug_pimv6_packetdump_recv_cmd);
install_element(CONFIG_NODE, &debug_pimv6_trace_cmd);
install_element(CONFIG_NODE, &debug_pimv6_trace_detail_cmd);
install_element(CONFIG_NODE, &debug_pimv6_zebra_cmd);
}

View File

@ -56,6 +56,7 @@
#define DEBUG_PIMV6_PACKETDUMP_SEND_STR "Dump sent packets\n"
#define DEBUG_PIMV6_PACKETDUMP_RECV_STR "Dump received packets\n"
#define DEBUG_PIMV6_TRACE_STR "PIMv6 internal daemon activity\n"
#define DEBUG_PIMV6_ZEBRA_STR "ZEBRA protocol activity\n"
void pim_cmd_init(void);

View File

@ -5707,26 +5707,18 @@ DEFUN (no_debug_ssmpingd,
return CMD_SUCCESS;
}
DEFUN (debug_pim_zebra,
DEFPY (debug_pim_zebra,
debug_pim_zebra_cmd,
"debug pim zebra",
DEBUG_STR
DEBUG_PIM_STR
DEBUG_PIM_ZEBRA_STR)
{
PIM_DO_DEBUG_ZEBRA;
return CMD_SUCCESS;
}
DEFUN (no_debug_pim_zebra,
no_debug_pim_zebra_cmd,
"no debug pim zebra",
"[no] debug pim zebra",
NO_STR
DEBUG_STR
DEBUG_PIM_STR
DEBUG_PIM_ZEBRA_STR)
{
PIM_DONT_DEBUG_ZEBRA;
if (!no)
PIM_DO_DEBUG_ZEBRA;
else
PIM_DONT_DEBUG_ZEBRA;
return CMD_SUCCESS;
}
@ -7763,7 +7755,6 @@ void pim_cmd_init(void)
install_element(ENABLE_NODE, &debug_ssmpingd_cmd);
install_element(ENABLE_NODE, &no_debug_ssmpingd_cmd);
install_element(ENABLE_NODE, &debug_pim_zebra_cmd);
install_element(ENABLE_NODE, &no_debug_pim_zebra_cmd);
install_element(ENABLE_NODE, &debug_pim_mlag_cmd);
install_element(ENABLE_NODE, &no_debug_pim_mlag_cmd);
install_element(ENABLE_NODE, &debug_pim_vxlan_cmd);
@ -7809,7 +7800,6 @@ void pim_cmd_init(void)
install_element(CONFIG_NODE, &debug_ssmpingd_cmd);
install_element(CONFIG_NODE, &no_debug_ssmpingd_cmd);
install_element(CONFIG_NODE, &debug_pim_zebra_cmd);
install_element(CONFIG_NODE, &no_debug_pim_zebra_cmd);
install_element(CONFIG_NODE, &debug_pim_mlag_cmd);
install_element(CONFIG_NODE, &no_debug_pim_mlag_cmd);
install_element(CONFIG_NODE, &debug_pim_vxlan_cmd);