From: Victor Julien Date: Sun, 7 Jun 2020 19:29:43 +0000 (+0200) Subject: app-layer: remove unused detect flags API X-Git-Tag: suricata-6.0.0-beta1~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dd4d948d98387de95c1fef14169d96493b2fce9;p=thirdparty%2Fsuricata.git app-layer: remove unused detect flags API --- diff --git a/rust/src/applayer.rs b/rust/src/applayer.rs index b1a6fc9e60..9ea23a3db7 100644 --- a/rust/src/applayer.rs +++ b/rust/src/applayer.rs @@ -221,12 +221,6 @@ pub struct RustParser { /// Function to get the TX iterator pub get_tx_iterator: Option, - // Function to set TX detect flags. - pub set_tx_detect_flags: Option, - - // Function to get TX detect flags. - pub get_tx_detect_flags: Option, - pub get_tx_data: GetTxDataFn, // Function to apply config to a TX. Optional. Normal (bidirectional) @@ -281,8 +275,6 @@ pub type GetTxIteratorFn = extern "C" fn (ipproto: u8, alproto: AppProto, 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); pub type GetTxDataFn = unsafe extern "C" fn(*mut c_void) -> *mut AppLayerTxData; pub type ApplyTxConfigFn = unsafe extern "C" fn (*mut c_void, *mut c_void, c_int, AppLayerTxConfig); @@ -318,12 +310,6 @@ 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, - ); pub fn AppLayerParserRegisterOptionFlags(ipproto: u8, alproto: AppProto, flags: u32); } diff --git a/rust/src/applayertemplate/template.rs b/rust/src/applayertemplate/template.rs index 33c4da128b..e356d3364a 100644 --- a/rust/src/applayertemplate/template.rs +++ b/rust/src/applayertemplate/template.rs @@ -516,8 +516,6 @@ pub unsafe extern "C" fn rs_template_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: Some(rs_template_state_get_tx_iterator), - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data: rs_template_get_tx_data, apply_tx_config: None, }; diff --git a/rust/src/dhcp/dhcp.rs b/rust/src/dhcp/dhcp.rs index 27750c60a4..697cae680d 100644 --- a/rust/src/dhcp/dhcp.rs +++ b/rust/src/dhcp/dhcp.rs @@ -435,8 +435,6 @@ pub unsafe extern "C" fn rs_dhcp_register_parser() { localstorage_free : None, get_files : None, get_tx_iterator : Some(rs_dhcp_state_get_tx_iterator), - set_tx_detect_flags: None, - get_tx_detect_flags: None, get_tx_data : rs_dhcp_get_tx_data, apply_tx_config : None, }; diff --git a/rust/src/dns/dns.rs b/rust/src/dns/dns.rs index 1c721ae5eb..e0fa1ce125 100644 --- a/rust/src/dns/dns.rs +++ b/rust/src/dns/dns.rs @@ -976,8 +976,6 @@ pub unsafe extern "C" fn rs_dns_udp_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_de_state: rs_dns_state_get_tx_detect_state, set_de_state: rs_dns_state_set_tx_detect_state, get_tx_data: rs_dns_state_get_tx_data, @@ -1021,8 +1019,6 @@ pub unsafe extern "C" fn rs_dns_tcp_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_de_state: rs_dns_state_get_tx_detect_state, set_de_state: rs_dns_state_set_tx_detect_state, get_tx_data: rs_dns_state_get_tx_data, diff --git a/rust/src/ikev2/ikev2.rs b/rust/src/ikev2/ikev2.rs index a51d00f949..25af1dc6e9 100644 --- a/rust/src/ikev2/ikev2.rs +++ b/rust/src/ikev2/ikev2.rs @@ -710,8 +710,6 @@ pub unsafe extern "C" fn rs_register_ikev2_parser() { localstorage_free : None, get_files : None, get_tx_iterator : None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data : rs_ikev2_get_tx_data, apply_tx_config : None, }; diff --git a/rust/src/krb/krb5.rs b/rust/src/krb/krb5.rs index 499029189f..dd85db5daa 100644 --- a/rust/src/krb/krb5.rs +++ b/rust/src/krb/krb5.rs @@ -656,8 +656,6 @@ pub unsafe extern "C" fn rs_register_krb5_parser() { localstorage_free : None, get_files : None, get_tx_iterator : None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data : rs_krb5_get_tx_data, apply_tx_config : None, }; diff --git a/rust/src/ntp/ntp.rs b/rust/src/ntp/ntp.rs index 405efab0ef..e045807548 100644 --- a/rust/src/ntp/ntp.rs +++ b/rust/src/ntp/ntp.rs @@ -406,8 +406,6 @@ pub unsafe extern "C" fn rs_register_ntp_parser() { localstorage_free : None, get_files : None, get_tx_iterator : None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data : rs_ntp_get_tx_data, apply_tx_config : None, }; diff --git a/rust/src/rdp/rdp.rs b/rust/src/rdp/rdp.rs index 147aa6a3e2..3b0c66e9eb 100644 --- a/rust/src/rdp/rdp.rs +++ b/rust/src/rdp/rdp.rs @@ -532,8 +532,6 @@ pub unsafe extern "C" fn rs_rdp_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data: rs_rdp_get_tx_data, apply_tx_config: None, }; diff --git a/rust/src/rfb/rfb.rs b/rust/src/rfb/rfb.rs index bc3424c9f2..77c2388d76 100644 --- a/rust/src/rfb/rfb.rs +++ b/rust/src/rfb/rfb.rs @@ -698,8 +698,6 @@ pub unsafe extern "C" fn rs_rfb_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: Some(rs_rfb_state_get_tx_iterator), - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data: rs_rfb_get_tx_data, apply_tx_config: None, }; diff --git a/rust/src/sip/sip.rs b/rust/src/sip/sip.rs index 3c4563d674..3d4be29112 100755 --- a/rust/src/sip/sip.rs +++ b/rust/src/sip/sip.rs @@ -391,8 +391,6 @@ pub unsafe extern "C" fn rs_sip_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data: rs_sip_get_tx_data, apply_tx_config: None, }; diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index 55a7f2c73c..bb07c5a27a 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -584,8 +584,6 @@ pub unsafe extern "C" fn rs_register_snmp_parser() { localstorage_free : None, get_files : None, get_tx_iterator : None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data : rs_snmp_get_tx_data, apply_tx_config : None, }; diff --git a/rust/src/ssh/ssh.rs b/rust/src/ssh/ssh.rs index 55b71b317e..a801cd61e8 100644 --- a/rust/src/ssh/ssh.rs +++ b/rust/src/ssh/ssh.rs @@ -558,8 +558,6 @@ pub unsafe extern "C" fn rs_ssh_register_parser() { localstorage_free: None, get_files: None, get_tx_iterator: None, - get_tx_detect_flags: None, - set_tx_detect_flags: None, get_tx_data: rs_ssh_get_tx_data, apply_tx_config: None, }; diff --git a/src/app-layer-register.h b/src/app-layer-register.h index 9317e57b4b..41f1d460c2 100644 --- a/src/app-layer-register.h +++ b/src/app-layer-register.h @@ -66,9 +66,6 @@ typedef struct AppLayerParser { const AppProto alproto, void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, AppLayerGetTxIterState *istate); - void (*SetTxDetectFlags)(void *, uint8_t, uint64_t); - uint64_t (*GetTxDetectFlags)(void *, uint8_t); - AppLayerTxData *(*GetTxData)(void *tx); bool (*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig); } AppLayerParser;