diff options
-rw-r--r-- | packet-wsp.c | 6 | ||||
-rw-r--r-- | packet-wsp.h | 5 | ||||
-rw-r--r-- | packet-wtp.c | 11 |
3 files changed, 14 insertions, 8 deletions
diff --git a/packet-wsp.c b/packet-wsp.c index c64342f727..e35751599c 100644 --- a/packet-wsp.c +++ b/packet-wsp.c @@ -3,7 +3,7 @@ * * Routines to dissect WSP component of WAP traffic. * - * $Id: packet-wsp.c,v 1.6 2001/01/03 06:55:34 guy Exp $ + * $Id: packet-wsp.c,v 1.7 2001/01/03 08:42:48 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -369,7 +369,7 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount) } /* Code to actually dissect the packets */ -void +static void dissect_wsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { frame_data *fdata = pinfo->fd; @@ -1468,6 +1468,8 @@ proto_register_wsp(void) /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_wsp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + + register_dissector("wsp", dissect_wsp); }; void diff --git a/packet-wsp.h b/packet-wsp.h index b1bdb2c323..84cf04fbf9 100644 --- a/packet-wsp.h +++ b/packet-wsp.h @@ -3,7 +3,7 @@ * * Declarations for disassembly of WSP component of WAP traffic. * - * $Id: packet-wsp.h,v 1.1 2000/11/04 03:30:40 guy Exp $ + * $Id: packet-wsp.h,v 1.2 2001/01/03 08:42:48 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -61,7 +61,4 @@ static const value_string vals_wsp_reason_codes[] = { { 0xEE, "Content type cannot be processed" }, }; -void -dissect_wsp(tvbuff_t *, packet_info *, proto_tree *); - #endif /* packet-wsp.h */ 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); */ } |