support BGP cease subcodes as per draft-ietf-idr-cease-subcode-02

This commit is contained in:
hannes 2003-05-27 12:43:37 +00:00
parent 56e21a1064
commit f5bce589b5

View File

@ -36,7 +36,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.61 2003-02-11 06:28:39 guy Exp $";
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.62 2003-05-27 12:43:37 hannes Exp $";
#endif
#include <tcpdump-stdinc.h>
@ -202,6 +202,18 @@ static struct tok bgp_notify_major_values[] = {
{ 0, NULL}
};
/* draft-ietf-idr-cease-subcode-02 */
static struct tok bgp_notify_minor_cease_values[] = {
{ 1, "Maximum Number of Prefixes Reached"},
{ 2, "Administratively Shutdown"},
{ 3, "Peer Unconfigured"},
{ 4, "Administratively Reset"},
{ 5, "Connection Rejected"},
{ 6, "Other Configuration Change"},
{ 7, "Connection Collision Resolution"},
{ 0, NULL}
};
static struct tok bgp_notify_minor_msg_values[] = {
{ 1, "Connection Not Synchronized"},
{ 2, "Bad Message Length"},
@ -1419,6 +1431,9 @@ bgp_notification_print(const u_char *dat, int length)
case BGP_NOTIFY_MAJOR_UPDATE:
printf(" subcode %s", tok2str(bgp_notify_minor_update_values, "Unknown", bgpn.bgpn_minor));
break;
case BGP_NOTIFY_MAJOR_CEASE:
printf(" subcode %s", tok2str(bgp_notify_minor_cease_values, "Unknown", bgpn.bgpn_minor));
break;
default:
break;
}