LATER... ei_kerberos_kdc_session_key ...
[wireshark-sm.git] / ui / tap-rtp-analysis.h
blob057eedac47377f9260b22146f45ff4f7b211d49b
1 /** @file
3 * RTP analysis addition for Wireshark
5 * Copyright 2003, Alcatel Business Systems
6 * By Lars Ruoff <lars.ruoff@gmx.net>
8 * based on tap_rtp.c
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>
25 /** @file
26 * ???
27 * @todo what's this?
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
34 /****************************************************************************/
35 /* structure that holds the information about the forward and reversed direction */
36 typedef struct _bw_history_item {
37 double time;
38 uint32_t bytes;
39 } bw_history_item;
41 #define BUFF_BW 300
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 */
50 uint16_t seq_num;
51 uint64_t timestamp; /* The generated "extended" timestamp */
52 uint64_t seq_timestamp; /* The last in-sequence extended timestamp */
53 double bandwidth;
54 bw_history_item bw_history[BUFF_BW];
55 uint16_t bw_start_index;
56 uint16_t bw_index;
57 uint32_t total_bytes;
58 uint32_t clock_rate;
59 double delta;
60 double jitter;
61 double diff;
62 double skew;
63 double sumt;
64 double sumTS;
65 double sumt2;
66 double sumtTS;
67 double time; /**< Unit is ms */
68 double start_time; /**< Unit is ms */
69 double lastnominaltime;
70 double lastarrivaltime;
71 double min_delta;
72 double max_delta;
73 double mean_delta;
74 double min_jitter;
75 double max_jitter;
76 double max_skew;
77 double mean_jitter;
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 */
83 uint16_t pt;
84 int reg_pt;
85 uint32_t first_packet_num;
86 unsigned last_payload_len;
87 } tap_rtp_stat_t;
89 typedef struct _tap_rtp_save_data_t {
90 uint32_t timestamp;
91 unsigned int payload_type;
92 size_t payload_len;
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
109 /* forward */
110 struct _rtp_info;
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);
117 #ifdef __cplusplus
119 #endif /* __cplusplus */
121 #endif /* __TAP_RTP_ANALYSIS_H__ */