/* * IEEE 802.1X-2004 Authenticator - EAPOL state machine (internal definitions) * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. *//* ... */#ifndefEAPOL_AUTH_SM_I_H#defineEAPOL_AUTH_SM_I_H#include"common/defs.h"/* IEEE Std 802.1X-2004, Ch. 8.2 */typedefenum{ForceUnauthorized=1,ForceAuthorized=3,Auto=2}PortTypes;typedefenum{Unauthorized=2,Authorized=1}PortState;typedefenum{Both=0,In=1}ControlledDirection;typedefunsignedintCounter;/** * struct eapol_authenticator - Global EAPOL authenticator data *//* ... */structeapol_authenticator{structeapol_auth_configconf;structeapol_auth_cbcb;u8*default_wep_key;u8default_wep_key_idx;}{ ... };/** * struct eapol_state_machine - Per-Supplicant Authenticator state machines *//* ... */structeapol_state_machine{/* timers */intaWhile;intquietWhile;intreAuthWhen;/* global variables */boolauthAbort;boolauthFail;PortStateauthPortStatus;boolauthStart;boolauthTimeout;boolauthSuccess;booleapolEap;boolinitialize;boolkeyDone;boolkeyRun;boolkeyTxEnabled;PortTypesportControl;boolportValid;boolreAuthenticate;/* Port Timers state machine *//* 'bool tick' implicitly handled as registered timeout *//* Authenticator PAE state machine */enum{AUTH_PAE_INITIALIZE,AUTH_PAE_DISCONNECTED,AUTH_PAE_CONNECTING,AUTH_PAE_AUTHENTICATING,AUTH_PAE_AUTHENTICATED,AUTH_PAE_ABORTING,AUTH_PAE_HELD,AUTH_PAE_FORCE_AUTH,AUTH_PAE_FORCE_UNAUTH,AUTH_PAE_RESTART}{ ... }auth_pae_state;/* variables */booleapolLogoff;booleapolStart;PortTypesportMode;unsignedintreAuthCount;/* constants */unsignedintquietPeriod;/* default 60; 0..65535 */#defineAUTH_PAE_DEFAULT_quietPeriod60unsignedintreAuthMax;/* default 2 */#defineAUTH_PAE_DEFAULT_reAuthMax2/* counters */CounterauthEntersConnecting;CounterauthEapLogoffsWhileConnecting;CounterauthEntersAuthenticating;CounterauthAuthSuccessesWhileAuthenticating;CounterauthAuthTimeoutsWhileAuthenticating;CounterauthAuthFailWhileAuthenticating;CounterauthAuthEapStartsWhileAuthenticating;CounterauthAuthEapLogoffWhileAuthenticating;CounterauthAuthReauthsWhileAuthenticated;CounterauthAuthEapStartsWhileAuthenticated;CounterauthAuthEapLogoffWhileAuthenticated;/* Backend Authentication state machine */enum{BE_AUTH_REQUEST,BE_AUTH_RESPONSE,BE_AUTH_SUCCESS,BE_AUTH_FAIL,BE_AUTH_TIMEOUT,BE_AUTH_IDLE,BE_AUTH_INITIALIZE,BE_AUTH_IGNORE}{ ... }be_auth_state;/* constants */unsignedintserverTimeout;/* default 30; 1..X */#defineBE_AUTH_DEFAULT_serverTimeout30/* counters */CounterbackendResponses;CounterbackendAccessChallenges;CounterbackendOtherRequestsToSupplicant;CounterbackendAuthSuccesses;CounterbackendAuthFails;/* Reauthentication Timer state machine */enum{REAUTH_TIMER_INITIALIZE,REAUTH_TIMER_REAUTHENTICATE}{ ... }reauth_timer_state;/* constants */unsignedintreAuthPeriod;/* default 3600 s */boolreAuthEnabled;/* Authenticator Key Transmit state machine */enum{AUTH_KEY_TX_NO_KEY_TRANSMIT,AUTH_KEY_TX_KEY_TRANSMIT}{ ... }auth_key_tx_state;/* Key Receive state machine */enum{KEY_RX_NO_KEY_RECEIVE,KEY_RX_KEY_RECEIVE}key_rx_state;/* variables */boolrxKey;/* Controlled Directions state machine */enum{CTRL_DIR_FORCE_BOTH,CTRL_DIR_IN_OR_BOTH}ctrl_dir_state;/* variables */ControlledDirectionadminControlledDirections;ControlledDirectionoperControlledDirections;booloperEdge;/* Authenticator Statistics Table */Counterdot1xAuthEapolFramesRx;Counterdot1xAuthEapolFramesTx;Counterdot1xAuthEapolStartFramesRx;Counterdot1xAuthEapolLogoffFramesRx;Counterdot1xAuthEapolRespIdFramesRx;Counterdot1xAuthEapolRespFramesRx;Counterdot1xAuthEapolReqIdFramesTx;Counterdot1xAuthEapolReqFramesTx;Counterdot1xAuthInvalidEapolFramesRx;Counterdot1xAuthEapLengthErrorFramesRx;Counterdot1xAuthLastEapolFrameVersion;/* Other variables - not defined in IEEE 802.1X */u8addr[ETH_ALEN];/* Supplicant address */intflags;/* EAPOL_SM_* *//* EAPOL/AAA <-> EAP full authenticator interface */structeap_eapol_interface*eap_if;intradius_identifier;/* TODO: check when the last messages can be released */structradius_msg*last_recv_radius;u8last_eap_id;/* last used EAP Identifier */u8*identity;size_tidentity_len;u8eap_type_authsrv;/* EAP type of the last EAP packet from * Authentication server *//* ... */u8eap_type_supp;/* EAP type of the last EAP packet from Supplicant */#ifndefCONFIG_NO_RADIUSstructwpabuf*radius_cui;/* Chargeable-User-Identity */#endifstructeap_sm*eap;boolinitializing;/* in process of initializing state machines */boolchanged;structeapol_authenticator*eapol;void*sta;/* station context pointer to use in callbacks */intremediation;u64acct_multi_session_id;}{ ... };/* ... */#endif/* EAPOL_AUTH_SM_I_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.