2 * RTP analysis addition for Wireshark
4 * Copyright 2003, Alcatel Business Systems
5 * By Lars Ruoff <lars.ruoff@gmx.net>
8 * Copyright 2003, Iskratel, Ltd, Kranj
9 * By Miha Jemec <m.jemec@iskratel.si>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #ifndef __RTP_ANALYSIS_H__
31 #define __RTP_ANALYSIS_H__
34 #include <epan/address.h>
35 #include <epan/packet_info.h>
55 /****************************************************************************/
56 /* structure that holds the information about the forward and reversed direction */
57 typedef struct _bw_history_item {
64 typedef struct _tap_rtp_stat_t {
65 gboolean first_packet; /**< do not use in code that is called after rtp_packet_analyse */
66 /* use (flags & STAT_FLAG_FIRST) instead */
67 /* all of the following fields will be initialized after
68 * rtp_packet_analyse has been called
70 address first_packet_mac_addr; /**< MAC address of first packet, used to determine duplicates due to mirroring */
71 guint32 flags; /* see STAT_FLAG-defines below */
74 guint32 first_timestamp;
75 guint32 delta_timestamp;
77 bw_history_item bw_history[BUFF_BW];
78 guint16 bw_start_index;
90 double time; /**< Unit is ms */
92 double lastnominaltime;
108 #define PT_UNDEFINED -1
110 /* status flags for the flags parameter in tap_rtp_stat_t */
111 #define STAT_FLAG_FIRST 0x001
112 #define STAT_FLAG_MARKER 0x002
113 #define STAT_FLAG_WRONG_SEQ 0x004
114 #define STAT_FLAG_PT_CHANGE 0x008
115 #define STAT_FLAG_PT_CN 0x010
116 #define STAT_FLAG_FOLLOW_PT_CN 0x020
117 #define STAT_FLAG_REG_PT_CHANGE 0x040
118 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
119 #define STAT_FLAG_PT_T_EVENT 0x100
120 #define STAT_FLAG_DUP_PKT 0x200
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);
130 #endif /* __RTP_ANALYSIS_H__ */
133 * Editor modelines - http://www.wireshark.org/tools/modelines.html
138 * indent-tabs-mode: nil
141 * vi: set shiftwidth=4 tabstop=8 expandtab:
142 * :indentSize=4:tabSize=8:noTabs=true: