22RCSIDH(lua_h,
"$Id: 52f7c803b71ee440aa7dea15a686250efc677674 $")
34#include <freeradius-devel/server/base.h>
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
#define L(_str)
Helper for initialising arrays of string literals.
Library function signatures for lua module.
const char *const char * func_instantiate
< Full path to lua script to load and execute.
void fr_lua_util_jit_log_warn(char const *msg)
Emit a warning log message.
fr_rb_tree_t funcs
Tree of function calls found by call_env parser.
unlang_action_t fr_lua_run(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request, char const *funcname)
bool threads
Whether to create new interpreters on a per-instance/per-thread basis, or use a single mutex protecte...
int fr_lua_util_jit_log_register(lua_State *L)
Insert cdefs into the lua environment.
void fr_lua_util_set_mctx(module_ctx_t const *mctx)
Set the thread local instance.
request_t * fr_lua_util_get_request(void)
Get the thread local request.
char const * fr_lua_version(lua_State *L)
bool funcs_init
Has the tree been initialised.
void fr_lua_util_set_request(request_t *request)
Set the thread local request.
void fr_lua_util_fr_register(lua_State *L)
void fr_lua_util_jit_log_error(char const *msg)
Emit a error log message.
const char * func_xlat
Name of function to be called for string expansions.
void fr_lua_util_jit_log_debug(char const *msg)
Emit a debug log message.
lua_State * interpreter
Interpreter used for single threaded mode, and environment tests.
bool fr_lua_isjit(lua_State *L)
Check whether the Lua interpreter were actually linked to is LuaJIT.
int fr_lua_check_func(module_inst_ctx_t const *mctx, lua_State *L, char const *name)
Check if a given function was loaded into an index in the global table.
int fr_lua_util_log_register(lua_State *L)
Register utililiary functions in the lua environment.
void fr_lua_util_jit_log_info(char const *msg)
Emit an info log message.
module_ctx_t const * fr_lua_util_get_mctx(void)
Get the thread local instance.
bool jit
Whether the linked interpreter is Lua 5.1 or LuaJIT.
int fr_lua_init(lua_State **out, module_inst_ctx_t const *mctx)
Initialise a new Lua/LuaJIT interpreter.
lua_State * interpreter
Thread specific interpreter.
const char * func_detach
Name of function to run on detach.
Temporary structure to hold arguments for module calls.
Temporary structure to hold arguments for instantiation calls.
The main red black tree structure.
rlm_rcode_t
Return codes indicating the result of the module call.
static size_t char ** out