From 31954c98ee03a6dc0702a41fde283395acbf8959 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Thu, 26 Dec 2013 21:35:20 +0000 Subject: [PATCH] From Robert Jongbloed via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8355 Support RTP/RTCP multiplexing. With input from Jonathan Lennox. svn path=/trunk/; revision=54469 --- AUTHORS | 1 + epan/dissectors/packet-rtp.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/AUTHORS b/AUTHORS index 77dd39e08a..4940cf377c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3795,6 +3795,7 @@ Jonathon Jongsma Zeljko Ancimer Deon van der Westhuysen Ibrahim Can Yuce +Robert Jongbloed Dan Lasley gave permission for his dumpit() hex-dump routine to be used. diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 939a8598f0..d13fe32649 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -134,6 +134,7 @@ static const fragment_items rtp_fragment_items = { }; static dissector_handle_t rtp_handle; +static dissector_handle_t rtcp_handle; static dissector_handle_t classicstun_handle; static dissector_handle_t stun_handle; static dissector_handle_t classicstun_heur_handle; @@ -502,6 +503,9 @@ static const value_string rtp_ext_ed137a_ft_type[] = #define RTP_PAYLOAD_TYPE(octet) ((octet) & 0x7F) /* http://www.iana.org/assignments/rtp-parameters */ +#define FIRST_RTCP_CONFLICT_PAYLOAD_TYPE 64 +#define LAST_RTCP_CONFLICT_PAYLOAD_TYPE 95 + static const value_string rtp_payload_type_vals[] = { /* 0 */ { PT_PCMU, "ITU-T G.711 PCMU" }, @@ -1685,6 +1689,11 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ marker_set = RTP_MARKER( octet2 ); payload_type = RTP_PAYLOAD_TYPE( octet2 ); + if (marker_set && payload_type >= FIRST_RTCP_CONFLICT_PAYLOAD_TYPE && payload_type <= LAST_RTCP_CONFLICT_PAYLOAD_TYPE) { + call_dissector(rtcp_handle, tvb, pinfo, tree); + return tvb_length(tvb); + } + /* Get the subsequent fields */ seq_num = tvb_get_ntohs( tvb, offset + 2 ); timestamp = tvb_get_ntohl( tvb, offset + 4 ); @@ -3294,6 +3303,7 @@ proto_reg_handoff_rtp(void) dissector_add_uint("rtp.hdr_ext", RTP_ED137_SIG, rtp_hdr_ext_ed137_handle); dissector_add_uint("rtp.hdr_ext", RTP_ED137A_SIG, rtp_hdr_ext_ed137a_handle); + rtcp_handle = find_dissector("rtcp"); data_handle = find_dissector("data"); stun_handle = find_dissector("stun-udp"); classicstun_handle = find_dissector("classicstun"); -- 2.34.1