aboutsummaryrefslogtreecommitdiffstats
path: root/packet-atm.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-16 06:21:33 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-16 06:21:33 +0000
commit9f45a0b0f5d45d8d84e0abd2854d34693d6f3b06 (patch)
tree0e341c3c817a573ed46ce6c07a32a4874ce55060 /packet-atm.c
parent0a2817cebacb5352ff348434db2571e218a21bdb (diff)
Convert Ethernet and Lucent/Ascend dissectors to use tvbuff.
Note in AUTHORS file that we use the exception module from kazlib. svn path=/trunk/; revision=1966
Diffstat (limited to 'packet-atm.c')
-rw-r--r--packet-atm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/packet-atm.c b/packet-atm.c
index 52faabfa6b..5244ee14a2 100644
--- a/packet-atm.c
+++ b/packet-atm.c
@@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
- * $Id: packet-atm.c,v 1.17 2000/05/16 04:44:10 gram Exp $
+ * $Id: packet-atm.c,v 1.18 2000/05/16 06:21:31 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -374,8 +374,8 @@ static void
dissect_lane(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb_le_client;
- next_tvb = tvb_new_subset(pi.compat_top_tvb, offset, -1, -1);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "ATM LANE");
@@ -392,23 +392,24 @@ dissect_lane(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
case AHLT_LANE_802_3:
case AHLT_LANE_802_3_MC:
dissect_le_client(pd, offset, fd, tree);
- offset += 2;
/* Dissect as Ethernet */
- dissect_eth(pd, offset, fd, tree);
+ next_tvb_le_client = tvb_new_subset(pi.compat_top_tvb, offset+2, -1, -1);
+ dissect_eth(next_tvb_le_client, &pi, tree);
break;
case AHLT_LANE_802_5:
case AHLT_LANE_802_5_MC:
dissect_le_client(pd, offset, fd, tree);
- offset += 2;
/* Dissect as Token-Ring */
- dissect_tr(next_tvb, &pi, tree);
+ next_tvb_le_client = tvb_new_subset(pi.compat_top_tvb, offset+2, -1, -1);
+ dissect_tr(next_tvb_le_client, &pi, tree);
break;
default:
/* Dump it as raw data. */
+ next_tvb = tvb_new_subset(pi.compat_top_tvb, offset, -1, -1);
dissect_data_tvb(next_tvb, &pi, tree);
break;
}