app-layer: remove old MPMId API calls

Had been deprecated and non-functional since 2017.
pull/5059/head
Victor Julien 5 years ago
parent 74053f43cb
commit 79681bf655

@ -158,11 +158,6 @@ pub struct RustParser {
/// Function to free local storage
pub localstorage_free: Option<LocalStorageFreeFn>,
/// Function to get transaction MPM ID
pub get_tx_mpm_id: Option<GetTxMpmIDFn>,
/// Function to set transaction MPM ID
pub set_tx_mpm_id: Option<SetTxMpmIDFn>,
/// Function to get files
pub get_files: Option<GetFilesFn>,
@ -216,8 +211,6 @@ pub type GetTxLoggedFn = extern "C" fn (*mut c_void, *mut c_void) -> u32;
pub type SetTxLoggedFn = extern "C" fn (*mut c_void, *mut c_void, u32);
pub type LocalStorageNewFn = extern "C" fn () -> *mut c_void;
pub type LocalStorageFreeFn = extern "C" fn (*mut c_void);
pub type GetTxMpmIDFn = extern "C" fn (*mut c_void) -> u64;
pub type SetTxMpmIDFn = extern "C" fn (*mut c_void, u64) -> c_int;
pub type GetFilesFn = extern "C" fn (*mut c_void, u8) -> *mut FileContainer;
pub type GetTxIteratorFn = extern "C" fn (ipproto: u8, alproto: AppProto,
state: *mut c_void,

@ -533,8 +533,6 @@ pub unsafe extern "C" fn rs_template_register_parser() {
get_eventinfo_byid : Some(rs_template_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: Some(rs_template_state_get_tx_iterator),
get_tx_detect_flags: None,

@ -447,8 +447,6 @@ pub unsafe extern "C" fn rs_dhcp_register_parser() {
get_eventinfo_byid : None,
localstorage_new : None,
localstorage_free : None,
get_tx_mpm_id : None,
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : Some(rs_dhcp_state_get_tx_iterator),
set_tx_detect_flags: None,

@ -1015,8 +1015,6 @@ pub unsafe extern "C" fn rs_dns_udp_register_parser() {
get_eventinfo_byid: Some(rs_dns_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
get_tx_detect_flags: Some(rs_dns_tx_get_detect_flags),
@ -1062,8 +1060,6 @@ pub unsafe extern "C" fn rs_dns_tcp_register_parser() {
get_eventinfo_byid: Some(rs_dns_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
get_tx_detect_flags: Some(rs_dns_tx_get_detect_flags),

@ -731,8 +731,6 @@ pub unsafe extern "C" fn rs_register_ikev2_parser() {
get_eventinfo_byid : Some(rs_ikev2_state_get_event_info_by_id),
localstorage_new : None,
localstorage_free : None,
get_tx_mpm_id : None,
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
get_tx_detect_flags: None,

@ -677,8 +677,6 @@ pub unsafe extern "C" fn rs_register_krb5_parser() {
get_eventinfo_byid : Some(rs_krb5_state_get_event_info_by_id),
localstorage_new : None,
localstorage_free : None,
get_tx_mpm_id : None,
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
get_tx_detect_flags: Some(rs_krb5_tx_detect_flags_get),

@ -430,8 +430,6 @@ pub unsafe extern "C" fn rs_register_ntp_parser() {
get_eventinfo_byid : Some(rs_ntp_state_get_event_info_by_id),
localstorage_new : None,
localstorage_free : None,
get_tx_mpm_id : None,
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
get_tx_detect_flags: None,

@ -528,8 +528,6 @@ pub unsafe extern "C" fn rs_rdp_register_parser() {
get_eventinfo_byid: None,
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
get_tx_detect_flags: None,

@ -720,8 +720,6 @@ pub unsafe extern "C" fn rs_rfb_register_parser() {
get_eventinfo_byid : Some(rs_rfb_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: Some(rs_rfb_state_get_tx_iterator),
get_tx_detect_flags: Some(rs_rfb_get_tx_detect_flags),

@ -408,8 +408,6 @@ pub unsafe extern "C" fn rs_sip_register_parser() {
get_eventinfo_byid: Some(rs_sip_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
get_tx_detect_flags: None,

@ -609,8 +609,6 @@ pub unsafe extern "C" fn rs_register_snmp_parser() {
get_eventinfo_byid : Some(rs_snmp_state_get_event_info_by_id),
localstorage_new : None,
localstorage_free : None,
get_tx_mpm_id : None,
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
get_tx_detect_flags: Some(rs_snmp_get_tx_detect_flags),

@ -518,8 +518,6 @@ pub unsafe extern "C" fn rs_ssh_register_parser() {
get_eventinfo_byid: Some(rs_ssh_state_get_event_info_by_id),
localstorage_new: None,
localstorage_free: None,
get_tx_mpm_id: None,
set_tx_mpm_id: None,
get_files: None,
get_tx_iterator: None,
get_tx_detect_flags: Some(rs_ssh_get_tx_detect_flags),

@ -598,16 +598,6 @@ void AppLayerParserRegisterDetectFlagsFuncs(uint8_t ipproto, AppProto alproto,
SCReturn;
}
void AppLayerParserRegisterMpmIDsFuncs(uint8_t ipproto, AppProto alproto,
uint64_t(*GetTxMpmIDs)(void *tx),
int (*SetTxMpmIDs)(void *tx, uint64_t))
{
SCEnter();
SCLogWarning(SC_WARN_DEPRECATED, "%u/%s: GetTxMpmIDs/SetTxMpmIDs is no longer used",
ipproto, AppProtoToString(alproto));
SCReturn;
}
void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto,
void (*SetStreamDepthFlag)(void *tx, uint8_t flags))
{

@ -181,9 +181,6 @@ void AppLayerParserRegisterDetectStateFuncs(uint8_t ipproto, AppProto alproto,
void AppLayerParserRegisterGetStreamDepth(uint8_t ipproto,
AppProto alproto,
uint32_t (*GetStreamDepth)(void));
void AppLayerParserRegisterMpmIDsFuncs(uint8_t ipproto, AppProto alproto,
uint64_t (*GetTxMpmIDs)(void *tx),
int (*SetTxMpmIDs)(void *tx, uint64_t));
void AppLayerParserRegisterDetectFlagsFuncs(uint8_t ipproto, AppProto alproto,
uint64_t(*GetTxDetectFlags)(void *tx, uint8_t dir),
void (*SetTxDetectFlags)(void *tx, uint8_t dir, uint64_t));

@ -161,10 +161,6 @@ int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
AppLayerParserRegisterLocalStorageFunc(p->ip_proto, alproto,
p->LocalStorageAlloc, p->LocalStorageFree);
}
if (p->GetTxMpmIDs && p->SetTxMpmIDs) {
AppLayerParserRegisterMpmIDsFuncs(p->ip_proto, alproto,
p->GetTxMpmIDs, p->SetTxMpmIDs);
}
if (p->StateGetFiles) {
AppLayerParserRegisterGetFilesFunc(p->ip_proto, alproto,
p->StateGetFiles);

@ -63,9 +63,6 @@ typedef struct AppLayerParser {
void *(*LocalStorageAlloc)(void);
void (*LocalStorageFree)(void *);
uint64_t (*GetTxMpmIDs)(void *tx);
int (*SetTxMpmIDs)(void *tx, uint64_t);
FileContainer *(*StateGetFiles)(void *, uint8_t);
AppLayerGetTxIterTuple (*GetTxIterator)(const uint8_t ipproto,

Loading…
Cancel
Save