diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2007-04-09 15:36:33 -0500 |
---|---|---|
committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2007-04-09 15:36:33 -0500 |
commit | 37e11172f8ed157340783b73d56595bb02d0a2d2 (patch) | |
tree | 65163a9cdb8ded9c55c94da92e8a6327bda9067c /bgpd/bgp_debug.c | |
parent | 8d3e3ccfd0d0cb82b253f937339d1c6189a2bf54 (diff) | |
parent | 43cd33a44e010f818633b7f144b5a0be352b41e7 (diff) | |
download | quagga-0.99.6-realms.patch.tar.bz2 quagga-0.99.6-realms.patch.tar.xz |
Merge commit 'quagga_0_99_6_release' into linux-realmsquagga-0.99.6-realms.patch
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r-- | bgpd/bgp_debug.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 1b398ee8..1986b35b 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -43,6 +43,7 @@ unsigned long conf_bgp_debug_filter; unsigned long conf_bgp_debug_keepalive; unsigned long conf_bgp_debug_update; unsigned long conf_bgp_debug_normal; +unsigned long conf_bgp_debug_zebra; unsigned long term_bgp_debug_fsm; unsigned long term_bgp_debug_events; @@ -51,6 +52,7 @@ unsigned long term_bgp_debug_filter; unsigned long term_bgp_debug_keepalive; unsigned long term_bgp_debug_update; unsigned long term_bgp_debug_normal; +unsigned long term_bgp_debug_zebra; /* messages for BGP-4 status */ struct message bgp_status_msg[] = @@ -62,6 +64,8 @@ struct message bgp_status_msg[] = { OpenSent, "OpenSent" }, { OpenConfirm, "OpenConfirm" }, { Established, "Established" }, + { Clearing, "Clearing" }, + { Deleted, "Deleted" }, }; int bgp_status_msg_max = BGP_STATUS_MAX; @@ -588,6 +592,49 @@ ALIAS (no_debug_bgp_normal, UNDEBUG_STR BGP_STR) +DEFUN (debug_bgp_zebra, + debug_bgp_zebra_cmd, + "debug bgp zebra", + DEBUG_STR + BGP_STR + "BGP Zebra messages\n") +{ + if (vty->node == CONFIG_NODE) + DEBUG_ON (zebra, ZEBRA); + else + { + TERM_DEBUG_ON (zebra, ZEBRA); + vty_out (vty, "BGP zebra debugging is on%s", VTY_NEWLINE); + } + return CMD_SUCCESS; +} + +DEFUN (no_debug_bgp_zebra, + no_debug_bgp_zebra_cmd, + "no debug bgp zebra", + NO_STR + DEBUG_STR + BGP_STR + "BGP Zebra messages\n") +{ + if (vty->node == CONFIG_NODE) + DEBUG_OFF (zebra, ZEBRA); + else + { + TERM_DEBUG_OFF (zebra, ZEBRA); + vty_out (vty, "BGP zebra debugging is off%s", VTY_NEWLINE); + } + return CMD_SUCCESS; +} + +ALIAS (no_debug_bgp_zebra, + undebug_bgp_zebra_cmd, + "undebug bgp zebra", + UNDEBUG_STR + DEBUG_STR + BGP_STR + "BGP Zebra messages\n") + DEFUN (no_debug_bgp_all, no_debug_bgp_all_cmd, "no debug all bgp", @@ -603,6 +650,7 @@ DEFUN (no_debug_bgp_all, TERM_DEBUG_OFF (update, UPDATE_OUT); TERM_DEBUG_OFF (fsm, FSM); TERM_DEBUG_OFF (filter, FILTER); + TERM_DEBUG_OFF (zebra, ZEBRA); vty_out (vty, "All possible debugging has been turned off%s", VTY_NEWLINE); return CMD_SUCCESS; @@ -640,6 +688,8 @@ DEFUN (show_debugging_bgp, vty_out (vty, " BGP fsm debugging is on%s", VTY_NEWLINE); if (BGP_DEBUG (filter, FILTER)) vty_out (vty, " BGP filter debugging is on%s", VTY_NEWLINE); + if (BGP_DEBUG (zebra, ZEBRA)) + vty_out (vty, " BGP zebra debugging is on%s", VTY_NEWLINE); vty_out (vty, "%s", VTY_NEWLINE); return CMD_SUCCESS; } @@ -695,6 +745,12 @@ bgp_config_write_debug (struct vty *vty) write++; } + if (CONF_BGP_DEBUG (zebra, ZEBRA)) + { + vty_out (vty, "debug bgp zebra%s", VTY_NEWLINE); + write++; + } + return write; } @@ -726,6 +782,8 @@ bgp_debug_init (void) install_element (CONFIG_NODE, &debug_bgp_update_direct_cmd); install_element (ENABLE_NODE, &debug_bgp_normal_cmd); install_element (CONFIG_NODE, &debug_bgp_normal_cmd); + install_element (ENABLE_NODE, &debug_bgp_zebra_cmd); + install_element (CONFIG_NODE, &debug_bgp_zebra_cmd); install_element (ENABLE_NODE, &no_debug_bgp_fsm_cmd); install_element (ENABLE_NODE, &undebug_bgp_fsm_cmd); @@ -745,6 +803,9 @@ bgp_debug_init (void) install_element (ENABLE_NODE, &no_debug_bgp_normal_cmd); install_element (ENABLE_NODE, &undebug_bgp_normal_cmd); install_element (CONFIG_NODE, &no_debug_bgp_normal_cmd); + install_element (ENABLE_NODE, &no_debug_bgp_zebra_cmd); + install_element (ENABLE_NODE, &undebug_bgp_zebra_cmd); + install_element (CONFIG_NODE, &no_debug_bgp_zebra_cmd); install_element (ENABLE_NODE, &no_debug_bgp_all_cmd); install_element (ENABLE_NODE, &undebug_bgp_all_cmd); } |