summaryrefslogtreecommitdiffstats
path: root/tools/make-plugin-reg.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /tools/make-plugin-reg.py
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtools/make-plugin-reg.py18
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']: