Unlang "function" keyword evaluation.
More...
#include "action.h"
#include "unlang_priv.h"
#include "function.h"
Go to the source code of this file.
|
static unlang_action_t | call_no_result (UNUSED unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Call a generic function that produces a result.
|
|
static unlang_action_t | call_no_result_repeat (UNUSED unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Call a generic function that produces a result.
|
|
static unlang_action_t | call_with_result (unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Call a generic function that produces a result.
|
|
static unlang_action_t | call_with_result_repeat (unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Call a generic function that produces a result.
|
|
int | unlang_function_clear (request_t *request) |
| Clear pending repeat function calls, and remove the signal handler.
|
|
static void | unlang_function_dump (request_t *request, unlang_stack_frame_t *frame) |
| Custom frame state dumper.
|
|
void | unlang_function_init (void) |
|
static unlang_action_t | unlang_function_push_common (unlang_result_t *p_result, request_t *request, void *func, char const *func_name, void *repeat, char const *repeat_name, unlang_function_signal_t signal, fr_signal_t sigmask, char const *signal_name, unlang_function_type_t type, bool top_frame, void *uctx) |
|
static void | unlang_function_signal (request_t *request, unlang_stack_frame_t *frame, fr_signal_t action) |
| Generic signal handler.
|
|
Unlang "function" keyword evaluation.
- Id
- 261a4566384974a13aa8becc03a2c7e9732a261b
- Copyright
- 2018,2021 The FreeRADIUS server project
-
2018,2021 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file function.c.
◆ unlang_frame_state_func_t
struct unlang_frame_state_func_t |
◆ unlang_frame_state_func_t.func
union unlang_frame_state_func_t.func |
◆ unlang_frame_state_func_t.repeat
union unlang_frame_state_func_t.repeat |
◆ FUNC
#define FUNC |
( |
|
_state | ) |
*((void **)&state->func) |
◆ REPEAT
#define REPEAT |
( |
|
_state | ) |
*((void **)&state->repeat) |
◆ RESTORE_CALLER
#define RESTORE_CALLER request->module = caller; |
◆ STORE_CALLER
Value: char const *caller; \
caller = request->module; \
request->module = NULL
Definition at line 110 of file function.c.
◆ call_no_result()
Call a generic function that produces a result.
- Parameters
-
[out] | p_result | The frame result. |
[in] | request | The current request. |
[in] | frame | The current frame. |
Definition at line 264 of file function.c.
◆ call_no_result_repeat()
Call a generic function that produces a result.
- Parameters
-
[out] | p_result | The frame result. |
[in] | request | The current request. |
[in] | frame | The current frame. |
Definition at line 207 of file function.c.
◆ call_with_result()
Call a generic function that produces a result.
- Parameters
-
[out] | p_result | The frame result. |
[in] | request | The current request. |
[in] | frame | The current frame. |
Definition at line 172 of file function.c.
◆ call_with_result_repeat()
Call a generic function that produces a result.
- Parameters
-
[out] | p_result | The frame result. |
[in] | request | The current request. |
[in] | frame | The current frame. |
Definition at line 124 of file function.c.
◆ unlang_function_clear()
int unlang_function_clear |
( |
request_t * |
request | ) |
|
Clear pending repeat function calls, and remove the signal handler.
The function frame being modified must be at the top of the stack.
- Parameters
-
[in] | request | The current request. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 310 of file function.c.
◆ unlang_function_dump()
Custom frame state dumper.
Definition at line 570 of file function.c.
◆ unlang_function_init()
void unlang_function_init |
( |
void |
| ) |
|
◆ unlang_function_push_common()
static unlang_action_t unlang_function_push_common |
( |
unlang_result_t * |
p_result, |
|
|
request_t * |
request, |
|
|
void * |
func, |
|
|
char const * |
func_name, |
|
|
void * |
repeat, |
|
|
char const * |
repeat_name, |
|
|
unlang_function_signal_t |
signal, |
|
|
fr_signal_t |
sigmask, |
|
|
char const * |
signal_name, |
|
|
unlang_function_type_t |
type, |
|
|
bool |
top_frame, |
|
|
void * |
uctx |
|
) |
| |
|
inlinestatic |
◆ unlang_function_signal()
Generic signal handler.
- Parameters
-
[in] | request | being signalled. |
[in] | frame | being signalled. |
[in] | action | Type of signal. |
Definition at line 95 of file function.c.
◆ function_instruction
Initial value:= {
.name = "function",
.debug_name = "function",
.actions = {
.actions = {
},
}
}
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_TIMEOUT
Module (or section) timed out.
@ RLM_MODULE_NOTFOUND
User not found.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
@ UNLANG_TYPE_FUNCTION
Internal call to a function or submodule.
Static instruction for allowing modules/xlats to call functions within themselves, or submodules.
Definition at line 61 of file function.c.