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-tr.c | |
parent | 9d92bf4eeb0ee6dfe7add0e88632eacac205feb3 (diff) |
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-tr.c')
-rw-r--r-- | packet-tr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-tr.c b/packet-tr.c index a162647e11..afcce25d43 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.40 2000/05/15 06:22:06 gram Exp $ + * $Id: packet-tr.c,v 1.41 2000/05/16 04:44:12 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -336,7 +336,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((x = check_for_old_linux_tvb((tvbuff_t*) tvb))) { /* Actually packet starts x bytes into what we have got but with all source routing compressed. See comment above */ - tr_tvb = tvb_new_subset((tvbuff_t*) tvb, x, -1); + tr_tvb = tvb_new_subset((tvbuff_t*) tvb, x, -1, -1); } else { tr_tvb = tvb; @@ -518,7 +518,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) - next_tvb = tvb_new_subset(tr_tvb, TR_MIN_HEADER_LEN + actual_rif_bytes + fixoffset, -1); + next_tvb = tvb_new_subset(tr_tvb, TR_MIN_HEADER_LEN + actual_rif_bytes + fixoffset, -1, -1); tvb_compat(next_tvb, &next_pd, &next_offset); /* The package is either MAC or LLC */ |