aboutsummaryrefslogtreecommitdiffstats
path: root/packet-vlan.c
diff options
context:
space:
mode:
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-11 22:04:18 +0000
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-11 22:04:18 +0000
commit3df7cbebd9f9f03658f090517c4e8e8aa0f1a286 (patch)
tree853ffae2bc0ebc521cbbb8167d96ef24911aea71 /packet-vlan.c
parent469866aabca4a8bbeb00d156dda7589a6b348601 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1943 f5534014-38df-0310-8fa8-9805f1628bb7
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);