Change all files that I own to use the official DragonFly Project
[dragonfly.git] / share / man / man4 / ieee80211.4
1 .\" Copyright (c) 2001
2 .\"     The Aerospace Corporation.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
15 .\"
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
26 .\" SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD: src/share/man/man4/ieee80211.4,v 1.1.2.3 2001/07/13 09:56:16 ru Exp $
29 .\" $DragonFly: src/share/man/man4/ieee80211.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
30 .\"
31 .Dd February 23, 2001
32 .Dt IEEE80211 4
33 .Os
34 .Sh NAME
35 .Nm ieee80211
36 .Nd standard interface to IEEE 802.11 devices
37 .Sh SYNOPSIS
38 .In net/if_ieee80211.h
39 .Sh DESCRIPTION
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
45 of the following
46 .Xr ioctl 2
47 calls on a socket:
48 .Bl -tag -width ".Dv SIOCG80211"
49 .It Dv SIOCG80211
50 Get configuration or status information.
51 .It Dv SIOCS80211
52 Set configuration information.
53 .El
54 .Pp
55 These requests are made via a modified
56 .Vt ifreq
57 structure.
58 This structure is defined as follows:
59 .Bd -literal
60 struct ieee80211req {
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 */
66 };
67 .Ed
68 .Pp
69 For
70 .Dv SIOCG80211
71 the following values of
72 .Va i_type
73 are valid:
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
77 .Va i_data
78 and setting
79 .Va i_len
80 to the length.
81 If
82 .Va i_val
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
85 SSIDs.
86 If
87 .Va i_val
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
93 .Xr an 4
94 support more.
95 .It Dv IEEE80211_IOC_WEP
96 Returns the current WEP status in
97 .Va i_val .
98 Valid values are
99 .Dv IEEE80211_WEP_NOSUP , IEEE80211_WEP_ON , IEEE80211_WEP_OFF ,
100 and
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
106 .Va i_data
107 and its length via
108 .Va i_len .
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
117 specific.
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
121 .Er EINVAL .
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
126 .Va i_val .
127 Valid values are
128 .Dv IEEE80211_AUTH_NONE , IEEE80211_AUTH_OPEN ,
129 and
130 .Dv IEEE80211_AUTH_SHARED .
131 .It Dv IEEE80211_IOC_STATIONNAME
132 Returns the station name via
133 .Va i_data
134 and its length via
135 .Va i_len .
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.
144 Valid values are
145 .Dv IEEE80211_POWERSAVE_NOSUP , IEEE80211_POWERSAVE_OFF ,
146 .Dv IEEE80211_POWERSAVE_ON , IEEE80211_POWERSAVE_CAM ,
147 .Dv IEEE80211_POWERSAVE_PSP ,
148 and
149 .Dv IEEE80211_POWERSAVE_PSP_CAM .
150 Currently,
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
157 .Va i_val .
158 .El
159 .Pp
160 For
161 .Dv SIOCS80211
162 the following values of
163 .Va i_type
164 are valid:
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
168 by
169 .Va i_data
170 and
171 .Va i_len .
172 The length should be no longer then 32 characters.
173 .It Dv IEEE80211_IOC_WEP
174 Set the current WEP mode to the value given in
175 .Va i_val .
176 Valid values are the same as those for this value above.
177 Devices which
178 do not support all modes may choose to either return
179 .Er EINVAL
180 or choose a reasonable alternate (supported) setting.
181 .It Dv IEEE80211_IOC_WEPKEY
182 Set the WEP key indicated by
183 .Va i_val
184 to the value given by
185 .Va i_data
186 and
187 .Va i_len .
188 Generally, valid values of
189 .Va i_len
190 are 0, 5, and 13 though not all devices with WEP support have support
191 for 13-byte keys.
192 .It Dv IEEE80211_IOC_WEPTXKEY
193 Set the WEP key used for transmission to the value in
194 .Va i_val .
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
199 .Va i_val .
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
204 .Va i_data
205 and
206 .Va i_len .
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
211 .Va i_val .
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
219 .Va i_val .
220 Valid values are the same as those for this value above.
221 Devices which
222 do not support all modes may choose to either return
223 .Er EINVAL
224 or choose a reasonable alternate (supported) setting.
225 Most devices only
226 support CAM mode.
227 .It Dv IEEE80211_IOC_POWERSAVESLEEP
228 Set the powersave sleep time in msec to the value in
229 .Va i_val .
230 .El
231 .Sh SEE ALSO
232 .Xr ioctl 2 ,
233 .Xr an 4 ,
234 .Xr ray 4 ,
235 .Xr wi 4 ,
236 .Xr ancontrol 8 ,
237 .Xr ifconfig 8 ,
238 .Xr raycontrol 8 ,
239 .Xr wicontrol 8
240 .Sh HISTORY
241 The
242 .Nm
243 manual appeared in
244 .Fx 4.3 .