]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
app-layer: remove old MPMId API calls
authorVictor Julien <victor@inliniac.net>
Tue, 26 May 2020 08:35:34 +0000 (10:35 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 9 Jun 2020 11:29:04 +0000 (13:29 +0200)
Had been deprecated and non-functional since 2017.

16 files changed:
rust/src/applayer.rs
rust/src/applayertemplate/template.rs
rust/src/dhcp/dhcp.rs
rust/src/dns/dns.rs
rust/src/ikev2/ikev2.rs
rust/src/krb/krb5.rs
rust/src/ntp/ntp.rs
rust/src/rdp/rdp.rs
rust/src/rfb/rfb.rs
rust/src/sip/sip.rs
rust/src/snmp/snmp.rs
rust/src/ssh/ssh.rs
src/app-layer-parser.c
src/app-layer-parser.h
src/app-layer-register.c
src/app-layer-register.h

index 48586e7cd75aea78173817e6a6bc767f1702f043..367ebb4deb45574f1ba7df9a8796b430a8b7d6a5 100644 (file)
@@ -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,
index 93df4b34004c45fba1f499a1b30279b3c8b615d1..cd5cae335844a2daafa7f2f06597300201e1e365 100644 (file)
@@ -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,
index 77eff829fc8de60bf76f22115a5649f5a498e5c3..830d7a6d790181667eb74cb747153e37f13b64e2 100644 (file)
@@ -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,
index 837bad1f041af9150bcfaa07fb10ee1ee58295b6..6f2412f36b32d657bf6f42a0f8f79c4a5744bd66 100644 (file)
@@ -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),
index 2e8864af677ec24c1a1888ed5eeae0a1168483ba..435db8f246c14ac4610b7cd5629eed114b326515 100644 (file)
@@ -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,
index 8ed7c5ba3badc90da21e5b6e051ac92d5eaf45af..69ada428661c0c006ca4bbf1d028f2eedf0bdac8 100644 (file)
@@ -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),
index 7811d78da50c0f6a9845577937d7f1eaeb022bbf..a076ce094e0bfc1a9ba9bc15eb7f6661f7cf4782 100644 (file)
@@ -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,
index 603504c82a894fa0a16d16ea802e10eefdeefad5..f719f492fccc7773728a0a0e4c9b43ef5eca0916 100644 (file)
@@ -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,
index f783d41dcfea0fe250a07562328751e9e28e5b1b..73480564eb4b20d35f0a9998e21c216b0b033a34 100644 (file)
@@ -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),
index f3d36570903e8b422fbf5aaded8a1a066c09ae77..87dde309016d47349637c03e0b03c460d3472351 100755 (executable)
@@ -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,
index fc59644e66c89844ca6a5215d530eb9ec04f3e4a..0040f50f443066fabaf44db479dbe3bdffd95308 100644 (file)
@@ -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),
index a26ae0d1cd630332c4000d556084224b8c2bc2c3..f12cb99f34bcba124cf8965ef644187eb27d3f12 100644 (file)
@@ -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),
index f160fd106104d5f9dc27ef165a948393f9be11a0..2b4b6630a56c5be6e8a5bce2e3b9154571e0fa02 100644 (file)
@@ -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))
 {
index b43e87da07a5b806fe7ca563bd41d74b7efd46e8..36161cd0ea8b4f573da16764bf4e97fb06239d57 100644 (file)
@@ -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));
index 17691d26ac9355522e11d3699e8eb007dff1aa56..88799e73a7353ea013aae90d96e9ef08c7175184 100644 (file)
@@ -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);
index fbba2f3303b637ebe3c7c897110ec50e7935b395..7e90a4f0615926935a591b74a5276e2c4ba453b9 100644 (file)
@@ -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,