aboutsummaryrefslogtreecommitdiffstats
path: root/packet-wtp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-03 08:42:48 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-03 08:42:48 +0000
commitb92ebd4a23fb75f3972527609abd4f8360489805 (patch)
treeef82a557225e3f0d26afc6e25d3e8a82ab0d8db5 /packet-wtp.c
parentbf94988818747c2ba5968b5789f4bf64a8fc373c (diff)
Register the WSP dissector, make it static, and have the WTP dissector
call it through a handle. svn path=/trunk/; revision=2815
Diffstat (limited to 'packet-wtp.c')
-rw-r--r--packet-wtp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/packet-wtp.c b/packet-wtp.c
index 46e90be057..a8c1dfb1cd 100644
--- a/packet-wtp.c
+++ b/packet-wtp.c
@@ -3,7 +3,7 @@
*
* Routines to dissect WTP component of WAP traffic.
*
- * $Id: packet-wtp.c,v 1.6 2001/01/03 06:55:34 guy Exp $
+ * $Id: packet-wtp.c,v 1.7 2001/01/03 08:42:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -162,6 +162,8 @@ static int hf_wtp_header_missing_packets = HF_EMPTY;
static gint ett_wtp = ETT_EMPTY;
static gint ett_header = ETT_EMPTY;
+static dissector_handle_t wsp_handle;
+
/* Declarations */
static char transaction_class(unsigned char octet);
static char pdu_type(unsigned char octet);
@@ -417,7 +419,7 @@ dissect_wtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tvb_reported_length (tvb) > cbHeader)
{
wsp_tvb = tvb_new_subset(tvb, cbHeader, -1, tvb_reported_length (tvb)-cbHeader);
- dissect_wsp( wsp_tvb, pinfo, tree);
+ call_dissector(wsp_handle, wsp_tvb, pinfo, tree);
}
#ifdef DEBUG
@@ -617,6 +619,11 @@ proto_register_wtp(void)
void
proto_reg_handoff_wtp(void)
{
+ /*
+ * Get a handle for the IP WSP dissector.
+ */
+ wsp_handle = find_dissector("wsp");
+
dissector_add("udp.port", UDP_PORT_WTP_WSP, dissect_wtp);
/* dissector_add("udp.port", UDP_PORT_WTLS_WTP_WSP, dissect_wsp); */
}