| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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 <wsutil/value_string.h>
18#include <epan/wmem_scopes.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24 typedef struct _rtd_timestat {
25 unsigned num_timestat;
26 timestat_t* rtd;
27 uint32_t open_req_num;
28 uint32_t disc_rsp_num;
29 uint32_t req_dup_num;
30 uint32_t rsp_dup_num;
31} rtd_timestat;
32
34 typedef struct _rtd_stat_table {
35 char *filter;
36 unsigned num_rtds;
37 rtd_timestat* time_stats;
38} rtd_stat_table;
39
42 typedef struct _rtd_data_t {
43 rtd_stat_table stat_table;
44 void *user_data;
45} rtd_data_t;
46
48struct register_rtd;
49typedef struct register_rtd register_rtd_t;
50
53extern void rtd_table_init(void);
54
55typedef void (*rtd_gui_init_cb)(rtd_stat_table* rtd, void* gui_data);
56typedef void (*rtd_filter_check_cb)(const char *opt_arg, const char **filter, char** err);
57
68WS_DLL_PUBLIC void register_rtd_table(const int proto_id, const char* tap_listener, unsigned num_tables, unsigned num_timestats, const value_string* vs_type,
69 tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb);
70
76WS_DLL_PUBLIC int get_rtd_proto_id(register_rtd_t* rtd);
77
83WS_DLL_PUBLIC const char* get_rtd_tap_listener_name(register_rtd_t* rtd);
84
90WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func(register_rtd_t* rtd);
91
97WS_DLL_PUBLIC unsigned get_rtd_num_tables(register_rtd_t* rtd);
98
104WS_DLL_PUBLIC const value_string* get_rtd_value_string(register_rtd_t* rtd);
105
111WS_DLL_PUBLIC register_rtd_t* get_rtd_table_by_name(const char* name);
112
117WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table* table);
118
123WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table* table);
124
131WS_DLL_PUBLIC void rtd_table_iterate_tables(wmem_foreach_func func, void *user_data);
132
140WS_DLL_PUBLIC void rtd_table_get_filter(register_rtd_t* rtd, const char *opt_arg, const char **filter, char** err);
141
149WS_DLL_PUBLIC void rtd_table_dissector_init(register_rtd_t* rtd, rtd_stat_table* table, rtd_gui_init_cb gui_callback, void *callback_data);
150
157WS_DLL_PUBLIC char* rtd_table_get_tap_string(register_rtd_t* rtd);
158
159#ifdef __cplusplus
160}
161#endif /* __cplusplus */
162
163#endif /* __RTD_TABLE_H__ */
164
165/*
166 * Editor modelines
167 *
168 * Local Variables:
169 * c-basic-offset: 4
170 * tab-width: 8
171 * indent-tabs-mode: nil
172 * End:
173 *
174 * ex: set shiftwidth=4 tabstop=8 expandtab:
175 * :indentSize=4:tabSize=8:noTabs=true:
176 */
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
rtd_data_t
struct _rtd_data_t rtd_data_t
get_rtd_value_string
WS_DLL_PUBLIC const value_string * get_rtd_value_string(register_rtd_t *rtd)
Definition rtd_table.c:52
rtd_stat_table
struct _rtd_stat_table rtd_stat_table
get_rtd_table_by_name
WS_DLL_PUBLIC register_rtd_t * get_rtd_table_by_name(const char *name)
Definition rtd_table.c:108
rtd_table_get_tap_string
WS_DLL_PUBLIC char * rtd_table_get_tap_string(register_rtd_t *rtd)
Definition rtd_table.c:113
free_rtd_table
WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table *table)
Definition rtd_table.c:87
register_rtd_table
WS_DLL_PUBLIC void register_rtd_table(const int proto_id, const char *tap_listener, unsigned num_tables, unsigned num_timestats, const value_string *vs_type, tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb)
Definition rtd_table.c:65
rtd_table_iterate_tables
WS_DLL_PUBLIC void rtd_table_iterate_tables(wmem_foreach_func func, void *user_data)
Definition rtd_table.c:158
get_rtd_proto_id
WS_DLL_PUBLIC int get_rtd_proto_id(register_rtd_t *rtd)
Definition rtd_table.c:30
rtd_table_get_filter
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:120
rtd_table_dissector_init
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:141
get_rtd_packet_func
WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func(register_rtd_t *rtd)
Definition rtd_table.c:43
reset_rtd_table
WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table *table)
Definition rtd_table.c:100
get_rtd_tap_listener_name
WS_DLL_PUBLIC const char * get_rtd_tap_listener_name(register_rtd_t *rtd)
Definition rtd_table.c:38
get_rtd_num_tables
WS_DLL_PUBLIC unsigned get_rtd_num_tables(register_rtd_t *rtd)
Definition rtd_table.c:48
rtd_table_init
void rtd_table_init(void)
Definition rtd_table.c:59
_rtd_data_t
Definition rtd_table.h:42
_rtd_data_t::user_data
void * user_data
Definition rtd_table.h:44
_rtd_data_t::stat_table
rtd_stat_table stat_table
Definition rtd_table.h:43
_rtd_stat_table
Definition rtd_table.h:34
_rtd_stat_table::num_rtds
unsigned num_rtds
Definition rtd_table.h:36
_rtd_timestat
Definition rtd_table.h:24
_rtd_timestat::num_timestat
unsigned num_timestat
Definition rtd_table.h:25
_timestat_t
Definition timestats.h:23
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
register_rtd
Definition rtd_table.c:20
tap.h
timestats.h
value_string.h
wmem_scopes.h