suricata
detect-tag.h File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "util-time.h"
Include dependency graph for detect-tag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DetectTagData_
 
struct  DetectTagDataEntry_
 

Macros

#define DETECT_TAG_MATCH_LIMIT   10
 
#define DETECT_TAG_MAX_TAGS   50
 
#define DETECT_TAG_MAX_PKTS   256
 
#define TAG_ENTRY_FLAG_DIR_SRC   0x01
 
#define TAG_ENTRY_FLAG_DIR_DST   0x02
 
#define TAG_ENTRY_FLAG_SKIPPED_FIRST   0x04
 

Typedefs

typedef struct DetectTagData_ DetectTagData
 
typedef struct DetectTagDataEntry_ DetectTagDataEntry
 

Enumerations

enum  { DETECT_TAG_TYPE_SESSION, DETECT_TAG_TYPE_HOST, DETECT_TAG_TYPE_MAX }
 
enum  { DETECT_TAG_DIR_SRC, DETECT_TAG_DIR_DST, DETECT_TAG_DIR_MAX }
 
enum  { DETECT_TAG_METRIC_PACKET, DETECT_TAG_METRIC_SECONDS, DETECT_TAG_METRIC_BYTES, DETECT_TAG_METRIC_MAX }
 

Functions

void DetectTagRegister (void)
 Registration function for keyword tag. More...
 
void DetectTagDataFree (void *ptr)
 this function will free memory associated with DetectTagData More...
 
void DetectTagDataListFree (void *ptr)
 this function will free all the entries of a list DetectTagDataEntry More...
 

Detailed Description

Macro Definition Documentation

#define DETECT_TAG_MATCH_LIMIT   10

Definition at line 34 of file detect-tag.h.

Referenced by TagFlowAdd(), and TagHashAddTag().

#define DETECT_TAG_MAX_PKTS   256

Definition at line 42 of file detect-tag.h.

Referenced by DetectTagDataFree(), and DetectTagRegister().

#define DETECT_TAG_MAX_TAGS   50

Definition at line 37 of file detect-tag.h.

Referenced by TagFlowAdd(), and TagHashAddTag().

#define TAG_ENTRY_FLAG_DIR_DST   0x02

Definition at line 96 of file detect-tag.h.

Referenced by DetectTagRegister(), and TagHashAddTag().

#define TAG_ENTRY_FLAG_DIR_SRC   0x01

Definition at line 95 of file detect-tag.h.

Referenced by DetectTagRegister(), and TagHashAddTag().

#define TAG_ENTRY_FLAG_SKIPPED_FIRST   0x04

Definition at line 97 of file detect-tag.h.

Referenced by TagHashAddTag().

Typedef Documentation

typedef struct DetectTagData_ DetectTagData

This will be the rule options/parameters

This is the installed data at the session/global or host table

Enumeration Type Documentation

anonymous enum
Enumerator
DETECT_TAG_TYPE_SESSION 
DETECT_TAG_TYPE_HOST 
DETECT_TAG_TYPE_MAX 

Definition at line 45 of file detect-tag.h.

anonymous enum
Enumerator
DETECT_TAG_DIR_SRC 
DETECT_TAG_DIR_DST 
DETECT_TAG_DIR_MAX 

Definition at line 51 of file detect-tag.h.

anonymous enum
Enumerator
DETECT_TAG_METRIC_PACKET 
DETECT_TAG_METRIC_SECONDS 
DETECT_TAG_METRIC_BYTES 
DETECT_TAG_METRIC_MAX 

Definition at line 57 of file detect-tag.h.

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: