diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-16 04:44:14 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-16 04:44:14 +0000 |
commit | 0a2817cebacb5352ff348434db2571e218a21bdb (patch) | |
tree | 50401d28646b843ea7fdfac3e1487613b2bdc9af /packet-vlan.c | |
parent | 9d92bf4eeb0ee6dfe7add0e88632eacac205feb3 (diff) | |
download | wireshark-0a2817cebacb5352ff348434db2571e218a21bdb.tar.gz wireshark-0a2817cebacb5352ff348434db2571e218a21bdb.tar.bz2 wireshark-0a2817cebacb5352ff348434db2571e218a21bdb.zip |
Have tvbuff's keep track of cap_len and pkt_len ('length' and 'reported_length'
in tvbuff terminology). This is implemented for TVBUFF_REAL and TVBUFF_SUBSET
so far; support for TVBUFF_COMPOSITE is coming soon.
Throw either ReportedBoundsError or BoundsError.
A ReportedBoundsError is reported as "Malformed Frame" since the protocol
stated that a certain number of bytes should be available but they weren't.
A BoundsError is reported as a "Short Frame" since the snaplen was too short.
Register proto_short (BoundsError) and proto_malformed (ReportedBounds)
so searches can be made on "short" and "malformed".
svn path=/trunk/; revision=1965
Diffstat (limited to 'packet-vlan.c')
-rw-r--r-- | packet-vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-vlan.c b/packet-vlan.c index d747a855b4..67a4692f4b 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.12 2000/05/11 22:04:17 gram Exp $ + * $Id: packet-vlan.c,v 1.13 2000/05/16 04:44:13 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -98,7 +98,7 @@ 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); + next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+4, -1, -1); /* XXX - like dissect_eth() */ if ( encap_proto <= IEEE_802_3_MAX_LEN) { if ( pd[offset+4] == 0xff && pd[offset+5] == 0xff ) { dissect_ipx(pd,offset+4,fd,tree); |