The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
xlat_priv.h File Reference

String expansion ("translation"). More...

#include <freeradius-devel/unlang/xlat_ctx.h>
#include <freeradius-devel/unlang/xlat.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <freeradius-devel/server/module_ctx.h>
#include <freeradius-devel/io/pair.h>
#include <freeradius-devel/util/talloc.h>
#include <freeradius-devel/build.h>
+ Include dependency graph for xlat_priv.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xlat_call_t
 An xlat function call. More...
 
struct  xlat_exp_head_s
 
struct  xlat_exp_s
 An xlat expansion node. More...
 
union  xlat_exp_s.__unnamed103__
 
struct  xlat_out_t
 
struct  xlat_s
 

Macros

#define _CONST   const
 
#define XLAT_DEBUG(...)
 
#define xlat_exp_alloc(_ctx, _type, _in, _inlen)   _xlat_exp_alloc(NDEBUG_LOCATION_EXP _ctx, _type, _in, _inlen)
 
#define xlat_exp_alloc_null(_ctx)   _xlat_exp_alloc_null(NDEBUG_LOCATION_EXP _ctx)
 
#define xlat_exp_foreach(_list_head, _iter)   fr_dlist_foreach(&((_list_head)->dlist), xlat_exp_t, _iter)
 Iterate over the contents of a list, only one level. More...
 
#define xlat_exp_head_alloc(_ctx)   _xlat_exp_head_alloc(NDEBUG_LOCATION_EXP _ctx)
 
#define xlat_exp_set_type(_node, _type)   _xlat_exp_set_type(NDEBUG_LOCATION_EXP _node, _type)
 

Typedefs

typedef struct xlat_s xlat_t
 
typedef int(* xlat_walker_t) (xlat_exp_t *exp, void *uctx)
 Walker callback for xlat_walk() More...
 

Enumerations

enum  xlat_type_t {
  XLAT_INVALID = 0x0000 ,
  XLAT_BOX = 0x0001 ,
  XLAT_ONE_LETTER = 0x0002 ,
  XLAT_FUNC = 0x0004 ,
  XLAT_FUNC_UNRESOLVED = 0x0008 ,
  XLAT_VIRTUAL = 0x0010 ,
  XLAT_VIRTUAL_UNRESOLVED = 0x0020 ,
  XLAT_TMPL = 0x0040 ,
  XLAT_GROUP = 0x0200
}
 

Functions

xlat_exp_t_xlat_exp_alloc (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, xlat_type_t type, char const *in, size_t inlen)
 Allocate an xlat node. More...
 
xlat_exp_t_xlat_exp_alloc_null (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx)
 Allocate an xlat node with no name, and no type set. More...
 
xlat_exp_head_t_xlat_exp_head_alloc (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx)
 
void _xlat_exp_set_type (NDEBUG_LOCATION_ARGS xlat_exp_t *node, xlat_type_t type)
 Set the type of an xlat node. More...
 
void unlang_xlat_init (void)
 Register xlat operation with the interpreter. More...
 
int unlang_xlat_push_node (TALLOC_CTX *ctx, bool *p_success, fr_value_box_list_t *out, request_t *request, xlat_exp_t *node)
 Push a pre-compiled xlat onto the stack for evaluation. More...
 
int xlat_decode_value_box_list (TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, void *decode_ctx, fr_pair_decode_t decode, fr_value_box_list_t *in)
 Decode all of the value boxes into the output cursor. More...
 
void xlat_eval_free (void)
 
int xlat_eval_init (void)
 
int xlat_eval_walk (xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type, void *uctx)
 Walk over all xlat nodes (depth first) in a xlat expansion, calling a callback. More...
 
static xlat_exp_txlat_exp_head (xlat_exp_head_t const *head)
 
static int xlat_exp_insert_tail (xlat_exp_head_t *head, xlat_exp_t *node)
 
static xlat_exp_txlat_exp_next (xlat_exp_head_t const *head, xlat_exp_t const *node)
 
void xlat_exp_set_name (xlat_exp_t *node, char const *fmt, size_t len)
 Set the format string for an xlat node. More...
 
void xlat_exp_set_name_buffer (xlat_exp_t *node, char const *fmt)
 Set the format string for an xlat node, copying from a talloc'd buffer. More...
 
