2000-04-21 01:45:58 +00:00
|
|
|
/* packet-rtp.c
|
|
|
|
*
|
2000-10-19 06:45:11 +00:00
|
|
|
* Routines for RTP dissection
|
|
|
|
* RTP = Real time Transport Protocol
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-10-19 06:45:11 +00:00
|
|
|
* Copyright 2000, Philips Electronics N.V.
|
2004-02-14 22:48:53 +00:00
|
|
|
* Written by Andreas Sikkema <h323@ramdyne.nl>
|
2000-04-21 01:45:58 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2001-06-12 06:32:39 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2000-04-21 01:45:58 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-04-21 01:45:58 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-04-21 01:45:58 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2000-04-21 01:45:58 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-10-19 06:45:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This dissector tries to dissect the RTP protocol according to Annex A
|
|
|
|
* of ITU-T Recommendation H.225.0 (02/98) or RFC 1889
|
2000-04-21 01:45:58 +00:00
|
|
|
*
|
2002-08-28 21:04:11 +00:00
|
|
|
* RTP traffic is handled by an even UDP portnumber. This can be any
|
2000-10-19 06:45:11 +00:00
|
|
|
* port number, but there is a registered port available, port 5004
|
|
|
|
* See Annex B of ITU-T Recommendation H.225.0, section B.7
|
2001-06-14 07:05:51 +00:00
|
|
|
*
|
|
|
|
* This doesn't dissect older versions of RTP, such as:
|
|
|
|
*
|
|
|
|
* the vat protocol ("version 0") - see
|
|
|
|
*
|
|
|
|
* ftp://ftp.ee.lbl.gov/conferencing/vat/alpha-test/vatsrc-4.0b2.tar.gz
|
|
|
|
*
|
|
|
|
* and look in "session-vat.cc" if you want to write a dissector
|
|
|
|
* (have fun - there aren't any nice header files showing the packet
|
|
|
|
* format);
|
|
|
|
*
|
|
|
|
* version 1, as documented in
|
|
|
|
*
|
|
|
|
* ftp://gaia.cs.umass.edu/pub/hgschulz/rtp/draft-ietf-avt-rtp-04.txt
|
2006-02-09 17:42:42 +00:00
|
|
|
*
|
|
|
|
* It also dissects PacketCable CCC-encapsulated RTP data, as described in
|
|
|
|
* chapter 5 of the PacketCable Electronic Surveillance Specification:
|
|
|
|
*
|
|
|
|
* http://www.packetcable.com/downloads/specs/PKT-SP-ESP1.5-I01-050128.pdf
|
2000-04-21 01:45:58 +00:00
|
|
|
*/
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2000-04-21 01:45:58 +00:00
|
|
|
|
|
|
|
#include "packet-rtp.h"
|
2005-09-17 00:02:31 +00:00
|
|
|
#include <epan/rtp_pt.h>
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/conversation.h>
|
2007-02-21 06:45:34 +00:00
|
|
|
#include <epan/reassemble.h>
|
2004-09-29 00:06:36 +00:00
|
|
|
#include <epan/tap.h>
|
2003-03-06 20:35:12 +00:00
|
|
|
|
2004-09-27 22:55:15 +00:00
|
|
|
#include <epan/prefs.h>
|
2005-08-12 10:50:55 +00:00
|
|
|
#include <epan/emem.h>
|
2008-03-01 17:23:39 +00:00
|
|
|
#include <epan/strutil.h>
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* uncomment this to enable debugging of fragment reassembly */
|
|
|
|
/* #define DEBUG_FRAGMENTS 1 */
|
|
|
|
|
2006-06-27 12:40:53 +00:00
|
|
|
typedef struct _rfc2198_hdr {
|
2009-03-06 22:55:02 +00:00
|
|
|
unsigned int pt;
|
|
|
|
int offset;
|
|
|
|
int len;
|
|
|
|
struct _rfc2198_hdr *next;
|
2006-06-27 12:40:53 +00:00
|
|
|
} rfc2198_hdr;
|
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* we have one of these for each pdu which spans more than one segment
|
|
|
|
*/
|
|
|
|
typedef struct _rtp_multisegment_pdu {
|
|
|
|
/* the seqno of the segment where the pdu starts */
|
|
|
|
guint32 startseq;
|
|
|
|
|
|
|
|
/* the seqno of the segment where the pdu ends */
|
|
|
|
guint32 endseq;
|
|
|
|
} rtp_multisegment_pdu;
|
|
|
|
|
|
|
|
typedef struct _rtp_private_conv_info {
|
|
|
|
/* This tree is indexed by sequence number and keeps track of all
|
|
|
|
* all pdus spanning multiple segments for this flow.
|
|
|
|
*/
|
|
|
|
emem_tree_t *multisegment_pdus;
|
|
|
|
} rtp_private_conv_info;
|
|
|
|
|
2013-03-22 23:59:54 +00:00
|
|
|
static reassembly_table rtp_reassembly_table;
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
static int hf_rtp_fragments = -1;
|
|
|
|
static int hf_rtp_fragment = -1;
|
|
|
|
static int hf_rtp_fragment_overlap = -1;
|
|
|
|
static int hf_rtp_fragment_overlap_conflict = -1;
|
|
|
|
static int hf_rtp_fragment_multiple_tails = -1;
|
|
|
|
static int hf_rtp_fragment_too_long_fragment = -1;
|
|
|
|
static int hf_rtp_fragment_error = -1;
|
2011-01-30 21:01:07 +00:00
|
|
|
static int hf_rtp_fragment_count = -1;
|
2007-02-21 06:45:34 +00:00
|
|
|
static int hf_rtp_reassembled_in = -1;
|
2010-02-02 16:01:52 +00:00
|
|
|
static int hf_rtp_reassembled_length = -1;
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
static gint ett_rtp_fragment = -1;
|
|
|
|
static gint ett_rtp_fragments = -1;
|
|
|
|
|
|
|
|
static const fragment_items rtp_fragment_items = {
|
2011-05-20 15:44:25 +00:00
|
|
|
&ett_rtp_fragment,
|
|
|
|
&ett_rtp_fragments,
|
|
|
|
&hf_rtp_fragments,
|
|
|
|
&hf_rtp_fragment,
|
|
|
|
&hf_rtp_fragment_overlap,
|
|
|
|
&hf_rtp_fragment_overlap_conflict,
|
|
|
|
&hf_rtp_fragment_multiple_tails,
|
|
|
|
&hf_rtp_fragment_too_long_fragment,
|
|
|
|
&hf_rtp_fragment_error,
|
|
|
|
&hf_rtp_fragment_count,
|
|
|
|
&hf_rtp_reassembled_in,
|
|
|
|
&hf_rtp_reassembled_length,
|
2012-09-07 02:09:59 +00:00
|
|
|
/* Reassembled data field */
|
|
|
|
NULL,
|
2011-05-20 15:44:25 +00:00
|
|
|
"RTP fragments"
|
2007-02-21 06:45:34 +00:00
|
|
|
};
|
|
|
|
|
2004-06-15 18:26:08 +00:00
|
|
|
static dissector_handle_t rtp_handle;
|
2009-09-13 23:03:38 +00:00
|
|
|
static dissector_handle_t classicstun_handle;
|
2013-04-10 11:46:31 +00:00
|
|
|
static dissector_handle_t stun_handle;
|
2009-09-13 23:03:38 +00:00
|
|
|
static dissector_handle_t classicstun_heur_handle;
|
2013-04-10 11:46:31 +00:00
|
|
|
static dissector_handle_t stun_heur_handle;
|
2006-01-29 00:40:40 +00:00
|
|
|
static dissector_handle_t t38_handle;
|
2008-09-25 22:06:58 +00:00
|
|
|
static dissector_handle_t zrtp_handle;
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2012-07-21 12:38:59 +00:00
|
|
|
static dissector_handle_t sprt_handle;
|
|
|
|
static dissector_handle_t v150fw_handle;
|
|
|
|
|
2003-03-06 20:35:12 +00:00
|
|
|
static int rtp_tap = -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2003-08-23 06:36:46 +00:00
|
|
|
static dissector_table_t rtp_pt_dissector_table;
|
2005-03-27 21:37:05 +00:00
|
|
|
static dissector_table_t rtp_dyn_pt_dissector_table;
|
2003-08-23 06:36:46 +00:00
|
|
|
|
2007-12-23 20:10:57 +00:00
|
|
|
static dissector_table_t rtp_hdr_ext_dissector_table;
|
2012-07-23 15:52:17 +00:00
|
|
|
static dissector_table_t rtp_hdr_ext_rfc5285_dissector_table;
|
2007-12-23 20:10:57 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* RTP header fields */
|
|
|
|
static int proto_rtp = -1;
|
|
|
|
static int hf_rtp_version = -1;
|
|
|
|
static int hf_rtp_padding = -1;
|
|
|
|
static int hf_rtp_extension = -1;
|
|
|
|
static int hf_rtp_csrc_count = -1;
|
|
|
|
static int hf_rtp_marker = -1;
|
|
|
|
static int hf_rtp_payload_type = -1;
|
|
|
|
static int hf_rtp_seq_nr = -1;
|
2007-02-21 06:45:34 +00:00
|
|
|
static int hf_rtp_ext_seq_nr = -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
static int hf_rtp_timestamp = -1;
|
|
|
|
static int hf_rtp_ssrc = -1;
|
2007-07-23 14:39:17 +00:00
|
|
|
static int hf_rtp_csrc_items = -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
static int hf_rtp_csrc_item = -1;
|
|
|
|
static int hf_rtp_data = -1;
|
|
|
|
static int hf_rtp_padding_data = -1;
|
|
|
|
static int hf_rtp_padding_count= -1;
|
2006-06-27 12:40:53 +00:00
|
|
|
static int hf_rtp_rfc2198_follow= -1;
|
|
|
|
static int hf_rtp_rfc2198_tm_off= -1;
|
|
|
|
static int hf_rtp_rfc2198_bl_len= -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/* RTP header extension fields */
|
|
|
|
static int hf_rtp_prof_define = -1;
|
|
|
|
static int hf_rtp_length = -1;
|
2007-07-23 14:39:17 +00:00
|
|
|
static int hf_rtp_hdr_exts = -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
static int hf_rtp_hdr_ext = -1;
|
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
/* RTP header ED137A extension fields */
|
|
|
|
static int hf_rtp_hdr_ed137s = -1;
|
|
|
|
static int hf_rtp_hdr_ed137 = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ptt_type = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_squ = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ptt_id = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_sct = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_x = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_x_nu = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_type = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_len = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_value = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_bss_qidx = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_bss_rssi_qidx = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_bss_qidx_ml = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_ft_bss_nu = -1;
|
|
|
|
static int hf_rtp_hdr_ed137_vf = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ptt_type = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_squ = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ptt_id = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_pm = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ptts = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_sct = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_reserved = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_x = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_x_nu = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ft_type = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ft_len = -1;
|
|
|
|
static int hf_rtp_hdr_ed137a_ft_value = -1;
|
|
|
|
static gint ett_hdr_ext_ed137s = -1;
|
|
|
|
static gint ett_hdr_ext_ed137 = -1;
|
|
|
|
static gint ett_hdr_ext_ed137a = -1;
|
|
|
|
|
2004-06-15 18:26:08 +00:00
|
|
|
/* RTP setup fields */
|
|
|
|
static int hf_rtp_setup = -1;
|
|
|
|
static int hf_rtp_setup_frame = -1;
|
|
|
|
static int hf_rtp_setup_method = -1;
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* RTP fields defining a sub tree */
|
|
|
|
static gint ett_rtp = -1;
|
|
|
|
static gint ett_csrc_list = -1;
|
|
|
|
static gint ett_hdr_ext = -1;
|
2012-07-23 15:52:17 +00:00
|
|
|
static gint ett_hdr_ext_rfc5285 = -1;
|
2004-06-15 18:26:08 +00:00
|
|
|
static gint ett_rtp_setup = -1;
|
2006-06-27 12:40:53 +00:00
|
|
|
static gint ett_rtp_rfc2198 = -1;
|
|
|
|
static gint ett_rtp_rfc2198_hdr = -1;
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2007-08-21 07:23:34 +00:00
|
|
|
/* SRTP fields */
|
|
|
|
static int hf_srtp_encrypted_payload = -1;
|
|
|
|
static int hf_srtp_mki = -1;
|
|
|
|
static int hf_srtp_auth_tag = -1;
|
2005-02-08 20:54:08 +00:00
|
|
|
|
2006-02-09 17:42:42 +00:00
|
|
|
/* PacketCable CCC header fields */
|
|
|
|
static int proto_pkt_ccc = -1;
|
|
|
|
static int hf_pkt_ccc_id = -1;
|
|
|
|
static int hf_pkt_ccc_ts = -1;
|
|
|
|
|
|
|
|
/* PacketCable CCC field defining a sub tree */
|
|
|
|
static gint ett_pkt_ccc = -1;
|
|
|
|
|
|
|
|
/* PacketCable CCC port preference */
|
2008-07-11 19:56:43 +00:00
|
|
|
static guint global_pkt_ccc_udp_port = 0;
|
2006-02-09 17:42:42 +00:00
|
|
|
|
2012-07-23 15:52:17 +00:00
|
|
|
/* RFC 5285 Header extensions */
|
|
|
|
static int hf_rtp_ext_rfc5285_id = -1;
|
|
|
|
static int hf_rtp_ext_rfc5285_length = -1;
|
|
|
|
static int hf_rtp_ext_rfc5285_appbits = -1;
|
|
|
|
static int hf_rtp_ext_rfc5285_data = -1;
|
2006-02-09 17:42:42 +00:00
|
|
|
|
2005-02-08 20:54:08 +00:00
|
|
|
#define RTP0_INVALID 0
|
2013-04-10 11:46:31 +00:00
|
|
|
#define RTP0_STUN 1
|
|
|
|
#define RTP0_CLASSICSTUN 2
|
|
|
|
#define RTP0_T38 3
|
|
|
|
#define RTP0_SPRT 4
|
2005-02-08 20:54:08 +00:00
|
|
|
|
2012-11-29 20:15:37 +00:00
|
|
|
static const enum_val_t rtp_version0_types[] = {
|
2008-09-25 22:06:58 +00:00
|
|
|
{ "invalid", "Invalid or ZRTP packets", RTP0_INVALID },
|
2013-04-10 11:46:31 +00:00
|
|
|
{ "stun", "STUN packets", RTP0_STUN },
|
2009-09-13 23:03:38 +00:00
|
|
|
{ "classicstun", "CLASSIC-STUN packets", RTP0_CLASSICSTUN },
|
2006-01-29 00:40:40 +00:00
|
|
|
{ "t38", "T.38 packets", RTP0_T38 },
|
2012-07-21 12:38:59 +00:00
|
|
|
{ "sprt", "SPRT packets", RTP0_SPRT },
|
2005-02-08 20:54:08 +00:00
|
|
|
{ NULL, NULL, 0 }
|
|
|
|
};
|
2008-07-11 19:56:43 +00:00
|
|
|
static gint global_rtp_version0_type = 0;
|
2005-02-08 20:54:08 +00:00
|
|
|
|
2001-11-26 04:52:51 +00:00
|
|
|
static dissector_handle_t data_handle;
|
2001-05-27 07:37:46 +00:00
|
|
|
|
2007-02-16 13:47:49 +00:00
|
|
|
/* Forward declaration we need below */
|
|
|
|
void proto_reg_handoff_rtp(void);
|
2008-09-15 19:33:38 +00:00
|
|
|
void proto_reg_handoff_pkt_ccc(void);
|
2007-02-16 13:47:49 +00:00
|
|
|
|
2011-09-09 21:20:17 +00:00
|
|
|
static void dissect_rtp( tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *tree );
|
2004-06-15 18:26:08 +00:00
|
|
|
static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
2005-04-04 20:12:18 +00:00
|
|
|
static void get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info);
|
2004-06-15 18:26:08 +00:00
|
|
|
|
|
|
|
/* Preferences bool to control whether or not setup info should be shown */
|
|
|
|
static gboolean global_rtp_show_setup_info = TRUE;
|
|
|
|
|
2004-07-01 06:59:38 +00:00
|
|
|
/* Try heuristic RTP decode */
|
|
|
|
static gboolean global_rtp_heur = FALSE;
|
|
|
|
|
From Richard van der Hoff:
Along with this bug, identified by Mark, there is another problem, in that one of the chunks of my earlier patch seemed to get missed off when Anders committed it. This won't break anything yet, as the H.223-over-RTP dissection hasn't landed on trunk yet, but it will cause all sorts of nasties when it does.
Here is a new patch, against current trunk, which should fix Mark's bug, my bug, and a comment typo.
And a patch wich improves the general robustness of the h.223 dissector (making it less likely to crash on malformed data).
Hopefully this also fixes a bug raised by Fabio Sguanci a few weeks ago.
Fabio: I think a better way to fix the problem is to stop the dissector crashing when it finds a malformed PDU, so that it just treats the first pdu as malformed; there is then no need to special-case it.
svn path=/trunk/; revision=20898
2007-02-22 20:40:19 +00:00
|
|
|
/* desegment RTP streams */
|
|
|
|
static gboolean desegment_rtp = TRUE;
|
2007-02-21 06:45:34 +00:00
|
|
|
|
2007-02-16 13:47:49 +00:00
|
|
|
/* RFC2198 Redundant Audio Data */
|
2006-06-27 12:40:53 +00:00
|
|
|
static guint rtp_rfc2198_pt = 99;
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/*
|
|
|
|
* Fields in the first octet of the RTP header.
|
|
|
|
*/
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Version is the first 2 bits of the first octet*/
|
|
|
|
#define RTP_VERSION(octet) ((octet) >> 6)
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Padding is the third bit; No need to shift, because true is any value
|
|
|
|
other than 0! */
|
|
|
|
#define RTP_PADDING(octet) ((octet) & 0x20)
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Extension bit is the fourth bit */
|
|
|
|
#define RTP_EXTENSION(octet) ((octet) & 0x10)
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
/* ED137 signature */
|
|
|
|
#define RTP_ED137_SIG 0x0067
|
|
|
|
|
|
|
|
/* ED137A signature */
|
|
|
|
#define RTP_ED137A_SIG 0x0167
|
|
|
|
|
|
|
|
/* ED137 PTT */
|
|
|
|
#define RTP_ED137_ptt_mask(octet) ((octet) & 0xE0000000)
|
|
|
|
#define RTP_ED137A_ptt_mask(octet) ((octet) & 0xE0000000)
|
|
|
|
#define RTP_ED137_squ_mask(octet) ((octet) & 0x10000000)
|
|
|
|
#define RTP_ED137A_squ_mask(octet) ((octet) & 0x10000000)
|
|
|
|
|
|
|
|
/* ED137 extended information */
|
|
|
|
#define RTP_ED137_extended_information(octet) ((octet) & 0x00400000)
|
|
|
|
#define RTP_ED137A_extended_information(octet) ((octet) & 0x00010000)
|
|
|
|
|
|
|
|
/* ED137 feature type */
|
|
|
|
#define RTP_ED137_feature_type(octet) (((octet) & 0x003C0000) >> 18)
|
|
|
|
#define RTP_ED137A_feature_type(octet) (((octet) & 0x0000F000) >> 12)
|
|
|
|
|
|
|
|
/* ED137 feature length */
|
|
|
|
#define RTP_ED137_feature_length(octet) (((octet) & 0x0003C000) >> 14)
|
|
|
|
#define RTP_ED137A_feature_length(octet) (((octet) & 0x00000F00) >> 8)
|
|
|
|
|
|
|
|
/* ED137 feature value */
|
|
|
|
#define RTP_ED137_feature_value(octet) (((octet) & 0x00003FFE) >> 1)
|
|
|
|
#define RTP_ED137A_feature_value(octet) (((octet) & 0x000000FF) >> 0)
|
|
|
|
|
|
|
|
/* ED137 BSS constants */
|
|
|
|
#define RTP_ED137_feature_bss_type 0x1
|
|
|
|
#define RTP_ED137_feature_bss_len 11
|
|
|
|
#define RTP_ED137_feature_bss_qidx(octet) (((octet) & 0x00003FC0) >> 6)
|
|
|
|
#define RTP_ED137_feature_bss_qidx_ml(octet) (((octet) & 0x00000038) >> 2)
|
|
|
|
|
|
|
|
/* RFC 5215 one byte header signature */
|
|
|
|
#define RTP_RFC5215_ONE_BYTE_SIG 0xBEDE
|
|
|
|
|
|
|
|
/* RFC 5215 two byte header mask and signature */
|
|
|
|
#define RTP_RFC5215_TWO_BYTE_MASK 0xFFF0
|
|
|
|
#define RTP_RFC5215_TWO_BYTE_SIG 0x1000
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* CSRC count is the last four bits */
|
|
|
|
#define RTP_CSRC_COUNT(octet) ((octet) & 0xF)
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
static const value_string rtp_version_vals[] =
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
2010-11-08 14:43:59 +00:00
|
|
|
{ 2, "RFC 1889 Version" }, /* First for speed */
|
2000-10-19 06:45:11 +00:00
|
|
|
{ 0, "Old VAT Version" },
|
|
|
|
{ 1, "First Draft Version" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
static const value_string rtp_ext_profile_vals[] =
|
|
|
|
{
|
|
|
|
{ RTP_ED137_SIG, "ED137" },
|
|
|
|
{ RTP_ED137A_SIG, "ED137A" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_ptt_type[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "PTT OFF" },
|
|
|
|
{ 0x01, "Normal PTT ON" },
|
|
|
|
{ 0x02, "Coupling PTT ON" },
|
|
|
|
{ 0x03, "Priority PTT ON" },
|
|
|
|
{ 0x04, "Emergency PTT ON" },
|
|
|
|
{ 0x05, "Reserved" },
|
|
|
|
{ 0x06, "Reserved" },
|
|
|
|
{ 0x07, "Reserved" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_squ[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "SQ OFF" },
|
|
|
|
{ 0x01, "SQ ON" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_ft_type[] =
|
|
|
|
{
|
|
|
|
{ 0x0, "No features" },
|
|
|
|
{ 0x1, "Best signal selection" },
|
|
|
|
{ 0x2, "CLIMAX time delay" },
|
|
|
|
{ 0x3, "Reserved" },
|
|
|
|
{ 0x4, "Reserved" },
|
|
|
|
{ 0x5, "Reserved" },
|
|
|
|
{ 0x6, "Reserved" },
|
|
|
|
{ 0x7, "Reserved" },
|
|
|
|
{ 0x8, "Reserved" },
|
|
|
|
{ 0x9, "Reserved" },
|
|
|
|
{ 0xA, "Reserved" },
|
|
|
|
{ 0xB, "Vendor reserved" },
|
|
|
|
{ 0xC, "Vendor reserved" },
|
|
|
|
{ 0xD, "Vendor reserved" },
|
|
|
|
{ 0xE, "Vendor reserved" },
|
|
|
|
{ 0xF, "Vendor reserved" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_vf[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "VF OFF" },
|
|
|
|
{ 0x01, "VF ON" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_ft_bss_rssi_qidx[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "lower than -100.00 dBm" },
|
|
|
|
{ 0x01, "lower than or equal to -97.86 dBm" },
|
|
|
|
{ 0x02, "lower than or equal to -95.71 dBm" },
|
|
|
|
{ 0x03, "lower than or equal to -93.57 dBm" },
|
|
|
|
{ 0x04, "lower than or equal to -91.43 dBm" },
|
|
|
|
{ 0x05, "lower than or equal to -89.29 dBm" },
|
|
|
|
{ 0x06, "lower than or equal to -87.14 dBm" },
|
|
|
|
{ 0x07, "lower than or equal to -85.00 dBm" },
|
|
|
|
{ 0x08, "lower than or equal to -82.86 dBm" },
|
|
|
|
{ 0x09, "lower than or equal to -80.71 dBm" },
|
|
|
|
{ 0x0a, "lower than or equal to -78.57 dBm" },
|
|
|
|
{ 0x0b, "lower than or equal to -76.43 dBm" },
|
|
|
|
{ 0x0c, "lower than or equal to -74.29 dBm" },
|
|
|
|
{ 0x0d, "lower than or equal to -72.14 dBm" },
|
|
|
|
{ 0x0e, "lower than or equal to -70.00 dBm" },
|
|
|
|
{ 0x0f, "higher than -70.00 dBm" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137_ft_bss_qidx_ml[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "RSSI" },
|
|
|
|
{ 0x01, "AGC Level" },
|
|
|
|
{ 0x02, "C/N" },
|
|
|
|
{ 0x03, "Standardized PSD" },
|
|
|
|
{ 0x04, "Vendor specific method" },
|
|
|
|
{ 0x05, "Vendor specific method" },
|
|
|
|
{ 0x06, "Vendor specific method" },
|
|
|
|
{ 0x07, "Vendor specific method" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137a_ptt_type[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "PTT OFF" },
|
|
|
|
{ 0x01, "Normal PTT ON" },
|
|
|
|
{ 0x02, "Coupling PTT ON" },
|
|
|
|
{ 0x03, "Priority PTT ON" },
|
|
|
|
{ 0x04, "Emergency PTT ON" },
|
|
|
|
{ 0x05, "Reserved" },
|
|
|
|
{ 0x06, "Reserved" },
|
|
|
|
{ 0x07, "Reserved" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137a_squ[] =
|
|
|
|
{
|
|
|
|
{ 0x00, "SQ OFF" },
|
|
|
|
{ 0x01, "SQ ON" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string rtp_ext_ed137a_ft_type[] =
|
|
|
|
{
|
|
|
|
{ 0x0, "No features" },
|
|
|
|
{ 0x1, "Signal Quality Information" },
|
|
|
|
{ 0x2, "CLIMAX time delay" },
|
|
|
|
{ 0x3, "Radio remote control" },
|
|
|
|
{ 0x4, "CLIMAX dynamic delay compensation" },
|
|
|
|
{ 0x5, "Reserved" },
|
|
|
|
{ 0x6, "Reserved" },
|
|
|
|
{ 0x7, "Reserved" },
|
|
|
|
{ 0x8, "Reserved" },
|
|
|
|
{ 0x9, "Reserved" },
|
|
|
|
{ 0xA, "Reserved" },
|
|
|
|
{ 0xB, "Vendor reserved" },
|
|
|
|
{ 0xC, "Vendor reserved" },
|
|
|
|
{ 0xD, "Vendor reserved" },
|
|
|
|
{ 0xE, "Vendor reserved" },
|
|
|
|
{ 0xF, "Vendor reserved" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/*
|
|
|
|
* Fields in the second octet of the RTP header.
|
|
|
|
*/
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Marker is the first bit of the second octet */
|
|
|
|
#define RTP_MARKER(octet) ((octet) & 0x80)
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Payload type is the last 7 bits */
|
|
|
|
#define RTP_PAYLOAD_TYPE(octet) ((octet) & 0x7F)
|
2010-11-08 14:43:59 +00:00
|
|
|
/* http://www.iana.org/assignments/rtp-parameters */
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2010-11-08 14:43:59 +00:00
|
|
|
static const value_string rtp_payload_type_vals[] =
|
2004-06-01 23:08:00 +00:00
|
|
|
{
|
2010-11-08 14:43:59 +00:00
|
|
|
/* 0 */ { PT_PCMU, "ITU-T G.711 PCMU" },
|
|
|
|
/* 1 */ { PT_1016, "USA Federal Standard FS-1016" },
|
|
|
|
/* 2 */ { PT_G721, "ITU-T G.721" },
|
|
|
|
/* 3 */ { PT_GSM, "GSM 06.10" },
|
|
|
|
/* 4 */ { PT_G723, "ITU-T G.723" },
|
|
|
|
/* 5 */ { PT_DVI4_8000, "DVI4 8000 samples/s" },
|
|
|
|
/* 6 */ { PT_DVI4_16000, "DVI4 16000 samples/s" },
|
|
|
|
/* 7 */ { PT_LPC, "Experimental linear predictive encoding from Xerox PARC" },
|
|
|
|
/* 8 */ { PT_PCMA, "ITU-T G.711 PCMA" },
|
|
|
|
/* 9 */ { PT_G722, "ITU-T G.722" },
|
|
|
|
/* 10 */ { PT_L16_STEREO, "16-bit uncompressed audio, stereo" },
|
|
|
|
/* 11 */ { PT_L16_MONO, "16-bit uncompressed audio, monaural" },
|
|
|
|
/* 12 */ { PT_QCELP, "Qualcomm Code Excited Linear Predictive coding" },
|
|
|
|
/* 13 */ { PT_CN, "Comfort noise" },
|
|
|
|
/* 14 */ { PT_MPA, "MPEG-I/II Audio"},
|
|
|
|
/* 15 */ { PT_G728, "ITU-T G.728" },
|
|
|
|
/* 16 */ { PT_DVI4_11025, "DVI4 11025 samples/s" },
|
|
|
|
/* 17 */ { PT_DVI4_22050, "DVI4 22050 samples/s" },
|
|
|
|
/* 18 */ { PT_G729, "ITU-T G.729" },
|
|
|
|
/* 19 */ { PT_CN_OLD, "Comfort noise (old)" },
|
|
|
|
/* 20 */ { 20, "Unassigned" },
|
|
|
|
/* 21 */ { 21, "Unassigned" },
|
|
|
|
/* 22 */ { 22, "Unassigned" },
|
|
|
|
/* 23 */ { 23, "Unassigned" },
|
|
|
|
/* 24 */ { 24, "Unassigned" },
|
|
|
|
/* 25 */ { PT_CELB, "Sun CellB video encoding" },
|
|
|
|
/* 26 */ { PT_JPEG, "JPEG-compressed video" },
|
|
|
|
/* 27 */ { 27, "Unassigned" },
|
|
|
|
/* 28 */ { PT_NV, "'nv' program" },
|
|
|
|
/* 29 */ { 29, "Unassigned" },
|
|
|
|
/* 30 */ { 30, "Unassigned" },
|
|
|
|
/* 31 */ { PT_H261, "ITU-T H.261" },
|
|
|
|
/* 32 */ { PT_MPV, "MPEG-I/II Video"},
|
|
|
|
/* 33 */ { PT_MP2T, "MPEG-II transport streams"},
|
|
|
|
/* 34 */ { PT_H263, "ITU-T H.263" },
|
|
|
|
/* 35-71 Unassigned */
|
|
|
|
/* 35 */ { 35, "Unassigned" },
|
|
|
|
/* 36 */ { 36, "Unassigned" },
|
|
|
|
/* 37 */ { 37, "Unassigned" },
|
|
|
|
/* 38 */ { 38, "Unassigned" },
|
|
|
|
/* 39 */ { 39, "Unassigned" },
|
|
|
|
/* 40 */ { 40, "Unassigned" },
|
|
|
|
/* 41 */ { 41, "Unassigned" },
|
|
|
|
/* 42 */ { 42, "Unassigned" },
|
|
|
|
/* 43 */ { 43, "Unassigned" },
|
|
|
|
/* 44 */ { 44, "Unassigned" },
|
|
|
|
/* 45 */ { 45, "Unassigned" },
|
|
|
|
/* 46 */ { 46, "Unassigned" },
|
|
|
|
/* 47 */ { 47, "Unassigned" },
|
|
|
|
/* 48 */ { 48, "Unassigned" },
|
|
|
|
/* 49 */ { 49, "Unassigned" },
|
|
|
|
/* 50 */ { 50, "Unassigned" },
|
|
|
|
/* 51 */ { 51, "Unassigned" },
|
|
|
|
/* 52 */ { 52, "Unassigned" },
|
|
|
|
/* 53 */ { 53, "Unassigned" },
|
|
|
|
/* 54 */ { 54, "Unassigned" },
|
|
|
|
/* 55 */ { 55, "Unassigned" },
|
|
|
|
/* 56 */ { 56, "Unassigned" },
|
|
|
|
/* 57 */ { 57, "Unassigned" },
|
|
|
|
/* 58 */ { 58, "Unassigned" },
|
|
|
|
/* 59 */ { 59, "Unassigned" },
|
|
|
|
/* 60 */ { 60, "Unassigned" },
|
|
|
|
/* 61 */ { 61, "Unassigned" },
|
|
|
|
/* 62 */ { 62, "Unassigned" },
|
|
|
|
/* 63 */ { 63, "Unassigned" },
|
|
|
|
/* 64 */ { 64, "Unassigned" },
|
|
|
|
/* 65 */ { 65, "Unassigned" },
|
|
|
|
/* 66 */ { 66, "Unassigned" },
|
|
|
|
/* 67 */ { 67, "Unassigned" },
|
|
|
|
/* 68 */ { 68, "Unassigned" },
|
|
|
|
/* 69 */ { 69, "Unassigned" },
|
|
|
|
/* 70 */ { 70, "Unassigned" },
|
|
|
|
/* 71 */ { 71, "Unassigned" },
|
|
|
|
/* 72-76 Reserved for RTCP conflict avoidance [RFC3551] */
|
|
|
|
/* 72 */ { 72, "Reserved for RTCP conflict avoidance" },
|
|
|
|
/* 73 */ { 73, "Reserved for RTCP conflict avoidance" },
|
|
|
|
/* 74 */ { 74, "Reserved for RTCP conflict avoidance" },
|
|
|
|
/* 75 */ { 75, "Reserved for RTCP conflict avoidance" },
|
|
|
|
/* 76 */ { 76, "Reserved for RTCP conflict avoidance" },
|
|
|
|
/* 77-95 Unassigned ? */
|
|
|
|
/* 77 */ { 77, "Unassigned" },
|
|
|
|
/* 78 */ { 78, "Unassigned" },
|
|
|
|
/* 79 */ { 79, "Unassigned" },
|
|
|
|
/* 80 */ { 80, "Unassigned" },
|
|
|
|
/* 81 */ { 81, "Unassigned" },
|
|
|
|
/* 82 */ { 82, "Unassigned" },
|
|
|
|
/* 83 */ { 83, "Unassigned" },
|
|
|
|
/* 84 */ { 84, "Unassigned" },
|
|
|
|
/* 85 */ { 85, "Unassigned" },
|
|
|
|
/* 86 */ { 86, "Unassigned" },
|
|
|
|
/* 87 */ { 87, "Unassigned" },
|
|
|
|
/* 88 */ { 88, "Unassigned" },
|
|
|
|
/* 89 */ { 89, "Unassigned" },
|
|
|
|
/* 90 */ { 90, "Unassigned" },
|
|
|
|
/* 91 */ { 91, "Unassigned" },
|
|
|
|
/* 92 */ { 92, "Unassigned" },
|
|
|
|
/* 93 */ { 93, "Unassigned" },
|
|
|
|
/* 94 */ { 94, "Unassigned" },
|
|
|
|
/* 95 */ { 95, "Unassigned" },
|
2012-06-01 18:35:20 +00:00
|
|
|
/* Added to support addtional RTP payload types
|
|
|
|
* See epan/rtp_pt.h */
|
|
|
|
{ PT_UNDF_96, "DynamicRTP-Type-96" },
|
|
|
|
{ PT_UNDF_97, "DynamicRTP-Type-97" },
|
|
|
|
{ PT_UNDF_98, "DynamicRTP-Type-98" },
|
|
|
|
{ PT_UNDF_99, "DynamicRTP-Type-99" },
|
|
|
|
{ PT_UNDF_100, "DynamicRTP-Type-100" },
|
|
|
|
{ PT_UNDF_101, "DynamicRTP-Type-101" },
|
|
|
|
{ PT_UNDF_102, "DynamicRTP-Type-102" },
|
|
|
|
{ PT_UNDF_103, "DynamicRTP-Type-103" },
|
|
|
|
{ PT_UNDF_104, "DynamicRTP-Type-104" },
|
|
|
|
{ PT_UNDF_105, "DynamicRTP-Type-105" },
|
|
|
|
{ PT_UNDF_106, "DynamicRTP-Type-106" },
|
|
|
|
{ PT_UNDF_107, "DynamicRTP-Type-107" },
|
|
|
|
{ PT_UNDF_108, "DynamicRTP-Type-108" },
|
|
|
|
{ PT_UNDF_109, "DynamicRTP-Type-109" },
|
|
|
|
{ PT_UNDF_110, "DynamicRTP-Type-110" },
|
|
|
|
{ PT_UNDF_111, "DynamicRTP-Type-111" },
|
|
|
|
{ PT_UNDF_112, "DynamicRTP-Type-112" },
|
|
|
|
{ PT_UNDF_113, "DynamicRTP-Type-113" },
|
|
|
|
{ PT_UNDF_114, "DynamicRTP-Type-114" },
|
|
|
|
{ PT_UNDF_115, "DynamicRTP-Type-115" },
|
|
|
|
{ PT_UNDF_116, "DynamicRTP-Type-116" },
|
|
|
|
{ PT_UNDF_117, "DynamicRTP-Type-117" },
|
|
|
|
{ PT_UNDF_118, "DynamicRTP-Type-118" },
|
|
|
|
{ PT_UNDF_119, "DynamicRTP-Type-119" },
|
|
|
|
{ PT_UNDF_120, "DynamicRTP-Type-120" },
|
|
|
|
{ PT_UNDF_121, "DynamicRTP-Type-121" },
|
|
|
|
{ PT_UNDF_122, "DynamicRTP-Type-122" },
|
|
|
|
{ PT_UNDF_123, "DynamicRTP-Type-123" },
|
|
|
|
{ PT_UNDF_124, "DynamicRTP-Type-124" },
|
|
|
|
{ PT_UNDF_125, "DynamicRTP-Type-125" },
|
|
|
|
{ PT_UNDF_126, "DynamicRTP-Type-126" },
|
|
|
|
{ PT_UNDF_127, "DynamicRTP-Type-127" },
|
|
|
|
|
|
|
|
{ 0, NULL },
|
2004-06-01 23:08:00 +00:00
|
|
|
};
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2010-11-08 14:43:59 +00:00
|
|
|
value_string_ext rtp_payload_type_vals_ext = VALUE_STRING_EXT_INIT(rtp_payload_type_vals);
|
|
|
|
|
|
|
|
static const value_string rtp_payload_type_short_vals[] =
|
2005-02-01 12:12:35 +00:00
|
|
|
{
|
2009-05-20 23:46:48 +00:00
|
|
|
{ PT_PCMU, "g711U" },
|
|
|
|
{ PT_1016, "fs-1016" },
|
|
|
|
{ PT_G721, "g721" },
|
|
|
|
{ PT_GSM, "GSM" },
|
|
|
|
{ PT_G723, "g723" },
|
|
|
|
{ PT_DVI4_8000, "DVI4 8k" },
|
|
|
|
{ PT_DVI4_16000, "DVI4 16k" },
|
|
|
|
{ PT_LPC, "Exp. from Xerox PARC" },
|
|
|
|
{ PT_PCMA, "g711A" },
|
|
|
|
{ PT_G722, "g722" },
|
|
|
|
{ PT_L16_STEREO, "16-bit audio, stereo" },
|
|
|
|
{ PT_L16_MONO, "16-bit audio, monaural" },
|
|
|
|
{ PT_QCELP, "Qualcomm" },
|
|
|
|
{ PT_CN, "CN" },
|
|
|
|
{ PT_MPA, "MPEG-I/II Audio"},
|
|
|
|
{ PT_G728, "g728" },
|
|
|
|
{ PT_DVI4_11025, "DVI4 11k" },
|
|
|
|
{ PT_DVI4_22050, "DVI4 22k" },
|
|
|
|
{ PT_G729, "g729" },
|
|
|
|
{ PT_CN_OLD, "CN(old)" },
|
2012-06-01 18:35:20 +00:00
|
|
|
{ 20, "Unassigned" },
|
|
|
|
{ 21, "Unassigned" },
|
|
|
|
{ 22, "Unassigned" },
|
|
|
|
{ 23, "Unassigned" },
|
|
|
|
{ 24, "Unassigned" },
|
2009-05-20 23:46:48 +00:00
|
|
|
{ PT_CELB, "CellB" },
|
|
|
|
{ PT_JPEG, "JPEG" },
|
2012-06-01 18:35:20 +00:00
|
|
|
{ 27, "Unassigned" },
|
2009-05-20 23:46:48 +00:00
|
|
|
{ PT_NV, "NV" },
|
2012-06-01 18:35:20 +00:00
|
|
|
{ 29, "Unassigned" },
|
|
|
|
{ 30, "Unassigned" },
|
2009-05-20 23:46:48 +00:00
|
|
|
{ PT_H261, "h261" },
|
|
|
|
{ PT_MPV, "MPEG-I/II Video"},
|
|
|
|
{ PT_MP2T, "MPEG-II streams"},
|
|
|
|
{ PT_H263, "h263" },
|
2010-11-08 14:43:59 +00:00
|
|
|
/* 35-71 Unassigned */
|
2012-06-01 18:35:20 +00:00
|
|
|
{ 35, "Unassigned" },
|
|
|
|
{ 36, "Unassigned" },
|
|
|
|
{ 37, "Unassigned" },
|
|
|
|
{ 38, "Unassigned" },
|
|
|
|
{ 39, "Unassigned" },
|
|
|
|
{ 40, "Unassigned" },
|
|
|
|
{ 41, "Unassigned" },
|
|
|
|
{ 42, "Unassigned" },
|
|
|
|
{ 43, "Unassigned" },
|
|
|
|
{ 44, "Unassigned" },
|
|
|
|
{ 45, "Unassigned" },
|
|
|
|
{ 46, "Unassigned" },
|
|
|
|
{ 47, "Unassigned" },
|
|
|
|
{ 48, "Unassigned" },
|
|
|
|
{ 49, "Unassigned" },
|
|
|
|
{ 50, "Unassigned" },
|
|
|
|
{ 51, "Unassigned" },
|
|
|
|
{ 52, "Unassigned" },
|
|
|
|
{ 53, "Unassigned" },
|
|
|
|
{ 54, "Unassigned" },
|
|
|
|
{ 55, "Unassigned" },
|
|
|
|
{ 56, "Unassigned" },
|
|
|
|
{ 57, "Unassigned" },
|
|
|
|
{ 58, "Unassigned" },
|
|
|
|
{ 59, "Unassigned" },
|
|
|
|
{ 60, "Unassigned" },
|
|
|
|
{ 61, "Unassigned" },
|
|
|
|
{ 62, "Unassigned" },
|
|
|
|
{ 63, "Unassigned" },
|
|
|
|
{ 64, "Unassigned" },
|
|
|
|
{ 65, "Unassigned" },
|
|
|
|
{ 66, "Unassigned" },
|
|
|
|
{ 67, "Unassigned" },
|
|
|
|
{ 68, "Unassigned" },
|
|
|
|
{ 69, "Unassigned" },
|
|
|
|
{ 70, "Unassigned" },
|
|
|
|
{ 71, "Unassigned" },
|
|
|
|
/* 72-76 Reserved for RTCP conflict avoidance - [RFC3551] */
|
|
|
|
{ 72, "Reserved for RTCP conflict avoidance" },
|
|
|
|
{ 73, "Reserved for RTCP conflict avoidance" },
|
|
|
|
{ 74, "Reserved for RTCP conflict avoidance" },
|
|
|
|
{ 75, "Reserved for RTCP conflict avoidance" },
|
|
|
|
{ 76, "Reserved for RTCP conflict avoidance" },
|
2010-11-08 14:43:59 +00:00
|
|
|
/* 77-95 Unassigned ? */
|
2012-06-01 18:35:20 +00:00
|
|
|
{ 77, "Unassigned" },
|
|
|
|
{ 78, "Unassigned" },
|
|
|
|
{ 79, "Unassigned" },
|
|
|
|
{ 80, "Unassigned" },
|
|
|
|
{ 81, "Unassigned" },
|
|
|
|
{ 82, "Unassigned" },
|
|
|
|
{ 83, "Unassigned" },
|
|
|
|
{ 84, "Unassigned" },
|
|
|
|
{ 85, "Unassigned" },
|
|
|
|
{ 86, "Unassigned" },
|
|
|
|
{ 87, "Unassigned" },
|
|
|
|
{ 88, "Unassigned" },
|
|
|
|
{ 89, "Unassigned" },
|
|
|
|
{ 90, "Unassigned" },
|
|
|
|
{ 91, "Unassigned" },
|
|
|
|
{ 92, "Unassigned" },
|
|
|
|
{ 93, "Unassigned" },
|
|
|
|
{ 94, "Unassigned" },
|
|
|
|
{ 95, "Unassigned" },
|
2012-09-04 00:42:07 +00:00
|
|
|
/* Short RTP types */
|
2009-05-20 23:46:48 +00:00
|
|
|
{ PT_UNDF_96, "RTPType-96" },
|
|
|
|
{ PT_UNDF_97, "RTPType-97" },
|
|
|
|
{ PT_UNDF_98, "RTPType-98" },
|
|
|
|
{ PT_UNDF_99, "RTPType-99" },
|
|
|
|
{ PT_UNDF_100, "RTPType-100" },
|
|
|
|
{ PT_UNDF_101, "RTPType-101" },
|
|
|
|
{ PT_UNDF_102, "RTPType-102" },
|
|
|
|
{ PT_UNDF_103, "RTPType-103" },
|
|
|
|
{ PT_UNDF_104, "RTPType-104" },
|
|
|
|
{ PT_UNDF_105, "RTPType-105" },
|
|
|
|
{ PT_UNDF_106, "RTPType-106" },
|
|
|
|
{ PT_UNDF_107, "RTPType-107" },
|
|
|
|
{ PT_UNDF_108, "RTPType-108" },
|
|
|
|
{ PT_UNDF_109, "RTPType-109" },
|
|
|
|
{ PT_UNDF_110, "RTPType-110" },
|
|
|
|
{ PT_UNDF_111, "RTPType-111" },
|
|
|
|
{ PT_UNDF_112, "RTPType-112" },
|
|
|
|
{ PT_UNDF_113, "RTPType-113" },
|
|
|
|
{ PT_UNDF_114, "RTPType-114" },
|
|
|
|
{ PT_UNDF_115, "RTPType-115" },
|
|
|
|
{ PT_UNDF_116, "RTPType-116" },
|
|
|
|
{ PT_UNDF_117, "RTPType-117" },
|
|
|
|
{ PT_UNDF_118, "RTPType-118" },
|
|
|
|
{ PT_UNDF_119, "RTPType-119" },
|
|
|
|
{ PT_UNDF_120, "RTPType-120" },
|
|
|
|
{ PT_UNDF_121, "RTPType-121" },
|
|
|
|
{ PT_UNDF_122, "RTPType-122" },
|
|
|
|
{ PT_UNDF_123, "RTPType-123" },
|
|
|
|
{ PT_UNDF_124, "RTPType-124" },
|
|
|
|
{ PT_UNDF_125, "RTPType-125" },
|
|
|
|
{ PT_UNDF_126, "RTPType-126" },
|
|
|
|
{ PT_UNDF_127, "RTPType-127" },
|
|
|
|
|
|
|
|
{ 0, NULL },
|
2005-02-01 12:12:35 +00:00
|
|
|
};
|
2010-11-08 14:43:59 +00:00
|
|
|
value_string_ext rtp_payload_type_short_vals_ext = VALUE_STRING_EXT_INIT(rtp_payload_type_short_vals);
|
|
|
|
|
2008-02-25 19:08:13 +00:00
|
|
|
#if 0
|
2007-08-21 07:23:34 +00:00
|
|
|
static const value_string srtp_encryption_alg_vals[] =
|
|
|
|
{
|
|
|
|
{ SRTP_ENC_ALG_NULL, "Null Encryption" },
|
2012-06-01 18:35:20 +00:00
|
|
|
{ SRTP_ENC_ALG_AES_CM, "AES-128 Counter Mode" },
|
2007-08-21 07:23:34 +00:00
|
|
|
{ SRTP_ENC_ALG_AES_F8, "AES-128 F8 Mode" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string srtp_auth_alg_vals[] =
|
|
|
|
{
|
|
|
|
{ SRTP_AUTH_ALG_NONE, "No Authentication" },
|
|
|
|
{ SRTP_AUTH_ALG_HMAC_SHA1, "HMAC-SHA1" },
|
|
|
|
{ 0, NULL },
|
|
|
|
};
|
2008-02-25 19:08:13 +00:00
|
|
|
#endif
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
/* initialisation routine */
|
2012-06-01 18:35:20 +00:00
|
|
|
static void
|
|
|
|
rtp_fragment_init(void)
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
2013-03-22 23:59:54 +00:00
|
|
|
reassembly_table_init(&rtp_reassembly_table,
|
|
|
|
&addresses_reassembly_table_functions);
|
2007-02-21 06:45:34 +00:00
|
|
|
}
|
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
void
|
|
|
|
rtp_free_hash_dyn_payload(GHashTable *rtp_dyn_payload)
|
|
|
|
{
|
|
|
|
if (rtp_dyn_payload == NULL) return;
|
|
|
|
g_hash_table_destroy(rtp_dyn_payload);
|
|
|
|
rtp_dyn_payload = NULL;
|
|
|
|
}
|
|
|
|
|
2007-08-21 07:23:34 +00:00
|
|
|
/* Set up an SRTP conversation */
|
2012-06-01 18:35:20 +00:00
|
|
|
void
|
|
|
|
srtp_add_address(packet_info *pinfo, address *addr, int port, int other_port,
|
|
|
|
const gchar *setup_method, guint32 setup_frame_number,
|
|
|
|
gboolean is_video _U_, GHashTable *rtp_dyn_payload,
|
|
|
|
struct srtp_info *srtp_info)
|
2000-04-21 01:45:58 +00:00
|
|
|
{
|
2004-08-30 10:03:54 +00:00
|
|
|
address null_addr;
|
2004-08-18 07:34:15 +00:00
|
|
|
conversation_t* p_conv;
|
2004-06-15 18:26:08 +00:00
|
|
|
struct _rtp_conversation_info *p_conv_data = NULL;
|
2001-09-03 10:33:12 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If this isn't the first time this packet has been processed,
|
|
|
|
* we've already done this work, so we don't need to do it
|
|
|
|
* again.
|
|
|
|
*/
|
|
|
|
if (pinfo->fd->flags.visited)
|
2004-06-29 20:29:57 +00:00
|
|
|
{
|
2001-09-03 10:33:12 +00:00
|
|
|
return;
|
2004-06-29 20:29:57 +00:00
|
|
|
}
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2008-01-09 16:21:03 +00:00
|
|
|
#ifdef DEBUG
|
2012-06-01 18:35:20 +00:00
|
|
|
printf("#%u: %srtp_add_address(%s, %u, %u, %s, %u\n",
|
|
|
|
pinfo->fd->num, (srtp_info)?"s":"", ep_address_to_str(addr), port,
|
|
|
|
other_port, setup_method, setup_frame_number);
|
2008-01-09 16:21:03 +00:00
|
|
|
#endif
|
2008-01-09 13:30:31 +00:00
|
|
|
|
2004-08-30 10:03:54 +00:00
|
|
|
SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/*
|
2004-06-15 18:26:08 +00:00
|
|
|
* Check if the ip address and port combination is not
|
2004-08-18 07:34:15 +00:00
|
|
|
* already registered as a conversation.
|
2000-10-19 06:45:11 +00:00
|
|
|
*/
|
2012-06-01 18:35:20 +00:00
|
|
|
p_conv = find_conversation(setup_frame_number, addr, &null_addr, PT_UDP, port, other_port,
|
|
|
|
NO_ADDR_B | (!other_port ? NO_PORT_B : 0));
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/*
|
2004-08-18 07:34:15 +00:00
|
|
|
* If not, create a new conversation.
|
2000-10-19 06:45:11 +00:00
|
|
|
*/
|
2012-06-01 18:35:20 +00:00
|
|
|
if (!p_conv || p_conv->setup_frame != setup_frame_number) {
|
|
|
|
p_conv = conversation_new(setup_frame_number, addr, &null_addr, PT_UDP,
|
|
|
|
(guint32)port, (guint32)other_port,
|
|
|
|
NO_ADDR2 | (!other_port ? NO_PORT2 : 0));
|
2004-06-15 18:26:08 +00:00
|
|
|
}
|
2004-08-18 07:34:15 +00:00
|
|
|
|
|
|
|
/* Set dissector */
|
|
|
|
conversation_set_dissector(p_conv, rtp_handle);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check if the conversation has data associated with it.
|
|
|
|
*/
|
2013-03-17 16:48:47 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtp);
|
2004-08-18 07:34:15 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If not, add a new data item.
|
|
|
|
*/
|
2012-06-01 18:35:20 +00:00
|
|
|
if (! p_conv_data) {
|
2004-08-18 07:34:15 +00:00
|
|
|
/* Create conversation data */
|
2013-03-17 16:48:47 +00:00
|
|
|
p_conv_data = se_new(struct _rtp_conversation_info);
|
2005-03-27 21:37:05 +00:00
|
|
|
p_conv_data->rtp_dyn_payload = NULL;
|
2004-08-18 07:34:15 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* start this at 0x10000 so that we cope gracefully with the
|
|
|
|
* first few packets being out of order (hence 0,65535,1,2,...)
|
|
|
|
*/
|
|
|
|
p_conv_data->extended_seqno = 0x10000;
|
2013-03-17 16:48:47 +00:00
|
|
|
p_conv_data->rtp_conv_info = se_new(rtp_private_conv_info);
|
2007-02-21 06:45:34 +00:00
|
|
|
p_conv_data->rtp_conv_info->multisegment_pdus = se_tree_create(EMEM_TREE_TYPE_RED_BLACK,"rtp_ms_pdus");
|
2004-08-18 07:34:15 +00:00
|
|
|
conversation_add_proto_data(p_conv, proto_rtp, p_conv_data);
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2004-08-18 07:34:15 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Update the conversation data.
|
|
|
|
*/
|
2005-03-27 21:37:05 +00:00
|
|
|
/* Free the hash if already exists */
|
|
|
|
rtp_free_hash_dyn_payload(p_conv_data->rtp_dyn_payload);
|
|
|
|
|
2009-03-22 16:25:01 +00:00
|
|
|
g_strlcpy(p_conv_data->method, setup_method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
2004-08-18 07:34:15 +00:00
|
|
|
p_conv_data->frame_number = setup_frame_number;
|
2009-05-19 18:42:33 +00:00
|
|
|
p_conv_data->is_video = is_video;
|
2005-03-27 21:37:05 +00:00
|
|
|
p_conv_data->rtp_dyn_payload = rtp_dyn_payload;
|
2007-08-21 07:23:34 +00:00
|
|
|
p_conv_data->srtp_info = srtp_info;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set up an RTP conversation */
|
2012-06-01 18:35:20 +00:00
|
|
|
void
|
|
|
|
rtp_add_address(packet_info *pinfo, address *addr, int port, int other_port,
|
|
|
|
const gchar *setup_method, guint32 setup_frame_number,
|
|
|
|
gboolean is_video , GHashTable *rtp_dyn_payload)
|
2007-08-21 07:23:34 +00:00
|
|
|
{
|
2009-05-19 18:42:33 +00:00
|
|
|
srtp_add_address(pinfo, addr, port, other_port, setup_method, setup_frame_number, is_video, rtp_dyn_payload, NULL);
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
|
2001-11-27 07:13:32 +00:00
|
|
|
static gboolean
|
2012-06-01 18:35:20 +00:00
|
|
|
dissect_rtp_heur_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean check_destport)
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
2011-09-09 20:37:49 +00:00
|
|
|
guint8 octet1;
|
2012-09-04 00:42:07 +00:00
|
|
|
unsigned int version;
|
|
|
|
unsigned int offset = 0;
|
2006-02-09 17:42:42 +00:00
|
|
|
|
2004-07-01 06:59:38 +00:00
|
|
|
/* This is a heuristic dissector, which means we get all the UDP
|
2000-11-05 09:30:11 +00:00
|
|
|
* traffic not sent to a known dissector and not claimed by
|
|
|
|
* a heuristic dissector called before us!
|
2000-10-19 06:45:11 +00:00
|
|
|
*/
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2004-07-01 06:59:38 +00:00
|
|
|
if (! global_rtp_heur)
|
2000-10-19 06:45:11 +00:00
|
|
|
return FALSE;
|
|
|
|
|
2004-07-01 06:59:38 +00:00
|
|
|
/* Get the fields in the first octet */
|
|
|
|
octet1 = tvb_get_guint8( tvb, offset );
|
|
|
|
version = RTP_VERSION( octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2005-02-08 20:54:08 +00:00
|
|
|
if (version == 0) {
|
2008-09-25 22:06:58 +00:00
|
|
|
if (!(tvb_memeql(tvb, 4, "ZRTP", 4)))
|
|
|
|
{
|
2012-09-11 08:28:07 +00:00
|
|
|
call_dissector_only(zrtp_handle, tvb, pinfo, tree, NULL);
|
2008-09-25 22:06:58 +00:00
|
|
|
return TRUE;
|
|
|
|
} else {
|
|
|
|
switch (global_rtp_version0_type) {
|
2013-04-10 11:46:31 +00:00
|
|
|
case RTP0_STUN:
|
|
|
|
return call_dissector_only(stun_heur_handle, tvb, pinfo, tree, NULL);
|
2009-09-13 23:03:38 +00:00
|
|
|
case RTP0_CLASSICSTUN:
|
2012-09-11 08:28:07 +00:00
|
|
|
return call_dissector_only(classicstun_heur_handle, tvb, pinfo, tree, NULL);
|
2009-09-06 14:25:47 +00:00
|
|
|
|
2008-03-07 18:15:46 +00:00
|
|
|
case RTP0_T38:
|
2009-02-12 17:30:15 +00:00
|
|
|
/* XXX: Should really be calling a heuristic dissector for T38 ??? */
|
2012-09-11 08:28:07 +00:00
|
|
|
call_dissector_only(t38_handle, tvb, pinfo, tree, NULL);
|
2008-03-07 18:15:46 +00:00
|
|
|
return TRUE;
|
2009-09-06 14:25:47 +00:00
|
|
|
|
2012-07-21 12:38:59 +00:00
|
|
|
case RTP0_SPRT:
|
2012-09-11 08:28:07 +00:00
|
|
|
call_dissector_only(sprt_handle, tvb, pinfo, tree, NULL);
|
2012-07-21 12:38:59 +00:00
|
|
|
return TRUE;
|
|
|
|
|
2008-03-07 18:15:46 +00:00
|
|
|
case RTP0_INVALID:
|
2009-09-06 14:25:47 +00:00
|
|
|
|
2008-03-07 18:15:46 +00:00
|
|
|
default:
|
|
|
|
return FALSE; /* Unknown or unsupported version */
|
2008-09-25 22:06:58 +00:00
|
|
|
}
|
2005-02-08 20:54:08 +00:00
|
|
|
}
|
|
|
|
} else if (version != 2) {
|
2004-07-01 06:59:38 +00:00
|
|
|
/* Unknown or unsupported version */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-04-13 22:37:35 +00:00
|
|
|
/* Was it sent to an even-numbered port? */
|
2011-09-09 20:37:49 +00:00
|
|
|
if (check_destport && ((pinfo->destport % 2) != 0)) {
|
2008-04-23 06:51:15 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2011-09-09 05:23:43 +00:00
|
|
|
dissect_rtp( tvb, pinfo, tree );
|
|
|
|
return TRUE;
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
|
2011-09-09 20:37:49 +00:00
|
|
|
static gboolean
|
2012-09-10 21:40:21 +00:00
|
|
|
dissect_rtp_heur_udp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ )
|
2011-09-09 20:37:49 +00:00
|
|
|
{
|
|
|
|
return dissect_rtp_heur_common(tvb, pinfo, tree, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2012-09-10 21:40:21 +00:00
|
|
|
dissect_rtp_heur_stun( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ )
|
2011-09-09 20:37:49 +00:00
|
|
|
{
|
|
|
|
return dissect_rtp_heur_common(tvb, pinfo, tree, FALSE);
|
|
|
|
}
|
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/*
|
|
|
|
* Process the payload of the RTP packet, hand it to the subdissector
|
|
|
|
*/
|
2002-08-28 21:04:11 +00:00
|
|
|
static void
|
2007-02-21 06:45:34 +00:00
|
|
|
process_rtp_payload(tvbuff_t *newtvb, packet_info *pinfo, proto_tree *tree,
|
2009-03-06 22:55:02 +00:00
|
|
|
proto_tree *rtp_tree,
|
|
|
|
unsigned int payload_type)
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
2005-03-10 19:32:22 +00:00
|
|
|
struct _rtp_conversation_info *p_conv_data = NULL;
|
2005-03-27 22:11:09 +00:00
|
|
|
gboolean found_match = FALSE;
|
2007-08-21 07:23:34 +00:00
|
|
|
int payload_len;
|
|
|
|
struct srtp_info *srtp_info;
|
|
|
|
int offset=0;
|
|
|
|
|
|
|
|
payload_len = tvb_length_remaining(newtvb, offset);
|
|
|
|
|
|
|
|
/* first check if this is added as an SRTP stream - if so, don't try to dissector the payload data for now */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2007-08-21 07:23:34 +00:00
|
|
|
if (p_conv_data && p_conv_data->srtp_info) {
|
|
|
|
srtp_info = p_conv_data->srtp_info;
|
|
|
|
payload_len -= srtp_info->mki_len + srtp_info->auth_tag_len;
|
2008-02-25 19:08:13 +00:00
|
|
|
#if 0
|
2012-02-01 20:33:33 +00:00
|
|
|
#error Currently the srtp_info structure contains no cipher data, see packet-sdp.c adding dummy_srtp_info structure
|
2007-08-21 07:23:34 +00:00
|
|
|
if (p_conv_data->srtp_info->encryption_algorithm==SRTP_ENC_ALG_NULL) {
|
|
|
|
if (rtp_tree)
|
|
|
|
proto_tree_add_text(rtp_tree, newtvb, offset, payload_len, "SRTP Payload with NULL encryption");
|
|
|
|
}
|
2008-02-25 19:08:13 +00:00
|
|
|
else
|
|
|
|
#endif
|
|
|
|
{
|
2007-08-21 07:23:34 +00:00
|
|
|
if (rtp_tree)
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(rtp_tree, hf_srtp_encrypted_payload, newtvb, offset, payload_len, ENC_NA);
|
2007-08-21 07:23:34 +00:00
|
|
|
found_match = TRUE; /* use this flag to prevent dissection below */
|
|
|
|
}
|
|
|
|
offset += payload_len;
|
|
|
|
|
|
|
|
if (srtp_info->mki_len) {
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(rtp_tree, hf_srtp_mki, newtvb, offset, srtp_info->mki_len, ENC_NA);
|
2007-08-21 07:23:34 +00:00
|
|
|
offset += srtp_info->mki_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (srtp_info->auth_tag_len) {
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(rtp_tree, hf_srtp_auth_tag, newtvb, offset, srtp_info->auth_tag_len, ENC_NA);
|
2013-03-23 13:08:39 +00:00
|
|
|
/*offset += srtp_info->auth_tag_len;*/
|
2007-08-21 07:23:34 +00:00
|
|
|
}
|
|
|
|
}
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2009-05-25 06:46:33 +00:00
|
|
|
/* if the payload type is dynamic, we check if the conv is set and we look for the pt definition */
|
|
|
|
else if ( (payload_type >= PT_UNDF_96 && payload_type <= PT_UNDF_127) ) {
|
2005-03-27 21:37:05 +00:00
|
|
|
if (p_conv_data && p_conv_data->rtp_dyn_payload) {
|
|
|
|
gchar *payload_type_str = NULL;
|
2010-04-14 20:48:37 +00:00
|
|
|
encoding_name_and_rate_t *encoding_name_and_rate_pt = NULL;
|
2013-03-17 16:48:47 +00:00
|
|
|
encoding_name_and_rate_pt = (encoding_name_and_rate_t *)g_hash_table_lookup(p_conv_data->rtp_dyn_payload, &payload_type);
|
2010-04-15 20:09:46 +00:00
|
|
|
if (encoding_name_and_rate_pt) {
|
|
|
|
payload_type_str = encoding_name_and_rate_pt->encoding_name;
|
|
|
|
}
|
2007-02-01 20:49:34 +00:00
|
|
|
if (payload_type_str){
|
2005-03-27 21:37:05 +00:00
|
|
|
found_match = dissector_try_string(rtp_dyn_pt_dissector_table,
|
2009-03-06 22:55:02 +00:00
|
|
|
payload_type_str, newtvb, pinfo, tree);
|
2007-02-01 20:49:34 +00:00
|
|
|
/* If payload type string set from conversation and
|
|
|
|
* no matching dissector found it's probably because no subdissector
|
|
|
|
* exists. Don't call the dissectors based on payload number
|
|
|
|
* as that'd probably be the wrong dissector in this case.
|
|
|
|
* Just add it as data.
|
|
|
|
*/
|
|
|
|
if(found_match==FALSE)
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item( rtp_tree, hf_rtp_data, newtvb, 0, -1, ENC_NA );
|
2007-02-01 20:49:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-03-10 19:32:22 +00:00
|
|
|
}
|
|
|
|
}
|
2007-02-16 13:47:49 +00:00
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
/* if we don't found, it is static OR could be set static from the preferences */
|
2010-12-20 05:35:29 +00:00
|
|
|
if (!found_match && !dissector_try_uint(rtp_pt_dissector_table, payload_type, newtvb, pinfo, tree))
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item( rtp_tree, hf_rtp_data, newtvb, 0, -1, ENC_NA );
|
2005-03-27 22:11:09 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* Rtp payload reassembly
|
|
|
|
*
|
|
|
|
* This handles the reassembly of PDUs for higher-level protocols.
|
|
|
|
*
|
|
|
|
* We're a bit limited on how we can cope with out-of-order packets, because
|
|
|
|
* we don't have any idea of where the datagram boundaries are. So if we see
|
|
|
|
* packets A, C, B (all of which comprise a single datagram), we cannot know
|
|
|
|
* that C should be added to the same datagram as A, until we come to B (which
|
|
|
|
* may or may not actually be present...).
|
|
|
|
*
|
|
|
|
* What we end up doing in this case is passing A+B to the subdissector as one
|
|
|
|
* datagram, and make out that a new one starts on C.
|
|
|
|
*/
|
|
|
|
static void
|
2012-06-01 18:35:20 +00:00
|
|
|
dissect_rtp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|
|
|
proto_tree *rtp_tree, int offset, unsigned int data_len,
|
|
|
|
unsigned int data_reported_len,
|
|
|
|
unsigned int payload_type)
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
tvbuff_t *newtvb;
|
|
|
|
struct _rtp_conversation_info *p_conv_data= NULL;
|
|
|
|
gboolean must_desegment = FALSE;
|
|
|
|
rtp_private_conv_info *finfo = NULL;
|
|
|
|
rtp_multisegment_pdu *msp = NULL;
|
|
|
|
guint32 seqno;
|
|
|
|
|
|
|
|
/* Retrieve RTPs idea of a converation */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2007-02-21 06:45:34 +00:00
|
|
|
|
2008-07-11 19:48:30 +00:00
|
|
|
if(p_conv_data != NULL)
|
2007-02-21 06:45:34 +00:00
|
|
|
finfo = p_conv_data->rtp_conv_info;
|
|
|
|
|
|
|
|
if(finfo == NULL || !desegment_rtp) {
|
|
|
|
/* Hand the whole lot off to the subdissector */
|
|
|
|
newtvb=tvb_new_subset(tvb,offset,data_len,data_reported_len);
|
From Richard van der Hoff:
Along with this bug, identified by Mark, there is another problem, in that one of the chunks of my earlier patch seemed to get missed off when Anders committed it. This won't break anything yet, as the H.223-over-RTP dissection hasn't landed on trunk yet, but it will cause all sorts of nasties when it does.
Here is a new patch, against current trunk, which should fix Mark's bug, my bug, and a comment typo.
And a patch wich improves the general robustness of the h.223 dissector (making it less likely to crash on malformed data).
Hopefully this also fixes a bug raised by Fabio Sguanci a few weeks ago.
Fabio: I think a better way to fix the problem is to stop the dissector crashing when it finds a malformed PDU, so that it just treats the first pdu as malformed; there is then no need to special-case it.
svn path=/trunk/; revision=20898
2007-02-22 20:40:19 +00:00
|
|
|
process_rtp_payload(newtvb, pinfo, tree, rtp_tree, payload_type);
|
2007-02-21 06:45:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
seqno = p_conv_data->extended_seqno;
|
|
|
|
|
|
|
|
pinfo->can_desegment = 2;
|
|
|
|
pinfo->desegment_offset = 0;
|
|
|
|
pinfo->desegment_len = 0;
|
|
|
|
|
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("%d: RTP Part of convo %d(%p); seqno %d",
|
|
|
|
pinfo->fd->num,
|
|
|
|
p_conv_data->frame_number, p_conv_data,
|
|
|
|
seqno
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* look for a pdu which we might be extending */
|
|
|
|
msp = (rtp_multisegment_pdu *)se_tree_lookup32_le(finfo->multisegment_pdus,seqno-1);
|
|
|
|
|
|
|
|
if(msp && msp->startseq < seqno && msp->endseq >= seqno) {
|
|
|
|
guint32 fid = msp->startseq;
|
|
|
|
fragment_data *fd_head;
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tContinues fragment %d", fid);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* we always assume the datagram is complete; if this is the
|
|
|
|
* first pass, that's our best guess, and if it's not, what we
|
|
|
|
* say gets ignored anyway.
|
|
|
|
*/
|
2013-03-22 23:59:54 +00:00
|
|
|
fd_head = fragment_add_seq(&rtp_reassembly_table,
|
|
|
|
tvb, offset, pinfo, fid, NULL,
|
|
|
|
seqno-msp->startseq, data_len,
|
|
|
|
FALSE, 0);
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
newtvb = process_reassembled_data(tvb,offset, pinfo, "Reassembled RTP", fd_head,
|
|
|
|
&rtp_fragment_items, NULL, tree);
|
|
|
|
|
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tFragment Coalesced; fd_head=%p, newtvb=%p (len %d)",fd_head, newtvb,
|
|
|
|
newtvb?tvb_reported_length(newtvb):0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if(newtvb != NULL) {
|
|
|
|
/* Hand off to the subdissector */
|
|
|
|
process_rtp_payload(newtvb, pinfo, tree, rtp_tree, payload_type);
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/*
|
|
|
|
* Check to see if there were any complete fragments within the chunk
|
|
|
|
*/
|
|
|
|
if( pinfo->desegment_len && pinfo->desegment_offset == 0 )
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tNo complete pdus in payload" );
|
|
|
|
#endif
|
|
|
|
/* Mark the fragments and not complete yet */
|
2013-03-22 23:59:54 +00:00
|
|
|
fragment_set_partial_reassembly(&rtp_reassembly_table,
|
|
|
|
pinfo, fid, NULL);
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* we must need another segment */
|
|
|
|
msp->endseq = MIN(msp->endseq,seqno) + 1;
|
|
|
|
}
|
2008-07-11 19:48:30 +00:00
|
|
|
else
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
2008-07-11 19:48:30 +00:00
|
|
|
if(pinfo->desegment_len)
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
/* the higher-level dissector has asked for some more data - ie,
|
|
|
|
the end of this segment does not coincide with the end of a
|
|
|
|
higher-level PDU. */
|
|
|
|
must_desegment = TRUE;
|
|
|
|
}
|
2008-07-11 19:48:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2007-02-21 06:45:34 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* The segment is not the continuation of a fragmented segment
|
|
|
|
* so process it as normal
|
2008-07-11 19:48:30 +00:00
|
|
|
*/
|
2007-02-21 06:45:34 +00:00
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tRTP non-fragment payload");
|
|
|
|
#endif
|
|
|
|
newtvb = tvb_new_subset( tvb, offset, data_len, data_reported_len );
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* Hand off to the subdissector */
|
|
|
|
process_rtp_payload(newtvb, pinfo, tree, rtp_tree, payload_type);
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
if(pinfo->desegment_len) {
|
|
|
|
/* the higher-level dissector has asked for some more data - ie,
|
|
|
|
the end of this segment does not coincide with the end of a
|
|
|
|
higher-level PDU. */
|
|
|
|
must_desegment = TRUE;
|
|
|
|
}
|
|
|
|
}
|
2008-07-11 19:48:30 +00:00
|
|
|
|
|
|
|
/*
|
2007-02-21 06:45:34 +00:00
|
|
|
* There were bytes left over that the higher protocol couldn't dissect so save them
|
|
|
|
*/
|
|
|
|
if(must_desegment)
|
|
|
|
{
|
|
|
|
guint32 deseg_offset = pinfo->desegment_offset;
|
|
|
|
guint32 frag_len = tvb_reported_length_remaining(newtvb, deseg_offset);
|
|
|
|
fragment_data *fd_head = NULL;
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tRTP Must Desegment: tvb_len=%d ds_len=%d %d frag_len=%d ds_off=%d",
|
|
|
|
tvb_reported_length(newtvb),
|
|
|
|
pinfo->desegment_len,
|
|
|
|
pinfo->fd->flags.visited,
|
|
|
|
frag_len,
|
2008-07-11 19:48:30 +00:00
|
|
|
deseg_offset);
|
2007-02-21 06:45:34 +00:00
|
|
|
#endif
|
|
|
|
/* allocate a new msp for this pdu */
|
2013-03-17 16:48:47 +00:00
|
|
|
msp = se_new(rtp_multisegment_pdu);
|
2007-02-21 06:45:34 +00:00
|
|
|
msp->startseq = seqno;
|
|
|
|
msp->endseq = seqno+1;
|
|
|
|
se_tree_insert32(finfo->multisegment_pdus,seqno,msp);
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/*
|
|
|
|
* Add the fragment to the fragment table
|
2008-07-11 19:48:30 +00:00
|
|
|
*/
|
2013-03-22 23:59:54 +00:00
|
|
|
fd_head = fragment_add_seq(&rtp_reassembly_table,
|
|
|
|
newtvb, deseg_offset, pinfo, seqno, NULL, 0, frag_len,
|
|
|
|
TRUE, 0);
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
if(fd_head != NULL)
|
|
|
|
{
|
2008-07-11 19:48:30 +00:00
|
|
|
if( fd_head->reassembled_in != 0 && !(fd_head->flags & FD_PARTIAL_REASSEMBLY) )
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
proto_item *rtp_tree_item;
|
|
|
|
rtp_tree_item = proto_tree_add_uint( tree, hf_rtp_reassembled_in,
|
|
|
|
newtvb, deseg_offset, tvb_reported_length_remaining(newtvb,deseg_offset),
|
|
|
|
fd_head->reassembled_in);
|
2008-07-11 19:48:30 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(rtp_tree_item);
|
2007-02-21 06:45:34 +00:00
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tReassembled in %d", fd_head->reassembled_in);
|
|
|
|
#endif
|
2008-07-11 19:48:30 +00:00
|
|
|
}
|
|
|
|
else
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tUnfinished fragment");
|
|
|
|
#endif
|
|
|
|
/* this fragment is never reassembled */
|
|
|
|
proto_tree_add_text( tree, tvb, deseg_offset, -1,"RTP fragment, unfinished");
|
2008-07-11 19:48:30 +00:00
|
|
|
}
|
2007-02-21 06:45:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-07-11 19:48:30 +00:00
|
|
|
/*
|
2007-02-21 06:45:34 +00:00
|
|
|
* This fragment was the first fragment in a new entry in the
|
|
|
|
* frag_table; we don't yet know where it is reassembled
|
2008-07-11 19:48:30 +00:00
|
|
|
*/
|
2007-02-21 06:45:34 +00:00
|
|
|
#ifdef DEBUG_FRAGMENTS
|
|
|
|
g_debug("\tnew pdu");
|
|
|
|
#endif
|
|
|
|
}
|
2008-07-11 19:48:30 +00:00
|
|
|
|
|
|
|
if( pinfo->desegment_offset == 0 )
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
2009-08-09 07:59:51 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTP");
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "[RTP segment of a reassembled PDU]");
|
2007-02-21 06:45:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pinfo->can_desegment = 0;
|
|
|
|
pinfo->desegment_offset = 0;
|
|
|
|
pinfo->desegment_len = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-27 12:40:53 +00:00
|
|
|
static void
|
2012-06-01 18:35:20 +00:00
|
|
|
dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2006-06-27 12:40:53 +00:00
|
|
|
{
|
|
|
|
int offset = 0;
|
|
|
|
guint8 octet1;
|
|
|
|
int cnt;
|
|
|
|
gboolean hdr_follow = TRUE;
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *rfc2198_tree = NULL;
|
|
|
|
proto_tree *rfc2198_hdr_tree = NULL;
|
|
|
|
rfc2198_hdr *hdr_last, *hdr_new;
|
|
|
|
rfc2198_hdr *hdr_chain = NULL;
|
2007-12-12 10:51:09 +00:00
|
|
|
struct _rtp_conversation_info *p_conv_data= NULL;
|
|
|
|
gchar *payload_type_str;
|
|
|
|
|
|
|
|
/* Retrieve RTPs idea of a converation */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2006-06-27 12:40:53 +00:00
|
|
|
|
2007-12-12 10:51:09 +00:00
|
|
|
/* Add try to RFC 2198 data */
|
|
|
|
ti = proto_tree_add_text(tree, tvb, offset, -1, "RFC 2198: Redundant Audio Data");
|
2006-06-27 12:40:53 +00:00
|
|
|
rfc2198_tree = proto_item_add_subtree(ti, ett_rtp_rfc2198);
|
|
|
|
|
|
|
|
hdr_last = NULL;
|
|
|
|
cnt = 0;
|
|
|
|
while (hdr_follow) {
|
|
|
|
cnt++;
|
2007-12-12 10:51:09 +00:00
|
|
|
payload_type_str = NULL;
|
2007-02-16 13:47:49 +00:00
|
|
|
|
|
|
|
/* Allocate and fill in header */
|
2013-03-17 16:48:47 +00:00
|
|
|
hdr_new = ep_new(rfc2198_hdr);
|
2006-06-27 12:40:53 +00:00
|
|
|
hdr_new->next = NULL;
|
|
|
|
octet1 = tvb_get_guint8(tvb, offset);
|
|
|
|
hdr_new->pt = RTP_PAYLOAD_TYPE(octet1);
|
|
|
|
hdr_follow = (octet1 & 0x80);
|
|
|
|
|
2007-12-12 10:51:09 +00:00
|
|
|
/* if it is dynamic payload, let use the conv data to see if it is defined */
|
|
|
|
if ((hdr_new->pt > 95) && (hdr_new->pt < 128)) {
|
|
|
|
if (p_conv_data && p_conv_data->rtp_dyn_payload){
|
2010-04-14 20:48:37 +00:00
|
|
|
encoding_name_and_rate_t *encoding_name_and_rate_pt = NULL;
|
2013-03-17 16:48:47 +00:00
|
|
|
encoding_name_and_rate_pt = (encoding_name_and_rate_t *)g_hash_table_lookup(p_conv_data->rtp_dyn_payload, &hdr_new->pt);
|
2010-04-15 20:09:46 +00:00
|
|
|
if (encoding_name_and_rate_pt) {
|
|
|
|
payload_type_str = encoding_name_and_rate_pt->encoding_name;
|
|
|
|
}
|
2007-12-12 10:51:09 +00:00
|
|
|
}
|
|
|
|
}
|
2007-02-16 13:47:49 +00:00
|
|
|
/* Add a subtree for this header and add items */
|
2006-06-27 12:40:53 +00:00
|
|
|
ti = proto_tree_add_text(rfc2198_tree, tvb, offset, (hdr_follow)?4:1, "Header %u", cnt);
|
|
|
|
rfc2198_hdr_tree = proto_item_add_subtree(ti, ett_rtp_rfc2198_hdr);
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(rfc2198_hdr_tree, hf_rtp_rfc2198_follow, tvb, offset, 1, ENC_BIG_ENDIAN );
|
2007-12-12 10:51:09 +00:00
|
|
|
proto_tree_add_uint_format(rfc2198_hdr_tree, hf_rtp_payload_type, tvb,
|
|
|
|
offset, 1, octet1, "Payload type: %s (%u)",
|
2012-08-10 22:55:02 +00:00
|
|
|
payload_type_str ? payload_type_str : val_to_str_ext_const(hdr_new->pt, &rtp_payload_type_vals_ext, "Unknown"),
|
2007-12-12 10:51:09 +00:00
|
|
|
hdr_new->pt);
|
2009-09-06 14:25:47 +00:00
|
|
|
proto_item_append_text(ti, ": PT=%s",
|
|
|
|
payload_type_str ? payload_type_str :
|
2010-11-08 14:43:59 +00:00
|
|
|
val_to_str_ext(hdr_new->pt, &rtp_payload_type_vals_ext, "Unknown (%u)"));
|
2006-06-27 12:40:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
2007-02-16 13:47:49 +00:00
|
|
|
/* Timestamp offset and block length don't apply to last header */
|
2006-06-27 12:40:53 +00:00
|
|
|
if (hdr_follow) {
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(rfc2198_hdr_tree, hf_rtp_rfc2198_tm_off, tvb, offset, 2, ENC_BIG_ENDIAN );
|
|
|
|
proto_tree_add_item(rfc2198_hdr_tree, hf_rtp_rfc2198_bl_len, tvb, offset + 1, 2, ENC_BIG_ENDIAN );
|
2006-06-27 12:40:53 +00:00
|
|
|
hdr_new->len = tvb_get_ntohs(tvb, offset + 1) & 0x03FF;
|
|
|
|
proto_item_append_text(ti, ", len=%u", hdr_new->len);
|
|
|
|
offset += 3;
|
|
|
|
} else {
|
|
|
|
hdr_new->len = -1;
|
|
|
|
hdr_follow = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hdr_last) {
|
|
|
|
hdr_last->next = hdr_new;
|
|
|
|
} else {
|
|
|
|
hdr_chain = hdr_new;
|
|
|
|
}
|
|
|
|
hdr_last = hdr_new;
|
|
|
|
}
|
|
|
|
|
2007-02-16 13:47:49 +00:00
|
|
|
/* Dissect each data block according to the header info */
|
2006-06-27 12:40:53 +00:00
|
|
|
hdr_last = hdr_chain;
|
|
|
|
while (hdr_last) {
|
|
|
|
hdr_last->offset = offset;
|
|
|
|
if (!hdr_last->next) {
|
|
|
|
hdr_last->len = tvb_reported_length_remaining(tvb, offset);
|
|
|
|
}
|
|
|
|
dissect_rtp_data(tvb, pinfo, tree, rfc2198_tree, hdr_last->offset, hdr_last->len, hdr_last->len, hdr_last->pt);
|
|
|
|
offset += hdr_last->len;
|
|
|
|
hdr_last = hdr_last->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-11-27 07:13:32 +00:00
|
|
|
static void
|
2012-07-23 15:52:17 +00:00
|
|
|
dissect_rtp_hext_rfc5215_onebyte( tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *rtp_hext_tree )
|
|
|
|
{
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *rtp_hext_rfc5285_tree = NULL;
|
|
|
|
guint ext_offset = 0, start_ext_offset;
|
|
|
|
|
|
|
|
while (ext_offset < tvb_length (tvb)) {
|
|
|
|
guint8 ext_hdr_hdr;
|
|
|
|
guint8 ext_id;
|
|
|
|
guint8 ext_length;
|
|
|
|
tvbuff_t *subtvb = NULL;
|
|
|
|
|
|
|
|
/* Skip bytes with the value 0, they are padding */
|
|
|
|
start_ext_offset = ext_offset;
|
|
|
|
while (tvb_get_guint8 (tvb, ext_offset) == 0) {
|
|
|
|
if (ext_offset >= tvb_length (tvb))
|
|
|
|
return;
|
|
|
|
ext_offset ++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add padding */
|
|
|
|
if (ext_offset > start_ext_offset)
|
|
|
|
proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, ext_offset, ext_offset-start_ext_offset, ENC_NA );
|
|
|
|
|
|
|
|
ext_hdr_hdr = tvb_get_guint8 (tvb, ext_offset);
|
|
|
|
ext_id = ext_hdr_hdr >> 4;
|
|
|
|
|
|
|
|
/* 15 is for future extensibility, ignore length, etc and stop processing packet if it shows up */
|
|
|
|
if (ext_id == 15)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ext_length = (ext_hdr_hdr & 0x0F) + 1;
|
|
|
|
if (rtp_hext_tree) {
|
|
|
|
ti = proto_tree_add_text(rtp_hext_tree, tvb, ext_offset, ext_length + 1, "RFC 5285 Header Extension (One-Byte Header)");
|
|
|
|
rtp_hext_rfc5285_tree = proto_item_add_subtree( ti, ett_hdr_ext_rfc5285);
|
|
|
|
|
|
|
|
proto_tree_add_uint( rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_id, tvb, ext_offset, 1, ext_id);
|
|
|
|
proto_tree_add_uint( rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_length, tvb, ext_offset, 1, ext_length);
|
|
|
|
}
|
|
|
|
ext_offset ++;
|
|
|
|
|
|
|
|
subtvb = tvb_new_subset(tvb, ext_offset, ext_length, ext_length);
|
|
|
|
if (!dissector_try_uint (rtp_hdr_ext_rfc5285_dissector_table, ext_id, subtvb, pinfo, rtp_hext_rfc5285_tree)) {
|
2012-09-07 02:09:59 +00:00
|
|
|
if (rtp_hext_tree)
|
2012-07-23 15:52:17 +00:00
|
|
|
proto_tree_add_item(rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_data, subtvb, 0, ext_length, ENC_NA );
|
|
|
|
}
|
|
|
|
|
|
|
|
ext_offset += ext_length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_rtp_hext_rfc5215_twobytes(tvbuff_t *parent_tvb, guint id_offset,
|
|
|
|
guint8 id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtp_hext_tree)
|
|
|
|
{
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *rtp_hext_rfc5285_tree = NULL;
|
|
|
|
guint ext_offset = 0, start_ext_offset;
|
|
|
|
|
|
|
|
while (ext_offset + 2 < tvb_length (tvb)) {
|
|
|
|
guint8 ext_id;
|
|
|
|
guint8 ext_length;
|
|
|
|
tvbuff_t *subtvb = NULL;
|
|
|
|
|
|
|
|
/* Skip bytes with the value 0, they are padding */
|
|
|
|
start_ext_offset = ext_offset;
|
|
|
|
while (tvb_get_guint8 (tvb, ext_offset) == 0) {
|
|
|
|
if (ext_offset + 2 >= tvb_length (tvb))
|
|
|
|
return;
|
|
|
|
ext_offset ++;
|
|
|
|
}
|
|
|
|
/* Add padding */
|
|
|
|
if (ext_offset > start_ext_offset)
|
|
|
|
proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, ext_offset, ext_offset-start_ext_offset, ENC_NA );
|
|
|
|
|
|
|
|
ext_id = tvb_get_guint8 (tvb, ext_offset);
|
|
|
|
ext_length = tvb_get_guint8 (tvb, ext_offset + 1);
|
|
|
|
|
|
|
|
if (rtp_hext_tree) {
|
|
|
|
ti = proto_tree_add_text(rtp_hext_tree, tvb, ext_offset, ext_length + 2, "RFC 5285 Header Extension (Two-Byte Header)");
|
|
|
|
rtp_hext_rfc5285_tree = proto_item_add_subtree( ti, ett_hdr_ext_rfc5285);
|
|
|
|
|
|
|
|
proto_tree_add_uint( rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_appbits, parent_tvb, id_offset + 1, 1, id & 0x000F);
|
|
|
|
proto_tree_add_uint( rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_id, tvb, ext_offset, 1, ext_id);
|
|
|
|
proto_tree_add_uint( rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_length, tvb, ext_offset + 1, 1, ext_length);
|
|
|
|
}
|
|
|
|
|
|
|
|
ext_offset += 2;
|
|
|
|
|
|
|
|
subtvb = tvb_new_subset(tvb, ext_offset, ext_length, ext_length);
|
|
|
|
if (ext_length && !dissector_try_uint (rtp_hdr_ext_rfc5285_dissector_table, ext_id, subtvb, pinfo, rtp_hext_rfc5285_tree)) {
|
|
|
|
proto_tree_add_item(rtp_hext_rfc5285_tree, hf_rtp_ext_rfc5285_data, subtvb, 0, ext_length, ENC_NA );
|
|
|
|
}
|
|
|
|
|
|
|
|
ext_offset += ext_length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
|
|
|
proto_item *ti = NULL;
|
2013-04-25 05:24:07 +00:00
|
|
|
proto_tree *volatile rtp_tree = NULL;
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_tree *rtp_csrc_tree = NULL;
|
2008-01-06 11:49:32 +00:00
|
|
|
proto_tree *rtp_hext_tree = NULL;
|
2003-11-09 22:55:35 +00:00
|
|
|
guint8 octet1, octet2;
|
2000-10-19 06:45:11 +00:00
|
|
|
unsigned int version;
|
|
|
|
gboolean padding_set;
|
|
|
|
gboolean extension_set;
|
|
|
|
unsigned int csrc_count;
|
|
|
|
gboolean marker_set;
|
|
|
|
unsigned int payload_type;
|
2005-03-27 21:37:05 +00:00
|
|
|
gchar *payload_type_str = NULL;
|
2007-11-02 07:43:49 +00:00
|
|
|
gboolean is_srtp = FALSE;
|
2000-10-19 06:45:11 +00:00
|
|
|
unsigned int i = 0;
|
2013-03-04 22:00:48 +00:00
|
|
|
unsigned int hdr_extension_len= 0;
|
2012-02-04 11:59:37 +00:00
|
|
|
unsigned int hdr_extension_id = 0;
|
2013-04-25 05:24:07 +00:00
|
|
|
volatile unsigned int padding_count;
|
2004-01-31 09:48:26 +00:00
|
|
|
gint length, reported_length;
|
2001-06-15 00:42:39 +00:00
|
|
|
int data_len;
|
2013-04-25 05:24:07 +00:00
|
|
|
volatile unsigned int offset = 0;
|
2000-10-19 06:45:11 +00:00
|
|
|
guint16 seq_num;
|
|
|
|
guint32 timestamp;
|
|
|
|
guint32 sync_src;
|
|
|
|
guint32 csrc_item;
|
2005-03-27 21:37:05 +00:00
|
|
|
struct _rtp_conversation_info *p_conv_data = NULL;
|
2011-07-28 18:17:16 +00:00
|
|
|
/*struct srtp_info *srtp_info = NULL;*/
|
|
|
|
/*unsigned int srtp_offset;*/
|
2008-04-27 11:10:57 +00:00
|
|
|
unsigned int hdrext_offset = 0;
|
2007-12-23 20:10:57 +00:00
|
|
|
tvbuff_t *newtvb = NULL;
|
2005-03-27 21:37:05 +00:00
|
|
|
|
2005-04-04 20:12:18 +00:00
|
|
|
/* Can tap up to 4 RTP packets within same packet */
|
|
|
|
static struct _rtp_info rtp_info_arr[4];
|
|
|
|
static int rtp_info_current=0;
|
|
|
|
struct _rtp_info *rtp_info;
|
|
|
|
|
|
|
|
rtp_info_current++;
|
|
|
|
if (rtp_info_current==4) {
|
|
|
|
rtp_info_current=0;
|
|
|
|
}
|
|
|
|
rtp_info = &rtp_info_arr[rtp_info_current];
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/* Get the fields in the first octet */
|
2003-11-09 22:55:35 +00:00
|
|
|
octet1 = tvb_get_guint8( tvb, offset );
|
|
|
|
version = RTP_VERSION( octet1 );
|
2001-06-14 07:05:51 +00:00
|
|
|
|
2005-02-08 20:54:08 +00:00
|
|
|
if (version == 0) {
|
|
|
|
switch (global_rtp_version0_type) {
|
2013-04-10 11:46:31 +00:00
|
|
|
case RTP0_STUN:
|
|
|
|
call_dissector(stun_handle, tvb, pinfo, tree);
|
|
|
|
return;
|
2009-09-13 23:03:38 +00:00
|
|
|
case RTP0_CLASSICSTUN:
|
|
|
|
call_dissector(classicstun_handle, tvb, pinfo, tree);
|
2005-02-08 20:54:08 +00:00
|
|
|
return;
|
|
|
|
|
2006-01-29 00:40:40 +00:00
|
|
|
case RTP0_T38:
|
|
|
|
call_dissector(t38_handle, tvb, pinfo, tree);
|
|
|
|
return;
|
|
|
|
|
2012-07-21 12:38:59 +00:00
|
|
|
case RTP0_SPRT:
|
|
|
|
call_dissector(sprt_handle, tvb, pinfo, tree);
|
|
|
|
return;
|
|
|
|
|
2005-02-08 20:54:08 +00:00
|
|
|
case RTP0_INVALID:
|
2008-09-25 22:06:58 +00:00
|
|
|
if (!(tvb_memeql(tvb, 4, "ZRTP", 4)))
|
|
|
|
{
|
|
|
|
call_dissector(zrtp_handle,tvb,pinfo,tree);
|
|
|
|
return;
|
|
|
|
}
|
2005-02-08 20:54:08 +00:00
|
|
|
default:
|
2008-09-25 22:06:58 +00:00
|
|
|
; /* Unknown or unsupported version (let it fall through) */
|
2005-02-08 20:54:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-17 22:14:47 +00:00
|
|
|
/* fill in the rtp_info structure */
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_version = version;
|
2001-06-14 07:05:51 +00:00
|
|
|
if (version != 2) {
|
|
|
|
/*
|
|
|
|
* Unknown or unsupported version.
|
|
|
|
*/
|
2009-08-09 07:59:51 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTP");
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2010-09-12 19:29:05 +00:00
|
|
|
col_add_fstr( pinfo->cinfo, COL_INFO,
|
|
|
|
"Unknown RTP version %u", version);
|
2001-06-14 07:05:51 +00:00
|
|
|
|
|
|
|
if ( tree ) {
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item( tree, proto_rtp, tvb, offset, -1, ENC_NA );
|
2001-06-14 07:05:51 +00:00
|
|
|
rtp_tree = proto_item_add_subtree( ti, ett_rtp );
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2001-06-14 07:05:51 +00:00
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_version, tvb,
|
2003-11-09 22:55:35 +00:00
|
|
|
offset, 1, octet1);
|
2001-06-14 07:05:51 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-11-09 22:55:35 +00:00
|
|
|
padding_set = RTP_PADDING( octet1 );
|
|
|
|
extension_set = RTP_EXTENSION( octet1 );
|
|
|
|
csrc_count = RTP_CSRC_COUNT( octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/* Get the fields in the second octet */
|
2003-11-09 22:55:35 +00:00
|
|
|
octet2 = tvb_get_guint8( tvb, offset + 1 );
|
|
|
|
marker_set = RTP_MARKER( octet2 );
|
|
|
|
payload_type = RTP_PAYLOAD_TYPE( octet2 );
|
2000-10-19 06:45:11 +00:00
|
|
|
|
|
|
|
/* Get the subsequent fields */
|
|
|
|
seq_num = tvb_get_ntohs( tvb, offset + 2 );
|
|
|
|
timestamp = tvb_get_ntohl( tvb, offset + 4 );
|
|
|
|
sync_src = tvb_get_ntohl( tvb, offset + 8 );
|
|
|
|
|
2003-11-20 23:34:31 +00:00
|
|
|
/* fill in the rtp_info structure */
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_padding_set = padding_set;
|
|
|
|
rtp_info->info_padding_count = 0;
|
|
|
|
rtp_info->info_marker_set = marker_set;
|
2009-05-19 18:42:33 +00:00
|
|
|
rtp_info->info_is_video = FALSE;
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_payload_type = payload_type;
|
|
|
|
rtp_info->info_seq_num = seq_num;
|
|
|
|
rtp_info->info_timestamp = timestamp;
|
|
|
|
rtp_info->info_sync_src = sync_src;
|
2008-01-06 11:49:32 +00:00
|
|
|
rtp_info->info_is_srtp = FALSE;
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_setup_frame_num = 0;
|
2005-11-05 21:38:22 +00:00
|
|
|
rtp_info->info_payload_type_str = NULL;
|
2010-04-14 20:48:37 +00:00
|
|
|
rtp_info->info_payload_rate = 0;
|
2003-03-06 20:35:12 +00:00
|
|
|
|
2003-11-20 23:34:31 +00:00
|
|
|
/*
|
2004-01-31 09:48:26 +00:00
|
|
|
* Do we have all the data?
|
|
|
|
*/
|
|
|
|
length = tvb_length_remaining(tvb, offset);
|
|
|
|
reported_length = tvb_reported_length_remaining(tvb, offset);
|
|
|
|
if (reported_length >= 0 && length >= reported_length) {
|
|
|
|
/*
|
|
|
|
* Yes.
|
|
|
|
*/
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_all_data_present = TRUE;
|
|
|
|
rtp_info->info_data_len = reported_length;
|
2004-01-31 09:48:26 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Save the pointer to raw rtp data (header + payload incl.
|
|
|
|
* padding).
|
|
|
|
* That should be safe because the "epan_dissect_t"
|
|
|
|
* constructed for the packet has not yet been freed when
|
|
|
|
* the taps are called.
|
|
|
|
* (Destroying the "epan_dissect_t" will end up freeing
|
|
|
|
* all the tvbuffs and hence invalidating pointers to
|
|
|
|
* their data.)
|
|
|
|
* See "add_packet_to_packet_list()" for details.
|
|
|
|
*/
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_data = tvb_get_ptr(tvb, 0, -1);
|
2004-01-31 09:48:26 +00:00
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* No - packet was cut short at capture time.
|
|
|
|
*/
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_all_data_present = FALSE;
|
|
|
|
rtp_info->info_data_len = 0;
|
|
|
|
rtp_info->info_data = NULL;
|
2004-01-31 09:48:26 +00:00
|
|
|
}
|
2003-11-20 23:34:31 +00:00
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
/* Look for conv and add to the frame if found */
|
2005-04-04 20:12:18 +00:00
|
|
|
get_conv_info(pinfo, rtp_info);
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2005-03-27 21:37:05 +00:00
|
|
|
|
2009-05-19 18:42:33 +00:00
|
|
|
if (p_conv_data)
|
|
|
|
rtp_info->info_is_video = p_conv_data->is_video;
|
|
|
|
|
2007-11-02 07:43:49 +00:00
|
|
|
if (p_conv_data && p_conv_data->srtp_info) is_srtp = TRUE;
|
2008-01-06 11:49:32 +00:00
|
|
|
rtp_info->info_is_srtp = is_srtp;
|
2007-11-02 07:43:49 +00:00
|
|
|
|
2010-09-12 19:29:05 +00:00
|
|
|
col_set_str( pinfo->cinfo, COL_PROTOCOL, (is_srtp) ? "SRTP" : "RTP" );
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2011-07-28 18:17:16 +00:00
|
|
|
/* check if this is added as an SRTP stream - if so, don't try to dissect the payload data for now */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2009-05-19 18:42:33 +00:00
|
|
|
|
2011-07-28 18:17:16 +00:00
|
|
|
#if 0 /* XXX: srtp_offset never actually used ?? */
|
2007-08-21 07:23:34 +00:00
|
|
|
if (p_conv_data && p_conv_data->srtp_info) {
|
|
|
|
srtp_info = p_conv_data->srtp_info;
|
|
|
|
if (rtp_info->info_all_data_present) {
|
|
|
|
srtp_offset = rtp_info->info_data_len - srtp_info->mki_len - srtp_info->auth_tag_len;
|
|
|
|
}
|
|
|
|
}
|
2011-07-28 18:17:16 +00:00
|
|
|
#endif
|
2007-08-21 07:23:34 +00:00
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
/* if it is dynamic payload, let use the conv data to see if it is defined */
|
|
|
|
if ( (payload_type>95) && (payload_type<128) ) {
|
2005-11-05 21:38:22 +00:00
|
|
|
if (p_conv_data && p_conv_data->rtp_dyn_payload){
|
2010-04-14 20:48:37 +00:00
|
|
|
encoding_name_and_rate_t *encoding_name_and_rate_pt = NULL;
|
2013-03-17 16:48:47 +00:00
|
|
|
encoding_name_and_rate_pt = (encoding_name_and_rate_t *)g_hash_table_lookup(p_conv_data->rtp_dyn_payload, &payload_type);
|
2010-04-15 20:09:46 +00:00
|
|
|
if (encoding_name_and_rate_pt) {
|
2011-03-29 10:56:30 +00:00
|
|
|
rtp_info->info_payload_type_str = payload_type_str = encoding_name_and_rate_pt->encoding_name;
|
2010-04-15 20:09:46 +00:00
|
|
|
rtp_info->info_payload_rate = encoding_name_and_rate_pt->sample_rate;
|
|
|
|
}
|
2005-11-05 21:38:22 +00:00
|
|
|
}
|
2005-03-27 21:37:05 +00:00
|
|
|
}
|
|
|
|
|
2010-09-12 19:29:05 +00:00
|
|
|
col_add_fstr( pinfo->cinfo, COL_INFO,
|
|
|
|
"PT=%s, SSRC=0x%X, Seq=%u, Time=%u%s",
|
2010-11-08 14:43:59 +00:00
|
|
|
payload_type_str ? payload_type_str : val_to_str_ext( payload_type, &rtp_payload_type_vals_ext,"Unknown (%u)" ),
|
2010-09-12 19:29:05 +00:00
|
|
|
sync_src,
|
|
|
|
seq_num,
|
|
|
|
timestamp,
|
2013-03-04 22:00:48 +00:00
|
|
|
marker_set ? ", Mark" : "");
|
2005-03-27 21:37:05 +00:00
|
|
|
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
if ( tree ) {
|
2005-03-27 21:37:05 +00:00
|
|
|
proto_tree *item;
|
2004-06-15 18:26:08 +00:00
|
|
|
/* Create RTP protocol tree */
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_rtp, tvb, offset, -1, ENC_NA );
|
2004-06-15 18:26:08 +00:00
|
|
|
rtp_tree = proto_item_add_subtree(ti, ett_rtp );
|
|
|
|
|
|
|
|
/* Conversation setup info */
|
|
|
|
if (global_rtp_show_setup_info)
|
|
|
|
{
|
|
|
|
show_setup_info(tvb, pinfo, rtp_tree);
|
|
|
|
}
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_version, tvb,
|
2003-11-09 22:55:35 +00:00
|
|
|
offset, 1, octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_tree_add_boolean( rtp_tree, hf_rtp_padding, tvb,
|
2003-11-09 22:55:35 +00:00
|
|
|
offset, 1, octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_tree_add_boolean( rtp_tree, hf_rtp_extension, tvb,
|
2003-11-09 22:55:35 +00:00
|
|
|
offset, 1, octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_csrc_count, tvb,
|
2003-11-09 22:55:35 +00:00
|
|
|
offset, 1, octet1 );
|
2000-10-19 06:45:11 +00:00
|
|
|
offset++;
|
|
|
|
|
|
|
|
proto_tree_add_boolean( rtp_tree, hf_rtp_marker, tvb, offset,
|
2003-11-09 22:55:35 +00:00
|
|
|
1, octet2 );
|
2005-03-27 21:37:05 +00:00
|
|
|
|
2011-05-20 15:44:25 +00:00
|
|
|
proto_tree_add_uint_format( rtp_tree, hf_rtp_payload_type, tvb,
|
2006-02-09 19:22:15 +00:00
|
|
|
offset, 1, octet2, "Payload type: %s (%u)",
|
2012-08-10 22:55:02 +00:00
|
|
|
payload_type_str ? payload_type_str : val_to_str_ext_const( payload_type, &rtp_payload_type_vals_ext,"Unknown"),
|
2005-03-27 21:37:05 +00:00
|
|
|
payload_type);
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
offset++;
|
|
|
|
|
|
|
|
/* Sequence number 16 bits (2 octets) */
|
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_seq_nr, tvb, offset, 2, seq_num );
|
2007-02-21 06:45:34 +00:00
|
|
|
if(p_conv_data != NULL) {
|
|
|
|
item = proto_tree_add_uint( rtp_tree, hf_rtp_ext_seq_nr, tvb, offset, 2, p_conv_data->extended_seqno );
|
|
|
|
PROTO_ITEM_SET_GENERATED(item);
|
|
|
|
}
|
2000-10-19 06:45:11 +00:00
|
|
|
offset += 2;
|
|
|
|
|
|
|
|
/* Timestamp 32 bits (4 octets) */
|
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_timestamp, tvb, offset, 4, timestamp );
|
|
|
|
offset += 4;
|
2000-04-21 01:45:58 +00:00
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
/* Synchronization source identifier 32 bits (4 octets) */
|
|
|
|
proto_tree_add_uint( rtp_tree, hf_rtp_ssrc, tvb, offset, 4, sync_src );
|
|
|
|
offset += 4;
|
2003-05-20 21:22:59 +00:00
|
|
|
} else {
|
|
|
|
offset += 12;
|
2004-06-15 18:26:08 +00:00
|
|
|
}
|
2003-05-20 21:22:59 +00:00
|
|
|
/* CSRC list*/
|
|
|
|
if ( csrc_count > 0 ) {
|
2005-02-08 20:54:08 +00:00
|
|
|
if ( tree ) {
|
2007-07-23 14:39:17 +00:00
|
|
|
ti = proto_tree_add_item(rtp_tree, hf_rtp_csrc_items, tvb, offset,
|
2011-10-04 22:44:31 +00:00
|
|
|
csrc_count * 4, ENC_NA);
|
2007-07-23 14:39:17 +00:00
|
|
|
proto_item_append_text(ti, " (%u items)", csrc_count);
|
2000-10-19 06:45:11 +00:00
|
|
|
rtp_csrc_tree = proto_item_add_subtree( ti, ett_csrc_list );
|
|
|
|
}
|
2003-05-20 21:22:59 +00:00
|
|
|
for (i = 0; i < csrc_count; i++ ) {
|
|
|
|
csrc_item = tvb_get_ntohl( tvb, offset );
|
|
|
|
if ( tree ) proto_tree_add_uint_format( rtp_csrc_tree,
|
|
|
|
hf_rtp_csrc_item, tvb, offset, 4,
|
|
|
|
csrc_item,
|
2007-05-31 18:41:25 +00:00
|
|
|
"CSRC item %d: 0x%X",
|
2003-05-20 21:22:59 +00:00
|
|
|
i, csrc_item );
|
|
|
|
offset += 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Optional RTP header extension */
|
|
|
|
if ( extension_set ) {
|
|
|
|
/* Defined by profile field is 16 bits (2 octets) */
|
2012-02-04 11:59:37 +00:00
|
|
|
hdr_extension_id = tvb_get_ntohs( tvb, offset );
|
|
|
|
if ( tree ) proto_tree_add_uint( rtp_tree, hf_rtp_prof_define, tvb, offset, 2, hdr_extension_id );
|
2003-05-20 21:22:59 +00:00
|
|
|
offset += 2;
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
hdr_extension_len = tvb_get_ntohs( tvb, offset );
|
|
|
|
if ( tree ) proto_tree_add_uint( rtp_tree, hf_rtp_length, tvb, offset, 2, hdr_extension_len);
|
2003-05-20 21:22:59 +00:00
|
|
|
offset += 2;
|
2013-03-04 22:00:48 +00:00
|
|
|
if ( hdr_extension_len > 0 ) {
|
2004-01-31 09:48:26 +00:00
|
|
|
if ( tree ) {
|
2013-03-04 22:00:48 +00:00
|
|
|
ti = proto_tree_add_item(rtp_tree, hf_rtp_hdr_exts, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
2008-01-06 11:49:32 +00:00
|
|
|
rtp_hext_tree = proto_item_add_subtree( ti, ett_hdr_ext );
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2007-12-23 20:10:57 +00:00
|
|
|
|
|
|
|
/* pass interpretation of header extension to a registered subdissector */
|
2013-03-04 22:00:48 +00:00
|
|
|
newtvb = tvb_new_subset(tvb, offset, hdr_extension_len * 4, hdr_extension_len * 4);
|
|
|
|
|
|
|
|
if (hdr_extension_id == RTP_RFC5215_ONE_BYTE_SIG) {
|
|
|
|
dissect_rtp_hext_rfc5215_onebyte (newtvb, pinfo, rtp_hext_tree);
|
|
|
|
}
|
|
|
|
else if ((hdr_extension_id & RTP_RFC5215_TWO_BYTE_MASK) == RTP_RFC5215_TWO_BYTE_SIG) {
|
|
|
|
dissect_rtp_hext_rfc5215_twobytes(tvb,
|
|
|
|
offset - 4, hdr_extension_id, newtvb,
|
|
|
|
pinfo, rtp_hext_tree);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if ( !(dissector_try_uint(rtp_hdr_ext_dissector_table, hdr_extension_id, newtvb, pinfo, rtp_hext_tree)) ) {
|
2012-07-23 15:52:17 +00:00
|
|
|
hdrext_offset = offset;
|
2013-03-04 22:00:48 +00:00
|
|
|
for ( i = 0; i < hdr_extension_len; i++ ) {
|
2012-07-23 15:52:17 +00:00
|
|
|
if ( tree ) proto_tree_add_uint( rtp_hext_tree, hf_rtp_hdr_ext, tvb, hdrext_offset, 4, tvb_get_ntohl( tvb, hdrext_offset ) );
|
|
|
|
hdrext_offset += 4;
|
|
|
|
}
|
2007-12-23 20:10:57 +00:00
|
|
|
}
|
|
|
|
}
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2013-03-04 22:00:48 +00:00
|
|
|
offset += hdr_extension_len * 4;
|
2003-05-20 21:22:59 +00:00
|
|
|
}
|
2001-06-15 00:42:39 +00:00
|
|
|
|
2003-05-20 21:22:59 +00:00
|
|
|
if ( padding_set ) {
|
|
|
|
/*
|
|
|
|
* This RTP frame has padding - find it.
|
|
|
|
*
|
|
|
|
* The padding count is found in the LAST octet of
|
|
|
|
* the packet; it contains the number of octets
|
|
|
|
* that can be ignored at the end of the packet.
|
|
|
|
*/
|
|
|
|
if (tvb_length(tvb) < tvb_reported_length(tvb)) {
|
2001-06-15 00:42:39 +00:00
|
|
|
/*
|
2003-05-20 21:22:59 +00:00
|
|
|
* We don't *have* the last octet of the
|
|
|
|
* packet, so we can't get the padding
|
|
|
|
* count.
|
2001-06-15 00:42:39 +00:00
|
|
|
*
|
2003-05-20 21:22:59 +00:00
|
|
|
* Put an indication of that into the
|
|
|
|
* tree, and just put in a raw data
|
|
|
|
* item.
|
2001-06-15 00:42:39 +00:00
|
|
|
*/
|
2003-05-20 21:22:59 +00:00
|
|
|
if ( tree ) proto_tree_add_text(rtp_tree, tvb, 0, 0,
|
|
|
|
"Frame has padding, but not all the frame data was captured");
|
|
|
|
call_dissector(data_handle,
|
2009-08-16 12:36:22 +00:00
|
|
|
tvb_new_subset_remaining(tvb, offset),
|
2003-05-20 21:22:59 +00:00
|
|
|
pinfo, rtp_tree);
|
|
|
|
return;
|
|
|
|
}
|
2001-06-15 00:42:39 +00:00
|
|
|
|
2003-05-20 21:22:59 +00:00
|
|
|
padding_count = tvb_get_guint8( tvb,
|
|
|
|
tvb_reported_length( tvb ) - 1 );
|
|
|
|
data_len =
|
|
|
|
tvb_reported_length_remaining( tvb, offset ) - padding_count;
|
|
|
|
|
2005-04-04 20:12:18 +00:00
|
|
|
rtp_info->info_payload_offset = offset;
|
|
|
|
rtp_info->info_payload_len = tvb_length_remaining(tvb, offset);
|
|
|
|
rtp_info->info_padding_count = padding_count;
|
2003-05-20 21:22:59 +00:00
|
|
|
|
|
|
|
if (data_len > 0) {
|
2001-06-15 00:42:39 +00:00
|
|
|
/*
|
2003-05-20 21:22:59 +00:00
|
|
|
* There's data left over when you take out
|
|
|
|
* the padding; dissect it.
|
2001-06-15 00:42:39 +00:00
|
|
|
*/
|
2013-04-24 21:25:30 +00:00
|
|
|
/* Ensure that tap is called after packet dissection, even in case of exception */
|
|
|
|
TRY {
|
|
|
|
dissect_rtp_data( tvb, pinfo, tree, rtp_tree,
|
|
|
|
offset,
|
|
|
|
data_len,
|
|
|
|
data_len,
|
|
|
|
payload_type );
|
|
|
|
} CATCH_ALL {
|
|
|
|
if (!pinfo->flags.in_error_pkt)
|
|
|
|
tap_queue_packet(rtp_tap, pinfo, rtp_info);
|
|
|
|
RETHROW;
|
|
|
|
}
|
|
|
|
ENDTRY;
|
2003-05-20 21:22:59 +00:00
|
|
|
offset += data_len;
|
|
|
|
} else if (data_len < 0) {
|
|
|
|
/*
|
|
|
|
* The padding count is bigger than the
|
|
|
|
* amount of RTP payload in the packet!
|
|
|
|
* Clip the padding count.
|
|
|
|
*
|
|
|
|
* XXX - put an item in the tree to indicate
|
|
|
|
* that the padding count is bogus?
|
|
|
|
*/
|
|
|
|
padding_count =
|
|
|
|
tvb_reported_length_remaining(tvb, offset);
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2003-05-20 21:22:59 +00:00
|
|
|
if (padding_count > 1) {
|
2001-06-15 00:42:39 +00:00
|
|
|
/*
|
2003-05-20 21:22:59 +00:00
|
|
|
* There's more than one byte of padding;
|
|
|
|
* show all but the last byte as padding
|
|
|
|
* data.
|
2001-06-15 00:42:39 +00:00
|
|
|
*/
|
2003-05-20 21:22:59 +00:00
|
|
|
if ( tree ) proto_tree_add_item( rtp_tree, hf_rtp_padding_data,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, padding_count - 1, ENC_NA );
|
2003-05-20 21:22:59 +00:00
|
|
|
offset += padding_count - 1;
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2003-05-20 21:22:59 +00:00
|
|
|
/*
|
|
|
|
* Show the last byte in the PDU as the padding
|
|
|
|
* count.
|
|
|
|
*/
|
|
|
|
if ( tree ) proto_tree_add_item( rtp_tree, hf_rtp_padding_count,
|
2011-10-06 03:35:44 +00:00
|
|
|
tvb, offset, 1, ENC_BIG_ENDIAN );
|
2003-05-20 21:22:59 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
/*
|
|
|
|
* No padding.
|
|
|
|
*/
|
2013-03-04 22:00:48 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) > 0) {
|
2013-04-24 21:25:30 +00:00
|
|
|
/* Ensure that tap is called after packet dissection, even in case of exception */
|
|
|
|
TRY {
|
|
|
|
dissect_rtp_data( tvb, pinfo, tree, rtp_tree, offset,
|
|
|
|
tvb_length_remaining( tvb, offset ),
|
|
|
|
tvb_reported_length_remaining( tvb, offset ),
|
|
|
|
payload_type );
|
|
|
|
} CATCH_ALL {
|
|
|
|
if (!pinfo->flags.in_error_pkt)
|
|
|
|
tap_queue_packet(rtp_tap, pinfo, rtp_info);
|
|
|
|
RETHROW;
|
|
|
|
}
|
|
|
|
ENDTRY;
|
2013-03-04 22:00:48 +00:00
|
|
|
}
|
2013-04-24 21:25:30 +00:00
|
|
|
rtp_info->info_payload_offset = offset;
|
|
|
|
rtp_info->info_payload_len = tvb_length_remaining(tvb, offset);
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
2013-04-24 21:25:30 +00:00
|
|
|
if (!pinfo->flags.in_error_pkt)
|
|
|
|
tap_queue_packet(rtp_tap, pinfo, rtp_info);
|
2000-04-21 01:45:58 +00:00
|
|
|
}
|
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
static void
|
|
|
|
dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|
|
|
{
|
|
|
|
unsigned int offset = 0;
|
|
|
|
unsigned int hdr_extension_len = 0;
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_item *ti2 = NULL;
|
|
|
|
proto_tree *rtp_hext_tree = NULL;
|
|
|
|
proto_tree *rtp_hext_tree2 = NULL;
|
|
|
|
unsigned int i;
|
|
|
|
guint32 ext_value;
|
|
|
|
unsigned int ft_type = 0;
|
|
|
|
unsigned int bss_qidx = 0;
|
|
|
|
unsigned int bss_qidx_ml = 0;
|
|
|
|
|
|
|
|
hdr_extension_len = tvb_reported_length(tvb)/4;
|
|
|
|
|
|
|
|
if ( hdr_extension_len > 0 ) {
|
|
|
|
unsigned int hdrext_offset = 0;
|
|
|
|
|
|
|
|
if ( tree ) {
|
2013-04-04 15:33:14 +00:00
|
|
|
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hext_tree = proto_item_add_subtree( ti, ett_hdr_ext_ed137s );
|
|
|
|
}
|
|
|
|
for(i=0; i<hdr_extension_len; i++) {
|
|
|
|
if ( tree ) {
|
2013-04-04 15:33:14 +00:00
|
|
|
ti2 = proto_tree_add_item(rtp_hext_tree, hf_rtp_hdr_ed137, tvb, hdrext_offset, 4, ENC_NA);
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hext_tree2 = proto_item_add_subtree( ti2, ett_hdr_ext_ed137 );
|
|
|
|
ext_value=tvb_get_ntohl( tvb, hdrext_offset );
|
|
|
|
|
|
|
|
if (RTP_ED137_ptt_mask(ext_value)) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", PTT");
|
|
|
|
}
|
|
|
|
if (RTP_ED137_squ_mask(ext_value)) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", SQU");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Following bits are used from ED137 RTPRx/RTPTx Information field */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ptt_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_squ, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ptt_id, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_sct, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_x, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
if (RTP_ED137_extended_information(ext_value)) {
|
|
|
|
/* Extended information is used */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_len, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
ft_type=RTP_ED137_feature_type(ext_value);
|
|
|
|
switch (ft_type) {
|
|
|
|
case RTP_ED137_feature_bss_type:
|
|
|
|
bss_qidx=RTP_ED137_feature_bss_qidx(ext_value);
|
|
|
|
bss_qidx_ml=RTP_ED137_feature_bss_qidx_ml(ext_value);
|
|
|
|
if (0==bss_qidx_ml) {
|
|
|
|
/* Special handling for RSSI method */
|
|
|
|
if (bss_qidx<=15) {
|
|
|
|
/* Correct range */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_bss_rssi_qidx, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Handle as other method */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_bss_qidx, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Other BSS method handling */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_bss_qidx, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_bss_qidx_ml, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_bss_nu, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_ft_value, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Extended information is not used */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_x_nu, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137_vf, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
hdrext_offset += 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|
|
|
{
|
|
|
|
unsigned int offset = 0;
|
|
|
|
unsigned int hdr_extension_len = 0;
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_item *ti2 = NULL;
|
|
|
|
proto_tree *rtp_hext_tree = NULL;
|
|
|
|
proto_tree *rtp_hext_tree2 = NULL;
|
|
|
|
unsigned int i;
|
|
|
|
guint32 ext_value;
|
|
|
|
unsigned int ft_type = 0;
|
|
|
|
|
|
|
|
hdr_extension_len = tvb_reported_length(tvb)/4;
|
|
|
|
|
|
|
|
if ( hdr_extension_len > 0 ) {
|
|
|
|
unsigned int hdrext_offset = 0;
|
|
|
|
|
|
|
|
if ( tree ) {
|
2013-04-04 15:33:14 +00:00
|
|
|
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hext_tree = proto_item_add_subtree( ti, ett_hdr_ext_ed137s );
|
|
|
|
}
|
|
|
|
for(i=0; i<hdr_extension_len; i++) {
|
|
|
|
if ( tree ) {
|
2013-04-04 15:33:14 +00:00
|
|
|
ti2 = proto_tree_add_item(rtp_hext_tree, hf_rtp_hdr_ed137a, tvb, hdrext_offset, 4, ENC_NA);
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hext_tree2 = proto_item_add_subtree( ti2, ett_hdr_ext_ed137a );
|
|
|
|
ext_value=tvb_get_ntohl( tvb, hdrext_offset );
|
|
|
|
|
|
|
|
if (RTP_ED137A_ptt_mask(ext_value)) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", PTT");
|
|
|
|
}
|
|
|
|
if (RTP_ED137A_squ_mask(ext_value)) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", SQU");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Following bits are used from ED137A/B RTPRx Information field */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ptt_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_squ, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ptt_id, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_pm, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ptts, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_sct, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_reserved, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_x, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
if (RTP_ED137A_extended_information(ext_value)) {
|
|
|
|
/* Extended information is used */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ft_type, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ft_len, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
ft_type=RTP_ED137A_feature_type(ext_value);
|
|
|
|
switch (ft_type) {
|
|
|
|
default:
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_ft_value, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* Extended information is not used */
|
|
|
|
proto_tree_add_item( rtp_hext_tree2, hf_rtp_hdr_ed137a_x_nu, tvb, hdrext_offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
hdrext_offset += 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
/* calculate the extended sequence number - top 16 bits of the previous sequence number,
|
|
|
|
* plus our own; then correct for wrapping */
|
2012-06-01 18:35:20 +00:00
|
|
|
static guint32
|
|
|
|
calculate_extended_seqno(guint32 previous_seqno, guint16 raw_seqno)
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
guint32 seqno = (previous_seqno & 0xffff0000) | raw_seqno;
|
|
|
|
if(seqno + 0x8000 < previous_seqno) {
|
|
|
|
seqno += 0x10000;
|
|
|
|
} else if(previous_seqno + 0x8000 < seqno) {
|
|
|
|
/* we got an out-of-order packet which happened to go backwards over the
|
|
|
|
* wrap boundary */
|
|
|
|
seqno -= 0x10000;
|
|
|
|
}
|
|
|
|
return seqno;
|
|
|
|
}
|
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
/* Look for conversation info */
|
2012-06-01 18:35:20 +00:00
|
|
|
static void
|
|
|
|
get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info)
|
2004-06-15 18:26:08 +00:00
|
|
|
{
|
|
|
|
/* Conversation and current data */
|
|
|
|
conversation_t *p_conv = NULL;
|
|
|
|
struct _rtp_conversation_info *p_conv_data = NULL;
|
|
|
|
|
2004-06-30 21:08:58 +00:00
|
|
|
/* Use existing packet info if available */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2004-06-30 21:08:58 +00:00
|
|
|
|
|
|
|
if (!p_conv_data)
|
2004-06-15 18:26:08 +00:00
|
|
|
{
|
|
|
|
/* First time, get info from conversation */
|
2005-02-02 20:07:03 +00:00
|
|
|
p_conv = find_conversation(pinfo->fd->num, &pinfo->net_dst, &pinfo->net_src,
|
2005-02-08 20:54:08 +00:00
|
|
|
pinfo->ptype,
|
|
|
|
pinfo->destport, pinfo->srcport, NO_ADDR_B);
|
2004-06-15 18:26:08 +00:00
|
|
|
if (p_conv)
|
|
|
|
{
|
|
|
|
/* Create space for packet info */
|
|
|
|
struct _rtp_conversation_info *p_conv_packet_data;
|
2013-03-17 16:48:47 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtp);
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2004-07-29 02:25:54 +00:00
|
|
|
if (p_conv_data) {
|
2007-02-21 06:45:34 +00:00
|
|
|
guint32 seqno;
|
|
|
|
|
2004-07-29 02:25:54 +00:00
|
|
|
/* Save this conversation info into packet info */
|
2013-03-17 16:48:47 +00:00
|
|
|
p_conv_packet_data = se_new(struct _rtp_conversation_info);
|
2009-03-22 16:25:01 +00:00
|
|
|
g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
2004-07-29 02:25:54 +00:00
|
|
|
p_conv_packet_data->frame_number = p_conv_data->frame_number;
|
2009-05-19 18:42:33 +00:00
|
|
|
p_conv_packet_data->is_video = p_conv_data->is_video;
|
2005-03-27 21:37:05 +00:00
|
|
|
p_conv_packet_data->rtp_dyn_payload = p_conv_data->rtp_dyn_payload;
|
2007-02-21 06:45:34 +00:00
|
|
|
p_conv_packet_data->rtp_conv_info = p_conv_data->rtp_conv_info;
|
2007-08-21 07:23:34 +00:00
|
|
|
p_conv_packet_data->srtp_info = p_conv_data->srtp_info;
|
2013-05-12 18:11:02 +00:00
|
|
|
p_add_proto_data(pinfo->fd, proto_rtp, 0, p_conv_packet_data);
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
/* calculate extended sequence number */
|
|
|
|
seqno = calculate_extended_seqno(p_conv_data->extended_seqno,
|
|
|
|
rtp_info->info_seq_num);
|
|
|
|
|
|
|
|
p_conv_packet_data->extended_seqno = seqno;
|
|
|
|
p_conv_data->extended_seqno = seqno;
|
2004-07-29 02:25:54 +00:00
|
|
|
}
|
2004-06-15 18:26:08 +00:00
|
|
|
}
|
|
|
|
}
|
2005-04-04 20:12:18 +00:00
|
|
|
if (p_conv_data) rtp_info->info_setup_frame_num = p_conv_data->frame_number;
|
2005-03-27 21:37:05 +00:00
|
|
|
}
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2005-03-27 21:37:05 +00:00
|
|
|
|
|
|
|
/* Display setup info */
|
2012-06-01 18:35:20 +00:00
|
|
|
static void
|
|
|
|
show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2005-03-27 21:37:05 +00:00
|
|
|
{
|
|
|
|
/* Conversation and current data */
|
|
|
|
struct _rtp_conversation_info *p_conv_data = NULL;
|
2008-10-11 10:41:58 +00:00
|
|
|
proto_tree *rtp_setup_tree;
|
2008-10-13 19:32:06 +00:00
|
|
|
proto_item *ti;
|
2005-03-27 21:37:05 +00:00
|
|
|
|
|
|
|
/* Use existing packet info if available */
|
2013-05-12 18:11:02 +00:00
|
|
|
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0);
|
2005-03-27 21:37:05 +00:00
|
|
|
|
|
|
|
if (!p_conv_data) return;
|
|
|
|
|
|
|
|
/* Create setup info subtree with summary info. */
|
|
|
|
ti = proto_tree_add_string_format(tree, hf_rtp_setup, tvb, 0, 0,
|
2012-06-01 18:35:20 +00:00
|
|
|
"", "Stream setup by %s (frame %u)",
|
|
|
|
p_conv_data->method,
|
|
|
|
p_conv_data->frame_number);
|
2004-06-15 18:26:08 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(ti);
|
|
|
|
rtp_setup_tree = proto_item_add_subtree(ti, ett_rtp_setup);
|
|
|
|
if (rtp_setup_tree)
|
|
|
|
{
|
|
|
|
/* Add details into subtree */
|
|
|
|
proto_item* item = proto_tree_add_uint(rtp_setup_tree, hf_rtp_setup_frame,
|
|
|
|
tvb, 0, 0, p_conv_data->frame_number);
|
|
|
|
PROTO_ITEM_SET_GENERATED(item);
|
|
|
|
item = proto_tree_add_string(rtp_setup_tree, hf_rtp_setup_method,
|
|
|
|
tvb, 0, 0, p_conv_data->method);
|
|
|
|
PROTO_ITEM_SET_GENERATED(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-02-09 17:42:42 +00:00
|
|
|
/* Dissect PacketCable CCC header */
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_pkt_ccc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *pkt_ccc_tree = NULL;
|
|
|
|
|
|
|
|
if ( tree ) {
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_pkt_ccc, tvb, 0, 12, ENC_NA);
|
2006-02-09 17:42:42 +00:00
|
|
|
pkt_ccc_tree = proto_item_add_subtree(ti, ett_pkt_ccc);
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(pkt_ccc_tree, hf_pkt_ccc_id, tvb, 0, 4, ENC_BIG_ENDIAN);
|
2011-02-09 02:27:41 +00:00
|
|
|
proto_tree_add_item(pkt_ccc_tree, hf_pkt_ccc_ts, tvb, 4, 8,
|
|
|
|
ENC_TIME_NTP|ENC_BIG_ENDIAN);
|
2006-02-09 17:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dissect_rtp(tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Register PacketCable CCC */
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_pkt_ccc(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
&hf_pkt_ccc_id,
|
|
|
|
{
|
|
|
|
"PacketCable CCC Identifier",
|
|
|
|
"pkt_ccc.ccc_id",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
2011-02-09 02:27:41 +00:00
|
|
|
NULL, HFILL
|
2006-02-09 17:42:42 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_pkt_ccc_ts,
|
|
|
|
{
|
|
|
|
"PacketCable CCC Timestamp",
|
|
|
|
"pkt_ccc.ts",
|
2011-02-09 02:27:41 +00:00
|
|
|
FT_ABSOLUTE_TIME,
|
|
|
|
ABSOLUTE_TIME_UTC,
|
2006-02-09 17:42:42 +00:00
|
|
|
NULL,
|
|
|
|
0x0,
|
2011-02-09 02:27:41 +00:00
|
|
|
NULL, HFILL
|
2006-02-09 17:42:42 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] =
|
|
|
|
{
|
|
|
|
&ett_pkt_ccc,
|
|
|
|
};
|
|
|
|
|
|
|
|
module_t *pkt_ccc_module;
|
|
|
|
|
|
|
|
proto_pkt_ccc = proto_register_protocol("PacketCable Call Content Connection",
|
|
|
|
"PKT CCC", "pkt_ccc");
|
|
|
|
proto_register_field_array(proto_pkt_ccc, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
|
|
|
|
register_dissector("pkt_ccc", dissect_pkt_ccc, proto_pkt_ccc);
|
|
|
|
|
2008-09-15 19:33:38 +00:00
|
|
|
pkt_ccc_module = prefs_register_protocol(proto_pkt_ccc, proto_reg_handoff_pkt_ccc);
|
2006-02-09 17:42:42 +00:00
|
|
|
|
|
|
|
prefs_register_uint_preference(pkt_ccc_module, "udp_port",
|
|
|
|
"UDP port",
|
|
|
|
"Decode packets on this UDP port as PacketCable CCC",
|
|
|
|
10, &global_pkt_ccc_udp_port);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_pkt_ccc(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Register this dissector as one that can be selected by a
|
|
|
|
* UDP port number.
|
|
|
|
*/
|
2008-09-15 19:33:38 +00:00
|
|
|
static gboolean initialized = FALSE;
|
|
|
|
static dissector_handle_t pkt_ccc_handle;
|
|
|
|
static guint saved_pkt_ccc_udp_port;
|
|
|
|
|
|
|
|
if (!initialized) {
|
|
|
|
pkt_ccc_handle = find_dissector("pkt_ccc");
|
|
|
|
dissector_add_handle("udp.port", pkt_ccc_handle); /* for 'decode-as' */
|
|
|
|
initialized = TRUE;
|
|
|
|
} else {
|
|
|
|
if (saved_pkt_ccc_udp_port != 0) {
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_delete_uint("udp.port", saved_pkt_ccc_udp_port, pkt_ccc_handle);
|
2008-09-15 19:33:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (global_pkt_ccc_udp_port != 0) {
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("udp.port", global_pkt_ccc_udp_port, pkt_ccc_handle);
|
2008-09-15 19:33:38 +00:00
|
|
|
}
|
|
|
|
saved_pkt_ccc_udp_port = global_pkt_ccc_udp_port;
|
2006-02-09 17:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Register RTP */
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2000-04-21 01:45:58 +00:00
|
|
|
void
|
|
|
|
proto_register_rtp(void)
|
|
|
|
{
|
2002-08-28 21:04:11 +00:00
|
|
|
static hf_register_info hf[] =
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_version,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Version",
|
|
|
|
"rtp.version",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_version_vals),
|
2003-11-09 22:55:35 +00:00
|
|
|
0xC0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_padding,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Padding",
|
|
|
|
"rtp.padding",
|
|
|
|
FT_BOOLEAN,
|
2003-11-09 22:55:35 +00:00
|
|
|
8,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2003-11-09 22:55:35 +00:00
|
|
|
0x20,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_extension,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Extension",
|
|
|
|
"rtp.ext",
|
|
|
|
FT_BOOLEAN,
|
2003-11-09 22:55:35 +00:00
|
|
|
8,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2003-11-09 22:55:35 +00:00
|
|
|
0x10,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_csrc_count,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Contributing source identifiers count",
|
|
|
|
"rtp.cc",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
2003-11-09 22:55:35 +00:00
|
|
|
0x0F,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_marker,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Marker",
|
|
|
|
"rtp.marker",
|
|
|
|
FT_BOOLEAN,
|
2003-11-09 22:55:35 +00:00
|
|
|
8,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2003-11-09 22:55:35 +00:00
|
|
|
0x80,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_payload_type,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Payload type",
|
|
|
|
"rtp.p_type",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
2005-03-28 19:19:19 +00:00
|
|
|
NULL,
|
2003-11-09 22:55:35 +00:00
|
|
|
0x7F,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_seq_nr,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Sequence number",
|
|
|
|
"rtp.seq",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2007-02-21 06:45:34 +00:00
|
|
|
{
|
|
|
|
&hf_rtp_ext_seq_nr,
|
|
|
|
{
|
|
|
|
"Extended sequence number",
|
|
|
|
"rtp.extseq",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2007-02-21 06:45:34 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_timestamp,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Timestamp",
|
|
|
|
"rtp.timestamp",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_ssrc,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Synchronization Source identifier",
|
|
|
|
"rtp.ssrc",
|
|
|
|
FT_UINT32,
|
2007-05-31 18:41:25 +00:00
|
|
|
BASE_HEX_DEC,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_prof_define,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Defined by profile",
|
|
|
|
"rtp.ext.profile",
|
|
|
|
FT_UINT16,
|
2012-07-23 15:52:17 +00:00
|
|
|
BASE_HEX_DEC,
|
2013-03-04 22:00:48 +00:00
|
|
|
VALS(rtp_ext_profile_vals),
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_length,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Extension length",
|
|
|
|
"rtp.ext.len",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2007-07-23 14:39:17 +00:00
|
|
|
{
|
|
|
|
&hf_rtp_csrc_items,
|
|
|
|
{
|
|
|
|
"Contributing Source identifiers",
|
|
|
|
"rtp.csrc.items",
|
|
|
|
FT_NONE,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2007-07-23 14:39:17 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_csrc_item,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"CSRC item",
|
|
|
|
"rtp.csrc.item",
|
|
|
|
FT_UINT32,
|
2007-05-31 18:41:25 +00:00
|
|
|
BASE_HEX_DEC,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2007-07-23 14:39:17 +00:00
|
|
|
{
|
|
|
|
&hf_rtp_hdr_exts,
|
|
|
|
{
|
|
|
|
"Header extensions",
|
|
|
|
"rtp.hdr_exts",
|
|
|
|
FT_NONE,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2007-07-23 14:39:17 +00:00
|
|
|
}
|
|
|
|
},
|
2013-03-04 22:00:48 +00:00
|
|
|
/* ED137 and ED137A common structures */
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137s,
|
|
|
|
{
|
|
|
|
"ED137 extensions",
|
|
|
|
"rtp.ext.ed137s",
|
|
|
|
FT_NONE,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/* ED137 only structures */
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137,
|
|
|
|
{
|
|
|
|
"ED137 extension",
|
|
|
|
"rtp.ext.ed137",
|
|
|
|
FT_NONE,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ptt_type,
|
|
|
|
{
|
|
|
|
"PTT Type",
|
|
|
|
"rtp.ext.ed137.ptt_type",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137_ptt_type),
|
|
|
|
0xE0000000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_squ,
|
|
|
|
{
|
|
|
|
"SQU",
|
|
|
|
"rtp.ext.ed137.squ",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137_squ),
|
|
|
|
0x10000000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ptt_id,
|
|
|
|
{
|
|
|
|
"PTT-id",
|
|
|
|
"rtp.ext.ed137.ptt_id",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0F000000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_sct,
|
|
|
|
{
|
|
|
|
"Simultaneous Call Transmissions",
|
|
|
|
"rtp.ext.ed137.sct",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00800000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_x,
|
|
|
|
{
|
|
|
|
"X",
|
|
|
|
"rtp.ext.ed137.x",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00400000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_x_nu,
|
|
|
|
{
|
|
|
|
"Not used",
|
|
|
|
"rtp.ext.ed137.x-nu",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x003FFFFE,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_type,
|
|
|
|
{
|
|
|
|
"Feature type",
|
|
|
|
"rtp.ext.ed137.ft.type",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_HEX_DEC,
|
|
|
|
VALS(rtp_ext_ed137_ft_type),
|
|
|
|
0x003C0000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_len,
|
|
|
|
{
|
|
|
|
"Feature length",
|
|
|
|
"rtp.ext.ed137.ft.len",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0003C000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_value,
|
|
|
|
{
|
|
|
|
"Feature value",
|
|
|
|
"rtp.ext.ed137.ft.value",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_HEX_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00003FFE,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_vf,
|
|
|
|
{
|
|
|
|
"VF",
|
|
|
|
"rtp.ext.ed137.vf",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137_vf),
|
|
|
|
0x00000001,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_bss_qidx,
|
|
|
|
{
|
|
|
|
"BSS Quality Index",
|
|
|
|
"rtp.ext.ed137.ft.bss.qidx",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00003FC0,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_bss_rssi_qidx,
|
|
|
|
{
|
|
|
|
"BSS Quality Index",
|
|
|
|
"rtp.ext.ed137.ft.bss.qidx",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137_ft_bss_rssi_qidx),
|
|
|
|
0x00003FC0,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_bss_qidx_ml,
|
|
|
|
{
|
|
|
|
"BSS Quality Index Method",
|
|
|
|
"rtp.ext.ed137.ft.bss.qidx-ml",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137_ft_bss_qidx_ml),
|
|
|
|
0x00000038,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137_ft_bss_nu,
|
|
|
|
{
|
|
|
|
"Not used",
|
|
|
|
"rtp.ext.ed137.ft.bss-nu",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00000006,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/* ED137A only structures */
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a,
|
|
|
|
{
|
|
|
|
"ED137A extension",
|
|
|
|
"rtp.ext.ed137A",
|
|
|
|
FT_NONE,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ptt_type,
|
|
|
|
{
|
|
|
|
"PTT Type",
|
|
|
|
"rtp.ext.ed137A.ptt_type",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137a_ptt_type),
|
|
|
|
0xE0000000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_squ,
|
|
|
|
{
|
|
|
|
"SQU",
|
|
|
|
"rtp.ext.ed137A.squ",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(rtp_ext_ed137a_squ),
|
|
|
|
0x10000000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ptt_id,
|
|
|
|
{
|
|
|
|
"PTT-id",
|
|
|
|
"rtp.ext.ed137A.ptt_id",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0FC00000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_pm,
|
|
|
|
{
|
|
|
|
"PTT Mute",
|
|
|
|
"rtp.ext.ed137A.pm",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00200000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ptts,
|
|
|
|
{
|
|
|
|
"PTT Summation",
|
|
|
|
"rtp.ext.ed137A.ptts",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00100000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_sct,
|
|
|
|
{
|
|
|
|
"Simultaneous Call Transmissions",
|
|
|
|
"rtp.ext.ed137a.sct",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00080000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_reserved,
|
|
|
|
{
|
|
|
|
"Reserved",
|
|
|
|
"rtp.ext.ed137A.reserved",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_HEX_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00060000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_x,
|
|
|
|
{
|
|
|
|
"X",
|
|
|
|
"rtp.ext.ed137A.x",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00010000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_x_nu,
|
|
|
|
{
|
|
|
|
"Not used",
|
|
|
|
"rtp.ext.ed137A.x-nu",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0000FFFF,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ft_type,
|
|
|
|
{
|
|
|
|
"Feature type",
|
|
|
|
"rtp.ext.ed137A.ft.type",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_HEX_DEC,
|
|
|
|
VALS(rtp_ext_ed137a_ft_type),
|
|
|
|
0x0000F000,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ft_len,
|
|
|
|
{
|
|
|
|
"Feature length",
|
|
|
|
"rtp.ext.ed137A.ft.len",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x00000F00,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_hdr_ed137a_ft_value,
|
|
|
|
{
|
|
|
|
"Feature value",
|
|
|
|
"rtp.ext.ed137A.ft.value",
|
|
|
|
FT_UINT32,
|
|
|
|
BASE_HEX_DEC,
|
|
|
|
NULL,
|
|
|
|
0x000000FF,
|
|
|
|
NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/* Other RTP structures */
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_hdr_ext,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Header extension",
|
|
|
|
"rtp.hdr_ext",
|
|
|
|
FT_UINT32,
|
2013-03-04 22:00:48 +00:00
|
|
|
BASE_HEX_DEC,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_data,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Payload",
|
|
|
|
"rtp.payload",
|
|
|
|
FT_BYTES,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
BASE_NONE,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_padding_data,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Padding data",
|
|
|
|
"rtp.padding.data",
|
|
|
|
FT_BYTES,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
BASE_NONE,
|
2002-08-28 21:04:11 +00:00
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
2000-10-19 06:45:11 +00:00
|
|
|
&hf_rtp_padding_count,
|
2002-08-28 21:04:11 +00:00
|
|
|
{
|
|
|
|
"Padding count",
|
|
|
|
"rtp.padding.count",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
2000-10-19 06:45:11 +00:00
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2000-10-19 06:45:11 +00:00
|
|
|
}
|
|
|
|
},
|
2004-06-15 18:26:08 +00:00
|
|
|
{
|
|
|
|
&hf_rtp_setup,
|
|
|
|
{
|
|
|
|
"Stream setup",
|
|
|
|
"rtp.setup",
|
|
|
|
FT_STRING,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"Stream setup, method and frame number", HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_setup_frame,
|
|
|
|
{
|
|
|
|
"Setup frame",
|
|
|
|
"rtp.setup-frame",
|
|
|
|
FT_FRAMENUM,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"Frame that set up this stream", HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_setup_method,
|
|
|
|
{
|
|
|
|
"Setup Method",
|
|
|
|
"rtp.setup-method",
|
|
|
|
FT_STRING,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"Method used to set up this stream", HFILL
|
|
|
|
}
|
2006-06-27 12:40:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_rfc2198_follow,
|
|
|
|
{
|
|
|
|
"Follow",
|
|
|
|
"rtp.follow",
|
|
|
|
FT_BOOLEAN,
|
|
|
|
8,
|
2009-07-07 14:54:15 +00:00
|
|
|
TFS(&tfs_set_notset),
|
2006-06-27 12:40:53 +00:00
|
|
|
0x80,
|
|
|
|
"Next header follows", HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_rfc2198_tm_off,
|
|
|
|
{
|
|
|
|
"Timestamp offset",
|
|
|
|
"rtp.timestamp-offset",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0xFFFC,
|
2009-08-29 02:25:04 +00:00
|
|
|
NULL, HFILL
|
2006-06-27 12:40:53 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_rfc2198_bl_len,
|
|
|
|
{
|
|
|
|
"Block length",
|
|
|
|
"rtp.block-length",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x03FF,
|
2009-08-29 02:25:04 +00:00
|
|
|
NULL, HFILL
|
2006-06-27 12:40:53 +00:00
|
|
|
}
|
2007-02-21 06:45:34 +00:00
|
|
|
},
|
2012-07-23 15:52:17 +00:00
|
|
|
{
|
|
|
|
&hf_rtp_ext_rfc5285_id,
|
|
|
|
{
|
|
|
|
"Identifier",
|
|
|
|
"rtp.ext.rfc5285.id",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"RFC 5285 Header Extension Identifier",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_ext_rfc5285_length,
|
|
|
|
{
|
|
|
|
"Length",
|
|
|
|
"rtp.ext.rfc5285.len",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"RFC 5285 Header Extension length",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_ext_rfc5285_appbits,
|
|
|
|
{
|
|
|
|
"Application Bits",
|
|
|
|
"rtp.ext.rfc5285.appbits",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"RFC 5285 2-bytes header application bits",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_rtp_ext_rfc5285_data,
|
|
|
|
{
|
|
|
|
"Extension Data",
|
|
|
|
"rtp.ext.rfc5285.data",
|
|
|
|
FT_BYTES,
|
|
|
|
BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
|
|
|
"RFC 5285 Extension Data",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
2008-07-11 19:48:30 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
/* reassembly stuff */
|
|
|
|
{&hf_rtp_fragments,
|
|
|
|
{"RTP Fragments", "rtp.fragments", FT_NONE, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2007-02-21 06:45:34 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment,
|
|
|
|
{"RTP Fragment data", "rtp.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2007-02-21 06:45:34 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment_overlap,
|
|
|
|
{"Fragment overlap", "rtp.fragment.overlap", FT_BOOLEAN, BASE_NONE,
|
|
|
|
NULL, 0x0, "Fragment overlaps with other fragments", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment_overlap_conflict,
|
|
|
|
{"Conflicting data in fragment overlap", "rtp.fragment.overlap.conflict",
|
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
|
|
|
"Overlapping fragments contained conflicting data", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment_multiple_tails,
|
|
|
|
{"Multiple tail fragments found", "rtp.fragment.multipletails",
|
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
|
|
|
"Several tails were found when defragmenting the packet", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment_too_long_fragment,
|
|
|
|
{"Fragment too long", "rtp.fragment.toolongfragment",
|
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
|
|
|
"Fragment contained data past end of packet", HFILL }
|
|
|
|
},
|
|
|
|
|
|
|
|
{&hf_rtp_fragment_error,
|
|
|
|
{"Defragmentation error", "rtp.fragment.error",
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
"Defragmentation error due to illegal fragments", HFILL }
|
|
|
|
},
|
|
|
|
|
2011-01-30 21:01:07 +00:00
|
|
|
{&hf_rtp_fragment_count,
|
|
|
|
{"Fragment count", "rtp.fragment.count",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
{&hf_rtp_reassembled_in,
|
|
|
|
{"RTP fragment, reassembled in frame", "rtp.reassembled_in",
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
"This RTP packet is reassembled in this frame", HFILL }
|
2007-08-21 07:23:34 +00:00
|
|
|
},
|
2010-02-02 16:01:52 +00:00
|
|
|
{&hf_rtp_reassembled_length,
|
2010-02-03 08:47:15 +00:00
|
|
|
{"Reassembled RTP length", "rtp.reassembled.length",
|
2010-02-02 16:01:52 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
"The total length of the reassembled payload", HFILL }
|
|
|
|
},
|
2007-08-21 07:23:34 +00:00
|
|
|
{&hf_srtp_encrypted_payload,
|
|
|
|
{"SRTP Encrypted Payload", "srtp.enc_payload",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL }
|
2007-08-21 07:23:34 +00:00
|
|
|
},
|
|
|
|
{&hf_srtp_mki,
|
|
|
|
{"SRTP MKI", "srtp.mki",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"SRTP Master Key Index", HFILL }
|
|
|
|
},
|
|
|
|
{&hf_srtp_auth_tag,
|
|
|
|
{"SRTP Auth Tag", "srtp.auth_tag",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"SRTP Authentication Tag", HFILL }
|
2004-06-15 18:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
2002-08-28 21:04:11 +00:00
|
|
|
|
|
|
|
static gint *ett[] =
|
2000-10-19 06:45:11 +00:00
|
|
|
{
|
2000-04-21 01:45:58 +00:00
|
|
|
&ett_rtp,
|
2000-10-19 06:45:11 +00:00
|
|
|
&ett_csrc_list,
|
|
|
|
&ett_hdr_ext,
|
2012-07-23 15:52:17 +00:00
|
|
|
&ett_hdr_ext_rfc5285,
|
2013-03-04 22:00:48 +00:00
|
|
|
&ett_hdr_ext_ed137s,
|
|
|
|
&ett_hdr_ext_ed137,
|
|
|
|
&ett_hdr_ext_ed137a,
|
2006-06-27 12:40:53 +00:00
|
|
|
&ett_rtp_setup,
|
|
|
|
&ett_rtp_rfc2198,
|
2007-02-21 06:45:34 +00:00
|
|
|
&ett_rtp_rfc2198_hdr,
|
|
|
|
&ett_rtp_fragment,
|
|
|
|
&ett_rtp_fragments
|
2000-04-21 01:45:58 +00:00
|
|
|
};
|
|
|
|
|
2004-06-15 18:26:08 +00:00
|
|
|
module_t *rtp_module;
|
|
|
|
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_rtp = proto_register_protocol("Real-Time Transport Protocol",
|
2009-03-06 22:55:02 +00:00
|
|
|
"RTP", "rtp");
|
2000-10-19 06:45:11 +00:00
|
|
|
proto_register_field_array(proto_rtp, hf, array_length(hf));
|
2000-04-21 01:45:58 +00:00
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2000-10-19 06:45:11 +00:00
|
|
|
|
2001-09-08 00:43:51 +00:00
|
|
|
register_dissector("rtp", dissect_rtp, proto_rtp);
|
2006-06-27 12:40:53 +00:00
|
|
|
register_dissector("rtp.rfc2198", dissect_rtp_rfc2198, proto_rtp);
|
2005-03-27 21:37:05 +00:00
|
|
|
|
2003-03-06 20:35:12 +00:00
|
|
|
rtp_tap = register_tap("rtp");
|
2001-09-08 00:43:51 +00:00
|
|
|
|
2003-08-23 06:36:46 +00:00
|
|
|
rtp_pt_dissector_table = register_dissector_table("rtp.pt",
|
2012-07-23 15:52:17 +00:00
|
|
|
"RTP payload type", FT_UINT8, BASE_DEC);
|
2005-03-27 21:37:05 +00:00
|
|
|
rtp_dyn_pt_dissector_table = register_dissector_table("rtp_dyn_payload_type",
|
2012-07-23 15:52:17 +00:00
|
|
|
"Dynamic RTP payload type", FT_STRING, BASE_NONE);
|
2005-03-27 21:37:05 +00:00
|
|
|
|
2003-08-23 06:36:46 +00:00
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hdr_ext_dissector_table = register_dissector_table("rtp.hdr_ext",
|
2012-07-23 15:52:17 +00:00
|
|
|
"RTP header extension", FT_UINT32, BASE_HEX);
|
|
|
|
rtp_hdr_ext_rfc5285_dissector_table = register_dissector_table("rtp.ext.rfc5285.id",
|
|
|
|
"RTP Generic header extension (RFC 5285)", FT_UINT8, BASE_DEC);
|
2013-03-04 22:00:48 +00:00
|
|
|
|
|
|
|
register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137, proto_rtp);
|
|
|
|
register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a, proto_rtp);
|
|
|
|
|
2007-02-16 13:47:49 +00:00
|
|
|
rtp_module = prefs_register_protocol(proto_rtp, proto_reg_handoff_rtp);
|
2004-06-15 18:26:08 +00:00
|
|
|
|
|
|
|
prefs_register_bool_preference(rtp_module, "show_setup_info",
|
2012-07-23 15:52:17 +00:00
|
|
|
"Show stream setup information",
|
|
|
|
"Where available, show which protocol and frame caused "
|
|
|
|
"this RTP stream to be created",
|
|
|
|
&global_rtp_show_setup_info);
|
2004-06-15 18:26:08 +00:00
|
|
|
|
2004-07-01 06:59:38 +00:00
|
|
|
prefs_register_bool_preference(rtp_module, "heuristic_rtp",
|
2012-07-23 15:52:17 +00:00
|
|
|
"Try to decode RTP outside of conversations",
|
|
|
|
"If call control SIP/H323/RTSP/.. messages are missing in the trace, "
|
|
|
|
"RTP isn't decoded without this",
|
|
|
|
&global_rtp_heur);
|
2005-02-08 20:54:08 +00:00
|
|
|
|
2007-02-21 06:45:34 +00:00
|
|
|
prefs_register_bool_preference(rtp_module, "desegment_rtp_streams",
|
2012-07-23 15:52:17 +00:00
|
|
|
"Allow subdissector to reassemble RTP streams",
|
|
|
|
"Whether subdissector can request RTP streams to be reassembled",
|
|
|
|
&desegment_rtp);
|
2007-02-21 06:45:34 +00:00
|
|
|
|
2005-02-08 20:54:08 +00:00
|
|
|
prefs_register_enum_preference(rtp_module, "version0_type",
|
2012-07-23 15:52:17 +00:00
|
|
|
"Treat RTP version 0 packets as",
|
|
|
|
"If an RTP version 0 packet is encountered, it can be treated as "
|
|
|
|
"an invalid or ZRTP packet, a CLASSIC-STUN packet, or a T.38 packet",
|
|
|
|
&global_rtp_version0_type,
|
|
|
|
rtp_version0_types, FALSE);
|
2008-07-11 19:56:43 +00:00
|
|
|
prefs_register_uint_preference(rtp_module,
|
2012-07-23 15:52:17 +00:00
|
|
|
"rfc2198_payload_type", "Payload Type for RFC2198",
|
|
|
|
"Payload Type for RFC2198 Redundant Audio Data",
|
|
|
|
10,
|
|
|
|
&rtp_rfc2198_pt);
|
2008-07-11 19:48:30 +00:00
|
|
|
|
From Richard van der Hoff:
Along with this bug, identified by Mark, there is another problem, in that one of the chunks of my earlier patch seemed to get missed off when Anders committed it. This won't break anything yet, as the H.223-over-RTP dissection hasn't landed on trunk yet, but it will cause all sorts of nasties when it does.
Here is a new patch, against current trunk, which should fix Mark's bug, my bug, and a comment typo.
And a patch wich improves the general robustness of the h.223 dissector (making it less likely to crash on malformed data).
Hopefully this also fixes a bug raised by Fabio Sguanci a few weeks ago.
Fabio: I think a better way to fix the problem is to stop the dissector crashing when it finds a malformed PDU, so that it just treats the first pdu as malformed; there is then no need to special-case it.
svn path=/trunk/; revision=20898
2007-02-22 20:40:19 +00:00
|
|
|
register_init_routine(rtp_fragment_init);
|
2000-04-21 01:45:58 +00:00
|
|
|
}
|
Add tables of "conversation" dissectors, which are associated with
particular protocols, and which keep track of all dissectors that could
be associated with conversations using those particular protocols - for
example, the RTP and RTCP dissectors could be assigned to UDP
conversations.
This is for future use with UI features allowing the dissector for a
given conversation to be set from the UI, to allow
1) conversations between two ports, both of which have
dissectors associated with them, that have been given to the
wrong dissector to be given to the right dissector;
2) conversations between two ports, neither of which have
dissectors associated with them, to be given to a dissector
(RTP and RTCP, for example, typically run on random ports,
and if you don't have, in a capture, traffic that would say
"OK, traffic between these two hosts and ports will be RTP
traffic", you may have to tell Ethereal explicitly what
protocol the conversation is).
svn path=/trunk/; revision=2848
2001-01-09 05:53:21 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_rtp(void)
|
|
|
|
{
|
2006-06-27 12:40:53 +00:00
|
|
|
static gboolean rtp_prefs_initialized = FALSE;
|
2008-09-15 19:33:38 +00:00
|
|
|
static dissector_handle_t rtp_rfc2198_handle;
|
2013-03-04 22:00:48 +00:00
|
|
|
static dissector_handle_t rtp_hdr_ext_ed137_handle;
|
|
|
|
static dissector_handle_t rtp_hdr_ext_ed137a_handle;
|
2008-09-15 19:33:38 +00:00
|
|
|
static guint rtp_saved_rfc2198_pt;
|
2006-06-27 12:40:53 +00:00
|
|
|
|
2008-09-15 19:33:38 +00:00
|
|
|
if (!rtp_prefs_initialized) {
|
|
|
|
rtp_handle = find_dissector("rtp");
|
|
|
|
rtp_rfc2198_handle = find_dissector("rtp.rfc2198");
|
2006-06-27 12:40:53 +00:00
|
|
|
|
2008-09-15 19:33:38 +00:00
|
|
|
dissector_add_handle("udp.port", rtp_handle); /* for 'decode-as' */
|
|
|
|
dissector_add_string("rtp_dyn_payload_type", "red", rtp_rfc2198_handle);
|
2011-09-09 20:37:49 +00:00
|
|
|
heur_dissector_add( "udp", dissect_rtp_heur_udp, proto_rtp);
|
|
|
|
heur_dissector_add("stun", dissect_rtp_heur_stun, proto_rtp);
|
2004-07-01 06:59:38 +00:00
|
|
|
|
2013-03-04 22:00:48 +00:00
|
|
|
rtp_hdr_ext_ed137_handle = find_dissector("rtp.ext.ed137");
|
|
|
|
rtp_hdr_ext_ed137a_handle = find_dissector("rtp.ext.ed137a");
|
|
|
|
dissector_add_uint("rtp.hdr_ext", RTP_ED137_SIG, rtp_hdr_ext_ed137_handle);
|
|
|
|
dissector_add_uint("rtp.hdr_ext", RTP_ED137A_SIG, rtp_hdr_ext_ed137a_handle);
|
|
|
|
|
2008-09-15 19:33:38 +00:00
|
|
|
data_handle = find_dissector("data");
|
2013-04-10 11:46:31 +00:00
|
|
|
stun_handle = find_dissector("stun-udp");
|
2009-09-13 23:03:38 +00:00
|
|
|
classicstun_handle = find_dissector("classicstun");
|
|
|
|
classicstun_heur_handle = find_dissector("classicstun-heur");
|
2013-04-10 11:46:31 +00:00
|
|
|
stun_heur_handle = find_dissector("stun-heur");
|
2008-09-15 19:33:38 +00:00
|
|
|
t38_handle = find_dissector("t38");
|
2008-09-25 22:06:58 +00:00
|
|
|
zrtp_handle = find_dissector("zrtp");
|
2007-12-12 10:51:09 +00:00
|
|
|
|
2012-07-21 12:38:59 +00:00
|
|
|
sprt_handle = find_dissector("sprt");
|
|
|
|
v150fw_handle = find_dissector("v150fw");
|
|
|
|
|
|
|
|
dissector_add_string("rtp_dyn_payload_type", "v150fw", v150fw_handle);
|
|
|
|
|
2006-06-27 12:40:53 +00:00
|
|
|
rtp_prefs_initialized = TRUE;
|
2008-09-15 19:33:38 +00:00
|
|
|
} else {
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_delete_uint("rtp.pt", rtp_saved_rfc2198_pt, rtp_rfc2198_handle);
|
2006-06-27 12:40:53 +00:00
|
|
|
}
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("rtp.pt", rtp_rfc2198_pt, rtp_rfc2198_handle);
|
2006-06-27 12:40:53 +00:00
|
|
|
rtp_saved_rfc2198_pt = rtp_rfc2198_pt;
|
Add tables of "conversation" dissectors, which are associated with
particular protocols, and which keep track of all dissectors that could
be associated with conversations using those particular protocols - for
example, the RTP and RTCP dissectors could be assigned to UDP
conversations.
This is for future use with UI features allowing the dissector for a
given conversation to be set from the UI, to allow
1) conversations between two ports, both of which have
dissectors associated with them, that have been given to the
wrong dissector to be given to the right dissector;
2) conversations between two ports, neither of which have
dissectors associated with them, to be given to a dissector
(RTP and RTCP, for example, typically run on random ports,
and if you don't have, in a capture, traffic that would say
"OK, traffic between these two hosts and ports will be RTP
traffic", you may have to tell Ethereal explicitly what
protocol the conversation is).
svn path=/trunk/; revision=2848
2001-01-09 05:53:21 +00:00
|
|
|
}
|
2007-02-21 06:45:34 +00:00
|
|
|
|
|
|
|
/*
|
2013-03-04 22:00:48 +00:00
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
2007-02-21 06:45:34 +00:00
|
|
|
* c-basic-offset: 8
|
|
|
|
* tab-width: 8
|
2013-03-04 22:00:48 +00:00
|
|
|
* indent-tabs-mode: t
|
2007-02-21 06:45:34 +00:00
|
|
|
* End:
|
2013-03-04 22:00:48 +00:00
|
|
|
*
|
|
|
|
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
* :indentSize=8:tabSize=8:noTabs=false:
|
2007-02-21 06:45:34 +00:00
|
|
|
*/
|