]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tftp: c glue code cleanup
authorVictor Julien <victor@inliniac.net>
Thu, 30 May 2019 19:54:28 +0000 (21:54 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 30 May 2019 19:54:28 +0000 (21:54 +0200)
src/app-layer-tftp.c
src/app-layer-tftp.h

index 737205c47b94e75a28db7e8b2496173fa4009204..22ce1d2992023949a604bc5b35c360b465f58d2a 100644 (file)
 
 #include "app-layer-tftp.h"
 
-#ifndef HAVE_RUST
-
-void RegisterTFTPParsers(void)
-{
-}
-
-#else
-
 #include "rust-tftp-tftp-gen.h"
 
 /* The default port to probe if not provided in the configuration file. */
@@ -53,27 +45,6 @@ void RegisterTFTPParsers(void)
  * be the size of a header. */
 #define TFTP_MIN_FRAME_LEN 4
 
-/* Enum of app-layer events for an echo protocol. Normally you might
- * have events for errors in parsing data, like unexpected data being
- * received. For echo we'll make something up, and log an app-layer
- * level alert if an empty message is received.
- *
- * Example rule:
- *
- * alert tftp any any -> any any (msg:"SURICATA TFTP empty message"; \
- *    app-layer-event:tftp.empty_message; sid:X; rev:Y;)
- */
-enum {
-    TFTP_DECODER_EVENT_EMPTY_MESSAGE,
-};
-
-SCEnumCharMap tftp_decoder_event_table[] = {
-    {"EMPTY_MESSAGE", TFTP_DECODER_EVENT_EMPTY_MESSAGE},
-
-    // event table must be NULL-terminated
-    { NULL, -1 },
-};
-
 static void *TFTPStateAlloc(void)
 {
     return rs_tftp_state_alloc();
@@ -304,20 +275,4 @@ void RegisterTFTPParsers(void)
     else {
         SCLogDebug("TFTP protocol parsing disabled.");
     }
-
-#ifdef UNITTESTS
-    AppLayerParserRegisterProtocolUnittests(IPPROTO_UDP, ALPROTO_TFTP,
-                                            TFTPParserRegisterTests);
-#endif
 }
-
-#ifdef UNITTESTS
-#endif
-
-void TFTPParserRegisterTests(void)
-{
-#ifdef UNITTESTS
-#endif
-}
-
-#endif /* HAVE_RUST */
index 241fa778a62a2793026d80d00f936f8e04b54f78..65dd8f4c9bbd123884acb96626b96d08d8bcb11d 100644 (file)
 #ifndef __APP_LAYER_TFTP_H__
 #define __APP_LAYER_TFTP_H__
 
-#include "detect-engine-state.h"
-
-#include "queue.h"
-
 void RegisterTFTPParsers(void);
-void TFTPParserRegisterTests(void);
 
 /** Opaque Rust types. */
 typedef struct TFTPState_ TFTPState;