| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
mcast_stream.h
Go to the documentation of this file.
1
17
18#ifndef __MCAST_STREAM_H__
19#define __MCAST_STREAM_H__
20
21#include <epan/tap.h>
22
23#ifdef __cplusplus
24 extern "C" {
25#endif /* __cplusplus */
26
27#define MAX_SPEED 200000
28
29/* typedefs for sliding window and buffer size */
30
34 typedef struct buffer {
35 nstime_t *buff;
36 int32_t first;
37 int32_t last;
38 int32_t burstsize;
39 int32_t topburstsize;
40 int32_t count;
41 int32_t burststatus;
42 int32_t numbursts;
43 int32_t buffusage;
44 int32_t buffstatus;
45 int32_t numbuffalarms;
46 int32_t topbuffusage;
47 double maxbw;
48} t_buffer;
49
50
51/* defines an mcast stream */
52/* XXX - Not all of these seem to be used? */
53
57 typedef struct _mcast_stream_info {
58 address src_addr;
59 uint16_t src_port;
60 address dest_addr;
61 uint16_t dest_port;
62 uint32_t npackets;
63 double apackets;
64 uint64_t total_bytes;
65 double average_bw;
66
67 uint32_t first_frame_num;
68 nstime_t start_abs;
69 nstime_t start_rel;
70 nstime_t stop_rel;
71
72 t_buffer element;
73} mcast_stream_info_t;
74
78 typedef struct _mcaststream_tapinfo mcaststream_tapinfo_t;
79
84 typedef void (*mcaststream_tap_reset_cb)(mcaststream_tapinfo_t *tapinfo);
85
90 typedef void (*mcaststream_tap_draw_cb)(mcaststream_tapinfo_t *tapinfo);
91
95 struct _mcaststream_tapinfo {
96 void *user_data;
97 mcaststream_tap_reset_cb tap_reset;
98 mcaststream_tap_draw_cb tap_draw;
99 GList *strinfo_list;
100 uint32_t npackets;
101 mcast_stream_info_t *allstreams;
102 bool is_registered;
103};
104
106 extern int32_t mcast_stream_trigger;
107
109 extern int32_t mcast_stream_bufferalarm;
110
112 extern uint16_t mcast_stream_burstint;
113
115 extern int32_t mcast_stream_emptyspeed;
116
118 extern int32_t mcast_stream_cumulemptyspeed;
119
120/****************************************************************************/
121/* INTERFACE */
122
135GString *register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo);
136
137
144 void remove_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo);
145
151 void mcaststream_reset(mcaststream_tapinfo_t *tapinfo);
152
169 tap_packet_status mcaststream_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data, tap_flags_t flags);
170
171#ifdef __cplusplus
172}
173#endif /* __cplusplus */
174
175#endif /* __MCAST_STREAM_H__ */
address
struct _address address
Holds a network or link-layer address of any supported type.
epan_dissect_t
struct epan_dissect epan_dissect_t
Opaque type representing a single packet dissection context.
Definition epan.h:62
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
mcaststream_tapinfo_t
struct _mcaststream_tapinfo mcaststream_tapinfo_t
Forward declaration of the multicast stream tap info aggregate structure.
Definition mcast_stream.h:78
t_buffer
struct buffer t_buffer
Sliding window buffer tracking per-stream burst and bandwidth statistics.
mcaststream_tap_draw_cb
void(* mcaststream_tap_draw_cb)(mcaststream_tapinfo_t *tapinfo)
Callback invoked to redraw or refresh the multicast stream UI.
Definition mcast_stream.h:90
mcaststream_reset
void mcaststream_reset(mcaststream_tapinfo_t *tapinfo)
Free all accumulated mcast stream tap data.
Definition mcast_stream.c:76
mcaststream_packet
tap_packet_status mcaststream_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data, tap_flags_t flags)
Tap packet callback for the mcast_streams tap.
remove_tap_listener_mcast_stream
void remove_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
Remove the mcast_streams tap listener.
Definition mcast_stream.c:283
mcaststream_tap_reset_cb
void(* mcaststream_tap_reset_cb)(mcaststream_tapinfo_t *tapinfo)
Callback invoked to reset all multicast stream tap state.
Definition mcast_stream.h:84
register_tap_listener_mcast_stream
GString * register_tap_listener_mcast_stream(mcaststream_tapinfo_t *tapinfo)
Registers the mcast_streams tap listener (if not already done).
Definition mcast_stream.c:294
mcast_stream_info_t
struct _mcast_stream_info mcast_stream_info_t
Holds statistics and metadata for a single detected multicast stream.
_mcast_stream_info
Holds statistics and metadata for a single detected multicast stream.
Definition mcast_stream.h:57
_mcast_stream_info::apackets
double apackets
Definition mcast_stream.h:63
_mcast_stream_info::average_bw
double average_bw
Definition mcast_stream.h:65
_mcast_stream_info::src_port
uint16_t src_port
Definition mcast_stream.h:59
_mcast_stream_info::dest_addr
address dest_addr
Definition mcast_stream.h:60
_mcast_stream_info::element
t_buffer element
Definition mcast_stream.h:72
_mcast_stream_info::start_abs
nstime_t start_abs
Definition mcast_stream.h:68
_mcast_stream_info::dest_port
uint16_t dest_port
Definition mcast_stream.h:61
_mcast_stream_info::total_bytes
uint64_t total_bytes
Definition mcast_stream.h:64
_mcast_stream_info::npackets
uint32_t npackets
Definition mcast_stream.h:62
_mcast_stream_info::src_addr
address src_addr
Definition mcast_stream.h:58
_mcast_stream_info::first_frame_num
uint32_t first_frame_num
Definition mcast_stream.h:67
_mcast_stream_info::stop_rel
nstime_t stop_rel
Definition mcast_stream.h:70
_mcast_stream_info::start_rel
nstime_t start_rel
Definition mcast_stream.h:69
_mcaststream_tapinfo
Aggregate tap structure holding information about all detected multicast streams.
Definition mcast_stream.h:95
_mcaststream_tapinfo::strinfo_list
GList * strinfo_list
Definition mcast_stream.h:99
_mcaststream_tapinfo::npackets
uint32_t npackets
Definition mcast_stream.h:100
_mcaststream_tapinfo::tap_draw
mcaststream_tap_draw_cb tap_draw
Definition mcast_stream.h:98
_mcaststream_tapinfo::tap_reset
mcaststream_tap_reset_cb tap_reset
Definition mcast_stream.h:97
_mcaststream_tapinfo::user_data
void * user_data
Definition mcast_stream.h:96
_mcaststream_tapinfo::allstreams
mcast_stream_info_t * allstreams
Definition mcast_stream.h:101
_mcaststream_tapinfo::is_registered
bool is_registered
Definition mcast_stream.h:102
buffer
Sliding window buffer tracking per-stream burst and bandwidth statistics.
Definition mcast_stream.h:34
buffer::burstsize
int32_t burstsize
Definition mcast_stream.h:38
buffer::numbuffalarms
int32_t numbuffalarms
Definition mcast_stream.h:45
buffer::buffstatus
int32_t buffstatus
Definition mcast_stream.h:44
buffer::buffusage
int32_t buffusage
Definition mcast_stream.h:43
buffer::burststatus
int32_t burststatus
Definition mcast_stream.h:41
buffer::topbuffusage
int32_t topbuffusage
Definition mcast_stream.h:46
buffer::numbursts
int32_t numbursts
Definition mcast_stream.h:42
buffer::first
int32_t first
Definition mcast_stream.h:36
buffer::count
int32_t count
Definition mcast_stream.h:40
buffer::last
int32_t last
Definition mcast_stream.h:37
buffer::buff
nstime_t * buff
Definition mcast_stream.h:35
buffer::maxbw
double maxbw
Definition mcast_stream.h:47
buffer::topburstsize
int32_t topburstsize
Definition mcast_stream.h:39
nstime_t
Definition nstime.h:26
tap.h
tap_packet_status
tap_packet_status
Definition tap.h:22