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
33
34
35#define WPA_IE_LEN 64
36
37
38
39
40
41
42
43
44
45
46
47enum {
48 VIAWGET_SET_WPA = 1,
49 VIAWGET_SET_KEY = 2,
50 VIAWGET_SET_SCAN = 3,
51 VIAWGET_GET_SCAN = 4,
52 VIAWGET_GET_SSID = 5,
53 VIAWGET_GET_BSSID = 6,
54 VIAWGET_SET_DROP_UNENCRYPT = 7,
55 VIAWGET_SET_DEAUTHENTICATE = 8,
56 VIAWGET_SET_ASSOCIATE = 9,
57 VIAWGET_SET_DISASSOCIATE= 10
58};
59
60
61enum {
62 VIAWGET_ASSOC_MSG = 1,
63 VIAWGET_DISASSOC_MSG = 2,
64 VIAWGET_PTK_MIC_MSG = 3,
65 VIAWGET_GTK_MIC_MSG = 4,
66 VIAWGET_CCKM_ROAM_MSG = 5,
67 VIAWGET_DEVICECLOSE_MSG = 6
68};
69
70
71
72#pragma pack(1)
73typedef struct viawget_wpa_header {
74 u8 type;
75 u16 req_ie_len;
76 u16 resp_ie_len;
77} viawget_wpa_header;
78
79
80
81struct viawget_wpa_param {
82 u32 cmd;
83 u8 addr[6];
84 union {
85 struct {
86 u8 len;
87 u8 data[0];
88 } generic_elem;
89
90 struct {
91 u8 bssid[6];
92 u8 ssid[32];
93 u8 ssid_len;
94 u8 *wpa_ie;
95 u16 wpa_ie_len;
96 int pairwise_suite;
97 int group_suite;
98 int key_mgmt_suite;
99 int auth_alg;
100 int mode;
101
102 } wpa_associate;
103
104 struct {
105 int alg_name;
106 u16 key_index;
107 u16 set_tx;
108 u8 *seq;
109 u16 seq_len;
110 u8 *key;
111 u16 key_len;
112 } wpa_key;
113
114 struct {
115 u8 ssid_len;
116 u8 ssid[32];
117 } scan_req;
118
119 struct {
120 u16 scan_count;
121 u8 *buf;
122 } scan_results;
123
124 } u;
125
126};
127
128#pragma pack(1)
129struct viawget_scan_result {
130 u8 bssid[6];
131 u8 ssid[32];
132 u16 ssid_len;
133 u8 wpa_ie[WPA_IE_LEN];
134 u16 wpa_ie_len;
135 u8 rsn_ie[WPA_IE_LEN];
136 u16 rsn_ie_len;
137 int freq;
138 int caps;
139 int qual;
140 int noise;
141 int level;
142 int maxrate;
143};
144
145
146#pragma pack()
147
148
149
150
151
152
153
154
155
156
157
158
159#endif
160