#include "stream-tcp.h"
#include "detect-fileext.h"
+typedef struct DetectFileextData_ {
+ uint8_t *ext; /** file extension to match */
+ uint16_t len; /** length of the file */
+ uint32_t flags;
+} DetectFileextData;
+
static int DetectFileextMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFileextSetup (DetectEngineCtx *, Signature *, const char *);
#ifndef __DETECT_FILEEXT_H__
#define __DETECT_FILEEXT_H__
-
-typedef struct DetectFileextData_ {
- uint8_t *ext; /** file extension to match */
- uint16_t len; /** length of the file */
- uint32_t flags;
-} DetectFileextData;
-
/* prototypes */
void DetectFileextRegister (void);
#else /* HAVE_MAGIC */
+typedef struct DetectFilemagicThreadData {
+ magic_t ctx;
+} DetectFilemagicThreadData;
+
+typedef struct DetectFilemagicData {
+ uint8_t *name; /** name of the file to match */
+ BmCtx *bm_ctx; /** BM context */
+ uint16_t len; /** name length */
+ uint32_t flags;
+} DetectFilemagicData;
+
static int DetectFilemagicMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFilemagicSetup (DetectEngineCtx *, Signature *, const char *);
#define __DETECT_FILEMAGIC_H__
#ifdef HAVE_MAGIC
-#include "util-spm-bm.h"
-
-typedef struct DetectFilemagicThreadData {
- magic_t ctx;
-} DetectFilemagicThreadData;
-
-typedef struct DetectFilemagicData {
- uint8_t *name; /** name of the file to match */
- BmCtx *bm_ctx; /** BM context */
- uint16_t len; /** name length */
- uint32_t flags;
-} DetectFilemagicData;
-
/* prototypes */
int FilemagicThreadLookup(magic_t *ctx, File *file);
#endif
#include "detect-filename.h"
#include "app-layer-parser.h"
+typedef struct DetectFilenameData {
+ uint8_t *name; /** name of the file to match */
+ BmCtx *bm_ctx; /** BM context */
+ uint16_t len; /** name length */
+ uint32_t flags;
+} DetectFilenameData;
+
static int DetectFilenameMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFilenameSetup (DetectEngineCtx *, Signature *, const char *);
#ifndef __DETECT_FILENAME_H__
#define __DETECT_FILENAME_H__
-#include "util-spm-bm.h"
-
-typedef struct DetectFilenameData {
- uint8_t *name; /** name of the file to match */
- BmCtx *bm_ctx; /** BM context */
- uint16_t len; /** name length */
- uint32_t flags;
-} DetectFilenameData;
-
/* prototypes */
void DetectFilenameRegister (void);