aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtsp.c
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2015-07-22 17:51:34 -0400
committerHadriel Kaplan <hadrielk@yahoo.com>2015-07-22 22:40:35 +0000
commit093aef0e28f25d1c6be0d78969c8348decbefb25 (patch)
treed3ba559a2975d56239889eaf1f8625c07bae08c4 /epan/dissectors/packet-rtsp.c
parent2c80810898828da3e9346888afe37f7173f84854 (diff)
RTSP: allow RTP heuristic dissection of RTSP interleaved channel data
Allow the RTP dissector to register a heuristic to dissect RTSP interleaved data content, in case RTSP didn't know what the data is - for example it missed the RTSP message indicating the Transport info was RTP. Change-Id: I7a6ea886e6744d51533aa916974572fff41eb144 Reviewed-on: https://code.wireshark.org/review/9749 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Diffstat (limited to 'epan/dissectors/packet-rtsp.c')
-rw-r--r--epan/dissectors/packet-rtsp.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c
index dab24be5af..791d40aa1c 100644
--- a/epan/dissectors/packet-rtsp.c
+++ b/epan/dissectors/packet-rtsp.c
@@ -145,6 +145,7 @@ static dissector_handle_t rtp_handle;
static dissector_handle_t rtcp_handle;
static dissector_handle_t rdt_handle;
static dissector_table_t media_type_dissector_table;
+static heur_dissector_list_t heur_subdissector_list;
static const gchar *st_str_packets = "Total RTSP Packets";
static const gchar *st_str_requests = "RTSP Request Packets";
@@ -394,7 +395,15 @@ dissect_rtspinterleaved(tvbuff_t *tvb, int offset, packet_info *pinfo,
(dissector = data->interleaved[rf_chan].dissector)) {
call_dissector(dissector, next_tvb, pinfo, tree);
} else {
- proto_tree_add_item(rtspframe_tree, hf_rtsp_data, tvb, offset, rf_len, ENC_NA);
+ gboolean dissected = FALSE;
+ heur_dtbl_entry_t *hdtbl_entry = NULL;
+
+ dissected = dissector_try_heuristic(heur_subdissector_list,
+ next_tvb, pinfo, tree, &hdtbl_entry, NULL);
+
+ if (!dissected) {
+ proto_tree_add_item(rtspframe_tree, hf_rtsp_data, tvb, offset, rf_len, ENC_NA);
+ }
}
offset += rf_len;
@@ -1486,6 +1495,13 @@ proto_register_rtsp(void)
&rtsp_desegment_body);
/*
+ * Heuristic dissectors SHOULD register themselves in
+ * this table using the standard heur_dissector_add()
+ * function.
+ */
+ heur_subdissector_list = register_heur_dissector_list("rtsp");
+
+ /*
* Register for tapping
*/
rtsp_tap = register_tap("rtsp"); /* RTSP statistics tap */