| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
tap-iax2-analysis.h
Go to the documentation of this file.
1
19
20#ifndef __TAP_IAX2_ANALYSIS_H__
21#define __TAP_IAX2_ANALYSIS_H__
22
23#include <epan/address.h>
24#include <epan/packet_info.h>
25
30
31#ifdef __cplusplus
32 extern "C" {
33#endif /* __cplusplus */
34
35/****************************************************************************/
39 typedef struct _iax2_bw_history_item {
40 double time;
41 uint32_t bytes;
42} iax2_bw_history_item;
43
44
45#define BUFF_BW 300
46
47
51 typedef struct _tap_iax2_stat_t {
52 bool first_packet;
53 /* All fields below are valid only after iax2_packet_analyse() has been called. */
54 uint32_t flags;
55 uint16_t seq_num;
56 uint32_t timestamp;
57 uint32_t delta_timestamp;
58 double bandwidth;
59 iax2_bw_history_item bw_history[BUFF_BW];
60 uint16_t bw_start_index;
61 uint16_t bw_index;
62 uint32_t total_bytes;
63 double delta;
64 double jitter;
65 double diff;
66 double time;
67 double start_time;
68 double max_delta;
69 double max_jitter;
70 double mean_jitter;
71 uint32_t max_nr;
72 uint16_t start_seq_nr;
73 uint16_t stop_seq_nr;
74 uint32_t total_nr;
75 uint32_t sequence;
76 bool under;
77 int cycles;
78 uint16_t pt;
79 int reg_pt;
80} tap_iax2_stat_t;
81
82#define PT_UNDEFINED -1
83
84/* status flags for the flags parameter in tap_iax2_stat_t */
85#define STAT_FLAG_FIRST 0x001
86#define STAT_FLAG_MARKER 0x002
87#define STAT_FLAG_WRONG_SEQ 0x004
88#define STAT_FLAG_PT_CHANGE 0x008
89#define STAT_FLAG_PT_CN 0x010
90#define STAT_FLAG_FOLLOW_PT_CN 0x020
91#define STAT_FLAG_REG_PT_CHANGE 0x040
92#define STAT_FLAG_WRONG_TIMESTAMP 0x080
93
94/* function for analysing an IAX2 packet. Called from iax2_analysis. */
95
106 extern void iax2_packet_analyse(tap_iax2_stat_t *statinfo,
107 packet_info *pinfo,
108 const struct _iax2_info_t *iax2info);
109
110#ifdef __cplusplus
111}
112#endif /* __cplusplus */
113
114#endif /* __TAP_IAX2_ANALYSIS_H__ */
address.h
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
packet_info.h
_iax2_bw_history_item
Records a single bandwidth history sample for an IAX2 stream at a point in time.
Definition tap-iax2-analysis.h:39
_iax2_bw_history_item::time
double time
Definition tap-iax2-analysis.h:40
_iax2_bw_history_item::bytes
uint32_t bytes
Definition tap-iax2-analysis.h:41
_iax2_info_t
Definition packet-iax2.h:294
_tap_iax2_stat_t
Accumulates per-packet statistics for an IAX2 stream delivered via the tap interface.
Definition tap-iax2-analysis.h:51
_tap_iax2_stat_t::seq_num
uint16_t seq_num
Definition tap-iax2-analysis.h:55
_tap_iax2_stat_t::start_seq_nr
uint16_t start_seq_nr
Definition tap-iax2-analysis.h:72
_tap_iax2_stat_t::bandwidth
double bandwidth
Definition tap-iax2-analysis.h:58
_tap_iax2_stat_t::sequence
uint32_t sequence
Definition tap-iax2-analysis.h:75
_tap_iax2_stat_t::under
bool under
Definition tap-iax2-analysis.h:76
_tap_iax2_stat_t::delta
double delta
Definition tap-iax2-analysis.h:63
_tap_iax2_stat_t::jitter
double jitter
Definition tap-iax2-analysis.h:64
_tap_iax2_stat_t::max_nr
uint32_t max_nr
Definition tap-iax2-analysis.h:71
_tap_iax2_stat_t::flags
uint32_t flags
Definition tap-iax2-analysis.h:54
_tap_iax2_stat_t::stop_seq_nr
uint16_t stop_seq_nr
Definition tap-iax2-analysis.h:73
_tap_iax2_stat_t::reg_pt
int reg_pt
Definition tap-iax2-analysis.h:79
_tap_iax2_stat_t::delta_timestamp
uint32_t delta_timestamp
Definition tap-iax2-analysis.h:57
_tap_iax2_stat_t::max_delta
double max_delta
Definition tap-iax2-analysis.h:68
_tap_iax2_stat_t::start_time
double start_time
Definition tap-iax2-analysis.h:67
_tap_iax2_stat_t::bw_index
uint16_t bw_index
Definition tap-iax2-analysis.h:61
_tap_iax2_stat_t::time
double time
Definition tap-iax2-analysis.h:66
_tap_iax2_stat_t::bw_start_index
uint16_t bw_start_index
Definition tap-iax2-analysis.h:60
_tap_iax2_stat_t::first_packet
bool first_packet
Definition tap-iax2-analysis.h:52
_tap_iax2_stat_t::bw_history
iax2_bw_history_item bw_history[300]
Definition tap-iax2-analysis.h:59
_tap_iax2_stat_t::pt
uint16_t pt
Definition tap-iax2-analysis.h:78
_tap_iax2_stat_t::diff
double diff
Definition tap-iax2-analysis.h:65
_tap_iax2_stat_t::total_bytes
uint32_t total_bytes
Definition tap-iax2-analysis.h:62
_tap_iax2_stat_t::total_nr
uint32_t total_nr
Definition tap-iax2-analysis.h:74
_tap_iax2_stat_t::mean_jitter
double mean_jitter
Definition tap-iax2-analysis.h:70
_tap_iax2_stat_t::timestamp
uint32_t timestamp
Definition tap-iax2-analysis.h:56
_tap_iax2_stat_t::max_jitter
double max_jitter
Definition tap-iax2-analysis.h:69
_tap_iax2_stat_t::cycles
int cycles
Definition tap-iax2-analysis.h:77
BUFF_BW
#define BUFF_BW
Definition tap-iax2-analysis.h:45
iax2_packet_analyse
void iax2_packet_analyse(tap_iax2_stat_t *statinfo, packet_info *pinfo, const struct _iax2_info_t *iax2info)
Analyzes an IAX2 packet and updates statistics.
Definition tap-iax2-analysis.c:34
iax2_bw_history_item
struct _iax2_bw_history_item iax2_bw_history_item
Records a single bandwidth history sample for an IAX2 stream at a point in time.
tap_iax2_stat_t
struct _tap_iax2_stat_t tap_iax2_stat_t
Accumulates per-packet statistics for an IAX2 stream delivered via the tap interface.