paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* BGP-4, BGP-4+ packet debug routine |
| 2 | Copyright (C) 1996, 97, 99 Kunihiro Ishiguro |
| 3 | |
| 4 | This file is part of GNU Zebra. |
| 5 | |
| 6 | GNU Zebra is free software; you can redistribute it and/or modify it |
| 7 | under the terms of the GNU General Public License as published by the |
| 8 | Free Software Foundation; either version 2, or (at your option) any |
| 9 | later version. |
| 10 | |
| 11 | GNU Zebra is distributed in the hope that it will be useful, but |
| 12 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Zebra; see the file COPYING. If not, write to the Free |
| 18 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 19 | 02111-1307, USA. */ |
| 20 | |
| 21 | #include <zebra.h> |
| 22 | |
gdt | 5e4fa16 | 2004-03-16 14:38:36 +0000 | [diff] [blame] | 23 | #include <lib/version.h> |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 24 | #include "prefix.h" |
| 25 | #include "linklist.h" |
| 26 | #include "stream.h" |
| 27 | #include "command.h" |
| 28 | #include "str.h" |
| 29 | #include "log.h" |
| 30 | #include "sockunion.h" |
| 31 | |
| 32 | #include "bgpd/bgpd.h" |
| 33 | #include "bgpd/bgp_aspath.h" |
| 34 | #include "bgpd/bgp_route.h" |
| 35 | #include "bgpd/bgp_attr.h" |
| 36 | #include "bgpd/bgp_debug.h" |
| 37 | #include "bgpd/bgp_community.h" |
| 38 | |
| 39 | unsigned long conf_bgp_debug_fsm; |
| 40 | unsigned long conf_bgp_debug_events; |
| 41 | unsigned long conf_bgp_debug_packet; |
| 42 | unsigned long conf_bgp_debug_filter; |
| 43 | unsigned long conf_bgp_debug_keepalive; |
| 44 | unsigned long conf_bgp_debug_update; |
| 45 | unsigned long conf_bgp_debug_normal; |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 46 | unsigned long conf_bgp_debug_zebra; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 47 | |
| 48 | unsigned long term_bgp_debug_fsm; |
| 49 | unsigned long term_bgp_debug_events; |
| 50 | unsigned long term_bgp_debug_packet; |
| 51 | unsigned long term_bgp_debug_filter; |
| 52 | unsigned long term_bgp_debug_keepalive; |
| 53 | unsigned long term_bgp_debug_update; |
| 54 | unsigned long term_bgp_debug_normal; |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 55 | unsigned long term_bgp_debug_zebra; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 56 | |
| 57 | /* messages for BGP-4 status */ |
| 58 | struct message bgp_status_msg[] = |
| 59 | { |
| 60 | { 0, "null" }, |
| 61 | { Idle, "Idle" }, |
| 62 | { Connect, "Connect" }, |
| 63 | { Active, "Active" }, |
| 64 | { OpenSent, "OpenSent" }, |
| 65 | { OpenConfirm, "OpenConfirm" }, |
| 66 | { Established, "Established" }, |
Paul Jakma | ca058a3 | 2006-09-14 02:58:49 +0000 | [diff] [blame] | 67 | { Clearing, "Clearing" }, |
| 68 | { Deleted, "Deleted" }, |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 69 | }; |
| 70 | int bgp_status_msg_max = BGP_STATUS_MAX; |
| 71 | |
| 72 | /* BGP message type string. */ |
paul | fd79ac9 | 2004-10-13 05:06:08 +0000 | [diff] [blame] | 73 | const char *bgp_type_str[] = |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 74 | { |
| 75 | NULL, |
| 76 | "OPEN", |
| 77 | "UPDATE", |
| 78 | "NOTIFICATION", |
| 79 | "KEEPALIVE", |
| 80 | "ROUTE-REFRESH", |
| 81 | "CAPABILITY" |
| 82 | }; |
| 83 | |
| 84 | /* message for BGP-4 Notify */ |
| 85 | struct message bgp_notify_msg[] = |
| 86 | { |
| 87 | { 0, "" }, |
| 88 | { BGP_NOTIFY_HEADER_ERR, "Message Header Error"}, |
| 89 | { BGP_NOTIFY_OPEN_ERR, "OPEN Message Error"}, |
| 90 | { BGP_NOTIFY_UPDATE_ERR, "UPDATE Message Error"}, |
| 91 | { BGP_NOTIFY_HOLD_ERR, "Hold Timer Expired"}, |
| 92 | { BGP_NOTIFY_FSM_ERR, "Finite State Machine Error"}, |
| 93 | { BGP_NOTIFY_CEASE, "Cease"}, |
| 94 | { BGP_NOTIFY_CAPABILITY_ERR, "CAPABILITY Message Error"}, |
| 95 | }; |
| 96 | int bgp_notify_msg_max = BGP_NOTIFY_MAX; |
| 97 | |
| 98 | struct message bgp_notify_head_msg[] = |
| 99 | { |
| 100 | { 0, "null"}, |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 101 | { BGP_NOTIFY_HEADER_NOT_SYNC, "/Connection Not Synchronized"}, |
| 102 | { BGP_NOTIFY_HEADER_BAD_MESLEN, "/Bad Message Length"}, |
| 103 | { BGP_NOTIFY_HEADER_BAD_MESTYPE, "/Bad Message Type"} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 104 | }; |
| 105 | int bgp_notify_head_msg_max = BGP_NOTIFY_HEADER_MAX; |
| 106 | |
| 107 | struct message bgp_notify_open_msg[] = |
| 108 | { |
| 109 | { 0, "null" }, |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 110 | { BGP_NOTIFY_OPEN_UNSUP_VERSION, "/Unsupported Version Number" }, |
| 111 | { BGP_NOTIFY_OPEN_BAD_PEER_AS, "/Bad Peer AS"}, |
| 112 | { BGP_NOTIFY_OPEN_BAD_BGP_IDENT, "/Bad BGP Identifier"}, |
| 113 | { BGP_NOTIFY_OPEN_UNSUP_PARAM, "/Unsupported Optional Parameter"}, |
| 114 | { BGP_NOTIFY_OPEN_AUTH_FAILURE, "/Authentication Failure"}, |
| 115 | { BGP_NOTIFY_OPEN_UNACEP_HOLDTIME, "/Unacceptable Hold Time"}, |
| 116 | { BGP_NOTIFY_OPEN_UNSUP_CAPBL, "/Unsupported Capability"}, |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 117 | }; |
| 118 | int bgp_notify_open_msg_max = BGP_NOTIFY_OPEN_MAX; |
| 119 | |
| 120 | struct message bgp_notify_update_msg[] = |
| 121 | { |
| 122 | { 0, "null"}, |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 123 | { BGP_NOTIFY_UPDATE_MAL_ATTR, "/Malformed Attribute List"}, |
| 124 | { BGP_NOTIFY_UPDATE_UNREC_ATTR, "/Unrecognized Well-known Attribute"}, |
| 125 | { BGP_NOTIFY_UPDATE_MISS_ATTR, "/Missing Well-known Attribute"}, |
| 126 | { BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR, "/Attribute Flags Error"}, |
| 127 | { BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, "/Attribute Length Error"}, |
| 128 | { BGP_NOTIFY_UPDATE_INVAL_ORIGIN, "/Invalid ORIGIN Attribute"}, |
| 129 | { BGP_NOTIFY_UPDATE_AS_ROUTE_LOOP, "/AS Routing Loop"}, |
| 130 | { BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP, "/Invalid NEXT_HOP Attribute"}, |
| 131 | { BGP_NOTIFY_UPDATE_OPT_ATTR_ERR, "/Optional Attribute Error"}, |
| 132 | { BGP_NOTIFY_UPDATE_INVAL_NETWORK, "/Invalid Network Field"}, |
| 133 | { BGP_NOTIFY_UPDATE_MAL_AS_PATH, "/Malformed AS_PATH"}, |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 134 | }; |
| 135 | int bgp_notify_update_msg_max = BGP_NOTIFY_UPDATE_MAX; |
| 136 | |
| 137 | struct message bgp_notify_cease_msg[] = |
| 138 | { |
| 139 | { 0, ""}, |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 140 | { BGP_NOTIFY_CEASE_MAX_PREFIX, "/Maximum Number of Prefixes Reached"}, |
| 141 | { BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN, "/Administratively Shutdown"}, |
| 142 | { BGP_NOTIFY_CEASE_PEER_UNCONFIG, "/Peer Unconfigured"}, |
| 143 | { BGP_NOTIFY_CEASE_ADMIN_RESET, "/Administratively Reset"}, |
| 144 | { BGP_NOTIFY_CEASE_CONNECT_REJECT, "/Connection Rejected"}, |
| 145 | { BGP_NOTIFY_CEASE_CONFIG_CHANGE, "/Other Configuration Change"}, |
| 146 | { BGP_NOTIFY_CEASE_COLLISION_RESOLUTION, "/Connection collision resolution"}, |
| 147 | { BGP_NOTIFY_CEASE_OUT_OF_RESOURCE, "/Out of Resource"}, |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 148 | }; |
| 149 | int bgp_notify_cease_msg_max = BGP_NOTIFY_CEASE_MAX; |
| 150 | |
| 151 | struct message bgp_notify_capability_msg[] = |
| 152 | { |
| 153 | { 0, "null" }, |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 154 | { BGP_NOTIFY_CAPABILITY_INVALID_ACTION, "/Invalid Action Value" }, |
| 155 | { BGP_NOTIFY_CAPABILITY_INVALID_LENGTH, "/Invalid Capability Length"}, |
| 156 | { BGP_NOTIFY_CAPABILITY_MALFORMED_CODE, "/Malformed Capability Value"}, |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 157 | }; |
| 158 | int bgp_notify_capability_msg_max = BGP_NOTIFY_CAPABILITY_MAX; |
| 159 | |
| 160 | /* Origin strings. */ |
paul | fd79ac9 | 2004-10-13 05:06:08 +0000 | [diff] [blame] | 161 | const char *bgp_origin_str[] = {"i","e","?"}; |
| 162 | const char *bgp_origin_long_str[] = {"IGP","EGP","incomplete"}; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 163 | |
| 164 | /* Dump attribute. */ |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 165 | int |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 166 | bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) |
| 167 | { |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 168 | if (! attr) |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 169 | return 0; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 170 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 171 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_NEXT_HOP))) |
| 172 | snprintf (buf, size, "nexthop %s", inet_ntoa (attr->nexthop)); |
| 173 | |
| 174 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ORIGIN))) |
| 175 | snprintf (buf + strlen (buf), size - strlen (buf), ", origin %s", |
| 176 | bgp_origin_str[attr->origin]); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 177 | |
| 178 | #ifdef HAVE_IPV6 |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 179 | if (attr->extra) |
| 180 | { |
| 181 | char addrbuf[BUFSIZ]; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 182 | |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 183 | /* Add MP case. */ |
| 184 | if (attr->extra->mp_nexthop_len == 16 |
| 185 | || attr->extra->mp_nexthop_len == 32) |
| 186 | snprintf (buf + strlen (buf), size - strlen (buf), ", mp_nexthop %s", |
| 187 | inet_ntop (AF_INET6, &attr->extra->mp_nexthop_global, |
| 188 | addrbuf, BUFSIZ)); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 189 | |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 190 | if (attr->extra->mp_nexthop_len == 32) |
| 191 | snprintf (buf + strlen (buf), size - strlen (buf), "(%s)", |
| 192 | inet_ntop (AF_INET6, &attr->extra->mp_nexthop_local, |
| 193 | addrbuf, BUFSIZ)); |
| 194 | } |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 195 | #endif /* HAVE_IPV6 */ |
| 196 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 197 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 198 | snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d", |
| 199 | attr->local_pref); |
| 200 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 201 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 202 | snprintf (buf + strlen (buf), size - strlen (buf), ", metric %d", |
| 203 | attr->med); |
| 204 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 205 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 206 | snprintf (buf + strlen (buf), size - strlen (buf), ", community %s", |
| 207 | community_str (attr->community)); |
| 208 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 209 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ATOMIC_AGGREGATE))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 210 | snprintf (buf + strlen (buf), size - strlen (buf), ", atomic-aggregate"); |
| 211 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 212 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_AGGREGATOR))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 213 | snprintf (buf + strlen (buf), size - strlen (buf), ", aggregated by %d %s", |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 214 | attr->extra->aggregator_as, |
| 215 | inet_ntoa (attr->extra->aggregator_addr)); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 216 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 217 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ORIGINATOR_ID))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 218 | snprintf (buf + strlen (buf), size - strlen (buf), ", originator %s", |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 219 | inet_ntoa (attr->extra->originator_id)); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 220 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 221 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_CLUSTER_LIST))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 222 | { |
| 223 | int i; |
| 224 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 225 | snprintf (buf + strlen (buf), size - strlen (buf), ", clusterlist"); |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 226 | for (i = 0; i < attr->extra->cluster->length / 4; i++) |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 227 | snprintf (buf + strlen (buf), size - strlen (buf), " %s", |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame^] | 228 | inet_ntoa (attr->extra->cluster->list[i])); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 229 | } |
| 230 | |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 231 | if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_AS_PATH))) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 232 | snprintf (buf + strlen (buf), size - strlen (buf), ", path %s", |
| 233 | aspath_print (attr->aspath)); |
paul | e01f9cb | 2004-07-09 17:48:53 +0000 | [diff] [blame] | 234 | |
| 235 | if (strlen (buf) > 1) |
| 236 | return 1; |
| 237 | else |
| 238 | return 0; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 239 | } |
| 240 | |
| 241 | /* dump notify packet */ |
| 242 | void |
paul | fd79ac9 | 2004-10-13 05:06:08 +0000 | [diff] [blame] | 243 | bgp_notify_print(struct peer *peer, struct bgp_notify *bgp_notify, |
| 244 | const char *direct) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 245 | { |
paul | fd79ac9 | 2004-10-13 05:06:08 +0000 | [diff] [blame] | 246 | const char *subcode_str; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 247 | |
| 248 | subcode_str = ""; |
| 249 | |
| 250 | switch (bgp_notify->code) |
| 251 | { |
| 252 | case BGP_NOTIFY_HEADER_ERR: |
| 253 | subcode_str = LOOKUP (bgp_notify_head_msg, bgp_notify->subcode); |
| 254 | break; |
| 255 | case BGP_NOTIFY_OPEN_ERR: |
| 256 | subcode_str = LOOKUP (bgp_notify_open_msg, bgp_notify->subcode); |
| 257 | break; |
| 258 | case BGP_NOTIFY_UPDATE_ERR: |
| 259 | subcode_str = LOOKUP (bgp_notify_update_msg, bgp_notify->subcode); |
| 260 | break; |
| 261 | case BGP_NOTIFY_HOLD_ERR: |
| 262 | subcode_str = ""; |
| 263 | break; |
| 264 | case BGP_NOTIFY_FSM_ERR: |
| 265 | subcode_str = ""; |
| 266 | break; |
| 267 | case BGP_NOTIFY_CEASE: |
| 268 | subcode_str = LOOKUP (bgp_notify_cease_msg, bgp_notify->subcode); |
| 269 | break; |
| 270 | case BGP_NOTIFY_CAPABILITY_ERR: |
| 271 | subcode_str = LOOKUP (bgp_notify_capability_msg, bgp_notify->subcode); |
| 272 | break; |
| 273 | } |
hasso | 3950fda | 2004-05-20 10:22:49 +0000 | [diff] [blame] | 274 | |
| 275 | if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) |
| 276 | zlog_info ("%%NOTIFICATION: %s neighbor %s %d/%d (%s%s) %d bytes %s", |
| 277 | strcmp (direct, "received") == 0 ? "received from" : "sent to", |
| 278 | peer->host, bgp_notify->code, bgp_notify->subcode, |
| 279 | LOOKUP (bgp_notify_msg, bgp_notify->code), |
| 280 | subcode_str, bgp_notify->length, |
| 281 | bgp_notify->data ? bgp_notify->data : ""); |
| 282 | else if (BGP_DEBUG (normal, NORMAL)) |
ajs | 557865c | 2004-12-08 19:59:11 +0000 | [diff] [blame] | 283 | plog_debug (peer->log, "%s %s NOTIFICATION %d/%d (%s%s) %d bytes %s", |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 284 | peer ? peer->host : "", |
| 285 | direct, bgp_notify->code, bgp_notify->subcode, |
| 286 | LOOKUP (bgp_notify_msg, bgp_notify->code), |
| 287 | subcode_str, bgp_notify->length, |
| 288 | bgp_notify->data ? bgp_notify->data : ""); |
| 289 | } |
| 290 | |
| 291 | /* Debug option setting interface. */ |
| 292 | unsigned long bgp_debug_option = 0; |
| 293 | |
| 294 | int |
| 295 | debug (unsigned int option) |
| 296 | { |
| 297 | return bgp_debug_option & option; |
| 298 | } |
| 299 | |
| 300 | DEFUN (debug_bgp_fsm, |
| 301 | debug_bgp_fsm_cmd, |
| 302 | "debug bgp fsm", |
| 303 | DEBUG_STR |
| 304 | BGP_STR |
| 305 | "BGP Finite State Machine\n") |
| 306 | { |
| 307 | if (vty->node == CONFIG_NODE) |
| 308 | DEBUG_ON (fsm, FSM); |
| 309 | else |
| 310 | { |
| 311 | TERM_DEBUG_ON (fsm, FSM); |
| 312 | vty_out (vty, "BGP fsm debugging is on%s", VTY_NEWLINE); |
| 313 | } |
| 314 | return CMD_SUCCESS; |
| 315 | } |
| 316 | |
| 317 | DEFUN (no_debug_bgp_fsm, |
| 318 | no_debug_bgp_fsm_cmd, |
| 319 | "no debug bgp fsm", |
| 320 | NO_STR |
| 321 | DEBUG_STR |
| 322 | BGP_STR |
| 323 | "Finite State Machine\n") |
| 324 | { |
| 325 | if (vty->node == CONFIG_NODE) |
| 326 | DEBUG_OFF (fsm, FSM); |
| 327 | else |
| 328 | { |
| 329 | TERM_DEBUG_OFF (fsm, FSM); |
| 330 | vty_out (vty, "BGP fsm debugging is off%s", VTY_NEWLINE); |
| 331 | } |
| 332 | return CMD_SUCCESS; |
| 333 | } |
| 334 | |
| 335 | ALIAS (no_debug_bgp_fsm, |
| 336 | undebug_bgp_fsm_cmd, |
| 337 | "undebug bgp fsm", |
| 338 | UNDEBUG_STR |
| 339 | DEBUG_STR |
| 340 | BGP_STR |
| 341 | "Finite State Machine\n") |
| 342 | |
| 343 | DEFUN (debug_bgp_events, |
| 344 | debug_bgp_events_cmd, |
| 345 | "debug bgp events", |
| 346 | DEBUG_STR |
| 347 | BGP_STR |
| 348 | "BGP events\n") |
| 349 | { |
| 350 | if (vty->node == CONFIG_NODE) |
| 351 | DEBUG_ON (events, EVENTS); |
| 352 | else |
| 353 | { |
| 354 | TERM_DEBUG_ON (events, EVENTS); |
| 355 | vty_out (vty, "BGP events debugging is on%s", VTY_NEWLINE); |
| 356 | } |
| 357 | return CMD_SUCCESS; |
| 358 | } |
| 359 | |
| 360 | DEFUN (no_debug_bgp_events, |
| 361 | no_debug_bgp_events_cmd, |
| 362 | "no debug bgp events", |
| 363 | NO_STR |
| 364 | DEBUG_STR |
| 365 | BGP_STR |
| 366 | "BGP events\n") |
| 367 | { |
| 368 | if (vty->node == CONFIG_NODE) |
| 369 | DEBUG_OFF (events, EVENTS); |
| 370 | else |
| 371 | { |
| 372 | TERM_DEBUG_OFF (events, EVENTS); |
| 373 | vty_out (vty, "BGP events debugging is off%s", VTY_NEWLINE); |
| 374 | } |
| 375 | return CMD_SUCCESS; |
| 376 | } |
| 377 | |
| 378 | ALIAS (no_debug_bgp_events, |
| 379 | undebug_bgp_events_cmd, |
| 380 | "undebug bgp events", |
| 381 | UNDEBUG_STR |
| 382 | BGP_STR |
| 383 | "BGP events\n") |
| 384 | |
| 385 | DEFUN (debug_bgp_filter, |
| 386 | debug_bgp_filter_cmd, |
| 387 | "debug bgp filters", |
| 388 | DEBUG_STR |
| 389 | BGP_STR |
| 390 | "BGP filters\n") |
| 391 | { |
| 392 | if (vty->node == CONFIG_NODE) |
| 393 | DEBUG_ON (filter, FILTER); |
| 394 | else |
| 395 | { |
| 396 | TERM_DEBUG_ON (filter, FILTER); |
| 397 | vty_out (vty, "BGP filters debugging is on%s", VTY_NEWLINE); |
| 398 | } |
| 399 | return CMD_SUCCESS; |
| 400 | } |
| 401 | |
| 402 | DEFUN (no_debug_bgp_filter, |
| 403 | no_debug_bgp_filter_cmd, |
| 404 | "no debug bgp filters", |
| 405 | NO_STR |
| 406 | DEBUG_STR |
| 407 | BGP_STR |
| 408 | "BGP filters\n") |
| 409 | { |
| 410 | if (vty->node == CONFIG_NODE) |
| 411 | DEBUG_OFF (filter, FILTER); |
| 412 | else |
| 413 | { |
| 414 | TERM_DEBUG_OFF (filter, FILTER); |
| 415 | vty_out (vty, "BGP filters debugging is off%s", VTY_NEWLINE); |
| 416 | } |
| 417 | return CMD_SUCCESS; |
| 418 | } |
| 419 | |
| 420 | ALIAS (no_debug_bgp_filter, |
| 421 | undebug_bgp_filter_cmd, |
| 422 | "undebug bgp filters", |
| 423 | UNDEBUG_STR |
| 424 | BGP_STR |
| 425 | "BGP filters\n") |
| 426 | |
| 427 | DEFUN (debug_bgp_keepalive, |
| 428 | debug_bgp_keepalive_cmd, |
| 429 | "debug bgp keepalives", |
| 430 | DEBUG_STR |
| 431 | BGP_STR |
| 432 | "BGP keepalives\n") |
| 433 | { |
| 434 | if (vty->node == CONFIG_NODE) |
| 435 | DEBUG_ON (keepalive, KEEPALIVE); |
| 436 | else |
| 437 | { |
| 438 | TERM_DEBUG_ON (keepalive, KEEPALIVE); |
| 439 | vty_out (vty, "BGP keepalives debugging is on%s", VTY_NEWLINE); |
| 440 | } |
| 441 | return CMD_SUCCESS; |
| 442 | } |
| 443 | |
| 444 | DEFUN (no_debug_bgp_keepalive, |
| 445 | no_debug_bgp_keepalive_cmd, |
| 446 | "no debug bgp keepalives", |
| 447 | NO_STR |
| 448 | DEBUG_STR |
| 449 | BGP_STR |
| 450 | "BGP keepalives\n") |
| 451 | { |
| 452 | if (vty->node == CONFIG_NODE) |
| 453 | DEBUG_OFF (keepalive, KEEPALIVE); |
| 454 | else |
| 455 | { |
| 456 | TERM_DEBUG_OFF (keepalive, KEEPALIVE); |
| 457 | vty_out (vty, "BGP keepalives debugging is off%s", VTY_NEWLINE); |
| 458 | } |
| 459 | return CMD_SUCCESS; |
| 460 | } |
| 461 | |
| 462 | ALIAS (no_debug_bgp_keepalive, |
| 463 | undebug_bgp_keepalive_cmd, |
| 464 | "undebug bgp keepalives", |
| 465 | UNDEBUG_STR |
| 466 | BGP_STR |
| 467 | "BGP keepalives\n") |
| 468 | |
| 469 | DEFUN (debug_bgp_update, |
| 470 | debug_bgp_update_cmd, |
| 471 | "debug bgp updates", |
| 472 | DEBUG_STR |
| 473 | BGP_STR |
| 474 | "BGP updates\n") |
| 475 | { |
| 476 | if (vty->node == CONFIG_NODE) |
| 477 | { |
| 478 | DEBUG_ON (update, UPDATE_IN); |
| 479 | DEBUG_ON (update, UPDATE_OUT); |
| 480 | } |
| 481 | else |
| 482 | { |
| 483 | TERM_DEBUG_ON (update, UPDATE_IN); |
| 484 | TERM_DEBUG_ON (update, UPDATE_OUT); |
| 485 | vty_out (vty, "BGP updates debugging is on%s", VTY_NEWLINE); |
| 486 | } |
| 487 | return CMD_SUCCESS; |
| 488 | } |
| 489 | |
| 490 | DEFUN (debug_bgp_update_direct, |
| 491 | debug_bgp_update_direct_cmd, |
| 492 | "debug bgp updates (in|out)", |
| 493 | DEBUG_STR |
| 494 | BGP_STR |
| 495 | "BGP updates\n" |
| 496 | "Inbound updates\n" |
| 497 | "Outbound updates\n") |
| 498 | { |
| 499 | if (vty->node == CONFIG_NODE) |
| 500 | { |
| 501 | if (strncmp ("i", argv[0], 1) == 0) |
| 502 | { |
| 503 | DEBUG_OFF (update, UPDATE_OUT); |
| 504 | DEBUG_ON (update, UPDATE_IN); |
| 505 | } |
| 506 | else |
| 507 | { |
| 508 | DEBUG_OFF (update, UPDATE_IN); |
| 509 | DEBUG_ON (update, UPDATE_OUT); |
| 510 | } |
| 511 | } |
| 512 | else |
| 513 | { |
| 514 | if (strncmp ("i", argv[0], 1) == 0) |
| 515 | { |
| 516 | TERM_DEBUG_OFF (update, UPDATE_OUT); |
| 517 | TERM_DEBUG_ON (update, UPDATE_IN); |
| 518 | vty_out (vty, "BGP updates debugging is on (inbound)%s", VTY_NEWLINE); |
| 519 | } |
| 520 | else |
| 521 | { |
| 522 | TERM_DEBUG_OFF (update, UPDATE_IN); |
| 523 | TERM_DEBUG_ON (update, UPDATE_OUT); |
| 524 | vty_out (vty, "BGP updates debugging is on (outbound)%s", VTY_NEWLINE); |
| 525 | } |
| 526 | } |
| 527 | return CMD_SUCCESS; |
| 528 | } |
| 529 | |
| 530 | DEFUN (no_debug_bgp_update, |
| 531 | no_debug_bgp_update_cmd, |
| 532 | "no debug bgp updates", |
| 533 | NO_STR |
| 534 | DEBUG_STR |
| 535 | BGP_STR |
| 536 | "BGP updates\n") |
| 537 | { |
| 538 | if (vty->node == CONFIG_NODE) |
| 539 | { |
| 540 | DEBUG_OFF (update, UPDATE_IN); |
| 541 | DEBUG_OFF (update, UPDATE_OUT); |
| 542 | } |
| 543 | else |
| 544 | { |
| 545 | TERM_DEBUG_OFF (update, UPDATE_IN); |
| 546 | TERM_DEBUG_OFF (update, UPDATE_OUT); |
| 547 | vty_out (vty, "BGP updates debugging is off%s", VTY_NEWLINE); |
| 548 | } |
| 549 | return CMD_SUCCESS; |
| 550 | } |
| 551 | |
| 552 | ALIAS (no_debug_bgp_update, |
| 553 | undebug_bgp_update_cmd, |
| 554 | "undebug bgp updates", |
| 555 | UNDEBUG_STR |
| 556 | BGP_STR |
| 557 | "BGP updates\n") |
| 558 | |
| 559 | DEFUN (debug_bgp_normal, |
| 560 | debug_bgp_normal_cmd, |
| 561 | "debug bgp", |
| 562 | DEBUG_STR |
| 563 | BGP_STR) |
| 564 | { |
| 565 | if (vty->node == CONFIG_NODE) |
| 566 | DEBUG_ON (normal, NORMAL); |
| 567 | else |
| 568 | { |
| 569 | TERM_DEBUG_ON (normal, NORMAL); |
| 570 | vty_out (vty, "BGP debugging is on%s", VTY_NEWLINE); |
| 571 | } |
| 572 | return CMD_SUCCESS; |
| 573 | } |
| 574 | |
| 575 | DEFUN (no_debug_bgp_normal, |
| 576 | no_debug_bgp_normal_cmd, |
| 577 | "no debug bgp", |
| 578 | NO_STR |
| 579 | DEBUG_STR |
| 580 | BGP_STR) |
| 581 | { |
| 582 | if (vty->node == CONFIG_NODE) |
| 583 | DEBUG_OFF (normal, NORMAL); |
| 584 | else |
| 585 | { |
| 586 | TERM_DEBUG_OFF (normal, NORMAL); |
| 587 | vty_out (vty, "BGP debugging is off%s", VTY_NEWLINE); |
| 588 | } |
| 589 | return CMD_SUCCESS; |
| 590 | } |
| 591 | |
| 592 | ALIAS (no_debug_bgp_normal, |
| 593 | undebug_bgp_normal_cmd, |
| 594 | "undebug bgp", |
| 595 | UNDEBUG_STR |
| 596 | BGP_STR) |
| 597 | |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 598 | DEFUN (debug_bgp_zebra, |
| 599 | debug_bgp_zebra_cmd, |
| 600 | "debug bgp zebra", |
| 601 | DEBUG_STR |
| 602 | BGP_STR |
| 603 | "BGP Zebra messages\n") |
| 604 | { |
| 605 | if (vty->node == CONFIG_NODE) |
| 606 | DEBUG_ON (zebra, ZEBRA); |
| 607 | else |
| 608 | { |
| 609 | TERM_DEBUG_ON (zebra, ZEBRA); |
| 610 | vty_out (vty, "BGP zebra debugging is on%s", VTY_NEWLINE); |
| 611 | } |
| 612 | return CMD_SUCCESS; |
| 613 | } |
| 614 | |
| 615 | DEFUN (no_debug_bgp_zebra, |
| 616 | no_debug_bgp_zebra_cmd, |
| 617 | "no debug bgp zebra", |
| 618 | NO_STR |
| 619 | DEBUG_STR |
| 620 | BGP_STR |
| 621 | "BGP Zebra messages\n") |
| 622 | { |
| 623 | if (vty->node == CONFIG_NODE) |
| 624 | DEBUG_OFF (zebra, ZEBRA); |
| 625 | else |
| 626 | { |
| 627 | TERM_DEBUG_OFF (zebra, ZEBRA); |
| 628 | vty_out (vty, "BGP zebra debugging is off%s", VTY_NEWLINE); |
| 629 | } |
| 630 | return CMD_SUCCESS; |
| 631 | } |
| 632 | |
| 633 | ALIAS (no_debug_bgp_zebra, |
| 634 | undebug_bgp_zebra_cmd, |
| 635 | "undebug bgp zebra", |
| 636 | UNDEBUG_STR |
| 637 | DEBUG_STR |
| 638 | BGP_STR |
| 639 | "BGP Zebra messages\n") |
| 640 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 641 | DEFUN (no_debug_bgp_all, |
| 642 | no_debug_bgp_all_cmd, |
| 643 | "no debug all bgp", |
| 644 | NO_STR |
| 645 | DEBUG_STR |
| 646 | "Enable all debugging\n" |
| 647 | BGP_STR) |
| 648 | { |
| 649 | TERM_DEBUG_OFF (normal, NORMAL); |
| 650 | TERM_DEBUG_OFF (events, EVENTS); |
| 651 | TERM_DEBUG_OFF (keepalive, KEEPALIVE); |
| 652 | TERM_DEBUG_OFF (update, UPDATE_IN); |
| 653 | TERM_DEBUG_OFF (update, UPDATE_OUT); |
| 654 | TERM_DEBUG_OFF (fsm, FSM); |
| 655 | TERM_DEBUG_OFF (filter, FILTER); |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 656 | TERM_DEBUG_OFF (zebra, ZEBRA); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 657 | vty_out (vty, "All possible debugging has been turned off%s", VTY_NEWLINE); |
| 658 | |
| 659 | return CMD_SUCCESS; |
| 660 | } |
| 661 | |
| 662 | ALIAS (no_debug_bgp_all, |
| 663 | undebug_bgp_all_cmd, |
| 664 | "undebug all bgp", |
| 665 | UNDEBUG_STR |
| 666 | "Enable all debugging\n" |
| 667 | BGP_STR) |
| 668 | |
| 669 | DEFUN (show_debugging_bgp, |
| 670 | show_debugging_bgp_cmd, |
| 671 | "show debugging bgp", |
| 672 | SHOW_STR |
| 673 | DEBUG_STR |
| 674 | BGP_STR) |
| 675 | { |
| 676 | vty_out (vty, "BGP debugging status:%s", VTY_NEWLINE); |
| 677 | |
| 678 | if (BGP_DEBUG (normal, NORMAL)) |
| 679 | vty_out (vty, " BGP debugging is on%s", VTY_NEWLINE); |
| 680 | if (BGP_DEBUG (events, EVENTS)) |
| 681 | vty_out (vty, " BGP events debugging is on%s", VTY_NEWLINE); |
| 682 | if (BGP_DEBUG (keepalive, KEEPALIVE)) |
| 683 | vty_out (vty, " BGP keepalives debugging is on%s", VTY_NEWLINE); |
| 684 | if (BGP_DEBUG (update, UPDATE_IN) && BGP_DEBUG (update, UPDATE_OUT)) |
| 685 | vty_out (vty, " BGP updates debugging is on%s", VTY_NEWLINE); |
| 686 | else if (BGP_DEBUG (update, UPDATE_IN)) |
| 687 | vty_out (vty, " BGP updates debugging is on (inbound)%s", VTY_NEWLINE); |
| 688 | else if (BGP_DEBUG (update, UPDATE_OUT)) |
| 689 | vty_out (vty, " BGP updates debugging is on (outbound)%s", VTY_NEWLINE); |
| 690 | if (BGP_DEBUG (fsm, FSM)) |
| 691 | vty_out (vty, " BGP fsm debugging is on%s", VTY_NEWLINE); |
| 692 | if (BGP_DEBUG (filter, FILTER)) |
| 693 | vty_out (vty, " BGP filter debugging is on%s", VTY_NEWLINE); |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 694 | if (BGP_DEBUG (zebra, ZEBRA)) |
| 695 | vty_out (vty, " BGP zebra debugging is on%s", VTY_NEWLINE); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 696 | vty_out (vty, "%s", VTY_NEWLINE); |
| 697 | return CMD_SUCCESS; |
| 698 | } |
| 699 | |
paul | 94f2b39 | 2005-06-28 12:44:16 +0000 | [diff] [blame] | 700 | static int |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 701 | bgp_config_write_debug (struct vty *vty) |
| 702 | { |
| 703 | int write = 0; |
| 704 | |
| 705 | if (CONF_BGP_DEBUG (normal, NORMAL)) |
| 706 | { |
| 707 | vty_out (vty, "debug bgp%s", VTY_NEWLINE); |
| 708 | write++; |
| 709 | } |
| 710 | |
| 711 | if (CONF_BGP_DEBUG (events, EVENTS)) |
| 712 | { |
| 713 | vty_out (vty, "debug bgp events%s", VTY_NEWLINE); |
| 714 | write++; |
| 715 | } |
| 716 | |
| 717 | if (CONF_BGP_DEBUG (keepalive, KEEPALIVE)) |
| 718 | { |
| 719 | vty_out (vty, "debug bgp keepalives%s", VTY_NEWLINE); |
| 720 | write++; |
| 721 | } |
| 722 | |
| 723 | if (CONF_BGP_DEBUG (update, UPDATE_IN) && CONF_BGP_DEBUG (update, UPDATE_OUT)) |
| 724 | { |
| 725 | vty_out (vty, "debug bgp updates%s", VTY_NEWLINE); |
| 726 | write++; |
| 727 | } |
| 728 | else if (CONF_BGP_DEBUG (update, UPDATE_IN)) |
| 729 | { |
| 730 | vty_out (vty, "debug bgp updates in%s", VTY_NEWLINE); |
| 731 | write++; |
| 732 | } |
| 733 | else if (CONF_BGP_DEBUG (update, UPDATE_OUT)) |
| 734 | { |
| 735 | vty_out (vty, "debug bgp updates out%s", VTY_NEWLINE); |
| 736 | write++; |
| 737 | } |
| 738 | |
| 739 | if (CONF_BGP_DEBUG (fsm, FSM)) |
| 740 | { |
| 741 | vty_out (vty, "debug bgp fsm%s", VTY_NEWLINE); |
| 742 | write++; |
| 743 | } |
| 744 | |
| 745 | if (CONF_BGP_DEBUG (filter, FILTER)) |
| 746 | { |
| 747 | vty_out (vty, "debug bgp filters%s", VTY_NEWLINE); |
| 748 | write++; |
| 749 | } |
| 750 | |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 751 | if (CONF_BGP_DEBUG (zebra, ZEBRA)) |
| 752 | { |
| 753 | vty_out (vty, "debug bgp zebra%s", VTY_NEWLINE); |
| 754 | write++; |
| 755 | } |
| 756 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 757 | return write; |
| 758 | } |
| 759 | |
| 760 | struct cmd_node debug_node = |
| 761 | { |
| 762 | DEBUG_NODE, |
| 763 | "", |
| 764 | 1 |
| 765 | }; |
| 766 | |
| 767 | void |
paul | 94f2b39 | 2005-06-28 12:44:16 +0000 | [diff] [blame] | 768 | bgp_debug_init (void) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 769 | { |
| 770 | install_node (&debug_node, bgp_config_write_debug); |
| 771 | |
| 772 | install_element (ENABLE_NODE, &show_debugging_bgp_cmd); |
| 773 | |
| 774 | install_element (ENABLE_NODE, &debug_bgp_fsm_cmd); |
| 775 | install_element (CONFIG_NODE, &debug_bgp_fsm_cmd); |
| 776 | install_element (ENABLE_NODE, &debug_bgp_events_cmd); |
| 777 | install_element (CONFIG_NODE, &debug_bgp_events_cmd); |
| 778 | install_element (ENABLE_NODE, &debug_bgp_filter_cmd); |
| 779 | install_element (CONFIG_NODE, &debug_bgp_filter_cmd); |
| 780 | install_element (ENABLE_NODE, &debug_bgp_keepalive_cmd); |
| 781 | install_element (CONFIG_NODE, &debug_bgp_keepalive_cmd); |
| 782 | install_element (ENABLE_NODE, &debug_bgp_update_cmd); |
| 783 | install_element (CONFIG_NODE, &debug_bgp_update_cmd); |
| 784 | install_element (ENABLE_NODE, &debug_bgp_update_direct_cmd); |
| 785 | install_element (CONFIG_NODE, &debug_bgp_update_direct_cmd); |
| 786 | install_element (ENABLE_NODE, &debug_bgp_normal_cmd); |
| 787 | install_element (CONFIG_NODE, &debug_bgp_normal_cmd); |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 788 | install_element (ENABLE_NODE, &debug_bgp_zebra_cmd); |
| 789 | install_element (CONFIG_NODE, &debug_bgp_zebra_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 790 | |
| 791 | install_element (ENABLE_NODE, &no_debug_bgp_fsm_cmd); |
| 792 | install_element (ENABLE_NODE, &undebug_bgp_fsm_cmd); |
| 793 | install_element (CONFIG_NODE, &no_debug_bgp_fsm_cmd); |
| 794 | install_element (ENABLE_NODE, &no_debug_bgp_events_cmd); |
| 795 | install_element (ENABLE_NODE, &undebug_bgp_events_cmd); |
| 796 | install_element (CONFIG_NODE, &no_debug_bgp_events_cmd); |
| 797 | install_element (ENABLE_NODE, &no_debug_bgp_filter_cmd); |
| 798 | install_element (ENABLE_NODE, &undebug_bgp_filter_cmd); |
| 799 | install_element (CONFIG_NODE, &no_debug_bgp_filter_cmd); |
| 800 | install_element (ENABLE_NODE, &no_debug_bgp_keepalive_cmd); |
| 801 | install_element (ENABLE_NODE, &undebug_bgp_keepalive_cmd); |
| 802 | install_element (CONFIG_NODE, &no_debug_bgp_keepalive_cmd); |
| 803 | install_element (ENABLE_NODE, &no_debug_bgp_update_cmd); |
| 804 | install_element (ENABLE_NODE, &undebug_bgp_update_cmd); |
| 805 | install_element (CONFIG_NODE, &no_debug_bgp_update_cmd); |
| 806 | install_element (ENABLE_NODE, &no_debug_bgp_normal_cmd); |
| 807 | install_element (ENABLE_NODE, &undebug_bgp_normal_cmd); |
| 808 | install_element (CONFIG_NODE, &no_debug_bgp_normal_cmd); |
Andrew J. Schorr | a39275d | 2006-11-30 16:36:57 +0000 | [diff] [blame] | 809 | install_element (ENABLE_NODE, &no_debug_bgp_zebra_cmd); |
| 810 | install_element (ENABLE_NODE, &undebug_bgp_zebra_cmd); |
| 811 | install_element (CONFIG_NODE, &no_debug_bgp_zebra_cmd); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 812 | install_element (ENABLE_NODE, &no_debug_bgp_all_cmd); |
| 813 | install_element (ENABLE_NODE, &undebug_bgp_all_cmd); |
| 814 | } |