suricata
detect-bsize.c File Reference
#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-engine-uint.h"
#include "detect-bsize.h"
#include "util-misc.h"
#include "tests/detect-bsize.c"
Include dependency graph for detect-bsize.c:

Go to the source code of this file.

Functions

bool DetectBsizeValidateContentCallback (Signature *s, const SignatureInitDataBuffer *b)
 
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...
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Implements the bsize generic buffer length keyword

Definition in file detect-bsize.c.

Function Documentation

◆ DetectBsizeMatch()

int DetectBsizeMatch ( const SigMatchCtx ctx,
const uint64_t  buffer_size,
bool  eof 
)

bsize match function

Parameters
ctxmatch ctx
buffer_sizesize of the buffer
eofis the buffer closed?
Return values
r1 match, 0 no match, -1 can't match

Definition at line 119 of file detect-bsize.c.

References DETECT_UINT_EQ, DETECT_UINT_GT, DETECT_UINT_GTE, DETECT_UINT_LT, DETECT_UINT_LTE, DETECT_UINT_RA, and DetectU64Match().

Here is the call graph for this function:

◆ DetectBsizeRegister()

void DetectBsizeRegister ( void  )

Registration function for bsize: keyword.

Definition at line 98 of file detect-bsize.c.

References SigTableElmt_::desc, DETECT_BSIZE, SigTableElmt_::Match, SigTableElmt_::name, SigTableElmt_::Setup, sigmatch_table, and SigTableElmt_::url.

Referenced by SigTableSetup().

Here is the caller graph for this function:

◆ DetectBsizeValidateContentCallback()

bool DetectBsizeValidateContentCallback ( Signature s,
const SignatureInitDataBuffer b 
)

Definition at line 48 of file detect-bsize.c.

References DETECT_BSIZE, SignatureInitDataBuffer_::head, and SigMatch_::next.