Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
register.h
1 /* register.h
2  * Definitions for protocol registration
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef __REGISTER_H__
12 #define __REGISTER_H__
13 
14 #include "ws_symbol_export.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19 
20 #include <glib.h>
21 
22 typedef enum {
23  RA_NONE, /* For initialization */
24  RA_DISSECTORS, /* Initializing dissectors */
25  RA_LISTENERS, /* Tap listeners */
26  RA_EXTCAP, /* extcap register preferences */
27  RA_REGISTER, /* Built-in dissector registration */
28  RA_PLUGIN_REGISTER, /* Plugin dissector registration */
29  RA_HANDOFF, /* Built-in dissector handoff */
30  RA_PLUGIN_HANDOFF, /* Plugin dissector handoff */
31  RA_LUA_PLUGINS, /* Lua plugin register */
32  RA_LUA_DEREGISTER, /* Lua plugin deregister */
33  RA_PREFERENCES, /* Module preferences */
34  RA_INTERFACES /* Local interfaces */
35 } register_action_e;
36 
37 #define RA_BASE_COUNT (RA_INTERFACES - 3) // RA_EXTCAP, RA_LUA_PLUGINS, RA_LUA_DEREGISTER
38 
39 typedef void (*register_cb)(register_action_e action, const char *message, gpointer client_data);
40 
52 WS_DLL_PUBLIC void register_all_protocols(register_cb cb, gpointer client_data);
53 
64 WS_DLL_PUBLIC void register_all_protocol_handoffs(register_cb cb, gpointer client_data);
65 
66 WS_DLL_PUBLIC gulong register_count(void);
67 
68 #ifdef __cplusplus
69 }
70 #endif /* __cplusplus */
71 
72 #endif /* __REGISTER_H__ */
73 
74 /*
75  * Editor modelines - http://www.wireshark.org/tools/modelines.html
76  *
77  * Local Variables:
78  * c-basic-offset: 4
79  * tab-width: 8
80  * indent-tabs-mode: nil
81  * End:
82  *
83  * vi: set shiftwidth=4 tabstop=8 expandtab:
84  * :indentSize=4:tabSize=8:noTabs=true:
85  */