suricata
|
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 | |
HashTable * | HashTableInit (uint32_t, uint32_t(*Hash)(struct HashTable_ *, void *, uint16_t), char(*Compare)(void *, uint16_t, void *, uint16_t), void(*Free)(void *)) |
void | HashTableFree (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) |
Definition in file util-hash.h.
#define HASH_NO_SIZE 0 |
Definition at line 47 of file util-hash.h.
typedef struct HashTable_ HashTable |
typedef struct HashTableBucket_ HashTableBucket |
int HashTableAdd | ( | HashTable * | , |
void * | , | ||
uint16_t | |||
) |
Definition at line 104 of file util-hash.c.
References HashTable_::array, HashTable_::array_size, HashTable_::count, HashTableBucket_::data, HashTable_::Hash, HashTableBucket_::next, SCCalloc, SCFree, SCLogWarning, HashTableBucket_::size, and unlikely.
Referenced by SCRConfAddReference().
char HashTableDefaultCompare | ( | void * | , |
uint16_t | , | ||
void * | , | ||
uint16_t | |||
) |
Definition at line 228 of file util-hash.c.
References SCMemcmp.
Referenced by HashTableInit().
void HashTableFree | ( | HashTable * | ) |
Definition at line 78 of file util-hash.c.
References HashTable_::array, HashTable_::array_size, HashTableBucket_::data, HashTable_::Free, HashTableBucket_::next, and SCFree.
Referenced by DetectEngineThreadCtxDeinit(), DetectMetadataHashFree(), LogFileFreeCtx(), SCClassConfDeInitContext(), and SCRConfDeInitContext().
uint32_t HashTableGenericHash | ( | HashTable * | , |
void * | , | ||
uint16_t | |||
) |
Definition at line 211 of file util-hash.c.
References HashTable_::array_size.
HashTable* HashTableInit | ( | uint32_t | , |
uint32_t(*)(struct HashTable_ *, void *, uint16_t) | Hash, | ||
char(*)(void *, uint16_t, void *, uint16_t) | Compare, | ||
void(*)(void *) | Free | ||
) |
Definition at line 35 of file util-hash.c.
References HashTable_::array, HashTable_::array_size, HashTable_::Compare, HashTable_::Free, HashTable_::Hash, HashTableDefaultCompare(), SCCalloc, SCFree, and unlikely.
Referenced by DetectMetadataHashInit(), and SCLogOpenThreadedFile().
void* HashTableLookup | ( | HashTable * | , |
void * | , | ||
uint16_t | |||
) |
Definition at line 183 of file util-hash.c.
References HashTable_::array, HashTable_::array_size, HashTable_::Compare, HashTableBucket_::data, HashTable_::Hash, HashTableBucket_::next, SCLogWarning, and HashTableBucket_::size.
Referenced by SCClassConfGetClasstype(), SCGetProtoByName(), SCRConfAddReference(), and SCRConfGetReference().
void HashTableRegisterTests | ( | void | ) |
Definition at line 417 of file util-hash.c.
References UtRegisterTest().
int HashTableRemove | ( | HashTable * | , |
void * | , | ||
uint16_t | |||
) |
Definition at line 142 of file util-hash.c.
References HashTable_::array, HashTable_::Compare, HashTableBucket_::data, HashTable_::Free, HashTable_::Hash, HashTableBucket_::next, SCFree, and HashTableBucket_::size.