22 RCSIDH(lua_h,
"$Id: f61ffb1e706c2ae9060d546c63d9cb63667d3541 $")
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.
void fr_lua_util_jit_log_warn(char const *msg)
Emit a warning log message.
const char * func_post_auth
Name of function to run after authentication.
unlang_action_t fr_lua_run(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request, char const *funcname)
module_ctx_t const * fr_lua_util_get_mctx(void)
Get the thread local instance.
bool threads
Whether to create new interpreters on a per-instance/per-thread basis, or use a single mutex protecte...
const char * func_preacct
Name of function to run on preacct.
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.
void fr_lua_util_set_request(request_t *request)
Set the thread local request.
void fr_lua_util_fr_register(lua_State *L)
char const * fr_lua_version(lua_State *L)
const char * func_authorize
Name of function to run on authorization.
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.
const char * module
Full path to lua script to load and execute.
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.
const char * func_authenticate
Name of function to run on authentication.
request_t * fr_lua_util_get_request(void)
Get the thread local request.
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.
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.
const char * func_instantiate
Name of function to run on instantiation.
const char * func_accounting
Name of function to run on accounting.
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.
rlm_rcode_t
Return codes indicating the result of the module call.
static size_t char ** out