2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
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.
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.
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.
33 #if !defined(__DEVICE_H__)
38 /*--------------------- Export Definitions -------------------------*/
41 /*--------------------- Export Classes ----------------------------*/
43 /*--------------------- Export Variables --------------------------*/
45 /*--------------------- Export Functions --------------------------*/
49 extern "C" { /* Assume C declarations for C++ */
50 #endif /* __cplusplus */
56 #define SIOCSIWMLME 0x8B16
57 #define SIOCSIWGENIE 0x8B30
59 // WPA : Authentication mode parameters
60 #define SIOCSIWAUTH 0x8B32
61 #define SIOCGIWAUTH 0x8B33
63 // WPA : Extended version of encoding configuration
64 #define SIOCSIWENCODEEXT 0x8B34
65 #define SIOCGIWENCODEEXT 0x8B35
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
79 #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
80 #define IW_AUTH_WPA_VERSION_WPA 0x00000002
81 #define IW_AUTH_WPA_VERSION_WPA2 0x00000004
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
89 #define IW_AUTH_KEY_MGMT_802_1X 1
90 #define IW_AUTH_KEY_MGMT_PSK 2
92 #define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
93 #define IW_AUTH_ALG_SHARED_KEY 0x00000002
94 #define IW_AUTH_ALG_LEAP 0x00000004
96 #define IW_AUTH_ROAMING_ENABLE 0
97 #define IW_AUTH_ROAMING_DISABLE 1
99 #define IW_ENCODE_SEQ_MAX_SIZE 8
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
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
115 __u16 alg; // IW_ENCODE_ALG_*
123 __u16 cmd; /* IW_MLME_* */
125 struct sockaddr addr;
128 #endif // WIRELESS_EXT < 18
134 struct iw_statistics *iwctl_get_wireless_stats (struct net_device *dev);
137 int iwctl_siwap(struct net_device *dev,
138 struct iw_request_info *info,
139 struct sockaddr *wrq,
142 int iwctl_giwrange(struct net_device *dev,
143 struct iw_request_info *info,
144 struct iw_point *wrq,
148 int iwctl_giwmode(struct net_device *dev,
149 struct iw_request_info *info,
153 int iwctl_siwmode(struct net_device *dev,
154 struct iw_request_info *info,
158 int iwctl_giwfreq(struct net_device *dev,
159 struct iw_request_info *info,
163 int iwctl_siwfreq(struct net_device *dev,
164 struct iw_request_info *info,
168 int iwctl_giwname(struct net_device *dev,
169 struct iw_request_info *info,
173 int iwctl_giwnwid(struct net_device *dev,
174 struct iw_request_info *info,
175 struct iw_param *wrq,
178 int iwctl_giwsens(struct net_device *dev,
179 struct iw_request_info *info,
180 struct iw_param *wrq,
183 int iwctl_giwap(struct net_device *dev,
184 struct iw_request_info *info,
185 struct sockaddr *wrq,
188 int iwctl_giwaplist(struct net_device *dev,
189 struct iw_request_info *info,
190 struct iw_point *wrq,
193 int iwctl_siwessid(struct net_device *dev,
194 struct iw_request_info *info,
195 struct iw_point *wrq,
198 int iwctl_giwessid(struct net_device *dev,
199 struct iw_request_info *info,
200 struct iw_point *wrq,
203 int iwctl_siwrate(struct net_device *dev,
204 struct iw_request_info *info,
205 struct iw_param *wrq,
208 int iwctl_giwrate(struct net_device *dev,
209 struct iw_request_info *info,
210 struct iw_param *wrq,
213 int iwctl_siwrts(struct net_device *dev,
214 struct iw_request_info *info,
215 struct iw_param *wrq,
219 int iwctl_giwrts(struct net_device *dev,
220 struct iw_request_info *info,
221 struct iw_param *wrq,
224 int iwctl_siwfrag(struct net_device *dev,
225 struct iw_request_info *info,
226 struct iw_param *wrq,
229 int iwctl_giwfrag(struct net_device *dev,
230 struct iw_request_info *info,
231 struct iw_param *wrq,
234 int iwctl_siwretry(struct net_device *dev,
235 struct iw_request_info *info,
236 struct iw_param *wrq,
239 int iwctl_giwretry(struct net_device *dev,
240 struct iw_request_info *info,
241 struct iw_param *wrq,
244 int iwctl_siwencode(struct net_device *dev,
245 struct iw_request_info *info,
246 struct iw_point *wrq,
249 int iwctl_giwencode(struct net_device *dev,
250 struct iw_request_info *info,
251 struct iw_point *wrq,
254 int iwctl_siwpower(struct net_device *dev,
255 struct iw_request_info *info,
256 struct iw_param *wrq,
259 int iwctl_giwpower(struct net_device *dev,
260 struct iw_request_info *info,
261 struct iw_param *wrq,
264 int iwctl_giwscan(struct net_device *dev,
265 struct iw_request_info *info,
266 struct iw_point *wrq,
269 int iwctl_siwscan(struct net_device *dev,
270 struct iw_request_info *info,
271 struct iw_param *wrq,
274 //2008-0409-07, <Add> by Einsn Liu
275 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
276 int iwctl_siwauth(struct net_device *dev,
277 struct iw_request_info *info,
278 struct iw_param *wrq,
281 int iwctl_giwauth(struct net_device *dev,
282 struct iw_request_info *info,
283 struct iw_param *wrq,
286 int iwctl_siwgenie(struct net_device *dev,
287 struct iw_request_info *info,
288 struct iw_point *wrq,
291 int iwctl_giwgenie(struct net_device *dev,
292 struct iw_request_info *info,
293 struct iw_point *wrq,
296 int iwctl_siwencodeext(struct net_device *dev,
297 struct iw_request_info *info,
298 struct iw_point *wrq,
301 int iwctl_giwencodeext(struct net_device *dev,
302 struct iw_request_info *info,
303 struct iw_point *wrq,
306 int iwctl_siwmlme(struct net_device *dev,
307 struct iw_request_info * info,
308 struct iw_point *wrq,
310 #endif // #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
315 #if WIRELESS_EXT > 12
316 extern const struct iw_handler_def iwctl_handler_def;
317 extern const struct iw_priv_args iwctl_private_args;
319 struct iw_request_info {};
320 #endif //WIRELESS_EXT > 12
323 } /* End of extern "C" { */
324 #endif /* __cplusplus */
329 #endif // __IWCTL_H__