diff --git a/rust/src/core.rs b/rust/src/core.rs index bef967b0e1..3366f37838 100644 --- a/rust/src/core.rs +++ b/rust/src/core.rs @@ -18,6 +18,7 @@ //! This module exposes items from the core "C" code to Rust. use std; +use std::os::raw::{c_int, c_void}; use suricata_sys::sys::{AppProto, AppProtoEnum}; use crate::filecontainer::*; @@ -72,6 +73,15 @@ extern { pub fn StringToAppProto(proto_name: *const u8) -> AppProto; } +/// cbindgen:ignore +extern "C" { + pub fn MpmAddPatternCI( + ctx: *const c_void, pat: *const libc::c_char, pat_len: c_int, _offset: c_int, + _depth: c_int, id: c_int, rule_id: c_int, _flags: c_int, + ) -> c_void; +} + + // // Function types for calls into C. // diff --git a/rust/src/ftp/ftp.rs b/rust/src/ftp/ftp.rs index 3963a2adfa..f294c54a57 100644 --- a/rust/src/ftp/ftp.rs +++ b/rust/src/ftp/ftp.rs @@ -19,6 +19,7 @@ use std; use std::ffi::CString; use std::os::raw::{c_char, c_int, c_void}; +use crate::core::*; use crate::conf::{conf_get, get_memval}; use crate::ftp::constant::*; use lazy_static::lazy_static; @@ -97,14 +98,6 @@ lazy_static! { ]; } -/// cbindgen:ignore -extern "C" { - pub fn MpmAddPatternCI( - ctx: *const c_void, pat: *const libc::c_char, pat_len: c_int, _offset: c_int, - _depth: c_int, id: c_int, rule_id: c_int, _flags: c_int, - ) -> c_void; -} - #[allow(non_snake_case)] #[no_mangle] pub unsafe extern "C" fn SCGetFtpCommandInfo(