void xlat_exp_set_name_buffer_shallow (xlat_exp_t *node, char const *fmt)
 Set the format string for an xlat node from a pre-existing buffer. More...
 
static void xlat_flags_merge (xlat_flags_t *parent, xlat_flags_t const *child)
 Merge flags from child to parent. More...
 
xlat_action_t xlat_frame_eval (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_exp_head_t const **child, request_t *request, xlat_exp_head_t const *head, xlat_exp_t const **in)
 Converts xlat nodes to value boxes. More...
 
xlat_action_t xlat_frame_eval_repeat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_exp_head_t const **child, request_t *request, xlat_exp_head_t const *head, xlat_exp_t const **in, void *env_data, fr_value_box_list_t *result))
 Process the result of a previous nested expansion. More...
 
xlat_action_t xlat_frame_eval_resume (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_exp_head_t const **child, request_t *request, xlat_exp_head_t const *head, xlat_exp_t const **in, fr_value_box_list_t *result, xlat_func_t resume, void *rctx)
 Call an xlat's resumption method. More...
 
xlat_txlat_func_find (char const *name, ssize_t namelen)
 
ssize_t xlat_print_node (fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t const *node, fr_sbuff_escape_rules_t const *e_rules, char c)
 
int xlat_purify_list (xlat_exp_head_t *head, request_t *request)
 
int xlat_register_expressions (void)
 
void xlat_signal (xlat_func_signal_t signal, xlat_exp_t const *exp, request_t *request, void *rctx, fr_signal_t action)
 Signal an xlat function. More...
 
fr_dict_attr_t const * xlat_time_res_attr (char const *res)
 
int xlat_tokenize_expansion (xlat_exp_head_t *head, fr_sbuff_t *in, tmpl_rules_t const *t_rules)
 

Variables

fr_dict_attr_t const * attr_cast_base
 
fr_dict_attr_t const * attr_expr_bool_enum
 
fr_dict_attr_t const * attr_module_return_code
 
bool const xlat_func_chars [UINT8_MAX+1]
 

Detailed Description

String expansion ("translation").

Id
08132bb64125bcc47c92ba02a93388f4b996c69d

Implements Attribute -> value

Private structures for the xlat tokenizer and xlat eval code.

Definition in file xlat_priv.h.


Data Structure Documentation

◆ xlat_call_t

struct xlat_call_t

An xlat function call.

Definition at line 123 of file xlat_priv.h.

+ Collaboration diagram for xlat_call_t:
Data Fields
xlat_exp_head_t * args arguments to the function call
fr_dict_t const * dict Records the namespace this xlat call was created in.

Used by the purify code to run fake requests in the correct namespace, and accessible to instantiation functions in case the xlat needs to perform runtime resolution of attributes (as with eval()).

bool ephemeral Instance data is ephemeral (not inserted) into the instance tree.
xlat_t const * func The xlat expansion to expand format with.
uint64_t id Identifier unique to each permanent xlat node.

This is used by the instantiation code to order nodes by the time they were created.

xlat_input_type_t input_type The input type used inferred from the bracketing style.
xlat_inst_t * inst Instance data for the xlat_t.
xlat_thread_inst_t * thread_inst Thread specific instance.

ONLY USED FOR EPHEMERAL XLATS.

◆ xlat_exp_head_s

struct xlat_exp_head_s

Definition at line 188 of file xlat_priv.h.

+ Collaboration diagram for xlat_exp_head_s:
Data Fields
fr_dlist_head_t dlist
char const *_CONST file File where the xlat was allocated.
xlat_flags_t flags Flags that control resolution and evaluation.
bool instantiated temporary flag until we fix more things
int line Line where the xlat was allocated.

◆ xlat_exp_s

struct xlat_exp_s

An xlat expansion node.

These nodes form a tree which represents one or more nested expansions.

Definition at line 151 of file xlat_priv.h.

+ Collaboration diagram for xlat_exp_s:
Data Fields
union xlat_exp_s __unnamed__
fr_dlist_t entry
char const *_CONST file File where the xlat was allocated.
xlat_flags_t flags Flags that control resolution and evaluation.
char const *_CONST fmt The original format string (a talloced buffer).
int line Line where the xlat was allocated.
fr_token_t quote Type of quoting around XLAT_GROUP types.
xlat_type_t _CONST type type of this expansion.

