diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-05-25 07:42:26 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-05-25 07:42:26 +0000 |
commit | 6513429730709ee279498d674b1a222361f4e51c (patch) | |
tree | a6a26b30c3725ce60138c644de65403f85e9b6b1 /packet-gre.c | |
parent | 243fe77f8af9f692b12f476485c924550cc93780 (diff) |
Convert dissect_ppp() and friends to use tvbuffs.
(the ip_tcp_options stuff is still non-tvbuff until I convert ip and tcp).
Add preliminary fix for Linux ISDN ippp devices (similar watch was posted
to ethereal-users, but did not use tvbuffs).
Change packet-raw.c to call capture_ppp()/dissect_ppp() in the case
where the frame starts with FF:03. We had been calling
capture_ip()/dissect_ip() at byte offset 4, but I think this is for
historical reasons of packet-raw.c and packet-ip.c existing before
packet-ppp.c.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1998 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-gre.c')
-rw-r--r-- | packet-gre.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-gre.c b/packet-gre.c index 7af6b079a1..263aec7445 100644 --- a/packet-gre.c +++ b/packet-gre.c @@ -2,7 +2,7 @@ * Routines for the Generic Routing Encapsulation (GRE) protocol * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-gre.c,v 1.20 2000/05/18 08:41:13 guy Exp $ + * $Id: packet-gre.c,v 1.21 2000/05/25 07:42:24 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -81,6 +81,7 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { guint16 type = pntohs(pd + offset + sizeof(flags_and_ver)); guint16 sre_af; guint8 sre_length; + tvbuff_t *next_tvb; if (check_col(fd, COL_PROTOCOL)) col_add_str(fd, COL_PROTOCOL, "GRE"); @@ -205,7 +206,8 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { switch (type) { case GRE_PPP: - dissect_ppp(pd, offset, fd, tree); + next_tvb = tvb_new_subset(pi.compat_top_tvb, offset, -1, -1); + dissect_ppp(next_tvb, &pi, tree); break; case GRE_IP: dissect_ip(pd, offset, fd, tree); |