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 address first_packet_mac_addr
; /**< MAC address of first packet, used to determine duplicates due to mirroring */
73 guint32 flags
; /* see STAT_FLAG-defines below */
76 guint32 first_timestamp
;
77 guint32 delta_timestamp
;
79 bw_history_item bw_history
[BUFF_BW
];
80 guint16 bw_start_index
;
92 double time
; /**< Unit is ms */
94 double lastnominaltime
;
100 guint16 start_seq_nr
;
110 #define PT_UNDEFINED -1
112 /* status flags for the flags parameter in tap_rtp_stat_t */
113 #define STAT_FLAG_FIRST 0x001
114 #define STAT_FLAG_MARKER 0x002
115 #define STAT_FLAG_WRONG_SEQ 0x004
116 #define STAT_FLAG_PT_CHANGE 0x008
117 #define STAT_FLAG_PT_CN 0x010
118 #define STAT_FLAG_FOLLOW_PT_CN 0x020
119 #define STAT_FLAG_REG_PT_CHANGE 0x040
120 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
121 #define STAT_FLAG_PT_T_EVENT 0x100
122 #define STAT_FLAG_DUP_PKT 0x200
127 /* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */
128 extern int rtp_packet_analyse(tap_rtp_stat_t
*statinfo
,
130 const struct _rtp_info
*rtpinfo
);
133 #endif /* __RTP_ANALYSIS_H__ */