aboutsummaryrefslogtreecommitdiffstats
path: root/packet-raw.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-raw.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-raw.c')
-rw-r--r--packet-raw.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/packet-raw.c b/packet-raw.c
index edb145565f..472fe480f7 100644
--- a/packet-raw.c
+++ b/packet-raw.c
@@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.20 2000/11/18 10:38:25 guy Exp $
+ * $Id: packet-raw.c,v 1.21 2000/11/19 02:00:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -44,6 +44,7 @@ static gint ett_raw = -1;
static const char zeroes[10];
static dissector_handle_t ip_handle;
+static dissector_handle_t ppp_handle;
void
capture_raw(const u_char *pd, packet_counts *ld)
@@ -113,20 +114,20 @@ dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* sometimes. This check should be removed when 2.2 is out.
*/
if (tvb_get_ntohs(tvb, 0) == 0xff03) {
- dissect_ppp(tvb, pinfo, tree);
+ call_dissector(ppp_handle, tvb, pinfo, tree);
return;
}
/* The Linux ISDN driver sends a fake MAC address before the PPP header
* on its ippp interfaces... */
else if (tvb_get_ntohs(tvb, 6) == 0xff03) {
next_tvb = tvb_new_subset(tvb, 6, -1, -1);
- dissect_ppp(next_tvb, pinfo, tree);
+ call_dissector(ppp_handle, next_tvb, pinfo, tree);
return;
}
/* ...except when it just puts out one byte before the PPP header... */
else if (tvb_get_ntohs(tvb, 1) == 0xff03) {
next_tvb = tvb_new_subset(tvb, 1, -1, -1);
- dissect_ppp(next_tvb, pinfo, tree);
+ call_dissector(ppp_handle, next_tvb, pinfo, tree);
return;
}
/* ...and if the connection is currently down, it sends 10 bytes of zeroes
@@ -158,7 +159,8 @@ void
proto_reg_handoff_raw(void)
{
/*
- * 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");
}