/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi>
* Sun elects to license this software under the BSD license.
* See README for more details.
*/
#ifndef __WPA_IMPL_H
#define __WPA_IMPL_H
#include <libdladm.h>
#include <libdllink.h>
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(1)
struct ieee802_1x_hdr {
/* followed by length octets of data */
};
#pragma pack()
enum { IEEE802_1X_TYPE_EAP_PACKET = 0,
};
};
#pragma pack(1)
struct wpa_eapol_key {
/* followed by key_data_length bytes of key_data */
};
#pragma pack()
enum {
};
/*
* wpa_supplicant
*/
struct rsn_pmksa_cache {
};
struct rsn_pmksa_candidate {
};
#pragma pack(1)
struct wpa_ptk {
union {
struct {
} auth;
} u;
};
#pragma pack()
struct wpa_supplicant {
/* The handle required for libdladm calls */
/* ANonce from the last 1/4 msg */
int renew_snonce;
/*
* Selected configuration
*/
int proto;
int pairwise_cipher;
int group_cipher;
int key_mgmt;
enum {
} wpa_state;
/*
* number of EAPOL packets received after the
* previous association event
*/
int eapol_received;
};
struct wpa_ie_data {
int proto;
int pairwise_cipher;
int group_cipher;
int key_mgmt;
int capabilities;
};
/* WPA configuration */
struct wpa_ssid {
int bssid_set;
int psk_set;
char *passphrase;
int pairwise_cipher;
int group_cipher;
int key_mgmt;
};
struct wpa_config {
int eapol_version;
/* int ap_scan; */
};
struct wpa_config *wpa_config_read(void *);
void wpa_config_free(struct wpa_config *);
/*
* Debugging function - conditional printf and hex dump.
* Driver wrappers can use these for debugging purposes.
*/
void wpa_printf(int, char *, ...);
void wpa_event_handler(void *, wpa_event_type);
void wpa_supplicant_rx_eapol(void *, unsigned char *, unsigned char *, size_t);
void wpa_supplicant_scan(void *, void *);
void wpa_supplicant_req_scan(struct wpa_supplicant *, int, int);
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *, int, int);
void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *);
void wpa_supplicant_disassociate(struct wpa_supplicant *, int);
void pmksa_cache_free(struct wpa_supplicant *);
void pmksa_candidate_free(struct wpa_supplicant *);
size_t, struct wpa_ie_data *);
#ifdef __cplusplus
}
#endif
#endif /* __WPA_IMPL_H */