19 #include <freeradius-devel/server/tmpl.h>
20 #include <freeradius-devel/util/dcursor.h>
22 RCSIDH(tmpl_dcursor_t,
"$Id: 30f8375e3102fa8fbf97605bc97963e520dd9395 $")
100 #define tmpl_dcursor_init(_err, _ctx, _cc, _cursor, _request, _vpt) \
101 _tmpl_dcursor_init(_err, _ctx, _cc, _cursor, _request, _vpt, NULL, NULL)
103 #define tmpl_dcursor_build_init(_err, _ctx, _cc, _cursor, _request, _vpt, _build, _uctx) \
104 _tmpl_dcursor_init(_err, _ctx, _cc, _cursor, _request, _vpt, _build, _uctx)
fr_dcursor_eval_t void const * uctx
Head of a doubly linked list.
Entry in a doubly linked list.
An element in a list of nested attribute references.
Stores an attribute, a value and various bits of other data.
fr_pair_t * tmpl_dcursor_init_relative(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc, fr_dcursor_t *cursor, request_t *request, fr_pair_t *list, tmpl_t const *vpt, tmpl_dcursor_build_t build, void *uctx)
Initialise a fr_dcursor_t at the specified point in a pair tree.
TALLOC_CTX * ctx
Temporary allocations go here.
tmpl_dcursor_nested_t leaf
Pre-allocated leaf state.
tmpl_dcursor_build_t build
Callback to build missing pairs.
ssize_t tmpl_dcursor_print(fr_sbuff_t *out, tmpl_dcursor_ctx_t const *cc)
fr_pair_list_t * list
List within the request.
fr_pair_t * _tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc, fr_dcursor_t *cursor, request_t *request, tmpl_t const *vpt, tmpl_dcursor_build_t build, void *uctx)
Initialise a fr_dcursor_t to the fr_pair_t specified by a tmpl_t.
fr_dcursor_t cursor
Cursor to track where we are in the list in case we're doing counts.
fr_dlist_t entry
Entry in the dlist that forms the evaluation stack.
fr_pair_t *(* tmpl_dcursor_build_t)(fr_pair_t *parent, fr_dcursor_t *cursor, fr_dict_attr_t const *da, void *uctx)
Callback function for populating missing pair.
bool seen
Whether we've seen an attribute at this level of evaluation already.
fr_pair_t * tmpl_dcursor_pair_build(fr_pair_t *parent, fr_dcursor_t *cursor, fr_dict_attr_t const *da, UNUSED void *uctx)
Simple pair building callback for use with tmpl_dcursors.
size_t num
which attribute number we are looking at
fr_dlist_head_t nested
Nested state.
tmpl_t const * vpt
tmpl we're evaluating.
void tmpl_dcursor_clear(tmpl_dcursor_ctx_t *cc)
Clear any temporary state allocations.
request_t * request
Result of following the request references.
TALLOC_CTX * pool
Temporary pool.
void * uctx
Context for building new pairs.
TALLOC_CTX * list_ctx
Track where we should be allocating attributes.
tmpl_attr_t const * ar
Attribute reference this state entry is associated with.
Maintains state between cursor calls.
State for traversing an attribute reference.
static size_t char ** out