aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rsvp.c
diff options
context:
space:
mode:
authorashokn <ashokn@f5534014-38df-0310-8fa8-9805f1628bb7>2002-10-23 20:50:22 +0000
committerashokn <ashokn@f5534014-38df-0310-8fa8-9805f1628bb7>2002-10-23 20:50:22 +0000
commit706a463690ea61bf587034924fd86beba43d136e (patch)
treea62397ee85c373248c69cb4763b596b05c64174b /packet-rsvp.c
parent8df0a593345ec750a3b1b3bc290a93d9c6e52188 (diff)
Added support for Label Request Type 2 (ATM Label Range) and
Type 3 (Frame Label Range) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6485 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-rsvp.c')
-rw-r--r--packet-rsvp.c77
1 files changed, 75 insertions, 2 deletions
diff --git a/packet-rsvp.c b/packet-rsvp.c
index cf00a40902..9986daf1bc 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.75 2002/10/08 23:29:15 ashokn Exp $
+ * $Id: packet-rsvp.c,v 1.76 2002/10/23 20:50:22 ashokn Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2444,12 +2444,85 @@ dissect_rsvp_label_request (proto_tree *ti, tvbuff_t *tvb,
"L3PID: %s (0x%04x)",
val_to_str(l3pid, etype_vals, "Unknown"),
l3pid);
- proto_item_set_text(ti, "LABEL REQUEST: %s (0x%04x)",
+ proto_item_set_text(ti, "LABEL REQUEST: Basic: L3PID: %s (0x%04x)",
val_to_str(l3pid, etype_vals, "Unknown"),
l3pid);
break;
}
+ case 2: {
+ unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
+ unsigned short min_vpi, min_vci, max_vpi, max_vci;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: 2 (Label Request with ATM label Range)");
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
+ "L3PID: %s (0x%04x)",
+ val_to_str(l3pid, etype_vals, "Unknown"),
+ l3pid);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
+ "M: %s Merge in Data Plane",
+ (tvb_get_guint8(tvb, offset2+4) & 0x80) ?
+ "1: Can" : "0: Cannot");
+ min_vpi = tvb_get_ntohs(tvb, offset2+4) & 0x7f;
+ min_vci = tvb_get_ntohs(tvb, offset2+6);
+ max_vpi = tvb_get_ntohs(tvb, offset2+8) & 0x7f;
+ max_vci = tvb_get_ntohs(tvb, offset2+10);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
+ "Min VPI: %d", min_vpi);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
+ "Min VCI: %d", min_vci);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
+ "Max VPI: %d", max_vpi);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+10, 2,
+ "Max VCI: %d", max_vci);
+ proto_item_set_text(ti, "LABEL REQUEST: ATM: L3PID: %s (0x%04x). VPI/VCI: Min: %d/%d, Max: %d/%d. %s Merge. ",
+ val_to_str(l3pid, etype_vals, "Unknown"), l3pid,
+ min_vpi, min_vci, max_vpi, max_vci,
+ (tvb_get_guint8(tvb, offset2+4) & 0x80) ? "Can" : "Cannot");
+ break;
+ }
+
+ case 3: {
+ unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
+ unsigned long min_dlci, max_dlci, dlci_len, dlci_len_code;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type: 2 (Label Request with ATM label Range)");
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
+ "L3PID: %s (0x%04x)",
+ val_to_str(l3pid, etype_vals, "Unknown"),
+ l3pid);
+ dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
+ min_dlci = tvb_get_ntohl(tvb, offset2+4) & 0x7fffff;
+ max_dlci = tvb_get_ntohl(tvb, offset2+8) & 0x7fffff;
+ switch(dlci_len_code) {
+ case 0:
+ /* 10-bit DLCIs */
+ dlci_len = 10;
+ min_dlci &= 0x3ff;
+ max_dlci &= 0x3ff;
+ case 2:
+ dlci_len = 23;
+ default:
+ dlci_len = 0;
+ min_dlci = 0;
+ max_dlci = 0;
+ }
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
+ "DLCI Length: %s (%d)",
+ dlci_len==10 ? "10 bits" :
+ dlci_len==23 ? "23 bits" :
+ "INVALID", dlci_len_code);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 3,
+ "Min DLCI: %d", min_dlci);
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
+ "Max DLCI: %d", max_dlci);
+ proto_item_set_text(ti, "LABEL REQUEST: Frame: L3PID: %s (0x%04x). DLCI Len: %s. Min DLCI: %d. Max DLCI: %d",
+ val_to_str(l3pid, etype_vals, "Unknown"), l3pid,
+ dlci_len==10 ? "10 bits" :
+ dlci_len==23 ? "23 bits" :
+ "INVALID", min_dlci, max_dlci);
+ break;
+ }
case 4: {
unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
unsigned char lsp_enc = tvb_get_guint8(tvb,offset2);