Helper Lua land functions.
More...
#include <freeradius-devel/server/base.h>
#include "config.h"
#include "lua.h"
#include <lauxlib.h>
#include <lualib.h>
Go to the source code of this file.
Helper Lua land functions.
- Id
- 3ed156b6f79b98de009580e053786a0dc09488d9
- Author
- Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
- Copyright
- 2013 The FreeRADIUS Server Project.
Definition in file util.c.
◆ LOG_PREFIX
◆ _util_log_debug()
static int _util_log_debug |
( |
lua_State * |
L | ) |
|
|
static |
Lua function to output debug messages.
Lua arguments are one or more strings. Each successive argument will be printed on a new line.
- Parameters
-
- Returns
- 0 (no arguments)
Definition at line 55 of file util.c.
◆ _util_log_error()
static int _util_log_error |
( |
lua_State * |
L | ) |
|
|
static |
Lua function to output error messages.
Lua arguments are one or more strings. Each successive argument will be printed on a new line.
- Parameters
-
- Returns
- 0 (no arguments)
Definition at line 125 of file util.c.
◆ _util_log_info()
static int _util_log_info |
( |
lua_State * |
L | ) |
|
|
static |
Lua function to output informational messages.
Lua arguments are one or more strings. Each successive argument will be printed on a new line.
- Parameters
-
- Returns
- 0 (no arguments)
Definition at line 78 of file util.c.
◆ _util_log_newindex()
static int _util_log_newindex |
( |
UNUSED lua_State * |
L | ) |
|
|
static |
◆ _util_log_warn()
static int _util_log_warn |
( |
lua_State * |
L | ) |
|
|
static |
Lua function to output warning messages.
Lua arguments are one or more strings. Each successive argument will be printed on a new line.
- Parameters
-
- Returns
- 0 (no arguments)
Definition at line 102 of file util.c.
◆ fr_lua_util_fr_register()
void fr_lua_util_fr_register |
( |
lua_State * |
L | ) |
|
◆ fr_lua_util_get_mctx()
Get the thread local instance.
- Returns
- mctx all helper and C functions callable from Lua should use.
Definition at line 330 of file util.c.
◆ fr_lua_util_get_request()
Get the thread local request.
- Returns
- request all helper and C functions callable from Lua should use.
Definition at line 348 of file util.c.
◆ fr_lua_util_jit_log_debug()
void fr_lua_util_jit_log_debug |
( |
char const * |
msg | ) |
|
Emit a debug log message.
- Parameters
-
Definition at line 154 of file util.c.
◆ fr_lua_util_jit_log_error()
void fr_lua_util_jit_log_error |
( |
char const * |
msg | ) |
|
Emit a error log message.
- Parameters
-
Definition at line 187 of file util.c.
◆ fr_lua_util_jit_log_info()
void fr_lua_util_jit_log_info |
( |
char const * |
msg | ) |
|
Emit an info log message.
- Parameters
-
Definition at line 165 of file util.c.
◆ fr_lua_util_jit_log_register()
int fr_lua_util_jit_log_register |
( |
lua_State * |
L | ) |
|
Insert cdefs into the lua environment.
For LuaJIT using the FFI is significantly faster than the Lua interface. Help people wishing to use the FFI by inserting cdefs for standard functions.
- Parameters
-
- Returns
- 0 (no arguments).
Definition at line 202 of file util.c.
◆ fr_lua_util_jit_log_warn()
void fr_lua_util_jit_log_warn |
( |
char const * |
msg | ) |
|
Emit a warning log message.
- Parameters
-
Definition at line 176 of file util.c.
◆ fr_lua_util_log_register()
int fr_lua_util_log_register |
( |
lua_State * |
L | ) |
|
Register utililiary functions in the lua environment.
- Parameters
-
- Returns
- 0 (no arguments).
Definition at line 280 of file util.c.
◆ fr_lua_util_set_mctx()
Set the thread local instance.
- Parameters
-
[in] | mctx | all helper and C functions callable from Lua should use. |
Definition at line 321 of file util.c.
◆ fr_lua_util_set_request()
void fr_lua_util_set_request |
( |
request_t * |
request | ) |
|
Set the thread local request.
- Parameters
-
[in] | request | all helper and C functions callable from Lua should use. |
Definition at line 339 of file util.c.
◆ fr_lua_mctx
◆ fr_lua_request