suricata
|
Go to the source code of this file.
Data Structures | |
struct | HashListTableBucket_ |
struct | HashListTable_ |
Macros | |
#define | HashListTableGetListNext(hb) (hb)->listnext |
#define | HashListTableGetListData(hb) (hb)->data |
Typedefs | |
typedef struct HashListTableBucket_ | HashListTableBucket |
typedef struct HashListTable_ | HashListTable |
Functions | |
HashListTable * | HashListTableInit (uint32_t, uint32_t(*Hash)(struct HashListTable_ *, void *, uint16_t), char(*Compare)(void *, uint16_t, void *, uint16_t), void(*Free)(void *)) |
void | HashListTableFree (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) |
HashListTableBucket * | HashListTableGetListHead (HashListTable *) |
char | HashListTableDefaultCompare (void *, uint16_t, void *, uint16_t) |
void | HashListTableRegisterTests (void) |
Definition in file util-hashlist.h.
#define HashListTableGetListData | ( | hb | ) | (hb)->data |
Definition at line 56 of file util-hashlist.h.
#define HashListTableGetListNext | ( | hb | ) | (hb)->listnext |
Definition at line 55 of file util-hashlist.h.
typedef struct HashListTable_ HashListTable |
typedef struct HashListTableBucket_ HashListTableBucket |
int HashListTableAdd | ( | HashListTable * | ht, |
void * | data, | ||
uint16_t | datalen | ||
) |
Definition at line 114 of file util-hashlist.c.
References HashListTable_::array, HashListTableBucket_::bucknext, HashListTableBucket_::data, HashListTable_::Hash, HashListTable_::listhead, HashListTableBucket_::listnext, HashListTableBucket_::listprev, HashListTable_::listtail, SCCalloc, SCLogDebug, HashListTableBucket_::size, and unlikely.
Referenced by DetectEngineBufferTypeGetByIdTransforms(), DetectPortHashAdd(), DetectRegisterThreadCtxFuncs(), DetectSetFastPatternAndItsId(), EngineAnalysisAddAllRulePatterns(), SigGroupHeadHashAdd(), VarNameStoreActivate(), and VarNameStoreRegister().
char HashListTableDefaultCompare | ( | void * | data1, |
uint16_t | len1, | ||
void * | data2, | ||
uint16_t | len2 | ||
) |
Definition at line 234 of file util-hashlist.c.
References SCMemcmp.
Referenced by HashListTableInit().
void HashListTableFree | ( | HashListTable * | ht | ) |
Definition at line 88 of file util-hashlist.c.
References HashListTable_::array, HashListTable_::array_size, HashListTableBucket_::bucknext, HashListTableBucket_::data, HashListTable_::Free, and SCFree.
Referenced by DetectAddressMapFree(), DetectParseDupSigHashFree(), DetectPortHashFree(), DetectSetFastPatternAndItsId(), DumpPatterns(), FeatureTrackingRelease(), MpmStoreFree(), PrefilterDeinit(), SigGroupHeadHashFree(), VarNameStoreActivate(), and VarNameStoreDestroy().
uint32_t HashListTableGenericHash | ( | HashListTable * | ht, |
void * | data, | ||
uint16_t | datalen | ||
) |
Definition at line 270 of file util-hashlist.c.
References HashListTable_::array_size.
HashListTableBucket * HashListTableGetListHead | ( | HashListTable * | ht | ) |
Definition at line 287 of file util-hashlist.c.
References HashListTable_::listhead.
Referenced by DumpPatterns(), FeatureDump(), MpmStoreReportStats(), SCProfilingPrefilterInitCounters(), VarNameStoreActivate(), and VarNameStoreDestroy().
HashListTable * HashListTableInit | ( | uint32_t | size, |
uint32_t(*)(struct HashListTable_ *, void *, uint16_t) | Hash, | ||
char(*)(void *, uint16_t, void *, uint16_t) | Compare, | ||
void(*)(void *) | Free | ||
) |
Definition at line 35 of file util-hashlist.c.
References HashListTable_::array, HashListTable_::array_size, HashListTable_::Compare, HashListTable_::Free, HashListTable_::Hash, HashListTableDefaultCompare(), HashListTable_::listhead, HashListTable_::listtail, SC_EINVAL, SC_ENOMEM, sc_errno, SC_OK, SCCalloc, SCFree, and unlikely.
Referenced by DetectAddressMapInit(), DetectParseDupSigHashInit(), DetectPortHashInit(), DetectRegisterThreadCtxFuncs(), DetectSetFastPatternAndItsId(), EngineAnalysisAddAllRulePatterns(), MpmStoreInit(), PrefilterInit(), SigGroupHeadHashInit(), and VarNameStoreActivate().
void * HashListTableLookup | ( | HashListTable * | ht, |
void * | data, | ||
uint16_t | datalen | ||
) |
Definition at line 245 of file util-hashlist.c.
References HashListTable_::array, HashListTableBucket_::bucknext, HashListTable_::Compare, HashListTableBucket_::data, HashListTable_::Hash, SCLogDebug, and HashListTableBucket_::size.
Referenced by DetectEngineBufferTypeGetById(), DetectEngineBufferTypeGetByIdTransforms(), DetectPortHashLookup(), DetectRegisterThreadCtxFuncs(), DetectSetFastPatternAndItsId(), EngineAnalysisAddAllRulePatterns(), ProvidesFeature(), RequiresFeature(), SigGroupHeadHashLookup(), VarNameStoreLookupById(), VarNameStoreLookupByName(), VarNameStoreRegister(), VarNameStoreSetupLookup(), and VarNameStoreUnregister().
void HashListTableRegisterTests | ( | void | ) |
Definition at line 498 of file util-hashlist.c.
References UtRegisterTest().
int HashListTableRemove | ( | HashListTable * | ht, |
void * | data, | ||
uint16_t | datalen | ||
) |
Definition at line 154 of file util-hashlist.c.
References HashListTable_::array, HashListTableBucket_::bucknext, HashListTable_::Compare, HashListTableBucket_::data, HashListTable_::Free, HashListTable_::Hash, HashListTable_::listhead, HashListTableBucket_::listnext, HashListTableBucket_::listprev, HashListTable_::listtail, SCFree, SCLogDebug, and HashListTableBucket_::size.
Referenced by DetectUnregisterThreadCtxFuncs().