]> The Tcpdump Group git mirrors - tcpdump/commitdiff
support BGP cease subcodes as per draft-ietf-idr-cease-subcode-02
authorhannes <hannes>
Tue, 27 May 2003 12:43:37 +0000 (12:43 +0000)
committerhannes <hannes>
Tue, 27 May 2003 12:43:37 +0000 (12:43 +0000)
print-bgp.c

index 95c8f40dcc56ed61500da5733a8269bb5d2a2093..a1752f5993ca0330e4b466f11389adf611c84ae1 100644 (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;
         }