suricata
util-hash.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  HashTableBucket_
 
struct  HashTable_
 

Macros

#define HASH_NO_SIZE   0
 

Typedefs

typedef struct HashTableBucket_ HashTableBucket
 
typedef struct HashTable_ HashTable
 

Functions

HashTableHashTableInit (uint32_t, uint32_t(*Hash)(struct HashTable_ *, void *, uint16_t), char(*Compare)(void *, uint16_t, void *, uint16_t), void(*Free)(void *))
 
void HashTableFree (HashTable *)
 
void HashTablePrint (HashTable *)
 
int HashTableAdd (HashTable *, void *, uint16_t)
 
int HashTableRemove (HashTable *, void *, uint16_t)
 
void * HashTableLookup (HashTable *, void *, uint16_t)
 
uint32_t HashTableGenericHash (HashTable *, void *, uint16_t)
 
char HashTableDefaultCompare (void *, uint16_t, void *, uint16_t)
 
void HashTableRegisterTests (void)
 

Detailed Description

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

Definition in file util-hash.h.

Macro Definition Documentation

#define HASH_NO_SIZE   0

Definition at line 46 of file util-hash.h.

Typedef Documentation

typedef struct HashTable_ HashTable

Function Documentation

char HashTableDefaultCompare ( void *  ,
uint16_t  ,
void *  ,
uint16_t   
)

Definition at line 238 of file util-hash.c.

References HashTable_::Compare, HashTable_::Hash, HashTableAdd(), HashTableDefaultCompare(), HashTableFree(), HashTableGenericHash(), HashTableInit(), HashTableLookup(), HashTableRemove(), and SCMemcmp.

Referenced by HashTableDefaultCompare(), and HashTableInit().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t HashTableGenericHash ( HashTable ,
void *  ,
uint16_t   
)

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

References HashTable_::array_size.

Referenced by HashTableDefaultCompare().

Here is the caller graph for this function:

HashTable* HashTableInit ( uint32_t  ,
uint32_t(*)(struct HashTable_ *, void *, uint16_t)  Hash,
char(*)(void *, uint16_t, void *, uint16_t)  Compare,
void(*)(void *)  Free 
)
void HashTablePrint ( HashTable )

Definition at line 105 of file util-hash.c.

References HashTable_::array_size, and HashTable_::Hash.

void HashTableRegisterTests ( void  )

Definition at line 427 of file util-hash.c.

References UtRegisterTest().

Here is the call graph for this function:

int HashTableRemove ( HashTable ,
void *  ,
uint16_t   
)

Definition at line 152 of file util-hash.c.

References HashTable_::array, HashTable_::Compare, HashTableBucket_::data, HashTable_::Free, HashTable_::Hash, HashTableBucket_::next, SCFree, and HashTableBucket_::size.

Referenced by HashTableDefaultCompare().

Here is the caller graph for this function: