2 * RTP analysis addition for Wireshark
6 * Copyright 2003, Alcatel Business Systems
7 * By Lars Ruoff <lars.ruoff@gmx.net>
10 * Copyright 2003, Iskratel, Ltd, Kranj
11 * By Miha Jemec <m.jemec@iskratel.si>
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 #ifndef __RTP_ANALYSIS_H__
33 #define __RTP_ANALYSIS_H__
36 #include <epan/address.h>
37 #include <epan/packet_info.h>
57 /****************************************************************************/
58 /* structure that holds the information about the forward and reversed direction */
59 typedef struct _bw_history_item {
66 typedef struct _tap_rtp_stat_t {
67 gboolean first_packet; /* do not use in code that is called after rtp_packet_analyse */
68 /* use (flags & STAT_FLAG_FIRST) instead */
69 /* all of the following fields will be initialized after
70 * rtp_packet_analyse has been called
72 guint32 flags; /* see STAT_FLAG-defines below */
75 guint32 first_timestamp;
76 guint32 delta_timestamp;
78 bw_history_item bw_history[BUFF_BW];
79 guint16 bw_start_index;
91 double time; /* Unit is ms */
93 double lastnominaltime;
109 #define PT_UNDEFINED -1
111 /* status flags for the flags parameter in tap_rtp_stat_t */
112 #define STAT_FLAG_FIRST 0x001
113 #define STAT_FLAG_MARKER 0x002
114 #define STAT_FLAG_WRONG_SEQ 0x004
115 #define STAT_FLAG_PT_CHANGE 0x008
116 #define STAT_FLAG_PT_CN 0x010
117 #define STAT_FLAG_FOLLOW_PT_CN 0x020
118 #define STAT_FLAG_REG_PT_CHANGE 0x040
119 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
120 #define STAT_FLAG_PT_T_EVENT 0x100
125 /* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */
126 extern int rtp_packet_analyse(tap_rtp_stat_t *statinfo,
128 const struct _rtp_info *rtpinfo);
131 #endif /* __RTP_ANALYSIS_H__ */