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 * SPDX-License-Identifier: GPL-2.0-or-later
18 #ifndef __TAP_RTP_ANALYSIS_H__
19 #define __TAP_RTP_ANALYSIS_H__
21 #include <epan/address.h>
22 #include <epan/packet_info.h>
31 #endif /* __cplusplus */
33 /****************************************************************************/
34 /* structure that holds the information about the forward and reversed direction */
35 typedef struct _bw_history_item {
42 typedef struct _tap_rtp_stat_t {
43 gboolean first_packet; /**< do not use in code that is called after rtppacket_analyse */
44 /* use (flags & STAT_FLAG_FIRST) instead */
45 /* all of the following fields will be initialized after
46 * rtppacket_analyse has been called
48 address first_packet_mac_addr; /**< MAC address of first packet, used to determine duplicates due to mirroring */
49 guint32 flags; /* see STAT_FLAG-defines below */
52 guint32 first_timestamp;
53 guint32 delta_timestamp;
55 bw_history_item bw_history[BUFF_BW];
56 guint16 bw_start_index;
68 double time; /**< Unit is ms */
69 double start_time; /**< Unit is ms */
70 double lastnominaltime;
84 guint32 first_packet_num;
85 guint last_payload_len;
88 typedef struct _tap_rtp_save_data_t {
90 unsigned int payload_type;
92 } tap_rtp_save_data_t;
94 #define PT_UNDEFINED -1
96 /* status flags for the flags parameter in tap_rtp_stat_t */
97 #define STAT_FLAG_FIRST 0x001
98 #define STAT_FLAG_MARKER 0x002
99 #define STAT_FLAG_WRONG_SEQ 0x004
100 #define STAT_FLAG_PT_CHANGE 0x008
101 #define STAT_FLAG_PT_CN 0x010
102 #define STAT_FLAG_FOLLOW_PT_CN 0x020
103 #define STAT_FLAG_REG_PT_CHANGE 0x040
104 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
105 #define STAT_FLAG_PT_T_EVENT 0x100
106 #define STAT_FLAG_DUP_PKT 0x200
111 /* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */
112 extern void rtppacket_analyse(tap_rtp_stat_t *statinfo,
114 const struct _rtp_info *rtpinfo);
118 #endif /* __cplusplus */
120 #endif /* __TAP_RTP_ANALYSIS_H__ */
123 * Editor modelines - http://www.wireshark.org/tools/modelines.html
128 * indent-tabs-mode: nil
131 * vi: set shiftwidth=4 tabstop=8 expandtab:
132 * :indentSize=4:tabSize=8:noTabs=true: