update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / tap-iax2-analysis.h
blob834a84ec9f2e02f63603ae78b878252c83478d7f
1 /** @file
3 * IAX2 analysis addition for Wireshark
5 * based on rtp_analysis.c
6 * Copyright 2003, Alcatel Business Systems
7 * By Lars Ruoff <lars.ruoff@gmx.net>
9 * based on tap_rtp.c
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 * SPDX-License-Identifier: GPL-2.0-or-later
20 #ifndef __TAP_IAX2_ANALYSIS_H__
21 #define __TAP_IAX2_ANALYSIS_H__
23 #include <epan/address.h>
24 #include <epan/packet_info.h>
26 /** @file
27 * ???
28 * @todo what's this?
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
35 /****************************************************************************/
36 /* structure that holds the information about the forward and reversed direction */
37 typedef struct _iax2_bw_history_item {
38 double time;
39 uint32_t bytes;
40 } iax2_bw_history_item;
42 #define BUFF_BW 300
44 typedef struct _tap_iax2_stat_t {
45 bool first_packet; /* do not use in code that is called after iax2_packet_analyse */
46 /* use (flags & STAT_FLAG_FIRST) instead */
47 /* all of the following fields will be initialized after
48 iax2_packet_analyse has been called */
49 uint32_t flags; /* see STAT_FLAG-defines below */
50 uint16_t seq_num;
51 uint32_t timestamp;
52 uint32_t delta_timestamp;
53 double bandwidth;
54 iax2_bw_history_item bw_history[BUFF_BW];
55 uint16_t bw_start_index;
56 uint16_t bw_index;
57 uint32_t total_bytes;
58 double delta;
59 double jitter;
60 double diff;
61 double time;
62 double start_time;
63 double max_delta;
64 double max_jitter;
65 double mean_jitter;
66 uint32_t max_nr;
67 uint16_t start_seq_nr;
68 uint16_t stop_seq_nr;
69 uint32_t total_nr;
70 uint32_t sequence;
71 bool under; /* Unused? */
72 int cycles; /* Unused? */
73 uint16_t pt;
74 int reg_pt;
75 } tap_iax2_stat_t;
77 #define PT_UNDEFINED -1
79 /* status flags for the flags parameter in tap_iax2_stat_t */
80 #define STAT_FLAG_FIRST 0x001
81 #define STAT_FLAG_MARKER 0x002
82 #define STAT_FLAG_WRONG_SEQ 0x004
83 #define STAT_FLAG_PT_CHANGE 0x008
84 #define STAT_FLAG_PT_CN 0x010
85 #define STAT_FLAG_FOLLOW_PT_CN 0x020
86 #define STAT_FLAG_REG_PT_CHANGE 0x040
87 #define STAT_FLAG_WRONG_TIMESTAMP 0x080
89 /* function for analysing an IAX2 packet. Called from iax2_analysis. */
90 extern void iax2_packet_analyse(tap_iax2_stat_t *statinfo,
91 packet_info *pinfo,
92 const struct _iax2_info_t *iax2info);
94 #ifdef __cplusplus
96 #endif /* __cplusplus */
98 #endif /* __TAP_IAX2_ANALYSIS_H__ */