The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
base.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: a26355304af0d53f9a2d6b084215276bbe0e5bfe $
19  * @file src/process/control/base.c
20  * @brief CONTROL processing.
21  *
22  * @copyright 2020 Network RADIUS SAS (legal@networkradius.com)
23  */
24 #include <freeradius-devel/server/protocol.h>
25 #include <freeradius-devel/server/process.h>
26 #include <freeradius-devel/util/debug.h>
27 
28 static fr_dict_t const *dict_freeradius;
29 
32  { .out = &dict_freeradius, .proto = "freeradius" },
33  { NULL }
34 };
35 
38 
41  { .out = &attr_module_failure_message, .name = "Module-Failure-Message", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
42  { .out = &attr_module_success_message, .name = "Module-Success-Message", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
43 
44  { NULL }
45 };
46 
47 static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, UNUSED request_t *request)
48 {
50 }
51 
54  .common = {
55  .magic = MODULE_MAGIC_INIT,
56  .name = "control"
57  },
58  .process = mod_process,
59  .dict = &dict_freeradius
60 };
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition: action.h:35
#define UNUSED
Definition: build.h:313
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
Definition: dict.h:250
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Definition: dict.h:263
Specifies an attribute which must be present for the module to function.
Definition: dict.h:249
Specifies a dictionary which must be loaded/loadable for the module to function.
Definition: dict.h:262
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
fr_dict_t const * dict_freeradius
Definition: base.c:73
@ FR_TYPE_STRING
String of printable characters.
Definition: merged_model.c:83
Temporary structure to hold arguments for module calls.
Definition: module_ctx.h:41
static fr_dict_attr_t const * attr_module_failure_message
Definition: base.c:36
static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, UNUSED request_t *request)
Definition: base.c:47
fr_dict_attr_autoload_t process_control_dict_attr[]
Definition: base.c:40
fr_dict_autoload_t process_control_dict[]
Definition: base.c:31
fr_process_module_t process_control
Definition: base.c:53
static fr_dict_attr_t const * attr_module_success_message
Definition: base.c:37
module_t common
Common fields for all loadable modules.
Definition: process.h:55
Common public symbol definition for all process modules.
Definition: process.h:54
rlm_rcode_t
Return codes indicating the result of the module call.
Definition: rcode.h:40
RETURN_MODULE_FAIL