#include <freeradius-devel/server/global_lib.h>
#include <freeradius-devel/server/main_config.h>
#include <freeradius-devel/util/atexit.h>
Go to the source code of this file.
◆ global_lib_inst_t
Structure to track use of libraries.
Definition at line 46 of file global_lib.c.
Data Fields |
global_lib_autoinst_t const * |
autoinit |
Autoinit structure used to manage this library. |
fr_rb_node_t |
entry |
Entry in tree of libraries. |
bool |
initialised |
Has the init callback been run for this library. |
uint32_t |
instance_count |
Number of current uses of this library. |
◆ global_lib_list_t
◆ _lib_cmp()
static int8_t _lib_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
◆ _lib_list_free_atexit()
static int _lib_list_free_atexit |
( |
UNUSED void * |
uctx | ) |
|
|
static |
Free global list of libraries.
Called as an atexit function
Definition at line 194 of file global_lib.c.
◆ global_lib_auto_instantiate()
int global_lib_auto_instantiate |
( |
UNUSED dl_t const * |
module, |
|
|
void * |
symbol, |
|
|
UNUSED void * |
user_ctx |
|
) |
| |
Callback for creation of "lib" symbols.
Definition at line 137 of file global_lib.c.
◆ global_lib_autofree()
void global_lib_autofree |
( |
UNUSED dl_t const * |
module, |
|
|
void * |
symbol, |
|
|
UNUSED void * |
user_ctx |
|
) |
| |
Callback for freeing of "lib" symbols.
Definition at line 174 of file global_lib.c.
◆ global_lib_init()
int global_lib_init |
( |
void |
| ) |
|
Initialise the global list of external libraries.
Definition at line 204 of file global_lib.c.
◆ global_lib_instantiate()
int global_lib_instantiate |
( |
void |
| ) |
|
Walk the tree of libraries and instantiate any which are pending.
Definition at line 218 of file global_lib.c.
◆ lib_auto_instantiate()
Instantiate a list of libraries.
- Parameters
-
to_init | Array of autoinit structures detailing libraries to initialise |
- Returns
- 0 on success
- -1 on failure
Definition at line 98 of file global_lib.c.
◆ lib_autofree()
Run free callbacks for external libraries no-longer in use.
- Parameters
-
[in] | to_free | Array of autoinit structures detailing libraries to free |
Definition at line 148 of file global_lib.c.
◆ lib_init_call()
Parse the global config section for a library and call its init function.
- Parameters
-
[in] | lib | to configure and initialise |
- Returns
- 0 on success
- -1 on failure
Definition at line 60 of file global_lib.c.
◆ global_lib_terminator
◆ lib_list