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
|
.Nm
|
||||||
.Fl i Ar iface Fl C
|
.Fl i Ar iface Fl C
|
||||||
.Nm
|
.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
|
.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
|
.Nm
|
||||||
.Fl i Ar iface
|
.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
|
.Fl a Ar AP
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface Fl b Ar beacon_period
|
.Fl i Ar iface Fl b Ar beacon_period
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface
|
.Fl i Ar iface
|
||||||
.Op Fl v Cm 0 | 1
|
.Op Fl v Cm 0 | 1
|
||||||
.Fl d Cm 0 | 1 | 2 | 3
|
.Fl d Cm 0 Ns - Ns Cm 3
|
||||||
.Nm
|
.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
|
.Nm
|
||||||
.Fl i Ar iface
|
.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
|
.Fl k Ar key
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface
|
.Fl i Ar iface
|
||||||
.Fl K Cm 0 | 1 | 2
|
.Fl K Cm 0 Ns - Ns Cm 2
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface
|
.Fl i Ar iface
|
||||||
.Fl W Cm 0 | 1 | 2
|
.Fl W Cm 0 Ns - Ns Cm 2
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface
|
.Fl i Ar iface
|
||||||
.Fl L Ar user_name
|
.Fl L Ar user_name
|
||||||
@ -86,7 +86,7 @@
|
|||||||
.Fl i Ar iface Fl m Ar mac_address
|
.Fl i Ar iface Fl m Ar mac_address
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface
|
.Fl i Ar iface
|
||||||
.Op Fl v Cm 1 | 2 | 3
|
.Op Fl v Cm 1 Ns - Ns Cm 3
|
||||||
.Fl n Ar SSID
|
.Fl n Ar SSID
|
||||||
.Nm
|
.Nm
|
||||||
.Fl i Ar iface Fl o Cm 0 | 1
|
.Fl i Ar iface Fl o Cm 0 | 1
|
||||||
@ -190,7 +190,7 @@ Display current NIC configuration.
|
|||||||
This shows the current operation mode,
|
This shows the current operation mode,
|
||||||
receive mode, MAC address, power save settings, various timing settings,
|
receive mode, MAC address, power save settings, various timing settings,
|
||||||
channel selection, diversity, transmit power and transmit speed.
|
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.
|
Select transmit speed.
|
||||||
The available settings are as follows:
|
The available settings are as follows:
|
||||||
.Bl -column ".Em TX rate" -offset indent
|
.Bl -column ".Em TX rate" -offset indent
|
||||||
@ -204,7 +204,7 @@ The available settings are as follows:
|
|||||||
.Pp
|
.Pp
|
||||||
Note that the 5.5 and 11Mbps settings are only supported on the 4800
|
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.
|
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.
|
Set power save mode.
|
||||||
Valid selections are as follows:
|
Valid selections are as follows:
|
||||||
.Bl -column ".Em Selection" -offset indent
|
.Bl -column ".Em Selection" -offset indent
|
||||||
@ -217,7 +217,7 @@ Valid selections are as follows:
|
|||||||
.Pp
|
.Pp
|
||||||
Note that for IBSS (ad-hoc) mode, only PSP mode is supported, and only
|
Note that for IBSS (ad-hoc) mode, only PSP mode is supported, and only
|
||||||
if the ATIM window is non-zero.
|
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.
|
Set preferred access point.
|
||||||
The
|
The
|
||||||
.Ar AP
|
.Ar AP
|
||||||
@ -239,7 +239,7 @@ The
|
|||||||
.Ar beacon_period
|
.Ar beacon_period
|
||||||
is specified in milliseconds.
|
is specified in milliseconds.
|
||||||
The default is 100ms.
|
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.
|
Select the antenna diversity.
|
||||||
Aironet devices can be configured with up
|
Aironet devices can be configured with up
|
||||||
to two antennas, and transmit and receive diversity can be configured
|
to two antennas, and transmit and receive diversity can be configured
|
||||||
@ -262,7 +262,7 @@ option: selection
|
|||||||
sets the receive diversity and
|
sets the receive diversity and
|
||||||
.Cm 1
|
.Cm 1
|
||||||
sets the transmit diversity.
|
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.
|
Set the transmit WEP key to use.
|
||||||
Note that until this command is issued, the device will use the
|
Note that until this command is issued, the device will use the
|
||||||
last key programmed.
|
last key programmed.
|
||||||
@ -271,10 +271,12 @@ Currently
|
|||||||
set transmit key can be checked via
|
set transmit key can be checked via
|
||||||
.Fl C
|
.Fl C
|
||||||
option.
|
option.
|
||||||
The 4th key sets the card in
|
Selection
|
||||||
|
.Cm 4
|
||||||
|
sets the card in
|
||||||
.Dq "Home Network Mode"
|
.Dq "Home Network Mode"
|
||||||
and uses the home key.
|
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.
|
Set a WEP key.
|
||||||
For 40 bit prefix 10 hex character with 0x.
|
For 40 bit prefix 10 hex character with 0x.
|
||||||
For 128 bit prefix 26 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
|
.Fl C
|
||||||
option, only the sizes of the
|
option, only the sizes of the
|
||||||
keys are returned.
|
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.
|
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.
|
Set authorization type.
|
||||||
Use
|
Use
|
||||||
.Cm 0
|
.Cm 0
|
||||||
@ -309,7 +313,7 @@ for
|
|||||||
.Cm 2
|
.Cm 2
|
||||||
for
|
for
|
||||||
.Dq "Shared Key" .
|
.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.
|
Enable WEP.
|
||||||
Use
|
Use
|
||||||
.Cm 0
|
.Cm 0
|
||||||
@ -355,7 +359,7 @@ e.g.:
|
|||||||
.Li 00:60:1d:12:34:56 .
|
.Li 00:60:1d:12:34:56 .
|
||||||
This programs the new address into the card
|
This programs the new address into the card
|
||||||
and updates the interface as well.
|
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).
|
Set the desired SSID (network name).
|
||||||
There are three SSIDs which allows
|
There are three SSIDs which allows
|
||||||
the NIC to work with access points at several locations without needing
|
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 -I (show NIC capabilities)\n", p);
|
||||||
fprintf(stderr, "\t%s -i iface -T (show stats counters)\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 -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 -t 0-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 -s 0-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 [-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 -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 [-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 -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 -e 0-4 (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 [-v 0-8] -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 -K 0-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 -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 -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 -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);
|
"(specify SSID)\n", p);
|
||||||
fprintf(stderr, "\t%s -i iface -o 0|1 (set operating mode)\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);
|
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;
|
const char *iface;
|
||||||
{
|
{
|
||||||
struct an_req areq;
|
struct an_req areq;
|
||||||
|
struct an_ltv_genconfig *cfg;
|
||||||
struct an_ltv_key *k;
|
struct an_ltv_key *k;
|
||||||
int i;
|
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));
|
bzero((char *)&areq, sizeof(areq));
|
||||||
k = (struct an_ltv_key *)&areq;
|
k = (struct an_ltv_key *)&areq;
|
||||||
@ -1331,7 +1342,7 @@ static void an_readkeyinfo(iface)
|
|||||||
k->kindex = 0xffff;
|
k->kindex = 0xffff;
|
||||||
areq.an_len = sizeof(struct an_ltv_key);
|
areq.an_len = sizeof(struct an_ltv_key);
|
||||||
an_getval(iface, &areq);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user