.\" $NetBSD: wlanctl.8,v 1.9 2017/07/03 21:35:32 wiz Exp $ .\" Copyright (c) 2004 David Young. All rights reserved. .\" .\" This code was written by David Young. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of David Young may not be used to endorse or promote .\" products derived from this software without specific prior .\" written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, .\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID .\" YOUNG BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, .\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 15, 2004 .Dt WLANCTL 8 .Os .Sh NAME .Nm wlanctl .Nd examine IEEE 802.11 wireless LAN client/peer table .Sh SYNOPSIS .Nm wlanctl .Op Fl p .Ar interface .Op ... .Nm .Op Fl p .Fl a .Sh DESCRIPTION Use the .Nm utility to print node tables from IEEE 802.11 interfaces. Use the .Fl a flag to print the nodes for all interfaces, or list one or more 802.11 interfaces to select their tables for examination. The .Fl p flag causes only nodes that do not have encryption enabled to be printed. For example, to examine the node tables for atw0, use: .Pp .Bd -literal -offset indent -compact wlanctl atw0 .Ed .Pp .Nm may print this node table, for example: .Pp .Bd -literal -offset indent -compact atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e node flags 0001 ess chan 11 freq 2462MHz flags 00a0 capabilities 0022 beacon-interval 100 TU tsft 18425852102545544165 us rates [1.0] 2.0 5.5 11.0 assoc-id 0 assoc-failed 0 inactivity 0s rssi 161 txseq 10 rxseq 1420 atw0: mac 00:02:2d:2e:3c:f4 bss 02:02:6f:20:f6:2e node flags 0000 ess chan 11 freq 2462MHz flags 00a0 capabilities 0002 beacon-interval 100 TU tsft 18425852105450086784 us rates [1.0] 2.0 5.5 11.0 assoc-id 0 assoc-failed 0 inactivity 0s rssi 159 txseq 2 rxseq 551 atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e node flags 0000 ess chan 11 freq 2462MHz flags 00a0 capabilities 0022 beacon-interval 100 TU tsft 18425852102558548069 us rates [1.0] 2.0 5.5 6.0 9.0 11.0 12.0 18.0 24.0 36.0 48.0 54.0 assoc-id 0 assoc-failed 0 inactivity 145s rssi 163 txseq 9 rxseq 2563 .Ed .Pp This example is taken from a network consisting of three stations running in ad hoc mode. The key for interpreting the node print-outs follows: .Bl -tag -width "do_not_adapt" -compact .It Fa mac In the example node table, the first network node has MAC number 00:02:6f:20:f6:2e. .It Fa bss The first node belongs to the 802.11 network identified by Basic Service Set Identifier (BSSID) 02:02:6f:20:f6:2e. .It Fa "node flags" Only three node flags, .Dq bss , .Dq sta , and .Dq scan , are presently defined. The first node is distinguished from the rest by its node flags: flag .Dq bss indicates that the node represents the 802.11 network that the interface has joined or created. The MAC number for the node is the same as the MAC number for the interface. .It Fa ess the name of the (Extended) Service Set we have joined. This is the same as the network name set by .Xr ifconfig 8 with the .Dq ssid option. .It Fa chan .Nm prints the channel number, the center frequency in megahertz, and the channel flags. The channel flags indicate the frequency band .Po Do 2.4GHz Dc or Do 5GHz Dc Pc , modulation .Po Do cck Dc , Do gfsk Dc , Do ofdm Dc , Do turbo Dc , and \ Do dynamic cck-ofdm Dc Pc , and operation constraints .Pq Dq passive scan . Common combinations of band and modulation are these: .Bl -column 2.4GHz "dynamic cck-ofdm" "1-2Mb/s frequency-hopping 802.11" .It Sy Band Modulation Description .It 2.4GHz cck 11Mb/s DSSS 802.11b .It 2.4GHz gfsk 1-2Mb/s FHSS 802.11 .It 2.4GHz ofdm 54Mb/s 802.11g .It 2.4GHz dynamic cck-ofdm mixed 802.11b/g network .It 5GHz ofdm 54Mb/s 802.11a .It 5GHz turbo 108Mb/s 802.11a .El .It Fa capabilities ad hoc-mode and AP-mode 802.11 stations advertise their capabilities in 802.11 Beacons and Probe Responses. .Nm understands these capability flags: .Bl -column "channel agility" "adapt channel to protect licensed services" .It Sy Flag Description .It ess infrastructure (access point) network .It ibss ad hoc network (no access point) .It cf pollable TBD .It request cf poll TBD .It privacy WEP encryption .It short preamble reduce 802.11b overhead .It pbcc 22Mbps ``802.11b+'' .It channel agility change channel for licensed services .It short slot-time TBD .It rsn TBD Real Soon Now .It dsss-ofdm TBD .El .It Fa beacon-interval In the example, beacons are sent once every 100 Time Units. A Time Unit (TU) is 1024 microseconds (a .Dq kilo-microsecond or .Dq kus ) . Thus 100 TU is about one tenth of a second. .It Fa tsft 802.11 stations keep a Time Synchronization Function Timer (TSFT) which counts up in microseconds. Ad hoc-mode stations synchronize time with their peers. Infrastructure-mode stations synchronize time with their access point. Power-saving stations wake and sleep at intervals measured by the TSF Timer. The TSF Timer has a role in the coalescence of 802.11 ad hoc networks .Pq Dq IBSS merges . .It Fa rates 802.11 stations indicate the bit-rates they support, in units of 100kb/s in 802.11 Beacons, Probe Responses, and Association Requests. .Nm prints a station's supported bit-rates in 1Mb/s units. A station's basic rates are flagged by an asterisk .Pq Sq * . The last bit-rate at which a packet was sent to the station is enclosed by square brackets. .It Fa assoc-id In an infrastructure network, the access point assigns each client an Association Identifier which is used to indicate traffic for power-saving stations. .It Fa assoc-failed The number of times the station tried and failed to associate with its access point. Only .It Fa inactivity Seconds elapsed since a packet was last received from the station. When this value reaches net.link.ieee80211.maxinact, the station is eligible to be purged from the node table. See .Xr sysctl 8 . .It Fa rssi Unitless Received Signal Strength Indication (RSSI). Higher numbers indicate stronger signals. Zero is the lowest possible RSSI. On a hostap- or adhoc-mode interface, the node with .Fa "node flag" .Dq bss set uses .Fa rssi to indicate the signal strength for the last packet received from a station that does not belong to the network. On an infrastructure-mode station, the node with .Fa "node flag" .Dq bss set indicates the strength of packets from the access point. .It Fa txseq The next 802.11 packet sent to this station will carry this transmit sequence number. The 802.11 MAC uses the transmit sequence number to detect duplicate packets. .It Fa rxseq The last packet received from this station carried this transmit sequence number. .El .Sh SEE ALSO .Xr sysctl 8 .Sh HISTORY .Nm first appeared in .Nx 3.0 . .Sh AUTHORS .An David Young Aq Mt dyoung@NetBSD.org