summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arlcontrol
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2004-04-13 19:25:26 +0000
committerfjoe <fjoe@FreeBSD.org>2004-04-13 19:25:26 +0000
commit14d6c54105f6b338c831fe5ca613bae46f70be69 (patch)
tree99069fb27596e7a2aa70f55e7a2e12d1009ea1d3 /usr.sbin/arlcontrol
parent43b27a4d763a19fe7f17d17b51864a649c25f95e (diff)
downloadFreeBSD-src-14d6c54105f6b338c831fe5ca613bae46f70be69.zip
FreeBSD-src-14d6c54105f6b338c831fe5ca613bae46f70be69.tar.gz
Use ifconfig(8) for setting common 802.11 parameters.
Submitted by: Stanislav A. Svirid <count@riss-telecom.ru>
Diffstat (limited to 'usr.sbin/arlcontrol')
-rw-r--r--usr.sbin/arlcontrol/arlcontrol.8102
-rw-r--r--usr.sbin/arlcontrol/arlcontrol.c99
2 files changed, 8 insertions, 193 deletions
diff --git a/usr.sbin/arlcontrol/arlcontrol.8 b/usr.sbin/arlcontrol/arlcontrol.8
index c86f881..a961539 100644
--- a/usr.sbin/arlcontrol/arlcontrol.8
+++ b/usr.sbin/arlcontrol/arlcontrol.8
@@ -40,26 +40,12 @@
.Nm
.Ar iface
.Nm
-.Ar iface Cm name Ar name
-.Nm
-.Ar iface Cm sid Ar SID
-.Nm
.Ar iface Cm country Ar country ( Cm 9-15 )
.Nm
-.Ar iface Cm channel Ar channel
-(depend on
-.Ar country )
-.Nm
-.Ar iface Cm freq Ar freq ( Cm 2412, 2427, 2442, 2457, 2465 )
-.Nm
-.Ar iface Cm spread Ar spread Cm ( 354, 500, 1000, 2000 )
-.Nm
-.Ar iface Cm bitrate Ar bitrate ( Cm 0-4)
-.Nm
-.Ar iface Cm mode Ar mode ( Cm 640 | 655 )
-.Nm
.Ar iface Cm priority Ar priority ( Cm normal, high, highest )
.Nm
+.Ar iface Cm txretry Ar txretry
+.Nm
.Ar iface Cm stat
.Nm
.Ar iface Cm quality
@@ -72,11 +58,6 @@ devices via the
driver.
Most of the parameters that can be changed are related to the
Aironet protocol which the Aironet Arlan 655 card implements.
-The parameters include
-the station name, the station operation mode
-.Ar (point to point or infrastructure) ,
-and the network name of a service
-set to join.
The
.Nm
utility can also be used to view the current NIC status, configuration
@@ -97,71 +78,9 @@ The options are as follows:
Display current settings of specified wireless interface.
This retrieves current card settings from the driver and prints
them out.
-.It Ar iface Cm name Ar name
-Set
-.Ar Device Name .
-This
-parameter is used to establish a 15-byte ASCII name
-for the Arlan 655 Client Card.
-The
-.Ar Device Name
-is optional and may be left blank.
-.Pp
-If you choose to assign a name, while operating in
-.Ar TMA
-mode, the name will appear in the Arlan Access Point's Registration Table.
-Duplicate names are allowed.
-.It Ar iface Cm sid Ar SID
-Set
-.Ar System Identifier.
-The System Identifier
-.Ar (SID)
-is a 4-byte, hexadecimal digit value that
-is attached to each packet sent out over the radio.
-Establishing a
-.Ar SID
-allows you to group nodes into a microcellular network and exclude
-those nodes that are whiting radio range on other networks.
-.Pp
-The
-.Ar SID
-value must be an even number, cannot exceed ts and must start with
-00 or 02.
-Examples of valid SID values are: 00000102, 0200AA14, 00013A18,
-007F6380.
-The
-.Ar default
-SID is
-.Cm 00000002 .
-.Pp
-Since nodes will only receive packets from other nodes with a matching SID,
-you must make sure that the Arlan 655 Client Card is set the same SID as
-other nodes on your network.
-.It Ar iface Cm mode Ar mode ( Cm 640 | 655 )
-Use
-.Ar operating mode
-parameter to specify whether you are operating in
-.Ar TMA , Non-TMA
-or
-.Ar PSP
-mode.
-The
-.Ar default
-setting is
-.Cm TMA
-mode.
-.Bl -column ".Em Mode" ".Em Regmode" -offset indent indent
-.Em "Mode Registration mode"
-.It 640 Ta TMA
-.It 655 Ta Non-TMA
-.It PSP Ta Power save mode
-.El
-.!!!
.It Ar iface Cm country Ar country ( Cm 9-15 )
-.It Ar iface Cm channel Ar channel
-.It Ar iface Cm freq Ar freq ( Cm 2412, 2427, 2442, 2457, 2465 )
Chose
-.Ar country , channel , freq
+.Ar country , channel
parameters that depend on the
.Ar country
according to the following table:
@@ -181,17 +100,6 @@ according to the following table:
.It "U.K. " Ta 15 Ta "2460"
.It "Spain " Ta 15 Ta "2460"
.El
-.It Ar iface Cm bitrate Ar bitrate ( Cm 0-4)
-.It Ar iface Cm spread Ar spread Cm ( 354, 500, 1000, 2000 )
-Set device operating bitrate or spread.
-.Bl -column ".Em Rate" ".Em Spread" ".Em kb/s" -offset indent indent
-.Em "Rate Spread kb/s"
-.It 0 Ta - Ta Auto
-.It 1 Ta 354 Ta 354
-.It 2 Ta 512 Ta 512
-.It 3 Ta 1000 Ta 1000
-.It 4 Ta 2000 Ta 2000
-.El
.It Ar iface Cm priority Ar priority ( Cm normal, high, highest )
Use the
.Ar priority
@@ -207,6 +115,8 @@ to transmit at the same time.
The percentage of units on your network that you set to values other than
.Dq normal
should be kept small - 10 percent or less.
+.It Ar iface Cm txretry Ar txretry
+Set transmit retries. Default is 0.
.It Ar iface Cm stat
Print internal Arlan 655 statistics block.
.It Ar iface Cm quality
@@ -219,7 +129,7 @@ Also the driver extracts values from ACK packets.
.El
.Sh EXAMPLES
.Bd -literal -offset indent
-arlconfig arl0 name NODE1 sid 4 freq 2442
+arlconfig arl0 country 11 priority hight
arlconfig arl0 quality
arlconfig arl0 stat
arlconfig arl0
diff --git a/usr.sbin/arlcontrol/arlcontrol.c b/usr.sbin/arlcontrol/arlcontrol.c
index 9055ddaa..dd03581 100644
--- a/usr.sbin/arlcontrol/arlcontrol.c
+++ b/usr.sbin/arlcontrol/arlcontrol.c
@@ -190,19 +190,9 @@ usage()
fprintf(stderr, "\t<param>\t\tParameter name (see below).\n");
fprintf(stderr, "\t<value>\t\tNew value for parameter.\n");
fprintf(stderr, "Parameter name:\t\tValue:\n");
- fprintf(stderr, "\tname\t\tset Name.\n");
- fprintf(stderr, "\tsid\t\tset System ID.\n");
- fprintf(stderr, "\tfreq\t\tset Frequency Channel (2412, 2427, 2442, 2457, 2465)\n");
- fprintf(stderr, "\tspread\t\tset Bitrate (354, 500, 1000, 2000)\n");
- fprintf(stderr, "\tmode\t\tset Mode (640, 655, PSP).\n");
fprintf(stderr, "\tcountry\t\tset Country (9-15)\n");
- fprintf(stderr, "\tchannel\t\tset Channel (depended on country)\n");
- fprintf(stderr, "\tbitrate\t\tset Bitrate (0-4)\n");
fprintf(stderr, "\tpriority\tset Priority (normal, high, highest)\n");
-#if 0
- fprintf(stderr, "\tparent\t\tset Arlan parent's MAC.\n");
- fprintf(stderr, "\taddr\t\tset Arlan MAC.\n");
-#endif
+ fprintf(stderr, "\ttxretry\t\tset Arlan Tx retry.\n");
fprintf(stderr, "or: %s <ifname> stat\n", progname);
fprintf(stderr, "\tprint internal arlan statistics block\n");
#ifdef ARLCACHE
@@ -380,7 +370,7 @@ main(int argc, char *argv[])
strncpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name));
ifr.ifr_addr.sa_family = AF_INET;
ifr.ifr_data = (caddr_t)qlt;
- if (ioctl(sd, SIOCGARLQLT, (caddr_t)&ifr))
+ if (ioctl(sd, SIOCGARLQLT, (caddr_t)&ifr))
err(1,"Get QLT");
print_qlt(qlt);
exit(0);
@@ -395,53 +385,6 @@ main(int argc, char *argv[])
value = argv[argind+1];
val = -1;
- if (!strcasecmp(param, "name")) {
- bzero(arl_io.cfg.name, 16);
- strncpy(arl_io.cfg.name, value, 16);
- arl_io.what_set |= ARLAN_SET_name;
- }
-
- if (!strcasecmp(param, "sid")) {
- val2 = strtol(value, &value2, 0);
- if (val2 < 0 || val2 > 0xffffff || val2 % 2 ||
- value == value2)
- err(1, "Bad SID - %s", value);
- bcopy(&val2, arl_io.cfg.sid, 4);
- arl_io.what_set |= ARLAN_SET_sid;
- }
-
- if (!strcasecmp (param, "freq")) {
- if (!strcmp(value, "2412"))
- val = 1;
- else if (!strcmp(value, "2427"))
- val = 2;
- else if (!strcmp(value, "2442"))
- val = 3;
- else if (!strcmp(value, "2457"))
- val = 4;
- else if (!strcmp(value, "2465"))
- val = 5;
- if (val == -1)
- err(1, "Bad Frequency - %s", value);
- arl_io.cfg.channelNumber = val;
- arl_io.what_set |= ARLAN_SET_channelNumber;
- }
-
- if (!strcasecmp(param, "spread")) {
- if (!strcmp(value, "354"))
- val = 1;
- else if (!strcmp(value, "500"))
- val = 2;
- else if (!strcmp(value, "1000"))
- val = 3;
- else if (!strcmp(value, "2000"))
- val = 4;
- if (val == -1)
- err (1, "Bad Bitrate - %s", value);
- arl_io.cfg.spreadingCode = val;
- arl_io.what_set |= ARLAN_SET_spreadingCode;
- }
-
if (!strcasecmp(param, "priority")) {
if (!strcasecmp(value, "normal"))
val = 0;
@@ -455,19 +398,6 @@ main(int argc, char *argv[])
arl_io.what_set |= ARLAN_SET_priority;
}
- if (!strcasecmp(param, "mode")) {
- if (!strcmp(value, "655"))
- val = 0;
- else if (!strcmp(value, "640"))
- val = 1;
- else if (!strcasecmp (value, "PSP"))
- val = 2;
- if (val == -1)
- err (1, "Bad Mode - %s", value);
- arl_io.cfg.registrationMode = val;
- arl_io.what_set |= ARLAN_SET_registrationMode;
- }
-
if (!strcasecmp(param, "parent")) {
if ((ea = (struct ether_addr*) ether_aton(value)) == NULL)
err (1, "Bad parent's MAC - %s", value);
@@ -478,36 +408,11 @@ main(int argc, char *argv[])
arl_io.what_set |= ARLAN_SET_specifiedRouter;
}
- if (!strcasecmp(param, "addr")) {
- if ((ea = (struct ether_addr*) ether_aton(value)) == NULL)
- err (1, "Bad MAC - %s", value);
- for (val = 0; val < 6; val++) {
- arl_io.cfg.lanCardNodeId[val] =
- (int) ea->octet[val];
- }
- arl_io.what_set |= ARLAN_SET_lanCardNodeId;
- }
-
if (!strcasecmp(param, "country")) {
arl_io.cfg.channelSet = atoi(value);
arl_io.what_set |= ARLAN_SET_channelSet;
}
- if (!strcasecmp(param, "channel")) {
- arl_io.cfg.channelNumber = atoi(value);
- arl_io.what_set |= ARLAN_SET_channelNumber;
- }
-
- if (!strcasecmp(param, "bitrate")) {
- arl_io.cfg.spreadingCode = atoi(value);
- arl_io.what_set |= ARLAN_SET_spreadingCode;
- }
-
- if (!strcasecmp(param, "receive")) {
- arl_io.cfg.receiveMode = atoi(value);
- arl_io.what_set |= ARLAN_SET_receiveMode;
- }
-
if (!strcasecmp(param, "txretry")) {
arl_io.cfg.txRetry = atoi(value);
arl_io.what_set |= ARLAN_SET_txRetry;
OpenPOWER on IntegriCloud