summaryrefslogtreecommitdiff
path: root/zebra/debug.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-08 07:54:32 -0400
committerGitHub <noreply@github.com>2017-08-08 07:54:32 -0400
commitf66e92bc4856352dc4c1c81fa35b1dd570cd83e5 (patch)
treed95a4b505cc238c09ea4d2512f2ad6af92f5cb9c /zebra/debug.c
parent78986c05cdb4adf6019d02dc328341943c573b35 (diff)
parent1a99ca998dd05c41d4068ace4ca3ef8ac4ba309c (diff)
Merge pull request #783 from opensourcerouting/pw-manager-2
Add Pseudowire management in Zebra
Diffstat (limited to 'zebra/debug.c')
-rw-r--r--zebra/debug.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index a42d5aa3ef..6f59dc0ac2 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -32,6 +32,7 @@ unsigned long zebra_debug_rib;
unsigned long zebra_debug_fpm;
unsigned long zebra_debug_nht;
unsigned long zebra_debug_mpls;
+unsigned long zebra_debug_pw;
DEFUN (show_debugging_zebra,
show_debugging_zebra_cmd,
@@ -85,6 +86,8 @@ DEFUN (show_debugging_zebra,
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;
}
@@ -122,6 +125,21 @@ DEFUN (debug_zebra_mpls,
return CMD_WARNING;
}
+DEFUN (debug_zebra_pw,
+ debug_zebra_pw_cmd,
+ "[no] debug zebra pseudowires",
+ "Negate a command or set its defaults\n"
+ DEBUG_STR
+ "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;
+}
+
DEFUN (debug_zebra_packet,
debug_zebra_packet_cmd,
"debug zebra packet [<recv|send>] [detail]",
@@ -410,6 +428,11 @@ config_write_debug (struct vty *vty)
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;
}
@@ -422,6 +445,7 @@ zebra_debug_init (void)
zebra_debug_rib = 0;
zebra_debug_fpm = 0;
zebra_debug_mpls = 0;
+ zebra_debug_pw = 0;
install_node (&debug_node, config_write_debug);
@@ -430,6 +454,7 @@ zebra_debug_init (void)
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);
@@ -449,6 +474,7 @@ zebra_debug_init (void)
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);