![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Create instance data for xlat function calls. More...
#include <freeradius-devel/io/schedule.h>#include <freeradius-devel/server/base.h>#include <freeradius-devel/unlang/call_env.h>#include <freeradius-devel/unlang/xlat_priv.h>
Include dependency graph for xlat_inst.c:Go to the source code of this file.
Functions | |
| static int8_t | _xlat_inst_cmp (void const *one, void const *two) |
| Compare two xlat instances based on node pointer. | |
| static int | _xlat_inst_detach (xlat_inst_t *xi) |
| Destructor for xlat_inst_t. | |
| static int | _xlat_inst_walker (xlat_exp_t *node, UNUSED void *uctx) |
| static int | _xlat_instantiate_ephemeral_walker (xlat_exp_t *node, void *uctx) |
| Callback for creating "ephemeral" instance data for a xlat_exp_t. | |
| static int8_t | _xlat_thread_inst_cmp (void const *one, void const *two) |
| Compare two thread instances based on node pointer. | |
| static int | _xlat_thread_inst_detach (xlat_thread_inst_t *xt) |
| Destructor for xlat_thread_inst_t. | |
| int | xlat_finalize (xlat_exp_head_t *head, fr_event_list_t *runtime_el) |
| Bootstrap static xlats, or instantiate ephemeral ones. | |
| static xlat_inst_t * | xlat_inst_alloc (xlat_exp_t *node) |
| Allocate instance data for an xlat expansion. | |
| static int | xlat_instance_register (xlat_exp_head_t *head) |
| Create instance data for "permanent" xlats. | |
| int | xlat_instance_register_func (xlat_exp_t *node) |
| Callback for creating "permanent" instance data for a xlat_exp_t. | |
| int | xlat_instance_unregister_func (xlat_exp_t *node) |
| Remove a node from the list of xlat instance data. | |
| void | xlat_instances_free (void) |
| Walk over all registered instance data and free them explicitly. | |
| int | xlat_instantiate (void) |
| Call instantiation functions for all registered, "permanent" xlats. | |
| static int | xlat_instantiate_ephemeral (xlat_exp_head_t *head, fr_event_list_t *el) |
| Create instance data for "ephemeral" xlats. | |
| static int | xlat_instantiate_init (void) |
| Initialise the xlat instance data code. | |
| void | xlat_thread_detach (void) |
| Destroy any thread specific xlat instances. | |
| static xlat_thread_inst_t * | xlat_thread_inst_alloc (TALLOC_CTX *ctx, fr_event_list_t *el, xlat_inst_t *xi) |
| Create thread instances where needed. | |
| xlat_thread_inst_t * | xlat_thread_instance_find (xlat_exp_t const *node) |
| Retrieve xlat/thread specific instance data. | |
| int | xlat_thread_instantiate (TALLOC_CTX *ctx, fr_event_list_t *el) |
| Create thread specific instance tree and create thread instances. | |
Variables | |
| return | |
| static fr_heap_t * | xlat_inst_tree |
| Holds instance data created by xlat_instantiate. | |
| static _Thread_local fr_heap_t * | xlat_thread_inst_tree |
| Holds thread specific instance data created by xlat_instantiate. | |
Create instance data for xlat function calls.
Definition in file xlat_inst.c.
|
static |
Compare two xlat instances based on node pointer.
| [in] | one | First xlat expansion instance. |
| [in] | two | Second xlat expansion instance. |
Definition at line 47 of file xlat_inst.c.
Here is the caller graph for this function:
|
static |
Destructor for xlat_inst_t.
Calls detach method if provided by xlat expansion
Definition at line 178 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 629 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Callback for creating "ephemeral" instance data for a xlat_exp_t.
| [in] | node | to create "ephemeral" instance data for. |
| [in] | uctx | event list passed to xlat thread instantiation functions. |
Definition at line 298 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Compare two thread instances based on node pointer.
| [in] | one | First thread specific xlat expansion instance. |
| [in] | two | Second thread specific xlat expansion instance. |
Definition at line 60 of file xlat_inst.c.
Here is the caller graph for this function:
|
static |
Destructor for xlat_thread_inst_t.
Calls thread_detach method if provided by xlat expansion
Definition at line 75 of file xlat_inst.c.
Here is the caller graph for this function:| int xlat_finalize | ( | xlat_exp_head_t * | head, |
| fr_event_list_t * | runtime_el | ||
| ) |
Bootstrap static xlats, or instantiate ephemeral ones.
| [in] | head | of xlat tree to create instance data for. |
| [in] | runtime_el | determines whether we do ephemeral or static instantiation. If NULL, we perform static instantiation, otherwise will perform ephemeral instantiation passing the el to the instantiation functions. |
Definition at line 693 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Allocate instance data for an xlat expansion.
| [in] | node | to allocate instance data for. |
Definition at line 212 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Create instance data for "permanent" xlats.
| [in] | head | of xlat tree to create instance data for. Will walk the entire tree registering all the xlat function calls for later instantiation. |
Definition at line 654 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int xlat_instance_register_func | ( | xlat_exp_t * | node | ) |
Callback for creating "permanent" instance data for a xlat_exp_t.
This function records the xlat_exp_t requiring instantiation but does not call the instantiation function. This is to allow for a clear separation between the module instantiation phase and the xlat instantiation phase.
| [in] | node | to create "permanent" instance data for. |
Definition at line 593 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int xlat_instance_unregister_func | ( | xlat_exp_t * | node | ) |
Remove a node from the list of xlat instance data.
| [in] | node | to remove instance data for. |
Definition at line 548 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void xlat_instances_free | ( | void | ) |
Walk over all registered instance data and free them explicitly.
This must be called before any modules or xlats are deregistered/unloaded and before the mainconfig is freed, as the xlat_t need to still exist in order to call the detach functions within them.
Definition at line 707 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int xlat_instantiate | ( | void | ) |
Call instantiation functions for all registered, "permanent" xlats.
Should be called after all the permanent xlats have been tokenised/bootstrapped.
Definition at line 511 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Create instance data for "ephemeral" xlats.
| [in] | head | of xlat tree to create instance data for. |
| [in] | el | event list used to run any instantiate data |
Definition at line 375 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Initialise the xlat instance data code.
Definition at line 497 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void xlat_thread_detach | ( | void | ) |
Destroy any thread specific xlat instances.
Definition at line 487 of file xlat_inst.c.
Here is the caller graph for this function:
|
static |
Create thread instances where needed.
| [in] | ctx | to allocate thread instance data in. |
| [in] | el | event list to register I/O handlers against. |
| [in] | xi | to allocate thread-instance data for. |
Definition at line 103 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xlat_thread_inst_t * xlat_thread_instance_find | ( | xlat_exp_t const * | node | ) |
Retrieve xlat/thread specific instance data.
| [in] | node | to find thread specific data for. |
Definition at line 405 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int xlat_thread_instantiate | ( | TALLOC_CTX * | ctx, |
| fr_event_list_t * | el | ||
| ) |
Create thread specific instance tree and create thread instances.
This should be called directly after the modules_thread_instantiate() function.
Memory will be freed automatically when the thread exits.
| [in] | ctx | to bind instance tree lifetime to. Must not be shared between multiple threads. |
| [in] | el | Event list to pass to all thread instantiation functions. |
Definition at line 442 of file xlat_inst.c.
Here is the call graph for this function:
Here is the caller graph for this function:| return |
Definition at line 481 of file xlat_inst.c.
|
static |
Holds instance data created by xlat_instantiate.
Definition at line 35 of file xlat_inst.c.
|
static |
Holds thread specific instance data created by xlat_instantiate.
Definition at line 39 of file xlat_inst.c.
1.9.8