aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tr.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 22:04:18 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 22:04:18 +0000
commit0c39c03bf544a6968d896818561fd591fdc659e7 (patch)
tree853ffae2bc0ebc521cbbb8167d96ef24911aea71 /packet-tr.c
parenta74c39f9b1656fc7781e7b7e98f8604ec3e36524 (diff)
Convert LLC dissector to use tvbuffs.
Non-tvbuff dissectors create a tvbuff when calling dissect_llc() Changed name of current_proto to match string in COL_PROTO ("FDDI" instead of "fddi") Changed short text to be: [Short Frame: %s] where %s is current_proto. svn path=/trunk/; revision=1943
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-tr.c b/packet-tr.c
index 9ccd32f1ce..502bdfcd3c 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-tr.c,v 1.38 2000/05/11 08:15:53 gram Exp $
+ * $Id: packet-tr.c,v 1.39 2000/05/11 22:04:17 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -280,6 +280,7 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
int frame_type;
guint8 trn_rif_bytes;
guint8 actual_rif_bytes;
+ tvbuff_t *next_tvb;
/* The trn_hdr struct, as separate variables */
guint8 trn_ac; /* access control field */
@@ -479,6 +480,7 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
offset += 14 + actual_rif_bytes + fixoffset;
if (IS_DATA_IN_FRAME(offset)) {
+ next_tvb = tvb_new_subset(pi.compat_top_tvb, offset, -1);
/* The package is either MAC or LLC */
switch (frame_type) {
/* MAC */
@@ -486,11 +488,11 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
dissect_trmac(pd, offset, fd, tree);
break;
case 1:
- dissect_llc(pd, offset, fd, tree);
+ dissect_llc(next_tvb, &pi, tree);
break;
default:
/* non-MAC, non-LLC, i.e., "Reserved" */
- dissect_data(pd, offset, fd, tree);
+ dissect_data_tvb(next_tvb, &pi, tree);
break;
}
}