]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: remove has events callback - not used
authorJason Ish <ish@unx.ca>
Mon, 12 Feb 2018 19:43:59 +0000 (13:43 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 14 Feb 2018 13:25:46 +0000 (14:25 +0100)
23 files changed:
rust/src/dns/dns.rs
rust/src/nfs/nfs.rs
rust/src/ntp/ntp.rs
rust/src/parser.rs
src/app-layer-dnp3.c
src/app-layer-dns-common.c
src/app-layer-dns-common.h
src/app-layer-dns-tcp-rust.c
src/app-layer-dns-tcp.c
src/app-layer-dns-udp-rust.c
src/app-layer-dns-udp.c
src/app-layer-enip.c
src/app-layer-htp.c
src/app-layer-modbus.c
src/app-layer-nfs-tcp.c
src/app-layer-nfs-udp.c
src/app-layer-parser.c
src/app-layer-parser.h
src/app-layer-register.c
src/app-layer-register.h
src/app-layer-ssl.c
src/app-layer-template.c
src/app-layer-tftp.c

index c26bfce24cc7cbe2fe420b11b14710f9447cc03c..26fc45a85e55c9551046ef145492be5a464720d2 100644 (file)
@@ -748,14 +748,6 @@ pub extern "C" fn rs_dns_state_get_tx_detect_state(
     }
 }
 
-#[no_mangle]
-pub extern "C" fn rs_dns_state_has_events(state: &mut DNSState) -> u8 {
-    if state.events > 0 {
-        return 1;
-    }
-    return 0;
-}
-
 #[no_mangle]
 pub extern "C" fn rs_dns_state_get_events(state: &mut DNSState,
                                           tx_id: libc::uint64_t)
index 8ce20bc62f81a91c363b749673dedc1c5fa40597..d36e32a8af0448db0e13a517cc3793d3d64e861b 100644 (file)
@@ -1975,14 +1975,6 @@ pub extern "C" fn rs_nfs_tx_get_detect_flags(
     }
 }
 
-#[no_mangle]
-pub extern "C" fn rs_nfs_state_has_events(state: &mut NFSState) -> u8 {
-    if state.events > 0 {
-        return 1;
-    }
-    return 0;
-}
-
 #[no_mangle]
 pub extern "C" fn rs_nfs_state_get_events(state: &mut NFSState,
                                           tx_id: libc::uint64_t)
index 10a69ed93fd64af553101ddeeb82597e64c2e219..38c665030765ec11b8fd2a6383a727faca778d23 100644 (file)
@@ -301,15 +301,6 @@ pub extern "C" fn rs_ntp_state_get_tx_detect_state(
 }
 
 
-#[no_mangle]
-pub extern "C" fn rs_ntp_state_has_events(state: *mut libc::c_void) -> libc::c_int {
-    let state = cast_pointer!(state,NTPState);
-    if state.events > 0 {
-        return 1;
-    }
-    return 0;
-}
-
 #[no_mangle]
 pub extern "C" fn rs_ntp_state_get_events(state: *mut libc::c_void,
                                           tx_id: libc::uint64_t)
