rust/core: Make AppProto type u16

pull/6139/head
Shivani Bhardwaj 5 years ago committed by Victor Julien
parent d66ad96f0d
commit dee972b863

@ -40,7 +40,7 @@ pub const STREAM_DEPTH: u8 = 0x20;
pub const STREAM_MIDSTREAM:u8 = 0x40;
// Application layer protocol identifiers (app-layer-protos.h)
pub type AppProto = std::os::raw::c_int;
pub type AppProto = u16;
pub const ALPROTO_UNKNOWN : AppProto = 0;
pub static mut ALPROTO_FAILED : AppProto = 0; // updated during init

@ -1363,7 +1363,7 @@ fn probe(input: &[u8]) -> (bool, bool) {
#[no_mangle]
pub extern "C" fn rs_dcerpc_probe_tcp(direction: u8, input: *const u8,
len: u32, rdir: *mut u8) -> i32
len: u32, rdir: *mut u8) -> AppProto
{
SCLogDebug!("Probing packet for DCERPC");
if len == 0 {

@ -306,7 +306,7 @@ fn probe(input: &[u8]) -> (bool, bool) {
#[no_mangle]
pub extern "C" fn rs_dcerpc_probe_udp(direction: u8, input: *const u8,
len: u32, rdir: *mut u8) -> i32
len: u32, rdir: *mut u8) -> core::AppProto
{
SCLogDebug!("Probing the packet for DCERPC/UDP");
if len == 0 {

Loading…
Cancel
Save