3 * RTP analysis addition for Wireshark
5 * Copyright 2003, Alcatel Business Systems
6 * By Lars Ruoff <lars.ruoff@gmx.net>
9 * Copyright 2003, Iskratel, Ltd, Kranj
10 * By Miha Jemec <m.jemec@iskratel.si>
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * SPDX-License-Identifier: GPL-2.0-or-later
19 #ifndef __TAP_RTP_ANALYSIS_H__
20 #define __TAP_RTP_ANALYSIS_H__
22 #include <epan/address.h>
23 #include <epan/packet_info.h>
32 #endif /* __cplusplus */
34 /****************************************************************************/
35 /* structure that holds the information about the forward and reversed direction */
36 typedef struct _bw_history_item
{
43 typedef struct _tap_rtp_stat_t
{
44 bool first_packet
; /**< do not use in code that is called after rtppacket_analyse */
45 /* use (flags & STAT_FLAG_FIRST) instead */
46 /* all of the following fields will be initialized after
47 * rtppacket_analyse has been called
49 uint32_t flags
; /* see STAT_FLAG-defines below */
51 uint64_t timestamp
; /* The generated "extended" timestamp */
52 uint64_t seq_timestamp
; /* The last in-sequence extended timestamp */
54 bw_history_item bw_history
[BUFF_BW
];
55 uint16_t bw_start_index
;
67 double time
; /**< Unit is ms */
68 double start_time
; /**< Unit is ms */
69 double lastnominaltime
;
70 double lastarrivaltime
;
78 uint32_t max_nr
; /**< The frame number of the last packet by timestamp */
79 uint32_t start_seq_nr
; /**< (extended) base_seq per RFC 3550 A.1 */
80 uint32_t stop_seq_nr
; /**< (extended) max_seq per RFC 3550 A.1 */
81 uint32_t total_nr
; /**< total number of received packets */
82 uint32_t sequence
; /**< total number of sequence errors */
85 uint32_t first_packet_num
;
86 unsigned last_payload_len
;
89 typedef struct _tap_rtp_save_data_t
{
91 unsigned int payload_type
;
93 } tap_rtp_save_data_t
;
95 #define PT_UNDEFINED -1
97 /* status flags for the flags parameter in tap_rtp_stat_t */
98 #define STAT_FLAG_FIRST 0x001
99 #define STAT_FLAG_MARKER 0x002
100 #define STAT_FLAG_WRONG_SEQ 0x004
101 #define STAT_FLAG_PT_CHANGE 0x008
102 #define STAT_FLAG_PT_CN 0x010
103 #define STAT_FLAG_FOLLOW_PT_CN 0x020
104 #define STAT_FLAG_REG_PT_CHANGE 0x040
105 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
106 #define STAT_FLAG_PT_T_EVENT 0x100
107 #define STAT_FLAG_DUP_PKT 0x200
112 /* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */
113 extern void rtppacket_analyse(tap_rtp_stat_t
*statinfo
,
114 const packet_info
*pinfo
,
115 const struct _rtp_info
*rtpinfo
);
119 #endif /* __cplusplus */
121 #endif /* __TAP_RTP_ANALYSIS_H__ */