-.\" $OpenBSD: wicontrol.8,v 1.6 2000/02/03 00:53:59 angelos Exp $
+.\" $OpenBSD: wicontrol.8,v 1.7 2000/03/02 18:50:00 ho Exp $
.\"
.\" Copyright (c) 1997, 1998, 1999
.\" Bill Paul <wpaul@ctr.columbia.edu> All rights reserved.
IEEE 802.11 protocol which the WaveLAN implements. This includes
the station name, whether the station is operating in ad-hoc (point
to point) or BSS (service set) mode, and the network name of a service
-set to join (IBSS) if BSS mode is enabled. The
-.Nm
-command can also be used to view the current settings of these paremeters
-and to dump out the values of the card's statistics counters.
+set to join (IBSS) if BSS mode is enabled.
.Pp
The
.Ar iface
.Nm
should be the logical interface name associated with the WaveLAN/IEEE
device (wi0, wi1, etc...).
+.Pp
+The
+.Nm
+command given without any additional flags retrieves the current card
+settings from the driver and prints them out.
.Sh OPTIONS
The options are as follows:
.Pp
.Bl -tag -width Fl
.It Fl o
-Display the current settings of the specified WaveLAN/IEEE interface.
-This retrieves the current card settings from the driver and prints them
-out. Using the additional
-.Fl o
-flag will cause
-.Nm
-to print out the statistics counters instead of the card settings.
+Display the statistics counters for the specified WaveLAN/IEEE
+interface.
.It Fl e Ar 0|1
Enable or disable WEP encryption. Permitted values are
.Ar 0
-/* $OpenBSD: wicontrol.c,v 1.6 2000/02/26 23:36:28 ho Exp $ */
+/* $OpenBSD: wicontrol.c,v 1.7 2000/03/02 18:50:00 ho Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\
Bill Paul. All rights reserved.";
static const char rcsid[] =
- "@(#) $Id: wicontrol.c,v 1.6 2000/02/26 23:36:28 ho Exp $";
+ "@(#) $Id: wicontrol.c,v 1.7 2000/03/02 18:50:00 ho Exp $";
#endif
static void wi_getval __P((char *, struct wi_req *));
char *p;
{
fprintf(stderr,
- "usage: wiconfig interface "
+ "usage: wicontrol interface "
"[-o] [-t tx rate] [-n network name] [-s station name]\n"
" [-e 0|1] [-k key [-v 1|2|3|4]] [-T 1|2|3|4]\n"
" [-c 0|1] [-q SSID] [-p port type] [-a access point density]\n"
char *argv[];
{
char *iface = NULL;
- int ch, p, dumpstats = 0;
+ int ch, p, dumpstats = 0, dumpinfo = 1;
if (argc > 1 && argv[1][0] != '-') {
iface = argv[1];
wi_opt[p].optarg = optarg;
if (ch == 'T') /* key 1-4/0-3 kludge */
(*optarg)--;
- ch = 0;
+ dumpinfo = ch = 0;
}
switch(ch) {
case 0:
if (iface == NULL)
usage(argv[0]);
- if (dumpstats) {
- wi_dumpstats(iface);
- exit(0);
- }
-
for (p = 0; wi_opt[p].key; p++)
if (wi_opt[p].optarg != NULL)
wi_opt[p].function(iface, wi_opt[p].wi_code,
wi_opt[p].optarg);
- wi_dumpinfo(iface);
+ if (dumpstats)
+ wi_dumpstats(iface);
+
+ if (dumpinfo && !dumpstats)
+ wi_dumpinfo(iface);
exit(0);
}