suricata
detect-tag.c File Reference
#include "suricata-common.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-tag.h"
#include "detect-engine-tag.h"
#include "detect-engine.h"
#include "detect-engine-state.h"
#include "app-layer-parser.h"
#include "debug.h"
#include "decode.h"
#include "flow.h"
#include "flow-var.h"
#include "flow-util.h"
#include "stream-tcp-private.h"
#include "util-time.h"
#include "util-byte.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-debug.h"
#include "threads.h"
Include dependency graph for detect-tag.c:

Go to the source code of this file.

Macros

#define PARSE_REGEX   "^\\s*(host|session)\\s*(,\\s*(\\d+)\\s*,\\s*(packets|bytes|seconds)\\s*(,\\s*(src|dst))?\\s*)?$"
 
#define MAX_SUBSTRINGS   30
 

Functions

 SC_ATOMIC_EXTERN (unsigned int, num_tags)
 
void DetectTagRegisterTests (void)
 this function registers unit tests for DetectTag More...
 
void DetectTagDataFree (void *ptr)
 this function will free memory associated with DetectTagData More...
 
void DetectTagRegister (void)
 Registration function for keyword tag. More...
 
void DetectTagDataListFree (void *ptr)
 this function will free all the entries of a list DetectTagDataEntry More...
 

Detailed Description

Macro Definition Documentation

#define MAX_SUBSTRINGS   30

Referenced by DetectTagRegister().

#define PARSE_REGEX   "^\\s*(host|session)\\s*(,\\s*(\\d+)\\s*,\\s*(packets|bytes|seconds)\\s*(,\\s*(src|dst))?\\s*)?$"

Definition at line 55 of file detect-tag.c.

Referenced by DetectTagRegister().

Function Documentation

void DetectTagDataFree ( void *  ptr)

this function will free memory associated with DetectTagData

Parameters
tdpointer to DetectTagData

Definition at line 351 of file detect-tag.c.

References DetectTagData_::count, DETECT_TAG_DIR_DST, DETECT_TAG_DIR_SRC, DETECT_TAG_MAX_PKTS, DETECT_TAG_METRIC_BYTES, DETECT_TAG_METRIC_PACKET, DETECT_TAG_TYPE_HOST, DETECT_TAG_TYPE_SESSION, DetectTagDataFree(), DetectTagData_::direction, DetectTagData_::metric, SCFree, and DetectTagData_::type.

Referenced by DetectTagDataFree(), and DetectTagRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

void DetectTagDataListFree ( void *  ptr)

this function will free all the entries of a list DetectTagDataEntry

Parameters
tdpointer to DetectTagDataEntryList

Definition at line 332 of file detect-tag.c.

References DetectTagDataEntry_::next, and SC_ATOMIC_SUB.

Referenced by TagInitCtx().

Here is the caller graph for this function:

void DetectTagRegisterTests ( void  )

this function registers unit tests for DetectTag

Definition at line 458 of file detect-tag.c.

References DetectEngineTagRegisterTests(), and UtRegisterTest().

Referenced by DetectTagRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

SC_ATOMIC_EXTERN ( unsigned  int,
num_tags   
)