suricata
detect-tag.h File Reference
#include "suricata-common.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 }
 
enum  { DETECT_TAG_METRIC_PACKET, DETECT_TAG_METRIC_SECONDS, DETECT_TAG_METRIC_BYTES }
 

Functions

void DetectTagRegister (void)
 Registration function for keyword tag. More...
 
void DetectTagDataFree (struct DetectEngineCtx_ *, 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

◆ DETECT_TAG_MATCH_LIMIT

#define DETECT_TAG_MATCH_LIMIT   10

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

◆ DETECT_TAG_MAX_PKTS

#define DETECT_TAG_MAX_PKTS   256

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

◆ DETECT_TAG_MAX_TAGS

#define DETECT_TAG_MAX_TAGS   50

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

◆ TAG_ENTRY_FLAG_DIR_DST

#define TAG_ENTRY_FLAG_DIR_DST   0x02

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

◆ TAG_ENTRY_FLAG_DIR_SRC

#define TAG_ENTRY_FLAG_DIR_SRC   0x01

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

◆ TAG_ENTRY_FLAG_SKIPPED_FIRST

#define TAG_ENTRY_FLAG_SKIPPED_FIRST   0x04

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

Typedef Documentation

◆ DetectTagData

typedef struct DetectTagData_ DetectTagData

This will be the rule options/parameters

◆ DetectTagDataEntry

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DETECT_TAG_TYPE_SESSION 
DETECT_TAG_TYPE_HOST 
DETECT_TAG_TYPE_MAX 

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

◆ anonymous enum

anonymous enum
Enumerator
DETECT_TAG_DIR_SRC 
DETECT_TAG_DIR_DST 

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

◆ anonymous enum

anonymous enum
Enumerator
DETECT_TAG_METRIC_PACKET 
DETECT_TAG_METRIC_SECONDS 
DETECT_TAG_METRIC_BYTES 

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

Function Documentation

◆ DetectTagDataFree()

void DetectTagDataFree ( DetectEngineCtx de_ctx,
void *  ptr 
)

this function will free memory associated with DetectTagData

Parameters
tdpointer to DetectTagData

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

References SCFree.

◆ DetectTagDataListFree()

void DetectTagDataListFree ( void *  ptr)

this function will free all the entries of a list DetectTagDataEntry

Parameters
tdpointer to DetectTagDataEntryList

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

References DetectTagDataEntry_::next.

◆ DetectTagRegister()

void DetectTagRegister ( void  )

Registration function for keyword tag.

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

References DETECT_TAG, SigTableElmt_::Match, SigTableElmt_::name, and sigmatch_table.

Referenced by SigTableSetup().

Here is the caller graph for this function: