rust: RustParser same fields as AppLayerParser

So that there is no problem when crossing FFI

(cherry picked from commit c78722a671)
pull/7435/head
Philippe Antoine 4 years ago committed by Jeff Lucovsky
parent 87bec36093
commit dfe3da7765

@ -179,7 +179,7 @@ pub struct RustParser {
pub default_port: *const c_char,
/// IP Protocol (core::IPPROTO_UDP, core::IPPROTO_TCP, etc.)
pub ipproto: c_int,
pub ipproto: u8,
/// Probing function, for packets going to server
pub probe_ts: Option<ProbeFn>,

@ -45,8 +45,8 @@ pub type AppProto = std::os::raw::c_int;
pub const ALPROTO_UNKNOWN : AppProto = 0;
pub static mut ALPROTO_FAILED : AppProto = 0; // updated during init
pub const IPPROTO_TCP : i32 = 6;
pub const IPPROTO_UDP : i32 = 17;
pub const IPPROTO_TCP : u8 = 6;
pub const IPPROTO_UDP : u8 = 17;
macro_rules!BIT_U8 {
($x:expr) => (1 << $x);

@ -27,7 +27,7 @@
typedef struct AppLayerParser {
const char *name;
const char *default_port;
int ip_proto;
uint8_t ip_proto;
ProbingParserFPtr ProbeTS;
ProbingParserFPtr ProbeTC;

Loading…
Cancel
Save