diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-27 17:53:20 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-03-27 17:53:20 +0000 |
commit | 1b25952ad459c5627093eca11853d487fbdcae4a (patch) | |
tree | 9371bbe2c77c4c66baa93ef20e334ad6c33e9b1b /packet-ppp.c | |
parent | 1d640c1296eeb182ea2d23efb93cd034b07b76ac (diff) |
Change dissect_ppp() to accept offset.
Change GRE dissector to call dissect_ppp() instead of dissect_payload_ppp().
svn path=/trunk/; revision=1753
Diffstat (limited to 'packet-ppp.c')
-rw-r--r-- | packet-ppp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-ppp.c b/packet-ppp.c index bf81184d52..a8ee8b6912 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.29 2000/03/12 04:47:48 gram Exp $ + * $Id: packet-ppp.c,v 1.30 2000/03/27 17:53:19 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1131,14 +1131,14 @@ dissect_payload_ppp( const u_char *pd, int offset, frame_data *fd, proto_tree *t } void -dissect_ppp( const u_char *pd, frame_data *fd, proto_tree *tree ) { +dissect_ppp( const u_char *pd, int offset, frame_data *fd, proto_tree *tree ) { e_ppphdr ph; proto_item *ti; proto_tree *fh_tree = NULL; - ph.ppp_addr = pd[0]; - ph.ppp_ctl = pd[1]; - ph.ppp_prot = pntohs(&pd[2]); + ph.ppp_addr = pd[offset+0]; + ph.ppp_ctl = pd[offset+1]; + ph.ppp_prot = pntohs(&pd[offset+2]); /* load the top pane info. This should be overwritten by the next protocol in the stack */ @@ -1159,7 +1159,7 @@ dissect_ppp( const u_char *pd, frame_data *fd, proto_tree *tree ) { proto_tree_add_text(fh_tree, 1, 1, "Control: %02x", ph.ppp_ctl); } - if (!dissect_ppp_stuff(pd, 2, fd, tree, fh_tree)) { + if (!dissect_ppp_stuff(pd, offset+2, fd, tree, fh_tree)) { if (check_col(fd, COL_PROTOCOL)) col_add_fstr(fd, COL_PROTOCOL, "0x%04x", ph.ppp_prot); } |