suricata
detect-hostbits.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "detect.h"
#include "threads.h"
#include "flow.h"
#include "flow-util.h"
#include "detect-hostbits.h"
#include "util-spm.h"
#include "detect-engine-sigorder.h"
#include "app-layer-parser.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-engine-state.h"
#include "detect-engine-build.h"
#include "flow-bit.h"
#include "host-bit.h"
#include "util-var-name.h"
#include "util-unittest.h"
#include "util-debug.h"
Include dependency graph for detect-hostbits.c:

Go to the source code of this file.

Macros

#define PARSE_REGEX
 

Functions

void DetectHostbitFree (DetectEngineCtx *, void *)
 
void HostBitsRegisterTests (void)
 this function registers unit tests for HostBits More...
 
void DetectHostbitsRegister (void)
 
int DetectXbitMatchHost (Packet *p, const DetectXbitsData *xd)
 

Detailed Description

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

Implements the hostbits keyword

Definition in file detect-hostbits.c.

Macro Definition Documentation

◆ PARSE_REGEX

#define PARSE_REGEX
Value:
"^([a-z]+)" /* Action */ \
"(?:\\s*,\\s*([^\\s,]+))?(?:\\s*)?" /* Name. */ \
"(?:\\s*,\\s*([^,\\s]+))?(?:\\s*)?" /* Direction. */ \
"(.+)?" /* Any remaining data. */

Definition at line 66 of file detect-hostbits.c.

Function Documentation

◆ DetectHostbitFree()

void DetectHostbitFree ( DetectEngineCtx de_ctx,
void *  ptr 
)

Definition at line 445 of file detect-hostbits.c.

References DetectXbitsData_::idx, SCFree, VAR_TYPE_HOST_BIT, and VarNameStoreUnregister().

Here is the call graph for this function:

◆ DetectHostbitsRegister()

void DetectHostbitsRegister ( void  )

Definition at line 80 of file detect-hostbits.c.

References SigTableElmt_::desc, DETECT_HOSTBITS, SigTableElmt_::Match, SigTableElmt_::name, and sigmatch_table.

Referenced by SigTableSetup().

Here is the caller graph for this function:

◆ DetectXbitMatchHost()

int DetectXbitMatchHost ( Packet p,
const DetectXbitsData xd 
)

Definition at line 247 of file detect-hostbits.c.

References DetectXbitsData_::cmd, and DETECT_XBITS_CMD_ISSET.

◆ HostBitsRegisterTests()

void HostBitsRegisterTests ( void  )

this function registers unit tests for HostBits

Definition at line 708 of file detect-hostbits.c.

References UtRegisterTest().

Here is the call graph for this function: