The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
rlm_eap.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: 29df355a944b47858f816745bb5e1827dd9b4a2c $
20  * @file rlm_eap.h
21  * @brief Implements the EAP framework.
22  *
23  * @copyright 2000-2003,2006 The FreeRADIUS server project
24  * @copyright 2001 hereUare Communications, Inc. (raghud@hereuare.com)
25  * @copyright 2003 Alan DeKok (aland@freeradius.org)
26  */
27 RCSIDH(rlm_eap_h, "$Id: 29df355a944b47858f816745bb5e1827dd9b4a2c $")
28 
29 #include <freeradius-devel/server/modpriv.h>
30 #include <freeradius-devel/server/state.h>
31 #include <freeradius-devel/radius/radius.h>
32 #include <freeradius-devel/eap/base.h>
33 #include <freeradius-devel/eap/types.h>
34 
35 /** Different settings for realm issues
36  */
37 typedef enum {
38  REQUIRE_REALM_YES = 0, //!< Require the EAP-Identity string contain an NAI realm
39  ///< or that Stripped-User-Domain is present in the request.
40  REQUIRE_REALM_NO, //!< Don't require that the identity is qualified.
41  REQUIRE_REALM_NAI //!< Require the EAP-Identity contains an NAI domain.
43 
44 /** Instance data for rlm_eap
45  *
46  */
47 typedef struct {
48  char const *name; //!< Name of this instance.
49 
50  module_instance_t **type_submodules; //!< Submodules we loaded.
51  rlm_eap_method_t methods[FR_EAP_METHOD_MAX]; //!< Array of loaded (or not), submodules.
52 
53  char const *default_method_name; //!< Default method to attempt to start.
54 
55  eap_type_t default_method; //!< Resolved default_method_name.
56  bool default_method_is_set; //!< Whether the user specified a default
57  ///< eap method.
58 
59  module_instance_t const **type_identity_submodule; //!< List of submodules which have a
60  ///< method identity callback, i.e. those
61  ///< which may set themselves to be the default
62  ///< EAP-Type based on the identity provided.
63  size_t type_identity_submodule_len; //!< How many submodules are in the list.
64 
65  bool ignore_unknown_types; //!< Ignore unknown types (for later proxying).
66 
67  rlm_eap_require_realm_t require_realm; //!< Whether we require the outer identity
68  ///< to contain a realm.
70 
71  fr_randctx rand_pool; //!< Pool of random data.
72 } rlm_eap_t;
#define RCSIDH(h, id)
Definition: build.h:445
Value of an enumerated attribute.
Definition: dict.h:209
enum eap_type eap_type_t
@ FR_EAP_METHOD_MAX
Definition: types.h:102
rlm_eap_require_realm_t
Different settings for realm issues.
Definition: rlm_eap.h:37
@ REQUIRE_REALM_NAI
Require the EAP-Identity contains an NAI domain.
Definition: rlm_eap.h:41
@ REQUIRE_REALM_NO
Don't require that the identity is qualified.
Definition: rlm_eap.h:40
@ REQUIRE_REALM_YES
Require the EAP-Identity string contain an NAI realm or that Stripped-User-Domain is present in the r...
Definition: rlm_eap.h:38
size_t type_identity_submodule_len
How many submodules are in the list.
Definition: rlm_eap.h:63
rlm_eap_require_realm_t require_realm
Whether we require the outer identity to contain a realm.
Definition: rlm_eap.h:67
fr_dict_enum_value_t * auth_type
Definition: rlm_eap.h:69
bool ignore_unknown_types
Ignore unknown types (for later proxying).
Definition: rlm_eap.h:65
module_instance_t const ** type_identity_submodule
List of submodules which have a method identity callback, i.e.
Definition: rlm_eap.h:59
char const * default_method_name
Default method to attempt to start.
Definition: rlm_eap.h:53
eap_type_t default_method
Resolved default_method_name.
Definition: rlm_eap.h:55
bool default_method_is_set
Whether the user specified a default eap method.
Definition: rlm_eap.h:56
module_instance_t ** type_submodules
Submodules we loaded.
Definition: rlm_eap.h:50
fr_randctx rand_pool
Pool of random data.
Definition: rlm_eap.h:71
char const * name
Name of this instance.
Definition: rlm_eap.h:48
Instance data for rlm_eap.
Definition: rlm_eap.h:47
Per instance data.
Definition: module.h:169
Private structure to hold handles and interfaces for an EAP method.
Definition: submodule.h:67