From Motonori Shindo: update to support
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 19 May 2003 20:36:49 +0000 (20:36 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 19 May 2003 20:36:49 +0000 (20:36 +0000)
draft-ietf-idr-bgp-ext-communities rather than
draft-ramachandra-bgp-ext-communities, and get rid of unused
MAX_SIZE_OF_EXT_COM_NAMES #define.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7691 f5534014-38df-0310-8fa8-9805f1628bb7

AUTHORS
packet-bgp.c
packet-bgp.h

diff --git a/AUTHORS b/AUTHORS
index 990c040c73429dc0bda0b68098cd2deff26f7198..b99e4ef55e2ff7ceecd65e2e4551cd824d564239 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -880,8 +880,7 @@ Motonori Shindo <mshindo[AT]mshindo.net> {
        L2TP Dissconnect Cause Information AVP support
        PPP CCP support
        PPP compressed packet support
-       Cooperative Route Filtering Capability support in BGP
-       Route Refresh Message bug fix in BGP
+       Assorted BGP improvements
        CBCP support in PPP
        Fix Ascend/Lucent trace reading code to handle later trace
            formats that have an ASCII dump at the end of the line
index d058bd4f0e1586fed45061bc69d6f2e55aecac7f..6c92246fca366b7853cd72733cae1eacc4082525 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BGP packet dissection.
  * Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
  *
- * $Id: packet-bgp.c,v 1.78 2003/05/15 05:35:42 guy Exp $
+ * $Id: packet-bgp.c,v 1.79 2003/05/19 20:36:48 guy Exp $
  *
  * Supports:
  * RFC1771 A Border Gateway Protocol 4 (BGP-4)
@@ -14,9 +14,9 @@
  * RFC2858 Multiprotocol Extensions for BGP-4
  * RFC2918 Route Refresh Capability for BGP-4
  * RFC3107 Carrying Label Information in BGP-4
- * Draft Ramahandra on Extended Communities Extentions
  * draft-ietf-idr-as4bytes-06
  * draft-ietf-idr-dynamic-cap-03
+ * draft-ietf-idr-bgp-ext-communities-05
  *
  * TODO:
  * Destination Preference Attribute for BGP (work in progress)
@@ -165,12 +165,13 @@ static const value_string bgpattr_type[] = {
     { 0, NULL },
 };
 
-/* Beware : See also MAX_SIZE_OF_EXT_COM_NAMES */
 static const value_string bgpext_com_type[] = {
     { BGP_EXT_COM_RT_0, "Route Target" },
     { BGP_EXT_COM_RT_1, "Route Target" },
+    { BGP_EXT_COM_RT_2, "Route Target" },
     { BGP_EXT_COM_RO_0, "Route Origin" },
     { BGP_EXT_COM_RO_1, "Route Origin" },
+    { BGP_EXT_COM_RO_2, "Route Origin" },
     { BGP_EXT_COM_LINKBAND, "Link Bandwidth" },
     { BGP_EXT_COM_VPN_ORIGIN, "OSPF Domain" },
     { BGP_EXT_COM_OSPF_RTYPE, "OSPF Route Type" },
@@ -207,10 +208,6 @@ static const value_string bgpext_ospf_rtype[] = {
   { 0, NULL },
 };
 
-
-/* MUST be resized if a longer named extended community is added */
-#define MAX_SIZE_OF_EXT_COM_NAMES       20
-
 /* Subsequent address family identifier, RFC2858 */
 static const value_string bgpattr_nlri_safi[] = {
     { 0, "Reserved" },
@@ -2085,7 +2082,9 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
                                                   val_to_str(ext_com,bgpext_com_type,"Unknown"));
                             switch (ext_com) {
                             case BGP_EXT_COM_RT_0:
+                            case BGP_EXT_COM_RT_2:
                             case BGP_EXT_COM_RO_0:
+                            case BGP_EXT_COM_RO_2:
                                 junk_buf_len+=snprintf(junk_buf+junk_buf_len, sizeof(junk_buf)-junk_buf_len, ": %u%s%d",
                                                        tvb_get_ntohs(tvb,q+2),":",tvb_get_ntohl(tvb,q+4));
                                 junk_buf[junk_buf_len]='\0';
index 90472ce456cab3fd9a4a799d08c5e40da4dc1045..ac5a54fbc96508a0c1e22328ab6a270920dd1fbe 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-bgp.c
  * Definitions for BGP packet disassembly structures and routine
  *
- * $Id: packet-bgp.h,v 1.24 2003/04/05 11:20:54 guy Exp $
+ * $Id: packet-bgp.h,v 1.25 2003/05/19 20:36:49 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -157,9 +157,11 @@ struct bgp_attr {
                                         /* draft-ramachandra-bgp-ext-communities */
 #define BGP_EXT_COM_RT_0        0x0002  /* Route Target,Format AS(2bytes):AN(4bytes) */
 #define BGP_EXT_COM_RT_1        0x0102  /* Route Target,Format IP address:AN(2bytes) */
+#define BGP_EXT_COM_RT_2        0x0202  /* Route Target,Format AS(2bytes):AN(4bytes) */
 #define BGP_EXT_COM_RO_0        0x0003  /* Route Origin,Format AS(2bytes):AN(4bytes) */
 #define BGP_EXT_COM_RO_1        0x0103  /* Route Origin,Format IP address:AN(2bytes) */
-#define BGP_EXT_COM_LINKBAND    0x4004  /* Link Bandwidth,Format AS(2B):Bandwidth(4B) */
+#define BGP_EXT_COM_RO_2        0x0203  /* Route Origin,Format AS(2bytes):AN(4bytes) */
+#define BGP_EXT_COM_LINKBAND    0x0004  /* Link Bandwidth,Format AS(2B):Bandwidth(4B) */
                                         /* rfc2547 bgp-mpls-vpns */
 #define BGP_EXT_COM_VPN_ORIGIN  0x0005  /* OSPF Domin ID / VPN of Origin  */
                                         /* draft-rosen-vpns-ospf-bgp-mpls */