25 RCSID(
"$Id: a33421f8573e1eca48fee3cea415727d9dd35344 $")
27 #include "group_priv.h"
46 RDEBUG(
"Timeout reached, signalling interpreter to cancel child section.");
107 state->
timeout = box->vb_time_delta;
130 fr_value_box_list_init(&state->
result);
146 .debug_braces =
true,
148 .frame_state_type =
"unlang_frame_state_timeout_t",
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
@ UNLANG_ACTION_PUSHED_CHILD
unlang_t pushed a new child onto the stack, execute it instead of continuing.
@ UNLANG_ACTION_STOP_PROCESSING
Break out of processing the current request (unwind).
@ UNLANG_ACTION_FAIL
Encountered an unexpected error.
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
static fr_time_delta_t timeout
#define fr_event_timer_at(...)
fr_event_list_t * unlang_interpret_event_list(request_t *request)
Get the event list for the current interpreter.
void unlang_interpret_mark_runnable(request_t *request)
Mark a request as resumable.
void unlang_frame_signal(request_t *request, fr_signal_t action, int limit)
Send a signal (usually stop) to a request.
unlang_action_t unlang_interpret_push_children(rlm_rcode_t *p_result, request_t *request, rlm_rcode_t default_rcode, bool do_next_sibling)
Push the children of the current frame onto a new frame onto the stack.
#define RINDENT_SAVE(_x, _request)
Save indentation for later restoral.
#define RINDENT_RESTORE(_request, _x)
#define RPEDEBUG(fmt,...)
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
Stores all information relating to an event list.
static char * stack[MAX_STACK]
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_FAIL
Module failed, don't reply.
#define fr_time()
Allow us to arbitrarily manipulate time.
#define fr_time_add(_a, _b)
Add a time/time delta together.
A time delta, a difference in time measured in nanoseconds.
static void unlang_timeout_handler(UNUSED fr_event_list_t *el, UNUSED fr_time_t now, void *ctx)
void unlang_timeout_init(void)
static unlang_action_t unlang_timeout_xlat_done(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t unlang_timeout_resume_done(UNUSED rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
fr_event_timer_t const * ev
static unlang_action_t unlang_timeout_set(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
fr_value_box_list_t result
static unlang_action_t unlang_timeout(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_timeout_t * unlang_group_to_timeout(unlang_group_t *g)
Cast a group structure to the timeout keyword extension.
int unlang_tmpl_push(TALLOC_CTX *ctx, fr_value_box_list_t *out, request_t *request, tmpl_t const *tmpl, unlang_tmpl_args_t *args)
Push a tmpl onto the stack for evaluation.
static fr_event_list_t * el
#define UNLANG_NEXT_SIBLING
void * state
Stack frame specialisations.
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
@ UNLANG_TYPE_TIMEOUT
time-based timeouts.
static void frame_repeat(unlang_stack_frame_t *frame, unlang_process_t process)
Mark the current stack frame up for repeat, and set a new process function.
unlang_t const * instruction
The unlang node we're evaluating.
rlm_rcode_t result
The result from executing the instruction.
Generic representation of a grouping.
Our interpreter stack, as distinct from the C stack.
An unlang stack associated with a request.