2 .\" The Aerospace Corporation. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" $FreeBSD: src/share/man/man4/ieee80211.4,v 1.1.2.3 2001/07/13 09:56:16 ru Exp $
35 .Nd standard interface to IEEE 802.11 devices
37 .In netproto/802_11/ieee80211.h
38 .In netproto/802_11/ieee80211_ioctl.h
40 This section describes the interface standard interface to configuration
41 and status information on IEEE 802.11 devices.
42 Most devices support options not configurable by this interface.
43 They must be set by their respective, specific control program.
44 The interface is via one
48 .Bl -tag -width ".Dv SIOCG80211"
50 Get configuration or status information.
52 Set configuration information.
55 These requests are made via a modified
58 This structure is defined as follows:
61 char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
62 u_int16_t i_type; /* req type */
63 int16_t i_val; /* Index or simple value */
64 int16_t i_len; /* Index or simple value */
65 void *i_data; /* Extra data */
71 the following values of
74 .Bl -tag -width ".Dv IEEE80211_IOC_POWERSAVESLEEP"
75 .It Dv IEEE80211_IOC_SSID
76 Returns the requested SSID by copying it into the buffer pointed to by
83 is \(>= 0 then the request refers to the configured value for that slot.
84 Generally, 0 is the only valid value, but some interfaces support more
88 is \-1 then the request refers to the currently active value.
89 .It Dv IEEE80211_IOC_NUMSSIDS
90 Returns the number of SSIDs this card supports.
91 In most cases, this is
92 1, but some devices such as
95 .It Dv IEEE80211_IOC_WEP
96 Returns the current WEP status in
99 .Dv IEEE80211_WEP_NOSUP , IEEE80211_WEP_ON , IEEE80211_WEP_OFF ,
101 .Dv IEEE80211_WEP_MIXED .
102 Respectively, these values mean unsupported, mandatory for all devices,
103 off, and on, but not required for all devices.
104 .It Dv IEEE80211_IOC_WEPKEY
105 Returns the requested WEP key via
109 If the device does not support returning the WEP key or the user is not
110 root then the key may be returned as all zeros.
111 Technically this is a
112 valid key, but it's the kind of key an idiot would put on his luggage so
113 we use it as a special value.
114 Generally, only four WEP keys are allowed, but some devices support more.
115 If so, the first four (0-3) are
116 the standard keys stored in volatile storage and the others are device
118 .It Dv IEEE80211_IOC_NUMWEPKEYS
119 Returns the number of WEP keys supported by this device, generally 4.
120 A device that does not support WEP may either report 0 or simply return
122 .It Dv IEEE80211_IOC_WEPTXKEY
123 Returns the WEP key used for transmission.
124 .It Dv IEEE80211_IOC_AUTHMODE
125 Returns the current authentication mode in
128 .Dv IEEE80211_AUTH_NONE , IEEE80211_AUTH_OPEN ,
130 .Dv IEEE80211_AUTH_SHARED .
131 .It Dv IEEE80211_IOC_STATIONNAME
132 Returns the station name via
136 While all known devices seem to support this is some way or another,
137 they all do it differently and it appears to not have anything to do
138 with the actual IEEE 802.11 standard so making up an answer may be
139 necessary for future devices.
140 .It Dv IEEE80211_IOC_CHANNEL
141 Returns the current direct sequence spread spectrum channel in use.
142 .It Dv IEEE80211_IOC_POWERSAVE
143 Returns the current powersaving mode.
145 .Dv IEEE80211_POWERSAVE_NOSUP , IEEE80211_POWERSAVE_OFF ,
146 .Dv IEEE80211_POWERSAVE_ON , IEEE80211_POWERSAVE_CAM ,
147 .Dv IEEE80211_POWERSAVE_PSP ,
149 .Dv IEEE80211_POWERSAVE_PSP_CAM .
151 .Dv IEEE80211_POWERSAVE_ON
152 is defined to be equal to
153 .Dv IEEE80211_POWERSAVE_CAM ,
154 but this may be incorrect.
155 .It Dv IEEE80211_IOC_POWERSAVESLEEP
156 Returns the powersave sleep time in msec in
162 the following values of
165 .Bl -tag -width ".Dv IEEE80211_IOC_POWERSAVESLEEP"
166 .It Dv IEEE80211_IOC_SSID
167 Set the desired SSID for infrastructure and ad-hoc modes to value given
172 The length should be no longer than 32 characters.
173 .It Dv IEEE80211_IOC_WEP
174 Set the current WEP mode to the value given in
176 Valid values are the same as those for this value above.
178 do not support all modes may choose to either return
180 or choose a reasonable alternate (supported) setting.
181 .It Dv IEEE80211_IOC_WEPKEY
182 Set the WEP key indicated by
184 to the value given by
188 Generally, valid values of
190 are 0, 5, and 13 though not all devices with WEP support have support
192 .It Dv IEEE80211_IOC_WEPTXKEY
193 Set the WEP key used for transmission to the value in
195 Not all values which are valid for setting keys may be valid for setting
196 transmit keys due to strange device interfaces.
197 .It Dv IEEE80211_IOC_AUTHMODE
198 Set the current authorization mode to the value given in
200 Valid values are given above.
201 Not all devices support this.
202 .It Dv IEEE80211_IOC_STATIONNAME
203 Set the station name to the value given by
207 The standard does not appear to deal with this feature so the range of
208 valid values may vary from device to device.
209 .It Dv IEEE80211_IOC_CHANNEL
210 Set the desired ad-hoc channel to the value given by
212 On some devices this has an impact on infrastructure mode as well.
213 Valid values are 1-14, but 0 should be allowed and should return the
214 device to the default value.
215 May devices support this directly by
216 converting any invalid value to the default value.
217 .It Dv IEEE80211_IOC_POWERSAVE
218 Set the current powersaving mode to the value given in
220 Valid values are the same as those for this value above.
222 do not support all modes may choose to either return
224 or choose a reasonable alternate (supported) setting.
227 .It Dv IEEE80211_IOC_POWERSAVESLEEP
228 Set the powersave sleep time in msec to the value in