wpa_supplicant / hostapd 2.0
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.
Boolean(* get_bool )(void *ctx, enum eapol_bool_var variable)
 Get a boolean EAPOL state variable.
void(* set_bool )(void *ctx, enum eapol_bool_var variable, Boolean value)
 Set a boolean EAPOL state variable.
unsigned int(* get_int )(void *ctx, enum eapol_int_var variable)
 Get an integer EAPOL state variable.
void(* set_int )(void *ctx, enum eapol_int_var variable, unsigned int value)
 Set an integer EAPOL state variable.
struct wpabuf *(* get_eapReqData )(void *ctx)
 Get EAP-Request data.
void(* set_config_blob )(void *ctx, struct wpa_config_blob *blob)
 Set named configuration blob.
struct wpa_config_blob *(* get_config_blob )(void *ctx, const char *name)
 Get a named configuration blob.
void(* notify_pending )(void *ctx)
 Notify that a pending request can be retried.
void(* eap_param_needed )(void *ctx, enum wpa_ctrl_req_type field, const char *txt)
 Notify that EAP parameter is needed.
void(* notify_cert )(void *ctx, int depth, const char *subject, const char *cert_hash, const struct wpabuf *cert)
 Notification of a peer certificate.
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)

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) [read]

Get pointer to the current network configuration.

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

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) [read]

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 *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
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::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 files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines