summaryrefslogtreecommitdiff
path: root/zebra/debug.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-07-27 21:35:33 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-07-27 21:35:33 +0000
commitb0498dc6ff0510efe9467fbaed41945f3f056af4 (patch)
tree6595c1298dd560195c126e31f2977024d651d999 /zebra/debug.c
parent457eb9af72e6e7aa85c26b65ba4d053f9ecbffac (diff)
[zebra] Add 'debug zebra rib' commands
2006-07-27 Paul Jakma <paul.jakma@sun.com> * debug.{c,h}: Add 'debug zebra rib' and 'debug zebra rib queue'.
Diffstat (limited to 'zebra/debug.c')
-rw-r--r--zebra/debug.c74
1 files changed, 74 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index 8575a664..23c4de3a 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -28,6 +28,7 @@
unsigned long zebra_debug_event;
unsigned long zebra_debug_packet;
unsigned long zebra_debug_kernel;
+unsigned long zebra_debug_rib;
DEFUN (show_debugging_zebra,
show_debugging_zebra_cmd,
@@ -65,6 +66,11 @@ DEFUN (show_debugging_zebra,
if (IS_ZEBRA_DEBUG_KERNEL)
vty_out (vty, " Zebra kernel debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_RIB)
+ vty_out (vty, " Zebra RIB debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_RIB_Q)
+ vty_out (vty, " Zebra RIB queue debugging is on%s", VTY_NEWLINE);
+
return CMD_SUCCESS;
}
@@ -140,6 +146,29 @@ DEFUN (debug_zebra_kernel,
return CMD_SUCCESS;
}
+DEFUN (debug_zebra_rib,
+ debug_zebra_rib_cmd,
+ "debug zebra rib",
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug RIB events\n")
+{
+ SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB);
+ return CMD_SUCCESS;
+}
+
+DEFUN (debug_zebra_rib_q,
+ debug_zebra_rib_q_cmd,
+ "debug zebra rib queue",
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug RIB events\n"
+ "Debug RIB queueing\n")
+{
+ SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_Q);
+ return CMD_SUCCESS;
+}
+
DEFUN (no_debug_zebra_events,
no_debug_zebra_events_cmd,
"no debug zebra events",
@@ -193,6 +222,31 @@ DEFUN (no_debug_zebra_kernel,
return CMD_SUCCESS;
}
+DEFUN (no_debug_zebra_rib,
+ no_debug_zebra_rib_cmd,
+ "no debug zebra rib",
+ NO_STR
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug zebra RIB\n")
+{
+ zebra_debug_rib = 0;
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_debug_zebra_rib_q,
+ no_debug_zebra_rib_q_cmd,
+ "no debug zebra rib queueu",
+ NO_STR
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug zebra RIB\n"
+ "Debug RIB queueing\n")
+{
+ UNSET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_Q);
+ return CMD_SUCCESS;
+}
+
/* Debug node. */
struct cmd_node debug_node =
{
@@ -238,6 +292,16 @@ config_write_debug (struct vty *vty)
vty_out (vty, "debug zebra kernel%s", VTY_NEWLINE);
write++;
}
+ if (IS_ZEBRA_DEBUG_RIB)
+ {
+ vty_out (vty, "debug zebra rib%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_RIB_Q)
+ {
+ vty_out (vty, "debug zebra rib queue%s", VTY_NEWLINE);
+ write++;
+ }
return write;
}
@@ -246,6 +310,8 @@ zebra_debug_init (void)
{
zebra_debug_event = 0;
zebra_debug_packet = 0;
+ zebra_debug_kernel = 0;
+ zebra_debug_rib = 0;
install_node (&debug_node, config_write_debug);
@@ -257,16 +323,24 @@ zebra_debug_init (void)
install_element (ENABLE_NODE, &debug_zebra_packet_direct_cmd);
install_element (ENABLE_NODE, &debug_zebra_packet_detail_cmd);
install_element (ENABLE_NODE, &debug_zebra_kernel_cmd);
+ install_element (ENABLE_NODE, &debug_zebra_rib_cmd);
+ install_element (ENABLE_NODE, &debug_zebra_rib_q_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_events_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_packet_cmd);
install_element (ENABLE_NODE, &no_debug_zebra_kernel_cmd);
+ install_element (ENABLE_NODE, &no_debug_zebra_rib_cmd);
+ install_element (ENABLE_NODE, &no_debug_zebra_rib_q_cmd);
install_element (CONFIG_NODE, &debug_zebra_events_cmd);
install_element (CONFIG_NODE, &debug_zebra_packet_cmd);
install_element (CONFIG_NODE, &debug_zebra_packet_direct_cmd);
install_element (CONFIG_NODE, &debug_zebra_packet_detail_cmd);
install_element (CONFIG_NODE, &debug_zebra_kernel_cmd);
+ install_element (CONFIG_NODE, &debug_zebra_rib_cmd);
+ install_element (CONFIG_NODE, &debug_zebra_rib_q_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_events_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_packet_cmd);
install_element (CONFIG_NODE, &no_debug_zebra_kernel_cmd);
+ install_element (CONFIG_NODE, &no_debug_zebra_rib_cmd);
+ install_element (CONFIG_NODE, &no_debug_zebra_rib_q_cmd);
}