The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/util/value.h>
#include <freeradius-devel/server/request.h>
Go to the source code of this file.
Data Structures | |
struct | tmpl_escape_t |
Escaping rules for tmpls. More... | |
struct | tmpl_escape_t.uctx |
union | tmpl_escape_t.uctx.__unnamed76__ |
struct | tmpl_escape_t.uctx.__unnamed76__.__unnamed78__ |
struct | tmpl_escape_t.uctx.__unnamed76__.func |
Macros | |
#define | tmpl_escape_post_concat(_tmpl) ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_POST_CONCAT)) |
See if we should perform output escaping after concatenation. More... | |
#define | tmpl_escape_pre_concat(_tmpl) ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_PRE_CONCAT)) |
See if we should perform output escaping before concatenation. More... | |
Typedefs | |
typedef void *(* | tmpl_escape_uctx_alloc_t) (request_t *request, void const *uctx) |
Function to allocate a user context for escaping. More... | |
typedef void(* | tmpl_escape_uctx_free_t) (void *uctx) |
Free a previously allocated used ctx. More... | |
Enumerations | |
enum | tmpl_escape_mode_t { TMPL_ESCAPE_NONE = 0 , TMPL_ESCAPE_PRE_CONCAT , TMPL_ESCAPE_POST_CONCAT } |
When to apply escaping. More... | |
enum | tmpl_escape_uctx_type_t { TMPL_ESCAPE_UCTX_STATIC = 0 , TMPL_ESCAPE_UCTX_ALLOC , TMPL_ESCAPE_UCTX_ALLOC_FUNC } |
Different modes for creating a user context for escaping. More... | |
struct tmpl_escape_t |
Escaping rules for tmpls.
Definition at line 80 of file tmpl_escape.h.
Data Fields | ||
---|---|---|
fr_value_box_escape_t | func |
How to escape when returned from evaluation. Currently only used for async evaluation. |
tmpl_escape_mode_t | mode |
Whether to apply escape function after concatenation, i.e. to the final output of the tmpl. If false, then the escaping is performed on each value box individually prior to concatenation and prior to casting. If no concatenation is performed, then the escaping is performed on each box individually. |
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. |
struct tmpl_escape_t | uctx |
struct tmpl_escape_t.uctx |
Definition at line 95 of file tmpl_escape.h.
Data Fields | ||
---|---|---|
uctx | __unnamed__ | |
tmpl_escape_uctx_type_t | type |
Type of uctx to use for this escape operation. default is TMPL_ESCAPE_UCTX_STATIC. |
union tmpl_escape_t.uctx.__unnamed76__ |
Definition at line 96 of file tmpl_escape.h.
Data Fields | ||
---|---|---|
__unnamed76__ | __unnamed__ | |
__unnamed76__ | func | |
void const * | ptr | User context for escape function. |
struct tmpl_escape_t.uctx.__unnamed76__.__unnamed78__ |
Definition at line 99 of file tmpl_escape.h.
Data Fields | ||
---|---|---|
size_t | size | Size of the uctx to allocate. |
char const * | talloc_type | Talloc type to assign to the uctx. |
struct tmpl_escape_t.uctx.__unnamed76__.func |
Definition at line 104 of file tmpl_escape.h.
Data Fields | ||
---|---|---|
tmpl_escape_uctx_alloc_t | alloc | Function to call to allocate the uctx. |
tmpl_escape_uctx_free_t | free | Function to call to free the uctx. |
void const * | uctx | User context to pass to allocation func. |
#define tmpl_escape_post_concat | ( | _tmpl | ) | ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_POST_CONCAT)) |
See if we should perform output escaping after concatenation.
Definition at line 123 of file tmpl_escape.h.
#define tmpl_escape_pre_concat | ( | _tmpl | ) | ((_tmpl)->rules.escape.func && ((_tmpl)->rules.escape.mode == TMPL_ESCAPE_PRE_CONCAT)) |
See if we should perform output escaping before concatenation.
Definition at line 118 of file tmpl_escape.h.
Function to allocate a user context for escaping.
[in] | request | Request that the tmpl is being evaluated for. |
[in] | uctx | The user context that was passed via the tmpl_escape_t. |
Definition at line 48 of file tmpl_escape.h.
typedef void(* tmpl_escape_uctx_free_t) (void *uctx) |
Free a previously allocated used ctx.
[in] | uctx | to free. |
Definition at line 54 of file tmpl_escape.h.
enum tmpl_escape_mode_t |
When to apply escaping.
Definition at line 58 of file tmpl_escape.h.
Different modes for creating a user context for escaping.
Enumerator | |
---|---|
TMPL_ESCAPE_UCTX_STATIC | A static (to us) is provided by whatever is initialising the tmpl_escape_t. This is the default. |
TMPL_ESCAPE_UCTX_ALLOC | A new uctx of the specified size and type is allocated and freed when escaping is complete. |
TMPL_ESCAPE_UCTX_ALLOC_FUNC | A new uctx of the specified size and type is allocated and pre-populated by memcpying uctx.size bytes from uctx.ptr. |
Definition at line 30 of file tmpl_escape.h.