suricata
|
#include "suricata-common.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-content.h"
#include "detect-bsize.h"
#include "util-misc.h"
#include "tests/detect-bsize.c"
Go to the source code of this file.
Data Structures | |
struct | DetectBsizeData |
Macros | |
#define | DETECT_BSIZE_LT 0 |
#define | DETECT_BSIZE_GT 1 |
#define | DETECT_BSIZE_RA 2 |
#define | DETECT_BSIZE_EQ 3 |
#define | ERR(...) |
Typedefs | |
typedef struct DetectBsizeData | DetectBsizeData |
Functions | |
void | DetectBsizeRegister (void) |
Registration function for bsize: keyword. More... | |
int | DetectBsizeMatch (const SigMatchCtx *ctx, const uint64_t buffer_size, bool eof) |
bsize match function More... | |
Implements the bsize generic buffer length keyword
Definition in file detect-bsize.c.
#define DETECT_BSIZE_EQ 3 |
Definition at line 67 of file detect-bsize.c.
#define DETECT_BSIZE_GT 1 |
Definition at line 65 of file detect-bsize.c.
#define DETECT_BSIZE_LT 0 |
Definition at line 64 of file detect-bsize.c.
#define DETECT_BSIZE_RA 2 |
Definition at line 66 of file detect-bsize.c.
#define ERR | ( | ... | ) |
Definition at line 128 of file detect-bsize.c.
typedef struct DetectBsizeData DetectBsizeData |
int DetectBsizeMatch | ( | const SigMatchCtx * | ctx, |
const uint64_t | buffer_size, | ||
bool | eof | ||
) |
bsize match function
ctx | match ctx |
buffer_size | size of the buffer |
eof | is the buffer closed? |
r | 1 match, 0 no match, -1 can't match |
Definition at line 84 of file detect-bsize.c.
References DETECT_BSIZE_EQ, DETECT_BSIZE_GT, DETECT_BSIZE_LT, DETECT_BSIZE_RA, DetectBsizeData::hi, DetectBsizeData::lo, and DetectBsizeData::mode.
void DetectBsizeRegister | ( | void | ) |
Registration function for bsize: keyword.
Definition at line 50 of file detect-bsize.c.
References SigTableElmt_::desc, DETECT_BSIZE, SigTableElmt_::Match, SigTableElmt_::name, SigTableElmt_::Setup, sigmatch_table, and SigTableElmt_::url.
Referenced by SigTableSetup().