wpa_supplicant / hostapd
2.5
|
EAP peer state machines internal structures (RFC 4137) More...
#include "wpabuf.h"
#include "utils/list.h"
#include "eap_peer/eap.h"
#include "eap_common/eap_common.h"
Go to the source code of this file.
Data Structures | |
struct | eap_method_ret |
EAP return values from struct eap_method::process() More... | |
struct | eap_method |
EAP method interface This structure defines the EAP method interface. Each method will need to register its own EAP type, EAP name, and set of function pointers for method specific operations. This interface is based on section 4.4 of RFC 4137. More... | |
struct | eap_erp_key |
struct | eap_sm |
EAP state machine data. More... | |
Macros | |
#define | EAP_PEER_METHOD_INTERFACE_VERSION 1 |
Enumerations | |
enum | EapDecision { DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC } |
enum | EapMethodState { METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT, METHOD_DONE } |
Functions | |
const u8 * | eap_get_config_identity (struct eap_sm *sm, size_t *len) |
Get identity from the network configuration. More... | |
const u8 * | eap_get_config_password (struct eap_sm *sm, size_t *len) |
Get password from the network configuration. More... | |
const u8 * | eap_get_config_password2 (struct eap_sm *sm, size_t *len, int *hash) |
Get password from the network configuration. More... | |
const u8 * | eap_get_config_new_password (struct eap_sm *sm, size_t *len) |
Get new password from network configuration. More... | |
const u8 * | eap_get_config_otp (struct eap_sm *sm, size_t *len) |
Get one-time password from the network configuration. More... | |
void | eap_clear_config_otp (struct eap_sm *sm) |
Clear used one-time password. More... | |
const char * | eap_get_config_phase1 (struct eap_sm *sm) |
Get phase1 data from the network configuration. More... | |
const char * | eap_get_config_phase2 (struct eap_sm *sm) |
Get phase2 data from the network configuration. More... | |
int | eap_get_config_fragment_size (struct eap_sm *sm) |
struct eap_peer_config * | eap_get_config (struct eap_sm *sm) |
Get current network configuration. More... | |
void | eap_set_config_blob (struct eap_sm *sm, struct wpa_config_blob *blob) |
Set or add a named configuration blob. More... | |
const struct wpa_config_blob * | eap_get_config_blob (struct eap_sm *sm, const char *name) |
Get a named configuration blob. More... | |
void | eap_notify_pending (struct eap_sm *sm) |
Notify that EAP method is ready to re-process a request. More... | |
int | eap_allowed_method (struct eap_sm *sm, int vendor, u32 method) |
Check whether EAP method is allowed. More... | |
EAP peer state machines internal structures (RFC 4137)
int eap_allowed_method | ( | struct eap_sm * | sm, |
int | vendor, | ||
u32 | method | ||
) |
Check whether EAP method is allowed.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
vendor | Vendor-Id for expanded types or 0 = IETF for legacy types |
method | EAP type |
void eap_clear_config_otp | ( | struct eap_sm * | sm | ) |
Clear used one-time password.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
This function clears a used one-time password (OTP) from the current network configuration. This should be called when the OTP has been used and is not needed anymore.
struct eap_peer_config* eap_get_config | ( | struct eap_sm * | sm | ) |
Get current network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
EAP peer methods should avoid using this function if they can use other access functions, like eap_get_config_identity() and eap_get_config_password(), that do not require direct access to struct eap_peer_config.
const struct wpa_config_blob* eap_get_config_blob | ( | struct eap_sm * | sm, |
const char * | name | ||
) |
Get a named configuration blob.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
name | Name of the blob |
const u8* eap_get_config_identity | ( | struct eap_sm * | sm, |
size_t * | len | ||
) |
Get identity from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
len | Buffer for the length of the identity |
const u8* eap_get_config_new_password | ( | struct eap_sm * | sm, |
size_t * | len | ||
) |
Get new password from network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
len | Buffer for the length of the new password |
const u8* eap_get_config_otp | ( | struct eap_sm * | sm, |
size_t * | len | ||
) |
Get one-time password from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
len | Buffer for the length of the one-time password |
const u8* eap_get_config_password | ( | struct eap_sm * | sm, |
size_t * | len | ||
) |
Get password from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
len | Buffer for the length of the password |
const u8* eap_get_config_password2 | ( | struct eap_sm * | sm, |
size_t * | len, | ||
int * | hash | ||
) |
Get password from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
len | Buffer for the length of the password |
hash | Buffer for returning whether the password is stored as a NtPasswordHash instead of plaintext password; can be NULL if this information is not needed |
const char* eap_get_config_phase1 | ( | struct eap_sm * | sm | ) |
Get phase1 data from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
const char* eap_get_config_phase2 | ( | struct eap_sm * | sm | ) |
Get phase2 data from the network configuration.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
void eap_notify_pending | ( | struct eap_sm * | sm | ) |
Notify that EAP method is ready to re-process a request.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
An EAP method can perform a pending operation (e.g., to get a response from an external process). Once the response is available, this 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 eap_set_config_blob | ( | struct eap_sm * | sm, |
struct wpa_config_blob * | blob | ||
) |
Set or add a named configuration blob.
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
blob | New value for the blob |
Adds a new configuration blob or replaces the current value of an existing blob.