From 3f36a6ce595b8ab243cacaa9047b6070c618930f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 30 May 2019 21:54:28 +0200 Subject: [PATCH] tftp: c glue code cleanup --- src/app-layer-tftp.c | 45 -------------------------------------------- src/app-layer-tftp.h | 5 ----- 2 files changed, 50 deletions(-) diff --git a/src/app-layer-tftp.c b/src/app-layer-tftp.c index 737205c47b..22ce1d2992 100644 --- a/src/app-layer-tftp.c +++ b/src/app-layer-tftp.c @@ -36,14 +36,6 @@ #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 */ diff --git a/src/app-layer-tftp.h b/src/app-layer-tftp.h index 241fa778a6..65dd8f4c9b 100644 --- a/src/app-layer-tftp.h +++ b/src/app-layer-tftp.h @@ -24,12 +24,7 @@ #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;