]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
plugins: bind constant SC_PLUGIN_API_VERSION
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 19 Feb 2025 20:15:09 +0000 (21:15 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 29 Mar 2025 05:38:00 +0000 (06:38 +0100)
rust/Makefile.am
rust/sys/src/sys.rs
src/suricata-plugin.h

index c1250a81c065ad446703802fddff0dd00a5c8dfb..cb9158fc63c421293c0ab08895a43a3263e60955 100644 (file)
@@ -130,6 +130,7 @@ if HAVE_BINDGEN
                --allowlist-function 'AppProto.*' \
                --allowlist-type 'SC.*' \
                --allowlist-function 'SC.*' \
+               --allowlist-var 'SC.*' \
                $(abs_top_srcdir)/src/bindgen.h \
                -- \
                -DHAVE_CONFIG_H -I../src -I../rust/gen $(CPPFLAGS)
index 99341dbbecdc245bb1be8df364fdf94dc5b9fb82..057d566f1847c6806c0b1e2a82d5429612a4b452 100644 (file)
@@ -105,6 +105,7 @@ pub type SCCapturePlugin = SCCapturePlugin_;
 extern "C" {
     pub fn SCPluginRegisterCapture(arg1: *mut SCCapturePlugin) -> ::std::os::raw::c_int;
 }
+pub const SC_PLUGIN_API_VERSION: u64 = 8;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct SCAppLayerPlugin_ {
index 4db7cc4d3a0b08a9dca009d448f3384f5068921c..fbc4979611e6b50b7ff6618b992fd0f80172baf8 100644 (file)
@@ -53,7 +53,7 @@ typedef struct SCCapturePlugin_ {
 int SCPluginRegisterCapture(SCCapturePlugin *);
 
 // Every change in the API used by plugins should change this number
-#define SC_PLUGIN_API_VERSION 8
+static const uint64_t SC_PLUGIN_API_VERSION = 8;
 
 typedef struct SCAppLayerPlugin_ {
     // versioning to check suricata/plugin API compatibility