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

Go to the source code of this file.

Typedefs

typedef struct MacSet_ MacSet
 
typedef int(* MacSetIteratorFunc) (uint8_t *addr, MacSetSide side, void *)
 

Enumerations

enum  MacSetSide { MAC_SET_SRC = 0 , MAC_SET_DST }
 

Functions

MacSetMacSetInit (int size)
 
void MacSetAdd (MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr)
 
void MacSetAddWithCtr (MacSet *, const uint8_t *src_addr, const uint8_t *dst_addr, ThreadVars *tv, uint16_t ctr_src, uint16_t ctr_dst)
 
int MacSetForEach (const MacSet *, MacSetIteratorFunc, void *)
 
uint8_t * MacSetGetFirst (const MacSet *, MacSetSide)
 
int MacSetSize (const MacSet *)
 
void MacSetReset (MacSet *)
 
void MacSetFree (MacSet *)
 
void MacSetRegisterFlowStorage (void)
 
FlowStorageId MacSetGetFlowStorageID (void)
 
bool MacSetFlowStorageEnabled (void)
 
void MacSetRegisterTests (void)
 

Detailed Description

Typedef Documentation

◆ MacSet

typedef struct MacSet_ MacSet

Definition at line 27 of file util-macset.h.

◆ MacSetIteratorFunc

typedef int(* MacSetIteratorFunc) (uint8_t *addr, MacSetSide side, void *)

Definition at line 33 of file util-macset.h.

Enumeration Type Documentation

◆ MacSetSide

enum MacSetSide
Enumerator
MAC_SET_SRC 
MAC_SET_DST 

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

Function Documentation

◆ MacSetAdd()

void MacSetAdd ( MacSet ms,
const uint8_t *  src_addr,
const uint8_t *  dst_addr 
)

Definition at line 191 of file util-macset.c.

References MacSetAddWithCtr().

Here is the call graph for this function:

◆ MacSetAddWithCtr()

void MacSetAddWithCtr ( MacSet ms,
const uint8_t *  src_addr,
const uint8_t *  dst_addr,
ThreadVars tv,
uint16_t  ctr_src,
uint16_t  ctr_dst 
)

Definition at line 182 of file util-macset.c.

References MAC_SET_DST, MAC_SET_SRC, and tv.

Referenced by MacSetAdd().

Here is the caller graph for this function:

◆ MacSetFlowStorageEnabled()

bool MacSetFlowStorageEnabled ( void  )

Definition at line 86 of file util-macset.c.

References g_macset_storage_id, and FlowStorageId::id.

Referenced by FlowInit().

Here is the caller graph for this function:

◆ MacSetForEach()

int MacSetForEach ( const MacSet ms,
MacSetIteratorFunc  IterFunc,
void *  data 
)

Definition at line 221 of file util-macset.c.

References MAC_SET_DST, and MAC_SET_SRC.

◆ MacSetFree()

void MacSetFree ( MacSet ms)

Definition at line 278 of file util-macset.c.

References MacSet_::buf, MAC_SET_DST, MAC_SET_SRC, SC_ATOMIC_SUB, SCFree, and MacSet_::size.

Referenced by MacSetRegisterFlowStorage().

Here is the caller graph for this function:

◆ MacSetGetFirst()

uint8_t * MacSetGetFirst ( const MacSet ms,
MacSetSide  side 
)

Definition at line 234 of file util-macset.c.

References MacSet_::buf, EMPTY_SET, MULTI_MAC, SINGLE_MAC, MacSet_::singles, and MacSet_::state.

◆ MacSetGetFlowStorageID()

FlowStorageId MacSetGetFlowStorageID ( void  )

Definition at line 115 of file util-macset.c.

References g_macset_storage_id.

Referenced by FlowInit().

Here is the caller graph for this function:

◆ MacSetInit()

MacSet * MacSetInit ( int  size)

Definition at line 92 of file util-macset.c.

References EMPTY_SET, FLOW_CHECK_MEMCAP, MacSet_::last, MAC_SET_DST, MAC_SET_SRC, SC_ATOMIC_ADD, SCCalloc, SCLogError, MacSet_::size, MacSet_::state, and unlikely.

Referenced by FlowInit().

Here is the caller graph for this function:

◆ MacSetRegisterFlowStorage()

void MacSetRegisterFlowStorage ( void  )

Definition at line 62 of file util-macset.c.

References FlowStorageRegister(), g_macset_storage_id, MacSetFree(), next, SCConfGetNode(), SCConfNodeLookupChildValue(), SCConfValIsTrue(), TAILQ_FOREACH, and SCConfNode_::val.

Referenced by PostConfLoadedSetup().

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

◆ MacSetRegisterTests()

void MacSetRegisterTests ( void  )

Definition at line 468 of file util-macset.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ MacSetReset()

void MacSetReset ( MacSet )

◆ MacSetSize()

int MacSetSize ( const MacSet ms)