summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-06-19 09:48:49 +0000
committerGuy Harris <guy@alum.mit.edu>2004-06-19 09:48:49 +0000
commit4c9a7c3c87ba6455b116eefb6ca80e0e0106c0b1 (patch)
treee6d201eff7708b8358307ca2f7b9b5577fd743ed
parent7c1556c1feb75ac283f146aa234704d3ff96e9f6 (diff)
downloadwireshark-4c9a7c3c87ba6455b116eefb6ca80e0e0106c0b1.tar.gz
From Carles Kishimoto: add support for GMPLS extensions, as per the I-D
draft-ietf-ccamp-ospf-gmpls-extensions-12. svn path=/trunk/; revision=11185
-rw-r--r--AUTHORS1
-rw-r--r--packet-ospf.c42
-rw-r--r--packet-rsvp.c14
-rw-r--r--packet-rsvp.h3
4 files changed, 48 insertions, 12 deletions
diff --git a/AUTHORS b/AUTHORS
index 1386d7700b..2cfbe77b89 100644
--- 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.
diff --git a/packet-ospf.c b/packet-ospf.c
index f4c73d9966..1c31d67ec6 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -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,
diff --git a/packet-rsvp.c b/packet-rsvp.c
index 7a2b45206c..06188f52f2 100644
--- a/packet-rsvp.c
+++ b/packet-rsvp.c
@@ -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)"},
diff --git a/packet-rsvp.h b/packet-rsvp.h
index cefa5c5e25..aa63fd69cc 100644
--- a/packet-rsvp.h
+++ b/packet-rsvp.h
@@ -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