wpa.h

Go to the documentation of this file.
00001 
00023 #ifndef _WPA_H_
00024 #define _WPA_H_
00025 
00026 #include <asm/types.h>
00027 #include "common.h"
00028 
00029 #define MAX_WPA_KEY_LEN 32
00030 
00031 #define WPA_ELEMENT 0xDD
00032 #define RSN_ELEMENT 0x30
00033 
00034 #define WPA_VERSION 1
00035 #define RSN_VERSION 1
00036 
00037 #define CIPHER_SUITE_LEN 4
00038 
00039 #define WPA_PSK    1
00040 #define WPA_802_1X 2
00041 
00042 struct rsn_ie_t {
00043         guint8 element_id;
00044         guint8 length;
00045         guint16 version;
00046 } __attribute__ ((packed));
00047 
00048 struct wpa_ie_t {
00049         guint8 element_id;
00050         guint8 length;
00051         guint8 oui[3];
00052         guint8 oui_type;
00053         guint16 version;
00054 } __attribute__ ((packed));
00055 
00056 typedef struct ap_info_t {
00057         guint pairwise_cipher;
00058         guint group_cipher;
00059         guint key_mgmt;
00060 } ap_info_t;
00061 
00062 gboolean set_encryption_method(guint32 cipher, 
00063                                struct wlan_status_t *wlan_status);
00064 int set_wpa_encryption(int encryption, struct wlan_status_t *wlan_status);
00065 int set_wpa2_encryption(int encryption, struct wlan_status_t *wlan_status);
00066 int handle_mic_failure(gboolean key_type, unsigned char *bssid);
00067 int parse_rsn_ie(unsigned char* wpa_ie, unsigned int wpa_ie_len,
00068                  struct ap_info_t* ap_info);
00069 int parse_wpa_ie(unsigned char* wpa_ie, unsigned int wpa_ie_len,
00070                  struct ap_info_t* ap_info);
00071 guint parse_rsn_cipher_suite(guint8 *suite);
00072 guint parse_rsn_key_mgmt_suite(guint8 *suite);
00073 guint parse_wpa_cipher_suite(guint8* suite);
00074 guint parse_wpa_key_mgmt_suite(guint8 *suite);
00075 int handle_wps_ie(unsigned char* p, struct scan_results_t *scan_results, 
00076                   unsigned int length);
00077 int set_countermeasures(guint on_off);
00078 gboolean is_ap_in_black_list(unsigned char* bssid);
00079 gint compare_bssid(gconstpointer a, gconstpointer b);
00080 
00081 #endif /* _WPA_H_ */

Generated on Sat Dec 6 22:17:00 2008 for WLAN Connection Daemon by  doxygen 1.5.1