◆ xlat_exp_s.__unnamed103__

union xlat_exp_s.__unnamed103__

Definition at line 165 of file xlat_priv.h.

Data Fields
xlat_call_t call An xlat function call.
fr_value_box_t data A value box.
xlat_exp_head_t * group children of a group
int regex_index A capture group, i.e.

for %{1} and friends

tmpl_t * vpt An tmpl_t reference.

May be an attribute to expand, or an exec reference, or a value-box, ...

◆ xlat_out_t

struct xlat_out_t

Definition at line 199 of file xlat_priv.h.

Data Fields
size_t len Length of the output string.
char const * out Output data.

◆ xlat_s

struct xlat_s

Definition at line 59 of file xlat_priv.h.

+ Collaboration diagram for xlat_s:
Data Fields
xlat_arg_parser_t const * args Definition of args consumed.
call_env_method_t const * call_env_method Optional tmpl expansions performed before calling the xlat.

Typically used for xlats which refer to tmpls in their module config.

xlat_detach_t detach Destructor for when xlat instances are freed.
xlat_flags_t flags various flags
xlat_func_t func async xlat function (async unsafe).
fr_rb_node_t func_node Entry in the xlat function tree.
xlat_input_type_t input_type Type of input used.
size_t inst_size Size of instance data to pre-allocate.
char const * inst_type C type of instance structure.
xlat_instantiate_t instantiate Instantiation function.
bool internal If true, cannot be redefined.
module_inst_ctx_t * mctx Original module instantiation ctx if this xlat was registered by a module.
fr_dlist_t mi_entry Entry in the list of functions registered to a module instance.
char const * name Name of xlat function.
xlat_print_t print function to call when printing
xlat_purify_t purify function to call when purifying the node.
xlat_resolve_t resolve function to call when resolving
fr_value_box_safe_for_t return_safe_for Escaped value to set in output boxes.
fr_type_t return_type Function is guaranteed to return one or more boxes of this type.

If the return type is FR_TYPE_VOID then the xlat function can return any type of output.

xlat_thread_detach_t thread_detach Destructor for when xlat thread instance data is freed.
size_t thread_inst_size Size of the thread instance data to pre-allocate.
char const * thread_inst_type C type of thread instance structure.
xlat_thread_instantiate_t thread_instantiate Thread instantiation function.
void * thread_uctx uctx to pass to instantiation functions.
fr_token_t token for expressions
void * uctx uctx to pass to instantiation functions.

Macro Definition Documentation

◆ _CONST

#define _CONST   const

Definition at line 54 of file xlat_priv.h.

◆ XLAT_DEBUG

#define XLAT_DEBUG (   ...)

Definition at line 44 of file xlat_priv.h.

◆ xlat_exp_alloc

#define xlat_exp_alloc (   _ctx,
  _type,
  _in,
  _inlen 
)    _xlat_exp_alloc(NDEBUG_LOCATION_EXP _ctx, _type, _in, _inlen)

Definition at line 280 of file xlat_priv.h.

◆ xlat_exp_alloc_null

#define xlat_exp_alloc_null (   _ctx)    _xlat_exp_alloc_null(NDEBUG_LOCATION_EXP _ctx)

Definition at line 277 of file xlat_priv.h.

◆ xlat_exp_foreach

#define xlat_exp_foreach (   _list_head,
  _iter 
)    fr_dlist_foreach(&((_list_head)->dlist), xlat_exp_t, _iter)

Iterate over the contents of a list, only one level.

Parameters
[in]_list_headto iterate over.
[in]_iterName of iteration variable. Will be declared in the scope of the loop.

Definition at line 220 of file xlat_priv.h.

◆ xlat_exp_head_alloc

#define xlat_exp_head_alloc (   _ctx)    _xlat_exp_head_alloc(NDEBUG_LOCATION_EXP _ctx)

Definition at line 271 of file xlat_priv.h.

◆ xlat_exp_set_type

#define xlat_exp_set_type (   _node,
  _type 
)    _xlat_exp_set_type(NDEBUG_LOCATION_EXP _node, _type)

