24RCSID(
"$Id: 27ee74efb7489e8069bf51597f7fc46d77ad14e0 $")
25# define _PAIR_PRIVATE 1
26# include <freeradius-devel/util/pair.h>
30# define _INLINE CC_HINT(always_inline) static inline
44 return fr_pair_order_list_head(&list->order);
57 return fr_pair_order_list_tail(&list->order);
71 return fr_pair_order_list_next(&list->order,
item);
84 return fr_pair_order_list_prev(&list->order,
item);
102 list->verified =
false;
105 return fr_pair_order_list_remove(&list->order,
vp);
114 fr_pair_order_list_talloc_free(&list->order);
126 return fr_pair_order_list_empty(&list->order);
141 fr_pair_order_list_sort(&list->order, cmp);
152 return fr_pair_order_list_num_elements(&list->order);
163 return fr_pair_order_list_dlist_head(&list->order);
183#ifdef WITH_VERIFY_POINTER
184 dst->verified =
false;
186 fr_pair_order_list_move(&dst->order, &src->order);
196 fr_pair_order_list_move_head(&dst->order, &src->order);
Head of a doubly linked list.
static void * item(fr_lst_t const *lst, fr_lst_index_t idx)
int8_t(* fr_cmp_t)(void const *a, void const *b)
fr_pair_list_t * fr_pair_parent_list(fr_pair_t const *vp)
Return a pointer to the parent pair list.
_INLINE size_t fr_pair_list_num_elements(fr_pair_list_t const *list)
Get the length of a list of fr_pair_t.
_INLINE void fr_pair_list_sort(fr_pair_list_t *list, fr_cmp_t cmp)
Sort a doubly linked list of fr_pair_ts using merge sort.
_INLINE fr_pair_t * fr_pair_list_head(fr_pair_list_t const *list)
Get the head of a valuepair list.
_INLINE void fr_pair_list_prepend(fr_pair_list_t *dst, fr_pair_list_t *src)
Move a list of fr_pair_t from a temporary list to the head of a destination list.
_INLINE fr_pair_list_t * fr_pair_list_from_dlist(fr_dlist_head_t const *list)
Get the pair list head from a dlist.
_INLINE fr_dlist_head_t * fr_pair_list_to_dlist(fr_pair_list_t const *list)
Get the dlist head from a pair list.
_INLINE void fr_pair_list_append(fr_pair_list_t *dst, fr_pair_list_t *src)
Appends a list of fr_pair_t from a temporary list to a destination list.
_INLINE fr_pair_t * fr_pair_list_next(fr_pair_list_t const *list, fr_pair_t const *item)
Get the next item in a valuepair list after a specific entry.
_INLINE void fr_pair_list_free(fr_pair_list_t *list)
Free memory used by a valuepair list.
_INLINE fr_pair_t * fr_pair_remove(fr_pair_list_t *list, fr_pair_t *vp)
Remove fr_pair_t from a list without freeing.
_INLINE fr_pair_t * fr_pair_list_prev(fr_pair_list_t const *list, fr_pair_t const *item)
Get the previous item in a valuepair list before a specific entry.
_INLINE fr_pair_t * fr_pair_list_tail(fr_pair_list_t const *list)
Get the tail of a valuepair list.
_INLINE bool fr_pair_list_empty(fr_pair_list_t const *list)
Is a valuepair list empty.
Stores an attribute, a value and various bits of other data.
#define FR_TLIST_FUNCS(_name, _element_type, _element_entry)
Define type specific wrapper functions for tlists.