@@ -396,7 +387,6 @@ pub unsafe extern "C" fn rs_register_ntp_parser() {
         set_tx_logged     : None,
         get_de_state      : rs_ntp_state_get_tx_detect_state,
         set_de_state      : rs_ntp_state_set_tx_detect_state,
-        has_events        : Some(rs_ntp_state_has_events),
         get_events        : Some(rs_ntp_state_get_events),
         get_eventinfo     : Some(rs_ntp_state_get_event_info),
         localstorage_new  : None,
index a842333bd42fd32eb320c3a89d27f32eab1a97eb..8ac513408a12bfb3a0f7d7cbf2c864852adfc6ce 100644 (file)
@@ -77,8 +77,6 @@ pub struct RustParser {
     /// Function called to set a detection state
     pub set_de_state:      SetDetectStateFn,
 
-    /// Function to check if there are events
-    pub has_events:        Option<HasEventsFn>,
     /// Function to get events
     pub get_events:        Option<GetEventsFn>,
     /// Function to get an event description
@@ -135,7 +133,6 @@ pub type GetDetectStateFn   = extern "C" fn (*mut c_void) -> *mut DetectEngineSt
 pub type SetDetectStateFn   = extern "C" fn (*mut c_void, &mut DetectEngineState) -> c_int;
 pub type GetEventInfoFn     = extern "C" fn (*const c_char, *mut c_int, *mut AppLayerEventType) -> c_int;
 pub type GetEventsFn        = extern "C" fn (*mut c_void, u64) -> *mut AppLayerDecoderEvents;
-pub type HasEventsFn        = extern "C" fn (*mut c_void) -> c_int;
 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;
index 9df2aaba3bf04baa2cd205fffe3531d87fdd01ff..c791fa78029ee891d002a6811e4c90584bd77427 100644 (file)
@@ -1325,13 +1325,6 @@ static AppLayerDecoderEvents *DNP3GetEvents(void *state, uint64_t tx_id)
     return NULL;
 }
 
-static int DNP3HasEvents(void *state)
-{
-    SCEnter();
-    uint16_t events = (((DNP3State *)state)->events);
-    SCReturnInt((events > 0));
-}
-
 static void *DNP3GetTx(void *alstate, uint64_t tx_id)
 {
     SCEnter();
@@ -1620,8 +1613,6 @@ void RegisterDNP3Parsers(void)
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_DNP3,
             DNP3GetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_DNP3,
-            DNP3HasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_DNP3,
             DNP3GetTxDetectState, DNP3SetTxDetectState);
 
@@ -2130,7 +2121,6 @@ static int DNP3ParserTestRequestResponse(void)
 
     state = flow.alstate;
     FAIL_IF(state == NULL);
-    FAIL_IF(DNP3HasEvents(state));
 
     DNP3Transaction *tx = DNP3GetTx(state, 0);
     FAIL_IF(tx == NULL);
@@ -2198,7 +2188,6 @@ static int DNP3ParserTestUnsolicitedResponseConfirm(void)
 
     state = flow.alstate;
     FAIL_IF(state == NULL);
-    FAIL_IF(DNP3HasEvents(state));
 
     DNP3Transaction *tx = DNP3GetTx(state, 0);
     FAIL_IF(tx == NULL);
@@ -2265,7 +2254,6 @@ static int DNP3ParserTestFlooded(void)
 
     state = flow.alstate;
     FAIL_IF(state == NULL);
-    FAIL_IF(DNP3HasEvents(state));
 
     DNP3Transaction *tx = DNP3GetTx(state, 0);
     FAIL_IF(tx == NULL);
@@ -2554,7 +2542,6 @@ static int DNP3ParserDecodeG70V3Test(void)
     FAIL_IF_NULL(dnp3state);
     int bytes = DNP3HandleRequestLinkLayer(dnp3state, pkt, sizeof(pkt));
     FAIL_IF(bytes != sizeof(pkt));
-    FAIL_IF(DNP3HasEvents(dnp3state));
     DNP3Transaction *tx = DNP3GetTx(dnp3state, 0);
     FAIL_IF_NULL(tx);
     FAIL_IF_NOT(tx->has_request);
@@ -2617,9 +2604,6 @@ static int DNP3ParserUnknownEventAlertTest(void)
     int bytes = DNP3HandleRequestLinkLayer(dnp3state, pkt, sizeof(pkt));
     FAIL_IF(bytes != sizeof(pkt));
 
-    /* Should have an event now. */
-    FAIL_IF_NOT(DNP3HasEvents(dnp3state));
-
     DNP3StateFree(dnp3state);
     PASS;
 }
index ada8a0b43602b627854f61b2f7006ef40f766d8c..e52680631bd55ca1dd3ceef2f9a9aad76ef1e15a 100644 (file)
@@ -172,12 +172,6 @@ AppLayerDecoderEvents *DNSGetEvents(void *state, uint64_t id)
     return NULL;
 }
 
-int DNSHasEvents(void *state)
-{
-    DNSState *dns_state = (DNSState *)state;
-    return (dns_state->events > 0);
-}
-
 void *DNSGetTx(void *alstate, uint64_t tx_id)
 {
     DNSState *dns_state = (DNSState *)alstate;
index f63407e0e4f91f9d477e41333718875b2d9f939f..699e99a92eb7acc3464a8e9df5a56e451ed106f2 100644 (file)
@@ -286,7 +286,6 @@ void DNSSetEvent(DNSState *s, uint8_t e);
 void *DNSStateAlloc(void);
 void DNSStateFree(void *s);
 AppLayerDecoderEvents *DNSGetEvents(void *state, uint64_t id);
-int DNSHasEvents(void *state);
 
 int DNSValidateRequestHeader(DNSState *, const DNSHeader *dns_header);
 int DNSValidateResponseHeader(DNSState *, const DNSHeader *dns_header);
index 2a524b9eee562c5b7e1f2c52247a28608e8db310..fa220e5ae35145dd38987695e1ce7913825d417c 100644 (file)
@@ -110,11 +110,6 @@ static int RustDNSSetTxDetectState(void *tx,
     return 0;
 }
 
-static int RustDNSHasEvents(void *state)
-{
-    return rs_dns_state_has_events(state);
-}
-
 static AppLayerDecoderEvents *RustDNSGetEvents(void *state, uint64_t id)
 {
     return rs_dns_state_get_events(state, id);
@@ -163,8 +158,6 @@ void RegisterRustDNSTCPParsers(void)
                 RustDNSStateTransactionFree);
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_DNS,
                 RustDNSGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_DNS,
-                RustDNSHasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_DNS,
                 RustDNSGetTxDetectState, RustDNSSetTxDetectState);
         AppLayerParserRegisterGetTx(IPPROTO_TCP, ALPROTO_DNS, RustDNSGetTx);
index 0f513cf9cc0ee5be0cb8f8ae7b2e9e73febf3d8b..74f44012d3e165a1cb47290a8ef86ca77ca41b96 100644 (file)
@@ -748,7 +748,6 @@ void RegisterDNSTCPParsers(void)
                                          DNSStateTransactionFree);
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_DNS, DNSGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_DNS, DNSHasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_DNS,
                                                DNSGetTxDetectState, DNSSetTxDetectState);
         AppLayerParserRegisterDetectFlagsFuncs(IPPROTO_TCP, ALPROTO_DNS,
index 25aa22595e321cb822fc4163a2af516e13082b26..5c95fb5d3105301d578b41a7cf813ea8d4338be5 100644 (file)
@@ -116,12 +116,6 @@ static uint64_t RustDNSGetDetectFlags(void *tx, uint8_t dir)
     return rs_dns_tx_get_detect_flags(tx, dir);
 }
 
-
-static int RustDNSHasEvents(void *state)
-{
-    return rs_dns_state_has_events(state);
-}
-
 static AppLayerDecoderEvents *RustDNSGetEvents(void *state, uint64_t id)
 {
     return rs_dns_state_get_events(state, id);
@@ -172,8 +166,6 @@ void RegisterRustDNSUDPParsers(void)
                 RustDNSStateTransactionFree);
         AppLayerParserRegisterGetEventsFunc(IPPROTO_UDP, ALPROTO_DNS,
                 RustDNSGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_UDP, ALPROTO_DNS,
-                RustDNSHasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_UDP, ALPROTO_DNS,
                 RustDNSGetTxDetectState, RustDNSSetTxDetectState);
         AppLayerParserRegisterDetectFlagsFuncs(IPPROTO_UDP, ALPROTO_DNS,
index 49ebf6d49159cc47f539532f6fdc6b1d81285dd7..1676dca570fb2e635d7ddf867ff36e9bba29669c 100644 (file)
@@ -441,7 +441,6 @@ void RegisterDNSUDPParsers(void)
                                          DNSStateTransactionFree);
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_UDP, ALPROTO_DNS, DNSGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_UDP, ALPROTO_DNS, DNSHasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_UDP, ALPROTO_DNS,
                                                DNSGetTxDetectState, DNSSetTxDetectState);
         AppLayerParserRegisterDetectFlagsFuncs(IPPROTO_UDP, ALPROTO_DNS,
index 3d4ebcca4445a1857a899ade5729b0c03146ca70..ca23ad052a22a0976ba7c867d4aa83d24fe5e561 100644 (file)
@@ -128,11 +128,6 @@ static AppLayerDecoderEvents *ENIPGetEvents(void *state, uint64_t id)
     return NULL;
 }
 
