The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Register xlat functions for calling redundant xlats. More...
#include <talloc.h>
#include <freeradius-devel/unlang/interpret.h>
#include <freeradius-devel/unlang/xlat_redundant.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <freeradius-devel/unlang/xlat_priv.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/unlang/xlat.h>
#include <freeradius-devel/util/dlist.h>
#include <freeradius-devel/util/rand.h>
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/util/sbuff.h>
Go to the source code of this file.
Data Structures | |
struct | xlat_redundant_func_t |
struct | xlat_redundant_inst_t |
struct | xlat_redundant_rctx_t |
struct | xlat_redundant_t |
Enumerations | |
enum | xlat_redundant_type_t { XLAT_REDUNDANT_INVALID = 0 , XLAT_REDUNDANT , XLAT_LOAD_BALANCE , XLAT_REDUNDANT_LOAD_BALANCE } |
Functions | |
static int8_t | module_qualified_xlat_cmp (void const *a, void const *b) |
static int8_t | module_xlat_cmp (void const *a, void const *b) |
Compare two module_rlm_xlat_t based on whether they have the same name. More... | |
static xlat_exp_t * | xlat_exp_func_alloc (TALLOC_CTX *ctx, xlat_t const *func, xlat_exp_head_t const *args) |
Allocate an xlat node to call an xlat function. More... | |
static xlat_action_t | xlat_load_balance_resume (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *in) |
Pass back the result from a single redundant child call. More... | |
static xlat_action_t | xlat_redundant (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, UNUSED fr_value_box_list_t *in) |
xlat "redundant", "load-balance" and "redundant-load-balance" processing More... | |
static void | xlat_redundant_add_xlat (xlat_redundant_t *xr, xlat_t const *x) |
static int | xlat_redundant_instantiate (xlat_inst_ctx_t const *xctx) |
Allocate additional nodes for evaluation. More... | |
static xlat_action_t | xlat_redundant_resume (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, UNUSED fr_value_box_list_t *in) |
Pass back the result from a single redundant child call. More... | |
int | xlat_register_redundant (CONF_SECTION *cs) |
Registers a redundant xlat. More... | |
Variables | |
static xlat_arg_parser_t const | xlat_redundant_args [] |
Register xlat functions for calling redundant xlats.
Definition in file xlat_redundant.c.
struct xlat_redundant_func_t |
Definition at line 62 of file xlat_redundant.c.
Data Fields | ||
---|---|---|
fr_dlist_t | entry | Entry in the redundant function list. |
xlat_t const * | func | Resolved xlat function. |
struct xlat_redundant_inst_t |
Definition at line 73 of file xlat_redundant.c.
Data Fields | ||
---|---|---|
xlat_exp_head_t ** | ex | Array of xlat expressions created by tokenizing the arguments to the redundant xlat, then duplicating them multiple times, one for each xlat function that may be called. |
xlat_redundant_t * | xr | Information about the redundant xlat. |
struct xlat_redundant_rctx_t |
Definition at line 81 of file xlat_redundant.c.
Data Fields | ||
---|---|---|
xlat_exp_head_t ** | current | Last function called, used for redundant xlats. |
xlat_exp_head_t ** | first |
First function called. Used for redundant-load-balance. |
bool | last_success | Did the last call succeed? |
struct xlat_redundant_t |
Definition at line 67 of file xlat_redundant.c.
Data Fields | ||
---|---|---|
CONF_SECTION * | cs | That this redundant xlat list was created from. |
fr_dlist_head_t | funcs | List of redundant xlat functions. |
xlat_redundant_type_t | type | Type of redundant xlat expression. |
Definition at line 48 of file xlat_redundant.c.
|
static |
Definition at line 383 of file xlat_redundant.c.
|
static |
Compare two module_rlm_xlat_t based on whether they have the same name.
Definition at line 360 of file xlat_redundant.c.
|
static |
Allocate an xlat node to call an xlat function.
[in] | ctx | to allocate the new node in. |
[in] | func | to call. |
[in] | args | Arguments to the function. Will be copied, and freed when the new xlat node is freed. |
Definition at line 207 of file xlat_redundant.c.
|
static |
Pass back the result from a single redundant child call.
Definition at line 134 of file xlat_redundant.c.
|
inlinestatic |
Definition at line 346 of file xlat_redundant.c.
|
static |
Allocate additional nodes for evaluation.
Definition at line 253 of file xlat_redundant.c.
|
static |
Pass back the result from a single redundant child call.
Definition at line 92 of file xlat_redundant.c.
int xlat_register_redundant | ( | CONF_SECTION * | cs | ) |
Registers a redundant xlat.
These xlats wrap the xlat methods of the modules in a redundant section, emulating the behaviour of a redundant section, but over xlats.
Definition at line 406 of file xlat_redundant.c.
|
static |
Definition at line 340 of file xlat_redundant.c.