set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: Some(rs_template_state_get_tx_iterator),
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
let ip_proto_str = CString::new("tcp").unwrap();
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : Some(rs_dhcp_state_get_tx_iterator),
+ set_tx_detect_flags: None,
+ get_tx_detect_flags: None,
};
let ip_proto_str = CString::new("udp").unwrap();
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
let ip_proto_str = CString::new("udp").unwrap();
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
// register UDP parser
let ip_proto_str = CString::new("udp").unwrap();
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
let ip_proto_str = CString::new("udp").unwrap();
/// Function to get the TX iterator
pub get_tx_iterator: Option<GetTxIteratorFn>,
+
+ // Function to set TX detect flags.
+ pub set_tx_detect_flags: Option<SetTxDetectFlagsFn>,
+
+ // Function to get TX detect flags.
+ pub get_tx_detect_flags: Option<GetTxDetectFlagsFn>,
}
max_tx_id: u64,
istate: &mut u64)
-> AppLayerGetTxIterTuple;
+pub type GetTxDetectFlagsFn = unsafe extern "C" fn(*mut c_void, u8) -> u64;
+pub type SetTxDetectFlagsFn = unsafe extern "C" fn(*mut c_void, u8, u64);
// Defined in app-layer-register.h
extern {
pub fn AppLayerParserStateIssetFlag(state: *mut c_void, flag: u8) -> c_int;
pub fn AppLayerParserConfParserEnabled(ipproto: *const c_char, proto: *const c_char) -> c_int;
pub fn AppLayerParserRegisterGetTxIterator(ipproto: u8, alproto: AppProto, fun: AppLayerGetTxIteratorFn);
+ pub fn AppLayerParserRegisterDetectFlagsFuncs(
+ ipproto: u8,
+ alproto: AppProto,
+ GetTxDetectFlats: GetTxDetectFlagsFn,
+ SetTxDetectFlags: SetTxDetectFlagsFn,
+ );
}
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
/* For 5.0 we want this disabled by default, so check that it
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
/* For 5.0 we want this disabled by default, so check that it
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
+ get_tx_detect_flags: None,
+ set_tx_detect_flags: None,
};
let ip_proto_str = CString::new("udp").unwrap();
if AppLayerProtoDetectConfProtoDetectionEnabled(ip_proto_str.as_ptr(), parser.name) != 0 {