app-layer template: use derived app-layer event

pull/6324/head
Jason Ish 5 years ago committed by Victor Julien
parent cef2832dcf
commit d3bd008e33

@ -24,6 +24,9 @@ use super::parser;
static mut ALPROTO_TEMPLATE: AppProto = ALPROTO_UNKNOWN; static mut ALPROTO_TEMPLATE: AppProto = ALPROTO_UNKNOWN;
#[derive(AppLayerEvent)]
enum TemplateEvent {}
pub struct TemplateTransaction { pub struct TemplateTransaction {
tx_id: u64, tx_id: u64,
pub request: Option<String>, pub request: Option<String>,
@ -422,22 +425,6 @@ pub unsafe extern "C" fn rs_template_state_get_events(
return tx.events; return tx.events;
} }
#[no_mangle]
pub extern "C" fn rs_template_state_get_event_info(
_event_name: *const std::os::raw::c_char,
_event_id: *mut std::os::raw::c_int,
_event_type: *mut core::AppLayerEventType,
) -> std::os::raw::c_int {
return -1;
}
#[no_mangle]
pub extern "C" fn rs_template_state_get_event_info_by_id(_event_id: std::os::raw::c_int,
_event_name: *mut *const std::os::raw::c_char,
_event_type: *mut core::AppLayerEventType
) -> i8 {
return -1;
}
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn rs_template_state_get_tx_iterator( pub unsafe extern "C" fn rs_template_state_get_tx_iterator(
_ipproto: u8, _ipproto: u8,
@ -534,8 +521,8 @@ pub unsafe extern "C" fn rs_template_register_parser() {
get_de_state: rs_template_tx_get_detect_state, get_de_state: rs_template_tx_get_detect_state,
set_de_state: rs_template_tx_set_detect_state, set_de_state: rs_template_tx_set_detect_state,
get_events: Some(rs_template_state_get_events), get_events: Some(rs_template_state_get_events),
get_eventinfo: Some(rs_template_state_get_event_info), get_eventinfo: Some(TemplateEvent::get_event_info),
get_eventinfo_byid : Some(rs_template_state_get_event_info_by_id), get_eventinfo_byid : Some(TemplateEvent::get_event_info_by_id),
localstorage_new: None, localstorage_new: None,
localstorage_free: None, localstorage_free: None,
get_files: None, get_files: None,

Loading…
Cancel
Save