| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
plugins.h
Go to the documentation of this file.
1
10
11#ifndef __PLUGINS_H__
12#define __PLUGINS_H__
13
14#include <wireshark.h>
15
16#ifdef __cplusplus
17 extern "C" {
18#endif /* __cplusplus */
19
20 typedef void (*plugin_register_func)(void);
21 typedef uint32_t (*plugin_describe_func)(void);
22
23 typedef void plugins_t;
24
28 typedef enum {
29 WS_PLUGIN_EPAN,
30 WS_PLUGIN_WIRETAP,
31 WS_PLUGIN_CODEC,
32 WS_PLUGIN_UI
33} plugin_type_e;
34
35#define WS_PLUGIN_DESC_DISSECTOR (1UL << 0)
36#define WS_PLUGIN_DESC_FILE_TYPE (1UL << 1)
37#define WS_PLUGIN_DESC_CODEC (1UL << 2)
38#define WS_PLUGIN_DESC_EPAN (1UL << 3)
39#define WS_PLUGIN_DESC_TAP_LISTENER (1UL << 4)
40#define WS_PLUGIN_DESC_DFILTER (1UL << 5)
41#define WS_PLUGIN_DESC_UI (1UL << 6)
42
52WS_DLL_PUBLIC plugins_t *plugins_init(plugin_type_e type, const char* app_env_var_prefix);
53
54 typedef void (*plugin_description_callback)(const char *name, const char *version,
55 uint32_t flags, const char *filename,
56 void *user_data);
57
64WS_DLL_PUBLIC void plugins_get_descriptions(plugin_description_callback callback, void *user_data);
65
69WS_DLL_PUBLIC void plugins_dump_all(void);
70
76WS_DLL_PUBLIC int plugins_get_count(void);
77
83WS_DLL_PUBLIC void plugins_cleanup(plugins_t *plugins);
84
90WS_DLL_PUBLIC bool plugins_supported(void);
91
98WS_DLL_PUBLIC bool is_plugin_filename(const char *filename);
99
100#ifdef __cplusplus
101}
102#endif /* __cplusplus */
103
104#endif /* __PLUGINS_H__ */
105
106/*
107 * Editor modelines
108 *
109 * Local Variables:
110 * c-basic-offset: 4
111 * tab-width: 8
112 * indent-tabs-mode: nil
113 * End:
114 *
115 * ex: set shiftwidth=4 tabstop=8 expandtab:
116 * :indentSize=4:tabSize=8:noTabs=true:
117 */
plugins_get_count
WS_DLL_PUBLIC int plugins_get_count(void)
Gets the count of all loaded plugins.
Definition plugins.c:324
plugins_dump_all
WS_DLL_PUBLIC void plugins_dump_all(void)
Prints the description of all plugins.
Definition plugins.c:318
plugins_cleanup
WS_DLL_PUBLIC void plugins_cleanup(plugins_t *plugins)
Cleans up and unloads a plugin.
Definition plugins.c:335
plugins_init
WS_DLL_PUBLIC plugins_t * plugins_init(plugin_type_e type, const char *app_env_var_prefix)
Initialize plugins of a specific type.
Definition plugins.c:256
plugins_supported
WS_DLL_PUBLIC bool plugins_supported(void)
Checks if plugins are supported.
Definition plugins.c:345
plugin_type_e
plugin_type_e
Identifies the subsystem a Wireshark plugin extends.
Definition plugins.h:28
WS_PLUGIN_CODEC
@ WS_PLUGIN_CODEC
Definition plugins.h:31
WS_PLUGIN_UI
@ WS_PLUGIN_UI
Definition plugins.h:32
WS_PLUGIN_WIRETAP
@ WS_PLUGIN_WIRETAP
Definition plugins.h:30
WS_PLUGIN_EPAN
@ WS_PLUGIN_EPAN
Definition plugins.h:29
plugins_get_descriptions
WS_DLL_PUBLIC void plugins_get_descriptions(plugin_description_callback callback, void *user_data)
Retrieves descriptions of all plugins.
Definition plugins.c:286
is_plugin_filename
WS_DLL_PUBLIC bool is_plugin_filename(const char *filename)
Returns true if the given filename ends in .dll on Windows or .so on other platforms.
Definition plugins.c:140