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>
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>
33 #endif /* __cplusplus */
35 /****************************************************************************/
36 /* structure that holds the information about the forward and reversed direction */
37 typedef struct _iax2_bw_history_item
{
40 } iax2_bw_history_item
;
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 */
52 uint32_t delta_timestamp
;
54 iax2_bw_history_item bw_history
[BUFF_BW
];
55 uint16_t bw_start_index
;
67 uint16_t start_seq_nr
;
71 bool under
; /* Unused? */
72 int cycles
; /* Unused? */
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
,
92 const struct _iax2_info_t
*iax2info
);
96 #endif /* __cplusplus */
98 #endif /* __TAP_IAX2_ANALYSIS_H__ */