The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Temporary argument structures for module calls. More...
#include <freeradius-devel/util/event.h>
Go to the source code of this file.
Data Structures | |
struct | module_ctx_t |
Temporary structure to hold arguments for module calls. More... | |
struct | module_detach_ctx_t |
Temporary structure to hold arguments for detach calls. More... | |
struct | module_inst_ctx_t |
Temporary structure to hold arguments for instantiation calls. More... | |
struct | module_thread_inst_ctx_t |
Temporary structure to hold arguments for thread_instantiation calls. More... | |
Macros | |
#define | MODULE_CTX(_mi, _thread, _env_data, _rctx) &(module_ctx_t){ .mi = _mi, .thread = _thread, .env_data = _env_data, .rctx = _rctx } |
Wrapper to create a module_ctx_t as a compound literal. More... | |
#define | MODULE_CTX_FROM_INST(_mctx) &(module_ctx_t){ .mi = (_mctx)->mi } |
Wrapper to create a module_ctx_t as a compound literal from a module_inst_ctx_t. More... | |
#define | MODULE_CTX_FROM_THREAD_INST(_mctx) &(module_ctx_t){ .mi = (_mctx)->mi, .thread = (_mctx)->thread, .env_data = (_mctx)->env_data } |
Wrapper to create a module_ctx_t as a compound literal from a module_inst_ctx_t. More... | |
#define | MODULE_DETACH_CTX(_mi) &(module_detach_ctx_t){ .mi = _mi } |
Wrapper to create a module_detach_ctx_t as a compound literal. More... | |
#define | MODULE_INST_CTX(_mi) &(module_inst_ctx_t){ .mi = _mi } |
Wrapper to create a module_inst_ctx_t as a compound literal. More... | |
#define | MODULE_THREAD_INST_CTX(_mi, _thread, _el) &(module_thread_inst_ctx_t){ .mi = _mi, .thread = _thread, .el = _el } |
Wrapper to create a module_thread_inst_ctx_t as a compound literal. More... | |
#define | MODULE_THREAD_INST_CTX_FROM_INST_CTX(_mctx) &(module_ctx_t){ .mi = (_mctx)->mi } |
Wrapper to create a module_inst_ctx_t as a comound listeral from a module_thread_ctx_t. More... | |
Typedefs | |
typedef struct module_instance_s | module_instance_t |
Functions | |
static module_ctx_t * | module_ctx_dup (TALLOC_CTX *ctx, module_ctx_t const *mctx) |
Duplicate a stack based module_ctx_t on the heap. More... | |
static module_ctx_t * | module_ctx_from_inst (TALLOC_CTX *ctx, module_inst_ctx_t const *mctx) |
Allocate a module calling ctx on the heap based on an instance ctx. More... | |
static module_ctx_t * | module_ctx_from_thread_inst (TALLOC_CTX *ctx, module_thread_inst_ctx_t const *mctx) |
Allocate a module calling ctx on the heap based on an instance ctx. More... | |
Temporary argument structures for module calls.
These get used in various places where we may not want to include the full module.h.
Definition in file module_ctx.h.
struct module_ctx_t |
Temporary structure to hold arguments for module calls.
Definition at line 41 of file module_ctx.h.
Data Fields | ||
---|---|---|
void * | env_data | Per call environment data. |
module_instance_t const * | mi | Instance of the module being instantiated. |
void * | rctx | Resume ctx that a module previously set. |
void * | thread | Thread specific instance data. |
struct module_detach_ctx_t |
Temporary structure to hold arguments for detach calls.
Definition at line 56 of file module_ctx.h.
Data Fields | ||
---|---|---|
module_instance_t * | mi | Module instance to detach. |
struct module_inst_ctx_t |
Temporary structure to hold arguments for instantiation calls.
Definition at line 50 of file module_ctx.h.
Data Fields | ||
---|---|---|
module_instance_t * | mi | Instance of the module being instantiated. |
struct module_thread_inst_ctx_t |
Temporary structure to hold arguments for thread_instantiation calls.
Definition at line 63 of file module_ctx.h.
Data Fields | ||
---|---|---|
fr_event_list_t * | el | Event list to register any IO handlers and timers against. |
module_instance_t const * | mi |
Instance of the module being instantiated. Must come first to allow cast between module_inst_ctx. |
void * | thread | Thread instance data. |
#define MODULE_CTX | ( | _mi, | |
_thread, | |||
_env_data, | |||
_rctx | |||
) | &(module_ctx_t){ .mi = _mi, .thread = _thread, .env_data = _env_data, .rctx = _rctx } |
Wrapper to create a module_ctx_t as a compound literal.
This is used so that the compiler will flag any uses of (module_ctx_t) which don't set the required fields. Additional arguments should be added to this macro whenever the module_ctx_t fields are altered.
[in] | _mi | of the module being called. |
[in] | _thread | instance of the module being called. |
[in] | _env_data | Call environment data. |
[in] | _rctx | Resume ctx (if any). |
Definition at line 128 of file module_ctx.h.
#define MODULE_CTX_FROM_INST | ( | _mctx | ) | &(module_ctx_t){ .mi = (_mctx)->mi } |
Wrapper to create a module_ctx_t as a compound literal from a module_inst_ctx_t.
This is used so that the compiler will flag any uses of (module_ctx_t) which don't set the required fields. Additional arguments should be added to this macro whenever the module_ctx_t fields are altered.
[in] | _mctx | to copy fields from. |
Definition at line 138 of file module_ctx.h.
#define MODULE_CTX_FROM_THREAD_INST | ( | _mctx | ) | &(module_ctx_t){ .mi = (_mctx)->mi, .thread = (_mctx)->thread, .env_data = (_mctx)->env_data } |
Wrapper to create a module_ctx_t as a compound literal from a module_inst_ctx_t.
This is used so that the compiler will flag any uses of (module_ctx_t) which don't set the required fields. Additional arguments should be added to this macro whenever the module_ctx_t fields are altered.
[in] | _mctx | to copy fields from. |
Definition at line 148 of file module_ctx.h.
#define MODULE_DETACH_CTX | ( | _mi | ) | &(module_detach_ctx_t){ .mi = _mi } |
Wrapper to create a module_detach_ctx_t as a compound literal.
[in] | _mi | of the module being called.. |
Definition at line 164 of file module_ctx.h.
#define MODULE_INST_CTX | ( | _mi | ) | &(module_inst_ctx_t){ .mi = _mi } |
Wrapper to create a module_inst_ctx_t as a compound literal.
This is used so that the compiler will flag any uses of (module_inst_ctx_t) which don't set the required fields. Additional arguments should be added to this macro whenever the module_inst_ctx_t fields are altered.
[in] | _mi | of the module being called.. |
Definition at line 158 of file module_ctx.h.
#define MODULE_THREAD_INST_CTX | ( | _mi, | |
_thread, | |||
_el | |||
) | &(module_thread_inst_ctx_t){ .mi = _mi, .thread = _thread, .el = _el } |
Wrapper to create a module_thread_inst_ctx_t as a compound literal.
This is used so that the compiler will flag any uses of (module_thread_inst_ctx_t) which don't set the required fields. Additional arguments should be added to this macro whenever the module_thread_inst_ctx_t fields are altered.
[in] | _mi | of the module being called. |
[in] | _thread | instance of the module being called. |
[in] | _el | Thread specific event list. |
Definition at line 176 of file module_ctx.h.
#define MODULE_THREAD_INST_CTX_FROM_INST_CTX | ( | _mctx | ) | &(module_ctx_t){ .mi = (_mctx)->mi } |
Wrapper to create a module_inst_ctx_t as a comound listeral from a module_thread_ctx_t.
Extract the module_instance_t from a module_thread_inst_ctx_t.
[in] | _mctx | to extract module_thread_inst_ctx_t from. |
Definition at line 184 of file module_ctx.h.
typedef struct module_instance_s module_instance_t |
Definition at line 1 of file module_ctx.h.
|
static |
Duplicate a stack based module_ctx_t on the heap.
Definition at line 105 of file module_ctx.h.
|
static |
Allocate a module calling ctx on the heap based on an instance ctx.
Definition at line 76 of file module_ctx.h.
|
static |
Allocate a module calling ctx on the heap based on an instance ctx.
Definition at line 90 of file module_ctx.h.