suricata
util-var.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GenericVar_
 
struct  XBit_
 
struct  ResolvedVariable_
 

Typedefs

typedef struct GenericVar_ GenericVar
 
typedef struct XBit_ XBit
 
typedef struct ResolvedVariable_ ResolvedVariable
 

Enumerations

enum  VarTypes {
  VAR_TYPE_NOT_SET, VAR_TYPE_PKT_BIT, VAR_TYPE_PKT_INT, VAR_TYPE_PKT_VAR,
  VAR_TYPE_PKT_VAR_KV, VAR_TYPE_FLOW_BIT, VAR_TYPE_FLOW_INT, VAR_TYPE_FLOW_VAR,
  VAR_TYPE_HOST_BIT, VAR_TYPE_HOST_INT, VAR_TYPE_HOST_VAR, VAR_TYPE_IPPAIR_BIT,
  VAR_TYPE_IPPAIR_INT, VAR_TYPE_IPPAIR_VAR
}
 

Functions

void XBitFree (XBit *)
 
typedef TAILQ_HEAD (, ResolvedVariable_) ResolvedVariablesList
 
void GenericVarFree (GenericVar *)
 
void GenericVarAppend (GenericVar **, GenericVar *)
 
void GenericVarRemove (GenericVar **, GenericVar *)
 
int AddVariableToResolveList (ResolvedVariablesList *list, const char *var)
 
void CleanVariableResolveList (ResolvedVariablesList *var_list)
 

Detailed Description

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

Definition in file util-var.h.

Typedef Documentation

◆ GenericVar

typedef struct GenericVar_ GenericVar
Todo:
see ticket #6855. The type field should be 16 bits.

◆ ResolvedVariable

◆ XBit

typedef struct XBit_ XBit

Enumeration Type Documentation

◆ VarTypes

enum VarTypes

variable types: these are used to track variable names

Enumerator
VAR_TYPE_NOT_SET 
VAR_TYPE_PKT_BIT 
VAR_TYPE_PKT_INT 
VAR_TYPE_PKT_VAR 
VAR_TYPE_PKT_VAR_KV 
VAR_TYPE_FLOW_BIT 
VAR_TYPE_FLOW_INT 
VAR_TYPE_FLOW_VAR 
VAR_TYPE_HOST_BIT 
VAR_TYPE_HOST_INT 
VAR_TYPE_HOST_VAR 
VAR_TYPE_IPPAIR_BIT 
VAR_TYPE_IPPAIR_INT 
VAR_TYPE_IPPAIR_VAR 

Definition at line 28 of file util-var.h.

Function Documentation

◆ AddVariableToResolveList()

int AddVariableToResolveList ( ResolvedVariablesList *  list,
const char *  var 
)

Definition at line 139 of file util-var.c.

◆ CleanVariableResolveList()

void CleanVariableResolveList ( ResolvedVariablesList *  var_list)

Definition at line 168 of file util-var.c.

References next, SCFree, TAILQ_FIRST, and TAILQ_REMOVE.

◆ GenericVarAppend()

void GenericVarAppend ( GenericVar **  ,
GenericVar  
)

Definition at line 98 of file util-var.c.

Referenced by FlowVarAddIdValue(), FlowVarAddIntNoLock(), and FlowVarAddKeyValue().

Here is the caller graph for this function:

◆ GenericVarFree()

void GenericVarFree ( GenericVar )

Definition at line 48 of file util-var.c.

References DEBUG_VALIDATE_BUG_ON, DETECT_FLOWBITS, DETECT_FLOWVAR, DETECT_PKTVAR, DETECT_THRESHOLD, DETECT_XBITS, FlowBitFree(), FlowThresholdVarFree(), FlowVarFree(), GenericVarFree(), GenericVar_::next, PktVarFree(), SCLogDebug, GenericVar_::type, and XBitFree().

Referenced by GenericVarFree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenericVarRemove()

void GenericVarRemove ( GenericVar **  ,
GenericVar  
)

Definition at line 117 of file util-var.c.

◆ TAILQ_HEAD()

typedef TAILQ_HEAD ( ResolvedVariable_  )

◆ XBitFree()

void XBitFree ( XBit )

Definition at line 40 of file util-var.c.

References SCFree.

Referenced by GenericVarFree().

Here is the caller graph for this function: