diff options
author | phk <phk@FreeBSD.org> | 2001-05-26 09:27:08 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-05-26 09:27:08 +0000 |
commit | 1aacce7a450370feff7a5e098c12e915e4f731f8 (patch) | |
tree | a706c2fc726d426b9f75667c81d6227ef2f9ea18 /sbin/ifconfig/ifconfig.c | |
parent | 2072a71f0e5186928f3cb8cfac61fe8199029442 (diff) | |
download | FreeBSD-src-1aacce7a450370feff7a5e098c12e915e4f731f8.zip FreeBSD-src-1aacce7a450370feff7a5e098c12e915e4f731f8.tar.gz |
Currently, each wireless networking driver has it's own control program
despite the fact that most people want to set exactly the same settings
regardless of which card they have. It has been repeatidly suggested
that this configuration should be done via ifconfig. This patch
implements the required functionality in ifconfig and add support to the
wi and an drivers. It also provides partial, untested support for the
awi driver.
PR: 25577
Submitted by: Brooks Davis <brooks@one-eyed-alien.net>
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 699c433..858221d 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -223,6 +223,25 @@ struct cmd { { "vlandev", NEXTARG, setvlandev }, { "-vlandev", NEXTARG, unsetvlandev }, #endif +#ifdef USE_IEEE80211 + { "ssid", NEXTARG, set80211ssid }, + { "nwid", NEXTARG, set80211ssid }, + { "stationname", NEXTARG, set80211stationname }, + { "station", NEXTARG, set80211stationname }, /* BSD/OS */ + { "channel", NEXTARG, set80211channel }, + { "authmode", NEXTARG, set80211authmode }, + { "powersavemode", NEXTARG, set80211powersavemode }, + { "powersave", 1, set80211powersave }, + { "-powersave", 0, set80211powersave }, + { "powersavesleep", NEXTARG, set80211powersavesleep }, + { "wepmode", NEXTARG, set80211wepmode }, + { "wep", 1, set80211wep }, + { "-wep", 0, set80211wep }, + { "weptxkey", NEXTARG, set80211weptxkey }, + { "wepkey", NEXTARG, set80211wepkey }, + { "nwkey", NEXTARG, set80211nwkey }, /* NetBSD */ + { "-nwkey", 0, set80211wep }, /* NetBSD */ +#endif { "normal", -IFF_LINK0, setifflags }, { "compress", IFF_LINK0, setifflags }, { "noicmp", IFF_LINK1, setifflags }, @@ -291,6 +310,9 @@ struct afswtch { #ifdef USE_VLANS { "vlan", AF_UNSPEC, vlan_status, NULL, NULL, }, /* XXX not real!! */ #endif +#ifdef USE_IEEE80211 + { "ieee80211", AF_UNSPEC, ieee80211_status, NULL, NULL, }, /* XXX not real!! */ +#endif #endif { 0, 0, 0, 0 } }; @@ -970,6 +992,10 @@ status(afp, addrcount, sdl, ifm, ifam) if (allfamilies || afp->af_status == vlan_status) vlan_status(s, NULL); #endif +#ifdef USE_IEEE80211 + if (allfamilies || afp->af_status == ieee80211_status) + ieee80211_status(s, NULL); +#endif strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) printf("%s", ifs.ascii); |