The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
EAP session management. More...
#include <freeradius-devel/server/request.h>
#include <freeradius-devel/server/request_data.h>
#include <freeradius-devel/server/module.h>
#include "compose.h"
#include "types.h"
Go to the source code of this file.
Data Structures | |
struct | eap_session_s |
Tracks the progress of a single session of any EAP method. More... | |
Macros | |
#define | REQUEST_DATA_EAP_SESSION (1) |
#define | REQUEST_DATA_EAP_SESSION_PROXIED (2) |
Typedefs | |
typedef struct eap_session_s | eap_session_t |
Functions | |
eap_session_t * | eap_session_continue (void const *instance, eap_packet_raw_t **eap_packet, request_t *request) |
Ingest an eap_packet into a thawed or newly allocated session. More... | |
void | eap_session_destroy (eap_session_t **eap_session) |
'destroy' an EAP session and disassociate it from the current request More... | |
void | eap_session_freeze (eap_session_t **eap_session) |
Freeze an eap_session_t so that it can continue later. More... | |
static eap_session_t * | eap_session_get (request_t *request) |
eap_session_t * | eap_session_thaw (request_t *request) |
Thaw an eap_session_t so it can be continued. More... | |
EAP session management.
Definition in file session.h.
struct eap_session_s |
Data Fields | ||
---|---|---|
uint8_t * | child_state | State value returned by tunneled EAP method. |
bool | finished | Whether we consider this session complete. |
char * | identity | NAI (User-Name) from EAP-Identity. |
void const * | 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. |
module_method_t | process |
Callback that should be used to process the next round. Usually set to the process function of an EAP submodule. |
request_t * | request |
Current request. Only used by OpenSSL callbacks to access the current request. Must be NULL if eap_session is not being processed by rlm_eap. |
int | rounds | How many roundtrips have occurred this session. |
rlm_rcode_t | submodule_rcode | Result of last submodule call. |
request_t * | subrequest | Current subrequest being executed. |
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. |
fr_time_t | updated | The last time we received a packet for this EAP session. |
typedef struct eap_session_s eap_session_t |
eap_session_t* eap_session_continue | ( | void const * | instance, |
eap_packet_raw_t ** | eap_packet_p, | ||
request_t * | request | ||
) |
Ingest an eap_packet into a thawed or newly allocated session.
If eap_packet is an Identity-Response then allocate a new eap_session and fill the identity.
If eap_packet is not an identity response, retrieve the pre-existing eap_session_t from request data.
If no User-Name attribute is present in the request, one will be created from the Identity-Response received when the eap_session was allocated.
[in] | instance | of rlm_eap that created the session. |
[in] | eap_packet_p | extracted from the RADIUS Access-Request. Consumed or freed by this function. Do not access after calling this function. Is a **so the packet pointer can be set to NULL. |
[in] | request | The current request. |
Definition at line 307 of file session.c.
void eap_session_destroy | ( | eap_session_t ** | eap_session | ) |
'destroy' an EAP session and disassociate it from the current request
eap_session | to destroy (disassociate and free). |
Definition at line 148 of file session.c.
void eap_session_freeze | ( | eap_session_t ** | eap_session | ) |
Freeze an eap_session_t so that it can continue later.
Sets the request and pointer to the eap_session to NULL. Primarily here to help track the lifecycle of an eap_session_t.
The actual freezing/thawing and management (ensuring it's available during multiple rounds of EAP) of the eap_session_t associated with REQUEST_DATA_EAP_SESSION, is done by the state API.
eap_session | to freeze. |
Definition at line 173 of file session.c.
|
inlinestatic |
eap_session_t* eap_session_thaw | ( | request_t * | request | ) |
Thaw an eap_session_t so it can be continued.
Retrieve an eap_session_t from the request data, and set relevant fields. Primarily here to help track the lifecycle of an eap_session_t.
The actual freezing/thawing and management (ensuring it's available during multiple rounds of EAP) of the eap_session_t associated with REQUEST_DATA_EAP_SESSION, is done by the state API.
request | to retrieve session from. |
Definition at line 205 of file session.c.