25 RCSID(
"$Id: 670851dd2fd7433033b9f341c8ab759f6772e746 $")
27 #include "group_priv.h"
52 if (action == FR_SIGNAL_CANCEL) {
93 state->
limit = box->vb_uint32;
114 fr_value_box_list_init(&state->
result);
131 .debug_braces =
true,
133 .frame_state_type =
"unlang_frame_state_limit_t",
136 .thread_inst_type =
"unlang_thread_limit_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_FAIL
Encountered an unexpected error.
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
void * unlang_thread_instance(unlang_t const *instruction)
Get the thread-instance data for an instruction.
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.
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
void unlang_limit_init(void)
static unlang_action_t unlang_limit_resume_done(UNUSED rlm_rcode_t *p_result, UNUSED request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t unlang_limit_enforce(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
unlang_thread_limit_t * thread
static void unlang_limit_signal(UNUSED request_t *request, unlang_stack_frame_t *frame, fr_signal_t action)
Send a signal (usually stop) to a request.
fr_value_box_list_t result
static unlang_action_t unlang_limit_xlat_done(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t unlang_limit(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_limit_t * unlang_group_to_limit(unlang_group_t *g)
Cast a group structure to the limit keyword extension.
rlm_rcode_t
Return codes indicating the result of the module call.
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.
void * state
Stack frame specialisations.
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
@ UNLANG_TYPE_LIMIT
limit number of requests in a section
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.