24RCSIDH(lst_h,
"$Id: 820bdb0f6c461937d236d6fa304d698e7f37eb5b $")
30#include <freeradius-devel/build.h>
31#include <freeradius-devel/util/misc.h>
32#include <freeradius-devel/util/talloc.h>
60#define fr_lst_alloc(_ctx, _cmp, _type, _field, _init) \
61 _fr_lst_alloc(_ctx, _cmp, NULL, (size_t)offsetof(_type, _field), _init)
75#define fr_lst_talloc_alloc(_ctx, _cmp, _talloc_type, _field, _init) \
76 _fr_lst_alloc(_ctx, _cmp, #_talloc_type, (size_t)offsetof(_talloc_type, _field), _init)
112#ifndef TALLOC_GET_TYPE_ABORT_NOOP
114#define FR_LST_VERIFY(_lst) fr_lst_verify(__FILE__, __LINE__, _lst)
115#elif !defined(NDEBUG)
116#define FR_LST_VERIFY(_lst) fr_assert(_lst)
118#define FR_LST_VERIFY(_lst)
135#define fr_lst_foreach(_lst, _type, _data) \
137 fr_lst_iter_t _iter; \
138 for (_type *_data = fr_lst_iter_init(_lst, &_iter); _data; _data = fr_lst_iter_next(_lst, &_iter))
size_t offset
Offset of heap index in element structure.
fr_cmp_t cmp
Comparator function.
void * fr_lst_iter_next(fr_lst_t *lst, fr_lst_iter_t *iter)
Get the next entry in an LST.
int fr_lst_extract(fr_lst_t *lst, void *data)
Remove an element from an LST.
void * fr_lst_iter_init(fr_lst_t *lst, fr_lst_iter_t *iter)
Iterate over entries in LST.
void fr_lst_verify(char const *file, int line, fr_lst_t const *lst)
void * fr_lst_pop(fr_lst_t *lst)
static bool fr_lst_entry_inserted(fr_lst_index_t lst_id)
Check if an entry is inserted into an LST.
fr_lst_index_t fr_lst_iter_t
int fr_lst_insert(fr_lst_t *lst, void *data)
unsigned int fr_lst_num_elements(fr_lst_t *lst)
void * fr_lst_peek(fr_lst_t *lst)
unsigned int fr_lst_index_t
fr_lst_t * _fr_lst_alloc(TALLOC_CTX *ctx, fr_cmp_t cmp, char const *type, size_t offset, fr_lst_index_t init))
int8_t(* fr_cmp_t)(void const *a, void const *b)
fr_aka_sim_id_type_t type