summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 43463ce74d..00913aab99 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -5535,51 +5535,34 @@ DEFPY (debug_pim,
return pim_no_debug_pim_cmd();
}
-DEFUN (debug_pim_nht,
+DEFPY (debug_pim_nht,
debug_pim_nht_cmd,
- "debug pim nht",
- DEBUG_STR
- DEBUG_PIM_STR
- "Nexthop Tracking\n")
-{
- PIM_DO_DEBUG_PIM_NHT;
- return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_pim_nht,
- no_debug_pim_nht_cmd,
- "no debug pim nht",
+ "[no] debug pim nht",
NO_STR
DEBUG_STR
DEBUG_PIM_STR
"Nexthop Tracking\n")
{
- PIM_DONT_DEBUG_PIM_NHT;
+ if (!no)
+ PIM_DO_DEBUG_PIM_NHT;
+ else
+ PIM_DONT_DEBUG_PIM_NHT;
return CMD_SUCCESS;
}
-DEFUN (debug_pim_nht_det,
+DEFPY (debug_pim_nht_det,
debug_pim_nht_det_cmd,
- "debug pim nht detail",
- DEBUG_STR
- DEBUG_PIM_STR
- "Nexthop Tracking\n"
- "Detailed Information\n")
-{
- PIM_DO_DEBUG_PIM_NHT_DETAIL;
- return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_pim_nht_det,
- no_debug_pim_nht_det_cmd,
- "no debug pim nht detail",
+ "[no] debug pim nht detail",
NO_STR
DEBUG_STR
DEBUG_PIM_STR
"Nexthop Tracking\n"
"Detailed Information\n")
{
- PIM_DONT_DEBUG_PIM_NHT_DETAIL;
+ if (!no)
+ PIM_DO_DEBUG_PIM_NHT_DETAIL;
+ else
+ PIM_DONT_DEBUG_PIM_NHT_DETAIL;
return CMD_SUCCESS;
}
@@ -7849,9 +7832,7 @@ void pim_cmd_init(void)
install_element(ENABLE_NODE, &no_debug_pim_static_cmd);
install_element(ENABLE_NODE, &debug_pim_cmd);
install_element(ENABLE_NODE, &debug_pim_nht_cmd);
- install_element(ENABLE_NODE, &no_debug_pim_nht_cmd);
install_element(ENABLE_NODE, &debug_pim_nht_det_cmd);
- install_element(ENABLE_NODE, &no_debug_pim_nht_det_cmd);
install_element(ENABLE_NODE, &debug_pim_nht_rp_cmd);
install_element(ENABLE_NODE, &no_debug_pim_nht_rp_cmd);
install_element(ENABLE_NODE, &debug_pim_events_cmd);
@@ -7903,9 +7884,7 @@ void pim_cmd_init(void)
install_element(CONFIG_NODE, &no_debug_pim_static_cmd);
install_element(CONFIG_NODE, &debug_pim_cmd);
install_element(CONFIG_NODE, &debug_pim_nht_cmd);
- install_element(CONFIG_NODE, &no_debug_pim_nht_cmd);
install_element(CONFIG_NODE, &debug_pim_nht_det_cmd);
- install_element(CONFIG_NODE, &no_debug_pim_nht_det_cmd);
install_element(CONFIG_NODE, &debug_pim_nht_rp_cmd);
install_element(CONFIG_NODE, &no_debug_pim_nht_rp_cmd);
install_element(CONFIG_NODE, &debug_pim_events_cmd);