detect-metadata.c File Reference
#include "suricata-common.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-metadata.h"
#include "util-hash-string.h"
#include "util-unittest.h"
#include "rust.h"
#include "util-validate.h"
Include dependency graph for detect-metadata.c:

Go to the source code of this file.


#define MD_STR   "\"metadata\":"
#define MD_STR_LEN   (sizeof(MD_STR) - 1)


void DetectMetadataRegister (void)
void DetectMetadataFree (DetectMetadata *mdata)
 Free a Metadata object. More...
int DetectMetadataHashInit (DetectEngineCtx *de_ctx)
void DetectMetadataHashFree (DetectEngineCtx *de_ctx)

Detailed Description

Victor Julien

Implements metadata keyword support

Do we need to do anything more this is used in snort host attribute table It is also used for rule managment.

Definition in file detect-metadata.c.

Macro Definition Documentation


#define MD_STR   "\"metadata\":"


#define MD_STR_LEN   (sizeof(MD_STR) - 1)

Function Documentation

◆ DetectMetadataFree()

void DetectMetadataFree ( DetectMetadata mdata)

Free a Metadata object.

Definition at line 60 of file detect-metadata.c.

References SCEnter, SCFree, and SCReturn.

◆ DetectMetadataHashFree()

void DetectMetadataHashFree ( DetectEngineCtx de_ctx)

Definition at line 80 of file detect-metadata.c.

References de_ctx, HashTableFree(), and DetectEngineCtx_::metadata_table.

Here is the call graph for this function:

◆ DetectMetadataHashInit()

int DetectMetadataHashInit ( DetectEngineCtx de_ctx)

◆ DetectMetadataRegister()

void DetectMetadataRegister ( void  )

Definition at line 44 of file detect-metadata.c.

References SigTableElmt_::desc, DETECT_METADATA, SigTableElmt_::Match, SigTableElmt_::name, SigTableElmt_::Setup, sigmatch_table, and SigTableElmt_::url.

Referenced by SigTableSetup().

Here is the caller graph for this function: