diff --git a/rust/src/ntp/ntp.rs b/rust/src/ntp/ntp.rs index 00c1a860c9..186faa0773 100644 --- a/rust/src/ntp/ntp.rs +++ b/rust/src/ntp/ntp.rs @@ -20,7 +20,7 @@ extern crate ntp_parser; use self::ntp_parser::*; use core; -use core::{AppProto,ALPROTO_UNKNOWN,ALPROTO_FAILED}; +use core::{AppProto,Flow,ALPROTO_UNKNOWN,ALPROTO_FAILED}; use applayer; use parser::*; use libc; @@ -361,7 +361,7 @@ pub extern "C" fn rs_ntp_state_get_event_info(event_name: *const libc::c_char, static mut ALPROTO_NTP : AppProto = ALPROTO_UNKNOWN; #[no_mangle] -pub extern "C" fn ntp_probing_parser(input:*const i8, input_len: u32, _offset: *const i8) -> AppProto { +pub extern "C" fn ntp_probing_parser(_flow: *const Flow, input:*const u8, input_len: u32, _offset: *const u32) -> AppProto { let slice: &[u8] = unsafe { std::slice::from_raw_parts(input as *mut u8, input_len as usize) }; let alproto = unsafe{ ALPROTO_NTP }; match parse_ntp(slice) { diff --git a/rust/src/parser.rs b/rust/src/parser.rs index acbb8183c5..4c1e7c7337 100644 --- a/rust/src/parser.rs +++ b/rust/src/parser.rs @@ -125,7 +125,7 @@ pub type ParseFn = extern "C" fn (flow: *const Flow, input: *const u8, input_len: u32, data: *const c_void) -> i8; -pub type ProbeFn = extern "C" fn (input:*const i8, input_len: u32, offset: *const i8) -> AppProto; +pub type ProbeFn = extern "C" fn (flow: *const Flow,input:*const u8, input_len: u32, offset: *const u32) -> AppProto; pub type StateAllocFn = extern "C" fn () -> *mut c_void; pub type StateFreeFn = extern "C" fn (*mut c_void); pub type StateTxFreeFn = extern "C" fn (*mut c_void, u64);