1 /*
2 * Internal WPA/RSN supplicant state machine definitions
3 * Copyright (c) 2004-2018, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9 #ifndef WPA_I_H
10 #define WPA_I_H
11
12 #include "utils/list.h"
13
14 struct wpa_tdls_peer;
15 struct wpa_eapol_key;
16
17 struct pasn_ft_r1kh {
18 u8 bssid[ETH_ALEN];
19 u8 r1kh_id[FT_R1KH_ID_LEN];
20 };
21
22 /**
23 * struct wpa_sm - Internal WPA state machine data
24 */
25 struct wpa_sm {
26 u8 pmk[PMK_LEN_MAX];
27 size_t pmk_len;
28 struct wpa_ptk ptk, tptk;
29 int ptk_set, tptk_set;
30 unsigned int msg_3_of_4_ok:1;
31 u8 snonce[WPA_NONCE_LEN];
32 u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */
33 int renew_snonce;
34 u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];
35 int rx_replay_counter_set;
36 u8 request_counter[WPA_REPLAY_COUNTER_LEN];
37 struct wpa_gtk gtk;
38 struct wpa_gtk gtk_wnm_sleep;
39 struct wpa_igtk igtk;
40 struct wpa_igtk igtk_wnm_sleep;
41 struct wpa_bigtk bigtk;
42 struct wpa_bigtk bigtk_wnm_sleep;
43
44 struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
45
46 struct rsn_pmksa_cache *pmksa; /* PMKSA cache */
47 struct rsn_pmksa_cache_entry *cur_pmksa; /* current PMKSA entry */
48 struct dl_list pmksa_candidates;
49
50 struct l2_packet_data *l2_preauth;
51 struct l2_packet_data *l2_preauth_br;
52 struct l2_packet_data *l2_tdls;
53 u8 preauth_bssid[ETH_ALEN]; /* current RSN pre-auth peer or
54 * 00:00:00:00:00:00 if no pre-auth is
55 * in progress */
56 struct eapol_sm *preauth_eapol;
57
58 struct wpa_sm_ctx *ctx;
59
60 void *scard_ctx; /* context for smartcard callbacks */
61 int fast_reauth; /* whether EAP fast re-authentication is enabled */
62
63 void *network_ctx;
64 int allowed_pairwise_cipher; /* bitfield of WPA_CIPHER_* */
65 int proactive_key_caching;
66 int eap_workaround;
67 void *eap_conf_ctx;
68 u8 ssid[32];
69 size_t ssid_len;
70 int wpa_ptk_rekey;
71 int wpa_deny_ptk0_rekey:1;
72 int p2p;
73 int wpa_rsc_relaxation;
74 int owe_ptk_workaround;
75 int beacon_prot;
76 int ext_key_id; /* whether Extended Key ID is enabled */
77 int use_ext_key_id; /* whether Extended Key ID has been detected
78 * to be used */
79 int keyidx_active; /* Key ID for the active TK */
80
81 /*
82 * If set Key Derivation Key should be derived as part of PMK to
83 * PTK derivation regardless of advertised capabilities.
84 */
85 bool force_kdk_derivation;
86
87 u8 own_addr[ETH_ALEN];
88 const char *ifname;
89 const char *bridge_ifname;
90 u8 bssid[ETH_ALEN];
91
92 unsigned int dot11RSNAConfigPMKLifetime;
93 unsigned int dot11RSNAConfigPMKReauthThreshold;
94 unsigned int dot11RSNAConfigSATimeout;
95
96 unsigned int dot11RSNA4WayHandshakeFailures;
97
98 /* Selected configuration (based on Beacon/ProbeResp WPA IE) */
99 unsigned int proto;
100 unsigned int pairwise_cipher;
101 unsigned int group_cipher;
102 unsigned int key_mgmt;
103 unsigned int mgmt_group_cipher;
104
105 int rsn_enabled; /* Whether RSN is enabled in configuration */
106 int mfp; /* 0 = disabled, 1 = optional, 2 = mandatory */
107 int ocv; /* Operating Channel Validation */
108 int sae_pwe; /* SAE PWE generation options */
109
110 unsigned int sae_pk:1; /* whether SAE-PK is used */
111 unsigned int secure_ltf:1;
112 unsigned int secure_rtt:1;
113 unsigned int prot_range_neg:1;
114
115 u8 *assoc_wpa_ie; /* Own WPA/RSN IE from (Re)AssocReq */
116 size_t assoc_wpa_ie_len;
117 u8 *assoc_rsnxe; /* Own RSNXE from (Re)AssocReq */
118 size_t assoc_rsnxe_len;
119 u8 *ap_wpa_ie, *ap_rsn_ie, *ap_rsnxe;
120 size_t ap_wpa_ie_len, ap_rsn_ie_len, ap_rsnxe_len;
121
122 #ifdef CONFIG_MAGICLINK_PC
123 int legacyGO;
124 #endif
125 #ifdef CONFIG_TDLS
126 struct wpa_tdls_peer *tdls;
127 int tdls_prohibited;
128 int tdls_chan_switch_prohibited;
129 int tdls_disabled;
130
131 /* The driver supports TDLS */
132 int tdls_supported;
133
134 /*
135 * The driver requires explicit discovery/setup/teardown frames sent
136 * to it via tdls_mgmt.
137 */
138 int tdls_external_setup;
139
140 /* The driver supports TDLS channel switching */
141 int tdls_chan_switch;
142 #endif /* CONFIG_TDLS */
143
144 #ifdef CONFIG_IEEE80211R
145 u8 xxkey[PMK_LEN_MAX]; /* PSK or the second 256 bits of MSK, or the
146 * first 384 bits of MSK */
147 size_t xxkey_len;
148 u8 pmk_r0[PMK_LEN_MAX];
149 size_t pmk_r0_len;
150 u8 pmk_r0_name[WPA_PMK_NAME_LEN];
151 u8 pmk_r1[PMK_LEN_MAX];
152 size_t pmk_r1_len;
153 u8 pmk_r1_name[WPA_PMK_NAME_LEN];
154 u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];
155 u8 r0kh_id[FT_R0KH_ID_MAX_LEN];
156 size_t r0kh_id_len;
157 u8 r1kh_id[FT_R1KH_ID_LEN];
158 unsigned int ft_completed:1;
159 unsigned int ft_reassoc_completed:1;
160 unsigned int ft_protocol:1;
161 int over_the_ds_in_progress;
162 u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
163 int set_ptk_after_assoc;
164 u8 mdie_ft_capab; /* FT Capability and Policy from target AP MDIE */
165 u8 *assoc_resp_ies; /* MDIE and FTIE from (Re)Association Response */
166 size_t assoc_resp_ies_len;
167 #ifdef CONFIG_PASN
168 /*
169 * Currently, the WPA state machine stores the PMK-R1, PMK-R1-Name and
170 * R1KH-ID only for the current association. As PMK-R1 is required to
171 * perform PASN authentication with FT, store the R1KH-ID for previous
172 * associations, which would later be used to derive the PMK-R1 as part
173 * of the PASN authentication flow.
174 */
175 struct pasn_ft_r1kh *pasn_r1kh;
176 unsigned int n_pasn_r1kh;
177 #endif /* CONFIG_PASN */
178 #endif /* CONFIG_IEEE80211R */
179
180 #ifdef CONFIG_P2P
181 u8 p2p_ip_addr[3 * 4];
182 #endif /* CONFIG_P2P */
183
184 #ifdef CONFIG_TESTING_OPTIONS
185 struct wpabuf *test_assoc_ie;
186 int ft_rsnxe_used;
187 unsigned int oci_freq_override_eapol;
188 unsigned int oci_freq_override_eapol_g2;
189 unsigned int oci_freq_override_ft_assoc;
190 unsigned int oci_freq_override_fils_assoc;
191 #endif /* CONFIG_TESTING_OPTIONS */
192
193 #ifdef CONFIG_FILS
194 u8 fils_nonce[FILS_NONCE_LEN];
195 u8 fils_session[FILS_SESSION_LEN];
196 u8 fils_anonce[FILS_NONCE_LEN];
197 u8 fils_key_auth_ap[FILS_MAX_KEY_AUTH_LEN];
198 u8 fils_key_auth_sta[FILS_MAX_KEY_AUTH_LEN];
199 size_t fils_key_auth_len;
200 unsigned int fils_completed:1;
201 unsigned int fils_erp_pmkid_set:1;
202 unsigned int fils_cache_id_set:1;
203 u8 fils_erp_pmkid[PMKID_LEN];
204 u8 fils_cache_id[FILS_CACHE_ID_LEN];
205 struct crypto_ecdh *fils_ecdh;
206 int fils_dh_group;
207 size_t fils_dh_elem_len;
208 struct wpabuf *fils_ft_ies;
209 u8 fils_ft[FILS_FT_MAX_LEN];
210 size_t fils_ft_len;
211 #endif /* CONFIG_FILS */
212
213 #ifdef CONFIG_OWE
214 struct crypto_ecdh *owe_ecdh;
215 u16 owe_group;
216 #endif /* CONFIG_OWE */
217
218 #ifdef CONFIG_DPP2
219 struct wpabuf *dpp_z;
220 int dpp_pfs;
221 #endif /* CONFIG_DPP2 */
222 };
223
224
wpa_sm_set_state(struct wpa_sm * sm,enum wpa_states state)225 static inline void wpa_sm_set_state(struct wpa_sm *sm, enum wpa_states state)
226 {
227 WPA_ASSERT(sm->ctx->set_state);
228 sm->ctx->set_state(sm->ctx->ctx, state);
229 }
230
wpa_sm_get_state(struct wpa_sm * sm)231 static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm)
232 {
233 WPA_ASSERT(sm->ctx->get_state);
234 return sm->ctx->get_state(sm->ctx->ctx);
235 }
236
wpa_sm_deauthenticate(struct wpa_sm * sm,u16 reason_code)237 static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, u16 reason_code)
238 {
239 WPA_ASSERT(sm->ctx->deauthenticate);
240 sm->ctx->deauthenticate(sm->ctx->ctx, reason_code);
241 }
242
wpa_sm_set_key(struct wpa_sm * sm,enum wpa_alg alg,const u8 * addr,int key_idx,int set_tx,const u8 * seq,size_t seq_len,const u8 * key,size_t key_len,enum key_flag key_flag)243 static inline int wpa_sm_set_key(struct wpa_sm *sm, enum wpa_alg alg,
244 const u8 *addr, int key_idx, int set_tx,
245 const u8 *seq, size_t seq_len,
246 const u8 *key, size_t key_len,
247 enum key_flag key_flag)
248 {
249 WPA_ASSERT(sm->ctx->set_key);
250 return sm->ctx->set_key(sm->ctx->ctx, alg, addr, key_idx, set_tx,
251 seq, seq_len, key, key_len, key_flag);
252 }
253
wpa_sm_reconnect(struct wpa_sm * sm)254 static inline void wpa_sm_reconnect(struct wpa_sm *sm)
255 {
256 WPA_ASSERT(sm->ctx->reconnect);
257 sm->ctx->reconnect(sm->ctx->ctx);
258 }
259
wpa_sm_get_network_ctx(struct wpa_sm * sm)260 static inline void * wpa_sm_get_network_ctx(struct wpa_sm *sm)
261 {
262 WPA_ASSERT(sm->ctx->get_network_ctx);
263 return sm->ctx->get_network_ctx(sm->ctx->ctx);
264 }
265
wpa_sm_get_bssid(struct wpa_sm * sm,u8 * bssid)266 static inline int wpa_sm_get_bssid(struct wpa_sm *sm, u8 *bssid)
267 {
268 WPA_ASSERT(sm->ctx->get_bssid);
269 return sm->ctx->get_bssid(sm->ctx->ctx, bssid);
270 }
271
wpa_sm_ether_send(struct wpa_sm * sm,const u8 * dest,u16 proto,const u8 * buf,size_t len)272 static inline int wpa_sm_ether_send(struct wpa_sm *sm, const u8 *dest,
273 u16 proto, const u8 *buf, size_t len)
274 {
275 WPA_ASSERT(sm->ctx->ether_send);
276 return sm->ctx->ether_send(sm->ctx->ctx, dest, proto, buf, len);
277 }
278
wpa_sm_get_beacon_ie(struct wpa_sm * sm)279 static inline int wpa_sm_get_beacon_ie(struct wpa_sm *sm)
280 {
281 WPA_ASSERT(sm->ctx->get_beacon_ie);
282 return sm->ctx->get_beacon_ie(sm->ctx->ctx);
283 }
284
wpa_sm_cancel_auth_timeout(struct wpa_sm * sm)285 static inline void wpa_sm_cancel_auth_timeout(struct wpa_sm *sm)
286 {
287 WPA_ASSERT(sm->ctx->cancel_auth_timeout);
288 sm->ctx->cancel_auth_timeout(sm->ctx->ctx);
289 }
290
wpa_sm_alloc_eapol(struct wpa_sm * sm,u8 type,const void * data,u16 data_len,size_t * msg_len,void ** data_pos)291 static inline u8 * wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,
292 const void *data, u16 data_len,
293 size_t *msg_len, void **data_pos)
294 {
295 WPA_ASSERT(sm->ctx->alloc_eapol);
296 return sm->ctx->alloc_eapol(sm->ctx->ctx, type, data, data_len,
297 msg_len, data_pos);
298 }
299
wpa_sm_add_pmkid(struct wpa_sm * sm,void * network_ctx,const u8 * bssid,const u8 * pmkid,const u8 * cache_id,const u8 * pmk,size_t pmk_len,u32 pmk_lifetime,u8 pmk_reauth_threshold,int akmp)300 static inline int wpa_sm_add_pmkid(struct wpa_sm *sm, void *network_ctx,
301 const u8 *bssid, const u8 *pmkid,
302 const u8 *cache_id, const u8 *pmk,
303 size_t pmk_len, u32 pmk_lifetime,
304 u8 pmk_reauth_threshold, int akmp)
305 {
306 WPA_ASSERT(sm->ctx->add_pmkid);
307 return sm->ctx->add_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid,
308 cache_id, pmk, pmk_len, pmk_lifetime,
309 pmk_reauth_threshold, akmp);
310 }
311
wpa_sm_remove_pmkid(struct wpa_sm * sm,void * network_ctx,const u8 * bssid,const u8 * pmkid,const u8 * cache_id)312 static inline int wpa_sm_remove_pmkid(struct wpa_sm *sm, void *network_ctx,
313 const u8 *bssid, const u8 *pmkid,
314 const u8 *cache_id)
315 {
316 WPA_ASSERT(sm->ctx->remove_pmkid);
317 return sm->ctx->remove_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid,
318 cache_id);
319 }
320
wpa_sm_mlme_setprotection(struct wpa_sm * sm,const u8 * addr,int protect_type,int key_type)321 static inline int wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,
322 int protect_type, int key_type)
323 {
324 WPA_ASSERT(sm->ctx->mlme_setprotection);
325 return sm->ctx->mlme_setprotection(sm->ctx->ctx, addr, protect_type,
326 key_type);
327 }
328
wpa_sm_update_ft_ies(struct wpa_sm * sm,const u8 * md,const u8 * ies,size_t ies_len)329 static inline int wpa_sm_update_ft_ies(struct wpa_sm *sm, const u8 *md,
330 const u8 *ies, size_t ies_len)
331 {
332 if (sm->ctx->update_ft_ies)
333 return sm->ctx->update_ft_ies(sm->ctx->ctx, md, ies, ies_len);
334 return -1;
335 }
336
wpa_sm_send_ft_action(struct wpa_sm * sm,u8 action,const u8 * target_ap,const u8 * ies,size_t ies_len)337 static inline int wpa_sm_send_ft_action(struct wpa_sm *sm, u8 action,
338 const u8 *target_ap,
339 const u8 *ies, size_t ies_len)
340 {
341 if (sm->ctx->send_ft_action)
342 return sm->ctx->send_ft_action(sm->ctx->ctx, action, target_ap,
343 ies, ies_len);
344 return -1;
345 }
346
wpa_sm_mark_authenticated(struct wpa_sm * sm,const u8 * target_ap)347 static inline int wpa_sm_mark_authenticated(struct wpa_sm *sm,
348 const u8 *target_ap)
349 {
350 if (sm->ctx->mark_authenticated)
351 return sm->ctx->mark_authenticated(sm->ctx->ctx, target_ap);
352 return -1;
353 }
354
wpa_sm_set_rekey_offload(struct wpa_sm * sm)355 static inline void wpa_sm_set_rekey_offload(struct wpa_sm *sm)
356 {
357 if (!sm->ctx->set_rekey_offload)
358 return;
359 sm->ctx->set_rekey_offload(sm->ctx->ctx, sm->ptk.kek, sm->ptk.kek_len,
360 sm->ptk.kck, sm->ptk.kck_len,
361 sm->rx_replay_counter);
362 }
363
364 #ifdef CONFIG_TDLS
wpa_sm_tdls_get_capa(struct wpa_sm * sm,int * tdls_supported,int * tdls_ext_setup,int * tdls_chan_switch)365 static inline int wpa_sm_tdls_get_capa(struct wpa_sm *sm,
366 int *tdls_supported,
367 int *tdls_ext_setup,
368 int *tdls_chan_switch)
369 {
370 if (sm->ctx->tdls_get_capa)
371 return sm->ctx->tdls_get_capa(sm->ctx->ctx, tdls_supported,
372 tdls_ext_setup, tdls_chan_switch);
373 return -1;
374 }
375
wpa_sm_send_tdls_mgmt(struct wpa_sm * sm,const u8 * dst,u8 action_code,u8 dialog_token,u16 status_code,u32 peer_capab,int initiator,const u8 * buf,size_t len)376 static inline int wpa_sm_send_tdls_mgmt(struct wpa_sm *sm, const u8 *dst,
377 u8 action_code, u8 dialog_token,
378 u16 status_code, u32 peer_capab,
379 int initiator, const u8 *buf,
380 size_t len)
381 {
382 if (sm->ctx->send_tdls_mgmt)
383 return sm->ctx->send_tdls_mgmt(sm->ctx->ctx, dst, action_code,
384 dialog_token, status_code,
385 peer_capab, initiator, buf,
386 len);
387 return -1;
388 }
389
wpa_sm_tdls_oper(struct wpa_sm * sm,int oper,const u8 * peer)390 static inline int wpa_sm_tdls_oper(struct wpa_sm *sm, int oper,
391 const u8 *peer)
392 {
393 if (sm->ctx->tdls_oper)
394 return sm->ctx->tdls_oper(sm->ctx->ctx, oper, peer);
395 return -1;
396 }
397
398 static inline int
wpa_sm_tdls_peer_addset(struct wpa_sm * sm,const u8 * addr,int add,u16 aid,u16 capability,const u8 * supp_rates,size_t supp_rates_len,const struct ieee80211_ht_capabilities * ht_capab,const struct ieee80211_vht_capabilities * vht_capab,const struct ieee80211_he_capabilities * he_capab,size_t he_capab_len,const struct ieee80211_he_6ghz_band_cap * he_6ghz_capab,u8 qosinfo,int wmm,const u8 * ext_capab,size_t ext_capab_len,const u8 * supp_channels,size_t supp_channels_len,const u8 * supp_oper_classes,size_t supp_oper_classes_len)399 wpa_sm_tdls_peer_addset(struct wpa_sm *sm, const u8 *addr, int add,
400 u16 aid, u16 capability, const u8 *supp_rates,
401 size_t supp_rates_len,
402 const struct ieee80211_ht_capabilities *ht_capab,
403 const struct ieee80211_vht_capabilities *vht_capab,
404 const struct ieee80211_he_capabilities *he_capab,
405 size_t he_capab_len,
406 const struct ieee80211_he_6ghz_band_cap *he_6ghz_capab,
407 u8 qosinfo, int wmm, const u8 *ext_capab,
408 size_t ext_capab_len, const u8 *supp_channels,
409 size_t supp_channels_len, const u8 *supp_oper_classes,
410 size_t supp_oper_classes_len)
411 {
412 if (sm->ctx->tdls_peer_addset)
413 return sm->ctx->tdls_peer_addset(sm->ctx->ctx, addr, add,
414 aid, capability, supp_rates,
415 supp_rates_len, ht_capab,
416 vht_capab,
417 he_capab, he_capab_len,
418 he_6ghz_capab, qosinfo, wmm,
419 ext_capab, ext_capab_len,
420 supp_channels,
421 supp_channels_len,
422 supp_oper_classes,
423 supp_oper_classes_len);
424 return -1;
425 }
426
427 static inline int
wpa_sm_tdls_enable_channel_switch(struct wpa_sm * sm,const u8 * addr,u8 oper_class,const struct hostapd_freq_params * freq_params)428 wpa_sm_tdls_enable_channel_switch(struct wpa_sm *sm, const u8 *addr,
429 u8 oper_class,
430 const struct hostapd_freq_params *freq_params)
431 {
432 if (sm->ctx->tdls_enable_channel_switch)
433 return sm->ctx->tdls_enable_channel_switch(sm->ctx->ctx, addr,
434 oper_class,
435 freq_params);
436 return -1;
437 }
438
439 static inline int
wpa_sm_tdls_disable_channel_switch(struct wpa_sm * sm,const u8 * addr)440 wpa_sm_tdls_disable_channel_switch(struct wpa_sm *sm, const u8 *addr)
441 {
442 if (sm->ctx->tdls_disable_channel_switch)
443 return sm->ctx->tdls_disable_channel_switch(sm->ctx->ctx, addr);
444 return -1;
445 }
446 #endif /* CONFIG_TDLS */
447
wpa_sm_key_mgmt_set_pmk(struct wpa_sm * sm,const u8 * pmk,size_t pmk_len)448 static inline int wpa_sm_key_mgmt_set_pmk(struct wpa_sm *sm,
449 const u8 *pmk, size_t pmk_len)
450 {
451 if (!sm->ctx->key_mgmt_set_pmk)
452 return -1;
453 return sm->ctx->key_mgmt_set_pmk(sm->ctx->ctx, pmk, pmk_len);
454 }
455
wpa_sm_fils_hlp_rx(struct wpa_sm * sm,const u8 * dst,const u8 * src,const u8 * pkt,size_t pkt_len)456 static inline void wpa_sm_fils_hlp_rx(struct wpa_sm *sm,
457 const u8 *dst, const u8 *src,
458 const u8 *pkt, size_t pkt_len)
459 {
460 if (sm->ctx->fils_hlp_rx)
461 sm->ctx->fils_hlp_rx(sm->ctx->ctx, dst, src, pkt, pkt_len);
462 }
463
wpa_sm_channel_info(struct wpa_sm * sm,struct wpa_channel_info * ci)464 static inline int wpa_sm_channel_info(struct wpa_sm *sm,
465 struct wpa_channel_info *ci)
466 {
467 if (!sm->ctx->channel_info)
468 return -1;
469 return sm->ctx->channel_info(sm->ctx->ctx, ci);
470 }
471
wpa_sm_transition_disable(struct wpa_sm * sm,u8 bitmap)472 static inline void wpa_sm_transition_disable(struct wpa_sm *sm, u8 bitmap)
473 {
474 if (sm->ctx->transition_disable)
475 sm->ctx->transition_disable(sm->ctx->ctx, bitmap);
476 }
477
wpa_sm_store_ptk(struct wpa_sm * sm,u8 * addr,int cipher,u32 life_time,struct wpa_ptk * ptk)478 static inline void wpa_sm_store_ptk(struct wpa_sm *sm,
479 u8 *addr, int cipher,
480 u32 life_time, struct wpa_ptk *ptk)
481 {
482 if (sm->ctx->store_ptk)
483 sm->ctx->store_ptk(sm->ctx->ctx, addr, cipher, life_time,
484 ptk);
485 }
486
487 int wpa_eapol_key_send(struct wpa_sm *sm, struct wpa_ptk *ptk,
488 int ver, const u8 *dest, u16 proto,
489 u8 *msg, size_t msg_len, u8 *key_mic);
490 int wpa_supplicant_send_2_of_4(struct wpa_sm *sm, const unsigned char *dst,
491 const struct wpa_eapol_key *key,
492 int ver, const u8 *nonce,
493 const u8 *wpa_ie, size_t wpa_ie_len,
494 struct wpa_ptk *ptk);
495 int wpa_supplicant_send_4_of_4(struct wpa_sm *sm, const unsigned char *dst,
496 const struct wpa_eapol_key *key,
497 u16 ver, u16 key_info,
498 struct wpa_ptk *ptk);
499
500 int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr,
501 const struct wpa_eapol_key *key, struct wpa_ptk *ptk);
502
503 void wpa_tdls_assoc(struct wpa_sm *sm);
504 void wpa_tdls_disassoc(struct wpa_sm *sm);
505
506 #endif /* WPA_I_H */
507