From Carles Kishimoto: add support for GMPLS extensions, as per the I-D
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 19 Jun 2004 09:48:49 +0000 (09:48 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 19 Jun 2004 09:48:49 +0000 (09:48 +0000)
draft-ietf-ccamp-ospf-gmpls-extensions-12.

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

AUTHORS
packet-ospf.c
packet-rsvp.c
packet-rsvp.h

diff --git a/AUTHORS b/AUTHORS
index 1386d7700b9d53cd2cf6f05f8cab0df15f01f74d..2cfbe77b89166757a533286437f5af457f411320 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -2203,6 +2203,7 @@ Nathan Alger              <nathan [AT] wasted.com>
 Stas Grabois           <sagig [AT] radware.com>
 Ainsley Pereira         <APereira [AT] Witness.com>
 Philippe Mazeau                <philippe.mazeau [AT] swissvoice.net>
+Carles Kishimoto       <ckishimo [AT] ac.upc.es>
 
 Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
 give his permission to use his version of snprintf.c.
index f4c73d9966960d07bfd03094bcfbe86ef91240ef..1c31d67ec6d77492b7637ea300059dd70465cbd8 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for OSPF packet disassembly
  * (c) Copyright Hannes R. Boehm <hannes@boehm.org>
  *
- * $Id: packet-ospf.c,v 1.80 2004/01/06 02:47:40 guy Exp $
+ * $Id: packet-ospf.c,v 1.81 2004/06/19 09:48:49 guy Exp $
  *
  * At this time, this module is able to analyze OSPF
  * packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -1087,19 +1087,17 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                case MPLS_LINK_LOCAL_ID:
                case MPLS_LINK_REMOTE_ID:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
-                                            "%s: %d (0x%x)", stlv_name,
-                                            tvb_get_ntohl(tvb, stlv_offset + 4),
-                                            tvb_get_ntohl(tvb, stlv_offset + 4));
+                                            "Link Local/Remote Identifier");
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+                   
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s", stlv_type, stlv_name);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
-                                       stlv_len);
-                   proto_tree_add_item(stlv_tree,
-                                       stlv_type==MPLS_LINK_LOCAL_ID ?
-                                       ospf_filter[OSPFF_LS_MPLS_LOCAL_IFID] :
-                                       ospf_filter[OSPFF_LS_MPLS_REMOTE_IFID],
-                                       tvb, stlv_offset+4, 4, FALSE);
+                                       stlv_len);                      
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "Local ID: %s",
+                                       ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, 4, "Remote ID: %s",
+                                       ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
                    break;
 
                case MPLS_LINK_IF_SWITCHING_DESC:
@@ -1123,6 +1121,30 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                                            tvb_get_ntohieee_float(tvb, stlv_offset + 8 + i*4) * 8.0);
                    }
                    break;
+               case MPLS_LINK_PROTECTION:
+                   ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+                                            "%s", stlv_name);
+                   stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+                                       "TLV Type: %u: %s", stlv_type, stlv_name);
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+                                       stlv_len);
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Protection Capability: %s (0x%x)",
+                                       val_to_str(tvb_get_guint8(tvb,stlv_offset+4), gmpls_protection_cap_str, "Unknown (%d)"),tvb_get_guint8(tvb,stlv_offset+4));
+                   break;
+               
+               case MPLS_LINK_SHARED_RISK_GROUP:
+                   ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
+                                            "%s", stlv_name);
+                   stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
+                                       "TLV Type: %u: %s", stlv_type, stlv_name);
+                   proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
+                                       stlv_len);
+                   for (i=0; i < stlv_len; i+=4)
+                       proto_tree_add_text(stlv_tree, tvb, stlv_offset+4+i, 4, "Shared Risk Link Group: %u", 
+                                       tvb_get_ntohl(tvb,stlv_offset+4+i)); 
+                   break;
 
                default:
                    proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
index 7a2b45206cef9c4819657fd31102dec69cc202ca..06188f52f28038a77edc7269b58d6d4c4e759b72 100644 (file)
@@ -3,7 +3,7 @@
  *
  * (c) Copyright Ashok Narayanan <ashokn@cisco.com>
  *
- * $Id: packet-rsvp.c,v 1.90 2004/06/19 00:07:22 guy Exp $
+ * $Id: packet-rsvp.c,v 1.91 2004/06/19 09:48:49 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -557,6 +557,18 @@ const value_string gmpls_switching_type_str[] = {
     { 0, NULL }
 };
 
+const value_string gmpls_protection_cap_str[] = {
+    { 1, "Extra Traffic"},
+    { 2, "Unprotected"},
+    { 4, "Shared"},
+    { 8, "Dedicated 1:1"},
+    {16, "Dedicated 1+1"},
+    {32, "Enhanced"},
+    {64, "Reserved"},
+    {128,"Reserved"},
+    { 0, NULL }
+};
+
 static const value_string gmpls_gpid_str[] = {
     { 5, "Asynchronous mapping of E3 (SDH)"},
     { 8, "Bit synchronous mapping of E3 (SDH)"},
index cefa5c5e25d5f8ffe49414aa558cf9818eb13933..aa63fd69cce7d384888068ab86eae06f23c0bbdd 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-rsvp.h
  * Declarations of variables exported by "packet-rsvp.c"
  *
- * $Id: packet-rsvp.h,v 1.10 2002/04/14 23:04:04 guy Exp $
+ * $Id: packet-rsvp.h,v 1.11 2004/06/19 09:48:49 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -27,5 +27,6 @@
 
 extern const value_string gmpls_switching_type_str[];
 extern const value_string gmpls_lsp_enc_str[];
+extern const value_string gmpls_protection_cap_str[];
 
 #endif