Ethereal-dev: [Ethereal-dev] [PATCH] BGP Route-Refresh message

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Tue, 15 May 2001 23:11:32 -0600
Hi,

Attached is the patch for dealing with Cisco's own Route-Refresh 
message type. New Cisco routers sends out two capabilities, one is 
cap code 2 as required in RFC2918, the one is cap code 0x80 as 
defined by Cisco (used in old 3600 routers).


Index: packet-bgp.h
===================================================================
RCS file: /cvsroot/ethereal/packet-bgp.h,v
retrieving revision 1.11
diff -u -r1.11 packet-bgp.h
--- packet-bgp.h	2001/04/17 21:25:13	1.11
+++ packet-bgp.h	2001/05/16 04:02:35
@@ -41,6 +41,7 @@
 #define BGP_NOTIFICATION	3
 #define BGP_KEEPALIVE		4
 #define BGP_ROUTE_REFRESH       5
+#define BGP_ROUTE_REFRESH_CISCO 0x80
 
 /* BGP header */
 struct bgp {
@@ -108,6 +109,8 @@
 #define BGP_CAPABILITY_RESERVED		0   /* RFC2434 */
 #define BGP_CAPABILITY_MULTIPROTOCOL	1   /* RFC2858 */
 #define BGP_CAPABILITY_ROUTE_REFRESH	2   /* RFC2918 */
+#define BGP_CAPABILITY_ROUTE_REFRESH_CISCO      0x80   /* Cisco */
+
 
 /* well-known communities, from RFC1997 */
 #define BGP_COMM_NO_EXPORT           0xFFFFFF01
Index: packet-bgp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-bgp.c,v
retrieving revision 1.35
diff -u -r1.35 packet-bgp.c
--- packet-bgp.c	2001/04/23 18:19:02	1.35
+++ packet-bgp.c	2001/05/16 04:02:36
@@ -72,6 +72,7 @@
     { BGP_NOTIFICATION, "NOTIFICATION Message" },
     { BGP_KEEPALIVE, "KEEPALIVE Message" },
     { BGP_ROUTE_REFRESH, "ROUTE-REFRESH Message" },
+    { BGP_ROUTE_REFRESH_CISCO, "Cisco ROUTE-REFRESH Message" },
     { 0, NULL },
 };
 
@@ -401,6 +402,7 @@
                         p++;
                     }
                     break;
+                case BGP_CAPABILITY_ROUTE_REFRESH_CISCO:
                 case BGP_CAPABILITY_ROUTE_REFRESH:
                     ti = proto_tree_add_text(subtree, tvb, p - 4, 
                          2 + plen, "Route refresh capability (%u %
s)", 2 + plen,
@@ -1409,6 +1411,7 @@
 	    case BGP_KEEPALIVE:
 	        bgp1_tree = proto_item_add_subtree(ti, ett_bgp);
 		break;
+            case BGP_ROUTE_REFRESH_CISCO:
 	    case BGP_ROUTE_REFRESH:
 	        bgp1_tree = proto_item_add_subtree(ti, 
ett_bgp_route_refresh);
 		break;
@@ -1450,6 +1453,7 @@
 	    case BGP_KEEPALIVE:
 		/* no data in KEEPALIVE messages */
 		break;
+            case BGP_ROUTE_REFRESH_CISCO:
 	    case BGP_ROUTE_REFRESH:
 		dissect_bgp_route_refresh(tvb, i, bgp1_tree);
 		break;




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com