15b9c547cSRui Paulo /* 25b9c547cSRui Paulo * EAP proxy definitions 35b9c547cSRui Paulo * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. 45b9c547cSRui Paulo * 55b9c547cSRui Paulo * This software may be distributed under the terms of the BSD license. 65b9c547cSRui Paulo * See README for more details. 75b9c547cSRui Paulo */ 85b9c547cSRui Paulo 95b9c547cSRui Paulo #ifndef EAP_PROXY_H 105b9c547cSRui Paulo #define EAP_PROXY_H 115b9c547cSRui Paulo 125b9c547cSRui Paulo struct eap_proxy_sm; 135b9c547cSRui Paulo struct eapol_callbacks; 145b9c547cSRui Paulo struct eap_sm; 155b9c547cSRui Paulo struct eap_peer_config; 165b9c547cSRui Paulo 175b9c547cSRui Paulo enum eap_proxy_status { 185b9c547cSRui Paulo EAP_PROXY_FAILURE = 0x00, 195b9c547cSRui Paulo EAP_PROXY_SUCCESS 205b9c547cSRui Paulo }; 215b9c547cSRui Paulo 225b9c547cSRui Paulo struct eap_proxy_sm * 23*85732ac8SCy Schubert eap_proxy_init(void *eapol_ctx, const struct eapol_callbacks *eapol_cb, 245b9c547cSRui Paulo void *msg_ctx); 255b9c547cSRui Paulo 265b9c547cSRui Paulo void eap_proxy_deinit(struct eap_proxy_sm *eap_proxy); 275b9c547cSRui Paulo 285b9c547cSRui Paulo int eap_proxy_key_available(struct eap_proxy_sm *sm); 295b9c547cSRui Paulo 305b9c547cSRui Paulo const u8 * eap_proxy_get_eapKeyData(struct eap_proxy_sm *sm, size_t *len); 315b9c547cSRui Paulo 325b9c547cSRui Paulo struct wpabuf * eap_proxy_get_eapRespData(struct eap_proxy_sm *sm); 335b9c547cSRui Paulo 345b9c547cSRui Paulo int eap_proxy_sm_step(struct eap_proxy_sm *sm, struct eap_sm *eap_sm); 355b9c547cSRui Paulo 365b9c547cSRui Paulo enum eap_proxy_status 375b9c547cSRui Paulo eap_proxy_packet_update(struct eap_proxy_sm *eap_proxy, u8 *eapReqData, 385b9c547cSRui Paulo int eapReqDataLen); 395b9c547cSRui Paulo 405b9c547cSRui Paulo int eap_proxy_sm_get_status(struct eap_proxy_sm *sm, char *buf, size_t buflen, 415b9c547cSRui Paulo int verbose); 425b9c547cSRui Paulo 43*85732ac8SCy Schubert int eap_proxy_get_imsi(struct eap_proxy_sm *eap_proxy, int sim_num, 44*85732ac8SCy Schubert char *imsi_buf, size_t *imsi_len); 455b9c547cSRui Paulo 465b9c547cSRui Paulo int eap_proxy_notify_config(struct eap_proxy_sm *sm, 475b9c547cSRui Paulo struct eap_peer_config *config); 485b9c547cSRui Paulo 49*85732ac8SCy Schubert u8 * eap_proxy_get_eap_session_id(struct eap_proxy_sm *sm, size_t *len); 50*85732ac8SCy Schubert 51*85732ac8SCy Schubert u8 * eap_proxy_get_emsk(struct eap_proxy_sm *sm, size_t *len); 52*85732ac8SCy Schubert 53*85732ac8SCy Schubert void eap_proxy_sm_abort(struct eap_proxy_sm *sm); 54*85732ac8SCy Schubert 555b9c547cSRui Paulo #endif /* EAP_PROXY_H */ 56