Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

rtd_table.h
1 /* rtd_table.h
2 * GUI independent helper routines common to all Response Time Delay (RTD) taps.
3 * Based on srt_table.h
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
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 "wmem/wmem.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;
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
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_gui_reset_cb)(rtd_stat_table* rtd, void* gui_data); /* GTK+ only. */
53 typedef void (*rtd_gui_free_cb)(rtd_stat_table* rtd, void* gui_data); /* GTK+ only. */
54 typedef void (*rtd_init_cb)(struct register_rtd* rtd, rtd_gui_init_cb gui_callback, void* gui_data); /* GTK+ only. */
55 typedef void (*rtd_filter_check_cb)(const char *opt_arg, const char **filter, char** err);
56
67 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,
68 tap_packet_cb rtd_packet_func, rtd_filter_check_cb filter_check_cb);
69
75 WS_DLL_PUBLIC int get_rtd_proto_id(register_rtd_t* rtd);
76
82 WS_DLL_PUBLIC const char* get_rtd_tap_listener_name(register_rtd_t* rtd);
83
89 WS_DLL_PUBLIC tap_packet_cb get_rtd_packet_func(register_rtd_t* rtd);
90
96 WS_DLL_PUBLIC guint get_rtd_num_tables(register_rtd_t* rtd);
97
103 WS_DLL_PUBLIC const value_string* get_rtd_value_string(register_rtd_t* rtd);
104
110 WS_DLL_PUBLIC register_rtd_t* get_rtd_table_by_name(const char* name);
111
118 WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table* table, rtd_gui_free_cb gui_callback, void *callback_data);
119
126 WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table* table, rtd_gui_reset_cb gui_callback, void *callback_data);
127
134 WS_DLL_PUBLIC void rtd_table_iterate_tables(wmem_foreach_func func, gpointer user_data);
135
143 WS_DLL_PUBLIC void rtd_table_get_filter(register_rtd_t* rtd, const char *opt_arg, const char **filter, char** err);
144
152 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);
153
160 WS_DLL_PUBLIC gchar* rtd_table_get_tap_string(register_rtd_t* rtd);
161
162 #ifdef __cplusplus
163 }
164 #endif /* __cplusplus */
165
166 #endif /* __RTD_TABLE_H__ */
167
168 /*
169 * Editor modelines
170 *
171 * Local Variables:
172 * c-basic-offset: 4
173 * tab-width: 8
174 * indent-tabs-mode: nil
175 * End:
176 *
177 * ex: set shiftwidth=4 tabstop=8 expandtab:
178 * :indentSize=4:tabSize=8:noTabs=true:
179 */
_rtd_stat_table::num_rtds
guint num_rtds
Definition: rtd_table.h:36
wmem_foreach_func
gboolean(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Definition: wmem_tree.h:213
_rtd_stat_table
Definition: rtd_table.h:34
_rtd_data_t
Definition: rtd_table.h:42
_rtd_data_t::user_data
void * user_data
Definition: rtd_table.h:44
register_rtd
Definition: rtd_table.c:20
_rtd_timestat::num_timestat
guint num_timestat
Definition: rtd_table.h:25
_value_string
Definition: value_string.h:24
_rtd_data_t::stat_table
rtd_stat_table stat_table
Definition: rtd_table.h:43
_rtd_timestat
Definition: rtd_table.h:24
_timestat_t
Definition: timestats.h:24