]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/rsn_supp/wpa.h
wpa_supplicant configuration for Beacon protection
[thirdparty/hostap.git] / src / rsn_supp / wpa.h
index 21f4b17815e93fefeb92c2d0e92fe438d18b5426..e14f26e01ec558837fe157d0114f0a673acb5cd3 100644 (file)
@@ -18,6 +18,7 @@ struct wpa_sm;
 struct eapol_sm;
 struct wpa_config_blob;
 struct hostapd_freq_params;
+struct wpa_channel_info;
 
 struct wpa_sm_ctx {
        void *ctx; /* pointer to arbitrary upper level context */
@@ -25,11 +26,11 @@ struct wpa_sm_ctx {
 
        void (*set_state)(void *ctx, enum wpa_states state);
        enum wpa_states (*get_state)(void *ctx);
-       void (*deauthenticate)(void * ctx, int reason_code);
+       void (*deauthenticate)(void * ctx, u16 reason_code);
        int (*set_key)(void *ctx, 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);
+                      const u8 *key, size_t key_len, enum key_flag key_flag);
        void * (*get_network_ctx)(void *ctx);
        int (*get_bssid)(void *ctx, u8 *bssid);
        int (*ether_send)(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
@@ -82,6 +83,7 @@ struct wpa_sm_ctx {
        int (*key_mgmt_set_pmk)(void *ctx, const u8 *pmk, size_t pmk_len);
        void (*fils_hlp_rx)(void *ctx, const u8 *dst, const u8 *src,
                            const u8 *pkt, size_t pkt_len);
+       int (*channel_info)(void *ctx, struct wpa_channel_info *ci);
 };
 
 
@@ -95,7 +97,9 @@ enum wpa_sm_conf_params {
        WPA_PARAM_KEY_MGMT,
        WPA_PARAM_MGMT_GROUP,
        WPA_PARAM_RSN_ENABLED,
-       WPA_PARAM_MFP
+       WPA_PARAM_MFP,
+       WPA_PARAM_OCV,
+       WPA_PARAM_SAE_PWE,
 };
 
 struct rsn_supp_config {
@@ -109,7 +113,9 @@ struct rsn_supp_config {
        int wpa_ptk_rekey;
        int p2p;
        int wpa_rsc_relaxation;
+       int owe_ptk_workaround;
        const u8 *fils_cache_id;
+       int beacon_prot;
 };
 
 #ifndef CONFIG_NO_WPA
@@ -131,8 +137,12 @@ void wpa_sm_set_eapol(struct wpa_sm *sm, struct eapol_sm *eapol);
 int wpa_sm_set_assoc_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len);
 int wpa_sm_set_assoc_wpa_ie_default(struct wpa_sm *sm, u8 *wpa_ie,
                                    size_t *wpa_ie_len);
+int wpa_sm_set_assoc_rsnxe_default(struct wpa_sm *sm, u8 *rsnxe,
+                                  size_t *rsnxe_len);
+int wpa_sm_set_assoc_rsnxe(struct wpa_sm *sm, const u8 *ie, size_t len);
 int wpa_sm_set_ap_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len);
 int wpa_sm_set_ap_rsn_ie(struct wpa_sm *sm, const u8 *ie, size_t len);
+int wpa_sm_set_ap_rsnxe(struct wpa_sm *sm, const u8 *ie, size_t len);
 int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen);
 
 int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param,
@@ -141,6 +151,7 @@ int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param,
 int wpa_sm_get_status(struct wpa_sm *sm, char *buf, size_t buflen,
                      int verbose);
 int wpa_sm_pmf_enabled(struct wpa_sm *sm);
+int wpa_sm_ocv_enabled(struct wpa_sm *sm);
 
 void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise);
 
@@ -163,6 +174,7 @@ int wpa_sm_pmksa_exists(struct wpa_sm *sm, const u8 *bssid,
                        const void *network_ctx);
 void wpa_sm_drop_sa(struct wpa_sm *sm);
 int wpa_sm_has_ptk(struct wpa_sm *sm);
+int wpa_sm_has_ptk_installed(struct wpa_sm *sm);
 
 void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr);
 
@@ -256,6 +268,12 @@ static inline int wpa_sm_set_ap_rsn_ie(struct wpa_sm *sm, const u8 *ie,
        return -1;
 }
 
+static inline int wpa_sm_set_ap_rsnxe(struct wpa_sm *sm, const u8 *ie,
+                                     size_t len)
+{
+       return -1;
+}
+
 static inline int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen)
 {
        return 0;
@@ -279,6 +297,11 @@ static inline int wpa_sm_pmf_enabled(struct wpa_sm *sm)
        return 0;
 }
 
+static inline int wpa_sm_ocv_enabled(struct wpa_sm *sm)
+{
+       return 0;
+}
+
 static inline void wpa_sm_key_request(struct wpa_sm *sm, int error,
                                      int pairwise)
 {
@@ -456,5 +479,6 @@ int owe_process_assoc_resp(struct wpa_sm *sm, const u8 *bssid,
 
 void wpa_sm_set_reset_fils_completed(struct wpa_sm *sm, int set);
 void wpa_sm_set_fils_cache_id(struct wpa_sm *sm, const u8 *fils_cache_id);
+void wpa_sm_set_dpp_z(struct wpa_sm *sm, const struct wpabuf *z);
 
 #endif /* WPA_H */