aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rtp.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-rtp.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-rtp.c')
-rw-r--r--packet-rtp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/packet-rtp.c b/packet-rtp.c
index a4a564684f..045d1cd6a1 100644
--- a/packet-rtp.c
+++ b/packet-rtp.c
@@ -205,15 +205,21 @@ static void rtp_init( void )
gboolean
dissect_rtp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
- /* This is a heuristic dissector, which means we get all the tcp traffic
- * not send to a known dissector!
+ conversation_t* pconv;
+
+ if (!proto_is_protocol_enabled(proto_rtp))
+ return FALSE; /* RTP has been disabled */
+
+ /* This is a heuristic dissector, which means we get all the TCP
+ * traffic not sent to a known dissector and not claimed by
+ * a heuristic dissector called before us!
* So we first check if the frame is really meant for us.
*/
- conversation_t* pconv;
if ( ( pconv = find_conversation( &pi.src, &fake_addr, pi.ptype,
pi.srcport, 0, 0 ) ) == NULL ) {
/*
- * The source ip:port combination was not what we were looking for, check the destination
+ * The source ip:port combination was not what we were
+ * looking for, check the destination
*/
if ( ( pconv = find_conversation( &pi.dst, &fake_addr,
pi.ptype, pi.destport, 0, 0 ) ) == NULL ) {
@@ -279,6 +285,8 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
guint32 sync_src;
guint32 csrc_item;
+ CHECK_DISPLAY_AS_DATA(proto_rtp, tvb, pinfo, tree);
+
pinfo->current_proto = "RTP";
/* Get the fields in the first octet */