The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
group.c
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17/**
18 * $Id: 8576f4d6719db894b870ce5aa4b204496b6883ba $
19 *
20 * @file unlang/group.c
21 * @brief Unlang "group" keyword evaluation.
22 *
23 * @copyright 2006-2019 The FreeRADIUS server project
24 */
25RCSID("$Id: 8576f4d6719db894b870ce5aa4b204496b6883ba $")
26
27#include <freeradius-devel/server/rcode.h>
28#include "unlang_priv.h"
29#include "group_priv.h"
30
35
37{
38 return unlang_group(result, request, frame);
39}
40
41
48
50{
52 .name = "group",
53 .type = UNLANG_TYPE_GROUP,
55
56 .compile = unlang_compile_group,
57 .interpret = unlang_group,
58
59 .unlang_size = sizeof(unlang_group_t),
60 .unlang_name = "unlang_group_t",
61 });
62
64 .name = "policy",
65 .type = UNLANG_TYPE_POLICY,
67
68 .interpret = unlang_policy,
69
70 .unlang_size = sizeof(unlang_group_t),
71 .unlang_name = "unlang_group_t",
72 });
73}
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition action.h:35
#define RCSID(id)
Definition build.h:485
#define UNUSED
Definition build.h:317
Common header for all CONF_* types.
Definition cf_priv.h:49
CONF_SECTION * cf_item_to_section(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_SECTION.
Definition cf_util.c:683
#define cf_item_next(_parent, _curr)
Definition cf_util.h:92
unlang_t * unlang_compile_section(unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_SECTION *cs, unlang_type_t type)
Definition compile.c:1517
static unlang_t * unlang_compile_group(unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_ITEM const *ci)
Definition group.c:42
unlang_action_t unlang_group(UNUSED unlang_result_t *p_result, request_t *request, UNUSED unlang_stack_frame_t *frame)
Definition group.c:31
void unlang_group_init(void)
Definition group.c:49
static unlang_action_t unlang_policy(unlang_result_t *result, request_t *request, unlang_stack_frame_t *frame)
Definition group.c:36
Declarations for the "group" keyword.
unlang_action_t unlang_interpret_push_children(unlang_result_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.
Definition interpret.c:384
static TALLOC_CTX * unlang_ctx
Definition base.c:71
void unlang_register(unlang_op_t *op)
Register an operation with the interpreter.
Definition base.c:56
@ RLM_MODULE_NOT_SET
Error resolving rcode (should not be returned by modules).
Definition rcode.h:41
Private interpreter structures and functions.
#define UNLANG_NEXT_SIBLING
Definition unlang_priv.h:98
#define UNLANG_IGNORE
@ UNLANG_TYPE_GROUP
Grouping section.
Definition unlang_priv.h:49
@ UNLANG_TYPE_POLICY
Policy section.
Definition unlang_priv.h:78
@ UNLANG_OP_FLAG_RETURN_POINT
Return point.
@ UNLANG_OP_FLAG_DEBUG_BRACES
Print debug braces.
@ UNLANG_OP_FLAG_INTERNAL
it's not a real keyword
Generic representation of a grouping.
An unlang operation.
A node in a graph of unlang_op_t (s) that we execute.
Our interpreter stack, as distinct from the C stack.
static fr_slen_t parent
Definition pair.h:839