1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#ifndef __IOWPA_H__
30#define __IOWPA_H__
31
32#define WPA_IE_LEN 64
33
34
35
36
37
38
39
40
41
42
43enum {
44 VIAWGET_SET_WPA = 1,
45 VIAWGET_SET_KEY = 2,
46 VIAWGET_SET_SCAN = 3,
47 VIAWGET_GET_SCAN = 4,
48 VIAWGET_GET_SSID = 5,
49 VIAWGET_GET_BSSID = 6,
50 VIAWGET_SET_DROP_UNENCRYPT = 7,
51 VIAWGET_SET_DEAUTHENTICATE = 8,
52 VIAWGET_SET_ASSOCIATE = 9,
53 VIAWGET_SET_DISASSOCIATE = 10
54};
55
56enum {
57 VIAWGET_ASSOC_MSG = 1,
58 VIAWGET_DISASSOC_MSG = 2,
59 VIAWGET_PTK_MIC_MSG = 3,
60 VIAWGET_GTK_MIC_MSG = 4,
61 VIAWGET_CCKM_ROAM_MSG = 5,
62 VIAWGET_DEVICECLOSE_MSG = 6
63};
64
65typedef struct viawget_wpa_header {
66 u8 type;
67 u16 req_ie_len;
68 u16 resp_ie_len;
69} __packed viawget_wpa_header;
70
71struct viawget_wpa_param {
72 u32 cmd;
73 u8 addr[6];
74 union {
75 struct {
76 u8 len;
77 u8 data[0];
78 } generic_elem;
79 struct {
80 u8 bssid[6];
81 u8 ssid[32];
82 u8 ssid_len;
83 u8 *wpa_ie;
84 u16 wpa_ie_len;
85 int pairwise_suite;
86 int group_suite;
87 int key_mgmt_suite;
88 int auth_alg;
89 int mode;
90 u8 roam_dbm;
91 } wpa_associate;
92 struct {
93 int alg_name;
94 u16 key_index;
95 u16 set_tx;
96 u8 *seq;
97 u16 seq_len;
98 u8 *key;
99 u16 key_len;
100 } wpa_key;
101 struct {
102 u8 ssid_len;
103 u8 ssid[32];
104 } scan_req;
105 struct {
106 u16 scan_count;
107 u8 *buf;
108 } scan_results;
109 } u;
110} __packed;
111
112struct viawget_scan_result {
113 u8 bssid[6];
114 u8 ssid[32];
115 u16 ssid_len;
116 u8 wpa_ie[WPA_IE_LEN];
117 u16 wpa_ie_len;
118 u8 rsn_ie[WPA_IE_LEN];
119 u16 rsn_ie_len;
120 int freq;
121 int caps;
122 int qual;
123 int noise;
124 int level;
125 int maxrate;
126} __packed;
127
128#endif
129