The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
module_method.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 of the License, or
6  * (at your option) 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
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /**
19  * $Id: ee2a136a79ae72c3c0c5c566e0f22313df374a17 $
20  *
21  * @file src/lib/server/module_method.h
22  * @brief Defines standard module methods specified by virtual servers and modules.
23  *
24  * @copyright 2022 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
25  */
26 RCSIDH(module_method_h, "$Id: ee2a136a79ae72c3c0c5c566e0f22313df374a17 $")
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /** Specifies a module method identifier
33  *
34  * These are used in module definitions and by virtual servers to find mutually
35  * acceptable module methods to call between a virtual server section and the
36  * module that's calling it.
37  *
38  * For example, a `send Access-Accept` compilation structure may also have a
39  * `ippool alloc` method associated with it, to instruct any ippool modules to
40  * allocate an IP address.
41  */
42 typedef struct {
43  fr_dict_t const **proto; //!< If none-null, restrict matches to this protocol.
44  ///< i.e. if both the virtual server module_method_name
45  ///< and the module method have non-null proto pointers
46  ///< then *proto must be equal for the method name to
47  ///< match.
48 
49  char const *name1; //!< module method name1 which is allowed in this section
50  char const *name2; //!< module method name2 which is allowed in this section
52 
54 
56 
58 
60 
61 #ifdef __cplusplus
62 }
63 #endif
#define RCSIDH(h, id)
Definition: build.h:445
module_method_name_t module_method_ippool_mark
Definition: module_method.c:57
module_method_name_t module_method_ippool_release
Definition: module_method.c:62
module_method_name_t module_method_ippool_extend
Definition: module_method.c:52
module_method_name_t module_method_ippool_allocate
Definition: module_method.c:47
Specifies a module method identifier.
Definition: module_method.c:36
static char const * proto(int id, int porttype)
Definition: radwho.c:85
struct module_method_name_s module_method_name_t
Definition: module.h:42