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>
93#define unlang_function_signal_set(_request, _signal, _sigmask) \
94 _unlang_function_signal_set(_request, _signal, _sigmask, STRINGIFY(_signal))
96 CC_HINT(warn_unused_result);
108#define unlang_function_repeat_set(_request, _repeat) \
109 _Generic((&(_repeat)), \
110 unlang_function_with_result_t: _unlang_function_repeat_set(_request,\
112 STRINGIFY(_repeat), \
113 UNLANG_FUNCTION_TYPE_WITH_RESULT), \
114 unlang_function_no_result_t: _unlang_function_repeat_set(_request,\
116 STRINGIFY(_repeat), \
117 UNLANG_FUNCTION_TYPE_NO_RESULT) \
120 CC_HINT(warn_unused_result);
144#define unlang_function_push_with_result(_result_p, _request, _func, _repeat, _signal, _sigmask, _top_frame, _uctx) \
145 _unlang_function_push_with_result(_result_p, _request, \
146 _func, STRINGIFY(_func), \
147 _repeat, STRINGIFY(_repeat), \
148 _signal, _sigmask, STRINGIFY(_signal), \
156 bool top_frame,
void *uctx) CC_HINT(warn_unused_result);
179#define unlang_function_push(_request, _func, _repeat, _signal, _sigmask, _top_frame, _uctx) \
180 _unlang_function_push_no_result(_request, \
181 _func, STRINGIFY(_func), \
182 _repeat, STRINGIFY(_repeat), \
183 _signal, _sigmask, STRINGIFY(_signal), \
190 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.
@ UNLANG_FUNCTION_TYPE_NO_RESULT
Function without a result.
@ UNLANG_FUNCTION_TYPE_WITH_RESULT
Function with a result.
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_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_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