#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. */
* 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();
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 */
#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;