35#include <freeradius-devel/unlang/interpret.h>
36#include <freeradius-devel/server/rcode.h>
37#include <freeradius-devel/server/request.h>
38#include <freeradius-devel/server/signal.h>
95#define unlang_function_signal_set(_request, _signal, _sigmask) \
96 _unlang_function_signal_set(_request, _signal, _sigmask, STRINGIFY(_signal))
98 CC_HINT(warn_unused_result);
110#define unlang_function_repeat_set(_request, _repeat) \
111 _Generic((&(_repeat)), \
112 unlang_function_with_result_t: _unlang_function_repeat_set(_request,\
114 STRINGIFY(_repeat), \
115 UNLANG_FUNCTION_TYPE_WITH_RESULT), \
116 unlang_function_no_result_t: _unlang_function_repeat_set(_request,\
118 STRINGIFY(_repeat), \
119 UNLANG_FUNCTION_TYPE_NO_RESULT) \
122 CC_HINT(warn_unused_result);
146#define unlang_function_push_with_result(_result_p, _request, _func, _repeat, _signal, _sigmask, _top_frame, _uctx) \
147 _unlang_function_push_with_result(_result_p, _request, \
148 _func, STRINGIFY(_func), \
149 _repeat, STRINGIFY(_repeat), \
150 _signal, _sigmask, STRINGIFY(_signal), \
158 bool top_frame,
void *uctx) CC_HINT(warn_unused_result);
181#define unlang_function_push(_request, _func, _repeat, _signal, _sigmask, _top_frame, _uctx) \
182 _unlang_function_push_no_result(_request, \
183 _func, STRINGIFY(_func), \
184 _repeat, STRINGIFY(_repeat), \
185 _signal, _sigmask, STRINGIFY(_signal), \
192 bool top_frame,
void *uctx) CC_HINT(warn_unused_result);
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
static uint8_t request[4]
void(* unlang_function_signal_t)(request_t *request, fr_signal_t action, void *uctx)
Function to call if the request was signalled.
int unlang_function_clear(request_t *request)
Clear pending repeat function calls, and remove the signal handler.
unlang_action_t(* unlang_function_no_result_t)(request_t *request, void *uctx)
A generic function pushed by a module or xlat to functions deeper in the C call stack to create resum...
int unlang_function_repeat_clear(request_t *request)
Clear the pending repeat function, and keep the signal handler.
int _unlang_function_repeat_set(request_t *request, void *repeat, char const *name, unlang_function_type_t type)
Set a new repeat function for an existing function frame.
unlang_action_t _unlang_function_push_with_result(unlang_result_t *p_result, request_t *request, unlang_function_with_result_t func, char const *func_name, unlang_function_with_result_t repeat, char const *repeat_name, unlang_function_signal_t signal, fr_signal_t sigmask, char const *signal_name, bool top_frame, void *uctx)
Push a generic function onto the unlang stack with a result.
int _unlang_function_signal_set(request_t *request, unlang_function_signal_t signal, fr_signal_t sigmask, char const *name)
Set a new signal function for an existing function frame.
unlang_action_t _unlang_function_push_no_result(request_t *request, unlang_function_no_result_t func, char const *func_name, unlang_function_no_result_t repeat, char const *repeat_name, unlang_function_signal_t signal, fr_signal_t sigmask, char const *signal_name, bool top_frame, void *uctx)
Push a generic function onto the unlang stack.
@ UNLANG_FUNCTION_TYPE_NO_RESULT
Function without a result.
@ UNLANG_FUNCTION_TYPE_WITH_RESULT
Function with a result.
unlang_action_t(* unlang_function_with_result_t)(unlang_result_t *p_result, request_t *request, void *uctx)
A generic function pushed by a module or xlat to functions deeper in the C call stack to create resum...
fr_signal_t
Signals that can be generated/processed by request signal handlers.
fr_aka_sim_id_type_t type