25 RCSID(
"$Id: 26325f366177232b53a36fecfc6db5fc4d6a8f93 $")
27 #include "condition_priv.h"
31 fr_value_box_list_t
out;
46 }
else if (fr_value_box_list_next(&state->
out, box) != NULL) {
95 fr_value_box_list_init(&state->
out);
109 .debug_braces =
true,
111 .frame_state_type =
"unlang_frame_state_cond_t",
125 .debug_braces =
true,
127 .frame_state_type =
"unlang_frame_state_cond_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_EXECUTE_NEXT
Execute the next unlang_t.
@ UNLANG_ACTION_FAIL
Encountered an unexpected error.
bool success
If set, where to record the result of the execution.
static unlang_action_t unlang_if(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t unlang_if_resume(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
void unlang_condition_init(void)
fr_value_box_list_t out
Head of the result of a nested expansion.
static unlang_cond_t * unlang_group_to_cond(unlang_group_t *g)
Cast a group structure to the cond keyword extension.
unlang_action_t unlang_group(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Declarations for the "group" keyword.
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
rlm_rcode_t
Return codes indicating the result of the module call.
int unlang_xlat_push(TALLOC_CTX *ctx, bool *p_success, fr_value_box_list_t *out, request_t *request, xlat_exp_head_t const *xlat, bool top_frame)
Push a pre-compiled xlat onto the stack for evaluation.
unlang_t * next
Next node (executed on UNLANG_ACTION_EXECUTE_NEXT et al).
void * state
Stack frame specialisations.
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
@ UNLANG_TYPE_ELSIF
!Condition && Condition.
@ UNLANG_TYPE_ELSE
!Condition.
@ UNLANG_TYPE_IF
Condition.
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.
unlang_t const * next
The next unlang node we will evaluate.
unlang_type_t type
The specialisation of this node.
Generic representation of a grouping.
Our interpreter stack, as distinct from the C stack.
bool fr_value_box_is_truthy(fr_value_box_t const *in)
Check truthiness of values.