Wireshark  4.3.0
The Wireshark network protocol analyzer
rtd_table.h
Go to the documentation of this file.
1 
12 #ifndef __RTD_TABLE_H__
13 #define __RTD_TABLE_H__
14 
15 #include "tap.h"
16 #include "timestats.h"
17 #include "value_string.h"
18 #include <epan/wmem_scopes.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* __cplusplus */
23 
24 typedef struct _rtd_timestat {
25  guint num_timestat;
26  timestat_t* rtd;
27  guint32 open_req_num;
28  guint32 disc_rsp_num;
29  guint32 req_dup_num;
30  guint32 rsp_dup_num;
31 } rtd_timestat;
32 
34 typedef struct _rtd_stat_table {
35  char *filter;
36  guint num_rtds;
37  rtd_timestat* time_stats;
39 
42 typedef struct _rtd_data_t {
44  void *user_data;
46 
48 struct register_rtd;
49 typedef struct register_rtd register_rtd_t;
50 
51 typedef void (*rtd_gui_init_cb)(rtd_stat_table* rtd, void* gui_data);
52 typedef void (*rtd_filter_check_cb)(const char *opt_arg, const char **filter, char** err);
53 
64 WS_DLL_PUBLIC void register_rtd_table(const int proto_id, const char* tap_listener, guint num_tables, guint num_timestats, const value_string* vs_type,
65  tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb);
66 
72 WS_DLL_PUBLIC int get_rtd_proto_id(register_rtd_t* rtd);
73 
79 WS_DLL_PUBLIC const char* get_rtd_tap_listener_name(register_rtd_t* rtd);
80 
86 WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func(register_rtd_t* rtd);
87 
93 WS_DLL_PUBLIC guint get_rtd_num_tables(register_rtd_t* rtd);
94 
100 WS_DLL_PUBLIC const value_string* get_rtd_value_string(register_rtd_t* rtd);
101 
107 WS_DLL_PUBLIC register_rtd_t* get_rtd_table_by_name(const char* name);
108 
113 WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table* table);
114 
119 WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table* table);
120 
127 WS_DLL_PUBLIC void rtd_table_iterate_tables(wmem_foreach_func func, gpointer user_data);
128 
136 WS_DLL_PUBLIC void rtd_table_get_filter(register_rtd_t* rtd, const char *opt_arg, const char **filter, char** err);
137 
145 WS_DLL_PUBLIC void rtd_table_dissector_init(register_rtd_t* rtd, rtd_stat_table* table, rtd_gui_init_cb gui_callback, void *callback_data);
146 
153 WS_DLL_PUBLIC gchar* rtd_table_get_tap_string(register_rtd_t* rtd);
154 
155 #ifdef __cplusplus
156 }
157 #endif /* __cplusplus */
158 
159 #endif /* __RTD_TABLE_H__ */
160 
161 /*
162  * Editor modelines
163  *
164  * Local Variables:
165  * c-basic-offset: 4
166  * tab-width: 8
167  * indent-tabs-mode: nil
168  * End:
169  *
170  * ex: set shiftwidth=4 tabstop=8 expandtab:
171  * :indentSize=4:tabSize=8:noTabs=true:
172  */
bool(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Definition: wmem_tree.h:220
WS_DLL_PUBLIC gchar * rtd_table_get_tap_string(register_rtd_t *rtd)
Definition: rtd_table.c:111
struct _rtd_data_t rtd_data_t
struct _rtd_stat_table rtd_stat_table
WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table *table)
Definition: rtd_table.c:85
WS_DLL_PUBLIC int get_rtd_proto_id(register_rtd_t *rtd)
Definition: rtd_table.c:30
WS_DLL_PUBLIC void rtd_table_get_filter(register_rtd_t *rtd, const char *opt_arg, const char **filter, char **err)
Definition: rtd_table.c:118
WS_DLL_PUBLIC void rtd_table_dissector_init(register_rtd_t *rtd, rtd_stat_table *table, rtd_gui_init_cb gui_callback, void *callback_data)
Definition: rtd_table.c:139
WS_DLL_PUBLIC void register_rtd_table(const int proto_id, const char *tap_listener, guint num_tables, guint num_timestats, const value_string *vs_type, tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb)
Definition: rtd_table.c:60
WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func(register_rtd_t *rtd)
Definition: rtd_table.c:43
WS_DLL_PUBLIC const char * get_rtd_tap_listener_name(register_rtd_t *rtd)
Definition: rtd_table.c:38
WS_DLL_PUBLIC const value_string * get_rtd_value_string(register_rtd_t *rtd)
Definition: rtd_table.c:52
WS_DLL_PUBLIC guint get_rtd_num_tables(register_rtd_t *rtd)
Definition: rtd_table.c:48
WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table *table)
Definition: rtd_table.c:98
WS_DLL_PUBLIC void rtd_table_iterate_tables(wmem_foreach_func func, gpointer user_data)
Definition: rtd_table.c:156
WS_DLL_PUBLIC register_rtd_t * get_rtd_table_by_name(const char *name)
Definition: rtd_table.c:106
Definition: rtd_table.h:42
void * user_data
Definition: rtd_table.h:44
rtd_stat_table stat_table
Definition: rtd_table.h:43
Definition: rtd_table.h:34
guint num_rtds
Definition: rtd_table.h:36
Definition: rtd_table.h:24
guint num_timestat
Definition: rtd_table.h:25
Definition: timestats.h:24
Definition: value_string.h:26
Definition: rtd_table.c:20