Translates requests between the server an a Lua interpreter.
More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/server/module_rlm.h>
#include "lua.h"
Go to the source code of this file.
Translates requests between the server an a Lua interpreter.
- Id
- 5a0ba9d9ee23a129b831b492fec70268067a5224
- Author
- Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
- Copyright
- 2016 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
-
2016 The FreeRADIUS Server Project.
Definition in file rlm_lua.c.
◆ lua_call_env_t
◆ lua_func_def_t
Definition at line 53 of file rlm_lua.c.
Data Fields |
char const * |
function_name |
Name of the function being called. |
char * |
name1 |
Section name1 where this is called. |
char * |
name2 |
Section name2 where this is called. |
fr_rb_node_t |
node |
Node in tree of function calls. |
◆ LOG_PREFIX
◆ lua_func_def_cmp()
static int8_t lua_func_def_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
How to compare two Lua function calls.
Definition at line 67 of file rlm_lua.c.
◆ lua_func_name_safe()
static void lua_func_name_safe |
( |
char * |
name | ) |
|
|
static |
◆ lua_func_parse()
◆ mod_detach()
Close the global interpreter.
Definition at line 120 of file rlm_lua.c.
◆ mod_instantiate()
◆ mod_lua()
◆ mod_thread_detach()
Free any thread specific interpreters.
Definition at line 89 of file rlm_lua.c.
◆ mod_thread_instantiate()
Create thread-specific connections and buffers.
- Parameters
-
[in] | mctx | specific data (where we write the interpreter). |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 108 of file rlm_lua.c.
◆ lua_method_env
Initial value:= {
}
}
#define CALL_ENV_TERMINATOR
#define FR_CALL_ENV_METHOD_OUT(_inst)
Helper macro for populating the size/type fields of a call_env_method_t from the output structure typ...
@ CALL_ENV_FLAG_PARSE_MISSING
If this subsection is missing, still parse it.
#define FR_CALL_ENV_SUBSECTION_FUNC(_name, _name2, _flags, _func)
Specify a call_env_parser_t which parses a subsection using a callback function.
static int lua_func_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *out, UNUSED tmpl_rules_t const *t_rules, UNUSED CONF_ITEM *ci, call_env_ctx_t const *cec, UNUSED call_env_parser_t const *rule)
Definition at line 288 of file rlm_lua.c.
◆ module_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
#define FR_CONF_OFFSET_FLAGS(_name, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
@ CONF_FLAG_FILE_INPUT
File matching value must exist, and must be readable.
Definition at line 44 of file rlm_lua.c.
◆ rlm_lua
Initial value:= {
.common = {
.name = "lua",
},
.method_group = {
}
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static int mod_detach(module_detach_ctx_t const *mctx)
Close the global interpreter.
static const call_env_method_t lua_method_env
static unlang_action_t mod_lua(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static int mod_thread_instantiate(module_thread_inst_ctx_t const *mctx)
Create thread-specific connections and buffers.
static const conf_parser_t module_config[]
static int mod_thread_detach(module_thread_inst_ctx_t const *mctx)
Free any thread specific interpreters.
static int mod_instantiate(module_inst_ctx_t const *mctx)
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Named methods exported by a module.
Definition at line 306 of file rlm_lua.c.