The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
action.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software Foundation,
15  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16  */
17 
18 /**
19  * $Id: 6bacd0ccd0a66e89592d46741b203e94ee99667f $
20  *
21  * @file unlang/action.h
22  * @brief Unlang interpreter actions
23  *
24  * @copyright 2019 The FreeRADIUS server project
25  */
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /** Returned by #unlang_op_t calls, determine the next action of the interpreter
32  *
33  * These deal exclusively with control flow.
34  */
35 typedef enum {
36  UNLANG_ACTION_FAIL = -1, //!< Encountered an unexpected error.
37  UNLANG_ACTION_CALCULATE_RESULT = 1, //!< Calculate a new section #rlm_rcode_t value.
38  UNLANG_ACTION_EXECUTE_NEXT, //!< Execute the next #unlang_t.
39  UNLANG_ACTION_PUSHED_CHILD, //!< #unlang_t pushed a new child onto the stack,
40  //!< execute it instead of continuing.
41  UNLANG_ACTION_UNWIND, //!< Break out of the current group.
42  UNLANG_ACTION_YIELD, //!< Temporarily pause execution until an event occurs.
43  UNLANG_ACTION_STOP_PROCESSING //!< Break out of processing the current request (unwind).
45 
46 #ifdef __cplusplus
47 }
48 #endif
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition: action.h:35
@ UNLANG_ACTION_UNWIND
Break out of the current group.
Definition: action.h:41
@ UNLANG_ACTION_PUSHED_CHILD
unlang_t pushed a new child onto the stack, execute it instead of continuing.
Definition: action.h:39
@ UNLANG_ACTION_EXECUTE_NEXT
Execute the next unlang_t.
Definition: action.h:38
@ UNLANG_ACTION_STOP_PROCESSING
Break out of processing the current request (unwind).
Definition: action.h:43
@ UNLANG_ACTION_FAIL
Encountered an unexpected error.
Definition: action.h:36
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
Definition: action.h:37
@ UNLANG_ACTION_YIELD
Temporarily pause execution until an event occurs.
Definition: action.h:42