The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
eap_sim.h
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 (at
5  * 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: 0ad22d8631168aa0838aeb764b619e11444127ea $
19  * @file rlm_eap_sim/eap_sim.h
20  * @brief Declarations for EAP-SIM
21  *
22  * @author Arran Cudbard-Bell (a.cudbardb@freeradius.org)
23  *
24  * @copyright 2016 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
25  * @copyright 2016 The FreeRADIUS server project
26  */
27 RCSIDH(rlm_eap_sim_eap_sim_h, "$Id: 0ad22d8631168aa0838aeb764b619e11444127ea $")
28 
29 #include <freeradius-devel/sim/base.h>
30 
31 /** Server states
32  *
33  * In server_start, we send a EAP-SIM Start message.
34  */
35 typedef enum {
45 
46 typedef struct {
47  eap_sim_server_state_t state; //!< Current session state.
48 
49  bool allow_encrypted; //!< Whether we can send encrypted attributes.
50  bool challenge_success; //!< Whether we received the correct
51  ///< challenge response.
52 
53  fr_sim_keys_t keys; //!< Various EAP-AKA keys.
54  fr_sim_id_req_type_t id_req; //!< The type of identity we're requesting
55  ///< or previously requested.
56 
57  bool send_result_ind; //!< Say that we would like to use protected result
58  ///< indications (SIM-Notification-Success).
59 
60  int sim_id; //!< Packet ID. (replay protection)
62 
63 
64 typedef struct {
65  char const *virtual_server; //!< Virtual server for HLR integration.
66  bool protected_success; //!< Send protected success messages.
#define RCSIDH(h, id)
Definition: build.h:445
bool send_result_ind
Say that we would like to use protected result indications (SIM-Notification-Success).
Definition: eap_sim.h:57
bool allow_encrypted
Whether we can send encrypted attributes.
Definition: eap_sim.h:49
fr_sim_keys_t keys
Various EAP-AKA keys.
Definition: eap_sim.h:53
int sim_id
Packet ID. (replay protection)
Definition: eap_sim.h:60
bool challenge_success
Whether we received the correct challenge response.
Definition: eap_sim.h:50
fr_sim_id_req_type_t id_req
The type of identity we're requesting or previously requested.
Definition: eap_sim.h:54
bool protected_success
Send protected success messages.
Definition: eap_sim.h:66
eap_sim_server_state_t
Server states.
Definition: eap_sim.h:35
@ EAP_SIM_SERVER_MAX_STATES
Definition: eap_sim.h:43
@ EAP_SIM_SERVER_SUCCESS
Definition: eap_sim.h:40
@ EAP_SIM_SERVER_START
Definition: eap_sim.h:36
@ EAP_SIM_SERVER_CHALLENGE
Definition: eap_sim.h:37
@ EAP_SIM_SERVER_SUCCESS_NOTIFICATION
Definition: eap_sim.h:39
@ EAP_SIM_SERVER_FAILURE
Definition: eap_sim.h:42
@ EAP_SIM_SERVER_REAUTHENTICATE
Definition: eap_sim.h:38
@ EAP_SIM_SERVER_FAILURE_NOTIFICATION
Definition: eap_sim.h:41
eap_sim_server_state_t state
Current session state.
Definition: eap_sim.h:47
char const * virtual_server
Virtual server for HLR integration.
Definition: eap_sim.h:65