The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/unlang/tmpl.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... | |
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... | |
Functions | |
static unlang_action_t | list_mod_apply (rlm_rcode_t *p_result, request_t *request) |
Apply a list of modifications on one or more fr_pair_t lists. More... | |
static unlang_action_t | list_mod_create (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
Create a list of modifications to apply to one or more fr_pair_t lists. More... | |
static unlang_action_t | map_proc_apply (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
static unlang_action_t | map_proc_resume (UNUSED rlm_rcode_t *p_result, UNUSED request_t *request, UNUSED unlang_stack_frame_t *frame) |
void | unlang_map_init (void) |
static unlang_action_t | unlang_map_state_init (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
static unlang_action_t | unlang_update_state_init (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
Execute an update block. More... | |
struct unlang_frame_state_map_proc_t |
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 73 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 119 of file map.c.
|
static |
|
static |
void unlang_map_init | ( | void | ) |
|
static |
|
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 260 of file map.c.