aboutsummaryrefslogtreecommitdiffstats
path: root/packet-raw.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-19 02:00:03 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-19 02:00:03 +0000
commit5ee494d4720cce1106a40f6d3f4f30845cef94ce (patch)
tree6a40eee325a205b2340aff40fd48a84d9aa443a9 /packet-raw.c
parentf0c60be2d88805c37d37f9e0124ffdb9f3cd0973 (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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2664 f5534014-38df-0310-8fa8-9805f1628bb7
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");
}