All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
eap.h File Reference
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#include "eap_types.h"
+ Include dependency graph for eap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _eap_session
 Tracks the progress of a single session of any EAP method. More...
 
struct  eap_round
 Contains a pair of request and response packets. More...
 
struct  eap_tunnel_data_t
 
struct  rlm_eap_module
 Interface to call EAP sub mdoules. More...
 

Macros

#define EAP_STATE_LEN   (AUTH_VECTOR_LEN)
 
#define LOG_PREFIX   "eap"
 
#define RAD_REQUEST_OPTION_PROXY_EAP   (1 << 16)
 
#define REQUEST_DATA_EAP_MSCHAP_TUNNEL_CALLBACK   ((PW_EAP_MESSAGE << 16) | PW_EAP_MSCHAPV2)
 
#define REQUEST_DATA_EAP_SESSION   (1)
 
#define REQUEST_DATA_EAP_SESSION_PROXIED   (2)
 
#define REQUEST_DATA_EAP_TUNNEL_CALLBACK   PW_EAP_MESSAGE
 
#define TLS_CONFIG_SECTION   "tls-config"
 

Typedefs

typedef int(* eap_process_t )(void *instance, eap_session_t *eap_session)
 
typedef struct eap_round eap_round_t
 Contains a pair of request and response packets. More...
 
typedef struct _eap_session eap_session_t
 
typedef int(* eap_tunnel_callback_t )(eap_session_t *eap_session, void *tls_session)
 
typedef struct eap_tunnel_data_t eap_tunnel_data_t
 
typedef struct rlm_eap_module rlm_eap_module_t
 Interface to call EAP sub mdoules. More...
 

Functions

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. More...
 

Data Structure Documentation

struct _eap_session

Tracks the progress of a single session of any EAP method.

Definition at line 60 of file eap.h.

+ Collaboration diagram for _eap_session:
Data Fields
eap_session_t * child Session for tunnelled EAP method.
bool finished Whether we consider this session complete.
char * identity NAI (User-Name) from EAP-Identity.
void * inst Instance of the eap module this session was created by.
eap_session_t * next Next/previous eap session in this doubly linked list.
void * opaque Opaque data used by EAP methods.
eap_session_t * prev
eap_round_t * prev_round Previous response/request pair.

this_round should contain the response to the request in prev_round.

eap_process_t process Callback that should be used to process the next round.

Usually set to the process functino of an EAP submodule.

REQUEST * request Request that contains the response we're processing.
int rounds How many roundtrips have occurred this session.
fr_ipaddr_t src_ipaddr of client which sent us the RADIUS request for this session.
eap_round_t * this_round The EAP response we're processing, and the EAP request we're building.
bool tls Whether EAP method uses TLS.
eap_type_t type EAP method number.
time_t updated The last time we received a packet for this EAP session.
struct eap_round

Contains a pair of request and response packets.

Helps with formulating/correlating requests to responses we've received.

Definition at line 43 of file eap.h.

+ Collaboration diagram for eap_round:
Data Fields
eap_packet_t * request Packet we will send to the peer.
eap_packet_t * response Packet we received from the peer.
bool set_request_id
struct eap_tunnel_data_t

Definition at line 118 of file eap.h.

+ Collaboration diagram for eap_tunnel_data_t:
Data Fields
eap_tunnel_callback_t callback
void * tls_session

Macro Definition Documentation

#define EAP_STATE_LEN   (AUTH_VECTOR_LEN)

Definition at line 56 of file eap.h.

#define LOG_PREFIX   "eap"

Definition at line 37 of file eap.h.

#define RAD_REQUEST_OPTION_PROXY_EAP   (1 << 16)

Definition at line 111 of file eap.h.

#define REQUEST_DATA_EAP_MSCHAP_TUNNEL_CALLBACK   ((PW_EAP_MESSAGE << 16) | PW_EAP_MSCHAPV2)

Definition at line 110 of file eap.h.

#define REQUEST_DATA_EAP_SESSION   (1)

Definition at line 106 of file eap.h.

#define REQUEST_DATA_EAP_SESSION_PROXIED   (2)

Definition at line 107 of file eap.h.

#define REQUEST_DATA_EAP_TUNNEL_CALLBACK   PW_EAP_MESSAGE

Definition at line 109 of file eap.h.

#define TLS_CONFIG_SECTION   "tls-config"

Definition at line 36 of file eap.h.

Typedef Documentation

typedef int(* eap_process_t)(void *instance, eap_session_t *eap_session)

Definition at line 54 of file eap.h.

typedef struct eap_round eap_round_t

Contains a pair of request and response packets.

Helps with formulating/correlating requests to responses we've received.

typedef struct _eap_session eap_session_t

Definition at line 49 of file eap.h.

typedef int(* eap_tunnel_callback_t)(eap_session_t *eap_session, void *tls_session)

Definition at line 116 of file eap.h.

Interface to call EAP sub mdoules.

Function Documentation

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.

If eap_session_t has a child, inject that into the fake request.

If after the request has run, the child eap_session_t is no longer present, we assume it has been freed, and fixup the parent eap_session_t.

If the eap_session_t pointer changes, this is considered a fatal error.

Parameters
requestthe current (real) request.
eap_sessionrepresenting the outer eap method.
fakerequest we're going to send.
virtual_serverThe default virtual server to send the request to.
Returns
the rcode of the last executed section in the virtual server.

Definition at line 418 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: