The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
call_priv.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: f97341f15ec70f0f8a7f2ce0f91258f74bca20db $
20 *
21 * @file unlang/call_priv.h
22 *
23 * @copyright 2020 The FreeRADIUS server project
24 * @copyright 2021 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
25 */
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include "unlang_priv.h"
31#include <freeradius-devel/unlang/unlang_priv.h>
32
33/** Entry point into a proto_ module.
34 *
35 */
36typedef struct {
37 unlang_group_t group; //!< Generic field common to all group type
38 ///< #unlang_t nodes.
39 CONF_SECTION *server_cs; //!< Config section of the virtual server being
40 ///< executed.
41 fr_dict_attr_t const *attr_packet_type; //!< Attribute used to specify packet type and
42 ///< sections run in the server_cs.
44
45/** A module stack entry
46 *
47 * Represents a single module call on the unlang stack.
48 */
49typedef struct {
50 char const *module; //!< module name from request->module
52
53
54/** Cast a group structure to the call keyword extension
55 *
56 */
58{
59 return talloc_get_type_abort(g, unlang_call_t);
60}
61
62/** Cast a call keyword extension to a group structure
63 *
64 */
66{
67 return (unlang_group_t *)call;
68}
69
70/** Cast a call keyword extension to a unlang_t structure
71 *
72 */
74{
75 return (unlang_t *)call;
76}
77
78#ifdef __cplusplus
79}
80#endif
static unlang_t * unlang_call_to_generic(unlang_call_t *call)
Cast a call keyword extension to a unlang_t structure.
Definition call_priv.h:73
CONF_SECTION * server_cs
Config section of the virtual server being executed.
Definition call_priv.h:39
fr_dict_attr_t const * attr_packet_type
Attribute used to specify packet type and sections run in the server_cs.
Definition call_priv.h:41
unlang_group_t group
Generic field common to all group type unlang_t nodes.
Definition call_priv.h:37
static unlang_group_t * unlang_call_to_group(unlang_call_t *call)
Cast a call keyword extension to a group structure.
Definition call_priv.h:65
static unlang_call_t * unlang_group_to_call(unlang_group_t *g)
Cast a group structure to the call keyword extension.
Definition call_priv.h:57
Entry point into a proto_ module.
Definition call_priv.h:36
A module stack entry.
Definition call_priv.h:49
A section grouping multiple CONF_PAIR.
Definition cf_priv.h:106
Private interpreter structures and functions.
Generic representation of a grouping.
A node in a graph of unlang_op_t (s) that we execute.