22 void (*set_state)(
void *ctx,
enum wpa_states state);
24 void (*deauthenticate)(
void * ctx,
int reason_code);
25 int (*set_key)(
void *ctx,
enum wpa_alg alg,
26 const u8 *addr,
int key_idx,
int set_tx,
27 const u8 *seq,
size_t seq_len,
28 const u8 *key,
size_t key_len);
29 void * (*get_network_ctx)(
void *ctx);
30 int (*get_bssid)(
void *ctx, u8 *bssid);
31 int (*ether_send)(
void *ctx,
const u8 *dest, u16 proto,
const u8 *buf,
33 int (*get_beacon_ie)(
void *ctx);
34 void (*cancel_auth_timeout)(
void *ctx);
35 u8 * (*alloc_eapol)(
void *ctx, u8 type,
const void *data, u16 data_len,
36 size_t *msg_len,
void **data_pos);
37 int (*add_pmkid)(
void *ctx,
const u8 *bssid,
const u8 *pmkid);
38 int (*remove_pmkid)(
void *ctx,
const u8 *bssid,
const u8 *pmkid);
42 int (*mlme_setprotection)(
void *ctx,
const u8 *addr,
43 int protection_type,
int key_type);
44 int (*update_ft_ies)(
void *ctx,
const u8 *md,
const u8 *ies,
46 int (*send_ft_action)(
void *ctx, u8 action,
const u8 *target_ap,
47 const u8 *ies,
size_t ies_len);
48 int (*mark_authenticated)(
void *ctx,
const u8 *target_ap);
50 int (*tdls_get_capa)(
void *ctx,
int *tdls_supported,
51 int *tdls_ext_setup,
int *tdls_chan_switch);
52 int (*send_tdls_mgmt)(
void *ctx,
const u8 *dst,
53 u8 action_code, u8 dialog_token,
54 u16 status_code, u32 peer_capab,
55 int initiator,
const u8 *buf,
size_t len);
56 int (*tdls_oper)(
void *ctx,
int oper,
const u8 *peer);
57 int (*tdls_peer_addset)(
void *ctx,
const u8 *addr,
int add, u16 aid,
58 u16 capability,
const u8 *supp_rates,
59 size_t supp_rates_len,
62 u8 qosinfo,
int wmm,
const u8 *ext_capab,
63 size_t ext_capab_len,
const u8 *supp_channels,
64 size_t supp_channels_len,
65 const u8 *supp_oper_classes,
66 size_t supp_oper_classes_len);
67 int (*tdls_enable_channel_switch)(
68 void *ctx,
const u8 *addr, u8 oper_class,
70 int (*tdls_disable_channel_switch)(
void *ctx,
const u8 *addr);
72 void (*set_rekey_offload)(
void *ctx,
const u8 *kek,
size_t kek_len,
73 const u8 *kck,
size_t kck_len,
74 const u8 *replay_ctr);
75 int (*key_mgmt_set_pmk)(
void *ctx,
const u8 *pmk,
size_t pmk_len);
79 enum wpa_sm_conf_params {
81 RSNA_PMK_REAUTH_THRESHOLD ,
88 WPA_PARAM_RSN_ENABLED,
95 int allowed_pairwise_cipher;
96 int proactive_key_caching;
105 #ifndef CONFIG_NO_WPA
119 const char *bridge_ifname);
133 int wpa_sm_pmf_enabled(
struct wpa_sm *sm);
142 const u8 *buf,
size_t len);
144 int wpa_sm_pmksa_cache_list(
struct wpa_sm *sm,
char *buf,
size_t len);
145 void wpa_sm_drop_sa(
struct wpa_sm *sm);
146 int wpa_sm_has_ptk(
struct wpa_sm *sm);
148 void wpa_sm_update_replay_ctr(
struct wpa_sm *sm,
const u8 *replay_ctr);
150 void wpa_sm_pmksa_cache_flush(
struct wpa_sm *sm,
void *network_ctx);
152 int wpa_sm_get_p2p_ip_addr(
struct wpa_sm *sm, u8 *buf);
154 void wpa_sm_set_rx_replay_ctr(
struct wpa_sm *sm,
const u8 *rx_replay_counter);
155 void wpa_sm_set_ptk_kck_kek(
struct wpa_sm *sm,
156 const u8 *ptk_kck,
size_t ptk_kck_len,
157 const u8 *ptk_kek,
size_t ptk_kek_len);
163 return (
struct wpa_sm *) 1;
205 const char *bridge_ifname)
244 enum wpa_sm_conf_params param,
251 size_t buflen,
int verbose)
256 static inline int wpa_sm_pmf_enabled(
struct wpa_sm *sm)
277 const u8 *buf,
size_t len)
288 static inline int wpa_sm_pmksa_cache_list(
struct wpa_sm *sm,
char *buf,
294 static inline void wpa_sm_drop_sa(
struct wpa_sm *sm)
298 static inline int wpa_sm_has_ptk(
struct wpa_sm *sm)
303 static inline void wpa_sm_update_replay_ctr(
struct wpa_sm *sm,
304 const u8 *replay_ctr)
308 static inline void wpa_sm_pmksa_cache_flush(
struct wpa_sm *sm,
313 static inline void wpa_sm_set_rx_replay_ctr(
struct wpa_sm *sm,
314 const u8 *rx_replay_counter)
318 static inline void wpa_sm_set_ptk_kck_kek(
struct wpa_sm *sm,
const u8 *ptk_kck,
325 #ifdef CONFIG_PEERKEY
326 int wpa_sm_stkstart(
struct wpa_sm *sm,
const u8 *peer);
327 int wpa_sm_rx_eapol_peerkey(
struct wpa_sm *sm,
const u8 *src_addr,
328 const u8 *buf,
size_t len);
330 static inline int wpa_sm_stkstart(
struct wpa_sm *sm,
const u8 *peer)
335 static inline int wpa_sm_rx_eapol_peerkey(
struct wpa_sm *sm,
const u8 *src_addr,
336 const u8 *buf,
size_t len)
342 #ifdef CONFIG_IEEE80211R
344 int wpa_sm_set_ft_params(
struct wpa_sm *sm,
const u8 *ies,
size_t ies_len);
345 int wpa_ft_prepare_auth_request(
struct wpa_sm *sm,
const u8 *mdie);
346 int wpa_ft_process_response(
struct wpa_sm *sm,
const u8 *ies,
size_t ies_len,
347 int ft_action,
const u8 *target_ap,
348 const u8 *ric_ies,
size_t ric_ies_len);
349 int wpa_ft_is_completed(
struct wpa_sm *sm);
350 void wpa_reset_ft_completed(
struct wpa_sm *sm);
351 int wpa_ft_validate_reassoc_resp(
struct wpa_sm *sm,
const u8 *ies,
352 size_t ies_len,
const u8 *src_addr);
353 int wpa_ft_start_over_ds(
struct wpa_sm *sm,
const u8 *target_ap,
359 wpa_sm_set_ft_params(
struct wpa_sm *sm,
const u8 *ies,
size_t ies_len)
364 static inline int wpa_ft_prepare_auth_request(
struct wpa_sm *sm,
371 wpa_ft_process_response(
struct wpa_sm *sm,
const u8 *ies,
size_t ies_len,
372 int ft_action,
const u8 *target_ap)
377 static inline int wpa_ft_is_completed(
struct wpa_sm *sm)
382 static inline void wpa_reset_ft_completed(
struct wpa_sm *sm)
387 wpa_ft_validate_reassoc_resp(
struct wpa_sm *sm,
const u8 *ies,
size_t ies_len,
397 void wpa_tdls_ap_ies(
struct wpa_sm *sm,
const u8 *ies,
size_t len);
398 void wpa_tdls_assoc_resp_ies(
struct wpa_sm *sm,
const u8 *ies,
size_t len);
400 void wpa_tdls_remove(
struct wpa_sm *sm,
const u8 *addr);
401 int wpa_tdls_teardown_link(
struct wpa_sm *sm,
const u8 *addr, u16 reason_code);
402 int wpa_tdls_send_discovery_request(
struct wpa_sm *sm,
const u8 *addr);
404 void wpa_tdls_teardown_peers(
struct wpa_sm *sm);
406 void wpa_tdls_enable(
struct wpa_sm *sm,
int enabled);
407 void wpa_tdls_disable_unreachable_link(
struct wpa_sm *sm,
const u8 *addr);
408 const char * wpa_tdls_get_link_status(
struct wpa_sm *sm,
const u8 *addr);
409 int wpa_tdls_is_external_setup(
struct wpa_sm *sm);
410 int wpa_tdls_enable_chan_switch(
struct wpa_sm *sm,
const u8 *addr,
413 int wpa_tdls_disable_chan_switch(
struct wpa_sm *sm,
const u8 *addr);
415 int wpa_wnmsleep_install_key(
struct wpa_sm *sm, u8 subelem_id, u8 *buf);
int wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len, struct wpa_ie_data *data)
Parse WPA/RSN IE.
Definition: wpa_ie.c:24
void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise)
Send EAPOL-Key Request.
Definition: wpa.c:85
int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, const u8 *buf, size_t len)
Process received WPA EAPOL frames.
Definition: wpa.c:1703
int wpa_sm_set_ap_rsn_ie(struct wpa_sm *sm, const u8 *ie, size_t len)
Set AP RSN IE from Beacon/ProbeResp.
Definition: wpa.c:2742
void wpa_sm_set_ifname(struct wpa_sm *sm, const char *ifname, const char *bridge_ifname)
Set network interface name.
Definition: wpa.c:2470
void wpa_sm_deinit(struct wpa_sm *sm)
Deinitialize WPA state machine.
Definition: wpa.c:2220
void wpa_sm_set_pmk_from_pmksa(struct wpa_sm *sm)
Set PMK based on the current PMKSA.
Definition: wpa.c:2368
WPA Supplicant - Common definitions.
int wpa_sm_parse_own_wpa_ie(struct wpa_sm *sm, struct wpa_ie_data *data)
Parse own WPA/RSN IE.
Definition: wpa.c:2776
void wpa_sm_set_eapol(struct wpa_sm *sm, struct eapol_sm *eapol)
Set EAPOL state machine pointer.
Definition: wpa.c:2485
Definition: ieee802_11_defs.h:634
void wpa_sm_set_fast_reauth(struct wpa_sm *sm, int fast_reauth)
Set fast reauthentication (EAP) enabled/disabled.
Definition: wpa.c:2388
int wpa_sm_set_assoc_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len)
Set own WPA/RSN IE from (Re)AssocReq.
Definition: wpa.c:2672
void wpa_sm_set_scard_ctx(struct wpa_sm *sm, void *scard_ctx)
Set context pointer for smartcard callbacks.
Definition: wpa.c:2400
wpa_states
wpa_supplicant state
Definition: defs.h:161
int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr)
Initiate TDLS handshake (send TPK Handshake Message 1)
Definition: tdls.c:2594
Definition: ieee802_11_defs.h:668
struct wpa_sm * wpa_sm_init(struct wpa_sm_ctx *ctx)
Initialize WPA state machine.
Definition: wpa.c:2189
void wpa_sm_set_own_addr(struct wpa_sm *sm, const u8 *addr)
Set own MAC address.
Definition: wpa.c:2457
Named configuration blob.
Definition: eap_config.h:812
int wpa_sm_get_status(struct wpa_sm *sm, char *buf, size_t buflen, int verbose)
Get WPA state machine.
Definition: wpa.c:2569
void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
Notify WPA state machine about association.
Definition: wpa.c:2248
WPA definitions shared between hostapd and wpa_supplicant.
void wpa_tdls_deinit(struct wpa_sm *sm)
Deinitialize driver interface parameters for TDLS.
Definition: tdls.c:2835
int wpa_sm_set_ap_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len)
Set AP WPA IE from Beacon/ProbeResp.
Definition: wpa.c:2707
size_t len
Length of binary data.
Definition: eap_config.h:829
int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param, unsigned int value)
Set WPA state machine parameters.
Definition: wpa.c:2499
IEEE 802.11 Frame type definitions Copyright (c) 2007-2008 Intel Corporation.
int wpa_tdls_init(struct wpa_sm *sm)
Initialize driver interface parameters for TDLS.
Definition: tdls.c:2747
Internal data for EAPOL state machines.
Definition: eapol_supp_sm.c:28
EAPOL definitions shared between hostapd and wpa_supplicant.
Channel parameters.
Definition: driver.h:510
int wpa_sm_set_assoc_wpa_ie_default(struct wpa_sm *sm, u8 *wpa_ie, size_t *wpa_ie_len)
Generate own WPA/RSN IE from configuration.
Definition: wpa.c:2627
void wpa_sm_set_pmk(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len, const u8 *bssid)
Set PMK.
Definition: wpa.c:2338
Internal WPA state machine data.
Definition: wpa_i.h:18
void wpa_sm_notify_disassoc(struct wpa_sm *sm)
Notify WPA state machine about disassociation.
Definition: wpa.c:2309
void wpa_sm_aborted_cached(struct wpa_sm *sm)
Notify WPA that PMKSA caching was aborted.
Definition: wpa.c:1640
int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen)
Dump text list of MIB entries.
Definition: wpa.c:2067
char * name
Blob name.
Definition: eap_config.h:817
void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
Notification of current configration change.
Definition: wpa.c:2419
Definition: wpa_common.h:360