Definition at line 274 of file xlat_priv.h.

Typedef Documentation

◆ xlat_t

typedef struct xlat_s xlat_t

◆ xlat_walker_t

typedef int(* xlat_walker_t) (xlat_exp_t *exp, void *uctx)

Walker callback for xlat_walk()

Parameters
[in]expbeing evaluated.
[in]uctxpassed to xlat_walk.
Returns
  • 1 for "prune walk here".
  • 0 on success.
  • <0 if node evaluation failed. Causes xlat_walk to return the negative integer.

Definition at line 265 of file xlat_priv.h.

Enumeration Type Documentation

◆ xlat_type_t

Enumerator
XLAT_INVALID 

Bad expansion.

XLAT_BOX 

fr_value_box_t

XLAT_ONE_LETTER 

Special "one-letter" expansion.

XLAT_FUNC 

xlat module

XLAT_FUNC_UNRESOLVED 

func needs resolution during pass2.

XLAT_VIRTUAL 

virtual attribute

XLAT_VIRTUAL_UNRESOLVED 

virtual attribute needs resolution during pass2.

XLAT_TMPL 

xlat attribute

XLAT_GROUP 

encapsulated string of xlats

Definition at line 105 of file xlat_priv.h.

Function Documentation

◆ _xlat_exp_alloc()

xlat_exp_t* _xlat_exp_alloc ( NDEBUG_LOCATION_ARGS TALLOC_CTX *  ctx,
xlat_type_t  type,
char const *  in,
size_t  inlen 
)

Allocate an xlat node.

Parameters
[in]ctxto allocate node in.
[in]typeof the node.
[in]inoriginal input string.
[in]inlenthe length of the original input string.
Returns
A new xlat node.

Definition at line 138 of file xlat_alloc.c.

+ Here is the call graph for this function:

◆ _xlat_exp_alloc_null()

xlat_exp_t* _xlat_exp_alloc_null ( NDEBUG_LOCATION_ARGS TALLOC_CTX *  ctx)

Allocate an xlat node with no name, and no type set.

Parameters
[in]ctxto allocate node in.
Returns
A new xlat node.

Definition at line 125 of file xlat_alloc.c.

+ Here is the call graph for this function:

◆ _xlat_exp_head_alloc()

xlat_exp_head_t* _xlat_exp_head_alloc ( NDEBUG_LOCATION_ARGS TALLOC_CTX *  ctx)

Definition at line 35 of file xlat_alloc.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _xlat_exp_set_type()

void _xlat_exp_set_type ( NDEBUG_LOCATION_ARGS xlat_exp_t node,
xlat_type_t  type 
)

Set the type of an xlat node.

Also initialises any xlat_exp_head necessary

Parameters
[in]nodeto set type for.
[in]typeto set.

Definition at line 58 of file xlat_alloc.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlang_xlat_init()

void unlang_xlat_init ( void  )

Register xlat operation with the interpreter.

Definition at line 680 of file xlat.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlang_xlat_push_node()

int unlang_xlat_push_node ( TALLOC_CTX *  ctx,
bool p_success,
fr_value_box_list_t *  out,
request_t request,
xlat_exp_t node 
)

Push a pre-compiled xlat onto the stack for evaluation.

Parameters
[in]ctxTo allocate value boxes and values in.
[out]p_successIf set, and execution succeeds, true will be written here. If execution fails, false will be written.
[out]outWhere to write the result of the expansion.
[in]requestto push xlat onto.
[in]nodeto evaluate. Only this node will be evaluated.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 294 of file xlat.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_decode_value_box_list()

int xlat_decode_value_box_list ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
request_t request,
void *  decode_ctx,
fr_pair_decode_t  decode,
fr_value_box_list_t *  in 
)

Decode all of the value boxes into the output cursor.

Parameters
[in]ctxto allocate new pairs in.
[in]outthe cursor to update
[in]requestthe request
[in]decode_ctxAny decode specific data such as secrets or configurable.
[in]decodethe function used to decode one specific pair.
[in]inthe list of value boxes to decode
Returns
  • <= 0 on error. May be the offset (as a negative value) where the error occurred.
  • > 0 on success. How many value boxes were decoded

