summaryrefslogtreecommitdiff
path: root/zebra/debug.c
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-08-09 11:49:42 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-08-09 12:03:17 +0200
commitac4d0be5874fafd14212d6007fff7495edc9b152 (patch)
tree5e2f0d3189de928c849f9983406389ade3b098cb /zebra/debug.c
parent76a86854181c27819e5cf71b12ae1fa5ccd9e02a (diff)
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/debug.c')
-rw-r--r--zebra/debug.c476
1 files changed, 231 insertions, 245 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index 6f59dc0ac2..67c9d16746 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -15,9 +15,9 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * along with GNU Zebra; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#include <zebra.h>
@@ -41,55 +41,60 @@ DEFUN (show_debugging_zebra,
"Debugging information\n"
"Zebra configuration\n")
{
- vty_out (vty, "Zebra debugging status:%s", VTY_NEWLINE);
-
- if (IS_ZEBRA_DEBUG_EVENT)
- vty_out (vty, " Zebra event debugging is on%s", VTY_NEWLINE);
-
- if (IS_ZEBRA_DEBUG_PACKET)
- {
- if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV)
- {
- vty_out (vty, " Zebra packet%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
+ vty_out(vty, "Zebra debugging status:%s", VTY_NEWLINE);
+
+ if (IS_ZEBRA_DEBUG_EVENT)
+ vty_out(vty, " Zebra event debugging is on%s", VTY_NEWLINE);
+
+ if (IS_ZEBRA_DEBUG_PACKET) {
+ if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV) {
+ vty_out(vty, " Zebra packet%s debugging is on%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ } else {
+ if (IS_ZEBRA_DEBUG_SEND)
+ vty_out(vty,
+ " Zebra packet send%s debugging is on%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ else
+ vty_out(vty,
+ " Zebra packet receive%s debugging is on%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ }
}
- else
- {
- if (IS_ZEBRA_DEBUG_SEND)
- vty_out (vty, " Zebra packet send%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
- else
- vty_out (vty, " Zebra packet receive%s debugging is on%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
- }
- }
-
- if (IS_ZEBRA_DEBUG_KERNEL)
- vty_out (vty, " Zebra kernel debugging is on%s", VTY_NEWLINE);
- if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
- vty_out (vty, " Zebra kernel netlink message dumps (send) are on%s", VTY_NEWLINE);
- if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
- vty_out (vty, " Zebra kernel netlink message dumps (recv) are on%s", VTY_NEWLINE);
-
- /* Check here using flags as the 'macro' does an OR */
- if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB))
- vty_out (vty, " Zebra RIB debugging is on%s", VTY_NEWLINE);
- if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
- vty_out (vty, " Zebra RIB detailed debugging is on%s", VTY_NEWLINE);
-
- if (IS_ZEBRA_DEBUG_FPM)
- vty_out (vty, " Zebra FPM debugging is on%s", VTY_NEWLINE);
- if (IS_ZEBRA_DEBUG_NHT)
- vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTY_NEWLINE);
- if (IS_ZEBRA_DEBUG_MPLS)
- vty_out (vty, " Zebra MPLS debugging is on%s", VTY_NEWLINE);
- if (IS_ZEBRA_DEBUG_PW)
- vty_out (vty, " Zebra pseudowire debugging is on%s", VTY_NEWLINE);
-
- return CMD_SUCCESS;
+
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ vty_out(vty, " Zebra kernel debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
+ vty_out(vty,
+ " Zebra kernel netlink message dumps (send) are on%s",
+ VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
+ vty_out(vty,
+ " Zebra kernel netlink message dumps (recv) are on%s",
+ VTY_NEWLINE);
+
+ /* Check here using flags as the 'macro' does an OR */
+ if (CHECK_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB))
+ vty_out(vty, " Zebra RIB debugging is on%s", VTY_NEWLINE);
+ if (CHECK_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
+ vty_out(vty, " Zebra RIB detailed debugging is on%s",
+ VTY_NEWLINE);
+
+ if (IS_ZEBRA_DEBUG_FPM)
+ vty_out(vty, " Zebra FPM debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_NHT)
+ vty_out(vty, " Zebra next-hop tracking debugging is on%s",
+ VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_MPLS)
+ vty_out(vty, " Zebra MPLS debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_PW)
+ vty_out(vty, " Zebra pseudowire debugging is on%s",
+ VTY_NEWLINE);
+
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_events,
@@ -99,8 +104,8 @@ DEFUN (debug_zebra_events,
"Zebra configuration\n"
"Debug option set for zebra events\n")
{
- zebra_debug_event = ZEBRA_DEBUG_EVENT;
- return CMD_WARNING;
+ zebra_debug_event = ZEBRA_DEBUG_EVENT;
+ return CMD_WARNING;
}
DEFUN (debug_zebra_nht,
@@ -110,8 +115,8 @@ DEFUN (debug_zebra_nht,
"Zebra configuration\n"
"Debug option set for zebra next hop tracking\n")
{
- zebra_debug_nht = ZEBRA_DEBUG_NHT;
- return CMD_WARNING;
+ zebra_debug_nht = ZEBRA_DEBUG_NHT;
+ return CMD_WARNING;
}
DEFUN (debug_zebra_mpls,
@@ -121,8 +126,8 @@ DEFUN (debug_zebra_mpls,
"Zebra configuration\n"
"Debug option set for zebra MPLS LSPs\n")
{
- zebra_debug_mpls = ZEBRA_DEBUG_MPLS;
- return CMD_WARNING;
+ zebra_debug_mpls = ZEBRA_DEBUG_MPLS;
+ return CMD_WARNING;
}
DEFUN (debug_zebra_pw,
@@ -133,11 +138,11 @@ DEFUN (debug_zebra_pw,
"Zebra configuration\n"
"Debug option set for zebra pseudowires\n")
{
- if (strmatch (argv[0]->text, "no"))
- UNSET_FLAG (zebra_debug_pw, ZEBRA_DEBUG_PW);
- else
- SET_FLAG (zebra_debug_pw, ZEBRA_DEBUG_PW);
- return CMD_WARNING;
+ if (strmatch(argv[0]->text, "no"))
+ UNSET_FLAG(zebra_debug_pw, ZEBRA_DEBUG_PW);
+ else
+ SET_FLAG(zebra_debug_pw, ZEBRA_DEBUG_PW);
+ return CMD_WARNING;
}
DEFUN (debug_zebra_packet,
@@ -150,24 +155,23 @@ DEFUN (debug_zebra_packet,
"Debug option set for send packet\n"
"Debug option set for detailed info\n")
{
- int idx = 0;
- zebra_debug_packet = ZEBRA_DEBUG_PACKET;
-
- if (argv_find (argv, argc, "send", &idx))
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- idx = 0;
- if (argv_find (argv, argc, "recv", &idx))
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
- idx = 0;
- if (argv_find (argv, argc, "detail", &idx))
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL);
-
- if (!(zebra_debug_packet & ZEBRA_DEBUG_SEND & ZEBRA_DEBUG_RECV))
- {
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
- }
- return CMD_SUCCESS;
+ int idx = 0;
+ zebra_debug_packet = ZEBRA_DEBUG_PACKET;
+
+ if (argv_find(argv, argc, "send", &idx))
+ SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
+ idx = 0;
+ if (argv_find(argv, argc, "recv", &idx))
+ SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
+ idx = 0;
+ if (argv_find(argv, argc, "detail", &idx))
+ SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_DETAIL);
+
+ if (!(zebra_debug_packet & ZEBRA_DEBUG_SEND & ZEBRA_DEBUG_RECV)) {
+ SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
+ SET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
+ }
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_kernel,
@@ -177,8 +181,8 @@ DEFUN (debug_zebra_kernel,
"Zebra configuration\n"
"Debug option set for zebra between kernel interface\n")
{
- SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL);
- return CMD_SUCCESS;
+ SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL);
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_kernel_msgdump,
@@ -191,13 +195,13 @@ DEFUN (debug_zebra_kernel_msgdump,
"Dump raw netlink messages received\n"
"Dump raw netlink messages sent\n")
{
- int idx = 0;
- if (argc == 4 || argv_find (argv, argc, "recv", &idx))
- SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
- if (argc == 4 || argv_find (argv, argc, "send", &idx))
- SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+ int idx = 0;
+ if (argc == 4 || argv_find(argv, argc, "recv", &idx))
+ SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
+ if (argc == 4 || argv_find(argv, argc, "send", &idx))
+ SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
- return CMD_SUCCESS;
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_rib,
@@ -207,8 +211,8 @@ DEFUN (debug_zebra_rib,
"Zebra configuration\n"
"Debug RIB events\n")
{
- SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB);
- return CMD_SUCCESS;
+ SET_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB);
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_rib_detailed,
@@ -219,8 +223,8 @@ DEFUN (debug_zebra_rib_detailed,
"Debug RIB events\n"
"Detailed debugs\n")
{
- SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED);
- return CMD_SUCCESS;
+ SET_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED);
+ return CMD_SUCCESS;
}
DEFUN (debug_zebra_fpm,
@@ -230,8 +234,8 @@ DEFUN (debug_zebra_fpm,
"Zebra configuration\n"
"Debug zebra FPM events\n")
{
- SET_FLAG (zebra_debug_fpm, ZEBRA_DEBUG_FPM);
- return CMD_SUCCESS;
+ SET_FLAG(zebra_debug_fpm, ZEBRA_DEBUG_FPM);
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_events,
@@ -242,8 +246,8 @@ DEFUN (no_debug_zebra_events,
"Zebra configuration\n"
"Debug option set for zebra events\n")
{
- zebra_debug_event = 0;
- return CMD_SUCCESS;
+ zebra_debug_event = 0;
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_nht,
@@ -254,8 +258,8 @@ DEFUN (no_debug_zebra_nht,
"Zebra configuration\n"
"Debug option set for zebra next hop tracking\n")
{
- zebra_debug_nht = 0;
- return CMD_SUCCESS;
+ zebra_debug_nht = 0;
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_mpls,
@@ -266,8 +270,8 @@ DEFUN (no_debug_zebra_mpls,
"Zebra configuration\n"
"Debug option set for zebra MPLS LSPs\n")
{
- zebra_debug_mpls = 0;
- return CMD_SUCCESS;
+ zebra_debug_mpls = 0;
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_packet,
@@ -280,12 +284,12 @@ DEFUN (no_debug_zebra_packet,
"Debug option set for receive packet\n"
"Debug option set for send packet\n")
{
- int idx = 0;
- if (argc == 4 || argv_find (argv, argc, "send", &idx))
- UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
- if (argc == 4 || argv_find (argv, argc, "recv", &idx))
- UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
- return CMD_SUCCESS;
+ int idx = 0;
+ if (argc == 4 || argv_find(argv, argc, "send", &idx))
+ UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_SEND);
+ if (argc == 4 || argv_find(argv, argc, "recv", &idx))
+ UNSET_FLAG(zebra_debug_packet, ZEBRA_DEBUG_RECV);
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_kernel,
@@ -296,8 +300,8 @@ DEFUN (no_debug_zebra_kernel,
"Zebra configuration\n"
"Debug option set for zebra between kernel interface\n")
{
- UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL);
- return CMD_SUCCESS;
+ UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL);
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_kernel_msgdump,
@@ -311,13 +315,13 @@ DEFUN (no_debug_zebra_kernel_msgdump,
"Dump raw netlink messages received\n"
"Dump raw netlink messages sent\n")
{
- int idx = 0;
- if (argc == 5 || argv_find (argv, argc, "recv", &idx))
- UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
- if (argc == 5 || argv_find (argv, argc, "send", &idx))
- UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+ int idx = 0;
+ if (argc == 5 || argv_find(argv, argc, "recv", &idx))
+ UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
+ if (argc == 5 || argv_find(argv, argc, "send", &idx))
+ UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
- return CMD_SUCCESS;
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_rib,
@@ -328,8 +332,8 @@ DEFUN (no_debug_zebra_rib,
"Zebra configuration\n"
"Debug zebra RIB\n")
{
- zebra_debug_rib = 0;
- return CMD_SUCCESS;
+ zebra_debug_rib = 0;
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_rib_detailed,
@@ -341,8 +345,8 @@ DEFUN (no_debug_zebra_rib_detailed,
"Debug zebra RIB\n"
"Detailed debugs\n")
{
- UNSET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED);
- return CMD_SUCCESS;
+ UNSET_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED);
+ return CMD_SUCCESS;
}
DEFUN (no_debug_zebra_fpm,
@@ -353,141 +357,123 @@ DEFUN (no_debug_zebra_fpm,
"Zebra configuration\n"
"Debug zebra FPM events\n")
{
- zebra_debug_fpm = 0;
- return CMD_SUCCESS;
+ zebra_debug_fpm = 0;
+ return CMD_SUCCESS;
}
/* Debug node. */
-struct cmd_node debug_node =
-{
- DEBUG_NODE,
- "", /* Debug node has no interface. */
- 1
-};
+struct cmd_node debug_node = {DEBUG_NODE, "", /* Debug node has no interface. */
+ 1};
-static int
-config_write_debug (struct vty *vty)
+static int config_write_debug(struct vty *vty)
{
- int write = 0;
-
- if (IS_ZEBRA_DEBUG_EVENT)
- {
- vty_out (vty, "debug zebra events%s", VTY_NEWLINE);
- write++;
- }
- if (IS_ZEBRA_DEBUG_PACKET)
- {
- if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV)
- {
- vty_out (vty, "debug zebra packet%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
- write++;
+ int write = 0;
+
+ if (IS_ZEBRA_DEBUG_EVENT) {
+ vty_out(vty, "debug zebra events%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_PACKET) {
+ if (IS_ZEBRA_DEBUG_SEND && IS_ZEBRA_DEBUG_RECV) {
+ vty_out(vty, "debug zebra packet%s%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ write++;
+ } else {
+ if (IS_ZEBRA_DEBUG_SEND)
+ vty_out(vty, "debug zebra packet send%s%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ else
+ vty_out(vty, "debug zebra packet recv%s%s",
+ IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
+ VTY_NEWLINE);
+ write++;
+ }
+ }
+ if (IS_ZEBRA_DEBUG_KERNEL) {
+ vty_out(vty, "debug zebra kernel%s", VTY_NEWLINE);
+ write++;
+ }
+ /* Check here using flags as the 'macro' does an OR */
+ if (CHECK_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB)) {
+ vty_out(vty, "debug zebra rib%s", VTY_NEWLINE);
+ write++;
+ }
+ if (CHECK_FLAG(zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED)) {
+ vty_out(vty, "debug zebra rib detailed%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_FPM) {
+ vty_out(vty, "debug zebra fpm%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_NHT) {
+ vty_out(vty, "debug zebra nht%s", VTY_NEWLINE);
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_MPLS) {
+ vty_out(vty, "debug zebra mpls%s", VTY_NEWLINE);
+ write++;
}
- else
- {
- if (IS_ZEBRA_DEBUG_SEND)
- vty_out (vty, "debug zebra packet send%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
- else
- vty_out (vty, "debug zebra packet recv%s%s",
- IS_ZEBRA_DEBUG_DETAIL ? " detail" : "",
- VTY_NEWLINE);
- write++;
+ if (IS_ZEBRA_DEBUG_PW) {
+ vty_out(vty, "debug zebra pseudowires%s", VTY_NEWLINE);
+ write++;
}
- }
- if (IS_ZEBRA_DEBUG_KERNEL)
- {
- vty_out (vty, "debug zebra kernel%s", VTY_NEWLINE);
- write++;
- }
- /* Check here using flags as the 'macro' does an OR */
- if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB))
- {
- vty_out (vty, "debug zebra rib%s", VTY_NEWLINE);
- write++;
- }
- if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED))
- {
- vty_out (vty, "debug zebra rib detailed%s", VTY_NEWLINE);
- write++;
- }
- if (IS_ZEBRA_DEBUG_FPM)
- {
- vty_out (vty, "debug zebra fpm%s", VTY_NEWLINE);
- write++;
- }
- if (IS_ZEBRA_DEBUG_NHT)
- {
- vty_out (vty, "debug zebra nht%s", VTY_NEWLINE);
- write++;
- }
- if (IS_ZEBRA_DEBUG_MPLS)
- {
- vty_out (vty, "debug zebra mpls%s", VTY_NEWLINE);
- write++;
- }
- if (IS_ZEBRA_DEBUG_PW)
- {
- vty_out (vty, "debug zebra pseudowires%s", VTY_NEWLINE);
- write++;
- }
- return write;
+ return write;
}
-void
-zebra_debug_init (void)
+void zebra_debug_init(void)
{
- zebra_debug_event = 0;
- zebra_debug_packet = 0;
- zebra_debug_kernel = 0;
- zebra_debug_rib = 0;
- zebra_debug_fpm = 0;
- zebra_debug_mpls = 0;
- zebra_debug_pw = 0;
-
- install_node (&debug_node, config_write_debug);
-
- install_element (VIEW_NODE, &show_debugging_zebra_cmd);
-
- install_element (ENABLE_NODE, &debug_zebra_events_cmd);
- install_element (ENABLE_NODE, &debug_zebra_nht_cmd);
- install_element (ENABLE_NODE, &debug_zebra_mpls_cmd);
- install_element (ENABLE_NODE, &debug_zebra_pw_cmd);
- install_element (ENABLE_NODE, &debug_zebra_packet_cmd);
- install_element (ENABLE_NODE, &debug_zebra_kernel_cmd);
- install_element (ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
- install_element (ENABLE_NODE, &debug_zebra_rib_cmd);
- install_element (ENABLE_NODE, &debug_zebra_rib_detailed_cmd);
- install_element (ENABLE_NODE, &debug_zebra_fpm_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_events_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_nht_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_mpls_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_kernel_msgdump_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_rib_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_rib_detailed_cmd);
- install_element (ENABLE_NODE, &no_debug_zebra_fpm_cmd);
-
- install_element (CONFIG_NODE, &debug_zebra_events_cmd);
- install_element (CONFIG_NODE, &debug_zebra_nht_cmd);
- install_element (CONFIG_NODE, &debug_zebra_mpls_cmd);
- install_element (CONFIG_NODE, &debug_zebra_pw_cmd);
- install_element (CONFIG_NODE, &debug_zebra_packet_cmd);
- install_element (CONFIG_NODE, &debug_zebra_kernel_cmd);
- install_element (CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
- install_element (CONFIG_NODE, &debug_zebra_rib_cmd);
- install_element (CONFIG_NODE, &debug_zebra_rib_detailed_cmd);
- install_element (CONFIG_NODE, &debug_zebra_fpm_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_events_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_nht_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_mpls_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_kernel_msgdump_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_rib_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_rib_detailed_cmd);
- install_element (CONFIG_NODE, &no_debug_zebra_fpm_cmd);
+ zebra_debug_event = 0;
+ zebra_debug_packet = 0;
+ zebra_debug_kernel = 0;
+ zebra_debug_rib = 0;
+ zebra_debug_fpm = 0;
+ zebra_debug_mpls = 0;
+ zebra_debug_pw = 0;
+
+ install_node(&debug_node, config_write_debug);
+
+ install_element(VIEW_NODE, &show_debugging_zebra_cmd);
+
+ install_element(ENABLE_NODE, &debug_zebra_events_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_nht_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_mpls_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_pw_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_packet_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_kernel_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_rib_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_rib_detailed_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_events_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_nht_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_mpls_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_kernel_msgdump_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_rib_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_rib_detailed_cmd);
+ install_element(ENABLE_NODE, &no_debug_zebra_fpm_cmd);
+
+ install_element(CONFIG_NODE, &debug_zebra_events_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_nht_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_mpls_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_pw_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_packet_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_kernel_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_rib_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_rib_detailed_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_fpm_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_events_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_nht_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_mpls_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_kernel_msgdump_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_rib_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_rib_detailed_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd);
}