aboutsummaryrefslogtreecommitdiffstats
path: root/packet-gre.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-11-19 02:00:03 +0000
committerGuy Harris <guy@alum.mit.edu>2000-11-19 02:00:03 +0000
commitdd90e7e3273687538e30ebec716f3c151a6f75d5 (patch)
tree6a40eee325a205b2340aff40fd48a84d9aa443a9 /packet-gre.c
parent5c1549b944280ad916855ea949a66a85065ece22 (diff)
Have the Etherenet and PPP dissectors register themselves, and have
other dissectors call them through handles. Do the same for the "PPP payload" dissector, after tvbuffifying it. Tvbuffify the PPPoE dissector. Do the last little bit of tvbuffifying the L2TP dissector (it takes old-style arguments and immediately generates a tvbuff out of them; make it take new-style arguments). svn path=/trunk/; revision=2664
Diffstat (limited to 'packet-gre.c')
-rw-r--r--packet-gre.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-gre.c b/packet-gre.c
index bcfc58b269..1012a5cf51 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.27 2000/11/18 10:38:24 guy Exp $
+ * $Id: packet-gre.c,v 1.28 2000/11/19 02:00:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -38,7 +38,6 @@
#include <glib.h>
#include "packet.h"
#include "packet-ip.h"
-#include "packet-ppp.h"
#include "packet-ipx.h"
static int proto_gre = -1;
@@ -75,6 +74,7 @@ static const value_string typevals[] = {
};
static dissector_handle_t ip_handle;
+static dissector_handle_t ppp_handle;
static void
dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
@@ -210,8 +210,7 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
switch (type) {
case GRE_PPP:
- next_tvb = tvb_create_from_top(offset);
- dissect_ppp(next_tvb, &pi, tree);
+ old_call_dissector(ppp_handle, pd, offset, fd, tree);
break;
case GRE_IP:
old_call_dissector(ip_handle, pd, offset, fd, tree);
@@ -308,7 +307,8 @@ proto_reg_handoff_gre(void)
old_dissector_add("ip.proto", IP_PROTO_GRE, dissect_gre);
/*
- * Get a handle for the IP dissector.
+ * Get handles for the IP and PPP dissectors.
*/
ip_handle = find_dissector("ip");
+ ppp_handle = find_dissector("ppp");
}