Definition at line 90 of file xlat_pair.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_eval_free()

void xlat_eval_free ( void  )

Definition at line 1739 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_eval_init()

int xlat_eval_init ( void  )

Definition at line 1714 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_eval_walk()

int xlat_eval_walk ( xlat_exp_head_t head,
xlat_walker_t  walker,
xlat_type_t  type,
void *  uctx 
)

Walk over all xlat nodes (depth first) in a xlat expansion, calling a callback.

Parameters
[in]headto evaluate.
[in]walkercallback to pass nodes to.
[in]typeif > 0 a mask of types to call walker for.
[in]uctxto pass to walker.
Returns
  • 0 on success (walker always returned 0).
  • <0 if walker returned <0.

Definition at line 1650 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_exp_head()

static xlat_exp_t* xlat_exp_head ( xlat_exp_head_t const *  head)
inlinestatic

Definition at line 207 of file xlat_priv.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_exp_insert_tail()

static int xlat_exp_insert_tail ( xlat_exp_head_t head,
xlat_exp_t node 
)
inlinestatic

Definition at line 236 of file xlat_priv.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_exp_next()

static xlat_exp_t* xlat_exp_next ( xlat_exp_head_t const *  head,
xlat_exp_t const *  node 
)
inlinestatic

Definition at line 244 of file xlat_priv.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_exp_set_name()

void xlat_exp_set_name ( xlat_exp_t node,
char const *  fmt,
size_t  len 
)

Set the format string for an xlat node.

Parameters
[in]nodeto set fmt for.
[in]fmttalloced buffer to set as the fmt string.
[in]lenof fmt string.

Definition at line 191 of file xlat_alloc.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_exp_set_name_buffer()

void xlat_exp_set_name_buffer ( xlat_exp_t node,
char const *  fmt 
)

Set the format string for an xlat node, copying from a talloc'd buffer.

Parameters
[in]nodeto set fmt for.
[in]fmttalloced buffer to set as the fmt string.

Definition at line 202 of file xlat_alloc.c.

+ Here is the call graph for this function:

◆ xlat_exp_set_name_buffer_shallow()

void xlat_exp_set_name_buffer_shallow ( xlat_exp_t node,
char const *  fmt 
)

Set the format string for an xlat node from a pre-existing buffer.

Parameters
[in]nodeto set fmt for.
[in]fmttalloced buffer to set as the fmt string.

Definition at line 213 of file xlat_alloc.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_flags_merge()

static void xlat_flags_merge ( xlat_flags_t parent,
xlat_flags_t const *  child 
)
inlinestatic

Merge flags from child to parent.

For pass2, if either the parent or child is marked up for pass2, then the parent is marked up for pass2.

Definition at line 227 of file xlat_priv.h.

+ Here is the caller graph for this function:

◆ xlat_frame_eval()

xlat_action_t xlat_frame_eval ( TALLOC_CTX *  ctx,
fr_dcursor_t out,
xlat_exp_head_t const **  child,
request_t request,
xlat_exp_head_t const *  head,
xlat_exp_t const **  in 
)

Converts xlat nodes to value boxes.

Evaluates a single level of expansions.

Parameters
[in]ctxto allocate value boxes in.
[out]outa list of fr_value_box_t to append to.
[out]childto evaluate. If a child needs to be evaluated by the caller, we return XLAT_ACTION_PUSH_CHILD and place the child to be evaluated here. Once evaluation is complete, the caller should call us with the same xlat_exp_t and the result of the nested evaluation in result.
[in]requestthe current request.
[in]headof the list to evaluate
[in,out]inxlat node to evaluate. Advanced as we process additional xlat_exp_t.
Returns
  • XLAT_ACTION_PUSH_CHILD if we need to evaluate a deeper level of nested. child will be filled with the node that needs to be evaluated. call xlat_frame_eval_repeat on this node, once there are results from the nested expansion.
  • XLAT_ACTION_YIELD a resumption frame was pushed onto the stack by an xlat function and we need to wait for the request to be resumed before continuing.
  • XLAT_ACTION_DONE we're done, pop the frame.
  • XLAT_ACTION_FAIL an xlat module failed.

Definition at line 1110 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_frame_eval_repeat()

