wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
eapol_callbacks Struct Reference

Callback functions from EAP to lower layer. More...

#include <eap.h>

Data Fields

struct eap_peer_config *(* get_config )(void *ctx)
 Get pointer to the current network configuration. More...
 
Boolean(* get_bool )(void *ctx, enum eapol_bool_var variable)
 Get a boolean EAPOL state variable. More...
 
void(* set_bool )(void *ctx, enum eapol_bool_var variable, Boolean value)
 Set a boolean EAPOL state variable. More...
 
unsigned int(* get_int )(void *ctx, enum eapol_int_var variable)
 Get an integer EAPOL state variable. More...
 
void(* set_int )(void *ctx, enum eapol_int_var variable, unsigned int value)
 Set an integer EAPOL state variable. More...
 
struct wpabuf *(* get_eapReqData )(void *ctx)
 Get EAP-Request data. More...
 
void(* set_config_blob )(void *ctx, struct wpa_config_blob *blob)
 Set named configuration blob. More...
 
const struct wpa_config_blob *(* get_config_blob )(void *ctx, const char *name)
 Get a named configuration blob. More...
 
void(* notify_pending )(void *ctx)
 Notify that a pending request can be retried. More...
 
void(* eap_param_needed )(void *ctx, enum wpa_ctrl_req_type field, const char *txt)
 Notify that EAP parameter is needed. More...
 
void(* notify_cert )(void *ctx, int depth, const char *subject, const char *altsubject[], int num_altsubject, const char *cert_hash, const struct wpabuf *cert)
 Notification of a peer certificate. More...
 
void(* notify_status )(void *ctx, const char *status, const char *parameter)
 Notification of the current EAP state. More...
 
void(* set_anon_id )(void *ctx, const u8 *id, size_t len)
 Set or add anonymous identity. More...
 
int(* get_eap_user )(void *ctx, const u8 *identity, size_t identity_len, int phase2, struct eap_user *user)
 
const char *(* get_eap_req_id_text )(void *ctx, size_t *len)
 
void(* log_msg )(void *ctx, const char *msg)
 
int(* get_erp_send_reauth_start )(void *ctx)
 
const char *(* get_erp_domain )(void *ctx)
 
struct eap_server_erp_key *(* erp_get_key )(void *ctx, const char *keyname)
 
int(* erp_add_key )(void *ctx, struct eap_server_erp_key *erp)
 

Detailed Description

Callback functions from EAP to lower layer.

This structure defines the callback functions that EAP state machine requires from the lower layer (usually EAPOL state machine) for updating state variables and requesting information. eapol_ctx from eap_peer_sm_init() call will be used as the ctx parameter for these callback functions.

Field Documentation

void(* eapol_callbacks::eap_param_needed)(void *ctx, enum wpa_ctrl_req_type field, const char *txt)

Notify that EAP parameter is needed.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
fieldField indicator (e.g., WPA_CTRL_REQ_EAP_IDENTITY)
txtUser readable text describing the required parameter
Boolean(* eapol_callbacks::get_bool)(void *ctx, enum eapol_bool_var variable)

Get a boolean EAPOL state variable.

Parameters
variableEAPOL boolean variable to get
Returns
Value of the EAPOL variable
struct eap_peer_config*(* eapol_callbacks::get_config)(void *ctx)

Get pointer to the current network configuration.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
const struct wpa_config_blob*(* eapol_callbacks::get_config_blob)(void *ctx, const char *name)

Get a named configuration blob.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
nameName of the blob
Returns
Pointer to blob data or NULL if not found
struct wpabuf*(* eapol_callbacks::get_eapReqData)(void *ctx)

Get EAP-Request data.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
lenPointer to variable that will be set to eapReqDataLen
Returns
Reference to eapReqData (EAP state machine will not free this) or NULL if eapReqData not available.
unsigned int(* eapol_callbacks::get_int)(void *ctx, enum eapol_int_var variable)

Get an integer EAPOL state variable.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
variableEAPOL integer variable to get
Returns
Value of the EAPOL variable
void(* eapol_callbacks::notify_cert)(void *ctx, int depth, const char *subject, const char *altsubject[], int num_altsubject, const char *cert_hash, const struct wpabuf *cert)

Notification of a peer certificate.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
depthDepth in certificate chain (0 = server)
subjectSubject of the peer certificate
altsubjectSelect fields from AltSubject of the peer certificate
num_altsubjectNumber of altsubject values
cert_hashSHA-256 hash of the certificate
certPeer certificate
void(* eapol_callbacks::notify_pending)(void *ctx)

Notify that a pending request can be retried.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
       An EAP method can perform a pending operation (e.g., to get a
       response from an external process). Once the response is available,
       this callback function can be used to request EAPOL state machine to
       retry delivering the previously received (and still unanswered) EAP
       request to EAP state machine.
void(* eapol_callbacks::notify_status)(void *ctx, const char *status, const char *parameter)

Notification of the current EAP state.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
statusStep in the process of EAP authentication
parameterStep-specific parameter, e.g., EAP method name
void(* eapol_callbacks::set_anon_id)(void *ctx, const u8 *id, size_t len)

Set or add anonymous identity.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
idAnonymous identity (e.g., EAP-SIM pseudonym) or NULL to clear
lenLength of anonymous identity in octets
void(* eapol_callbacks::set_bool)(void *ctx, enum eapol_bool_var variable, Boolean value)

Set a boolean EAPOL state variable.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
variableEAPOL boolean variable to set
valueValue for the EAPOL variable
void(* eapol_callbacks::set_config_blob)(void *ctx, struct wpa_config_blob *blob)

Set named configuration blob.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
blobNew value for the blob
       Adds a new configuration blob or replaces the current value of an
       existing blob.
void(* eapol_callbacks::set_int)(void *ctx, enum eapol_int_var variable, unsigned int value)

Set an integer EAPOL state variable.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
variableEAPOL integer variable to set
valueValue for the EAPOL variable

The documentation for this struct was generated from the following file: