summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtcp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-rtcp.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-rtcp.c')
-rw-r--r--epan/dissectors/packet-rtcp.c1963
1 files changed, 1195 insertions, 768 deletions
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index 847d6cf1..784b7cbb 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -60,7 +60,9 @@
#include <stdlib.h>
#include <epan/packet.h>
+#include <epan/unit_strings.h>
+#include <wsutil/array.h>
#include "packet-rtcp.h"
#include "packet-rtp.h"
#include "packet-gsm_a_common.h"
@@ -85,13 +87,34 @@ void proto_reg_handoff_rtcp(void);
/* Receiver/ Sender count is the 5 last bits */
#define RTCP_COUNT(octet) ((octet) & 0x1F)
+/* Metric block for RTCP Congestion Control Feedback [RFC8888]
+ 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |R|ECN| ATO |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+#define RTCP_CCFB_RECEIVED(metric_block) (((metric_block) & 0x8000) >> 15)
+#define RTCP_CCFB_ECN(metric_block) (((metric_block) & 0x6000) >> 13)
+#define RTCP_CCFB_ATO(metric_block) ((metric_block) & 0x1FFF)
+
+#define RTCP_TRANSPORT_CC_HEADER_LENGTH 12
+static int rtcp_padding_set = 0;
+
static dissector_handle_t rtcp_handle;
static dissector_handle_t srtcp_handle;
+static dissector_handle_t ms_pse_handle;
+static dissector_handle_t rtcp_rtpfb_nack_handle;
+static dissector_handle_t rtcp_rtpfb_tmmbr_handle;
+static dissector_handle_t rtcp_rtpfb_tmmbn_handle;
+static dissector_handle_t rtcp_rtpfb_ccfb_handle;
+static dissector_handle_t rtcp_rtpfb_transport_cc_handle;
+static dissector_handle_t rtcp_rtpfb_undecoded_fci_handle;
+
/* add dissector table to permit sub-protocol registration */
static dissector_table_t rtcp_dissector_table;
static dissector_table_t rtcp_psfb_dissector_table;
static dissector_table_t rtcp_rtpfb_dissector_table;
+static dissector_table_t rtcp_pse_dissector_table;
static const value_string rtcp_version_vals[] =
{
@@ -348,13 +371,23 @@ static const value_string rtcp_app_mux_selection_vals[] =
{ 0, NULL}
};
-/* RFC 4585 and RFC 5104 */
+/* RFC 4585, RFC 5104, RFC 6051, RFC 6285, RFC 6642, RFC 6679, RFC 7728,
+ * 3GPP TS 26.114 v16.3.0, RFC 8888 and
+ * draft-holmer-rmcat-transport-wide-cc-extensions-01
+ */
static const value_string rtcp_rtpfb_fmt_vals[] =
{
{ 1, "Generic negative acknowledgement (NACK)"},
{ 3, "Temporary Maximum Media Stream Bit Rate Request (TMMBR)"},
{ 4, "Temporary Maximum Media Stream Bit Rate Notification (TMMBN)"},
- { 15, "Transport-wide Congestion Control (Transport-cc)"}, /*https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01*/
+ { 5, "RTCP Rapid Resynchronisation Request (RTCP-SR-REQ)"},
+ { 6, "Rapid Acquisition of Multicast Sessions (RAMS)"},
+ { 7, "Transport-Layer Third-Party Loss Early Indication (TLLEI)"},
+ { 8, "RTCP ECN Feedback (RTCP-ECN-FB)"},
+ { 9, "Media Pause/Resume (PAUSE-RESUME)"},
+ { 10, "Delay Budget Information (DBI)"},
+ { 11, "RTP Congestion Control Feedback (CCFB)"},
+ { 15, "Transport-wide Congestion Control (Transport-cc)"},
{ 31, "Reserved for future extensions"},
{ 0, NULL }
};
@@ -506,371 +539,391 @@ static const value_string rtcp_mccp_field_id_vals[] = {
/* RTCP header fields */
-static int proto_rtcp = -1;
-static int proto_srtcp = -1;
-static int hf_rtcp_version = -1;
-static int hf_rtcp_padding = -1;
-static int hf_rtcp_rc = -1;
-static int hf_rtcp_sc = -1;
-static int hf_rtcp_pt = -1;
-static int hf_rtcp_length = -1;
-static int hf_rtcp_ssrc_sender = -1;
-static int hf_rtcp_ssrc_media_source = -1;
-static int hf_rtcp_ntp = -1;
-static int hf_rtcp_ntp_msw = -1;
-static int hf_rtcp_ntp_lsw = -1;
-static int hf_rtcp_timebase_indicator = -1;
-static int hf_rtcp_identity = -1;
-static int hf_rtcp_stream_id = -1;
-static int hf_rtcp_as_timestamp = -1;
-static int hf_rtcp_rtp_timestamp = -1;
-static int hf_rtcp_sender_pkt_cnt = -1;
-static int hf_rtcp_sender_oct_cnt = -1;
-static int hf_rtcp_ssrc_source = -1;
-static int hf_rtcp_ssrc_fraction = -1;
-static int hf_rtcp_ssrc_cum_nr = -1;
-static int hf_rtcp_ssrc_discarded = -1;
+static int proto_rtcp;
+static int proto_srtcp;
+static int proto_rtcp_ms_pse;
+static int proto_rtcp_rtpfb_nack;
+static int proto_rtcp_rtpfb_tmmbr;
+static int proto_rtcp_rtpfb_tmmbn;
+static int proto_rtcp_rtpfb_ccfb;
+static int proto_rtcp_rtpfb_transport_cc;
+static int proto_rtcp_rtpfb_undecoded_fci;
+static int hf_rtcp_version;
+static int hf_rtcp_padding;
+static int hf_rtcp_rc;
+static int hf_rtcp_sc;
+static int hf_rtcp_pt;
+static int hf_rtcp_length;
+static int hf_rtcp_ssrc_sender;
+static int hf_rtcp_ssrc_media_source;
+static int hf_rtcp_ntp;
+static int hf_rtcp_ntp_msw;
+static int hf_rtcp_ntp_lsw;
+static int hf_rtcp_timebase_indicator;
+static int hf_rtcp_identity;
+static int hf_rtcp_stream_id;
+static int hf_rtcp_as_timestamp;
+static int hf_rtcp_rtp_timestamp;
+static int hf_rtcp_sender_pkt_cnt;
+static int hf_rtcp_sender_oct_cnt;
+static int hf_rtcp_ssrc_source;
+static int hf_rtcp_ssrc_fraction;
+static int hf_rtcp_ssrc_cum_nr;
+static int hf_rtcp_ssrc_discarded;
/* First the 32 bit number, then the split
* up 16 bit values */
/* These two are added to a subtree */
-static int hf_rtcp_ssrc_ext_high_seq = -1;
-static int hf_rtcp_ssrc_high_seq = -1;
-static int hf_rtcp_ssrc_high_cycles = -1;
-static int hf_rtcp_ssrc_jitter = -1;
-static int hf_rtcp_ssrc_lsr = -1;
-static int hf_rtcp_ssrc_dlsr = -1;
-/* static int hf_rtcp_ssrc_csrc = -1; */
-static int hf_rtcp_sdes_type = -1;
-static int hf_rtcp_sdes_length = -1;
-static int hf_rtcp_sdes_text = -1;
-static int hf_rtcp_sdes_prefix_len = -1;
-static int hf_rtcp_sdes_prefix_string = -1;
-static int hf_rtcp_subtype = -1;
-static int hf_rtcp_name_ascii = -1;
-static int hf_rtcp_app_data = -1;
-static int hf_rtcp_app_data_str = -1;
-static int hf_rtcp_fsn = -1;
-static int hf_rtcp_blp = -1;
-static int hf_rtcp_padding_count = -1;
-static int hf_rtcp_padding_data = -1;
-static int hf_rtcp_profile_specific_extension_type = -1;
-static int hf_rtcp_profile_specific_extension_length = -1;
-static int hf_rtcp_profile_specific_extension = -1;
-static int hf_rtcp_app_poc1 = -1;
-static int hf_rtcp_app_poc1_sip_uri = -1;
-static int hf_rtcp_app_poc1_disp_name = -1;
-static int hf_rtcp_app_poc1_priority = -1;
-static int hf_rtcp_app_poc1_request_ts = -1;
-static int hf_rtcp_app_poc1_stt = -1;
-static int hf_rtcp_app_poc1_partic = -1;
-static int hf_rtcp_app_poc1_ssrc_granted = -1;
-static int hf_rtcp_app_poc1_last_pkt_seq_no = -1;
-static int hf_rtcp_app_poc1_ignore_seq_no = -1;
-static int hf_rtcp_app_poc1_reason_code1 = -1;
-static int hf_rtcp_app_poc1_reason1_phrase = -1;
-static int hf_rtcp_app_poc1_reason_code2 = -1;
-static int hf_rtcp_app_poc1_new_time_request = -1;
-static int hf_rtcp_app_poc1_ack_subtype = -1;
-static int hf_rtcp_app_poc1_ack_reason_code = -1;
-static int hf_rtcp_app_poc1_qsresp_priority = -1;
-static int hf_rtcp_app_poc1_qsresp_position = -1;
-static int hf_rtcp_app_poc1_conn_content[5] = { -1, -1, -1, -1, -1 };
-static int hf_rtcp_app_poc1_conn_session_type = -1;
-static int hf_rtcp_app_poc1_conn_add_ind_mao = -1;
-static int hf_rtcp_app_poc1_conn_sdes_items[5] = { -1, -1, -1, -1, -1 };
-static int hf_rtcp_app_mux = -1;
-static int hf_rtcp_app_mux_mux = -1;
-static int hf_rtcp_app_mux_cp = -1;
-static int hf_rtcp_app_mux_selection = -1;
-static int hf_rtcp_app_mux_localmuxport = -1;
-static int hf_rtcp_xr_block_type = -1;
-static int hf_rtcp_xr_block_specific = -1;
-static int hf_rtcp_xr_block_length = -1;
-static int hf_rtcp_xr_thinning = -1;
-static int hf_rtcp_xr_voip_metrics_burst_density = -1;
-static int hf_rtcp_xr_voip_metrics_gap_density = -1;
-static int hf_rtcp_xr_voip_metrics_burst_duration = -1;
-static int hf_rtcp_xr_voip_metrics_gap_duration = -1;
-static int hf_rtcp_xr_voip_metrics_rtdelay = -1;
-static int hf_rtcp_xr_voip_metrics_esdelay = -1;
-static int hf_rtcp_xr_voip_metrics_siglevel = -1;
-static int hf_rtcp_xr_voip_metrics_noiselevel = -1;
-static int hf_rtcp_xr_voip_metrics_rerl = -1;
-static int hf_rtcp_xr_voip_metrics_gmin = -1;
-static int hf_rtcp_xr_voip_metrics_rfactor = -1;
-static int hf_rtcp_xr_voip_metrics_extrfactor = -1;
-static int hf_rtcp_xr_voip_metrics_moslq = -1;
-static int hf_rtcp_xr_voip_metrics_moscq = -1;
-static int hf_rtcp_xr_voip_metrics_plc = -1;
-static int hf_rtcp_xr_voip_metrics_jbadaptive = -1;
-static int hf_rtcp_xr_voip_metrics_jbrate = -1;
-static int hf_rtcp_xr_voip_metrics_jbnominal = -1;
-static int hf_rtcp_xr_voip_metrics_jbmax = -1;
-static int hf_rtcp_xr_voip_metrics_jbabsmax = -1;
-static int hf_rtcp_xr_stats_loss_flag = -1;
-static int hf_rtcp_xr_stats_dup_flag = -1;
-static int hf_rtcp_xr_stats_jitter_flag = -1;
-static int hf_rtcp_xr_stats_ttl = -1;
-static int hf_rtcp_xr_beginseq = -1;
-static int hf_rtcp_xr_endseq = -1;
-static int hf_rtcp_xr_chunk_null_terminator = -1;
-static int hf_rtcp_xr_chunk_length = -1;
-static int hf_rtcp_xr_chunk_bit_vector = -1;
-static int hf_rtcp_xr_receipt_time_seq = -1;
-static int hf_rtcp_xr_stats_lost = -1;
-static int hf_rtcp_xr_stats_dups = -1;
-static int hf_rtcp_xr_stats_minjitter = -1;
-static int hf_rtcp_xr_stats_maxjitter = -1;
-static int hf_rtcp_xr_stats_meanjitter = -1;
-static int hf_rtcp_xr_stats_devjitter = -1;
-static int hf_rtcp_xr_stats_minttl = -1;
-static int hf_rtcp_xr_stats_maxttl = -1;
-static int hf_rtcp_xr_stats_meanttl = -1;
-static int hf_rtcp_xr_stats_devttl = -1;
-static int hf_rtcp_xr_timestamp = -1;
-static int hf_rtcp_xr_lrr = -1;
-static int hf_rtcp_xr_dlrr = -1;
-static int hf_rtcp_xr_idms_spst = -1;
-static int hf_rtcp_xr_idms_pt = -1;
-static int hf_rtcp_xr_idms_msci = -1;
-static int hf_rtcp_xr_idms_source_ssrc = -1;
-static int hf_rtcp_xr_idms_ntp_rcv_ts = -1;
-static int hf_rtcp_xr_idms_rtp_ts = -1;
-static int hf_rtcp_xr_idms_ntp_pres_ts = -1;
-static int hf_rtcp_length_check = -1;
-static int hf_rtcp_rtpfb_fmt = -1;
-static int hf_rtcp_rtpfb_nack_pid = -1;
-static int hf_rtcp_rtpfb_nack_blp = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_base_seq = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_pkt_stats_cnt = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_ref_time = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_fb_pkt_cnt = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_pkt_chunk = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_1_byte = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_2_bytes = -1;
-static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_padding = -1;
-static int hf_rtcp_psfb_fmt = -1;
-static int hf_rtcp_fci = -1;
-static int hf_rtcp_psfb_fir_fci_ssrc = -1;
-static int hf_rtcp_psfb_fir_fci_csn = -1;
-static int hf_rtcp_psfb_fir_fci_reserved = -1;
-static int hf_rtcp_psfb_sli_first = -1;
-static int hf_rtcp_psfb_sli_number = -1;
-static int hf_rtcp_psfb_sli_picture_id = -1;
-static int hf_rtcp_psfb_remb_fci_identifier = -1;
-static int hf_rtcp_psfb_remb_fci_number_ssrcs = -1;
-static int hf_rtcp_psfb_remb_fci_ssrc = -1;
-static int hf_rtcp_psfb_remb_fci_exp = -1;
-static int hf_rtcp_psfb_remb_fci_mantissa = -1;
-static int hf_rtcp_psfb_remb_fci_bitrate = -1;
-static int hf_rtcp_rtpfb_tmbbr_fci_ssrc = -1;
-static int hf_rtcp_rtpfb_tmbbr_fci_exp = -1;
-static int hf_rtcp_rtpfb_tmbbr_fci_mantissa = -1;
-static int hf_rtcp_rtpfb_tmbbr_fci_bitrate = -1;
-static int hf_rtcp_rtpfb_tmbbr_fci_measuredoverhead = -1;
-static int hf_srtcp_e = -1;
-static int hf_srtcp_index = -1;
-static int hf_srtcp_mki = -1;
-static int hf_srtcp_auth_tag = -1;
-static int hf_rtcp_xr_btxnq_begseq = -1; /* added for BT XNQ block (RFC5093) */
-static int hf_rtcp_xr_btxnq_endseq = -1;
-static int hf_rtcp_xr_btxnq_vmaxdiff = -1;
-static int hf_rtcp_xr_btxnq_vrange = -1;
-static int hf_rtcp_xr_btxnq_vsum = -1;
-static int hf_rtcp_xr_btxnq_cycles = -1;
-static int hf_rtcp_xr_btxnq_jbevents = -1;
-static int hf_rtcp_xr_btxnq_tdegnet = -1;
-static int hf_rtcp_xr_btxnq_tdegjit = -1;
-static int hf_rtcp_xr_btxnq_es = -1;
-static int hf_rtcp_xr_btxnq_ses = -1;
-static int hf_rtcp_xr_btxnq_spare = -1;
+static int hf_rtcp_ssrc_ext_high_seq;
+static int hf_rtcp_ssrc_high_seq;
+static int hf_rtcp_ssrc_high_cycles;
+static int hf_rtcp_ssrc_jitter;
+static int hf_rtcp_ssrc_lsr;
+static int hf_rtcp_ssrc_dlsr;
+/* static int hf_rtcp_ssrc_csrc; */
+static int hf_rtcp_sdes_type;
+static int hf_rtcp_sdes_length;
+static int hf_rtcp_sdes_text;
+static int hf_rtcp_sdes_prefix_len;
+static int hf_rtcp_sdes_prefix_string;
+static int hf_rtcp_subtype;
+static int hf_rtcp_name_ascii;
+static int hf_rtcp_app_data;
+static int hf_rtcp_app_data_str;
+static int hf_rtcp_fsn;
+static int hf_rtcp_blp;
+static int hf_rtcp_padding_count;
+static int hf_rtcp_padding_data;
+static int hf_rtcp_profile_specific_extension_type;
+static int hf_rtcp_profile_specific_extension_length;
+static int hf_rtcp_profile_specific_extension;
+static int hf_rtcp_app_poc1;
+static int hf_rtcp_app_poc1_sip_uri;
+static int hf_rtcp_app_poc1_disp_name;
+static int hf_rtcp_app_poc1_priority;
+static int hf_rtcp_app_poc1_request_ts;
+static int hf_rtcp_app_poc1_stt;
+static int hf_rtcp_app_poc1_partic;
+static int hf_rtcp_app_poc1_ssrc_granted;
+static int hf_rtcp_app_poc1_last_pkt_seq_no;
+static int hf_rtcp_app_poc1_ignore_seq_no;
+static int hf_rtcp_app_poc1_reason_code1;
+static int hf_rtcp_app_poc1_reason1_phrase;
+static int hf_rtcp_app_poc1_reason_code2;
+static int hf_rtcp_app_poc1_new_time_request;
+static int hf_rtcp_app_poc1_ack_subtype;
+static int hf_rtcp_app_poc1_ack_reason_code;
+static int hf_rtcp_app_poc1_qsresp_priority;
+static int hf_rtcp_app_poc1_qsresp_position;
+static int hf_rtcp_app_poc1_conn_content[5];
+static int hf_rtcp_app_poc1_conn_session_type;
+static int hf_rtcp_app_poc1_conn_add_ind_mao;
+static int hf_rtcp_app_poc1_conn_sdes_items[5];
+static int hf_rtcp_app_mux;
+static int hf_rtcp_app_mux_mux;
+static int hf_rtcp_app_mux_cp;
+static int hf_rtcp_app_mux_selection;
+static int hf_rtcp_app_mux_localmuxport;
+static int hf_rtcp_xr_block_type;
+static int hf_rtcp_xr_block_specific;
+static int hf_rtcp_xr_block_length;
+static int hf_rtcp_xr_thinning;
+static int hf_rtcp_xr_voip_metrics_burst_density;
+static int hf_rtcp_xr_voip_metrics_gap_density;
+static int hf_rtcp_xr_voip_metrics_burst_duration;
+static int hf_rtcp_xr_voip_metrics_gap_duration;
+static int hf_rtcp_xr_voip_metrics_rtdelay;
+static int hf_rtcp_xr_voip_metrics_esdelay;
+static int hf_rtcp_xr_voip_metrics_siglevel;
+static int hf_rtcp_xr_voip_metrics_noiselevel;
+static int hf_rtcp_xr_voip_metrics_rerl;
+static int hf_rtcp_xr_voip_metrics_gmin;
+static int hf_rtcp_xr_voip_metrics_rfactor;
+static int hf_rtcp_xr_voip_metrics_extrfactor;
+static int hf_rtcp_xr_voip_metrics_moslq;
+static int hf_rtcp_xr_voip_metrics_moscq;
+static int hf_rtcp_xr_voip_metrics_plc;
+static int hf_rtcp_xr_voip_metrics_jbadaptive;
+static int hf_rtcp_xr_voip_metrics_jbrate;
+static int hf_rtcp_xr_voip_metrics_jbnominal;
+static int hf_rtcp_xr_voip_metrics_jbmax;
+static int hf_rtcp_xr_voip_metrics_jbabsmax;
+static int hf_rtcp_xr_stats_loss_flag;
+static int hf_rtcp_xr_stats_dup_flag;
+static int hf_rtcp_xr_stats_jitter_flag;
+static int hf_rtcp_xr_stats_ttl;
+static int hf_rtcp_xr_beginseq;
+static int hf_rtcp_xr_endseq;
+static int hf_rtcp_xr_chunk_null_terminator;
+static int hf_rtcp_xr_chunk_length;
+static int hf_rtcp_xr_chunk_bit_vector;
+static int hf_rtcp_xr_receipt_time_seq;
+static int hf_rtcp_xr_stats_lost;
+static int hf_rtcp_xr_stats_dups;
+static int hf_rtcp_xr_stats_minjitter;
+static int hf_rtcp_xr_stats_maxjitter;
+static int hf_rtcp_xr_stats_meanjitter;
+static int hf_rtcp_xr_stats_devjitter;
+static int hf_rtcp_xr_stats_minttl;
+static int hf_rtcp_xr_stats_maxttl;
+static int hf_rtcp_xr_stats_meanttl;
+static int hf_rtcp_xr_stats_devttl;
+static int hf_rtcp_xr_timestamp;
+static int hf_rtcp_xr_lrr;
+static int hf_rtcp_xr_dlrr;
+static int hf_rtcp_xr_idms_spst;
+static int hf_rtcp_xr_idms_pt;
+static int hf_rtcp_xr_idms_msci;
+static int hf_rtcp_xr_idms_source_ssrc;
+static int hf_rtcp_xr_idms_ntp_rcv_ts;
+static int hf_rtcp_xr_idms_rtp_ts;
+static int hf_rtcp_xr_idms_ntp_pres_ts;
+static int hf_rtcp_length_check;
+static int hf_rtcp_rtpfb_ccfb_beginseq;
+static int hf_rtcp_rtpfb_ccfb_numreports;
+static int hf_rtcp_rtpfb_ccfb_received;
+static int hf_rtcp_rtpfb_ccfb_ecn;
+static int hf_rtcp_rtpfb_ccfb_ato;
+static int hf_rtcp_rtpfb_ccfb_padding;
+static int hf_rtcp_rtpfb_ccfb_timestamp;
+static int hf_rtcp_rtpfb_fmt;
+static int hf_rtcp_rtpfb_nack_pid;
+static int hf_rtcp_rtpfb_nack_blp;
+static int hf_rtcp_rtpfb_transport_cc_fci_base_seq;
+static int hf_rtcp_rtpfb_transport_cc_fci_pkt_stats_cnt;
+static int hf_rtcp_rtpfb_transport_cc_fci_ref_time;
+static int hf_rtcp_rtpfb_transport_cc_fci_fb_pkt_cnt;
+static int hf_rtcp_rtpfb_transport_cc_fci_pkt_chunk;
+static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_1_byte;
+static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_2_bytes;
+static int hf_rtcp_rtpfb_transport_cc_fci_recv_delta_padding;
+static int hf_rtcp_psfb_fmt;
+static int hf_rtcp_fci;
+static int hf_rtcp_psfb_fir_fci_ssrc;
+static int hf_rtcp_psfb_fir_fci_csn;
+static int hf_rtcp_psfb_fir_fci_reserved;
+static int hf_rtcp_psfb_sli_first;
+static int hf_rtcp_psfb_sli_number;
+static int hf_rtcp_psfb_sli_picture_id;
+static int hf_rtcp_psfb_remb_fci_identifier;
+static int hf_rtcp_psfb_remb_fci_number_ssrcs;
+static int hf_rtcp_psfb_remb_fci_ssrc;
+static int hf_rtcp_psfb_remb_fci_exp;
+static int hf_rtcp_psfb_remb_fci_mantissa;
+static int hf_rtcp_psfb_remb_fci_bitrate;
+static int hf_rtcp_rtpfb_tmbbr_fci_ssrc;
+static int hf_rtcp_rtpfb_tmbbr_fci_exp;
+static int hf_rtcp_rtpfb_tmbbr_fci_mantissa;
+static int hf_rtcp_rtpfb_tmbbr_fci_bitrate;
+static int hf_rtcp_rtpfb_tmbbr_fci_measuredoverhead;
+static int hf_srtcp_e;
+static int hf_srtcp_index;
+static int hf_srtcp_mki;
+static int hf_srtcp_auth_tag;
+static int hf_rtcp_xr_btxnq_begseq; /* added for BT XNQ block (RFC5093) */
+static int hf_rtcp_xr_btxnq_endseq;
+static int hf_rtcp_xr_btxnq_vmaxdiff;
+static int hf_rtcp_xr_btxnq_vrange;
+static int hf_rtcp_xr_btxnq_vsum;
+static int hf_rtcp_xr_btxnq_cycles;
+static int hf_rtcp_xr_btxnq_jbevents;
+static int hf_rtcp_xr_btxnq_tdegnet;
+static int hf_rtcp_xr_btxnq_tdegjit;
+static int hf_rtcp_xr_btxnq_es;
+static int hf_rtcp_xr_btxnq_ses;
+static int hf_rtcp_xr_btxnq_spare;
/* RTCP setup fields */
-static int hf_rtcp_setup = -1;
-static int hf_rtcp_setup_frame = -1;
-static int hf_rtcp_setup_method = -1;
+static int hf_rtcp_setup;
+static int hf_rtcp_setup_frame;
+static int hf_rtcp_setup_method;
/* RTCP roundtrip delay fields */
-static int hf_rtcp_last_sr_timestamp_frame = -1;
-static int hf_rtcp_time_since_last_sr = -1;
-static int hf_rtcp_roundtrip_delay = -1;
+static int hf_rtcp_last_sr_timestamp_frame;
+static int hf_rtcp_time_since_last_sr;
+static int hf_rtcp_roundtrip_delay;
/* MS Profile Specific Extension Fields */
-static int hf_rtcp_pse_ms_bandwidth = -1;
-static int hf_rtcp_pse_ms_confidence_level = -1;
-static int hf_rtcp_pse_ms_seq_num = -1;
-static int hf_rtcp_pse_ms_frame_resolution_width = -1;
-static int hf_rtcp_pse_ms_frame_resolution_height = -1;
-static int hf_rtcp_pse_ms_bitrate = -1;
-static int hf_rtcp_pse_ms_frame_rate = -1;
-static int hf_rtcp_pse_ms_concealed_frames = -1;
-static int hf_rtcp_pse_ms_stretched_frames = -1;
-static int hf_rtcp_pse_ms_compressed_frames = -1;
-static int hf_rtcp_pse_ms_total_frames = -1;
-static int hf_rtcp_pse_ms_receive_quality_state = -1;
-static int hf_rtcp_pse_ms_fec_distance_request = -1;
-static int hf_rtcp_pse_ms_last_packet_train = -1;
-static int hf_rtcp_pse_ms_packet_idx = -1;
-static int hf_rtcp_pse_ms_packet_cnt = -1;
-static int hf_rtcp_pse_ms_packet_train_byte_cnt = -1;
-static int hf_rtcp_pse_ms_inbound_bandwidth = -1;
-static int hf_rtcp_pse_ms_outbound_bandwidth = -1;
-static int hf_rtcp_pse_ms_no_cache = -1;
-static int hf_rtcp_pse_ms_congestion_info = -1;
-static int hf_rtcp_pse_ms_modality = -1;
+static int hf_rtcp_pse_ms_bandwidth;
+static int hf_rtcp_pse_ms_confidence_level;
+static int hf_rtcp_pse_ms_seq_num;
+static int hf_rtcp_pse_ms_frame_resolution_width;
+static int hf_rtcp_pse_ms_frame_resolution_height;
+static int hf_rtcp_pse_ms_bitrate;
+static int hf_rtcp_pse_ms_frame_rate;
+static int hf_rtcp_pse_ms_concealed_frames;
+static int hf_rtcp_pse_ms_stretched_frames;
+static int hf_rtcp_pse_ms_compressed_frames;
+static int hf_rtcp_pse_ms_total_frames;
+static int hf_rtcp_pse_ms_receive_quality_state;
+static int hf_rtcp_pse_ms_fec_distance_request;
+static int hf_rtcp_pse_ms_last_packet_train;
+static int hf_rtcp_pse_ms_packet_idx;
+static int hf_rtcp_pse_ms_packet_cnt;
+static int hf_rtcp_pse_ms_packet_train_byte_cnt;
+static int hf_rtcp_pse_ms_inbound_bandwidth;
+static int hf_rtcp_pse_ms_outbound_bandwidth;
+static int hf_rtcp_pse_ms_no_cache;
+static int hf_rtcp_pse_ms_congestion_info;
+static int hf_rtcp_pse_ms_modality;
/* Microsoft PLI Extension */
-static int hf_rtcp_psfb_pli_ms_request_id = -1;
-static int hf_rtcp_psfb_pli_ms_sfr = -1;
+static int hf_rtcp_psfb_pli_ms_request_id;
+static int hf_rtcp_psfb_pli_ms_sfr;
/* Microsoft Video Source Request */
-static int hf_rtcp_psfb_ms_type = -1;
-static int hf_rtcp_psfb_ms_length = -1;
-static int hf_rtcp_psfb_ms_msi = -1;
-static int hf_rtcp_psfb_ms_vsr_request_id = -1;
-static int hf_rtcp_psfb_ms_vsr_version = -1;
-static int hf_rtcp_psfb_ms_vsr_key_frame_request = -1;
-static int hf_rtcp_psfb_ms_vsr_num_entries = -1;
-static int hf_rtcp_psfb_ms_vsr_entry_length = -1;
-static int hf_rtcp_psfb_ms_vsre_payload_type = -1;
-static int hf_rtcp_psfb_ms_vsre_ucconfig_mode = -1;
-static int hf_rtcp_psfb_ms_vsre_no_sp_frames = -1;
-static int hf_rtcp_psfb_ms_vsre_baseline = -1;
-static int hf_rtcp_psfb_ms_vsre_cgs = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_bitmask = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_4by3 = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_16by9 = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_1by1 = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_3by4 = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_9by16 = -1;
-static int hf_rtcp_psfb_ms_vsre_aspect_ratio_20by3 = -1;
-static int hf_rtcp_psfb_ms_vsre_max_width = -1;
-static int hf_rtcp_psfb_ms_vsre_max_height = -1;
-static int hf_rtcp_psfb_ms_vsre_min_bitrate = -1;
-static int hf_rtcp_psfb_ms_vsre_bitrate_per_level = -1;
-static int hf_rtcp_psfb_ms_vsre_bitrate_histogram = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_mask = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_7_5 = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_12_5 = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_15 = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_25 = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_30 = -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_50= -1;
-static int hf_rtcp_psfb_ms_vsre_frame_rate_60 = -1;
-static int hf_rtcp_psfb_ms_vsre_must_instances = -1;
-static int hf_rtcp_psfb_ms_vsre_may_instances = -1;
-static int hf_rtcp_psfb_ms_vsre_quality_histogram = -1;
-static int hf_rtcp_psfb_ms_vsre_max_pixels = -1;
-
-static int hf_rtcp_mcptt_fld_id = -1;
-static int hf_rtcp_mcptt_fld_len = -1;
-static int hf_rtcp_mcptt_fld_val = -1;
-static int hf_rtcp_mcptt_granted_partys_id = -1;
-static int hf_rtcp_app_data_padding = -1;
-static int hf_rtcp_mcptt_priority = -1;
-static int hf_rtcp_mcptt_duration = -1;
-static int hf_rtcp_mcptt_user_id = -1;
-static int hf_rtcp_mcptt_floor_ind = -1;
-static int hf_rtcp_mcptt_rej_cause = -1;
+static int hf_rtcp_psfb_ms_type;
+static int hf_rtcp_psfb_ms_length;
+static int hf_rtcp_psfb_ms_msi;
+static int hf_rtcp_psfb_ms_vsr_request_id;
+static int hf_rtcp_psfb_ms_vsr_version;
+static int hf_rtcp_psfb_ms_vsr_key_frame_request;
+static int hf_rtcp_psfb_ms_vsr_num_entries;
+static int hf_rtcp_psfb_ms_vsr_entry_length;
+static int hf_rtcp_psfb_ms_vsre_payload_type;
+static int hf_rtcp_psfb_ms_vsre_ucconfig_mode;
+static int hf_rtcp_psfb_ms_vsre_no_sp_frames;
+static int hf_rtcp_psfb_ms_vsre_baseline;
+static int hf_rtcp_psfb_ms_vsre_cgs;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_bitmask;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_4by3;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_16by9;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_1by1;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_3by4;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_9by16;
+static int hf_rtcp_psfb_ms_vsre_aspect_ratio_20by3;
+static int hf_rtcp_psfb_ms_vsre_max_width;
+static int hf_rtcp_psfb_ms_vsre_max_height;
+static int hf_rtcp_psfb_ms_vsre_min_bitrate;
+static int hf_rtcp_psfb_ms_vsre_bitrate_per_level;
+static int hf_rtcp_psfb_ms_vsre_bitrate_histogram;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_mask;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_7_5;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_12_5;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_15;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_25;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_30;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_50;
+static int hf_rtcp_psfb_ms_vsre_frame_rate_60;
+static int hf_rtcp_psfb_ms_vsre_must_instances;
+static int hf_rtcp_psfb_ms_vsre_may_instances;
+static int hf_rtcp_psfb_ms_vsre_quality_histogram;
+static int hf_rtcp_psfb_ms_vsre_max_pixels;
+
+static int hf_rtcp_mcptt_fld_id;
+static int hf_rtcp_mcptt_fld_len;
+static int hf_rtcp_mcptt_fld_val;
+static int hf_rtcp_mcptt_granted_partys_id;
+static int hf_rtcp_app_data_padding;
+static int hf_rtcp_mcptt_priority;
+static int hf_rtcp_mcptt_duration;
+static int hf_rtcp_mcptt_user_id;
+static int hf_rtcp_mcptt_floor_ind;
+static int hf_rtcp_mcptt_rej_cause;
static int hf_rtcp_mcptt_rej_cause_floor_deny;
static int hf_rtcp_mcptt_rej_cause_floor_revoke;
-static int hf_rtcp_mcptt_rej_phrase = -1;
-static int hf_rtcp_mcptt_queue_pos_inf = -1;
-static int hf_rtcp_mcptt_queue_pri_lev = -1;
-static int hf_rtcp_mcptt_perm_to_req_floor = -1;
-static int hf_rtcp_mcptt_queue_size = -1;
-static int hf_rtcp_mcptt_msg_seq_num = -1;
-static int hf_rtcp_mcptt_queued_user_id = -1;
-static int hf_rtcp_mcptt_source = -1;
-static int hf_rtcp_mcptt_queueing_cap = -1;
-static int hf_rtcp_mcptt_part_type_len = -1;
-static int hf_rtcp_mcptt_participant_type = -1;
-static int hf_rtcp_mcptt_participant_ref = - 1;
-static int hf_rtcp_mcptt_ssrc = -1;
-static int hf_rtcp_mcptt_num_users = -1;
-static int hf_rtcp_mcptt_user_id_len = -1;
-static int hf_rtcp_spare16 = -1;
-static int hf_rtcp_mcptt_num_ssrc = -1;
-static int hf_rtcp_mcptt_func_alias = -1;
-static int hf_rtcp_mcptt_num_fas = -1;
-static int hf_rtcp_mcptt_fa_len = -1;
-static int hf_rtcp_mcptt_loc_type = -1;
-static int hf_rtcp_mcptt_cellid = -1;
-static int hf_rtcp_mcptt_enodebid = -1;
-static int hf_rtcp_mcptt_ecgi_eci = -1;
-static int hf_rtcp_mcptt_tac = -1;
-static int hf_rtcp_mcptt_mbms_serv_area = -1;
-static int hf_rtcp_mcptt_mbsfn_area_id = -1;
-static int hf_rtcp_mcptt_lat = -1;
-static int hf_rtcp_mcptt_long = -1;
-static int hf_rtcp_mcptt_msg_type = -1;
-static int hf_rtcp_mcptt_num_loc = -1;
-static int hf_rtcp_mcptt_str = -1;
-static int hf_rtcp_mccp_len = -1;
-static int hf_rtcp_mccp_field_id = -1;
-static int hf_rtcp_mcptt_group_id = -1;
-static int hf_rtcp_mccp_audio_m_line_no = -1;
-static int hf_rtcp_mccp_floor_m_line_no = -1;
-static int hf_rtcp_mccp_ip_version = -1;
-static int hf_rtcp_mccp_floor_port_no = -1;
-static int hf_rtcp_mccp_media_port_no = -1;
-static int hf_rtcp_mccp_ipv4 = -1;
-static int hf_rtcp_mccp_ipv6 = -1;
-static int hf_rtcp_mccp_tmgi = -1;
-static int hf_rtcp_encrypted = -1;
+static int hf_rtcp_mcptt_rej_phrase;
+static int hf_rtcp_mcptt_queue_pos_inf;
+static int hf_rtcp_mcptt_queue_pri_lev;
+static int hf_rtcp_mcptt_perm_to_req_floor;
+static int hf_rtcp_mcptt_queue_size;
+static int hf_rtcp_mcptt_msg_seq_num;
+static int hf_rtcp_mcptt_queued_user_id;
+static int hf_rtcp_mcptt_source;
+static int hf_rtcp_mcptt_queueing_cap;
+static int hf_rtcp_mcptt_part_type_len;
+static int hf_rtcp_mcptt_participant_type;
+static int hf_rtcp_mcptt_participant_ref;
+static int hf_rtcp_mcptt_ssrc;
+static int hf_rtcp_mcptt_num_users;
+static int hf_rtcp_mcptt_user_id_len;
+static int hf_rtcp_spare16;
+static int hf_rtcp_mcptt_num_ssrc;
+static int hf_rtcp_mcptt_func_alias;
+static int hf_rtcp_mcptt_num_fas;
+static int hf_rtcp_mcptt_fa_len;
+static int hf_rtcp_mcptt_loc_type;
+static int hf_rtcp_mcptt_cellid;
+static int hf_rtcp_mcptt_enodebid;
+static int hf_rtcp_mcptt_ecgi_eci;
+static int hf_rtcp_mcptt_tac;
+static int hf_rtcp_mcptt_mbms_serv_area;
+static int hf_rtcp_mcptt_mbsfn_area_id;
+static int hf_rtcp_mcptt_lat;
+static int hf_rtcp_mcptt_long;
+static int hf_rtcp_mcptt_msg_type;
+static int hf_rtcp_mcptt_num_loc;
+static int hf_rtcp_mcptt_str;
+static int hf_rtcp_mccp_len;
+static int hf_rtcp_mccp_field_id;
+static int hf_rtcp_mcptt_group_id;
+static int hf_rtcp_mccp_audio_m_line_no;
+static int hf_rtcp_mccp_floor_m_line_no;
+static int hf_rtcp_mccp_ip_version;
+static int hf_rtcp_mccp_floor_port_no;
+static int hf_rtcp_mccp_media_port_no;
+static int hf_rtcp_mccp_ipv4;
+static int hf_rtcp_mccp_ipv6;
+static int hf_rtcp_mccp_tmgi;
+static int hf_rtcp_encrypted;
/* RTCP fields defining a sub tree */
-static gint ett_rtcp = -1;
-static gint ett_rtcp_sr = -1;
-static gint ett_rtcp_rr = -1;
-static gint ett_rtcp_sdes = -1;
-static gint ett_rtcp_bye = -1;
-static gint ett_rtcp_app = -1;
-static gint ett_rtcp_rtpfb = -1;
-static gint ett_rtcp_psfb = -1;
-static gint ett_rtcp_xr = -1;
-static gint ett_rtcp_fir = -1;
-static gint ett_rtcp_nack = -1;
-static gint ett_ssrc = -1;
-static gint ett_ssrc_item = -1;
-static gint ett_ssrc_ext_high = -1;
-static gint ett_sdes = -1;
-static gint ett_sdes_item = -1;
-static gint ett_PoC1 = -1;
-static gint ett_mux = -1;
-static gint ett_rtcp_setup = -1;
-static gint ett_rtcp_roundtrip_delay = -1;
-static gint ett_xr_block = -1;
-static gint ett_xr_block_contents = -1;
-static gint ett_xr_ssrc = -1;
-static gint ett_xr_loss_chunk = -1;
-static gint ett_poc1_conn_contents = -1;
-static gint ett_rtcp_nack_blp = -1;
-static gint ett_pse = -1;
-static gint ett_ms_vsr = -1;
-static gint ett_ms_vsr_entry = -1;
-static gint ett_ms_ds = -1;
-static gint ett_rtcp_mcpt = -1;
-static gint ett_rtcp_mcptt_participant_ref = -1;
-static gint ett_rtcp_mcptt_eci = -1;
-static gint ett_rtcp_mccp_tmgi = -1;
-
-static expert_field ei_rtcp_not_final_padding = EI_INIT;
-static expert_field ei_rtcp_bye_reason_not_padded = EI_INIT;
-static expert_field ei_rtcp_xr_block_length_bad = EI_INIT;
-static expert_field ei_rtcp_roundtrip_delay = EI_INIT;
-static expert_field ei_rtcp_length_check = EI_INIT;
-static expert_field ei_rtcp_roundtrip_delay_negative = EI_INIT;
-static expert_field ei_rtcp_psfb_ms_type = EI_INIT;
-static expert_field ei_rtcp_missing_sender_ssrc = EI_INIT;
-static expert_field ei_rtcp_missing_block_header = EI_INIT;
-static expert_field ei_rtcp_block_length = EI_INIT;
-static expert_field ei_srtcp_encrypted_payload = EI_INIT;
-static expert_field ei_rtcp_rtpfb_transportcc_bad = EI_INIT;
-static expert_field ei_rtcp_mcptt_unknown_fld = EI_INIT;
-static expert_field ei_rtcp_mcptt_location_type = EI_INIT;
-static expert_field ei_rtcp_appl_extra_bytes = EI_INIT;
-static expert_field ei_rtcp_appl_not_ascii = EI_INIT;
-static expert_field ei_rtcp_appl_non_conformant = EI_INIT;
-static expert_field ei_rtcp_appl_non_zero_pad = EI_INIT;
+static int ett_rtcp;
+static int ett_rtcp_sr;
+static int ett_rtcp_rr;
+static int ett_rtcp_sdes;
+static int ett_rtcp_bye;
+static int ett_rtcp_app;
+static int ett_rtcp_rtpfb;
+static int ett_rtcp_rtpfb_ccfb_fci;
+static int ett_rtcp_rtpfb_ccfb_media_source;
+static int ett_rtcp_rtpfb_ccfb_metric_blocks;
+static int ett_rtcp_rtpfb_ccfb_metric_block;
+static int ett_rtcp_psfb;
+static int ett_rtcp_xr;
+static int ett_rtcp_fir;
+static int ett_rtcp_nack;
+static int ett_ssrc;
+static int ett_ssrc_item;
+static int ett_ssrc_ext_high;
+static int ett_sdes;
+static int ett_sdes_item;
+static int ett_PoC1;
+static int ett_mux;
+static int ett_rtcp_setup;
+static int ett_rtcp_roundtrip_delay;
+static int ett_xr_block;
+static int ett_xr_block_contents;
+static int ett_xr_ssrc;
+static int ett_xr_loss_chunk;
+static int ett_poc1_conn_contents;
+static int ett_rtcp_nack_blp;
+static int ett_pse;
+static int ett_ms_vsr;
+static int ett_ms_vsr_entry;
+static int ett_ms_ds;
+static int ett_rtcp_mcpt;
+static int ett_rtcp_mcptt_participant_ref;
+static int ett_rtcp_mcptt_eci;
+static int ett_rtcp_mccp_tmgi;
+
+static expert_field ei_rtcp_not_final_padding;
+static expert_field ei_rtcp_bye_reason_not_padded;
+static expert_field ei_rtcp_xr_block_length_bad;
+static expert_field ei_rtcp_roundtrip_delay;
+static expert_field ei_rtcp_length_check;
+static expert_field ei_rtcp_roundtrip_delay_negative;
+static expert_field ei_rtcp_psfb_ms_type;
+static expert_field ei_rtcp_missing_sender_ssrc;
+static expert_field ei_rtcp_missing_block_header;
+static expert_field ei_rtcp_block_length;
+static expert_field ei_srtcp_encrypted_payload;
+static expert_field ei_rtcp_rtpfb_transportcc_bad;
+static expert_field ei_rtcp_rtpfb_fmt_not_implemented;
+static expert_field ei_rtcp_rtpfb_ccfb_too_many_reports;
+static expert_field ei_rtcp_mcptt_unknown_fld;
+static expert_field ei_rtcp_mcptt_location_type;
+static expert_field ei_rtcp_appl_extra_bytes;
+static expert_field ei_rtcp_appl_not_ascii;
+static expert_field ei_rtcp_appl_non_conformant;
+static expert_field ei_rtcp_appl_non_zero_pad;
enum default_protocol_type {
RTCP_PROTO_RTCP,
@@ -883,27 +936,27 @@ static const enum_val_t rtcp_default_protocol_vals[] = {
{NULL, NULL, -1}
};
-static gint global_rtcp_default_protocol = RTCP_PROTO_RTCP;
+static int global_rtcp_default_protocol = RTCP_PROTO_RTCP;
/* Main dissection function */
static int dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
static int dissect_srtcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data);
/* Displaying set info */
-static gboolean global_rtcp_show_setup_info = TRUE;
+static bool global_rtcp_show_setup_info = true;
static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Related to roundtrip calculation (using LSR and DLSR) */
-static gboolean global_rtcp_show_roundtrip_calculation = FALSE;
+static bool global_rtcp_show_roundtrip_calculation;
#define MIN_ROUNDTRIP_TO_REPORT_DEFAULT 10
-static guint global_rtcp_show_roundtrip_calculation_minimum = MIN_ROUNDTRIP_TO_REPORT_DEFAULT;
-static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr);
+static unsigned global_rtcp_show_roundtrip_calculation_minimum = MIN_ROUNDTRIP_TO_REPORT_DEFAULT;
+static void remember_outgoing_sr(packet_info *pinfo, uint32_t lsr);
static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, guint32 lsr, guint32 dlsr);
+ proto_tree *tree, uint32_t lsr, uint32_t dlsr);
static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree,
- guint frame,
- guint gap_between_reports, gint delay);
+ unsigned frame,
+ unsigned gap_between_reports, int delay);
enum application_specific_encoding_type {
RTCP_APP_NONE,
@@ -916,14 +969,14 @@ static const enum_val_t rtcp_application_specific_encoding_vals[] = {
{NULL, NULL, -1}
};
-static gint preferences_application_specific_encoding = RTCP_APP_NONE;
+static int preferences_application_specific_encoding = RTCP_APP_NONE;
/* Set up an RTCP conversation using the info given */
void srtcp_add_address( packet_info *pinfo,
address *addr, int port,
int other_port,
- const gchar *setup_method, guint32 setup_frame_number,
+ const char *setup_method, uint32_t setup_frame_number,
struct srtp_info *srtcp_info)
{
address null_addr;
@@ -954,7 +1007,7 @@ void srtcp_add_address( packet_info *pinfo,
*/
if ( ! p_conv ) {
p_conv = conversation_new( setup_frame_number, addr, &null_addr, CONVERSATION_UDP,
- (guint32)port, (guint32)other_port,
+ (uint32_t)port, (uint32_t)other_port,
NO_ADDR2 | (!other_port ? NO_PORT2 : 0));
}
@@ -978,7 +1031,7 @@ void srtcp_add_address( packet_info *pinfo,
/*
* Update the conversation data.
*/
- p_conv_data->setup_method_set = TRUE;
+ p_conv_data->setup_method_set = true;
(void) g_strlcpy(p_conv_data->setup_method, setup_method, MAX_RTCP_SETUP_METHOD_SIZE);
p_conv_data->setup_frame_number = setup_frame_number;
p_conv_data->srtcp_info = srtcp_info;
@@ -988,32 +1041,32 @@ void srtcp_add_address( packet_info *pinfo,
void rtcp_add_address( packet_info *pinfo,
address *addr, int port,
int other_port,
- const gchar *setup_method, guint32 setup_frame_number)
+ const char *setup_method, uint32_t setup_frame_number)
{
srtcp_add_address(pinfo, addr, port, other_port, setup_method, setup_frame_number, NULL);
}
-static gboolean
-dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ )
+static bool
+dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data )
{
unsigned int offset = 0;
unsigned int first_byte;
unsigned int packet_type;
if (tvb_captured_length(tvb) < 2)
- return FALSE;
+ return false;
/* Look at first byte */
- first_byte = tvb_get_guint8(tvb, offset);
+ first_byte = tvb_get_uint8(tvb, offset);
/* Are version bits set to 2? */
if (((first_byte & 0xC0) >> 6) != 2)
{
- return FALSE;
+ return false;
}
/* Look at packet type */
- packet_type = tvb_get_guint8(tvb, offset + 1);
+ packet_type = tvb_get_uint8(tvb, offset + 1);
/* First packet within compound packet is supposed to be a sender
or receiver report. (However, see RFC 5506 which allows the
@@ -1025,13 +1078,13 @@ dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
(packet_type == RTCP_BYE) || (packet_type == RTCP_APP) ||
(packet_type == RTCP_PSFB)))
{
- return FALSE;
+ return false;
}
/* Overall length must be a multiple of 4 bytes */
if (tvb_reported_length(tvb) % 4)
{
- return FALSE;
+ return false;
}
/* OK, dissect as RTCP */
@@ -1048,7 +1101,7 @@ dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
dissect_srtcp(tvb, pinfo, tree, data);
}
- return TRUE;
+ return true;
}
/* Dissect the length field. Append to this field text indicating the number of
@@ -1064,6 +1117,25 @@ static int dissect_rtcp_length_field( proto_tree *tree, tvbuff_t *tvb, int offse
return offset;
}
+static int
+dissect_rtcp_rtpfb_header(tvbuff_t *tvb, int offset, proto_tree *rtcp_tree)
+{
+ /* Feedback message type, 8 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_rtpfb_fmt, tvb, offset, 1, ENC_BIG_ENDIAN );
+ offset++;
+
+ /* Packet type, 8 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_pt, tvb, offset, 1, ENC_BIG_ENDIAN );
+ offset++;
+
+ offset = dissect_rtcp_length_field(rtcp_tree, tvb, offset);
+
+ /* SSRC of packet sender, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ return offset;
+}
static int
dissect_rtcp_nack( tvbuff_t *tvb, int offset, proto_tree *tree )
@@ -1094,13 +1166,13 @@ dissect_rtcp_nack( tvbuff_t *tvb, int offset, proto_tree *tree )
}
static int
-dissect_rtcp_rtpfb_tmmbr( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item, int num_fci, int is_notification)
+dissect_rtcp_rtpfb_tmmbr_tmmbn_fci( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item, int num_fci, bool is_notification)
{
- guint8 exp;
- guint32 mantissa;
+ uint8_t exp;
+ uint32_t mantissa;
proto_tree *fci_tree;
- if (is_notification == 1) {
+ if (is_notification) {
fci_tree = proto_tree_add_subtree_format( rtcp_tree, tvb, offset, 8, ett_ssrc, NULL, "TMMBN %d", num_fci );
} else {
fci_tree = proto_tree_add_subtree_format( rtcp_tree, tvb, offset, 8, ett_ssrc, NULL, "TMMBR %d", num_fci );
@@ -1111,7 +1183,7 @@ dissect_rtcp_rtpfb_tmmbr( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, prot
offset += 4;
/* Exp 6 bit*/
proto_tree_add_item( fci_tree, hf_rtcp_rtpfb_tmbbr_fci_exp, tvb, offset, 1, ENC_BIG_ENDIAN );
- exp = (tvb_get_guint8(tvb, offset) & 0xfc) >> 2;
+ exp = (tvb_get_uint8(tvb, offset) & 0xfc) >> 2;
/* Mantissa 17 bit*/
proto_tree_add_item( fci_tree, hf_rtcp_rtpfb_tmbbr_fci_mantissa, tvb, offset, 3, ENC_BIG_ENDIAN );
mantissa = (tvb_get_ntohl( tvb, offset) & 0x3fffe00) >> 9;
@@ -1122,23 +1194,172 @@ dissect_rtcp_rtpfb_tmmbr( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, prot
offset += 1;
if (top_item != NULL) {
- proto_item_append_text(top_item, ": TMMBR: %u*2^%u", mantissa, exp);
- }
+ if (is_notification == 1) {
+ proto_item_append_text(top_item, ": TMMBN: %u*2^%u", mantissa, exp);
+ } else {
+ proto_item_append_text(top_item, ": TMMBR: %u*2^%u", mantissa, exp);
+ }
+ }
return offset;
}
+static int
+dissect_rtcp_rtpfb_tmmbr( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *rtcp_tree, void *data _U_)
+{
+ int offset = 0;
+ proto_item *top_item = proto_tree_get_parent(rtcp_tree);
+
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
+
+ offset = dissect_rtcp_rtpfb_header(tvb, offset, rtcp_tree);
+
+ /* SSRC of media source, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ /* Feedback Control Information */
+ uint32_t num_fci = 0;
+ while (offset < packet_len)
+ {
+ num_fci++;
+ offset = dissect_rtcp_rtpfb_tmmbr_tmmbn_fci( tvb, offset, rtcp_tree, top_item, num_fci, false);
+ }
+
+ return offset;
+}
+
+static int
+dissect_rtcp_rtpfb_tmmbn( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *rtcp_tree, void *data _U_)
+{
+ int offset = 0;
+ proto_item *top_item = proto_tree_get_parent(rtcp_tree);
+
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
+
+ offset = dissect_rtcp_rtpfb_header(tvb, offset, rtcp_tree);
+
+ /* SSRC of media source, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ /* Feedback Control Information */
+ uint32_t num_fci = 0;
+ while (offset < packet_len)
+ {
+ num_fci++;
+ offset = dissect_rtcp_rtpfb_tmmbr_tmmbn_fci( tvb, offset, rtcp_tree, top_item, num_fci, true);
+ }
+
+ return offset;
+}
+
+static int
+dissect_rtcp_rtpfb_ccfb_fci( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *fci_tree, int packet_len)
+{
+ proto_tree *media_source_ssrc_tree;
+ proto_item *metric_blocks_item;
+ proto_tree *metric_blocks_tree;
+ proto_item *metric_block_tree;
+ proto_item *ato_item;
+
+ /* SSRC of media source, 32 bits */
+ const uint32_t media_source_ssrc = tvb_get_uint32( tvb, offset, 4);
+ media_source_ssrc_tree =
+ proto_tree_add_subtree_format( fci_tree, tvb, 0, 0, ett_rtcp_rtpfb_ccfb_media_source, NULL,
+ "Media Source Stream: 0x%"PRIx32 " (%"PRIu32 ")", media_source_ssrc, media_source_ssrc);
+
+ proto_tree_add_item( media_source_ssrc_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ proto_tree_add_item( media_source_ssrc_tree, hf_rtcp_rtpfb_ccfb_beginseq, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ const uint16_t num_of_reported_pkts = tvb_get_uint16( tvb, offset, ENC_BIG_ENDIAN) + 1;
+ proto_tree_add_uint_format( media_source_ssrc_tree, hf_rtcp_rtpfb_ccfb_numreports, tvb, offset, 2,
+ num_of_reported_pkts, "Number of metric blocks: %" PRIu16, num_of_reported_pkts);
+
+ metric_blocks_tree = proto_tree_add_subtree(media_source_ssrc_tree, tvb, 0, 0, ett_rtcp_rtpfb_ccfb_metric_blocks,
+ &metric_blocks_item, "Metric Blocks");
+ proto_item_set_generated( metric_blocks_item);
+
+ if (num_of_reported_pkts > 16384)
+ {
+ expert_add_info(pinfo, metric_blocks_tree, &ei_rtcp_rtpfb_ccfb_too_many_reports);
+ return packet_len;
+ }
+
+ for (int i = 0; i < num_of_reported_pkts; i++)
+ {
+ offset += 2;
+
+ const uint16_t metric_block = tvb_get_uint16( tvb, offset, ENC_BIG_ENDIAN);
+ const uint16_t received = RTCP_CCFB_RECEIVED(metric_block);
+ const uint16_t ecn = RTCP_CCFB_ECN(metric_block);
+ float ato = RTCP_CCFB_ATO(metric_block);
+ float ato_ms = ato / 1024 * 1000;
+
+ metric_block_tree =
+ proto_tree_add_subtree_format( metric_blocks_tree, tvb, 0, 0, ett_rtcp_rtpfb_ccfb_metric_block, NULL,
+ "Metric Block (R:%"PRIu32", ECN:%"PRIu32", ATO:%f ms)", received, ecn, ato_ms);
+ proto_tree_add_item( metric_block_tree, hf_rtcp_rtpfb_ccfb_received, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item( metric_block_tree, hf_rtcp_rtpfb_ccfb_ecn, tvb, offset, 2, ENC_BIG_ENDIAN);
+
+ ato_item = proto_tree_add_item( metric_block_tree, hf_rtcp_rtpfb_ccfb_ato, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_item_append_text(ato_item, " (%f ms)", ato_ms);
+ }
+
+ offset += 2;
+ if (num_of_reported_pkts % 2 == 1)
+ {
+ proto_tree_add_item( metric_blocks_tree, hf_rtcp_rtpfb_ccfb_padding, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
+
+ return offset;
+}
+
+static int
+dissect_rtcp_rtpfb_ccfb( tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtcp_tree, void *data _U_)
+{
+ int offset = 0;
+ proto_tree *fci_tree;
+ proto_item *fci_item;
+
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
+
+ offset = dissect_rtcp_rtpfb_header( tvb, offset, rtcp_tree);
+
+ fci_tree = proto_tree_add_subtree( rtcp_tree, tvb, 0, 0, ett_rtcp_rtpfb_ccfb_fci,
+ &fci_item, "Feedback Control Information (FCI)");
+ proto_item_set_generated( fci_item);
+
+ /* We can have multiple SSRC streams for which we are sending feedback (for which
+ * RTP packets have been received). Every iteration in while loop will dissect info
+ * for one source SSRC stream. Last 4 bytes are reserved for timestamp field.
+ */
+ while (offset < packet_len - 4)
+ {
+ offset = dissect_rtcp_rtpfb_ccfb_fci( tvb, offset, pinfo, fci_tree, packet_len);
+ }
+
+ proto_tree_add_item( rtcp_tree, hf_rtcp_rtpfb_ccfb_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+
+ return offset;
+}
+
/* Dissect Application Specific Feedback messages */
static int
dissect_rtcp_asfb_ms( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo)
{
- guint8 num_entries;
- guint8 desc = 0;
- guint16 type;
- guint16 length;
- guint8 i;
- guint32 msi;
- guint32 min_bitrate, bitrate_per_level;
+ uint8_t num_entries;
+ uint8_t desc = 0;
+ uint16_t type;
+ uint16_t length;
+ uint8_t i;
+ uint32_t msi;
+ uint32_t min_bitrate, bitrate_per_level;
proto_tree *rtcp_ms_vsr_tree;
proto_tree *rtcp_ms_vsr_entry_tree;
proto_tree *rtcp_ms_ds_tree;
@@ -1156,7 +1377,7 @@ dissect_rtcp_asfb_ms( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *
{
rtcp_ms_vsr_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_ms_vsr, &item, "MS Video Source Request");
- col_append_fstr(pinfo->cinfo, COL_INFO,"( MS-VSR )");
+ col_append_str(pinfo->cinfo, COL_INFO, "( MS-VSR )");
item = proto_tree_add_item( rtcp_ms_vsr_tree, hf_rtcp_psfb_ms_msi, tvb, offset, 4, ENC_BIG_ENDIAN );
msi = tvb_get_ntohl (tvb, offset);
@@ -1172,7 +1393,7 @@ dissect_rtcp_asfb_ms( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *
offset++;
proto_tree_add_item( rtcp_ms_vsr_tree, hf_rtcp_psfb_ms_vsr_key_frame_request, tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
- num_entries = tvb_get_guint8(tvb, offset);
+ num_entries = tvb_get_uint8(tvb, offset);
proto_tree_add_item( rtcp_ms_vsr_tree, hf_rtcp_psfb_ms_vsr_num_entries, tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
proto_tree_add_item( rtcp_ms_vsr_tree, hf_rtcp_psfb_ms_vsr_entry_length, tvb, offset, 1, ENC_BIG_ENDIAN );
@@ -1249,7 +1470,7 @@ dissect_rtcp_asfb_ms( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *
{
/* MS Dominant Speaker History */
rtcp_ms_ds_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_ms_ds, NULL, "MS Dominant Speaker History");
- col_append_fstr(pinfo->cinfo, COL_INFO,"( MS-DSH )");
+ col_append_str(pinfo->cinfo, COL_INFO, "( MS-DSH )");
while (length-- && tvb_captured_length_remaining (tvb, offset) >= 4)
{
item = proto_tree_add_item( rtcp_ms_ds_tree, hf_rtcp_psfb_ms_msi, tvb, offset, 4, ENC_BIG_ENDIAN );
@@ -1270,9 +1491,9 @@ dissect_rtcp_asfb_ms( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *
static int
dissect_rtcp_psfb_remb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item, int num_fci, int *read_fci)
{
- guint exp, indexSsrcs;
- guint8 numberSsrcs;
- guint64 mantissa, bitrate;
+ unsigned exp, indexSsrcs;
+ uint8_t numberSsrcs;
+ uint64_t mantissa, bitrate;
proto_tree *fci_tree;
fci_tree = proto_tree_add_subtree_format( rtcp_tree, tvb, offset, 8, ett_ssrc, NULL, "REMB %d", num_fci );
@@ -1283,12 +1504,12 @@ dissect_rtcp_psfb_remb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_
/* Number of ssrcs - they will each be parsed below */
proto_tree_add_item( fci_tree, hf_rtcp_psfb_remb_fci_number_ssrcs, tvb, offset, 1, ENC_BIG_ENDIAN );
- numberSsrcs = tvb_get_guint8( tvb, offset);
+ numberSsrcs = tvb_get_uint8( tvb, offset);
offset += 1;
/* Exp 6 bit*/
proto_tree_add_item( fci_tree, hf_rtcp_psfb_remb_fci_exp, tvb, offset, 1, ENC_BIG_ENDIAN );
- exp = (tvb_get_guint8(tvb, offset) & 0xfc) ;
+ exp = (tvb_get_uint8(tvb, offset) & 0xfc) ;
exp = exp >> 2;
/* Mantissa 18 bit*/
@@ -1313,17 +1534,15 @@ dissect_rtcp_psfb_remb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_
return offset;
}
-#define RTCP_HEADER_LENGTH 12
-
static int
-dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *rtcp_tree, guint *padding_set, int pkt_len)
+dissect_rtcp_rtpfb_transport_cc_fci( tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *rtcp_tree, int pkt_len)
{
proto_tree *fci_tree, *pkt_chunk_tree, *recv_delta_tree;
proto_item *item = NULL;
- guint8 *delta_array;
- guint16 *pkt_seq_array;
- guint32 i, pkt_base_seq, pkt_seq_num, pkt_count, delta_index = 0;
- gint fci_length = pkt_len - RTCP_HEADER_LENGTH;
+ uint8_t *delta_array;
+ uint16_t *pkt_seq_array;
+ uint32_t i, pkt_base_seq, pkt_seq_num, pkt_count, delta_index = 0;
+ int fci_length = pkt_len - RTCP_TRANSPORT_CC_HEADER_LENGTH;
int padding_length = offset;
fci_tree = proto_tree_add_subtree_format( rtcp_tree, tvb, offset, fci_length, ett_ssrc, NULL, "Transport-cc" );
@@ -1337,8 +1556,8 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item_ret_uint( fci_tree, hf_rtcp_rtpfb_transport_cc_fci_pkt_stats_cnt, tvb, offset, 2, ENC_BIG_ENDIAN, &pkt_count );
offset += 2;
- delta_array = wmem_alloc0_array( pinfo->pool, gint8, pkt_count );
- pkt_seq_array = wmem_alloc0_array( pinfo->pool, gint16, pkt_count );
+ delta_array = wmem_alloc0_array( pinfo->pool, int8_t, pkt_count );
+ pkt_seq_array = wmem_alloc0_array( pinfo->pool, int16_t, pkt_count );
/* reference time */
proto_tree_add_item( fci_tree, hf_rtcp_rtpfb_transport_cc_fci_ref_time, tvb, offset, 3, ENC_BIG_ENDIAN );
@@ -1353,7 +1572,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
for (i = 0; i < pkt_count; )
{
- guint32 chunk = 0;
+ uint32_t chunk = 0;
item = proto_tree_add_item_ret_uint( pkt_chunk_tree, hf_rtcp_rtpfb_transport_cc_fci_pkt_chunk, tvb, offset, 2, ENC_BIG_ENDIAN, &chunk );
/* Packet Status Symbols */
@@ -1366,7 +1585,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
if ( !(chunk & 0x8000) )
{
/* Run length chunk, first bit is zero */
- guint length = chunk & 0x1FFF;
+ unsigned length = chunk & 0x1FFF;
if ( length <= 0 || pkt_count - delta_index < length )
{
@@ -1384,7 +1603,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
else if ( chunk & 0x2000 )
{
proto_item_append_text( item, " [Run Length Chunk] Small Delta. Length : %d", length);
- for (guint j = 0; j < length; j++)
+ for (unsigned j = 0; j < length; j++)
{
/*1 means 1 byte delta, 2 means 2 bytes delta*/
delta_array[delta_index+j] = 1;
@@ -1395,7 +1614,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
else if ( chunk & 0x4000 )
{
proto_item_append_text( item, " [Run Length Chunk] Large or Negative Delta. Length : %d", length);
- for (guint j = 0; j < length; j++)
+ for (unsigned j = 0; j < length; j++)
{
delta_array[delta_index+j] = 2;
pkt_seq_array[delta_index+j] = pkt_seq_num++;
@@ -1530,7 +1749,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
if ( delta_array[i] == 1 )
{
/*1 byte delta*/
- guint32 delta;
+ uint32_t delta;
item = proto_tree_add_item_ret_uint( recv_delta_tree, hf_rtcp_rtpfb_transport_cc_fci_recv_delta_1_byte, tvb, offset, 1, ENC_BIG_ENDIAN, &delta );
proto_item_append_text( item, " Small Delta: [seq: %d] %lf ms", pkt_seq_array[i], delta*250.0/1000);
@@ -1540,7 +1759,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
else if ( delta_array[i] == 2 )
{
/*2 bytes delta*/
- gint16 delta;
+ int16_t delta;
item = proto_tree_add_item( recv_delta_tree, hf_rtcp_rtpfb_transport_cc_fci_recv_delta_2_bytes, tvb, offset, 2, ENC_BIG_ENDIAN);
delta = tvb_get_ntohs(tvb, offset);
@@ -1568,7 +1787,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
{
proto_tree_add_item( recv_delta_tree, hf_rtcp_rtpfb_transport_cc_fci_recv_delta_padding, tvb, offset, padding_length, ENC_BIG_ENDIAN );
offset += padding_length;
- *padding_set = 0; /* consume RTCP padding here */
+ rtcp_padding_set = 0; /* consume RTCP padding here */
}
/* delta_array / pkt_seq_array will be freed out of pinfo->pool */
@@ -1579,7 +1798,28 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_rtcp_rtpfb_nack( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item)
+dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtcp_tree, void *data _U_)
+{
+ int offset = 0;
+
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
+
+ offset = dissect_rtcp_rtpfb_header( tvb, offset, rtcp_tree);
+
+ /* SSRC of media source, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ while (offset < packet_len)
+ {
+ offset = dissect_rtcp_rtpfb_transport_cc_fci( tvb, offset, pinfo, rtcp_tree, packet_len);
+ }
+
+ return offset;
+}
+
+static int
+dissect_rtcp_rtpfb_nack_fci( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item)
{
int i;
int nack_num_frames_lost;
@@ -1618,70 +1858,79 @@ dissect_rtcp_rtpfb_nack( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto
return offset;
}
-
static int
-dissect_rtcp_rtpfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item *top_item, guint *padding_set, packet_info *pinfo )
+dissect_rtcp_rtpfb_nack( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *rtcp_tree, void *data _U_)
{
- unsigned int counter;
- unsigned int rtcp_rtpfb_fmt;
- int packet_length;
- int start_offset = offset;
-
- /* Transport layer FB message */
- /* Feedback message type (FMT): 5 bits */
- proto_tree_add_item( rtcp_tree, hf_rtcp_rtpfb_fmt, tvb, offset, 1, ENC_BIG_ENDIAN );
- rtcp_rtpfb_fmt = (tvb_get_guint8(tvb, offset) & 0x1f);
- offset++;
+ int offset = 0;
+ proto_item *top_item = proto_tree_get_parent(rtcp_tree);
- /* Packet type, 8 bits */
- proto_tree_add_item( rtcp_tree, hf_rtcp_pt, tvb, offset, 1, ENC_BIG_ENDIAN );
- offset++;
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
- /* Packet length in 32 bit words MINUS one, 16 bits */
- packet_length = (tvb_get_ntohs(tvb, offset) + 1) * 4;
- offset = dissect_rtcp_length_field(rtcp_tree, tvb, offset);
+ offset = dissect_rtcp_rtpfb_header( tvb, offset, rtcp_tree);
- /* SSRC of packet sender, 32 bits */
- proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN );
+ /* SSRC of media source, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
offset += 4;
+ while (offset < packet_len)
+ {
+ offset = dissect_rtcp_rtpfb_nack_fci( tvb, offset, rtcp_tree, top_item);
+ }
+
+ return offset;
+}
+
+static int
+dissect_rtcp_rtpfb_undecoded( tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtcp_tree, void *data _U_)
+{
+ int offset = 0;
+ int packet_len = tvb_get_uint16( tvb, offset + 2, ENC_BIG_ENDIAN);
+
+ offset = dissect_rtcp_rtpfb_header( tvb, offset, rtcp_tree);
+
/* SSRC of media source, 32 bits */
proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
offset += 4;
- /* Check if we have a type specific dissector,
- * if we do, just return from here
- */
- if (packet_length > 12) {
- tvbuff_t *subtvb = tvb_new_subset_length(tvb, offset, packet_length - 12);
+ proto_item *ti = proto_tree_add_item(rtcp_tree, hf_rtcp_fci, tvb, offset, packet_len - offset, ENC_NA );
+ expert_add_info(pinfo, ti, &ei_rtcp_rtpfb_fmt_not_implemented);
- if (dissector_try_uint (rtcp_rtpfb_dissector_table, rtcp_rtpfb_fmt,
- subtvb, pinfo, rtcp_tree))
- return start_offset + packet_length;
- }
+ return packet_len;
+}
+
+static int
+dissect_rtcp_rtpfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, packet_info *pinfo)
+{
+ unsigned int rtcp_rtpfb_fmt;
+ int packet_length;
+
+ /* Transport layer FB message */
+ /* Feedback message type (FMT): 5 bits */
+ rtcp_rtpfb_fmt = (tvb_get_uint8(tvb, offset) & 0x1f);
+
+ /* Packet length in 32 bit words MINUS one, 16 bits */
+ packet_length = (tvb_get_ntohs(tvb, offset + 2) + 1) * 4;
- /* Transport-Layer Feedback Message Elements */
- counter = 0;
- while ((offset - start_offset) < packet_length) {
- counter++;
- if (rtcp_rtpfb_fmt == 1) {
- offset = dissect_rtcp_rtpfb_nack(tvb, offset, rtcp_tree, top_item);
- } else if (rtcp_rtpfb_fmt == 3) {
- offset = dissect_rtcp_rtpfb_tmmbr(tvb, offset, rtcp_tree, top_item, counter, 0);
- } else if (rtcp_rtpfb_fmt == 4) {
- offset = dissect_rtcp_rtpfb_tmmbr(tvb, offset, rtcp_tree, top_item, counter, 1);
- } else if (rtcp_rtpfb_fmt == 15) {
- /* Handle transport-cc (RTP Extensions for Transport-wide Congestion Control) - https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01 */
- offset = dissect_rtcp_rtpfb_transport_cc( tvb, offset, pinfo, rtcp_tree, padding_set, packet_length);
- } else {
- /* Unknown FMT */
- proto_tree_add_item(rtcp_tree, hf_rtcp_fci, tvb, offset, start_offset + packet_length - offset, ENC_NA );
- offset = start_offset + packet_length;
- }
+ tvbuff_t *subtvb = tvb_new_subset_length(tvb, offset, packet_length);
+ if (dissector_try_uint (rtcp_rtpfb_dissector_table, rtcp_rtpfb_fmt, subtvb, pinfo, rtcp_tree))
+ {
+ return offset + packet_length;
}
+ else /* RTPFB FMT types that are still unassigned by IANA */
+ {
+ int start_offset = offset;
- return offset;
+ offset = dissect_rtcp_rtpfb_header( tvb, offset, rtcp_tree);
+
+ /* SSRC of media source, 32 bits */
+ proto_tree_add_item( rtcp_tree, hf_rtcp_ssrc_media_source, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ proto_tree_add_item(rtcp_tree, hf_rtcp_fci, tvb, offset, start_offset + packet_length - offset, ENC_NA );
+ return offset + packet_length;
+ }
}
+
static int
dissect_rtcp_psfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree,
int packet_length, proto_item *top_item _U_, packet_info *pinfo _U_)
@@ -1698,7 +1947,7 @@ dissect_rtcp_psfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree,
/* Payload-specific FB message */
/* Feedback message type (FMT): 5 bits */
proto_tree_add_item( rtcp_tree, hf_rtcp_psfb_fmt, tvb, offset, 1, ENC_BIG_ENDIAN );
- rtcp_psfb_fmt = (tvb_get_guint8(tvb, offset) & 0x1f);
+ rtcp_psfb_fmt = (tvb_get_uint8(tvb, offset) & 0x1f);
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
val_to_str_const(rtcp_psfb_fmt, rtcp_psfb_fmt_summary_vals, "Unknown"));
@@ -1803,7 +2052,7 @@ dissect_rtcp_psfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree,
* the a=rtcp-fb attribute, but if we don't, we'd need to have
* the user specify it somehow.
*/
- guint32 magic_value = tvb_get_ntohl( tvb, offset);
+ uint32_t magic_value = tvb_get_ntohl( tvb, offset);
/* look for string literal 'REMB' which is 0x52454d42 hex */
if (magic_value == 0x52454d42) {
/* Handle REMB (Receiver Estimated Maximum Bitrate) - https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00 */
@@ -1852,12 +2101,12 @@ dissect_rtcp_fir( tvbuff_t *tvb, int offset, proto_tree *tree )
}
static int
dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* tree,
- int packet_len, proto_item* subtype_item, guint rtcp_subtype)
+ int packet_len, proto_item* subtype_item, unsigned rtcp_subtype)
{
/* PoC1 Application */
- guint item_len;
- guint8 t2timer_code, participants_code;
- guint sdes_type;
+ unsigned item_len;
+ uint8_t t2timer_code, participants_code;
+ unsigned sdes_type;
proto_tree* PoC1_tree;
proto_item* PoC1_item;
int padding;
@@ -1880,8 +2129,8 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_REQUEST:
{
- guint8 code;
- guint16 priority;
+ uint8_t code;
+ uint16_t priority;
/* Both items here are optional */
if (tvb_reported_length_remaining(tvb, offset) == 0)
@@ -1890,13 +2139,13 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
}
/* Look for a code in the first byte */
- code = tvb_get_guint8(tvb, offset);
+ code = tvb_get_uint8(tvb, offset);
offset += 1;
/* Priority (optional) */
if (code == 102)
{
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
offset += 1;
if (item_len != 2) /* SHALL be 2 */
return offset;
@@ -1916,7 +2165,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
{
return offset;
}
- code = tvb_get_guint8(tvb, offset);
+ code = tvb_get_uint8(tvb, offset);
offset += 1;
}
@@ -1926,7 +2175,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
{
char* buff;
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
offset += 1;
if (item_len != 8) /* SHALL be 8 */
return offset;
@@ -1943,16 +2192,16 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_GRANTED:
{
proto_item* ti;
- guint16 stop_talking_time;
- guint16 participants;
+ uint16_t stop_talking_time;
+ uint16_t participants;
/* Stop talking timer (now mandatory) */
- t2timer_code = tvb_get_guint8(tvb, offset);
+ t2timer_code = tvb_get_uint8(tvb, offset);
offset += 1;
if (t2timer_code != 101) /* SHALL be 101 */
return offset;
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
offset += 1;
if (item_len != 2) /* SHALL be 2 */
return offset;
@@ -1983,12 +2232,12 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
{
return offset;
}
- participants_code = tvb_get_guint8(tvb, offset);
+ participants_code = tvb_get_uint8(tvb, offset);
offset += 1;
if (participants_code != 100) /* SHALL be 100 */
return offset;
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
offset += 1;
if (item_len != 2) /* SHALL be 2 */
return offset;
@@ -2018,7 +2267,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_TAKEN_EXPECT_NO_REPLY:
case TBCP_BURST_TAKEN_EXPECT_REPLY:
{
- guint16 participants;
+ uint16_t participants;
proto_item* ti;
/* SSRC of PoC client */
@@ -2027,7 +2276,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
packet_len -= 4;
/* SDES type (must be CNAME) */
- sdes_type = tvb_get_guint8(tvb, offset);
+ sdes_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(PoC1_tree, hf_rtcp_sdes_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
packet_len--;
@@ -2037,7 +2286,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
}
/* SIP URI */
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
/* Item len of 1 because it's an FT_UINT_STRING... */
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_sip_uri,
tvb, offset, 1, ENC_ASCII | ENC_BIG_ENDIAN);
@@ -2061,14 +2310,14 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
return offset;
/* SDES type (must be NAME if present) */
- sdes_type = tvb_get_guint8(tvb, offset);
+ sdes_type = tvb_get_uint8(tvb, offset);
if (sdes_type == RTCP_SDES_NAME) {
proto_tree_add_item(PoC1_tree, hf_rtcp_sdes_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
packet_len--;
/* Display name */
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
/* Item len of 1 because it's an FT_UINT_STRING... */
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_disp_name,
tvb, offset, 1, ENC_ASCII | ENC_BIG_ENDIAN);
@@ -2095,12 +2344,12 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
if (tvb_reported_length_remaining(tvb, offset) == 0) {
return offset;
}
- participants_code = tvb_get_guint8(tvb, offset);
+ participants_code = tvb_get_uint8(tvb, offset);
offset += 1;
if (participants_code != 100) { /* SHALL be 100 */
return offset;
}
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
offset += 1;
if (item_len != 2) { /* SHALL be 2 */
return offset;
@@ -2129,10 +2378,10 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_DENY:
{
- guint8 reason_code;
+ uint8_t reason_code;
/* Reason code */
- reason_code = tvb_get_guint8(tvb, offset);
+ reason_code = tvb_get_uint8(tvb, offset);
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_reason_code1, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
packet_len--;
@@ -2143,7 +2392,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
"Unknown"));
/* Reason phrase */
- item_len = tvb_get_guint8(tvb, offset);
+ item_len = tvb_get_uint8(tvb, offset);
if (item_len != 0) {
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_reason1_phrase, tvb, offset, 1, ENC_ASCII | ENC_BIG_ENDIAN);
}
@@ -2154,8 +2403,8 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_RELEASE:
{
- guint16 last_seq_no;
- /*guint16 ignore_last_seq_no;*/
+ uint16_t last_seq_no;
+ /*uint16_t ignore_last_seq_no;*/
/* Sequence number of last RTP packet in burst */
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_last_pkt_seq_no, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2182,7 +2431,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_REVOKE:
{
/* Reason code */
- guint16 reason_code = tvb_get_ntohs(tvb, offset);
+ uint16_t reason_code = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_reason_code2, tvb, offset, 2, ENC_BIG_ENDIAN);
/* The meaning of this field depends upon the reason code... */
@@ -2213,10 +2462,10 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_BURST_ACKNOWLEDGMENT:
{
- guint8 subtype;
+ uint8_t subtype;
/* Code of message being acknowledged */
- subtype = (tvb_get_guint8(tvb, offset) & 0xf8) >> 3;
+ subtype = (tvb_get_uint8(tvb, offset) & 0xf8) >> 3;
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_ack_subtype, tvb, offset, 1, ENC_BIG_ENDIAN);
col_append_fstr(pinfo->cinfo, COL_INFO, " (for %s)",
@@ -2240,7 +2489,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case TBCP_QUEUE_STATUS_RESPONSE:
{
- guint16 position;
+ uint16_t position;
proto_item* ti;
/* Priority */
@@ -2274,11 +2523,11 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
proto_item* content;
proto_tree* content_tree = proto_tree_add_subtree(PoC1_tree, tvb, offset, 2,
ett_poc1_conn_contents, &content, "SDES item content");
- gboolean contents[5];
+ bool contents[5];
unsigned int i;
- guint8 items_set = 0;
+ uint8_t items_set = 0;
- guint16 items_field = tvb_get_ntohs(tvb, offset);
+ uint16_t items_field = tvb_get_ntohs(tvb, offset);
/* Dissect each defined bit flag in the SDES item content */
for (i = 0; i < 5; i++)
@@ -2303,12 +2552,12 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
/* One SDES item for every set flag in contents array */
for (i = 0; i < array_length(contents); ++i) {
if (contents[i]) {
- guint /*sdes_type2,*/ sdes_len2;
+ unsigned /*sdes_type2,*/ sdes_len2;
/* (sdes_type2 not currently used...). Could complain if type
doesn't match expected for item... */
- /*sdes_type2 = tvb_get_guint8( tvb, offset );*/
+ /*sdes_type2 = tvb_get_uint8( tvb, offset );*/
offset += 1;
- sdes_len2 = tvb_get_guint8(tvb, offset);
+ sdes_len2 = tvb_get_uint8(tvb, offset);
/* Add SDES field indicated as present */
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_conn_sdes_items[i], tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2400,9 +2649,9 @@ static const value_string rtcp_mcptt_loc_type_vals[] = {
};
static int
-dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* tree, guint32 mcptt_fld_len)
+dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* tree, uint32_t mcptt_fld_len)
{
- guint32 loc_type;
+ uint32_t loc_type;
int start_offset = offset;
static int * const ECGI_flags[] = {
&hf_rtcp_mcptt_enodebid,
@@ -2420,7 +2669,7 @@ dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, pr
break;
case 1:
/* ECGI - 56 bits = MCC + MNC + ECI*/
- dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, TRUE);
+ dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, true);
offset += 3;
proto_tree_add_bitmask(tree, tvb, offset, hf_rtcp_mcptt_ecgi_eci, ett_rtcp_mcptt_eci, ECGI_flags, ENC_BIG_ENDIAN);
offset += 4;
@@ -2428,14 +2677,14 @@ dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, pr
case 2:
/* Tracking Area - 40 bits = MCC + MNC + 16 bits */
/* ECGI - 56 bits = MCC + MNC + ECI*/
- dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, TRUE);
+ dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, true);
offset += 3;
proto_tree_add_item(tree, hf_rtcp_mcptt_tac, tvb, offset, 2, ENC_NA);
offset += 2;
break;
case 3:
/* PLMN ID - 24 bits = MCC+MNC */
- dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, TRUE);
+ dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_ECGI, true);
offset += 3;
break;
case 4:
@@ -2462,7 +2711,7 @@ dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, pr
proto_tree_add_expert(tree, pinfo, &ei_rtcp_mcptt_location_type, tvb, offset-1, 1);
break;
}
- if ((guint)(offset - start_offset) != mcptt_fld_len) {
+ if ((unsigned)(offset - start_offset) != mcptt_fld_len) {
proto_tree_add_item(tree, hf_rtcp_app_data_padding, tvb, offset, offset - start_offset, ENC_BIG_ENDIAN);
offset += (offset - start_offset);
}
@@ -2473,11 +2722,11 @@ dissect_rtcp_mcptt_location_ie(tvbuff_t* tvb, packet_info* pinfo, int offset, pr
/* TS 24.380 */
static int
dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* tree,
- int packet_len, proto_item* subtype_item, guint rtcp_subtype)
+ int packet_len, proto_item* subtype_item, unsigned rtcp_subtype)
{
proto_tree* sub_tree;
- guint32 mcptt_fld_id, mcptt_fld_len;
+ uint32_t mcptt_fld_id, mcptt_fld_len;
col_add_fstr(pinfo->cinfo, COL_INFO, "(MCPT) %s",
val_to_str(rtcp_subtype, rtcp_mcpt_subtype_vals, "unknown (%u)"));
@@ -2538,7 +2787,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 2:
{
/* Reject Cause */
- guint32 cause = 0;
+ uint32_t cause = 0;
switch (rtcp_subtype) {
case 3:
/* Floor deny */
@@ -2611,7 +2860,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
break;
case 11:
{
- guint32 fld_len, num_ref;
+ uint32_t fld_len, num_ref;
int rem_len = mcptt_fld_len;
proto_tree* part_tree;
/* Track Info */
@@ -2626,7 +2875,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
offset += fld_len;
rem_len -= fld_len;
if(part_type_padding > 0){
- guint32 data;
+ uint32_t data;
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_app_data_padding, tvb, offset, part_type_padding, ENC_BIG_ENDIAN, &data);
if (data != 0) {
proto_tree_add_expert(sub_tree, pinfo, &ei_rtcp_appl_non_zero_pad, tvb, offset, part_type_padding);
@@ -2657,7 +2906,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 13:
{
/* Floor Indicator */
- guint32 floor_ind;
+ uint32_t floor_ind;
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_floor_ind, tvb, offset, 2, ENC_BIG_ENDIAN, &floor_ind);
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s",
val_to_str_const(floor_ind, mcptt_floor_ind_vals, "Unknown"));
@@ -2674,7 +2923,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 15:
/* List of Granted Users */
{
- guint32 num_users, user_id_len;
+ uint32_t num_users, user_id_len;
/* No of users */
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_num_users, tvb, offset, 1, ENC_BIG_ENDIAN, &num_users);
offset += 1;
@@ -2690,7 +2939,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 16:
/* List of SSRCs */
{
- guint32 num_ssrc;
+ uint32_t num_ssrc;
/* Number of SSRCs*/
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_num_ssrc, tvb, offset, 1, ENC_BIG_ENDIAN, &num_ssrc);
offset += 1;
@@ -2713,7 +2962,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 18:
/* List of Functional Aliases */
{
- guint32 num_fas, fa_len;
+ uint32_t num_fas, fa_len;
/* No of FAs */
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_num_fas, tvb, offset, 1, ENC_BIG_ENDIAN, &num_fas);
offset += 1;
@@ -2734,7 +2983,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
case 20:
/* List of Locations */
{
- guint32 num_loc;
+ uint32_t num_loc;
/* Number of SSRCs*/
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_mcptt_num_loc, tvb, offset, 1, ENC_BIG_ENDIAN, &num_loc);
offset += 1;
@@ -2754,7 +3003,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
}
}
if (padding) {
- guint32 data;
+ uint32_t data;
proto_tree_add_item_ret_uint(sub_tree, hf_rtcp_app_data_padding, tvb, offset, padding, ENC_BIG_ENDIAN, &data);
if (data != 0) {
proto_tree_add_expert(sub_tree, pinfo, &ei_rtcp_appl_non_zero_pad, tvb, offset, padding);
@@ -2763,7 +3012,7 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
}
packet_len -= offset - start_offset;
if (packet_len >= 4) {
- guint32 dword = tvb_get_ntohl(tvb, offset);
+ uint32_t dword = tvb_get_ntohl(tvb, offset);
if (dword == 0) {
/* Extra 4 zero bytes */
proto_tree_add_expert(sub_tree, pinfo, &ei_rtcp_appl_extra_bytes, tvb, offset, 4);
@@ -2779,11 +3028,11 @@ dissect_rtcp_app_mcpt(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
/* TS 24.380 V 13.2.0*/
static int
dissect_rtcp_app_mccp(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree* tree,
- int packet_len, proto_item* subtype_item, guint rtcp_subtype)
+ int packet_len, proto_item* subtype_item, unsigned rtcp_subtype)
{
proto_tree* sub_tree;
- guint32 mccp_fld_id, mccp_fld_len;
+ uint32_t mccp_fld_id, mccp_fld_len;
int total_packet_length;
col_add_fstr(pinfo->cinfo, COL_INFO, "(MCCP) %s",
@@ -2835,7 +3084,7 @@ dissect_rtcp_app_mccp(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
* number of the" m=audio" m-line in the SIP MESSAGE request announcing
* the MBMS bearer described in 3GPP TS 24.379
*/
- guint32 ip_ver, floor_m_line_no;
+ uint32_t ip_ver, floor_m_line_no;
proto_tree_add_item(sub_tree, hf_rtcp_mccp_audio_m_line_no, tvb, offset, 1, ENC_BIG_ENDIAN);
/* The <Floor m-line Number> value shall consist of 4 bit parameter giving the
* number of the "m=application" m-line in the SIP MESSAGE request announcing
@@ -2853,10 +3102,10 @@ dissect_rtcp_app_mccp(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
proto_tree_add_item(sub_tree, hf_rtcp_mccp_floor_port_no, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
- /* Medis Port Number */
+ /* Media Port Number */
proto_tree_add_item(sub_tree, hf_rtcp_mccp_media_port_no, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- /* IP Address*/
+ /* IP Address */
if (ip_ver == 0) {
proto_tree_add_item(sub_tree, hf_rtcp_mccp_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -2893,7 +3142,7 @@ dissect_rtcp_app_mccp(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
}
packet_len -= offset - start_offset;
if (packet_len >= 4) {
- guint32 dword;
+ uint32_t dword;
if (mccp_fld_len % 4) {
dword = tvb_get_ntohl(tvb, offset);
padding = (4 - (mccp_fld_len % 4));
@@ -2911,13 +3160,12 @@ dissect_rtcp_app_mccp(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
return offset;
}
static int
-dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree,
- unsigned int padding, int packet_len, proto_item *subtype_item, guint rtcp_subtype,
- guint32 app_length )
+dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree, int packet_len,
+ proto_item *subtype_item, unsigned rtcp_subtype, uint32_t app_length )
{
- const guint8* ascii_name;
- gboolean is_ascii;
+ const uint8_t* ascii_name;
+ bool is_ascii;
/* XXX If more application types are to be dissected it may be useful to use a table like in packet-sip.c */
static const char poc1_app_name_str[] = "PoC1";
@@ -2932,11 +3180,11 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
}
/* Applications specific data */
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
if (is_ascii) {
@@ -2951,15 +3199,15 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
offset += 4;
packet_len -= 4;
/* Applications specific data */
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
if (packet_len == 4)
{
- guint16 local_port = 0;
+ uint16_t local_port = 0;
proto_item* mux_item = proto_tree_add_item(tree, hf_rtcp_app_mux, tvb, offset, packet_len, ENC_NA);
proto_tree* mux_tree = proto_item_add_subtree(mux_item, ett_mux);
@@ -2991,11 +3239,11 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
/* found subdissector - return tvb_reported_length */
offset += 4;
packet_len -= 4;
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
if ((int)(offset + packet_len) >= offset)
offset += packet_len;
@@ -3007,11 +3255,11 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
offset += 4;
packet_len -= 4;
/* Applications specific data */
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
if (tvb_ascii_isprint(tvb, offset, packet_len)) {
proto_tree_add_item(tree, hf_rtcp_app_data_str, tvb, offset, packet_len, ENC_ASCII | ENC_NA);
@@ -3028,11 +3276,11 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
offset += 4;
packet_len -= 4;
/* Applications specific data */
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
if (tvb_ascii_isprint(tvb, offset, packet_len)) {
proto_tree_add_item(tree, hf_rtcp_app_data_str, tvb, offset, packet_len, ENC_ASCII | ENC_NA);
@@ -3052,7 +3300,7 @@ dissect_rtcp_bye( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tre
{
int chunk;
unsigned int reason_length = 0;
- gint reason_offset = 0;
+ int reason_offset = 0;
chunk = 1;
while ( chunk <= count ) {
@@ -3064,7 +3312,7 @@ dissect_rtcp_bye( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tre
if (count * 4 < packet_length) {
/* Bye reason consists of an 8 bit length l and a string with length l */
- reason_length = tvb_get_guint8( tvb, offset );
+ reason_length = tvb_get_uint8( tvb, offset );
proto_tree_add_item( tree, hf_rtcp_sdes_length, tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
@@ -3076,14 +3324,14 @@ dissect_rtcp_bye( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tre
/* BYE packet padded out if string didn't fit in previous word */
if (offset % 4)
{
- gint pad_size = (4 - (offset % 4));
+ int pad_size = (4 - (offset % 4));
int i;
/* Check padding */
for (i = 0; i < pad_size; i++)
{
if ((!(tvb_offset_exists(tvb, offset + i))) ||
- (tvb_get_guint8(tvb, offset + i) != 0))
+ (tvb_get_uint8(tvb, offset + i) != 0))
{
proto_tree_add_expert(tree, pinfo, &ei_rtcp_bye_reason_not_padded, tvb, reason_offset, reason_length);
}
@@ -3105,7 +3353,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, proto_tree *tree, int count )
proto_item *ti;
int start_offset;
int items_start_offset;
- guint32 ssrc;
+ uint32_t ssrc;
unsigned int item_len;
unsigned int sdes_type;
unsigned int prefix_len;
@@ -3136,7 +3384,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, proto_tree *tree, int count )
*/
while ( tvb_reported_length_remaining( tvb, offset ) > 0 ) {
/* ID, 8 bits */
- sdes_type = tvb_get_guint8( tvb, offset );
+ sdes_type = tvb_get_uint8( tvb, offset );
proto_tree_add_item( sdes_item_tree, hf_rtcp_sdes_type, tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
@@ -3146,7 +3394,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, proto_tree *tree, int count )
}
/* Item length, 8 bits */
- item_len = tvb_get_guint8( tvb, offset );
+ item_len = tvb_get_uint8( tvb, offset );
proto_tree_add_item( sdes_item_tree, hf_rtcp_sdes_length, tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
@@ -3157,7 +3405,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, proto_tree *tree, int count )
* length giving the length of a
* "prefix string", and the string.
*/
- prefix_len = tvb_get_guint8( tvb, offset );
+ prefix_len = tvb_get_uint8( tvb, offset );
if ( prefix_len + 1 > item_len ) {
proto_tree_add_uint_format_value( sdes_item_tree,
hf_rtcp_sdes_prefix_len, tvb,
@@ -3200,8 +3448,8 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, proto_tree *tree, int count )
return offset;
}
-static void parse_xr_type_specific_field(tvbuff_t *tvb, gint offset, guint block_type,
- proto_tree *tree, guint8 *thinning)
+static void parse_xr_type_specific_field(tvbuff_t *tvb, int offset, unsigned block_type,
+ proto_tree *tree, uint8_t *thinning)
{
static int * const flags[] = {
&hf_rtcp_xr_stats_loss_flag,
@@ -3215,7 +3463,7 @@ static void parse_xr_type_specific_field(tvbuff_t *tvb, gint offset, guint block
case RTCP_XR_LOSS_RLE:
case RTCP_XR_DUP_RLE:
case RTCP_XR_PKT_RXTIMES:
- *thinning = tvb_get_guint8(tvb, offset) & 0x0F;
+ *thinning = tvb_get_uint8(tvb, offset) & 0x0F;
proto_tree_add_item(tree, hf_rtcp_xr_thinning, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
@@ -3229,7 +3477,7 @@ static void parse_xr_type_specific_field(tvbuff_t *tvb, gint offset, guint block
}
}
-static gboolean validate_xr_block_length(tvbuff_t *tvb, packet_info *pinfo, int offset, guint block_type, guint block_len, proto_tree *tree)
+static bool validate_xr_block_length(tvbuff_t *tvb, packet_info *pinfo, int offset, unsigned block_type, unsigned block_len, proto_tree *tree)
{
proto_item *ti;
@@ -3239,34 +3487,34 @@ static gboolean validate_xr_block_length(tvbuff_t *tvb, packet_info *pinfo, int
case RTCP_XR_REF_TIME:
if (block_len != 2)
expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 2");
- return FALSE;
+ return false;
case RTCP_XR_STATS_SUMRY:
if (block_len != 9)
expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 9");
- return FALSE;
+ return false;
case RTCP_XR_VOIP_METRCS:
case RTCP_XR_BT_XNQ:
if (block_len != 8)
expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 8");
- return FALSE;
+ return false;
case RTCP_XR_IDMS:
if (block_len != 7)
expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 7");
- return FALSE;
+ return false;
default:
break;
}
- return TRUE;
+ return true;
}
static int
-dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, unsigned int padding, gint packet_len)
+dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, int packet_len)
{
- guint block_num;
+ unsigned block_num;
/* Packet length should at least be 4 */
if (packet_len < 4) {
@@ -3274,11 +3522,11 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
return offset + packet_len;
}
- if (padding) {
+ if (rtcp_padding_set) {
/* If there's padding present, we have to remove that from the data part
* The last octet of the packet contains the length of the padding
*/
- packet_len -= tvb_get_guint8(tvb, offset + packet_len - 1);
+ packet_len -= tvb_get_uint8(tvb, offset + packet_len - 1);
}
/* SSRC */
@@ -3287,10 +3535,10 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
packet_len -= 4;
for( block_num = 1; packet_len > 0; block_num++) {
- guint block_type = tvb_get_guint8(tvb, offset), block_length = 0;
- gint content_length = 0;
- guint8 thinning = 0;
- /*gboolean valid = TRUE;*/
+ unsigned block_type = tvb_get_uint8(tvb, offset), block_length = 0;
+ int content_length = 0;
+ uint8_t thinning = 0;
+ /*bool valid = true;*/
/* Create a subtree for this block, don't know the length yet*/
proto_item *block;
@@ -3303,7 +3551,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
parse_xr_type_specific_field(tvb, offset + 1, block_type, xr_block_tree, &thinning);
if (packet_len >= 4) {
block_length = tvb_get_ntohs(tvb, offset + 2);
- /* XXX: What if FALSE return from the following ?? */
+ /* XXX: What if false return from the following ?? */
/*valid =*/ validate_xr_block_length(tvb, pinfo, offset + 2, block_type, block_length, xr_block_tree);
}
} else {
@@ -3325,20 +3573,20 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
switch (block_type) {
case RTCP_XR_VOIP_METRCS: {
- guint fraction_rate;
+ unsigned fraction_rate;
/* Identifier */
proto_tree_add_item(content_tree, hf_rtcp_ssrc_source, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Loss Rate */
- fraction_rate = tvb_get_guint8(tvb, offset);
+ fraction_rate = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(content_tree, hf_rtcp_ssrc_fraction, tvb, offset, 1,
fraction_rate, "%u / 256", fraction_rate);
offset++;
/* Discard Rate */
- fraction_rate = tvb_get_guint8(tvb, offset);
+ fraction_rate = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(content_tree, hf_rtcp_ssrc_discarded, tvb, offset, 1,
fraction_rate, "%u / 256", fraction_rate);
offset++;
@@ -3368,21 +3616,21 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
offset += 2;
/* Signal Level */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_int_format_value(content_tree, hf_rtcp_xr_voip_metrics_siglevel, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_siglevel, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Noise Level */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_int_format_value(content_tree, hf_rtcp_xr_voip_metrics_noiselevel, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_noiselevel, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* RERL */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_uint_format_value(content_tree, hf_rtcp_xr_voip_metrics_rerl, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_rerl, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -3393,40 +3641,40 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
offset++;
/* R factor */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_uint_format_value(content_tree, hf_rtcp_xr_voip_metrics_rfactor, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_rfactor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* external R Factor */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_uint_format_value(content_tree, hf_rtcp_xr_voip_metrics_extrfactor, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_extrfactor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* MOS LQ */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_float_format_value(content_tree, hf_rtcp_xr_voip_metrics_moslq, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_float(content_tree, hf_rtcp_xr_voip_metrics_moslq, tvb, offset, 1,
- (float) (tvb_get_guint8(tvb, offset) / 10.0));
+ (float) (tvb_get_uint8(tvb, offset) / 10.0));
offset++;
/* MOS CQ */
- if (tvb_get_guint8(tvb, offset) == 0x7f)
+ if (tvb_get_uint8(tvb, offset) == 0x7f)
proto_tree_add_float_format_value(content_tree, hf_rtcp_xr_voip_metrics_moscq, tvb, offset, 1, 0x7f, "Unavailable");
else
proto_tree_add_float(content_tree, hf_rtcp_xr_voip_metrics_moscq, tvb, offset, 1,
- (float) (tvb_get_guint8(tvb, offset) / 10.0));
+ (float) (tvb_get_uint8(tvb, offset) / 10.0));
offset++;
/* PLC, JB Adaptive, JB Rate */
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_plc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_jbadaptive, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_jbrate, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 2; /* skip over reseved bit */
+ offset += 2; /* skip over reserved bit */
/* JB Nominal */
proto_tree_add_item(content_tree, hf_rtcp_xr_voip_metrics_jbnominal, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -3507,8 +3755,8 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
case RTCP_XR_DLRR: {
/* Each report block is 12 bytes */
- gint sources = content_length / 12;
- gint counter = 0;
+ int sources = content_length / 12;
+ int counter = 0;
for(counter = 0; counter < sources; counter++) {
/* Create a new subtree for a length of 12 bytes */
proto_tree *ssrc_tree = proto_tree_add_subtree_format(content_tree, tvb, offset, 12, ett_xr_ssrc, NULL, "Source %u", counter + 1);
@@ -3533,9 +3781,9 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
case RTCP_XR_PKT_RXTIMES: {
/* 8 bytes of fixed header */
- guint32 rcvd_time;
- gint count = 0, skip = 8;
- guint16 begin = 0;
+ uint32_t rcvd_time;
+ int count = 0, skip = 8;
+ uint16_t begin = 0;
/* Identifier */
proto_tree_add_item(content_tree, hf_rtcp_ssrc_source, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -3565,7 +3813,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
case RTCP_XR_LOSS_RLE:
case RTCP_XR_DUP_RLE: {
/* 8 bytes of fixed header */
- gint count = 0, skip = 8;
+ int count = 0, skip = 8;
proto_tree *chunks_tree;
/* Identifier */
@@ -3584,13 +3832,13 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
chunks_tree = proto_tree_add_subtree(content_tree, tvb, offset, content_length, ett_xr_loss_chunk, NULL, "Report Chunks");
for(count = 1; skip < content_length; skip += 2, count++) {
- guint value = tvb_get_ntohs(tvb, offset);
+ unsigned value = tvb_get_ntohs(tvb, offset);
if (value == 0) {
proto_tree_add_none_format(chunks_tree, hf_rtcp_xr_chunk_null_terminator, tvb, offset, 2, "Chunk: %u -- Null Terminator ",
count);
} else if ( ! ( value & 0x8000 )) {
- const gchar *run_type = (value & 0x4000) ? "1s" : "0s";
+ const char *run_type = (value & 0x4000) ? "1s" : "0s";
value &= 0x3FFF;
proto_tree_add_uint_format(chunks_tree, hf_rtcp_xr_chunk_length, tvb, offset, 2, value, "Chunk: %u -- Length Run %s, length: %u",
count, run_type, value);
@@ -3604,7 +3852,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
break;
}
case RTCP_XR_BT_XNQ: { /* BT XNQ block as defined in RFC5093 */
- guint temp_value; /* used when checking spare bits in block type 8 */
+ unsigned temp_value; /* used when checking spare bits in block type 8 */
proto_tree_add_item(content_tree, hf_rtcp_xr_btxnq_begseq, tvb, offset, 2, ENC_BIG_ENDIAN); /* Begin Sequence number */
proto_tree_add_item(content_tree, hf_rtcp_xr_btxnq_endseq, tvb, offset+2, 2, ENC_BIG_ENDIAN); /* End Sequence number */
@@ -3650,7 +3898,7 @@ dissect_rtcp_xr(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree,
case RTCP_XR_IDMS: {
proto_item *item;
int hour,min,sec,msec;
- guint32 tmp_ts;
+ uint32_t tmp_ts;
offset -= 3;
proto_tree_add_item(content_tree, hf_rtcp_xr_idms_spst, tvb, offset, 1, ENC_BIG_ENDIAN);
offset+=3;
@@ -3752,7 +4000,7 @@ dissect_rtcp_rsi( tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree
static int
dissect_rtcp_token( tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree,
- int packet_len, guint rtcp_subtype _U_ )
+ int packet_len, unsigned rtcp_subtype _U_ )
{
/* SSRC / CSRC */
proto_tree_add_item( tree, hf_rtcp_ssrc_source, tvb, offset, 4, ENC_BIG_ENDIAN );
@@ -3763,135 +4011,169 @@ dissect_rtcp_token( tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tre
return offset + (packet_len - 4);
}
-static void
-dissect_rtcp_profile_specific_extensions (packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, int offset, int remaining)
+static int
+dissect_ms_profile_specific_extensions(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pse_tree, void *data _U_)
{
- gint16 extension_type;
- gint16 extension_length;
- proto_tree *pse_tree;
+ int16_t extension_type;
+ int16_t extension_length;
proto_item *pse_item;
proto_item *item;
+ int offset = 0;
- col_append_fstr(pinfo->cinfo, COL_INFO, "(");
- while (remaining)
- {
- extension_type = tvb_get_ntohs (tvb, offset);
- extension_length = tvb_get_ntohs (tvb, offset+2);
- if (extension_length < 4) {
- extension_length = 4; /* expert info? */
- }
+ extension_type = tvb_get_ntohs (tvb, offset);
+ extension_length = tvb_get_ntohs (tvb, offset+2);
+ if (extension_length < 4) {
+ extension_length = 4; /* expert info? */
+ }
- pse_tree = proto_tree_add_subtree(tree, tvb, offset, extension_length, ett_pse, &pse_item, "Payload Specific Extension");
- proto_item_append_text(pse_item, " (%s)",
- val_to_str_const(extension_type, rtcp_ms_profile_extension_vals, "Unknown"));
- col_append_fstr(pinfo->cinfo, COL_INFO, "PSE:%s ",
- val_to_str_const(extension_type, rtcp_ms_profile_extension_vals, "Unknown"));
+ pse_item = proto_tree_get_parent(pse_tree);
+ proto_item_append_text(pse_item, " (%s)",
+ val_to_str_const(extension_type, rtcp_ms_profile_extension_vals, "Unknown"));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "PSE:%s ",
+ val_to_str_const(extension_type, rtcp_ms_profile_extension_vals, "Unknown"));
- proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension_type, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension_length, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension_type, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension_length, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
- switch (extension_type)
+ switch (extension_type)
+ {
+ case 1:
+ /* MS Estimated Bandwidth */
+ item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* Decode if it is NONE or ANY and add to line */
+ proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ /* Confidence level byte is optional so check length first */
+ if (extension_length == 16)
{
- case 1:
- /* MS Estimated Bandwidth */
- item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
- /* Decode if it is NONE or ANY and add to line */
- proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- /* Confidence level byte is optional so check length first */
- if (extension_length == 16)
- {
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_confidence_level, tvb, offset + 8, 1, ENC_BIG_ENDIAN);
- }
- break;
- case 4:
- /* MS Packet Loss Notification */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_seq_num, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
- break;
- case 5:
- /* MS Video Preference */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_resolution_width, tvb, offset + 4, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_resolution_height, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bitrate, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_rate, tvb, offset + 12, 2, ENC_BIG_ENDIAN);
- break;
- case 7:
- /* MS Policy Server Bandwidth */
- /* First 4 bytes are reserved */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- break;
- case 8:
- /* MS TURN Server Bandwidth */
- /* First 4 bytes are reserved */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- break;
- case 9:
- /* MS Audio Healer Metrics */
- item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
- /* Decode if it is NONE or ANY and add to line */
- proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_concealed_frames, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_stretched_frames, tvb, offset+8, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_compressed_frames, tvb, offset+12, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_total_frames, tvb, offset+16, 4, ENC_BIG_ENDIAN);
- /* 2 bytes Reserved */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_receive_quality_state, tvb, offset+22, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_fec_distance_request, tvb, offset+23, 1, ENC_BIG_ENDIAN);
- break;
- case 10:
- /* MS Receiver-side Bandwidth Limit */
- /* First 4 bytes are reserved */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- break;
- case 11:
- /* MS Packet Train Packet */
- item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
- /* Decode if it is NONE or ANY and add to line */
- proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_last_packet_train, tvb, offset+4, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_idx, tvb, offset+4, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_cnt, tvb, offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_train_byte_cnt, tvb, offset+6, 2, ENC_BIG_ENDIAN);
- break;
- case 12:
- /* MS Peer Info Exchange */
- item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
- /* Decode if it is NONE or ANY and add to line */
- proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_inbound_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_outbound_bandwidth, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_no_cache, tvb, offset + 12, 1, ENC_BIG_ENDIAN);
- break;
- case 13:
- /* MS Network Congestion Notification */
- proto_tree_add_item(pse_tree, hf_rtcp_ntp_msw, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_ntp_lsw, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_ntp, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_congestion_info, tvb, offset + 12, 1, ENC_BIG_ENDIAN);
- break;
- case 14:
- /* MS Modality Send Bandwidth Limit */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_modality, tvb, offset, 1, ENC_BIG_ENDIAN);
- /* 3 bytes Reserved */
- proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- break;
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_confidence_level, tvb, offset + 8, 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case 4:
+ /* MS Packet Loss Notification */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_seq_num, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
+ break;
+ case 5:
+ /* MS Video Preference */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_resolution_width, tvb, offset + 4, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_resolution_height, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bitrate, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_frame_rate, tvb, offset + 12, 2, ENC_BIG_ENDIAN);
+ break;
+ case 7:
+ /* MS Policy Server Bandwidth */
+ /* First 4 bytes are reserved */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ break;
+ case 8:
+ /* MS TURN Server Bandwidth */
+ /* First 4 bytes are reserved */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ break;
+ case 9:
+ /* MS Audio Healer Metrics */
+ item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* Decode if it is NONE or ANY and add to line */
+ proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_concealed_frames, tvb, offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_stretched_frames, tvb, offset+8, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_compressed_frames, tvb, offset+12, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_total_frames, tvb, offset+16, 4, ENC_BIG_ENDIAN);
+ /* 2 bytes Reserved */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_receive_quality_state, tvb, offset+22, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_fec_distance_request, tvb, offset+23, 1, ENC_BIG_ENDIAN);
+ break;
+ case 10:
+ /* MS Receiver-side Bandwidth Limit */
+ /* First 4 bytes are reserved */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ break;
+ case 11:
+ /* MS Packet Train Packet */
+ item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* Decode if it is NONE or ANY and add to line */
+ proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_last_packet_train, tvb, offset+4, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_idx, tvb, offset+4, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_cnt, tvb, offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_packet_train_byte_cnt, tvb, offset+6, 2, ENC_BIG_ENDIAN);
+ break;
+ case 12:
+ /* MS Peer Info Exchange */
+ item = proto_tree_add_item(pse_tree, hf_rtcp_ssrc_sender, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* Decode if it is NONE or ANY and add to line */
+ proto_item_append_text(item," %s", val_to_str_const(tvb_get_ntohl (tvb, offset), rtcp_ssrc_values, ""));
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_inbound_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_outbound_bandwidth, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_no_cache, tvb, offset + 12, 1, ENC_BIG_ENDIAN);
+ break;
+ case 13:
+ /* MS Network Congestion Notification */
+ proto_tree_add_item(pse_tree, hf_rtcp_ntp_msw, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_ntp_lsw, tvb, offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_ntp, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_congestion_info, tvb, offset + 12, 1, ENC_BIG_ENDIAN);
+ break;
+ case 14:
+ /* MS Modality Send Bandwidth Limit */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_modality, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* 3 bytes Reserved */
+ proto_tree_add_item(pse_tree, hf_rtcp_pse_ms_bandwidth, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ break;
- case 6:
- /* MS Padding */
- default:
- /* Unrecognized */
+ case 6:
+ /* MS Padding */
+ default:
+ /* Unrecognized */
+ proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension, tvb, offset,
+ extension_length - 4, ENC_NA);
+ break;
+ }
+ offset += extension_length - 4;
+ return offset;
+}
+
+static void
+dissect_rtcp_profile_specific_extensions (packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, int offset, int remaining)
+{
+ tvbuff_t *next_tvb;
+ proto_tree *pse_tree;
+ proto_item *pse_item;
+ int bytes_consumed;
+ uint16_t extension_type;
+
+ /* Profile-specific extensions, as by their name, are supposed to be
+ * associated with a profile, negotiated in SDP or similar in the
+ * Media Description ("m=" line). In practice, the standards the
+ * define profile-specific extensions, like MS-RT, use the "RTP/AVP"
+ * profile, so we can't use that. They do seem to use the first two
+ * bytes as a type, though different standards disagree about the
+ * the nature of the length field (bytes vs 32-bit words).
+ *
+ * So we use a FT_UINT16 dissector table. If that ever proves
+ * insufficient, we could try a FT_NONE payload table.
+ */
+ col_append_str(pinfo->cinfo, COL_INFO, "(");
+ while (remaining) {
+ extension_type = tvb_get_ntohs(tvb, offset);
+ next_tvb = tvb_new_subset_length(tvb, offset, remaining);
+ pse_tree = proto_tree_add_subtree(tree, tvb, offset, remaining, ett_pse, &pse_item, "Profile Specific Extension");
+ bytes_consumed = dissector_try_uint_new(rtcp_pse_dissector_table, extension_type, next_tvb, pinfo, pse_tree, false, NULL);
+ if (!bytes_consumed) {
+ proto_item_append_text(pse_item, " (Unknown)");
+ col_append_str(pinfo->cinfo, COL_INFO, "PSE:Unknown ");
proto_tree_add_item(pse_tree, hf_rtcp_profile_specific_extension, tvb, offset,
- extension_length - 4, ENC_NA);
- break;
+ remaining, ENC_NA);
+ bytes_consumed = remaining;
}
- remaining -= extension_length;
- offset += extension_length - 4;
+ offset += bytes_consumed;
+ remaining -= bytes_consumed;
}
- col_append_fstr(pinfo->cinfo, COL_INFO, ") ");
+ col_append_str(pinfo->cinfo, COL_INFO, ") ");
}
static int
@@ -3903,13 +4185,13 @@ dissect_rtcp_rr( packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree
proto_tree *ssrc_sub_tree;
proto_tree *high_sec_tree;
proto_item *ti;
- guint8 rr_flt;
+ uint8_t rr_flt;
int rr_offset = offset;
counter = 1;
while ( counter <= count ) {
- guint32 lsr, dlsr;
+ uint32_t lsr, dlsr;
/* Create a new subtree for a length of 24 bytes */
ssrc_tree = proto_tree_add_subtree_format(tree, tvb, offset, 24,
@@ -3922,7 +4204,7 @@ dissect_rtcp_rr( packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree
ssrc_sub_tree = proto_tree_add_subtree(ssrc_tree, tvb, offset, 20, ett_ssrc_item, NULL, "SSRC contents" );
/* Fraction lost, 8bits */
- rr_flt = tvb_get_guint8( tvb, offset );
+ rr_flt = tvb_get_uint8( tvb, offset );
proto_tree_add_uint_format_value( ssrc_sub_tree, hf_rtcp_ssrc_fraction, tvb,
offset, 1, rr_flt, "%u / 256", rr_flt );
offset++;
@@ -3992,7 +4274,7 @@ dissect_rtcp_sr( packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree
int count, int packet_length )
{
proto_item *item;
- guint32 ts_msw, ts_lsw;
+ uint32_t ts_msw, ts_lsw;
int sr_offset = offset;
/* NTP timestamp */
@@ -4020,7 +4302,7 @@ dissect_rtcp_sr( packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree
if (global_rtcp_show_roundtrip_calculation)
{
/* Use middle 32 bits of 64-bit time value */
- guint32 lsr = ((ts_msw & 0x0000ffff) << 16 | (ts_lsw & 0xffff0000) >> 16);
+ uint32_t lsr = ((ts_msw & 0x0000ffff) << 16 | (ts_lsw & 0xffff0000) >> 16);
/* Record the time that we sent this in appropriate conversation */
remember_outgoing_sr(pinfo, lsr);
@@ -4102,7 +4384,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Update conversation data to record time that outgoing rr/sr was sent */
-static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr)
+static void remember_outgoing_sr(packet_info *pinfo, uint32_t lsr)
{
conversation_t *p_conv;
struct _rtcp_conversation_info *p_conv_data;
@@ -4165,7 +4447,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr)
/*******************************************************/
/* Update conversation data */
- p_conv_data->last_received_set = TRUE;
+ p_conv_data->last_received_set = true;
p_conv_data->last_received_frame_number = pinfo->num;
p_conv_data->last_received_timestamp = pinfo->abs_ts;
p_conv_data->last_received_ts = lsr;
@@ -4183,7 +4465,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr)
}
/* Copy current conversation data into packet info */
- p_packet_data->last_received_set = TRUE;
+ p_packet_data->last_received_set = true;
p_packet_data->last_received_frame_number = p_conv_data->last_received_frame_number;
}
@@ -4192,7 +4474,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr)
(at least between capture point and the other endpoint involved in
the conversation) */
static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, guint32 lsr, guint32 dlsr)
+ proto_tree *tree, uint32_t lsr, uint32_t dlsr)
{
/*****************************************************/
/* This is called dissecting an SR. We need to:
@@ -4262,21 +4544,21 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
if (p_conv_data->last_received_ts == lsr)
{
/* Look at time of since original packet was sent */
- gint seconds_between_packets = (gint)
+ int seconds_between_packets = (int)
(pinfo->abs_ts.secs - p_conv_data->last_received_timestamp.secs);
- gint nseconds_between_packets =
+ int nseconds_between_packets =
pinfo->abs_ts.nsecs - p_conv_data->last_received_timestamp.nsecs;
- gint total_gap = (seconds_between_packets*1000) +
+ int total_gap = (seconds_between_packets*1000) +
(nseconds_between_packets / 1000000);
- gint dlsr_ms = (int)(((double)dlsr/(double)65536) * 1000.0);
- gint delay;
+ int dlsr_ms = (int)(((double)dlsr/(double)65536) * 1000.0);
+ int delay;
/* Delay is gap - dlsr (N.B. this is allowed to be -ve) */
delay = total_gap - dlsr_ms;
/* Record that the LSR matches */
- p_packet_data->lsr_matched = TRUE;
+ p_packet_data->lsr_matched = true;
/* No useful calculation can be done if dlsr not set... */
if (dlsr)
@@ -4298,8 +4580,8 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
/* Show the calculated roundtrip delay info by adding protocol tree items
and appending text to the info column */
static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint frame, guint gap_between_reports,
- gint delay)
+ unsigned frame, unsigned gap_between_reports,
+ int delay)
{
/* 'Last SR' frame used in calculation. Show this even if no delay shown */
proto_item *item = proto_tree_add_uint(tree,
@@ -4363,25 +4645,24 @@ rtcp_packet_type_to_tree( int rtcp_packet_type)
}
static int
-dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_, gboolean is_srtp )
+dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_, bool is_srtp )
{
proto_item *ti;
proto_tree *rtcp_tree = NULL;
- guint padding_set = 0;
proto_item *padding_item = NULL;
- gint offset = 0;
- gint total_packet_length = 0;
- guint padding_offset = 0;
- gboolean srtcp_encrypted = FALSE;
- gboolean srtcp_now_encrypted = FALSE;
+ int offset = 0;
+ int total_packet_length = 0;
+ unsigned padding_offset = 0;
+ bool srtcp_encrypted = false;
+ bool srtcp_now_encrypted = false;
conversation_t *p_conv;
struct srtp_info *srtcp_info = NULL;
- guint32 srtcp_offset = 0;
- guint32 srtcp_index = 0;
- guint8 temp_byte;
+ uint32_t srtcp_offset = 0;
+ uint32_t srtcp_index = 0;
+ uint8_t temp_byte;
int proto_to_use = proto_rtcp;
- temp_byte = tvb_get_guint8(tvb, offset);
+ temp_byte = tvb_get_uint8(tvb, offset);
/* RFC 7983 gives current best practice in demultiplexing RT[C]P packets:
* Examine the first byte of the packet:
* +----------------+
@@ -4418,7 +4699,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
p_conv_data = (struct _rtcp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtcp);
if (p_conv_data && p_conv_data->srtcp_info)
{
- gboolean e_bit;
+ bool e_bit;
proto_to_use = proto_srtcp;
srtcp_info = p_conv_data->srtcp_info;
/* get the offset to the start of the SRTCP fields at the end of the packet */
@@ -4426,13 +4707,13 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
/* It has been setup as SRTCP, but skip to the SRTCP E field at the end
to see if this particular packet is encrypted or not. The E bit is the MSB. */
srtcp_index = tvb_bytes_exist(tvb, srtcp_offset, 4) ? tvb_get_ntohl(tvb, srtcp_offset) : 0;
- e_bit = (srtcp_index & 0x80000000) ? TRUE : FALSE;
+ e_bit = (srtcp_index & 0x80000000) ? true : false;
srtcp_index &= 0x7fffffff;
if (srtcp_info->encryption_algorithm!=SRTP_ENC_ALG_NULL) {
/* just flag it for now - the first SR or RR header and SSRC are unencrypted */
if (e_bit)
- srtcp_encrypted = TRUE;
+ srtcp_encrypted = true;
}
}
} else if (is_srtp) {
@@ -4441,7 +4722,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* bits start, so we don't know if it's encrypted. Assume yes, to
* avoid errors.
*/
- srtcp_encrypted = TRUE;
+ srtcp_encrypted = true;
proto_to_use = proto_srtcp;
}
@@ -4469,13 +4750,13 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* that enables us to break from the while loop.
*/
while ( !srtcp_now_encrypted && tvb_bytes_exist( tvb, offset, 4) ) {
- gint elem_count;
- guint packet_type;
- gint packet_length;
+ int elem_count;
+ unsigned packet_type;
+ int packet_length;
/*
* First retrieve the packet_type
*/
- packet_type = tvb_get_guint8( tvb, offset + 1 );
+ packet_type = tvb_get_uint8( tvb, offset + 1 );
/*
* Check if it's a valid type
@@ -4506,17 +4787,17 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
show_setup_info(tvb, pinfo, rtcp_tree);
}
- if (padding_set)
+ if (rtcp_padding_set)
{
/* Padding can't yet be set, since there is another packet */
expert_add_info(pinfo, padding_item, &ei_rtcp_not_final_padding);
}
- temp_byte = tvb_get_guint8( tvb, offset );
+ temp_byte = tvb_get_uint8( tvb, offset );
proto_tree_add_item( rtcp_tree, hf_rtcp_version, tvb,
offset, 1, ENC_BIG_ENDIAN);
- padding_set = RTCP_PADDING( temp_byte );
+ rtcp_padding_set = RTCP_PADDING( temp_byte );
padding_offset = offset + packet_length - 1;
padding_item = proto_tree_add_boolean( rtcp_tree, hf_rtcp_padding, tvb,
@@ -4539,7 +4820,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset += 4;
if (srtcp_encrypted) { /* rest of the payload is encrypted - do not try to dissect */
- srtcp_now_encrypted = TRUE;
+ srtcp_now_encrypted = true;
break;
}
@@ -4572,8 +4853,8 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
break;
case RTCP_APP: {
/* Subtype, 5 bits */
- guint rtcp_subtype;
- guint app_length;
+ unsigned rtcp_subtype;
+ unsigned app_length;
proto_item* subtype_item;
rtcp_subtype = elem_count;
subtype_item = proto_tree_add_uint( rtcp_tree, hf_rtcp_subtype, tvb, offset, 1, elem_count );
@@ -4598,7 +4879,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
return tvb_reported_length(tvb);
}
- offset = dissect_rtcp_app( tvb, pinfo, offset,rtcp_tree, padding_set, packet_length - 8, subtype_item, rtcp_subtype, app_length);
+ offset = dissect_rtcp_app( tvb, pinfo, offset,rtcp_tree, packet_length - 8, subtype_item, rtcp_subtype, app_length);
}
break;
case RTCP_XR:
@@ -4609,7 +4890,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset++;
/* Packet length in 32 bit words MINUS one, 16 bits */
offset = dissect_rtcp_length_field(rtcp_tree, tvb, offset);
- offset = dissect_rtcp_xr( tvb, pinfo, offset, rtcp_tree, padding_set, packet_length - 4 );
+ offset = dissect_rtcp_xr( tvb, pinfo, offset, rtcp_tree, packet_length - 4 );
break;
case RTCP_AVB:
/* Subtype, 5 bits */
@@ -4634,7 +4915,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
break;
case RTCP_TOKEN: {
/* Subtype, 5 bits */
- guint rtcp_subtype;
+ unsigned rtcp_subtype;
rtcp_subtype = elem_count;
proto_tree_add_uint( rtcp_tree, hf_rtcp_subtype, tvb, offset, 1, elem_count );
offset++;
@@ -4653,7 +4934,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset = dissect_rtcp_nack( tvb, offset, rtcp_tree );
break;
case RTCP_RTPFB:
- offset = dissect_rtcp_rtpfb( tvb, offset, rtcp_tree, ti, &padding_set, pinfo );
+ offset = dissect_rtcp_rtpfb( tvb, offset, rtcp_tree, pinfo );
break;
case RTCP_PSFB:
offset = dissect_rtcp_psfb( tvb, offset, rtcp_tree, packet_length, ti, pinfo );
@@ -4673,15 +4954,15 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* packet contains the length of the padding
* We only have to check for this at the end of the LAST RTCP message
*/
- if ( padding_set ) {
- guint padding_length;
+ if ( rtcp_padding_set ) {
+ unsigned padding_length;
/* The last RTCP message in the packet has padding - find it.
*
* The padding count is found at an offset of padding_offset; it
* contains the number of padding octets, including the padding
* count itself.
*/
- padding_length = tvb_get_guint8( tvb, padding_offset);
+ padding_length = tvb_get_uint8( tvb, padding_offset);
/* This length includes the padding length byte itself, so 0 is not
* a valid value. */
@@ -4695,7 +4976,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
/* If the payload was encrypted, the main payload was not dissected.
*/
- if (srtcp_encrypted == TRUE) {
+ if (srtcp_encrypted == true) {
/* If we don't have srtcp_info we cant calculate the length
*/
if (srtcp_info) {
@@ -4720,7 +5001,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
else if (offset == total_packet_length)
{
ti = proto_tree_add_boolean_format_value(rtcp_tree, hf_rtcp_length_check, tvb,
- 0, 0, TRUE, "OK - %u bytes",
+ 0, 0, true, "OK - %u bytes",
offset);
/* Hidden might be less annoying here...? */
proto_item_set_generated(ti);
@@ -4728,7 +5009,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
else
{
ti = proto_tree_add_boolean_format_value(rtcp_tree, hf_rtcp_length_check, tvb,
- 0, 0, FALSE,
+ 0, 0, false,
"Wrong (expected %u bytes, found %d)",
total_packet_length, offset);
proto_item_set_generated(ti);
@@ -4741,13 +5022,57 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
static int
dissect_srtcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data)
{
- return dissect_rtcp_common(tvb, pinfo, tree, data, TRUE);
+ return dissect_rtcp_common(tvb, pinfo, tree, data, true);
}
static int
dissect_rtcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data)
{
- return dissect_rtcp_common(tvb, pinfo, tree, data, FALSE);
+ return dissect_rtcp_common(tvb, pinfo, tree, data, false);
+}
+
+static void
+register_subdissectors_for_rtcp_rtpfb_dissector_table(void)
+{
+ proto_rtcp_rtpfb_nack = proto_register_protocol_in_name_only("Generic negative acknowledgement (NACK)", "RTCP NACK", "rtcp_rtpfb_nack", proto_rtcp, FT_BYTES);
+ proto_rtcp_rtpfb_tmmbr =
+ proto_register_protocol_in_name_only("Temporary Maximum Media Stream Bit Rate Request (TMMBR)", "RTCP TMMBR", "rtcp_rtpfb_tmmbr", proto_rtcp, FT_BYTES);
+ proto_rtcp_rtpfb_tmmbn =
+ proto_register_protocol_in_name_only("Temporary Maximum Media Stream Bit Rate Notification (TMMBN)", "RTCP TMMBN", "rtcp_rtpfb_tmmbn", proto_rtcp, FT_BYTES);
+ proto_rtcp_rtpfb_ccfb = proto_register_protocol_in_name_only("RTP Congestion Control Feedback (CCFB)", "RTCP CCFB", "rtcp_rtpfb_ccfb", proto_rtcp, FT_BYTES);
+ proto_rtcp_rtpfb_transport_cc =
+ proto_register_protocol_in_name_only("Transport-wide Congestion Control (Transport-cc)", "RTCP Transport-CC", "rtcp_rtpfb_transport_cc", proto_rtcp, FT_BYTES);
+ proto_rtcp_rtpfb_undecoded_fci = proto_register_protocol_in_name_only("Undecoded FCI", "Undecoded FCI", "rtcp_rtpfb_undecoded_fci", proto_rtcp, FT_BYTES);
+
+ rtcp_rtpfb_nack_handle = register_dissector("rtcp_rtpfb_nack", dissect_rtcp_rtpfb_nack, proto_rtcp_rtpfb_nack);
+ rtcp_rtpfb_tmmbr_handle = register_dissector("rtcp_rtpfb_tmmbr", dissect_rtcp_rtpfb_tmmbr, proto_rtcp_rtpfb_tmmbr);
+ rtcp_rtpfb_tmmbn_handle = register_dissector("rtcp_rtpfb_tmmbn", dissect_rtcp_rtpfb_tmmbn, proto_rtcp_rtpfb_tmmbn);
+ rtcp_rtpfb_ccfb_handle = register_dissector("rtcp_rtpfb_ccfb", dissect_rtcp_rtpfb_ccfb, proto_rtcp_rtpfb_ccfb);
+ rtcp_rtpfb_transport_cc_handle = register_dissector("rtcp_rtpfb_transport_cc", dissect_rtcp_rtpfb_transport_cc, proto_rtcp_rtpfb_transport_cc);
+ rtcp_rtpfb_undecoded_fci_handle = register_dissector("rtcp_rtpfb_undecoded_fci", dissect_rtcp_rtpfb_undecoded, proto_rtcp_rtpfb_undecoded_fci);
+}
+
+static void
+add_entries_for_rtcp_rtpfb_dissector_table(void)
+{
+ /* Below rtcp-rtpfb-fmt values (1, 3, 4, 11, 15) have full decoding support */
+ const uint32_t rtcp_rtpfb_nack_fmt = 1;
+ const uint32_t rtcp_rtpfb_tmmbr_fmt = 3;
+ const uint32_t rtcp_rtpfb_tmmbn_fmt = 4;
+ const uint32_t rtcp_rtpfb_ccfb_fmt = 11;
+ const uint32_t rtcp_rtpfb_transport_cc_fmt = 15;
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_nack_fmt, rtcp_rtpfb_nack_handle);
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_tmmbr_fmt, rtcp_rtpfb_tmmbr_handle);
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_tmmbn_fmt, rtcp_rtpfb_tmmbn_handle);
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_ccfb_fmt, rtcp_rtpfb_ccfb_handle);
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_transport_cc_fmt, rtcp_rtpfb_transport_cc_handle);
+
+ /* Below rtcp-rtpfb-fmt values (2, 5 - 10) don't have support for FCI decoding */
+ int rtcp_rtpfb_fmt = 2;
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_fmt, rtcp_rtpfb_undecoded_fci_handle);
+ for (rtcp_rtpfb_fmt = 5; rtcp_rtpfb_fmt < 11; rtcp_rtpfb_fmt++) {
+ dissector_add_uint("rtcp.rtpfb.fmt", rtcp_rtpfb_fmt, rtcp_rtpfb_undecoded_fci_handle);
+ }
}
void
@@ -4839,7 +5164,7 @@ proto_register_rtcp(void)
}
},
{
- &hf_rtcp_ssrc_media_source,
+ &hf_rtcp_ssrc_media_source,
{
"Media source SSRC",
"rtcp.mediassrc",
@@ -6414,6 +6739,90 @@ proto_register_rtcp(void)
}
},
{
+ &hf_rtcp_rtpfb_ccfb_beginseq,
+ {
+ "Begin Sequence Number",
+ "rtcp.rtpfb.ccfb.beginseq",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_numreports,
+ {
+ "Number Of Reports",
+ "rtcp.rtpfb.ccfb.numreports",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_received,
+ {
+ "Received",
+ "rtcp.rtpfb.ccfb.received",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x8000,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_ecn,
+ {
+ "Explicit Congestion Notification",
+ "rtcp.rtpfb.ccfb.ecn",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x6000,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_ato,
+ {
+ "Arrival Time Offset",
+ "rtcp.rtpfb.ccfb.ato",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x1FFF,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_padding,
+ {
+ "Padding",
+ "rtcp.rtpfb.ccfb.padding",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_rtcp_rtpfb_ccfb_timestamp,
+ {
+ "Timestamp",
+ "rtcp.rtpfb.ccfb.timestamp",
+ FT_UINT32,
+ BASE_HEX,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
+ {
&hf_rtcp_fci,
{
"Feedback Control Information (FCI)",
@@ -7778,7 +8187,7 @@ proto_register_rtcp(void)
},
{ &hf_rtcp_mcptt_duration,
{ "Duration", "rtcp.app_data.mcptt.duration",
- FT_UINT16, BASE_DEC | BASE_UNIT_STRING,& units_second_seconds, 0x0,
+ FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(& units_second_seconds), 0x0,
NULL, HFILL }
},
{ &hf_rtcp_mcptt_floor_ind,
@@ -8023,7 +8432,7 @@ proto_register_rtcp(void)
},
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_rtcp,
&ett_rtcp_sr,
@@ -8032,6 +8441,10 @@ proto_register_rtcp(void)
&ett_rtcp_bye,
&ett_rtcp_app,
&ett_rtcp_rtpfb,
+ &ett_rtcp_rtpfb_ccfb_fci,
+ &ett_rtcp_rtpfb_ccfb_media_source,
+ &ett_rtcp_rtpfb_ccfb_metric_blocks,
+ &ett_rtcp_rtpfb_ccfb_metric_block,
&ett_rtcp_psfb,
&ett_rtcp_xr,
&ett_rtcp_fir,
@@ -8074,6 +8487,8 @@ proto_register_rtcp(void)
{ &ei_rtcp_block_length, { "rtcp.block_length.invalid", PI_PROTOCOL, PI_WARN, "Block length is greater than packet length", EXPFILL }},
{ &ei_srtcp_encrypted_payload, { "srtcp.encrypted_payload", PI_UNDECODED, PI_WARN, "Encrypted RTCP Payload - not dissected", EXPFILL }},
{ &ei_rtcp_rtpfb_transportcc_bad, { "rtcp.rtpfb.transportcc_bad", PI_MALFORMED, PI_WARN, "Too many packet chunks (more than packet status count)", EXPFILL }},
+ { &ei_rtcp_rtpfb_fmt_not_implemented, { "rtcp.rtpfb.fmt_not_implemented", PI_UNDECODED, PI_WARN, "RTPFB FMT not dissected, contact Wireshark developers if you want this to be supported", EXPFILL }},
+ { &ei_rtcp_rtpfb_ccfb_too_many_reports, { "rtcp.mcptt.ccfb.invalid_pkt", PI_UNDECODED, PI_WARN, "RTPFB CCFB report block must not include more than 2^14 metric blocks", EXPFILL }},
{ &ei_rtcp_mcptt_unknown_fld, { "rtcp.mcptt.unknown_fld", PI_PROTOCOL, PI_WARN, "Unknown field", EXPFILL }},
{ &ei_rtcp_mcptt_location_type, { "rtcp.mcptt.location_type_uk", PI_PROTOCOL, PI_WARN, "Unknown location type", EXPFILL }},
{ &ei_rtcp_appl_extra_bytes, { "rtcp.appl.extra_bytes", PI_PROTOCOL, PI_ERROR, "Extra bytes detected", EXPFILL }},
@@ -8104,7 +8519,7 @@ proto_register_rtcp(void)
"which does not easily distinguish between RTCP and SRTCP.",
&global_rtcp_default_protocol,
rtcp_default_protocol_vals,
- FALSE);
+ false);
prefs_register_bool_preference(rtcp_module, "show_setup_info",
"Show stream setup information",
@@ -8130,12 +8545,18 @@ proto_register_rtcp(void)
prefs_register_enum_preference(srtcp_module, "decode_application_subtype",
"Decode Application subtype as",
"Decode the subtype as this application",
- &preferences_application_specific_encoding, rtcp_application_specific_encoding_vals, FALSE);
+ &preferences_application_specific_encoding, rtcp_application_specific_encoding_vals, false);
- /* Register table for sub-dissetors */
+ /* Register table for sub-dissectors */
rtcp_dissector_table = register_dissector_table("rtcp.app.name", "RTCP Application Name", proto_rtcp, FT_STRING, STRING_CASE_SENSITIVE);
rtcp_psfb_dissector_table = register_dissector_table("rtcp.psfb.fmt", "RTCP Payload Specific Feedback Message Format", proto_rtcp, FT_UINT8, BASE_DEC);
rtcp_rtpfb_dissector_table = register_dissector_table("rtcp.rtpfb.fmt", "RTCP Generic RTP Feedback Message Format", proto_rtcp, FT_UINT8, BASE_DEC);
+ rtcp_pse_dissector_table = register_dissector_table("rtcp.pse", "RTCP Profile Specific Extension", proto_rtcp, FT_UINT16, BASE_DEC);
+
+ proto_rtcp_ms_pse = proto_register_protocol_in_name_only("Microsoft RTCP Profile Specific Extensions", "MS-RTP PSE", "rtcp_ms_pse", proto_rtcp, FT_BYTES);
+ register_subdissectors_for_rtcp_rtpfb_dissector_table();
+
+ ms_pse_handle = register_dissector("rtcp_ms_pse", dissect_ms_profile_specific_extensions, proto_rtcp_ms_pse);
}
void
@@ -8149,6 +8570,12 @@ proto_reg_handoff_rtcp(void)
dissector_add_for_decode_as("flip.payload", rtcp_handle );
dissector_add_for_decode_as_with_preference("udp.port", srtcp_handle);
+ for (int idx = 0; rtcp_ms_profile_extension_vals[idx].strptr != NULL; idx++) {
+ dissector_add_uint("rtcp.pse", rtcp_ms_profile_extension_vals[idx].value, ms_pse_handle);
+ }
+
+ add_entries_for_rtcp_rtpfb_dissector_table();
+
heur_dissector_add( "udp", dissect_rtcp_heur, "RTCP over UDP", "rtcp_udp", proto_rtcp, HEURISTIC_ENABLE);
heur_dissector_add("stun", dissect_rtcp_heur, "RTCP over TURN", "rtcp_stun", proto_rtcp, HEURISTIC_ENABLE);
}