suricata
util-hashlist.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  HashListTableBucket_
 
struct  HashListTable_
 

Macros

#define HASHLIST_NO_SIZE   0
 
#define HashListTableGetListNext(hb)   (hb)->listnext
 
#define HashListTableGetListData(hb)   (hb)->data
 

Typedefs

typedef struct HashListTableBucket_ HashListTableBucket
 
typedef struct HashListTable_ HashListTable
 

Functions

HashListTableHashListTableInit (uint32_t, uint32_t(*Hash)(struct HashListTable_ *, void *, uint16_t), char(*Compare)(void *, uint16_t, void *, uint16_t), void(*Free)(void *))
 
void HashListTableFree (HashListTable *)
 
void HashListTablePrint (HashListTable *)
 
int HashListTableAdd (HashListTable *, void *, uint16_t)
 
int HashListTableRemove (HashListTable *, void *, uint16_t)
 
void * HashListTableLookup (HashListTable *, void *, uint16_t)
 
uint32_t HashListTableGenericHash (HashListTable *, void *, uint16_t)
 
HashListTableBucketHashListTableGetListHead (HashListTable *)
 
char HashListTableDefaultCompare (void *, uint16_t, void *, uint16_t)
 
void HashListTableRegisterTests (void)
 

Detailed Description

Macro Definition Documentation

◆ HASHLIST_NO_SIZE

#define HASHLIST_NO_SIZE   0

Definition at line 47 of file util-hashlist.h.

◆ HashListTableGetListData

#define HashListTableGetListData (   hb)    (hb)->data

Definition at line 59 of file util-hashlist.h.

◆ HashListTableGetListNext

#define HashListTableGetListNext (   hb)    (hb)->listnext

Definition at line 58 of file util-hashlist.h.

Typedef Documentation

◆ HashListTable

typedef struct HashListTable_ HashListTable

◆ HashListTableBucket

Function Documentation

◆ HashListTableAdd()

◆ HashListTableDefaultCompare()

char HashListTableDefaultCompare ( void *  ,
uint16_t  ,
void *  ,
uint16_t   
)

Definition at line 237 of file util-hashlist.c.

References SCMemcmp.

Referenced by HashListTableInit().

Here is the caller graph for this function:

◆ HashListTableFree()

◆ HashListTableGenericHash()

uint32_t HashListTableGenericHash ( HashListTable ,
void *  ,
uint16_t   
)

Definition at line 273 of file util-hashlist.c.

References HashListTable_::array_size.

◆ HashListTableGetListHead()

HashListTableBucket* HashListTableGetListHead ( HashListTable )

Definition at line 290 of file util-hashlist.c.

References HashListTable_::listhead.

Referenced by FeatureDump(), and MpmStoreReportStats().

Here is the caller graph for this function:

◆ HashListTableInit()

HashListTable* HashListTableInit ( uint32_t  ,
uint32_t(*)(struct HashListTable_ *, void *, uint16_t)  Hash,
char(*)(void *, uint16_t, void *, uint16_t)  Compare,
void(*)(void *)  Free 
)

◆ HashListTableLookup()

void* HashListTableLookup ( HashListTable ,
void *  ,
uint16_t   
)

◆ HashListTablePrint()

void HashListTablePrint ( HashListTable )

Definition at line 108 of file util-hashlist.c.

References HashListTable_::array_size, and HashListTable_::Hash.

◆ HashListTableRegisterTests()

void HashListTableRegisterTests ( void  )

Definition at line 501 of file util-hashlist.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ HashListTableRemove()