applayer/ftp: Move MPM declaration

This commit moves the MPM fn declaration into core.rs making it
available for other Rust modules.

Issue: 4082
pull/12687/head
Jeff Lucovsky 1 day ago
parent 4d0cf8a8fa
commit b7d240fb14

@ -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.
//

@ -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(

Loading…
Cancel
Save