| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
srt_table.h
Go to the documentation of this file.
1
11#ifndef __SRT_TABLE_H__
12#define __SRT_TABLE_H__
13
14#include "tap.h"
15#include "timestats.h"
16#include <epan/wmem_scopes.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
23 typedef struct _srt_procedure_t {
24 int proc_index;
25 timestat_t stats;
26 char *procedure;
27} srt_procedure_t;
28
30 typedef struct _srt_stat_table {
31 const char *name;
32 const char *short_name;
33 char *filter_string;
35 int num_procs;
36 const char *proc_column_name;
37 srt_procedure_t *procedures;
38 void* table_specific_data;
39} srt_stat_table;
40
41struct register_srt;
42struct _srt_data_t;
43typedef void (*srt_proc_table_cb)(srt_stat_table* rst, int indx, struct _srt_data_t* gui_data);
44typedef void (*srt_init_cb)(struct register_srt* srt, GArray* srt_array);
45typedef unsigned (*srt_param_handler_cb)(struct register_srt* srt, const char* opt_arg, char** err);
46
49 typedef struct _srt_data_t {
50 GArray *srt_array;
51 void *user_data;
52} srt_data_t;
53
55 typedef struct register_srt register_srt_t;
56
59extern void srt_table_init(void);
60
70WS_DLL_PUBLIC void register_srt_table(const int proto_id, const char* tap_listener, int max_tables,
71 tap_packet_cb srt_packet_func, srt_init_cb init_cb, srt_param_handler_cb param_cb);
72
78WS_DLL_PUBLIC int get_srt_proto_id(register_srt_t* srt);
79
85WS_DLL_PUBLIC const char* get_srt_tap_listener_name(register_srt_t* srt);
86
92WS_DLL_PUBLIC int get_srt_max_tables(register_srt_t* srt);
93
99WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func(register_srt_t* srt);
100
107WS_DLL_PUBLIC void set_srt_table_param_data(register_srt_t* srt, void* data);
108
114WS_DLL_PUBLIC void* get_srt_table_param_data(register_srt_t* srt);
115
121WS_DLL_PUBLIC register_srt_t* get_srt_table_by_name(const char* name);
122
127WS_DLL_PUBLIC void free_srt_table_data(srt_stat_table *rst);
128
134WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray* srt_array);
135
140WS_DLL_PUBLIC void reset_srt_table(GArray* srt_array);
141
148WS_DLL_PUBLIC void srt_table_iterate_tables(wmem_foreach_func func, void *user_data);
149
157WS_DLL_PUBLIC void srt_table_get_filter(register_srt_t* srt, const char *opt_arg, const char **filter, char** err);
158
164WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array);
165
172WS_DLL_PUBLIC char* srt_table_get_tap_string(register_srt_t* srt);
173
179WS_DLL_PUBLIC srt_param_handler_cb srt_table_get_param_handler_cb(register_srt_t* srt);
180
192WS_DLL_PUBLIC srt_stat_table* init_srt_table(const char *name, const char *short_name, GArray *srt_array, int num_procs, const char* proc_column_name,
193 const char *filter_string, void* table_specific_data);
194
201WS_DLL_PUBLIC void init_srt_table_row(srt_stat_table *rst, int proc_index, const char *procedure);
202
210WS_DLL_PUBLIC void add_srt_table_data(srt_stat_table *rst, int proc_index, const nstime_t *req_time, packet_info *pinfo);
211
212#ifdef __cplusplus
213}
214#endif /* __cplusplus */
215
216#endif /* __SRT_TABLE_H__ */
217
218/*
219 * Editor modelines
220 *
221 * Local Variables:
222 * c-basic-offset: 4
223 * tab-width: 8
224 * indent-tabs-mode: nil
225 * End:
226 *
227 * ex: set shiftwidth=4 tabstop=8 expandtab:
228 * :indentSize=4:tabSize=8:noTabs=true:
229 */
wmem_foreach_func
bool(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Function type for processing one node of a tree during a traversal.
Definition wmem_tree.h:389
srt_table_get_filter
WS_DLL_PUBLIC void srt_table_get_filter(register_srt_t *srt, const char *opt_arg, const char **filter, char **err)
Definition srt_table.c:141
register_srt_table
WS_DLL_PUBLIC void register_srt_table(const int proto_id, const char *tap_listener, int max_tables, tap_packet_cb srt_packet_func, srt_init_cb init_cb, srt_param_handler_cb param_cb)
Definition srt_table.c:181
srt_table_get_param_handler_cb
WS_DLL_PUBLIC srt_param_handler_cb srt_table_get_param_handler_cb(register_srt_t *srt)
Definition srt_table.c:136
get_srt_table_param_data
WS_DLL_PUBLIC void * get_srt_table_param_data(register_srt_t *srt)
Definition srt_table.c:58
reset_srt_table
WS_DLL_PUBLIC void reset_srt_table(GArray *srt_array)
Definition srt_table.c:109
srt_table_get_tap_string
WS_DLL_PUBLIC char * srt_table_get_tap_string(register_srt_t *srt)
Definition srt_table.c:129
get_srt_tap_listener_name
WS_DLL_PUBLIC const char * get_srt_tap_listener_name(register_srt_t *srt)
Definition srt_table.c:38
get_srt_table_by_name
WS_DLL_PUBLIC register_srt_t * get_srt_table_by_name(const char *name)
Definition srt_table.c:124
init_srt_table
WS_DLL_PUBLIC srt_stat_table * init_srt_table(const char *name, const char *short_name, GArray *srt_array, int num_procs, const char *proc_column_name, const char *filter_string, void *table_specific_data)
Definition srt_table.c:209
srt_table_dissector_init
WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t *srt, GArray *srt_array)
Definition srt_table.c:170
free_srt_table
WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray *srt_array)
Definition srt_table.c:79
srt_table_iterate_tables
WS_DLL_PUBLIC void srt_table_iterate_tables(wmem_foreach_func func, void *user_data)
Definition srt_table.c:203
set_srt_table_param_data
WS_DLL_PUBLIC void set_srt_table_param_data(register_srt_t *srt, void *data)
Definition srt_table.c:53
free_srt_table_data
WS_DLL_PUBLIC void free_srt_table_data(srt_stat_table *rst)
Definition srt_table.c:64
get_srt_packet_func
WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func(register_srt_t *srt)
Definition srt_table.c:48
srt_table_init
void srt_table_init(void)
Definition srt_table.c:175
get_srt_max_tables
WS_DLL_PUBLIC int get_srt_max_tables(register_srt_t *srt)
Definition srt_table.c:43
srt_data_t
struct _srt_data_t srt_data_t
srt_stat_table
struct _srt_stat_table srt_stat_table
init_srt_table_row
WS_DLL_PUBLIC void init_srt_table_row(srt_stat_table *rst, int proc_index, const char *procedure)
Definition srt_table.c:236
add_srt_table_data
WS_DLL_PUBLIC void add_srt_table_data(srt_stat_table *rst, int proc_index, const nstime_t *req_time, packet_info *pinfo)
Definition srt_table.c:256
srt_procedure_t
struct _srt_procedure_t srt_procedure_t
get_srt_proto_id
WS_DLL_PUBLIC int get_srt_proto_id(register_srt_t *srt)
Definition srt_table.c:30
_packet_info
Definition packet_info.h:43
_srt_data_t
Definition srt_table.h:49
_srt_data_t::srt_array
GArray * srt_array
Definition srt_table.h:50
_srt_data_t::user_data
void * user_data
Definition srt_table.h:51
_srt_procedure_t
Definition srt_table.h:23
_srt_procedure_t::procedure
char * procedure
Definition srt_table.h:26
_srt_procedure_t::stats
timestat_t stats
Definition srt_table.h:25
_srt_stat_table
Definition srt_table.h:30
_srt_stat_table::proc_column_name
const char * proc_column_name
Definition srt_table.h:36
_srt_stat_table::short_name
const char * short_name
Definition srt_table.h:32
_srt_stat_table::filter_string
char * filter_string
Definition srt_table.h:33
_srt_stat_table::name
const char * name
Definition srt_table.h:31
_srt_stat_table::procedures
srt_procedure_t * procedures
Definition srt_table.h:37
_srt_stat_table::num_procs
int num_procs
Definition srt_table.h:35
_timestat_t
Definition timestats.h:23
nstime_t
Definition nstime.h:26
register_srt
Definition srt_table.c:20
tap.h
timestats.h
wmem_scopes.h