1 /* BGP-4, BGP-4+ packet debug routine
2 * Copyright (C) 1996, 97, 99 Kunihiro Ishiguro
4 * This file is part of GNU Zebra.
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
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.
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
31 #include "sockunion.h"
33 #include "bgpd/bgpd.h"
34 #include "bgpd/bgp_aspath.h"
35 #include "bgpd/bgp_route.h"
36 #include "bgpd/bgp_attr.h"
37 #include "bgpd/bgp_debug.h"
38 #include "bgpd/bgp_community.h"
40 unsigned long conf_bgp_debug_fsm
;
41 unsigned long conf_bgp_debug_events
;
42 unsigned long conf_bgp_debug_packet
;
43 unsigned long conf_bgp_debug_filter
;
44 unsigned long conf_bgp_debug_keepalive
;
45 unsigned long conf_bgp_debug_update
;
46 unsigned long conf_bgp_debug_normal
;
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
;
56 /* messages for BGP-4 status */
57 struct message bgp_status_msg
[] =
61 { Connect
, "Connect" },
63 { OpenSent
, "OpenSent" },
64 { OpenConfirm
, "OpenConfirm" },
65 { Established
, "Established" },
67 int bgp_status_msg_max
= BGP_STATUS_MAX
;
69 /* BGP message type string. */
70 char *bgp_type_str
[] =
80 /* message for BGP-4 Notify */
81 struct message bgp_notify_msg
[] =
84 { BGP_NOTIFY_HEADER_ERR
, "Message Header Error"},
85 { BGP_NOTIFY_OPEN_ERR
, "OPEN Message Error"},
86 { BGP_NOTIFY_UPDATE_ERR
, "UPDATE Message Error"},
87 { BGP_NOTIFY_HOLD_ERR
, "Hold Timer Expired"},
88 { BGP_NOTIFY_FSM_ERR
, "Finite State Machine Error"},
89 { BGP_NOTIFY_CEASE
, "Cease"},
91 int bgp_notify_msg_max
= BGP_NOTIFY_MAX
;
93 struct message bgp_notify_head_msg
[] =
96 { BGP_NOTIFY_HEADER_NOT_SYNC
, "/Connection Not Synchronized."},
97 { BGP_NOTIFY_HEADER_BAD_MESLEN
, "/Bad Message Length."},
98 { BGP_NOTIFY_HEADER_BAD_MESTYPE
, "/Bad Message Type."}
100 int bgp_notify_head_msg_max
= BGP_NOTIFY_HEADER_MAX
;
102 struct message bgp_notify_open_msg
[] =
105 { BGP_NOTIFY_OPEN_UNSUP_VERSION
, "/Unsupported Version Number." },
106 { BGP_NOTIFY_OPEN_BAD_PEER_AS
, "/Bad Peer AS."},
107 { BGP_NOTIFY_OPEN_BAD_BGP_IDENT
, "/Bad BGP Identifier."},
108 { BGP_NOTIFY_OPEN_UNSUP_PARAM
, "/Unsupported Optional Parameter."},
109 { BGP_NOTIFY_OPEN_AUTH_FAILURE
, "/Authentication Failure."},
110 { BGP_NOTIFY_OPEN_UNACEP_HOLDTIME
, "/Unacceptable Hold Time."},
111 { BGP_NOTIFY_OPEN_UNSUP_CAPBL
, "/Unsupported Capability."},
113 int bgp_notify_open_msg_max
= BGP_NOTIFY_OPEN_MAX
;
115 struct message bgp_notify_update_msg
[] =
118 { BGP_NOTIFY_UPDATE_MAL_ATTR
, "/Malformed Attribute List."},
119 { BGP_NOTIFY_UPDATE_UNREC_ATTR
, "/Unrecognized Well-known Attribute."},
120 { BGP_NOTIFY_UPDATE_MISS_ATTR
, "/Missing Well-known Attribute."},
121 { BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR
, "/Attribute Flags Error."},
122 { BGP_NOTIFY_UPDATE_ATTR_LENG_ERR
, "/Attribute Length Error."},
123 { BGP_NOTIFY_UPDATE_INVAL_ORIGIN
, "/Invalid ORIGIN Attribute."},
124 { BGP_NOTIFY_UPDATE_AS_ROUTE_LOOP
, "/AS Routing Loop."},
125 { BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP
, "/Invalid NEXT_HOP Attribute."},
126 { BGP_NOTIFY_UPDATE_OPT_ATTR_ERR
, "/Optional Attribute Error."},
127 { BGP_NOTIFY_UPDATE_INVAL_NETWORK
, "/Invalid Network Field."},
128 { BGP_NOTIFY_UPDATE_MAL_AS_PATH
, "/Malformed AS_PATH."},
130 int bgp_notify_update_msg_max
= BGP_NOTIFY_UPDATE_MAX
;
132 /* Origin strings. */
133 char *bgp_origin_str
[] = {"i","e","?"};
134 char *bgp_origin_long_str
[] = {"IGP","EGP","incomplete"};
137 /* Dump bgp header information. */
139 bgp_dump_header (struct bgp_header
*bgp_header
)
143 switch (bgp_header
->type
)
146 if (IS_SET(dump_open
, DUMP_DETAIL
))
150 if (IS_SET(dump_open
, DUMP_DETAIL
))
153 case BGP_MSG_KEEPALIVE
:
154 if (IS_SET(dump_keepalive
, DUMP_DETAIL
))
162 zlog (NULL
, LOG_INFO
, "Head: %s(%d) length(%d)",
163 bgp_type_str
[bgp_header
->type
],
164 bgp_header
->type
, bgp_header
->length
);
168 /* Dump attribute. */
170 bgp_dump_attr (struct peer
*peer
, struct attr
*attr
, char *buf
, size_t size
)
175 snprintf (buf
, size
, "nexthop %s", inet_ntoa (attr
->nexthop
));
176 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", origin %s",
177 bgp_origin_str
[attr
->origin
]);
181 char addrbuf
[BUFSIZ
];
184 if (attr
->mp_nexthop_len
== 16 || attr
->mp_nexthop_len
== 32)
185 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", mp_nexthop %s",
186 inet_ntop (AF_INET6
, &attr
->mp_nexthop_global
,
189 if (attr
->mp_nexthop_len
== 32)
190 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), "(%s)",
191 inet_ntop (AF_INET6
, &attr
->mp_nexthop_local
,
194 #endif /* HAVE_IPV6 */
196 if (peer_sort (peer
) == BGP_PEER_IBGP
)
198 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", localpref %d",
204 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", metric %d",
210 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", community%s",
211 community_print (attr
->community
));
214 if (attr
->flag
& ATTR_FLAG_BIT(BGP_ATTR_ATOMIC_AGGREGATE
))
215 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", atomic-aggregate");
217 if (attr
->aggregator_as
)
219 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", aggregated by %d %s",
220 attr
->aggregator_as
, inet_ntoa (attr
->aggregator_addr
));
223 if (attr
->flag
& ATTR_FLAG_BIT (BGP_ATTR_ORIGINATOR_ID
))
225 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", originator %s",
226 inet_ntoa (attr
->originator_id
));
229 if (attr
->flag
& ATTR_FLAG_BIT (BGP_ATTR_CLUSTER_LIST
))
233 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", clusterlist ");
234 for (i
= 0; i
< attr
->cluster
->length
/ 4; i
++)
235 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), "%s",
236 inet_ntoa (attr
->cluster
->list
[i
]));
241 snprintf (buf
+ strlen (buf
), size
- strlen (buf
), ", path %s",
242 aspath_print (attr
->aspath
));
246 /* dump notify packet */
248 bgp_notify_print(struct peer
*peer
, struct bgp_notify
*bgp_notify
, char *direct
)
254 switch (bgp_notify
->code
)
256 case BGP_NOTIFY_HEADER_ERR
:
257 subcode_str
= LOOKUP (bgp_notify_head_msg
, bgp_notify
->subcode
);
259 case BGP_NOTIFY_OPEN_ERR
:
260 subcode_str
= LOOKUP (bgp_notify_open_msg
, bgp_notify
->subcode
);
262 case BGP_NOTIFY_UPDATE_ERR
:
263 subcode_str
= LOOKUP (bgp_notify_update_msg
, bgp_notify
->subcode
);
265 case BGP_NOTIFY_HOLD_ERR
:
268 case BGP_NOTIFY_FSM_ERR
:
271 case BGP_NOTIFY_CEASE
:
275 if (BGP_DEBUG (normal
, NORMAL
))
276 plog_info (peer
->log
, "%s %s NOTIFICATION %d/%d (%s%s) %d bytes %s",
277 peer
? peer
->host
: "",
278 direct
, 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
: "");
285 /* Open packet dump */
287 bgp_open_dump (struct bgp_open
*bgp_open
, struct peer
*peer
, int direct
)
289 /* decide whether dump or not */
290 if (direct
== PACKET_RECV
&&
291 IS_SET(dump_open
, DUMP_SEND
)) {
293 if (IS_SET(dump_open
, DUMP_DETAIL
)) {
295 zlog (peer
->log
, LOG_INFO
, "Open: peer(%s) version(%d) AS(%d) holdtime(%d)"
296 " ident(%lu) optlen(%d)",
298 bgp_open
->version
, bgp_open
->asno
, bgp_open
->holdtime
,
299 bgp_open
->ident
, bgp_open
->optlen
);
302 zlog (peer
->log
, LOG_INFO
, "Open: peer(%s)", peer
->host
);
308 /* Dump BGP open packet. */
310 bgp_packet_open_dump (struct stream
*s
)
312 printf ("BGP open ");
313 printf ("version: %d ", stream_getc (s
));
314 printf ("as: %d ", stream_getw (s
));
315 printf ("holdtime: %d ", stream_getw (s
));
316 printf ("ident: %d\n", stream_getl (s
));
318 /* Open message option. */
319 printf ("opt parm len: %d\n", stream_getc (s
));
323 bgp_packet_notify_dump (struct stream
*s
)
325 struct bgp_notify bgp_notify
;
327 bgp_notify
.code
= stream_getc (s
);
328 bgp_notify
.subcode
= stream_getc (s
);
329 bgp_notify_print (NULL
, &bgp_notify
, "received");
332 /* Dump bgp update packet. */
334 bgp_update_dump (struct stream
*s
)
337 bgp_size_t unfeasible_len
;
338 bgp_size_t attr_total_len
;
340 unfeasible_len
= stream_getw (s
);
341 printf ("Unfeasible length: %d\n", unfeasible_len
);
343 stream_forward (s
, unfeasible_len
);
345 attr_total_len
= stream_getw (s
);
346 printf ("Attribute length: %d\n", attr_total_len
);
348 endp
= STREAM_PNT (s
) + attr_total_len
;
350 while (STREAM_PNT (s
) < endp
)
356 flag
= stream_getc (s
);
357 type
= stream_getc (s
);
359 printf ("flag: %d\n", flag
);
360 printf ("type: %d\n", type
);
362 if (flag
& BGP_ATTR_FLAG_EXTLEN
)
363 length
= stream_getw (s
);
365 length
= stream_getc (s
);
367 printf ("length %d\n", length
);
369 stream_forward (s
, length
);
373 printf ("length %d // ", length
);
374 for(p1
=length
; p1
; p1
--) {
375 printf("0x%02x ",(unsigned char) stream_getc (s
) );
382 /* Debug dump of bgp packet. */
384 bgp_packet_dump (struct stream
*s
)
391 /* Preserve pointer. */
392 sp
= stream_get_getp (s
);
393 stream_set_getp (s
, 0);
396 printf ("BGP packet marker : ");
397 for (i
= 0; i
< BGP_MARKER_SIZE
; i
++)
398 printf ("%x ", stream_getc (s
));
401 /* BGP packet size. */
402 size
= stream_getw (s
);
403 printf ("BGP packet size : %d\n", size
);
405 /* BGP packet type. */
406 type
= stream_getc (s
);
407 printf ("BGP packet type : %s (%d)\n", bgp_type_str
[type
], type
);
412 bgp_packet_open_dump (s
);
414 case BGP_MSG_KEEPALIVE
:
415 assert (size
== BGP_HEADER_SIZE
);
422 bgp_packet_notify_dump (s
);
425 stream_set_getp (s
, sp
);
428 /* Debug option setting interface. */
429 unsigned long bgp_debug_option
= 0;
432 debug (unsigned int option
)
434 return bgp_debug_option
& option
;
437 DEFUN (debug_bgp_fsm
,
442 "BGP Finite State Machine\n")
444 if (vty
->node
== CONFIG_NODE
)
448 TERM_DEBUG_ON (fsm
, FSM
);
449 vty_out (vty
, "BGP fsm debugging is on%s", VTY_NEWLINE
);
454 DEFUN (no_debug_bgp_fsm
,
455 no_debug_bgp_fsm_cmd
,
460 "Finite State Machine\n")
462 if (vty
->node
== CONFIG_NODE
)
463 DEBUG_OFF (fsm
, FSM
);
466 TERM_DEBUG_OFF (fsm
, FSM
);
467 vty_out (vty
, "BGP fsm debugging is off%s", VTY_NEWLINE
);
472 ALIAS (no_debug_bgp_fsm
,
478 "Finite State Machine\n")
480 DEFUN (debug_bgp_events
,
481 debug_bgp_events_cmd
,
487 if (vty
->node
== CONFIG_NODE
)
488 DEBUG_ON (events
, EVENTS
);
491 TERM_DEBUG_ON (events
, EVENTS
);
492 vty_out (vty
, "BGP events debugging is on%s", VTY_NEWLINE
);
497 DEFUN (no_debug_bgp_events
,
498 no_debug_bgp_events_cmd
,
499 "no debug bgp events",
505 if (vty
->node
== CONFIG_NODE
)
506 DEBUG_OFF (events
, EVENTS
);
509 TERM_DEBUG_OFF (events
, EVENTS
);
510 vty_out (vty
, "BGP events debugging is off%s", VTY_NEWLINE
);
515 ALIAS (no_debug_bgp_events
,
516 undebug_bgp_events_cmd
,
517 "undebug bgp events",
522 DEFUN (debug_bgp_filter
,
523 debug_bgp_filter_cmd
,
529 if (vty
->node
== CONFIG_NODE
)
530 DEBUG_ON (filter
, FILTER
);
533 TERM_DEBUG_ON (filter
, FILTER
);
534 vty_out (vty
, "BGP filters debugging is on%s", VTY_NEWLINE
);
539 DEFUN (no_debug_bgp_filter
,
540 no_debug_bgp_filter_cmd
,
541 "no debug bgp filters",
547 if (vty
->node
== CONFIG_NODE
)
548 DEBUG_OFF (filter
, FILTER
);
551 TERM_DEBUG_OFF (filter
, FILTER
);
552 vty_out (vty
, "BGP filters debugging is off%s", VTY_NEWLINE
);
557 ALIAS (no_debug_bgp_filter
,
558 undebug_bgp_filter_cmd
,
559 "undebug bgp filters",
564 DEFUN (debug_bgp_keepalive
,
565 debug_bgp_keepalive_cmd
,
566 "debug bgp keepalives",
571 if (vty
->node
== CONFIG_NODE
)
572 DEBUG_ON (keepalive
, KEEPALIVE
);
575 TERM_DEBUG_ON (keepalive
, KEEPALIVE
);
576 vty_out (vty
, "BGP keepalives debugging is on%s", VTY_NEWLINE
);
581 DEFUN (no_debug_bgp_keepalive
,
582 no_debug_bgp_keepalive_cmd
,
583 "no debug bgp keepalives",
589 if (vty
->node
== CONFIG_NODE
)
590 DEBUG_OFF (keepalive
, KEEPALIVE
);
593 TERM_DEBUG_OFF (keepalive
, KEEPALIVE
);
594 vty_out (vty
, "BGP keepalives debugging is off%s", VTY_NEWLINE
);
599 ALIAS (no_debug_bgp_keepalive
,
600 undebug_bgp_keepalive_cmd
,
601 "undebug bgp keepalives",
606 DEFUN (debug_bgp_update
,
607 debug_bgp_update_cmd
,
613 if (vty
->node
== CONFIG_NODE
)
615 DEBUG_ON (update
, UPDATE_IN
);
616 DEBUG_ON (update
, UPDATE_OUT
);
620 TERM_DEBUG_ON (update
, UPDATE_IN
);
621 TERM_DEBUG_ON (update
, UPDATE_OUT
);
622 vty_out (vty
, "BGP updates debugging is on%s", VTY_NEWLINE
);
627 DEFUN (debug_bgp_update_direct
,
628 debug_bgp_update_direct_cmd
,
629 "debug bgp updates (in|out)",
634 "Outbound updates\n")
636 if (vty
->node
== CONFIG_NODE
)
638 if (strncmp ("i", argv
[0], 1) == 0)
640 DEBUG_OFF (update
, UPDATE_OUT
);
641 DEBUG_ON (update
, UPDATE_IN
);
645 DEBUG_OFF (update
, UPDATE_IN
);
646 DEBUG_ON (update
, UPDATE_OUT
);
651 if (strncmp ("i", argv
[0], 1) == 0)
653 TERM_DEBUG_OFF (update
, UPDATE_OUT
);
654 TERM_DEBUG_ON (update
, UPDATE_IN
);
655 vty_out (vty
, "BGP updates debugging is on (inbound)%s", VTY_NEWLINE
);
659 TERM_DEBUG_OFF (update
, UPDATE_IN
);
660 TERM_DEBUG_ON (update
, UPDATE_OUT
);
661 vty_out (vty
, "BGP updates debugging is on (outbound)%s", VTY_NEWLINE
);
667 DEFUN (no_debug_bgp_update
,
668 no_debug_bgp_update_cmd
,
669 "no debug bgp updates",
675 if (vty
->node
== CONFIG_NODE
)
677 DEBUG_OFF (update
, UPDATE_IN
);
678 DEBUG_OFF (update
, UPDATE_OUT
);
682 TERM_DEBUG_OFF (update
, UPDATE_IN
);
683 TERM_DEBUG_OFF (update
, UPDATE_OUT
);
684 vty_out (vty
, "BGP updates debugging is off%s", VTY_NEWLINE
);
689 ALIAS (no_debug_bgp_update
,
690 undebug_bgp_update_cmd
,
691 "undebug bgp updates",
696 DEFUN (debug_bgp_normal
,
697 debug_bgp_normal_cmd
,
702 if (vty
->node
== CONFIG_NODE
)
703 DEBUG_ON (normal
, NORMAL
);
706 TERM_DEBUG_ON (normal
, NORMAL
);
707 vty_out (vty
, "BGP debugging is on%s", VTY_NEWLINE
);
712 DEFUN (no_debug_bgp_normal
,
713 no_debug_bgp_normal_cmd
,
719 if (vty
->node
== CONFIG_NODE
)
720 DEBUG_OFF (normal
, NORMAL
);
723 TERM_DEBUG_OFF (normal
, NORMAL
);
724 vty_out (vty
, "BGP debugging is off%s", VTY_NEWLINE
);
729 ALIAS (no_debug_bgp_normal
,
730 undebug_bgp_normal_cmd
,
735 DEFUN (no_debug_bgp_all
,
736 no_debug_bgp_all_cmd
,
740 "Enable all debugging\n"
743 TERM_DEBUG_OFF (normal
, NORMAL
);
744 TERM_DEBUG_OFF (events
, EVENTS
);
745 TERM_DEBUG_OFF (keepalive
, KEEPALIVE
);
746 TERM_DEBUG_OFF (update
, UPDATE_IN
);
747 TERM_DEBUG_OFF (update
, UPDATE_OUT
);
748 TERM_DEBUG_OFF (fsm
, FSM
);
749 TERM_DEBUG_OFF (filter
, FILTER
);
750 vty_out (vty
, "All possible debugging has been turned off%s", VTY_NEWLINE
);
755 ALIAS (no_debug_bgp_all
,
759 "Enable all debugging\n"
762 DEFUN (show_debugging_bgp
,
763 show_debugging_bgp_cmd
,
764 "show debugging bgp",
769 vty_out (vty
, "BGP debugging status:%s", VTY_NEWLINE
);
771 if (BGP_DEBUG (normal
, NORMAL
))
772 vty_out (vty
, " BGP debugging is on%s", VTY_NEWLINE
);
773 if (BGP_DEBUG (events
, EVENTS
))
774 vty_out (vty
, " BGP events debugging is on%s", VTY_NEWLINE
);
775 if (BGP_DEBUG (keepalive
, KEEPALIVE
))
776 vty_out (vty
, " BGP keepalives debugging is on%s", VTY_NEWLINE
);
777 if (BGP_DEBUG (update
, UPDATE_IN
) && BGP_DEBUG (update
, UPDATE_OUT
))
778 vty_out (vty
, " BGP updates debugging is on%s", VTY_NEWLINE
);
779 else if (BGP_DEBUG (update
, UPDATE_IN
))
780 vty_out (vty
, " BGP updates debugging is on (inbound)%s", VTY_NEWLINE
);
781 else if (BGP_DEBUG (update
, UPDATE_OUT
))
782 vty_out (vty
, " BGP updates debugging is on (outbound)%s", VTY_NEWLINE
);
783 if (BGP_DEBUG (fsm
, FSM
))
784 vty_out (vty
, " BGP fsm debugging is on%s", VTY_NEWLINE
);
785 if (BGP_DEBUG (filter
, FILTER
))
786 vty_out (vty
, " BGP filter debugging is on%s", VTY_NEWLINE
);
787 vty_out (vty
, "%s", VTY_NEWLINE
);
792 config_write_debug (struct vty
*vty
)
796 if (CONF_BGP_DEBUG (normal
, NORMAL
))
798 vty_out (vty
, "debug bgp%s", VTY_NEWLINE
);
802 if (CONF_BGP_DEBUG (events
, EVENTS
))
804 vty_out (vty
, "debug bgp events%s", VTY_NEWLINE
);
808 if (CONF_BGP_DEBUG (keepalive
, KEEPALIVE
))
810 vty_out (vty
, "debug bgp keepalives%s", VTY_NEWLINE
);
814 if (CONF_BGP_DEBUG (update
, UPDATE_IN
) && CONF_BGP_DEBUG (update
, UPDATE_OUT
))
816 vty_out (vty
, "debug bgp updates%s", VTY_NEWLINE
);
819 else if (CONF_BGP_DEBUG (update
, UPDATE_IN
))
821 vty_out (vty
, "debug bgp updates in%s", VTY_NEWLINE
);
824 else if (CONF_BGP_DEBUG (update
, UPDATE_OUT
))
826 vty_out (vty
, "debug bgp updates out%s", VTY_NEWLINE
);
830 if (CONF_BGP_DEBUG (fsm
, FSM
))
832 vty_out (vty
, "debug bgp fsm%s", VTY_NEWLINE
);
836 if (CONF_BGP_DEBUG (filter
, FILTER
))
838 vty_out (vty
, "debug bgp filter%s", VTY_NEWLINE
);
845 struct cmd_node debug_node
=
855 install_node (&debug_node
, config_write_debug
);
857 install_element (ENABLE_NODE
, &show_debugging_bgp_cmd
);
859 install_element (ENABLE_NODE
, &debug_bgp_fsm_cmd
);
860 install_element (CONFIG_NODE
, &debug_bgp_fsm_cmd
);
861 install_element (ENABLE_NODE
, &debug_bgp_events_cmd
);
862 install_element (CONFIG_NODE
, &debug_bgp_events_cmd
);
863 install_element (ENABLE_NODE
, &debug_bgp_filter_cmd
);
864 install_element (CONFIG_NODE
, &debug_bgp_filter_cmd
);
865 install_element (ENABLE_NODE
, &debug_bgp_keepalive_cmd
);
866 install_element (CONFIG_NODE
, &debug_bgp_keepalive_cmd
);
867 install_element (ENABLE_NODE
, &debug_bgp_update_cmd
);
868 install_element (CONFIG_NODE
, &debug_bgp_update_cmd
);
869 install_element (ENABLE_NODE
, &debug_bgp_update_direct_cmd
);
870 install_element (CONFIG_NODE
, &debug_bgp_update_direct_cmd
);
871 install_element (ENABLE_NODE
, &debug_bgp_normal_cmd
);
872 install_element (CONFIG_NODE
, &debug_bgp_normal_cmd
);
874 install_element (ENABLE_NODE
, &no_debug_bgp_fsm_cmd
);
875 install_element (ENABLE_NODE
, &undebug_bgp_fsm_cmd
);
876 install_element (CONFIG_NODE
, &no_debug_bgp_fsm_cmd
);
877 install_element (ENABLE_NODE
, &no_debug_bgp_events_cmd
);
878 install_element (ENABLE_NODE
, &undebug_bgp_events_cmd
);
879 install_element (CONFIG_NODE
, &no_debug_bgp_events_cmd
);
880 install_element (ENABLE_NODE
, &no_debug_bgp_filter_cmd
);
881 install_element (ENABLE_NODE
, &undebug_bgp_filter_cmd
);
882 install_element (CONFIG_NODE
, &no_debug_bgp_filter_cmd
);
883 install_element (ENABLE_NODE
, &no_debug_bgp_keepalive_cmd
);
884 install_element (ENABLE_NODE
, &undebug_bgp_keepalive_cmd
);
885 install_element (CONFIG_NODE
, &no_debug_bgp_keepalive_cmd
);
886 install_element (ENABLE_NODE
, &no_debug_bgp_update_cmd
);
887 install_element (ENABLE_NODE
, &undebug_bgp_update_cmd
);
888 install_element (CONFIG_NODE
, &no_debug_bgp_update_cmd
);
889 install_element (ENABLE_NODE
, &no_debug_bgp_normal_cmd
);
890 install_element (ENABLE_NODE
, &undebug_bgp_normal_cmd
);
891 install_element (CONFIG_NODE
, &no_debug_bgp_normal_cmd
);
892 install_element (ENABLE_NODE
, &no_debug_bgp_all_cmd
);
893 install_element (ENABLE_NODE
, &undebug_bgp_all_cmd
);