24 RCSIDH(hash_h,
"$Id: e2eedc00e0c744f014b3d80565c3a731ea694064 $")
30 #include <freeradius-devel/util/misc.h>
58 #define fr_hash_table_alloc(_ctx, _hash_node, _cmp_node, _free_node) \
59 _fr_hash_table_alloc(_ctx, NULL, _hash_node, _cmp_node, _free_node)
61 #define fr_hash_table_talloc_alloc(_ctx, _type, _hash_node, _cmp_node, _free_node) \
62 _fr_hash_table_alloc(_ctx, #_type, _hash_node, _cmp_node, _free_node)
fr_dcursor_eval_t void const * uctx
void * fr_hash_table_iter_init(fr_hash_table_t *ht, fr_hash_iter_t *iter)
Initialise an iterator.
int fr_hash_table_replace(void **old, fr_hash_table_t *ht, void const *data))
void * fr_hash_table_iter_next(fr_hash_table_t *ht, fr_hash_iter_t *iter)
Iterate over entries in a hash table.
void * fr_hash_table_remove(fr_hash_table_t *ht, void const *data)
void * fr_hash_table_find(fr_hash_table_t *ht, void const *data)
uint32_t fr_hash_case_string(char const *p)
Hash a C string, converting all chars to lowercase.
uint32_t fr_hash_update(void const *data, size_t size, uint32_t hash)
bool fr_hash_table_insert(fr_hash_table_t *ht, void const *data)
uint32_t(* fr_hash_t)(void const *)
struct fr_hash_iter_s fr_hash_iter_t
Stores the state of the current iteration operation.
uint32_t fr_hash_string(char const *p)
bool fr_hash_table_delete(fr_hash_table_t *ht, void const *data)
void fr_hash_table_verify(fr_hash_table_t *ht)
Check hash table is sane.
void fr_hash_table_fill(fr_hash_table_t *ht)
Ensure all buckets are filled.
fr_hash_table_t * _fr_hash_table_alloc(TALLOC_CTX *ctx, char const *type, fr_hash_t hash_node, fr_cmp_t cmp_node, fr_free_t free_node))
uint32_t fr_hash(void const *, size_t)
void * fr_hash_table_find_by_key(fr_hash_table_t *ht, uint32_t key, void const *data)
Hash table lookup with pre-computed key.
uint32_t fr_hash_table_num_elements(fr_hash_table_t *ht)
int fr_hash_table_flatten(TALLOC_CTX *ctx, void **out[], fr_hash_table_t *ht))
Copy all entries out of a hash table into an array.
int(* fr_hash_table_walk_t)(void *data, void *uctx)
Stores the state of the current iteration operation.
int8_t(* fr_cmp_t)(void const *a, void const *b)
void(* fr_free_t)(void *)
static unsigned int hash(char const *username, unsigned int tablesize)
fr_aka_sim_id_type_t type
static size_t char ** out