bsd: Get rid of printf size_t warnings with 64-bit builds
[wpasupplicant] / hostapd / wpa.h
index 74bea27..323b48f 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef WPA_AUTH_H
 #define WPA_AUTH_H
 
+#include "defs.h"
 #include "eapol_common.h"
 #include "wpa_common.h"
 
@@ -27,7 +28,7 @@
 struct ft_rrb_frame {
        u8 frame_type; /* RSN_REMOTE_FRAME_TYPE_FT_RRB */
        u8 packet_type; /* FT_PACKET_REQUEST/FT_PACKET_RESPONSE */
-       u16 action_length; /* little endian length of action_frame */
+       le16 action_length; /* little endian length of action_frame */
        u8 ap_address[ETH_ALEN];
        /*
         * Followed by action_length bytes of FT Action frame (from Category
@@ -55,7 +56,7 @@ struct ft_rrb_frame {
 struct ft_r0kh_r1kh_pull_frame {
        u8 frame_type; /* RSN_REMOTE_FRAME_TYPE_FT_RRB */
        u8 packet_type; /* FT_PACKET_R0KH_R1KH_PULL */
-       u16 data_length; /* little endian length of data (44) */
+       le16 data_length; /* little endian length of data (44) */
        u8 ap_address[ETH_ALEN];
 
        u8 nonce[16];
@@ -69,7 +70,7 @@ struct ft_r0kh_r1kh_pull_frame {
 struct ft_r0kh_r1kh_resp_frame {
        u8 frame_type; /* RSN_REMOTE_FRAME_TYPE_FT_RRB */
        u8 packet_type; /* FT_PACKET_R0KH_R1KH_RESP */
-       u16 data_length; /* little endian length of data (76) */
+       le16 data_length; /* little endian length of data (76) */
        u8 ap_address[ETH_ALEN];
 
        u8 nonce[16]; /* copied from pull */
@@ -84,7 +85,7 @@ struct ft_r0kh_r1kh_resp_frame {
 struct ft_r0kh_r1kh_push_frame {
        u8 frame_type; /* RSN_REMOTE_FRAME_TYPE_FT_RRB */
        u8 packet_type; /* FT_PACKET_R0KH_R1KH_PUSH */
-       u16 data_length; /* little endian length of data (80) */
+       le16 data_length; /* little endian length of data (80) */
        u8 ap_address[ETH_ALEN];
 
        /* Encrypted with AES key-wrap */
@@ -136,11 +137,12 @@ struct wpa_auth_config {
        int wpa_group_rekey;
        int wpa_strict_rekey;
        int wpa_gmk_rekey;
+       int wpa_ptk_rekey;
        int rsn_pairwise;
        int rsn_preauth;
        int eapol_version;
        int peerkey;
-       int wme_enabled;
+       int wmm_enabled;
        int okc;
 #ifdef CONFIG_IEEE80211W
        enum {
@@ -186,7 +188,7 @@ struct wpa_auth_callbacks {
        int (*get_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var);
        const u8 * (*get_psk)(void *ctx, const u8 *addr, const u8 *prev_psk);
        int (*get_msk)(void *ctx, const u8 *addr, u8 *msk, size_t *len);
-       int (*set_key)(void *ctx, int vlan_id, const char *alg, const u8 *addr,
+       int (*set_key)(void *ctx, int vlan_id, wpa_alg alg, const u8 *addr,
                       int idx, u8 *key, size_t key_len);
        int (*get_seqnum)(void *ctx, const u8 *addr, int idx, u8 *seq);
        int (*get_seqnum_igtk)(void *ctx, const u8 *addr, int idx, u8 *seq);
@@ -216,7 +218,7 @@ enum {
        WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,
        WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL,
        WPA_MGMT_FRAME_PROTECTION_VIOLATION, WPA_INVALID_MGMT_GROUP_CIPHER,
-       WPA_INVALID_MDIE
+       WPA_INVALID_MDIE, WPA_INVALID_PROTO
 };
        
 int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
@@ -228,6 +230,7 @@ struct wpa_state_machine *
 wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr);
 void wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth,
                             struct wpa_state_machine *sm);
+void wpa_auth_sta_no_wpa(struct wpa_state_machine *sm);
 void wpa_auth_sta_deinit(struct wpa_state_machine *sm);
 void wpa_receive(struct wpa_authenticator *wpa_auth,
                 struct wpa_state_machine *sm,
@@ -244,6 +247,7 @@ int wpa_get_mib(struct wpa_authenticator *wpa_auth, char *buf, size_t buflen);
 int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen);
 void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth);
 int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
+int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
 int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
 int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
 int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
@@ -263,7 +267,8 @@ int wpa_auth_sta_set_vlan(struct wpa_state_machine *sm, int vlan_id);
 
 #ifdef CONFIG_IEEE80211R
 u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
-                                size_t max_len, int auth_alg);
+                                size_t max_len, int auth_alg,
+                                const u8 *req_ies, size_t req_ies_len);
 void wpa_ft_process_auth(struct wpa_state_machine *sm, const u8 *bssid,
                         u16 auth_transaction, const u8 *ies, size_t ies_len,
                         void (*cb)(void *ctx, const u8 *dst, const u8 *bssid,