-static int ENIPHasEvents(void *state)
-{
-    return (((ENIPState *) state)->events > 0);
-}
-
 static int ENIPStateGetEventInfo(const char *event_name, int *event_id, AppLayerEventType *event_type)
 {
     *event_id = SCMapEnumNameToValue(event_name, enip_decoder_event_table);
@@ -433,7 +428,6 @@ void RegisterENIPUDPParsers(void)
                 ENIPStateAlloc, ENIPStateFree);
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_UDP, ALPROTO_ENIP, ENIPGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_UDP, ALPROTO_ENIP, ENIPHasEvents);
 
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_UDP, ALPROTO_ENIP,
                 ENIPGetTxDetectState, ENIPSetTxDetectState);
@@ -513,7 +507,6 @@ void RegisterENIPTCPParsers(void)
                 ENIPStateAlloc, ENIPStateFree);
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_ENIP, ENIPGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_ENIP, ENIPHasEvents);
 
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_ENIP,
                 ENIPGetTxDetectState, ENIPSetTxDetectState);
index 44c8c7181ba93500e7f1ee0c15250864ca2f663a..a697dbfa25facf32468f18f0651264cfa685b2a5 100644 (file)
@@ -257,12 +257,6 @@ static void HTPSetEvent(HtpState *s, HtpTxUserData *htud, uint8_t e)
     SCLogDebug("couldn't set event %u", e);
 }
 
-static int HTPHasEvents(void *state)
-{
-    HtpState *htp_state = (HtpState *)state;
-    return (htp_state->events > 0);
-}
-
 static AppLayerDecoderEvents *HTPGetEvents(void *state, uint64_t tx_id)
 {
     SCLogDebug("get HTTP events for TX %"PRIu64, tx_id);
@@ -2857,7 +2851,6 @@ void RegisterHTPParsers(void)
                                           HTPStateSetTxLogged);
         AppLayerParserRegisterGetStateProgressCompletionStatus(ALPROTO_HTTP,
                                                                HTPStateGetAlstateProgressCompletionStatus);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_HTTP, HTPHasEvents);
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_HTTP, HTPGetEvents);
         AppLayerParserRegisterGetEventInfo(IPPROTO_TCP, ALPROTO_HTTP, HTPStateGetEventInfo);
 
index 3bf2e25f489bcbbfefcdae958fefa8fa17af1b50..51ada113f74cc6990eb0aadf75477fc9d97c3c2e 100644 (file)
@@ -214,11 +214,6 @@ static AppLayerDecoderEvents *ModbusGetEvents(void *state, uint64_t id)
     return NULL;
 }
 
-static int ModbusHasEvents(void *state)
-{
-    return (((ModbusState *) state)->events > 0);
-}
-
 static int ModbusGetAlstateProgress(void *modbus_tx, uint8_t direction)
 {
     ModbusTransaction   *tx     = (ModbusTransaction *) modbus_tx;
@@ -1526,7 +1521,6 @@ void RegisterModbusParsers(void)
         AppLayerParserRegisterStateFuncs(IPPROTO_TCP, ALPROTO_MODBUS, ModbusStateAlloc, ModbusStateFree);
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_MODBUS, ModbusGetEvents);
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_MODBUS, ModbusHasEvents);
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_MODBUS,
                                                ModbusGetTxDetectState, ModbusSetTxDetectState);
 
index a1242a318788e31393bd4c4d30a561c82c7c2a9a..f27dc4777f914336f7979b5903cba1e88ac8e3a7 100644 (file)
@@ -101,11 +101,6 @@ static int NFSTCPStateGetEventInfo(const char *event_name, int *event_id,
     return rs_nfs_state_get_event_info(event_name, event_id, event_type);
 }
 
-static int NFSTCPHasEvents(void *state)
-{
-    return rs_nfs_state_has_events(state);
-}
-
 static AppLayerDecoderEvents *NFSTCPGetEvents(void *state, uint64_t id)
 {
     return rs_nfs_state_get_events(state, id);
@@ -360,10 +355,6 @@ void RegisterNFSTCPParsers(void)
 
         AppLayerParserRegisterGetFilesFunc(IPPROTO_TCP, ALPROTO_NFS, NFSTCPGetFiles);
 
-        /* Application layer event handling. */
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_NFS,
-                NFSTCPHasEvents);
-
         /* What is this being registered for? */
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_NFS,
             NFSTCPGetTxDetectState, NFSTCPSetTxDetectState);
