From: Victor Julien Date: Tue, 26 May 2020 08:35:34 +0000 (+0200) Subject: app-layer: remove old MPMId API calls X-Git-Tag: suricata-6.0.0-beta1~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79681bf655bc8039c246ec8a647eb1859666fac9;p=thirdparty%2Fsuricata.git app-layer: remove old MPMId API calls Had been deprecated and non-functional since 2017. --- diff --git a/rust/src/applayer.rs b/rust/src/applayer.rs index 48586e7cd7..367ebb4deb 100644 --- a/rust/src/applayer.rs +++ b/rust/src/applayer.rs @@ -158,11 +158,6 @@ pub struct RustParser { /// Function to free local storage pub localstorage_free: Option, - /// Function to get transaction MPM ID - pub get_tx_mpm_id: Option, - /// Function to set transaction MPM ID - pub set_tx_mpm_id: Option, - /// Function to get files pub get_files: Option, @@ -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, diff --git a/rust/src/applayertemplate/template.rs b/rust/src/applayertemplate/template.rs index 93df4b3400..cd5cae3358 100644 --- a/rust/src/applayertemplate/template.rs +++ b/rust/src/applayertemplate/template.rs @@ -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, diff --git a/rust/src/dhcp/dhcp.rs b/rust/src/dhcp/dhcp.rs index 77eff829fc..830d7a6d79 100644 --- a/rust/src/dhcp/dhcp.rs +++ b/rust/src/dhcp/dhcp.rs @@ -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, diff --git a/rust/src/dns/dns.rs b/rust/src/dns/dns.rs index 837bad1f04..6f2412f36b 100644 --- a/rust/src/dns/dns.rs +++ b/rust/src/dns/dns.rs @@ -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), diff --git a/rust/src/ikev2/ikev2.rs b/rust/src/ikev2/ikev2.rs index 2e8864af67..435db8f246 100644 --- a/rust/src/ikev2/ikev2.rs +++ b/rust/src/ikev2/ikev2.rs @@ -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, diff --git a/rust/src/krb/krb5.rs b/rust/src/krb/krb5.rs index 8ed7c5ba3b..69ada42866 100644 --- a/rust/src/krb/krb5.rs +++ b/rust/src/krb/krb5.rs @@ -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), diff --git a/rust/src/ntp/ntp.rs b/rust/src/ntp/ntp.rs index 7811d78da5..a076ce094e 100644 --- a/rust/src/ntp/ntp.rs +++ b/rust/src/ntp/ntp.rs @@ -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, diff --git a/rust/src/rdp/rdp.rs b/rust/src/rdp/rdp.rs index 603504c82a..f719f492fc 100644 --- a/rust/src/rdp/rdp.rs +++ b/rust/src/rdp/rdp.rs @@ -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, diff --git a/rust/src/rfb/rfb.rs b/rust/src/rfb/rfb.rs index f783d41dcf..73480564eb 100644 --- a/rust/src/rfb/rfb.rs +++ b/rust/src/rfb/rfb.rs @@ -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), diff --git a/rust/src/sip/sip.rs b/rust/src/sip/sip.rs index f3d3657090..87dde30901 100755 --- a/rust/src/sip/sip.rs +++ b/rust/src/sip/sip.rs @@ -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, diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index fc59644e66..0040f50f44 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -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), diff --git a/rust/src/ssh/ssh.rs b/rust/src/ssh/ssh.rs index a26ae0d1cd..f12cb99f34 100644 --- a/rust/src/ssh/ssh.rs +++ b/rust/src/ssh/ssh.rs @@ -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), diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index f160fd1061..2b4b6630a5 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -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)) { diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index b43e87da07..36161cd0ea 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -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)); diff --git a/src/app-layer-register.c b/src/app-layer-register.c index 17691d26ac..88799e73a7 100644 --- a/src/app-layer-register.c +++ b/src/app-layer-register.c @@ -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); diff --git a/src/app-layer-register.h b/src/app-layer-register.h index fbba2f3303..7e90a4f061 100644 --- a/src/app-layer-register.h +++ b/src/app-layer-register.h @@ -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,