aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ascend.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-ascend.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-ascend.c')
-rw-r--r--packet-ascend.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/packet-ascend.c b/packet-ascend.c
index ea7a4528ae..72acab9fcc 100644
--- a/packet-ascend.c
+++ b/packet-ascend.c
@@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
- * $Id: packet-ascend.c,v 1.18 2000/08/20 19:16:39 deniel Exp $
+ * $Id: packet-ascend.c,v 1.19 2000/11/19 02:00:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -33,8 +33,6 @@
#include <string.h>
#include "packet.h"
#include "packet-ascend.h"
-#include "packet-eth.h"
-#include "packet-ppp.h"
static int proto_ascend = -1;
static int hf_link_type = -1;
@@ -52,6 +50,9 @@ static const value_string encaps_vals[] = {
{ASCEND_PFX_WDD, "Ethernet" },
{0, NULL } };
+static dissector_handle_t eth_handle;
+static dissector_handle_t ppp_handle;
+
void
dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -101,10 +102,10 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (pseudo_header->ascend.type) {
case ASCEND_PFX_WDS_X:
case ASCEND_PFX_WDS_R:
- dissect_ppp(tvb, pinfo, tree);
+ call_dissector(ppp_handle, tvb, pinfo, tree);
break;
case ASCEND_PFX_WDD:
- dissect_eth(tvb, pinfo, tree);
+ call_dissector(eth_handle, tvb, pinfo, tree);
break;
default:
break;
@@ -147,3 +148,13 @@ proto_register_ascend(void)
proto_register_field_array(proto_ascend, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ascend(void)
+{
+ /*
+ * Get handles for the Ethernet and PPP dissectors.
+ */
+ eth_handle = find_dissector("eth");
+ ppp_handle = find_dissector("ppp");
+}