index ae2ec8fe49e0162e97f3f00f2b3de59a96af0d06..4b5ee21636df07679fc396152ac91527d133579c 100644 (file)
@@ -98,11 +98,6 @@ static int NFSStateGetEventInfo(const char *event_name, int *event_id,
     return rs_nfs_state_get_event_info(event_name, event_id, event_type);
 }
 
-static int NFSHasEvents(void *state)
-{
-    return rs_nfs_state_has_events(state);
-}
-
 static AppLayerDecoderEvents *NFSGetEvents(void *state, uint64_t id)
 {
     return rs_nfs_state_get_events(state, id);
@@ -353,10 +348,6 @@ void RegisterNFSUDPParsers(void)
 
         AppLayerParserRegisterGetFilesFunc(IPPROTO_UDP, ALPROTO_NFS, NFSGetFiles);
 
-        /* Application layer event handling. */
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_UDP, ALPROTO_NFS,
-            NFSHasEvents);
-
         /* What is this being registered for? */
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_UDP, ALPROTO_NFS,
             NFSGetTxDetectState, NFSSetTxDetectState);
index b9dbe3e940586c802599aa1acd7ac70778fcfe01..ef054e49395c12ee6e9023e46b153e0d7874d245 100644 (file)
@@ -100,7 +100,6 @@ typedef struct AppLayerParserProtoCtx_
     void (*Truncate)(void *, uint8_t);
     FileContainer *(*StateGetFiles)(void *, uint8_t);
     AppLayerDecoderEvents *(*StateGetEvents)(void *, uint64_t);
-    int (*StateHasEvents)(void *);
 
     int (*StateGetProgress)(void *alstate, uint8_t direction);
     uint64_t (*StateGetTxCnt)(void *alstate);
@@ -420,17 +419,6 @@ void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto alproto,
     SCReturn;
 }
 
-void AppLayerParserRegisterHasEventsFunc(uint8_t ipproto, AppProto alproto,
-                              int (*StateHasEvents)(void *))
-{
-    SCEnter();
-
-    alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateHasEvents =
-        StateHasEvents;
-
-    SCReturn;
-}
-
 void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto,
                            LoggerId (*StateGetTxLogged)(void *, void *),
                            void (*StateSetTxLogged)(void *, void *, LoggerId))
@@ -1370,7 +1358,7 @@ static void ValidateParserProtoDump(AppProto alproto, uint8_t ipproto)
     printf("Optional:\n");
     printf("- LocalStorageAlloc %p LocalStorageFree %p\n", ctx->LocalStorageAlloc, ctx->LocalStorageFree);
     printf("- StateGetTxLogged %p StateSetTxLogged %p\n", ctx->StateGetTxLogged, ctx->StateSetTxLogged);
-    printf("- StateGetEvents %p StateHasEvents %p StateGetEventInfo %p\n", ctx->StateGetEvents, ctx->StateHasEvents, ctx->StateGetEventInfo);
+    printf("- StateGetEvents %p StateGetEventInfo %p\n", ctx->StateGetEvents, ctx->StateGetEventInfo);
 }
 
 #define BOTH_SET(a, b) ((a) != NULL && (b) != NULL)
index 5511fa0a105bbf10849e9ceb739eb717680f60b2..9530f594ac6ab6299b7d7d7042b8a0cb9482fbbc 100644 (file)
@@ -137,8 +137,6 @@ void AppLayerParserRegisterGetFilesFunc(uint8_t ipproto, AppProto alproto,
                              FileContainer *(*StateGetFiles)(void *, uint8_t));
 void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto proto,
     AppLayerDecoderEvents *(*StateGetEvents)(void *, uint64_t));
-void AppLayerParserRegisterHasEventsFunc(uint8_t ipproto, AppProto alproto,
-                              int (*StateHasEvents)(void *));
 void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto,
                          LoggerId (*StateGetTxLogged)(void *, void *),
                          void (*StateSetTxLogged)(void *, void *, LoggerId));
index 1c59a79037cf6f987799bba2680761f6ee04523d..2f21709e3b481aab9f45f0b875183e97e2067196 100644 (file)
@@ -137,12 +137,6 @@ int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
                 p->StateGetTxLogged, p->StateSetTxLogged);
     }
 
