summaryrefslogtreecommitdiffstats
path: root/doc/plugins.example
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /doc/plugins.example
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-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 'doc/plugins.example')
-rw-r--r--doc/plugins.example/hello.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/plugins.example/hello.c b/doc/plugins.example/hello.c
index 7a252c80..5a9ccd81 100644
--- a/doc/plugins.example/hello.c
+++ b/doc/plugins.example/hello.c
@@ -9,6 +9,7 @@
#define WS_BUILD_DLL
#include <wireshark.h>
+#include <wsutil/plugins.h>
#include <epan/packet.h>
#include <epan/proto.h>
@@ -21,9 +22,9 @@ WS_DLL_PUBLIC_DEF const int plugin_want_major = WIRESHARK_VERSION_MAJOR;
WS_DLL_PUBLIC_DEF const int plugin_want_minor = WIRESHARK_VERSION_MINOR;
WS_DLL_PUBLIC void plugin_register(void);
+WS_DLL_PUBLIC uint32_t plugin_describe(void);
-
-static int proto_hello = -1;
+static int proto_hello;
static dissector_handle_t handle_hello;
static int
@@ -56,3 +57,9 @@ plugin_register(void)
plug.register_handoff = proto_reg_handoff_hello; /* or NULL */
proto_register_plugin(&plug);
}
+
+uint32_t
+plugin_describe(void)
+{
+ return WS_PLUGIN_DESC_DISSECTOR;
+}