24 RCSID(
"$Id: 3f7a03fab3e0988d127df2c3c304ade0e06ae67f $")
25 # define _PAIR_PRIVATE 1
26 # include <freeradius-devel/util/pair.h>
27 # include <freeradius-devel/util/tlist.h>
31 # define _INLINE CC_HINT(always_inline) static inline
45 return fr_pair_order_list_head(&list->order);
58 return fr_pair_order_list_tail(&list->order);
72 return fr_pair_order_list_next(&list->order,
item);
85 return fr_pair_order_list_prev(&list->order,
item);
103 list->verified =
false;
106 return fr_pair_order_list_remove(&list->order,
vp);
115 fr_pair_order_list_talloc_free(&list->order);
127 return fr_pair_order_list_empty(&list->order);
142 fr_pair_order_list_sort(&list->order, cmp);
153 return fr_pair_order_list_num_elements(&list->order);
164 return fr_pair_order_list_dlist_head(&list->order);
184 #ifdef WITH_VERIFY_POINTER
185 dst->verified =
false;
187 fr_pair_order_list_move(&dst->order, &src->order);
197 fr_pair_order_list_move_head(&dst->order, &src->order);
Head of a doubly linked list.
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 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 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 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_t * fr_pair_list_tail(fr_pair_list_t const *list)
Get the tail of a valuepair 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 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_pair_t * fr_pair_list_head(fr_pair_list_t const *list)
Get the head of a valuepair 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 void fr_pair_list_free(fr_pair_list_t *list)
Free memory used by a valuepair list.
_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_dlist_head_t * fr_pair_list_to_dlist(fr_pair_list_t const *list)
Get the dlist head from a pair 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.