mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
Make man page and usage statement match reality submitted by Ruslan,
Clean up "n to m" type options with "n-m" and some other improvements suggested by Ruslan. Change -C option to report the transmit key "4" if in "Home" mode. Submitted by: ru Approved by: imp, ru
This commit is contained in:
parent
bea90c29cf
commit
7c90b34292
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89380
@ -50,31 +50,31 @@
|
||||
.Nm
|
||||
.Fl i Ar iface Fl C
|
||||
.Nm
|
||||
.Fl i Ar iface Fl t Cm 0 | 1 | 2 | 3 | 4
|
||||
.Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4
|
||||
.Nm
|
||||
.Fl i Ar iface Fl s Cm 0 | 1 | 2 | 3
|
||||
.Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Op Fl v Cm 1 | 2 | 3 | 4
|
||||
.Op Fl v Cm 1 Ns - Ns Cm 4
|
||||
.Fl a Ar AP
|
||||
.Nm
|
||||
.Fl i Ar iface Fl b Ar beacon_period
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Op Fl v Cm 0 | 1
|
||||
.Fl d Cm 0 | 1 | 2 | 3
|
||||
.Fl d Cm 0 Ns - Ns Cm 3
|
||||
.Nm
|
||||
.Fl i Ar iface Fl e Cm 0 | 1 | 2 | 3
|
||||
.Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Op Fl v Cm 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
|
||||
.Op Fl v Cm 0 Ns - Ns Cm 8
|
||||
.Fl k Ar key
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Fl K Cm 0 | 1 | 2
|
||||
.Fl K Cm 0 Ns - Ns Cm 2
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Fl W Cm 0 | 1 | 2
|
||||
.Fl W Cm 0 Ns - Ns Cm 2
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Fl L Ar user_name
|
||||
@ -86,7 +86,7 @@
|
||||
.Fl i Ar iface Fl m Ar mac_address
|
||||
.Nm
|
||||
.Fl i Ar iface
|
||||
.Op Fl v Cm 1 | 2 | 3
|
||||
.Op Fl v Cm 1 Ns - Ns Cm 3
|
||||
.Fl n Ar SSID
|
||||
.Nm
|
||||
.Fl i Ar iface Fl o Cm 0 | 1
|
||||
@ -190,7 +190,7 @@ Display current NIC configuration.
|
||||
This shows the current operation mode,
|
||||
receive mode, MAC address, power save settings, various timing settings,
|
||||
channel selection, diversity, transmit power and transmit speed.
|
||||
.It Fl i Ar iface Fl t Cm 0 | 1 | 2 | 3 | 4
|
||||
.It Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4
|
||||
Select transmit speed.
|
||||
The available settings are as follows:
|
||||
.Bl -column ".Em TX rate" -offset indent
|
||||
@ -204,7 +204,7 @@ The available settings are as follows:
|
||||
.Pp
|
||||
Note that the 5.5 and 11Mbps settings are only supported on the 4800
|
||||
series adapters: the 4500 series adapters have a maximum speed of 2Mbps.
|
||||
.It Fl i Ar iface Fl s Cm 0 | 1 | 2 | 3
|
||||
.It Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3
|
||||
Set power save mode.
|
||||
Valid selections are as follows:
|
||||
.Bl -column ".Em Selection" -offset indent
|
||||
@ -217,7 +217,7 @@ Valid selections are as follows:
|
||||
.Pp
|
||||
Note that for IBSS (ad-hoc) mode, only PSP mode is supported, and only
|
||||
if the ATIM window is non-zero.
|
||||
.It Fl i Ar iface Oo Fl v Cm 1 | 2 | 3 | 4 Oc Fl a Ar AP
|
||||
.It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 4 Oc Fl a Ar AP
|
||||
Set preferred access point.
|
||||
The
|
||||
.Ar AP
|
||||
@ -239,7 +239,7 @@ The
|
||||
.Ar beacon_period
|
||||
is specified in milliseconds.
|
||||
The default is 100ms.
|
||||
.It Fl i Ar iface Oo Fl v Cm 0 | 1 Oc Fl d Cm 0 | 1 | 2 | 3
|
||||
.It Fl i Ar iface Oo Fl v Cm 0 | 1 Oc Fl d Cm 0 Ns - Ns Cm 3
|
||||
Select the antenna diversity.
|
||||
Aironet devices can be configured with up
|
||||
to two antennas, and transmit and receive diversity can be configured
|
||||
@ -262,7 +262,7 @@ option: selection
|
||||
sets the receive diversity and
|
||||
.Cm 1
|
||||
sets the transmit diversity.
|
||||
.It Fl i Ar iface Fl e Cm 0 | 1 | 2 | 3 | 4
|
||||
.It Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4
|
||||
Set the transmit WEP key to use.
|
||||
Note that until this command is issued, the device will use the
|
||||
last key programmed.
|
||||
@ -271,10 +271,12 @@ Currently
|
||||
set transmit key can be checked via
|
||||
.Fl C
|
||||
option.
|
||||
The 4th key sets the card in
|
||||
Selection
|
||||
.Cm 4
|
||||
sets the card in
|
||||
.Dq "Home Network Mode"
|
||||
and uses the home key.
|
||||
.It Fl i Ar iface Oo Fl v Cm 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Oc Fl k Ar key
|
||||
.It Fl i Ar iface Oo Fl v Cm 0 Ns - Ns Cm 8 Oc Fl k Ar key
|
||||
Set a WEP key.
|
||||
For 40 bit prefix 10 hex character with 0x.
|
||||
For 128 bit prefix 26 hex character with 0x.
|
||||
@ -296,9 +298,11 @@ Currently set keys can be checked via
|
||||
.Fl C
|
||||
option, only the sizes of the
|
||||
keys are returned.
|
||||
The 8th key is for the home key.
|
||||
The value of
|
||||
.Cm 8
|
||||
is for the home key.
|
||||
Note that the value for the home key can be read back from firmware.
|
||||
.It Fl i Ar iface Fl K Cm 0 | 1 | 2
|
||||
.It Fl i Ar iface Fl K Cm 0 Ns - Ns Cm 2
|
||||
Set authorization type.
|
||||
Use
|
||||
.Cm 0
|
||||
@ -309,7 +313,7 @@ for
|
||||
.Cm 2
|
||||
for
|
||||
.Dq "Shared Key" .
|
||||
.It Fl i Ar iface Fl W Cm 0 | 1 | 2
|
||||
.It Fl i Ar iface Fl W Cm 0 Ns - Ns Cm 2
|
||||
Enable WEP.
|
||||
Use
|
||||
.Cm 0
|
||||
@ -355,7 +359,7 @@ e.g.:
|
||||
.Li 00:60:1d:12:34:56 .
|
||||
This programs the new address into the card
|
||||
and updates the interface as well.
|
||||
.It Fl i Ar iface Oo Fl v Cm 1 | 2 | 3 Oc Fl n Ar SSID
|
||||
.It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 3 Oc Fl n Ar SSID
|
||||
Set the desired SSID (network name).
|
||||
There are three SSIDs which allows
|
||||
the NIC to work with access points at several locations without needing
|
||||
|
@ -837,19 +837,19 @@ static void usage(p)
|
||||
fprintf(stderr, "\t%s -i iface -I (show NIC capabilities)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -T (show stats counters)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -C (show current config)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -t 0|1|2|3|4 (set TX speed)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -s 0|1|2|3 (set power save mode)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 1|2|3|4] -a AP (specify AP)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -t 0-4 (set TX speed)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -s 0-3 (set power save mode)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 1-4] -a AP (specify AP)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -b val (set beacon period)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 0|1] -d val (set diversity)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -j val (set netjoin timeout)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -e 0|1|2|3 (enable transmit key)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 0|1|2|3|4|5|6|7] -k key (set key)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -K 0|1|2 (no auth/open/shared secret)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -W 0|1|2 (no WEP/full WEP/mixed cell)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -e 0-4 (enable transmit key)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 0-8] -k key (set key)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -K 0-2 (no auth/open/shared secret)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -W 0-2 (no WEP/full WEP/mixed cell)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -l val (set station name)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -m val (set MAC address)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface [-v 1|2|3] -n SSID "
|
||||
fprintf(stderr, "\t%s -i iface [-v 1-3] -n SSID "
|
||||
"(specify SSID)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -o 0|1 (set operating mode)\n", p);
|
||||
fprintf(stderr, "\t%s -i iface -c val (set ad-hoc channel)\n", p);
|
||||
@ -1298,8 +1298,19 @@ static void an_readkeyinfo(iface)
|
||||
const char *iface;
|
||||
{
|
||||
struct an_req areq;
|
||||
struct an_ltv_genconfig *cfg;
|
||||
struct an_ltv_key *k;
|
||||
int i;
|
||||
int home;
|
||||
|
||||
areq.an_len = sizeof(areq);
|
||||
areq.an_type = AN_RID_ACTUALCFG;
|
||||
an_getval(iface, &areq);
|
||||
cfg = (struct an_ltv_genconfig *)&areq;
|
||||
if (cfg->an_home_product & AN_HOME_NETWORK)
|
||||
home = 1;
|
||||
else
|
||||
home = 0;
|
||||
|
||||
bzero((char *)&areq, sizeof(areq));
|
||||
k = (struct an_ltv_key *)&areq;
|
||||
@ -1331,7 +1342,7 @@ static void an_readkeyinfo(iface)
|
||||
k->kindex = 0xffff;
|
||||
areq.an_len = sizeof(struct an_ltv_key);
|
||||
an_getval(iface, &areq);
|
||||
printf("\tThe active transmit key is %d\n", k->mac[0]);
|
||||
printf("\tThe active transmit key is %d\n", 4 * home + k->mac[0]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user