-    /* Application layer event handling. */
-    if (p->StateHasEvents) {
-        AppLayerParserRegisterHasEventsFunc(p->ip_proto, alproto,
-                p->StateHasEvents);
-    }
-
     /* What is this being registered for? */
     AppLayerParserRegisterDetectStateFuncs(p->ip_proto, alproto,
         p->GetTxDetectState, p->SetTxDetectState);
index c8626da45e8dd519a156c59ff5e4bf3046237aa3..872dca7a920e8aed5c3d608aae928971e517aee6 100644 (file)
@@ -54,7 +54,6 @@ typedef struct AppLayerParser {
     DetectEngineState *(*GetTxDetectState)(void *tx);
     int (*SetTxDetectState)(void *tx, DetectEngineState *);
 
-    int (*StateHasEvents)(void *);
     AppLayerDecoderEvents *(*StateGetEvents)(void *, uint64_t);
     int (*StateGetEventInfo)(const char *event_name,
                              int *event_id, AppLayerEventType *event_type);
index ea3aa86a79ca7268cf7da424839e611fe213413b..8ab41cd042eb25a02c10c4cf08d36dbb02fd0d79 100644 (file)
@@ -158,12 +158,6 @@ static AppLayerDecoderEvents *SSLGetEvents(void *state, uint64_t id)
     return ssl_state->decoder_events;
 }
 
-static int SSLHasEvents(void *state)
-{
-    SSLState *ssl_state = (SSLState *)state;
-    return (ssl_state->events > 0);
-}
-
 static int SSLSetTxDetectState(void *vtx, DetectEngineState *de_state)
 {
     SSLState *ssl_state = (SSLState *)vtx;
@@ -1851,8 +1845,6 @@ void RegisterSSLParsers(void)
 
         AppLayerParserRegisterGetEventsFunc(IPPROTO_TCP, ALPROTO_TLS, SSLGetEvents);
 
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_TLS, SSLHasEvents);
-
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_TLS,
                                                SSLGetTxDetectState, SSLSetTxDetectState);
 
index 490e683526060471edca175bcde7511ef60126c1..8cb0c2b244beb4cbedc3f78beb6be46de24eabd7 100644 (file)
@@ -189,12 +189,6 @@ static AppLayerDecoderEvents *TemplateGetEvents(void *state, uint64_t tx_id)
     return NULL;
 }
 
-static int TemplateHasEvents(void *state)
-{
-    TemplateState *echo = state;
-    return echo->events;
-}
-
 /**
  * \brief Probe the input to see if it looks like echo.
  *
@@ -535,10 +529,6 @@ void RegisterTemplateParsers(void)
         AppLayerParserRegisterGetTx(IPPROTO_TCP, ALPROTO_TEMPLATE,
             TemplateGetTx);
 
-        /* Application layer event handling. */
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_TCP, ALPROTO_TEMPLATE,
-            TemplateHasEvents);
-
         /* What is this being registered for? */
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_TCP, ALPROTO_TEMPLATE,
             TemplateGetTxDetectState, TemplateSetTxDetectState);
index 3340a25f198f7f5dda2079ae3da2eda99131667a..f51ac4956964bc367316ec0e8d3597f6aa82b0eb 100644 (file)
@@ -106,11 +106,6 @@ static AppLayerDecoderEvents *TFTPGetEvents(void *state, uint64_t tx_id)
     return NULL;
 }
 
-static int TFTPHasEvents(void *state)
-{
-    return rs_tftp_has_event(state);
-}
-
 /**
  * \brief Probe the input to see if it looks like echo.
  *
@@ -295,10 +290,6 @@ void RegisterTFTPParsers(void)
         AppLayerParserRegisterGetTx(IPPROTO_UDP, ALPROTO_TFTP,
                                     TFTPGetTx);
 
-        /* Application layer event handling. */
-        AppLayerParserRegisterHasEventsFunc(IPPROTO_UDP, ALPROTO_TFTP,
-                                            TFTPHasEvents);
-
         /* What is this being registered for? */
         AppLayerParserRegisterDetectStateFuncs(IPPROTO_UDP, ALPROTO_TFTP,
                                                TFTPGetTxDetectState,