xlat_action_t xlat_frame_eval_repeat ( TALLOC_CTX *  ctx,
fr_dcursor_t out,
xlat_exp_head_t const **  child,
request_t request,
xlat_exp_head_t const *  head,
xlat_exp_t const **  in,
void *  env_data,
fr_value_box_list_t *  result 
)

Process the result of a previous nested expansion.

Parameters
[in]ctxto allocate value boxes in.
[out]outa list of fr_value_box_t to append to.
[out]childto evaluate. If a child needs to be evaluated by the caller, we return XLAT_ACTION_PUSH_CHILD and place the child to be evaluated here. Once evaluation is complete, the caller should call us with the same xlat_exp_t and the result of the nested evaluation in result.
[in]requestthe current request.
[in]headof the list to evaluate
[in,out]inxlat node to evaluate. Advanced as we process additional xlat_exp_t.
[in]env_dataExpanded call env.
[in]resultof a previous nested evaluation.

Definition at line 944 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_frame_eval_resume()

xlat_action_t xlat_frame_eval_resume ( TALLOC_CTX *  ctx,
fr_dcursor_t out,
xlat_exp_head_t const **  child,
request_t request,
xlat_exp_head_t const *  head,
xlat_exp_t const **  in,
fr_value_box_list_t *  result,
xlat_func_t  resume,
void *  rctx 
)

Call an xlat's resumption method.

Parameters
[in]ctxto allocate value boxes in.
[out]outa list of fr_value_box_t to append to.
[out]childto evaluate. If a child needs to be evaluated by the caller, we return XLAT_ACTION_PUSH_CHILD and place the child to be evaluated here. Once evaluation is complete, the caller should call us with the same xlat_exp_t and the result of the nested evaluation in result.
[in]requestthe current request.
[in]headof the list to evaluate
[in,out]inxlat node to evaluate. Advanced as we process additional xlat_exp_t.
[in]resultPreviously expanded arguments to this xlat function.
[in]resumefunction to call.
[in]rctxOpaque (to us), resume ctx provided by xlat function when it yielded.

Definition at line 870 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_func_find()

xlat_t* xlat_func_find ( char const *  name,
ssize_t  namelen 
)

Definition at line 79 of file xlat_func.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_print_node()

ssize_t xlat_print_node ( fr_sbuff_t out,
xlat_exp_head_t const *  head,
xlat_exp_t const *  node,
fr_sbuff_escape_rules_t const *  e_rules,
char  c 
)

Definition at line 1060 of file xlat_tokenize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_purify_list()

int xlat_purify_list ( xlat_exp_head_t head,
request_t request 
)

Definition at line 60 of file xlat_purify.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_register_expressions()

int xlat_register_expressions ( void  )

Definition at line 1877 of file xlat_expr.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_signal()

void xlat_signal ( xlat_func_signal_t  signal,
xlat_exp_t const *  exp,
request_t request,
void *  rctx,
fr_signal_t  action 
)

Signal an xlat function.

Parameters
[in]signalfunction to call.
[in]expXlat node that previously yielded.
[in]requestThe current request.
[in]rctxOpaque (to us), resume ctx provided by the xlat function when it yielded.
[in]actionWhat the request should do (the type of signal).

Definition at line 836 of file xlat_eval.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_time_res_attr()

fr_dict_attr_t const* xlat_time_res_attr ( char const *  res)

Definition at line 134 of file xlat_eval.c.

+ Here is the caller graph for this function:

◆ xlat_tokenize_expansion()

int xlat_tokenize_expansion ( xlat_exp_head_t head,
fr_sbuff_t in,
tmpl_rules_t const *  t_rules 
)

Definition at line 571 of file xlat_tokenize.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ attr_cast_base

fr_dict_attr_t const* attr_cast_base
extern

Definition at line 50 of file xlat_eval.c.

◆ attr_expr_bool_enum

fr_dict_attr_t const* attr_expr_bool_enum
extern

Definition at line 49 of file xlat_eval.c.

◆ attr_module_return_code

fr_dict_attr_t const* attr_module_return_code
extern

◆ xlat_func_chars

bool const xlat_func_chars[UINT8_MAX+1]
extern

Definition at line 168 of file xlat_tokenize.c.