#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "common.h"
#include "eapol_sm.h"
#include "eap.h"
#include "eloop.h"
#include "l2_packet.h"
#include "wpa.h"
#include "md5.h"
#include "rc4.h"
Include dependency graph for eapol_sm.c:
Go to the source code of this file.
Defines | |
#define | IEEE8021X_REPLAY_COUNTER_LEN 8 |
#define | IEEE8021X_KEY_SIGN_LEN 16 |
#define | IEEE8021X_KEY_IV_LEN 16 |
#define | IEEE8021X_KEY_INDEX_FLAG 0x80 |
#define | IEEE8021X_KEY_INDEX_MASK 0x03 |
#define | SM_STATE(machine, state) |
#define | SM_ENTRY(machine, state) |
#define | SM_ENTER(machine, state) sm_ ## machine ## _ ## state ## _Enter(sm, 0) |
#define | SM_ENTER_GLOBAL(machine, state) sm_ ## machine ## _ ## state ## _Enter(sm, 1) |
#define | SM_STEP(machine) static void sm_ ## machine ## _Step(struct eapol_sm *sm) |
#define | SM_STEP_RUN(machine) sm_ ## machine ## _Step(sm) |
#define | IEEE8021X_ENCR_KEY_LEN 32 |
#define | IEEE8021X_SIGN_KEY_LEN 32 |
Functions | |
SM_STATE (SUPP_PAE, LOGOFF) | |
SM_STATE (SUPP_PAE, DISCONNECTED) | |
SM_STATE (SUPP_PAE, CONNECTING) | |
SM_STATE (SUPP_PAE, AUTHENTICATING) | |
SM_STATE (SUPP_PAE, HELD) | |
SM_STATE (SUPP_PAE, AUTHENTICATED) | |
SM_STATE (SUPP_PAE, RESTART) | |
SM_STATE (SUPP_PAE, S_FORCE_AUTH) | |
SM_STATE (SUPP_PAE, S_FORCE_UNAUTH) | |
SM_STEP (SUPP_PAE) | |
SM_STATE (KEY_RX, NO_KEY_RECEIVE) | |
SM_STATE (KEY_RX, KEY_RECEIVE) | |
SM_STEP (KEY_RX) | |
SM_STATE (SUPP_BE, REQUEST) | |
SM_STATE (SUPP_BE, RESPONSE) | |
SM_STATE (SUPP_BE, SUCCESS) | |
SM_STATE (SUPP_BE, FAIL) | |
SM_STATE (SUPP_BE, TIMEOUT) | |
SM_STATE (SUPP_BE, IDLE) | |
SM_STATE (SUPP_BE, INITIALIZE) | |
SM_STATE (SUPP_BE, RECEIVE) | |
SM_STEP (SUPP_BE) | |
void | eapol_sm_step (struct eapol_sm *sm) |
EAPOL state machine step function. | |
void | eapol_sm_configure (struct eapol_sm *sm, int heldPeriod, int authPeriod, int startPeriod, int maxStart) |
Set EAPOL variables. | |
int | eapol_sm_get_status (struct eapol_sm *sm, char *buf, size_t buflen, int verbose) |
Get EAPOL state machine status. | |
int | eapol_sm_get_mib (struct eapol_sm *sm, char *buf, size_t buflen) |
Get EAPOL state machine MIBs. | |
int | eapol_sm_rx_eapol (struct eapol_sm *sm, const u8 *src, const u8 *buf, size_t len) |
Process received EAPOL frames. | |
void | eapol_sm_notify_tx_eapol_key (struct eapol_sm *sm) |
Notification about transmitted EAPOL packet. | |
void | eapol_sm_notify_portEnabled (struct eapol_sm *sm, Boolean enabled) |
Notification about portEnabled change. | |
void | eapol_sm_notify_portValid (struct eapol_sm *sm, Boolean valid) |
Notification about portValid change. | |
void | eapol_sm_notify_eap_success (struct eapol_sm *sm, Boolean success) |
Notification of external EAP success trigger. | |
void | eapol_sm_notify_eap_fail (struct eapol_sm *sm, Boolean fail) |
Notification of external EAP failure trigger. | |
void | eapol_sm_notify_config (struct eapol_sm *sm, struct wpa_ssid *config, const struct eapol_config *conf) |
Notification of EAPOL configuration change. | |
int | eapol_sm_get_key (struct eapol_sm *sm, u8 *key, size_t len) |
Get master session key (MSK) from EAP. | |
void | eapol_sm_notify_logoff (struct eapol_sm *sm, Boolean logoff) |
Notification of logon/logoff commands. | |
void | eapol_sm_notify_cached (struct eapol_sm *sm) |
Notification of successful PMKSA caching. | |
void | eapol_sm_notify_pmkid_attempt (struct eapol_sm *sm, int attempt) |
Notification of PMKSA caching. | |
void | eapol_sm_register_scard_ctx (struct eapol_sm *sm, void *ctx) |
Notification of smart card context. | |
void | eapol_sm_notify_portControl (struct eapol_sm *sm, PortControl portControl) |
Notification of portControl changes. | |
void | eapol_sm_notify_ctrl_attached (struct eapol_sm *sm) |
Notification of attached monitor. | |
void | eapol_sm_notify_ctrl_response (struct eapol_sm *sm) |
Notification of received user input. | |
void | eapol_sm_request_reauth (struct eapol_sm *sm) |
Request reauthentication. | |
void | eapol_sm_notify_lower_layer_success (struct eapol_sm *sm) |
Notification of lower layer success. | |
eapol_sm * | eapol_sm_init (struct eapol_ctx *ctx) |
Initialize EAPOL state machine. | |
void | eapol_sm_deinit (struct eapol_sm *sm) |
Deinitialize EAPOL state machine. | |
Variables | |
ieee802_1x_eapol_key | packed |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file eapol_sm.c.
|
Value: if (!global || sm->machine ## _state != machine ## _ ## state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, "EAPOL: " #machine " entering state " #state); \ } \ sm->machine ## _state = machine ## _ ## state; Definition at line 195 of file eapol_sm.c. |
|
Value: static void sm_ ## machine ## _ ## state ## _Enter(struct eapol_sm *sm, \ int global) Definition at line 191 of file eapol_sm.c. |
|
Set EAPOL variables.
Definition at line 962 of file eapol_sm.c. |
|
Deinitialize EAPOL state machine.
Definition at line 1742 of file eapol_sm.c. Here is the call graph for this function: |
|
Get master session key (MSK) from EAP.
Definition at line 1335 of file eapol_sm.c. Here is the call graph for this function: |
|
Get EAPOL state machine MIBs.
Definition at line 1040 of file eapol_sm.c. |
|
Get EAPOL state machine status.
Definition at line 992 of file eapol_sm.c. Here is the call graph for this function: |
|
Initialize EAPOL state machine.
Definition at line 1692 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of successful PMKSA caching.
Definition at line 1377 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of EAPOL configuration change.
Definition at line 1301 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of attached monitor.
Definition at line 1473 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of received user input.
Definition at line 1489 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of external EAP failure trigger.
Definition at line 1276 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of external EAP success trigger.
This function is called to update EAP state when WPA-PSK key handshake has been completed successfully since WPA-PSK does not use EAP state machine. Definition at line 1253 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of logon/logoff commands.
Definition at line 1360 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of lower layer success.
Definition at line 1529 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of PMKSA caching.
Definition at line 1395 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification of portControl changes.
Definition at line 1454 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification about portEnabled change.
Definition at line 1211 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification about portValid change.
Definition at line 1230 of file eapol_sm.c. Here is the call graph for this function: |
|
Notification about transmitted EAPOL packet.
Definition at line 1196 of file eapol_sm.c. |
|
Notification of smart card context.
Definition at line 1437 of file eapol_sm.c. Here is the call graph for this function: |
|
Request reauthentication.
Definition at line 1512 of file eapol_sm.c. |
|
Process received EAPOL frames.
Definition at line 1097 of file eapol_sm.c. Here is the call graph for this function: |
|
EAPOL state machine step function.
Definition at line 846 of file eapol_sm.c. Here is the call graph for this function: |