aboutsummaryrefslogtreecommitdiffstats
path: root/packet-wsp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-11-05 09:30:11 +0000
committerGuy Harris <guy@alum.mit.edu>2000-11-05 09:30:11 +0000
commit9bae9707d37212e81010976957d3f0fce7e7e037 (patch)
tree993708af4bd68a7453e64eb2ba582bded54c7d29 /packet-wsp.c
parent45fd4fec54c327c82e690bedf874c03a28512c92 (diff)
Make the RTCP, RTP, WSP, and WTP dissectors check whether their
protocols have been disabled. Get rid of the "no tvbuff" dissectors for WSP and WTP - they're not used (and shouldn't ever be used). Make "dissect_wtp()" static, as it's not used outside "packet-wtp.c". svn path=/trunk/; revision=2568
Diffstat (limited to 'packet-wsp.c')
-rw-r--r--packet-wsp.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/packet-wsp.c b/packet-wsp.c
index e32364cabc..cf3e66a159 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.2 2000/11/04 07:35:17 guy Exp $
+ * $Id: packet-wsp.c,v 1.3 2000/11/05 09:30:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -368,14 +368,6 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount)
return (value);
}
-void
-dissect_wsp_no_tvbuff(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
-{
- packet_info *pinfo = &pi;
- tvbuff_t *tvb = tvb_create_from_top(offset);
- dissect_wsp (tvb, pinfo, tree);
-}
-
/* Code to actually dissect the packets */
void
dissect_wsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -406,12 +398,14 @@ dissect_wsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* proto_tree *wsp_header_fixed; */
proto_tree *wsp_capabilities;
+ CHECK_DISPLAY_AS_DATA(proto_wsp, tvb, pinfo, tree);
+
/* This field shows up as the "Info" column in the display; you should make
it, if possible, summarize what's in the packet, so that a user looking
at the list of packets can tell what type of packet it is.
"col_add_fstr()" can be used instead of "col_add_str()"; it takes
"printf()"-like arguments. */
-
+
/* Display protocol type depending on the port */
if (check_col(fdata, COL_PROTOCOL))
{
@@ -425,7 +419,7 @@ dissect_wsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
-
+
/* Connection-less mode has a TID first */
if ((pinfo->match_port == UDP_PORT_WSP) || (pinfo->match_port == UDP_PORT_WTLS_WSP))
{
@@ -1491,9 +1485,8 @@ void
proto_reg_handoff_wsp(void)
{
/* Only connection-less WSP has no previous handler */
-// dissector_add("udp.port", UDP_PORT_WSP, dissect_wsp_no_tvbuff);
dissector_add("udp.port", UDP_PORT_WSP, dissect_wsp);
- /* dissector_add("udp.port", UDP_PORT_WTP_WSP, dissect_wsp_no_tvbuff); */
- /* dissector_add("udp.port", UDP_PORT_WTLS_WSP, dissect_wsp_no_tvbuff); */
- /* dissector_add("udp.port", UDP_PORT_WTLS_WTP_WSP, dissect_wsp_no_tvbuff); */
+ /* dissector_add("udp.port", UDP_PORT_WTP_WSP, dissect_wsp); */
+ /* dissector_add("udp.port", UDP_PORT_WTLS_WSP, dissect_wsp); */
+ /* dissector_add("udp.port", UDP_PORT_WTLS_WTP_WSP, dissect_wsp); */
}