24 #include <freeradius-devel/util/value.h>
25 #include <freeradius-devel/server/request.h>
48 typedef void *(*tmpl_escape_uctx_alloc_t)(
request_t *request,
void const *
uctx);
101 char const * talloc_type;
118 #define tmpl_escape_pre_concat(_tmpl) ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_PRE_CONCAT))
123 #define tmpl_escape_post_concat(_tmpl) ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_POST_CONCAT))
fr_dcursor_eval_t void const * uctx
fr_aka_sim_id_type_t type
void *(* tmpl_escape_uctx_alloc_t)(request_t *request, void const *uctx)
Function to allocate a user context for escaping.
fr_value_box_escape_t func
How to escape when returned from evaluation.
tmpl_escape_uctx_type_t
Different modes for creating a user context for escaping.
@ TMPL_ESCAPE_UCTX_ALLOC
A new uctx of the specified size and type is allocated and freed when escaping is complete.
@ TMPL_ESCAPE_UCTX_STATIC
A static (to us) is provided by whatever is initialising the tmpl_escape_t.
@ TMPL_ESCAPE_UCTX_ALLOC_FUNC
A new uctx of the specified size and type is allocated and pre-populated by memcpying uctx....
tmpl_escape_mode_t
When to apply escaping.
@ TMPL_ESCAPE_PRE_CONCAT
Pre-concatenation escaping is useful for DSLs where elements of the expansion are static,...
@ TMPL_ESCAPE_NONE
No escaping is performed.
@ TMPL_ESCAPE_POST_CONCAT
Post-concatenation escaping is useful for when we don't want to allow the user to bypass escaping for...
void(* tmpl_escape_uctx_free_t)(void *uctx)
Free a previously allocated used ctx.
fr_value_box_safe_for_t safe_for
Value to set on boxes which have been escaped by the fr_value_box_escape_t function.
tmpl_escape_mode_t mode
Whether to apply escape function after concatenation, i.e.
Escaping rules for tmpls.
int(* fr_value_box_escape_t)(fr_value_box_t *vb, void *uctx)
Escape a value box.
uintptr_t fr_value_box_safe_for_t
Escaping that's been applied to a value box.