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