diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-11-05 09:30:11 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-11-05 09:30:11 +0000 |
commit | 2b74b36060fd016a031e60d2c056fb5f6505ac10 (patch) | |
tree | 993708af4bd68a7453e64eb2ba582bded54c7d29 /packet-wsp.c | |
parent | 054142bcfcaa8ffdd3c5fb86a072755732211e82 (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".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2568 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-wsp.c')
-rw-r--r-- | packet-wsp.c | 23 |
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 = π - 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); */ } |