![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/map.h>
#include <freeradius-devel/unlang/tmpl.h>
#include <freeradius-devel/unlang/map.h>
#include "map_priv.h"
Go to the source code of this file.
Data Structures | |
struct | unlang_frame_state_map_proc_t |
State of a map block. More... | |
struct | unlang_frame_state_update_t |
State of an update block. More... | |
Macros | |
#define | MAP_CTX(_mod_inst, _map_inst, _rctx) &(map_ctx_t){ .moi = _mod_inst, .mpi = _map_inst, .rctx = _rctx } |
Wrapper to create a map_ctx_t as a compound literal. | |
Enumerations | |
enum | unlang_update_state_t { UNLANG_UPDATE_MAP_INIT = 0 , UNLANG_UPDATE_MAP_EXPANDED_LHS , UNLANG_UPDATE_MAP_EXPANDED_RHS } |
map and unlang integration. More... | |
struct unlang_frame_state_map_proc_t |
Data Fields | ||
---|---|---|
void * | rctx | for resume / signal |
map_proc_func_t | resume | resumption handler |
fr_signal_t | sigmask | Signals to block. |
unlang_map_signal_t | signal | for signal handlers |
fr_value_box_list_t | src_result | Result of expanding the map source. |
struct unlang_frame_state_update_t |
Data Fields | ||
---|---|---|
fr_value_box_list_t | lhs_result | Result of expanding the LHS. |
fr_dcursor_t | maps | Cursor of maps to evaluate. |
fr_value_box_list_t | rhs_result | Result of expanding the RHS. |
unlang_update_state_t | state | What we're currently doing. |
fr_dlist_head_t | vlm_head | Head of list of VP List Mod. |
map and unlang integration.
Unlang "map" keyword evaluation.
|
static |
Apply a list of modifications on one or more fr_pair_t lists.
[in] | request | The current request. |
[out] | p_result | The rcode indicating what the result of the operation was. |
Definition at line 91 of file map.c.
|
static |
Create a list of modifications to apply to one or more fr_pair_t lists.
[out] | p_result | The rcode indicating what the result of the operation was. |
[in] | request | The current request. |
[in] | frame | Current stack frame. |
Definition at line 135 of file map.c.
|
static |
|
static |
void unlang_map_init | ( | void | ) |
|
static |
unlang_action_t unlang_map_yield | ( | request_t * | request, |
map_proc_func_t | resume, | ||
unlang_map_signal_t | signal, | ||
fr_signal_t | sigmask, | ||
void * | rctx | ||
) |
Yield a request back to the interpreter from within a module.
This passes control of the request back to the unlang interpreter, setting callbacks to execute when the request is 'signalled' asynchronously, or whatever timer or I/O event the module was waiting for occurs.
return unlang_module_yield(...)
.[in] | request | The current request. |
[in] | resume | Called on unlang_interpret_mark_runnable(). |
[in] | signal | Called on unlang_action(). |
[in] | sigmask | Set of signals to block. |
[in] | rctx | to pass to the callbacks. |
Definition at line 344 of file map.c.
|
static |
Execute an update block.
Update blocks execute in two phases, first there's an evaluation phase where each input map is evaluated, outputting one or more modification maps. The modification maps detail a change that should be made to a list in the current request. The request is not modified during this phase.
The second phase applies those modification maps to the current request. This re-enables the atomic functionality of update blocks provided in v2.x.x. If one map fails in the evaluation phase, no more maps are processed, and the current result is discarded.
Definition at line 270 of file map.c.