xref: /freebsd/contrib/wpa/src/eap_peer/eap_proxy.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 /*
2  * EAP proxy definitions
3  * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef EAP_PROXY_H
10 #define EAP_PROXY_H
11 
12 struct eap_proxy_sm;
13 struct eapol_callbacks;
14 struct eap_sm;
15 struct eap_peer_config;
16 
17 enum eap_proxy_status {
18 	EAP_PROXY_FAILURE = 0x00,
19 	EAP_PROXY_SUCCESS
20 };
21 
22 struct eap_proxy_sm *
23 eap_proxy_init(void *eapol_ctx, const struct eapol_callbacks *eapol_cb,
24 	       void *msg_ctx);
25 
26 void eap_proxy_deinit(struct eap_proxy_sm *eap_proxy);
27 
28 int eap_proxy_key_available(struct eap_proxy_sm *sm);
29 
30 const u8 * eap_proxy_get_eapKeyData(struct eap_proxy_sm *sm, size_t *len);
31 
32 struct wpabuf * eap_proxy_get_eapRespData(struct eap_proxy_sm *sm);
33 
34 int eap_proxy_sm_step(struct eap_proxy_sm *sm, struct eap_sm *eap_sm);
35 
36 enum eap_proxy_status
37 eap_proxy_packet_update(struct eap_proxy_sm *eap_proxy, u8 *eapReqData,
38 			int eapReqDataLen);
39 
40 int eap_proxy_sm_get_status(struct eap_proxy_sm *sm, char *buf, size_t buflen,
41 			    int verbose);
42 
43 int eap_proxy_get_imsi(struct eap_proxy_sm *eap_proxy, int sim_num,
44 		       char *imsi_buf, size_t *imsi_len);
45 
46 int eap_proxy_notify_config(struct eap_proxy_sm *sm,
47 			    struct eap_peer_config *config);
48 
49 u8 * eap_proxy_get_eap_session_id(struct eap_proxy_sm *sm, size_t *len);
50 
51 u8 * eap_proxy_get_emsk(struct eap_proxy_sm *sm, size_t *len);
52 
53 void eap_proxy_sm_abort(struct eap_proxy_sm *sm);
54 
55 #endif /* EAP_PROXY_H */
56