6 /* draft-ietf-eap-statemachine-05.pdf - EAP Standalone Authenticator */
12 void * (*init
)(struct eap_sm
*sm
);
13 void * (*initPickUp
)(struct eap_sm
*sm
);
14 void (*reset
)(struct eap_sm
*sm
, void *priv
);
16 u8
* (*buildReq
)(struct eap_sm
*sm
, void *priv
, int id
,
18 int (*getTimeout
)(struct eap_sm
*sm
, void *priv
);
19 Boolean (*check
)(struct eap_sm
*sm
, void *priv
,
20 u8
*respData
, size_t respDataLen
);
21 void (*process
)(struct eap_sm
*sm
, void *priv
,
22 u8
*respData
, size_t respDataLen
);
23 Boolean (*isDone
)(struct eap_sm
*sm
, void *priv
);
24 u8
* (*getKey
)(struct eap_sm
*sm
, void *priv
, size_t *len
);
25 /* isSuccess is not specified in draft-ietf-eap-statemachine-05.txt,
26 * but it is useful in implementing Policy.getDecision() */
27 Boolean (*isSuccess
)(struct eap_sm
*sm
, void *priv
);
32 EAP_DISABLED
, EAP_INITIALIZE
, EAP_IDLE
, EAP_RECEIVED
,
33 EAP_INTEGRITY_CHECK
, EAP_METHOD_RESPONSE
, EAP_METHOD_REQUEST
,
34 EAP_PROPOSE_METHOD
, EAP_SELECT_ACTION
, EAP_SEND_REQUEST
,
35 EAP_DISCARD
, EAP_NAK
, EAP_RETRANSMIT
, EAP_SUCCESS
, EAP_FAILURE
,
36 EAP_TIMEOUT_FAILURE
, EAP_PICK_UP_METHOD
42 /* Lower layer to standalone authenticator variables */
43 /* eapResp: eapol_sm->be_auth.eapResp */
44 /* portEnabled: eapol_sm->portEnabled */
45 /* eapRestart: eapol_sm->auth_pae.eapRestart */
47 size_t eapRespDataLen
;
52 /* Standalone authenticator to lower layer variables */
53 /* eapReq: eapol_sm->be_auth.eapReq */
54 /* eapNoReq: eapol_sm->be_auth.eapNoReq */
55 /* eapSuccess: eapol_sm->eapSuccess */
56 /* eapFail: eapol_sm->eapFail */
57 /* eapTimeout: eapol_sm->eapTimeout */
60 u8
*eapKeyData
; /* also eapKeyAvailable (boolean) */
63 /* Standalone authenticator state machine local variables */
65 /* Long-term (maintained betwen packets) */
66 EapType currentMethod
;
69 METHOD_PROPOSED
, METHOD_CONTINUE
, METHOD_END
73 size_t lastReqDataLen
;
76 /* Short-term (not maintained between packets) */
82 DECISION_SUCCESS
, DECISION_FAILURE
, DECISION_CONTINUE
85 /* Miscellaneous variables */
86 const struct eap_method
*m
; /* selected EAP method */
87 /* not defined in draft-ietf-eap-statemachine-02 */
89 void *eapol_ctx
, *msg_ctx
;
90 struct eapol_callbacks
*eapol_cb
;
91 void *eap_method_priv
;
94 int lastId
; /* Identifier used in the last EAP-Packet */
95 struct eap_user
*user
;
96 int user_eap_method_index
;
99 enum { TLV_REQ_NONE
, TLV_REQ_SUCCESS
, TLV_REQ_FAILURE
} tlv_request
;
100 void *eap_sim_db_priv
;
101 Boolean backend_auth
;
107 const struct eap_method
* eap_sm_get_eap_methods(int method
);
108 int eap_user_get(struct eap_sm
*sm
, const u8
*identity
, size_t identity_len
,
110 void eap_sm_process_nak(struct eap_sm
*sm
, u8
*nak_list
, size_t len
);