suricata
|
#include "suricata-common.h"
#include "detect.h"
#include "util-hashlist.h"
#include "util-var-name.h"
Go to the source code of this file.
Data Structures | |
struct | VarNameStore_ |
struct | VariableName_ |
Name2idx mapping structure for flowbits, flowvars and pktvars. More... | |
Macros | |
#define | VARNAME_HASHSIZE 0x1000 |
#define | VARID_HASHSIZE 0x1000 |
Typedefs | |
typedef struct VarNameStore_ | VarNameStore |
typedef struct VariableName_ | VariableName |
Name2idx mapping structure for flowbits, flowvars and pktvars. More... | |
Functions | |
SC_ATOMIC_DECLARE (VarNameStore *, g_varnamestore_current) | |
int | VarNameStoreSetupStaging (uint32_t de_ctx_version) |
setup staging store. Include current store if there is one. More... | |
const char * | VarNameStoreLookupById (const uint32_t id, const enum VarTypes type) |
uint32_t | VarNameStoreLookupByName (const char *name, const enum VarTypes type) |
uint32_t | VarNameStoreSetupAdd (const char *name, const enum VarTypes type) |
add to staging or return existing id if already in there More... | |
char * | VarNameStoreSetupLookup (uint32_t idx, const enum VarTypes type) |
void | VarNameStoreActivateStaging (void) |
void | VarNameStoreFreeOld (void) |
void | VarNameStoreFree (uint32_t de_ctx_version) |
Generic variable name utility functions
Definition in file util-var-name.c.
#define VARID_HASHSIZE 0x1000 |
Definition at line 70 of file util-var-name.c.
#define VARNAME_HASHSIZE 0x1000 |
Definition at line 69 of file util-var-name.c.
typedef struct VariableName_ VariableName |
Name2idx mapping structure for flowbits, flowvars and pktvars.
typedef struct VarNameStore_ VarNameStore |
SC_ATOMIC_DECLARE | ( | VarNameStore * | , |
g_varnamestore_current | |||
) |
void VarNameStoreActivateStaging | ( | void | ) |
Definition at line 340 of file util-var-name.c.
References SCMutexLock.
void VarNameStoreFree | ( | uint32_t | de_ctx_version | ) |
Definition at line 364 of file util-var-name.c.
References SCLogDebug, and SCMutexLock.
void VarNameStoreFreeOld | ( | void | ) |
Definition at line 353 of file util-var-name.c.
References SCMutexLock.
const char* VarNameStoreLookupById | ( | const uint32_t | id, |
const enum VarTypes | type | ||
) |
Definition at line 297 of file util-var-name.c.
References BUG_ON, HashListTableLookup(), VarNameStore_::ids, VariableName_::name, SC_ATOMIC_GET, and type.
uint32_t VarNameStoreLookupByName | ( | const char * | name, |
const enum VarTypes | type | ||
) |
Definition at line 309 of file util-var-name.c.
References BUG_ON, HashListTableLookup(), VariableName_::idx, VarNameStore_::names, SC_ATOMIC_GET, SCLogDebug, and type.
Referenced by DetectFlowintMatch().
uint32_t VarNameStoreSetupAdd | ( | const char * | name, |
const enum VarTypes | type | ||
) |
add to staging or return existing id if already in there
Definition at line 323 of file util-var-name.c.
References SCMutexLock.
char* VarNameStoreSetupLookup | ( | uint32_t | idx, |
const enum VarTypes | type | ||
) |
Definition at line 332 of file util-var-name.c.
References SCMutexLock.
Referenced by DetectFlowbitsAnalyze().
int VarNameStoreSetupStaging | ( | uint32_t | de_ctx_version | ) |
setup staging store. Include current store if there is one.
Definition at line 247 of file util-var-name.c.
References SCMutexLock.