11 #define EAP_MAX_METHODS 8
13 u8 methods[EAP_MAX_METHODS];
21 EAPOL_eapSuccess, EAPOL_eapRestart, EAPOL_eapFail, EAPOL_eapResp,
22 EAPOL_eapReq, EAPOL_eapNoReq, EAPOL_portEnabled, EAPOL_eapTimeout
25 struct eapol_callbacks {
26 Boolean (*get_bool)(void *ctx, enum eapol_bool_var variable);
27 void (*set_bool)(void *ctx, enum eapol_bool_var variable,
29 void (*set_eapReqData)(void *ctx, const u8 *eapReqData,
30 size_t eapReqDataLen);
31 void (*set_eapKeyData)(void *ctx, const u8 *eapKeyData,
32 size_t eapKeyDataLen);
33 int (*get_eap_user)(void *ctx, const u8 *identity, size_t identity_len,
34 int phase2, struct eap_user *user);
35 const char * (*get_eap_req_id_text)(void *ctx, size_t *len);
40 void *eap_sim_db_priv;
47 struct eap_sm * eap_sm_init(void *eapol_ctx, struct eapol_callbacks *eapol_cb,
48 struct eap_config *eap_conf);
49 void eap_sm_deinit(struct eap_sm *sm);
50 int eap_sm_step(struct eap_sm *sm);
51 u8 eap_get_type(const char *name);
52 void eap_set_eapRespData(struct eap_sm *sm, const u8 *eapRespData,
53 size_t eapRespDataLen);
54 void eap_sm_notify_cached(struct eap_sm *sm);
56 #else /* EAP_SERVER */
58 static inline struct eap_sm * eap_sm_init(void *eapol_ctx,
59 struct eapol_callbacks *eapol_cb,
60 struct eap_config *eap_conf)
65 static inline void eap_sm_deinit(struct eap_sm *sm)
69 static inline int eap_sm_step(struct eap_sm *sm)
74 static inline u8 eap_get_type(const char *name)
79 static inline void eap_set_eapRespData(struct eap_sm *sm,
80 const u8 *eapRespData,
81 size_t eapRespDataLen)
85 static inline void eap_sm_notify_cached(struct eap_sm *sm)
89 #endif /* EAP_SERVER */