]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust/app-layer: expose AppLayerEvent derive macro
authorJason Ish <jason.ish@oisf.net>
Fri, 17 Dec 2021 22:33:48 +0000 (16:33 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 11 Jan 2022 06:38:58 +0000 (07:38 +0100)
Export the AppLayerEvent derive macro so plugin (or library code) can
use it as expected, for example:

use suricata::applayer::AppLayerEvent;

enum MyEvent {
    EventOne,
    EventTwo,
}

rust/src/applayer.rs

index 23d2bac27a80a9548ed369b31d21dffeb9661af6..e8cad8ac9d7a51410a930eb839a7691e5b3486d8 100644 (file)
@@ -25,6 +25,10 @@ use std::os::raw::{c_void,c_char,c_int};
 use crate::core::SC;
 use std::ffi::CStr;
 
+// Make the AppLayerEvent derive macro available to users importing
+// AppLayerEvent from this module.
+pub use suricata_derive::AppLayerEvent;
+
 #[repr(C)]
 pub struct StreamSlice {
     input: *const u8,