blob: e98b0dec4df33667f8517fd575c640838f7a223d [file] [log] [blame]
Forest Bond92b96792009-06-13 07:38:31 -04001/*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * File: iwctl.h
20 *
21 * Purpose:
22 *
23 * Author: Lyndon Chen
24 *
25 * Date: May 21, 2004
26 *
27 */
28
29
30#ifndef __IWCTL_H__
31#define __IWCTL_H__
32
33#if !defined(__DEVICE_H__)
34#include "device.h"
35#endif
36
37
38/*--------------------- Export Definitions -------------------------*/
39
40
41/*--------------------- Export Classes ----------------------------*/
42
43/*--------------------- Export Variables --------------------------*/
44
45/*--------------------- Export Functions --------------------------*/
46
47
48#ifdef __cplusplus
49extern "C" { /* Assume C declarations for C++ */
50#endif /* __cplusplus */
51
52
53#if WIRELESS_EXT < 18
54
55
56#define SIOCSIWMLME 0x8B16
57#define SIOCSIWGENIE 0x8B30
58
59// WPA : Authentication mode parameters
60#define SIOCSIWAUTH 0x8B32
61#define SIOCGIWAUTH 0x8B33
62
63// WPA : Extended version of encoding configuration
64#define SIOCSIWENCODEEXT 0x8B34
65#define SIOCGIWENCODEEXT 0x8B35
66
67#define IW_AUTH_WPA_VERSION 0
68#define IW_AUTH_CIPHER_PAIRWISE 1
69#define IW_AUTH_CIPHER_GROUP 2
70#define IW_AUTH_KEY_MGMT 3
71#define IW_AUTH_TKIP_COUNTERMEASURES 4
72#define IW_AUTH_DROP_UNENCRYPTED 5
73#define IW_AUTH_80211_AUTH_ALG 6
74#define IW_AUTH_WPA_ENABLED 7
75#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
76#define IW_AUTH_ROAMING_CONTROL 9
77#define IW_AUTH_PRIVACY_INVOKED 10
78
79#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
80#define IW_AUTH_WPA_VERSION_WPA 0x00000002
81#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
82
83#define IW_AUTH_CIPHER_NONE 0x00000001
84#define IW_AUTH_CIPHER_WEP40 0x00000002
85#define IW_AUTH_CIPHER_TKIP 0x00000004
86#define IW_AUTH_CIPHER_CCMP 0x00000008
87#define IW_AUTH_CIPHER_WEP104 0x00000010
88
89#define IW_AUTH_KEY_MGMT_802_1X 1
90#define IW_AUTH_KEY_MGMT_PSK 2
91
92#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
93#define IW_AUTH_ALG_SHARED_KEY 0x00000002
94#define IW_AUTH_ALG_LEAP 0x00000004
95
96#define IW_AUTH_ROAMING_ENABLE 0
97#define IW_AUTH_ROAMING_DISABLE 1
98
99#define IW_ENCODE_SEQ_MAX_SIZE 8
100
101#define IW_ENCODE_ALG_NONE 0
102#define IW_ENCODE_ALG_WEP 1
103#define IW_ENCODE_ALG_TKIP 2
104#define IW_ENCODE_ALG_CCMP 3
105
106
107struct iw_encode_ext
108{
109 __u32 ext_flags; // IW_ENCODE_EXT_*
110 __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; // LSB first
111 __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; // LSB first
112 struct sockaddr addr; // ff:ff:ff:ff:ff:ff for broadcast/multicast
113 // (group) keys or unicast address for
114 // individual keys
115 __u16 alg; // IW_ENCODE_ALG_*
116 __u16 key_len;
117 __u8 key[0];
118};
119
120
121struct iw_mlme
122{
123 __u16 cmd; /* IW_MLME_* */
124 __u16 reason_code;
125 struct sockaddr addr;
126};
127
128#endif // WIRELESS_EXT < 18
129
130
131
132#ifdef WIRELESS_EXT
133
134struct iw_statistics *iwctl_get_wireless_stats (struct net_device *dev);
135
136
137int iwctl_siwap(struct net_device *dev,
138 struct iw_request_info *info,
139 struct sockaddr *wrq,
140 char *extra);
141
142int iwctl_giwrange(struct net_device *dev,
143 struct iw_request_info *info,
144 struct iw_point *wrq,
145 char *extra);
146
147
148int iwctl_giwmode(struct net_device *dev,
149 struct iw_request_info *info,
150 __u32 *wmode,
151 char *extra);
152
153int iwctl_siwmode(struct net_device *dev,
154 struct iw_request_info *info,
155 __u32 *wmode,
156 char *extra);
157
158int iwctl_giwfreq(struct net_device *dev,
159 struct iw_request_info *info,
160 struct iw_freq *wrq,
161 char *extra);
162
163int iwctl_siwfreq(struct net_device *dev,
164 struct iw_request_info *info,
165 struct iw_freq *wrq,
166 char *extra);
167
168int iwctl_giwname(struct net_device *dev,
169 struct iw_request_info *info,
170 char *wrq,
171 char *extra);
172
173int iwctl_giwnwid(struct net_device *dev,
174 struct iw_request_info *info,
175 struct iw_param *wrq,
176 char *extra) ;
177
178int iwctl_giwsens(struct net_device *dev,
179 struct iw_request_info *info,
180 struct iw_param *wrq,
181 char *extra);
182
183int iwctl_giwap(struct net_device *dev,
184 struct iw_request_info *info,
185 struct sockaddr *wrq,
186 char *extra);
187
188int iwctl_giwaplist(struct net_device *dev,
189 struct iw_request_info *info,
190 struct iw_point *wrq,
191 char *extra);
192
193int iwctl_siwessid(struct net_device *dev,
194 struct iw_request_info *info,
195 struct iw_point *wrq,
196 char *extra);
197
198int iwctl_giwessid(struct net_device *dev,
199 struct iw_request_info *info,
200 struct iw_point *wrq,
201 char *extra);
202
203int iwctl_siwrate(struct net_device *dev,
204 struct iw_request_info *info,
205 struct iw_param *wrq,
206 char *extra);
207
208int iwctl_giwrate(struct net_device *dev,
209 struct iw_request_info *info,
210 struct iw_param *wrq,
211 char *extra);
212
213int iwctl_siwrts(struct net_device *dev,
214 struct iw_request_info *info,
215 struct iw_param *wrq,
216 char *extra);
217
218
219int iwctl_giwrts(struct net_device *dev,
220 struct iw_request_info *info,
221 struct iw_param *wrq,
222 char *extra);
223
224int iwctl_siwfrag(struct net_device *dev,
225 struct iw_request_info *info,
226 struct iw_param *wrq,
227 char *extra);
228
229int iwctl_giwfrag(struct net_device *dev,
230 struct iw_request_info *info,
231 struct iw_param *wrq,
232 char *extra);
233
234int iwctl_siwretry(struct net_device *dev,
235 struct iw_request_info *info,
236 struct iw_param *wrq,
237 char *extra);
238
239int iwctl_giwretry(struct net_device *dev,
240 struct iw_request_info *info,
241 struct iw_param *wrq,
242 char *extra);
243
244int iwctl_siwencode(struct net_device *dev,
245 struct iw_request_info *info,
246 struct iw_point *wrq,
247 char *extra);
248
249int iwctl_giwencode(struct net_device *dev,
250 struct iw_request_info *info,
251 struct iw_point *wrq,
252 char *extra);
253
254int iwctl_siwpower(struct net_device *dev,
255 struct iw_request_info *info,
256 struct iw_param *wrq,
257 char *extra);
258
259int iwctl_giwpower(struct net_device *dev,
260 struct iw_request_info *info,
261 struct iw_param *wrq,
262 char *extra);
263
264int iwctl_giwscan(struct net_device *dev,
265 struct iw_request_info *info,
266 struct iw_point *wrq,
267 char *extra);
268
269int iwctl_siwscan(struct net_device *dev,
270 struct iw_request_info *info,
271 struct iw_param *wrq,
272 char *extra);
273
274//2008-0409-07, <Add> by Einsn Liu
275#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
276int iwctl_siwauth(struct net_device *dev,
277 struct iw_request_info *info,
278 struct iw_param *wrq,
279 char *extra);
280
281int iwctl_giwauth(struct net_device *dev,
282 struct iw_request_info *info,
283 struct iw_param *wrq,
284 char *extra);
285
286int iwctl_siwgenie(struct net_device *dev,
287 struct iw_request_info *info,
288 struct iw_point *wrq,
289 char *extra);
290
291int iwctl_giwgenie(struct net_device *dev,
292 struct iw_request_info *info,
293 struct iw_point *wrq,
294 char *extra);
295
296int iwctl_siwencodeext(struct net_device *dev,
297 struct iw_request_info *info,
298 struct iw_point *wrq,
299 char *extra);
300
301int iwctl_giwencodeext(struct net_device *dev,
302 struct iw_request_info *info,
303 struct iw_point *wrq,
304 char *extra);
305
306int iwctl_siwmlme(struct net_device *dev,
307 struct iw_request_info * info,
308 struct iw_point *wrq,
309 char *extra);
310#endif // #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
311#endif
312//End Add -- //2008-0409-07, <Add> by Einsn Liu
313
314
315#if WIRELESS_EXT > 12
316extern const struct iw_handler_def iwctl_handler_def;
317extern const struct iw_priv_args iwctl_private_args;
318#else
319struct iw_request_info {};
320#endif //WIRELESS_EXT > 12
321
322#ifdef __cplusplus
323} /* End of extern "C" { */
324#endif /* __cplusplus */
325
326
327
328
329#endif // __IWCTL_H__
330
331
332