24RCSIDH(trie_h,
"$Id: 8e2fee5ecd6956fb101e22d9ef99b5cd6066bc46 $")
30#include <freeradius-devel/build.h>
31#include <freeradius-devel/missing.h>
32#include <freeradius-devel/util/talloc.h>
void(* fr_free_t)(void *)
void * fr_trie_remove_by_key(fr_trie_t *ft, void const *key, size_t keylen)
Remove a key and return the associated user ctx.
int(* fr_trie_key_t)(uint8_t **out, size_t *outlen, void const *data)
bool fr_trie_delete(fr_trie_t *ft, void const *data)
Remove node and free data (if a free function was specified)
void * fr_trie_remove(fr_trie_t *ft, void const *data)
Remove an entry, without freeing the data.
bool fr_trie_insert(fr_trie_t *ft, void const *data)
Insert data into a trie.
fr_trie_t * fr_trie_alloc(TALLOC_CTX *ctx, fr_trie_key_t get_key, fr_free_t free_node)
Allocate a trie.
void * fr_trie_lookup_by_key(fr_trie_t const *ft, void const *key, size_t keylen)
Lookup a key in a trie and return user ctx, if any.
int fr_trie_walk(fr_trie_t *ft, void *ctx, fr_trie_walk_t callback))
void * fr_trie_match(fr_trie_t *ft, void const *data)
Match an element exactly in the trie, returning the data.
unsigned int fr_trie_num_elements(fr_trie_t *ft)
void * fr_trie_find(fr_trie_t *ft, void const *data)
Find an element in the trie, returning the data.
void * fr_trie_match_by_key(fr_trie_t const *ft, void const *key, size_t keylen)
Match a key and length in a trie and return user ctx, if any.
int(* fr_trie_walk_t)(uint8_t const *key, size_t keylen, void *data, void *uctx)
Walk over a trie.
int fr_trie_insert_by_key(fr_trie_t *ft, void const *key, size_t keylen, void const *data)
Insert a key and user ctx into a trie.
int fr_trie_replace(void **old, fr_trie_t *ft, void const *data))
Replace old data with new data, OR insert if there is no old.
static size_t char ** out