27 RCSIDH(eap_h,
"$Id: 6350e13e189a6c0ab8d2bb866ee046ef84673035 $")
29 #include <freeradius-devel/radiusd.h>
30 #include <freeradius-devel/modules.h>
31 #include <freeradius-devel/rad_assert.h>
36 #define TLS_CONFIG_SECTION "tls-config"
37 #define LOG_PREFIX "eap"
56 #define EAP_STATE_LEN (AUTH_VECTOR_LEN)
106 #define REQUEST_DATA_EAP_SESSION (1)
107 #define REQUEST_DATA_EAP_SESSION_PROXIED (2)
109 #define REQUEST_DATA_EAP_TUNNEL_CALLBACK PW_EAP_MESSAGE
110 #define REQUEST_DATA_EAP_MSCHAP_TUNNEL_CALLBACK ((PW_EAP_MESSAGE << 16) | PW_EAP_MSCHAPV2)
111 #define RAD_REQUEST_OPTION_PROXY_EAP (1 << 16)
rlm_rcode_t eap_virtual_server(REQUEST *request, REQUEST *fake, eap_session_t *eap_session, char const *virtual_server)
Send a fake request to a virtual server, managing the eap_session_t of the child. ...
eap_process_t session_init
Callback for creating a new eap_session_t.
void * inst
Instance of the eap module this session was created by.
int rounds
How many roundtrips have occurred this session.
struct eap_round eap_round_t
Contains a pair of request and response packets.
struct rlm_eap_module rlm_eap_module_t
Interface to call EAP sub mdoules.
eap_process_t process
Callback that should be used to process the next round.
bool tls
Whether EAP method uses TLS.
bool finished
Whether we consider this session complete.
struct eap_tunnel_data_t eap_tunnel_data_t
eap_packet_t * request
Packet we will send to the peer.
void * opaque
Opaque data used by EAP methods.
eap_session_t * child
Session for tunnelled EAP method.
eap_round_t * prev_round
Previous response/request pair.
REQUEST * request
Request that contains the response we're processing.
fr_ipaddr_t src_ipaddr
of client which sent us the RADIUS request for this session.
enum eap_method eap_type_t
eap_session_t * next
Next/previous eap session in this doubly linked list.
int(* eap_process_t)(void *instance, eap_session_t *eap_session)
eap_type_t type
EAP method number.
Tracks the progress of a single session of any EAP method.
int(* detach)(void *instance)
Destroy an EAP submodule instance.
eap_round_t * this_round
The EAP response we're processing, and the EAP request we're building.
eap_tunnel_callback_t callback
int(* eap_tunnel_callback_t)(eap_session_t *eap_session, void *tls_session)
enum rlm_rcodes rlm_rcode_t
Return codes indicating the result of the module call.
Contains a pair of request and response packets.
char const * name
The name of the sub-module (without rlm_ prefix).
char * identity
NAI (User-Name) from EAP-Identity.
Interface to call EAP sub mdoules.
eap_process_t process
Callback for processing the next eap_round_t of an eap_session_t.
int(* instantiate)(CONF_SECTION *conf, void **instance)
Create a new submodule instance.
Structure to hold EAP data.
eap_packet_t * response
Packet we received from the peer.
time_t updated
The last time we received a packet for this EAP session.