aboutsummaryrefslogtreecommitdiffstats
path: root/packet-vlan.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-vlan.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-vlan.c')
-rw-r--r--packet-vlan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-vlan.c b/packet-vlan.c
index bb5c0a78ab..d747a855b4 100644
--- a/packet-vlan.c
+++ b/packet-vlan.c
@@ -1,7 +1,7 @@
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
- * $Id: packet-vlan.c,v 1.11 2000/05/11 08:15:55 gram Exp $
+ * $Id: packet-vlan.c,v 1.12 2000/05/11 22:04:17 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -72,6 +72,7 @@ static void
dissect_vlan(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_tree *ti, *vlan_tree = NULL;
guint16 tci,encap_proto;
+ tvbuff_t *next_tvb;
if (!BYTES_ARE_IN_FRAME(offset, 2*sizeof(guint16))) {
return;
@@ -97,11 +98,12 @@ dissect_vlan(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_tree_add_item(vlan_tree, hf_vlan_id, NullTVB, offset, 2, tci);
}
+ next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+4, -1);
if ( encap_proto <= IEEE_802_3_MAX_LEN) {
if ( pd[offset+4] == 0xff && pd[offset+5] == 0xff ) {
dissect_ipx(pd,offset+4,fd,tree);
} else {
- dissect_llc(pd,offset+4,fd,tree);
+ dissect_llc(next_tvb, &pi, tree);
}
} else {
ethertype(encap_proto, offset+4, pd, fd, tree, vlan_tree, hf_vlan_etype);