4 * Jean II - HPLB 97->99 - HPL 99->02
8 * This files is released under the GPL license.
9 * Copyright (c) 1997-2002 Jean Tourrilhes <jt@hpl.hp.com>
12 /* --------------------------- HISTORY --------------------------- */
14 * wireless 16 : (Jean Tourrilhes)
16 * o iwconfig, iwpriv & iwspy
18 * wireless 17 : (Justin Seger)
20 * o Compile under glibc fix
21 * o merge iwpriv in iwconfig
22 * o Add Wavelan roaming support
23 * o Update man page of iwconfig
27 * (From Andreas Neuhaus <andy@fasta.fh-dortmund.de>)
28 * o Many fix to remove "core dumps" in iwconfig
29 * o Remove useless headers in iwconfig
30 * o CHAR wide private ioctl
31 * (From Jean Tourrilhes)
32 * o Create iwcommon.h and iwcommon.c
33 * o Separate iwpriv again for user interface issues
34 * The folllowing didn't make sense and crashed :
35 * iwconfig eth0 priv sethisto 12 15 nwid 100
36 * o iwspy no longer depend on net-tools-1.2.0
37 * o Reorganisation of the code, cleanup
38 * o Add ESSID stuff in iwconfig
39 * o Add display of level & noise in dBm (stats in iwconfig)
40 * o Update man page of iwconfig and iwpriv
41 * o Add xwireless (didn't check if it compiles)
42 * (From Dean W. Gehnert <deang@tpi.com>)
44 * (Jan Rafaj <rafaj@cedric.vabo.cz>)
45 * o Cosmetic changes (sensitivity relative, freq list)
46 * o Frequency computation on double
47 * o Compile clean on libc5
48 * (From Jean Tourrilhes)
49 * o Move listing of frequencies to iwspy
50 * o Add AP address stuff in iwconfig
51 * o Add AP list stuff in iwspy
55 * (From Jean Tourrilhes)
56 * o Allow for sensitivity in dBm (if < 0) [iwconfig]
57 * o Formatting changes in displaying ap address in [iwconfig]
58 * o Slightly improved man pages and usage display
59 * o Add channel number for each frequency in list [iwspy]
60 * o Add nickname... [iwconfig]
61 * o Add "port" private ioctl shortcut [iwpriv]
62 * o If signal level = 0, no range or dBms [iwconfig]
63 * o I think I now got set/get char strings right in [iwpriv]
64 * (From Thomas Ekstrom <tomeck@thelogic.com>)
65 * o Fix a very obscure bug in [iwspy]
69 * (From Jean Tourrilhes)
70 * o Remove all #ifdef WIRELESS ugliness, but add a #error :
71 * we require Wireless Extensions 9 or nothing ! [all]
72 * o Switch to new 'nwid' definition (specific -> iw_param) [iwconfig]
73 * o Rewriten totally the encryption support [iwconfig]
74 * - Multiple keys, through key index
75 * - Flexible/multiple key size, and remove 64bits upper limit
76 * - Open/Restricted modes
77 * - Enter keys as ASCII strings
78 * o List key sizes supported and all keys in [iwspy]
79 * o Mode of operation support (ad-hoc, managed...) [iwconfig]
80 * o Use '=' to indicate fixed instead of ugly '(f)' [iwconfig]
81 * o Ability to disable RTS & frag (off), now the right way [iwconfig]
82 * o Auto as an input modifier for bitrate [iwconfig]
83 * o Power Management support [iwconfig]
84 * - set timeout or period and its value
85 * - Reception mode (unicast/multicast/all)
86 * o Updated man pages with all that ;-)
90 * (from Alan McReynolds <alan_mcreynolds@hpl.hp.com>)
91 * o Use proper macros for compilation directives [Makefile]
92 * (From Jean Tourrilhes)
93 * o Put licensing info everywhere (almost). Yes, it's GPL !
94 * o Document the use of /etc/pcmcia/wireless.opts [PCMCIA]
95 * o Add min/max modifiers to power management parameters [iwconfig]
96 * -> requested by Lee Keyser-Allen for the Spectrum24 driver
97 * o Optionally output a second power management parameter [iwconfig]
99 * o Common subroutines to display stats & power saving info [iwcommon]
100 * o Display all power management info, capability and values [iwspy]
102 * o Optional index for ESSID (for Aironet driver) [iwcommon]
103 * o IW_ENCODE_NOKEY for write only keys [iwconfig/iwspy]
104 * o Common subrouting to print encoding keys [iwspy]
106 * o Transmit Power stuff (dBm + mW) [iwconfig/iwspy]
107 * o Cleaner formatting algorithm when displaying params [iwconfig]
109 * o Fix get_range_info() and use it everywhere - Should fix core dumps.
110 * o Catch WE version differences between tools and driver and
111 * warn user. Thanks to Tobias Ringstrom for the tip... [iwcommon]
112 * o Add Retry limit and lifetime support. [iwconfig/iwlist]
113 * o Display "Cell:" instead of "Access Point:" in ad-hoc mode [iwconfig]
114 * o Header fix for glibc2.2 by Ross G. Miller <Ross_Miller@baylor.edu>
115 * o Move header selection flags in Makefile [iwcommon/Makefile]
116 * o Spin-off iwlist.c from iwspy.c. iwspy is now much smaller
117 * After moving this bit of code all over the place, from iwpriv
118 * to iwconfig to iwspy, it now has a home of its own... [iwspy/iwlist]
119 * o Wrote quick'n'dirty iwgetid.
120 * o Remove output of second power management parameter [iwconfig]
121 * Please use iwlist, I don't want to bloat iwconfig
123 * o Fix bug in display ints - "Allen Miu" <aklmiu@mit.edu> [iwpriv]
127 * (From Jim Kaba <jkaba@sarnoff.com>)
128 * o Fix socket_open to not open all types of sockets [iwcommon]
129 * (From Michael Tokarev <mjt@tls.msk.ru>)
130 * o Rewrite main (top level) + command line parsing of [iwlist]
131 * (From Jean Tourrilhes)
132 * o Set commands should return proper success flag [iwspy/iwpriv]
133 * requested by Michael Tokarev
135 * (From Torgeir Hansen <torgeir@trenger.ro>)
136 * o Replace "strcpy(wrq.ifr_name," with strncpy to avoid buffer
137 * overflows. This is OK because the kernel use strncmp...
139 * o Move operation_mode in iwcommon and add NUM_OPER_MODE [iwconfig]
140 * o print_stats, print_key, ... use char * instead if FILE * [iwcommon]
141 * o Add `iw_' prefix to avoid namespace pollution [iwcommon]
142 * o Add iw_get_basic_config() and iw_set_basic_config() [iwcommon]
143 * o Move iw_getstats from iwconfig to iwcommon [iwcommon]
144 * o Move changelog to CHANGELOG.h [iwcommon]
145 * o Rename iwcommon.* into iwlib.* [iwcommon->iwlib]
146 * o Compile iwlib. as a dynamic or static library [Makefile]
147 * o Allow the tools to be compiled with the dynamic library [Makefile]
148 * --- Update to Wireless Extension 12 ---
149 * o Show typical/average quality in iwspy [iwspy]
150 * o Get Wireless Stats through ioctl instead of /proc [iwlib]
154 * o Split iw_check_addr_type() into two functions mac/if [iwlib]
155 * o iw_in_addr() does appropriate iw_check_xxx itself [iwlib]
156 * o Allow iwspy on MAC address even if IP doesn't check [iwspy]
157 * o Allow iwconfig ap on MAC address even if IP doesn't check [iwconfig]
159 * o Fix iwlist man page about extra commands [iwlist]
161 * o Fix Makefile rules for library compile (more generic) [Makefile]
163 * o Set max length for all GET request with a iw_point [various]
164 * o Fix set IW_PRIV_TYPE_BYTE to be endian/align clean [iwpriv]
166 * (From Kernel Jake <kerneljake@hotmail.com>)
167 * o Add '/' at the end of directories to create them [Makefile]
168 * (From Pavel Roskin <proski@gnu.org>)
169 * o Replace "cp" with "install" to get permissions proper [Makefile]
170 * o Install Man-Pages at the proper location [Makefile]
171 * o Add automatic header selection based on libc/kernel [iwlib.h]
173 * o Add "commit" to force parameters on the card [iwconfig]
174 * o Wrap ioctl() in iw_set/get_ext() wrappers [all]
175 * o Beautify set request error messages [iwconfig]
179 * o Added common function to display frequency [iwlib]
180 * o Added handler to parse Wireless Events [iwlib]
181 * o Added tool to display Wireless Events [iwevent]
182 * o Pass command line to subroutines [iwlist]
183 * o Scanning support through SIOCSIWSCAN [iwlist]
185 * o Added common function to display bitrate [iwlib]
186 * o Add bitrate/encoding scanning support [iwlist]
187 * o Allow to read scan results for non-root users [iwlist]
188 * o Set 5s timeout on waiting for scan results [iwlist]
189 * o Cleanup iwgetid & support ap+scheme display [iwgetid]
190 * o iwevent man page [iwevent]
191 * (From Guus Sliepen <guus@warande3094.warande.uu.nl>)
192 * o iwgetid man page [iwgetid]
194 * o Add "#define WIRELESS_EXT > 13" around event code [iwlib]
195 * o Move iw_enum_devices() from iwlist.c to iwlib.c [iwlib]
196 * o Use iw_enum_devices() everywhere [iwconfig/iwspy/iwpriv]
197 * (From Pavel Roskin <proski@gnu.org>, rewrite by me)
198 * o Return proper error message on non existent interfaces [iwconfig]
199 * o Read interface list in /proc/net/wireless and not SIOCGIFCONF [iwlib]
201 * (From Pavel Roskin <proski@gnu.org> - again !!!)
202 * o Don't loose flags when setting encryption key [iwconfig]
203 * o Add <time.h> [iwevent]
205 * (From Casey Carter <Casey@Carter.net>)
206 * o Improved compilations directives, stricter warnings [Makefile]
207 * o Fix strict warnings (static func, unused args...) [various]
208 * o New routines to display/input Ethernet MAC addresses [iwlib]
209 * o Correct my english & spelling [various]
210 * o Get macaddr to compile [macaddr]
211 * o Fix range checking in max number of args [iwlist]
213 * o Display time when we receive event [iwevent]
215 * o Display time before event, easier to read [iwevent]
216 * (From "Dr. Michael Rietz" <rietz@mail.amps.de>)
217 * o Use a generic set of header, may end header mess [iwlib]
218 * (From Casey Carter <Casey@Carter.net>)
219 * o Zillions cleanups, small fixes and code reorg [all over]
220 * o Proper usage/help printout [iwevent, iwgetid, ...]
222 * o Send broadcast address for iwconfig ethX ap auto/any [iwconfig]
224 * o Send NULL address for iwconfig ethX ap off [iwconfig]
225 * o Add iw_in_key() helper (and use it) [iwlib]
226 * o Create symbolink link libiw.so to libiw.so.XX [Makefile]
227 * (From Javier Achirica <achirica@ttd.net>)
228 * o Always send TxPower flags to the driver [iwconfig]
229 * (From John M. Choi <johnchoi@its.caltech.edu>)
230 * o Header definition for Slackware (kernel 2.2/glibc 2.2) [iwlib]
234 * o Remove library symbolic link before creating it [Makefile]
235 * o Display error and exit if WE < 14 [iwevent]
236 * (From Sander Jonkers <sander@grachtzicht.cjb.net>)
237 * o Fix iwconfig usage display to show "enc off" [iwconfig]
238 * (From Pavel Roskin <proski@gnu.org>)
239 * o Formating : add spaces after cell/ap addr [iwconfig]
241 * o Do driver WE source version verification [iwlib]
242 * (From Pavel Roskin <proski@gnu.org>)
243 * o Cleanup user configurable options [Makefile]
244 * o add FORCE_WEXT_VERSION [Makefile]
245 * o Add uninstall directived [Makefile]
246 * o Cleanup version warnings [iwlib]
247 * o Fix iwconfig usage display to show "mode MODE" [iwconfig]
248 * o Replace "rm -f + ln -s" with "ln -sfn" in install [Makefile]
250 * o Add various documentation in source code of [iwpriv]
251 * o Allow to get more than 16 private ioctl description [iwlib]
252 * o Ignore ioctl descriptions with null name [iwpriv]
253 * o Implement sub-ioctls (simple/iw_point) [iwpriv]
255 * o Add DISTRIBUTIONS file with call for help [README]
256 * o Change iw_byte_size in iw_get_priv_size [iwlib]
257 * o Document various bugs of new driver API with priv ioctls [iwpriv]
258 * o Implement float/addr priv data types [iwpriv]
259 * o Fix off-by-one bug (priv_size <= IFNAMSIZ) [iwpriv]
260 * o Reformat/beautify ioctl list display [iwpriv]
261 * o Add "-a" command line to dump all read-only priv ioctls [iwpriv]
262 * o Add a sample showing new priv features [sample_priv_addr.c]
263 * o Update other samples with new driver API [sample_enc.c/sample_pm.c]
265 * o Fix "iwpriv -a" to not call ioctls not returning anything [iwpriv]
266 * o Use IW_MAX_GET_SPY in increase number of addresses read [iwspy]
267 * o Finish fixing the mess of off-by-one on IW_ESSID_MAX_SIZE [iwconfig]
268 * o Do interface enumeration using /proc/net/dev [iwlib]
270 * o Display various --version information [iwlib, iwconfig, iwlist]
271 * o Filled in Debian 2.3 & Red-Hat 7.3 sections in [DISTRIBUTIONS]
272 * o Filled in Red-Hat 7.2, Mandrake 8.2 and SuSE 8.0 in [DISTRIBUTIONS]
273 * o Display current freq/channel after the iwrange list [iwlist]
274 * o Display current rate after the iwrange list [iwlist]
275 * o Display current txpower after the iwrange list [iwlist]
276 * o Add BUILD_NOLIBM to build without libm [Makefile]
277 * o Fix infinite loop on unknown events/scan elements [iwlib]
278 * o Add IWEVCUSTOM support [iwevent, iwlist]
279 * o Add IWEVREGISTERED & IWEVEXPIRED support [iwevent]
280 * (From Pavel Roskin <proski@gnu.org>)
281 * o Make $(DYNAMIC_LINK) relative (and not absolute) [Makefile]
283 * o Replace all float occurence with double [iwlib, iwlist]
284 * o Implement iwgetid --mode [iwgetid]
285 * o Convert frequency to channel [iwlist, iwlib]
286 * (Suggested by Pavel Roskin <proski@gnu.org> - always him !)
287 * o Implement --version across the board [iwspy, iwevent, iwpriv]
288 * o Implement iwgetid --freq [iwgetid]
289 * o Display "Access Point/Cell" [iwgetid]
291 * o New manpage about configuration (placeholder) [wireless.7]
292 * o Catch properly invalid arg to "iwconfig ethX key" [iwconfig]
293 * o Put placeholder for Passphrase to key conversion [iwlib]
294 * o Allow args of "iwconfig ethX key" in any order [iwconfig]
295 * o Implement token index for private commands [iwpriv]
296 * o Add IW_MODE_MONITOR for passive monitoring [iwlib]
297 * I wonder why nobody bothered to ask for it before ;-)
298 * o Mention distribution specific document in [PCMCIA]
299 * o Create directories before installing stuff in it [Makefile]
301 * o Add Debian 3.0 and PCMCIA in [wireless.7]
302 * o Add iw_protocol_compare() in [iwlib]
304 * o Complain about version mistmatch at runtime only once [iwlib]
305 * o Fix IWNAME null termination [iwconfig, iwlib]
306 * o "iwgetid -p" to display protocol name and check WE support [iwgetid]
309 /* ----------------------------- TODO ----------------------------- */
315 * Make disable a per encryption key modifier if some hardware
320 * Remove 'port' and 'roam' cruft now that we have mode in iwconfig
324 * Add an "auto" flag to have the driver cache the last n results
328 * Add scanning command line modifiers
329 * More scan types support
333 * Make it non root-only
341 * What about some graphical tools ?