Wireshark 4.5.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
23typedef struct _srt_procedure_t {
24 int proc_index;
26 char *procedure;
28
30typedef struct _srt_stat_table {
31 const char *name;
32 const char *short_name;
36 const char *proc_column_name;
38 void* table_specific_data;
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
49typedef struct _srt_data_t {
50 GArray *srt_array;
51 void *user_data;
53
56
66WS_DLL_PUBLIC void register_srt_table(const int proto_id, const char* tap_listener, int max_tables,
67 tap_packet_cb srt_packet_func, srt_init_cb init_cb, srt_param_handler_cb param_cb);
68
74WS_DLL_PUBLIC int get_srt_proto_id(register_srt_t* srt);
75
81WS_DLL_PUBLIC const char* get_srt_tap_listener_name(register_srt_t* srt);
82
88WS_DLL_PUBLIC int get_srt_max_tables(register_srt_t* srt);
89
95WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func(register_srt_t* srt);
96
103WS_DLL_PUBLIC void set_srt_table_param_data(register_srt_t* srt, void* data);
104
110WS_DLL_PUBLIC void* get_srt_table_param_data(register_srt_t* srt);
111
117WS_DLL_PUBLIC register_srt_t* get_srt_table_by_name(const char* name);
118
123WS_DLL_PUBLIC void free_srt_table_data(srt_stat_table *rst);
124
130WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray* srt_array);
131
136WS_DLL_PUBLIC void reset_srt_table(GArray* srt_array);
137
144WS_DLL_PUBLIC void srt_table_iterate_tables(wmem_foreach_func func, void *user_data);
145
153WS_DLL_PUBLIC void srt_table_get_filter(register_srt_t* srt, const char *opt_arg, const char **filter, char** err);
154
160WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array);
161
168WS_DLL_PUBLIC char* srt_table_get_tap_string(register_srt_t* srt);
169
181WS_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,
182 const char *filter_string, void* table_specific_data);
183
190WS_DLL_PUBLIC void init_srt_table_row(srt_stat_table *rst, int proc_index, const char *procedure);
191
199WS_DLL_PUBLIC void add_srt_table_data(srt_stat_table *rst, int proc_index, const nstime_t *req_time, packet_info *pinfo);
200
201#ifdef __cplusplus
202}
203#endif /* __cplusplus */
204
205#endif /* __SRT_TABLE_H__ */
206
207/*
208 * Editor modelines
209 *
210 * Local Variables:
211 * c-basic-offset: 4
212 * tab-width: 8
213 * indent-tabs-mode: nil
214 * End:
215 *
216 * ex: set shiftwidth=4 tabstop=8 expandtab:
217 * :indentSize=4:tabSize=8:noTabs=true:
218 */
bool(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Definition wmem_tree.h:247
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:136
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:171
WS_DLL_PUBLIC void * get_srt_table_param_data(register_srt_t *srt)
Definition srt_table.c:58
WS_DLL_PUBLIC void reset_srt_table(GArray *srt_array)
Definition srt_table.c:109
WS_DLL_PUBLIC char * srt_table_get_tap_string(register_srt_t *srt)
Definition srt_table.c:129
WS_DLL_PUBLIC const char * get_srt_tap_listener_name(register_srt_t *srt)
Definition srt_table.c:38
WS_DLL_PUBLIC register_srt_t * get_srt_table_by_name(const char *name)
Definition srt_table.c:124
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:202
WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t *srt, GArray *srt_array)
Definition srt_table.c:165
WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray *srt_array)
Definition srt_table.c:79
WS_DLL_PUBLIC void srt_table_iterate_tables(wmem_foreach_func func, void *user_data)
Definition srt_table.c:196
WS_DLL_PUBLIC void set_srt_table_param_data(register_srt_t *srt, void *data)
Definition srt_table.c:53
WS_DLL_PUBLIC void free_srt_table_data(srt_stat_table *rst)
Definition srt_table.c:64
WS_DLL_PUBLIC tap_packet_cb get_srt_packet_func(register_srt_t *srt)
Definition srt_table.c:48
WS_DLL_PUBLIC int get_srt_max_tables(register_srt_t *srt)
Definition srt_table.c:43
struct _srt_data_t srt_data_t
struct _srt_stat_table srt_stat_table
WS_DLL_PUBLIC void init_srt_table_row(srt_stat_table *rst, int proc_index, const char *procedure)
Definition srt_table.c:229
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:249
struct _srt_procedure_t srt_procedure_t
WS_DLL_PUBLIC int get_srt_proto_id(register_srt_t *srt)
Definition srt_table.c:30
Definition packet_info.h:43
Definition srt_table.h:49
GArray * srt_array
Definition srt_table.h:50
void * user_data
Definition srt_table.h:51
Definition srt_table.h:23
char * procedure
Definition srt_table.h:26
timestat_t stats
Definition srt_table.h:25
Definition srt_table.h:30
const char * proc_column_name
Definition srt_table.h:36
const char * short_name
Definition srt_table.h:32
char * filter_string
Definition srt_table.h:33
const char * name
Definition srt_table.h:31
srt_procedure_t * procedures
Definition srt_table.h:37
int num_procs
Definition srt_table.h:35
Definition timestats.h:23
Definition nstime.h:26
Definition srt_table.c:20