diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /tools/make-plugin-reg.py | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/make-plugin-reg.py')
-rwxr-xr-x | tools/make-plugin-reg.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/make-plugin-reg.py b/tools/make-plugin-reg.py index 2b9bc345..135850c2 100755 --- a/tools/make-plugin-reg.py +++ b/tools/make-plugin-reg.py @@ -116,6 +116,7 @@ reg_code += """ /* plugins are DLLs on Windows */ #define WS_BUILD_DLL #include "ws_symbol_export.h" +#include <wsutil/plugins.h> """ @@ -139,16 +140,29 @@ for symbol in regs['codec_register']: for symbol in regs['register_tap_listener']: reg_code += "void register_tap_listener_%s(void);\n" % (symbol) +DESCRIPTION_FLAG = { + 'plugin': 'WS_PLUGIN_DESC_DISSECTOR', + 'plugin_wtap': 'WS_PLUGIN_DESC_FILE_TYPE', + 'plugin_codec': 'WS_PLUGIN_DESC_CODEC', + 'plugin_tap': 'WS_PLUGIN_DESC_TAP_LISTENER' +} + reg_code += """ -WS_DLL_PUBLIC_DEF const gchar plugin_version[] = PLUGIN_VERSION; +WS_DLL_PUBLIC_DEF const char plugin_version[] = PLUGIN_VERSION; WS_DLL_PUBLIC_DEF const int plugin_want_major = VERSION_MAJOR; WS_DLL_PUBLIC_DEF const int plugin_want_minor = VERSION_MINOR; WS_DLL_PUBLIC void plugin_register(void); +WS_DLL_PUBLIC uint32_t plugin_describe(void); + +uint32_t plugin_describe(void) +{ + return %s; +} void plugin_register(void) { -""" +""" % DESCRIPTION_FLAG[registertype] if registertype == "plugin": for symbol in regs['proto_reg']: |