11 #ifdef IEEE8021X_EAPOL
14 EAPOL_eapSuccess, EAPOL_eapRestart, EAPOL_eapFail, EAPOL_eapResp,
15 EAPOL_eapNoResp, EAPOL_eapReq, EAPOL_portEnabled, EAPOL_altAccept,
23 struct eapol_callbacks {
24 struct wpa_ssid * (*get_config)(void *ctx);
25 Boolean (*get_bool)(void *ctx, enum eapol_bool_var variable);
26 void (*set_bool)(void *ctx, enum eapol_bool_var variable,
28 unsigned int (*get_int)(void *ctx, enum eapol_int_var variable);
29 void (*set_int)(void *ctx, enum eapol_int_var variable,
31 u8 * (*get_eapReqData)(void *ctx, size_t *len);
34 struct eap_sm *eap_sm_init(void *eapol_ctx, struct eapol_callbacks *eapol_cb,
36 void eap_sm_deinit(struct eap_sm *sm);
37 int eap_sm_step(struct eap_sm *sm);
38 void eap_sm_abort(struct eap_sm *sm);
39 int eap_sm_get_status(struct eap_sm *sm, char *buf, size_t buflen,
41 u8 *eap_sm_buildIdentity(struct eap_sm *sm, int id, size_t *len,
43 const struct eap_method * eap_sm_get_eap_methods(int method);
44 void eap_sm_request_identity(struct eap_sm *sm, struct wpa_ssid *config);
45 void eap_sm_request_password(struct eap_sm *sm, struct wpa_ssid *config);
46 void eap_sm_request_otp(struct eap_sm *sm, struct wpa_ssid *config,
47 char *msg, size_t msg_len);
48 void eap_sm_notify_ctrl_attached(struct eap_sm *sm);
49 u8 eap_get_type(const char *name);
50 u8 eap_get_phase2_type(const char *name);
51 u8 *eap_get_phase2_types(struct wpa_ssid *config, size_t *count);
52 void eap_set_fast_reauth(struct eap_sm *sm, int enabled);
53 void eap_set_workaround(struct eap_sm *sm, unsigned int workaround);
54 struct wpa_ssid * eap_get_config(struct eap_sm *sm);
55 int eap_key_available(struct eap_sm *sm);
56 void eap_notify_success(struct eap_sm *sm);
57 u8 * eap_get_eapKeyData(struct eap_sm *sm, size_t *len);
58 u8 * eap_get_eapRespData(struct eap_sm *sm, size_t *len);
59 void eap_register_scard_ctx(struct eap_sm *sm, void *ctx);
61 #else /* IEEE8021X_EAPOL */
63 static inline u8 eap_get_type(const char *name)
68 #endif /* IEEE8021X_EAPOL */