Skip to content

Commit 958b449

Browse files
committed
examples/altemplate: use suricata-ffi for logging macros
1 parent 2ac2bda commit 958b449

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/plugins/altemplate/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ nom7 = { version="7.0", package="nom" }
1111
libc = "~0.2.82"
1212
suricata = { path = "../../../rust/" }
1313
suricata-sys = { path = "../../../rust/sys" }
14+
suricata-ffi = { path = "../../../rust/ffi" }
1415

1516
[features]
1617
default = ["suricata8"]

examples/plugins/altemplate/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::template::template_register_parser;
22
use crate::detect::detect_template_register;
33
use crate::log::template_logger_log;
44
use std::ffi::CString;
5-
use suricata::{SCLogError, SCLogNotice};
5+
use suricata_ffi::{SCLogError, SCLogNotice};
66
use suricata_sys::sys::{
77
SCAppLayerPlugin, SCOutputJsonLogDirection, SCPlugin, SCPluginRegisterAppLayer, SC_API_VERSION,
88
SC_PACKAGE_VERSION,

examples/plugins/altemplate/src/template.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ use suricata::applayer::{
3535
};
3636
use suricata::conf::conf_get;
3737
use suricata::core::{ALPROTO_UNKNOWN, IPPROTO_TCP};
38-
use suricata::{
39-
build_slice, cast_pointer, export_state_data_get, export_tx_data_get, SCLogError, SCLogNotice,
40-
};
38+
use suricata::{build_slice, cast_pointer, export_state_data_get, export_tx_data_get};
39+
use suricata_ffi::{SCLogError, SCLogNotice};
4140
use suricata_sys::sys::{
4241
AppLayerParserState, AppProto, Flow, SCAppLayerParserConfParserEnabled,
4342
SCAppLayerParserRegisterLogger, SCAppLayerParserStateIssetFlag,

0 commit comments

Comments
 (0)