diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-03-31 10:35:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-03-31 10:35:54 +0000 |
commit | 734e90404503f106ae8c1847df78ddf08e9aa7b5 (patch) | |
tree | 82d4b5d215df77700acedfcd9d4244045c6a4b5b /packet-ppp.c | |
parent | 9c1502e3e051a43beeff5c76b1099f927287b711 (diff) | |
download | wireshark-734e90404503f106ae8c1847df78ddf08e9aa7b5.tar.gz |
In various Frame Relay and PPP routines that set the length of the
top-level protocol tree items, use "offset" to set the length, rather
than fetching the length of the item - "offset" is the offset from the
beginning of the Frame Relay or PPP header just past the last field
processed in that header, so it indicates how much of the header we've
processed.
svn path=/trunk/; revision=3215
Diffstat (limited to 'packet-ppp.c')
-rw-r--r-- | packet-ppp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packet-ppp.c b/packet-ppp.c index 8e9494d84a..b9b36982e6 100644 --- a/packet-ppp.c +++ b/packet-ppp.c @@ -1,7 +1,7 @@ /* packet-ppp.c * Routines for ppp packet disassembly * - * $Id: packet-ppp.c,v 1.60 2001/03/30 06:15:47 guy Exp $ + * $Id: packet-ppp.c,v 1.61 2001/03/31 10:35:54 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1177,9 +1177,10 @@ dissect_ppp_common( tvbuff_t *tvb, int offset, packet_info *pinfo, /* If "ti" is not null, it refers to the top-level "proto_ppp" item for PPP, and was given a length equal to the length of any stuff in the header preceding the protocol type, e.g. an HDLC - header; add the length of the protocol type field to it. */ + header, which is just "offset"; add the length of the protocol + type field to it. */ if (ti != NULL) - proto_item_set_len(ti, proto_item_get_len(ti) + proto_len); + proto_item_set_len(ti, offset + proto_len); if (tree) { proto_tree_add_text(fh_tree, tvb, offset, proto_len, "Protocol: %s (0x%04x)", |