if_aironet_ieee.h revision 74698
155992Swpaul/* 255992Swpaul * Copyright (c) 1997, 1998, 1999 355992Swpaul * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 455992Swpaul * 555992Swpaul * Redistribution and use in source and binary forms, with or without 655992Swpaul * modification, are permitted provided that the following conditions 755992Swpaul * are met: 855992Swpaul * 1. Redistributions of source code must retain the above copyright 955992Swpaul * notice, this list of conditions and the following disclaimer. 1055992Swpaul * 2. Redistributions in binary form must reproduce the above copyright 1155992Swpaul * notice, this list of conditions and the following disclaimer in the 1255992Swpaul * documentation and/or other materials provided with the distribution. 1355992Swpaul * 3. All advertising materials mentioning features or use of this software 1455992Swpaul * must display the following acknowledgement: 1555992Swpaul * This product includes software developed by Bill Paul. 1655992Swpaul * 4. Neither the name of the author nor the names of any co-contributors 1755992Swpaul * may be used to endorse or promote products derived from this software 1855992Swpaul * without specific prior written permission. 1955992Swpaul * 2055992Swpaul * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 2155992Swpaul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2255992Swpaul * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2355992Swpaul * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 2455992Swpaul * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2555992Swpaul * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2655992Swpaul * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2755992Swpaul * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2855992Swpaul * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2955992Swpaul * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 3055992Swpaul * THE POSSIBILITY OF SUCH DAMAGE. 3155992Swpaul * 3255992Swpaul * $FreeBSD: head/sys/dev/an/if_aironet_ieee.h 74698 2001-03-23 17:46:32Z archie $ 3355992Swpaul */ 3455992Swpaul 3555992Swpaul#ifndef _IF_AIRONET_IEEE_H 3655992Swpaul#define _IF_AIRONET_IEEE_H 3755992Swpaul 3855992Swpaul/* 3955992Swpaul * This header defines a simple command interface to the FreeBSD 4055992Swpaul * Aironet driver (an) driver, which is used to set certain 4155992Swpaul * device-specific parameters which can't be easily managed through 4255992Swpaul * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_ 4355992Swpaul * interface, didn't I. 4455992Swpaul */ 4555992Swpaul 4655992Swpaul#ifndef SIOCSAIRONET 4755992Swpaul#define SIOCSAIRONET SIOCSIFGENERIC 4855992Swpaul#endif 4955992Swpaul 5055992Swpaul#ifndef SIOCGAIRONET 5155992Swpaul#define SIOCGAIRONET SIOCGIFGENERIC 5255992Swpaul#endif 5355992Swpaul 5455992Swpaul/* 5555992Swpaul * This is a make-predend RID value used only by the driver 5655992Swpaul * to allow the user to set the speed. 5755992Swpaul */ 5855992Swpaul#define AN_RID_TX_SPEED 0x1234 5955992Swpaul 6055992Swpaul/* 6155992Swpaul * Technically I don't think there's a limit to a record 6255992Swpaul * length. The largest record is the one that contains the CIS 6355992Swpaul * data, which is 240 words long, so 256 should be a safe 6455992Swpaul * value. 6555992Swpaul */ 6655992Swpaul#define AN_MAX_DATALEN 512 6755992Swpaul 6855992Swpaulstruct an_req { 6955992Swpaul u_int16_t an_len; 7055992Swpaul u_int16_t an_type; 7155992Swpaul u_int16_t an_val[AN_MAX_DATALEN]; 7255992Swpaul}; 7355992Swpaul 7455992Swpaul/* 7555992Swpaul * Private LTV records (interpreted only by the driver). This is 7655992Swpaul * a minor kludge to allow reading the interface statistics from 7755992Swpaul * the driver. 7855992Swpaul */ 7955992Swpaul#define AN_RID_IFACE_STATS 0x0100 8055992Swpaul#define AN_RID_MGMT_XMIT 0x0200 8155992Swpaul#ifdef ANCACHE 8255992Swpaul#define AN_RID_ZERO_CACHE 0x0300 8355992Swpaul#define AN_RID_READ_CACHE 0x0400 8455992Swpaul#endif 8555992Swpaul 8655992Swpaulstruct an_80211_hdr { 8755992Swpaul u_int16_t frame_ctl; 8855992Swpaul u_int16_t dur_id; 8955992Swpaul u_int8_t addr1[6]; 9055992Swpaul u_int8_t addr2[6]; 9155992Swpaul u_int8_t addr3[6]; 9255992Swpaul u_int16_t seq_ctl; 9355992Swpaul u_int8_t addr4[6]; 9455992Swpaul}; 9555992Swpaul 9655992Swpaul#define AN_FCTL_VERS 0x0002 9755992Swpaul#define AN_FCTL_FTYPE 0x000C 9855992Swpaul#define AN_FCTL_STYPE 0x00F0 9955992Swpaul#define AN_FCTL_TODS 0x0100 10055992Swpaul#define AN_FCTL_FROMDS 0x0200 10155992Swpaul#define AN_FCTL_MOREFRAGS 0x0400 10255992Swpaul#define AN_FCTL_RETRY 0x0800 10355992Swpaul#define AN_FCTL_PM 0x1000 10455992Swpaul#define AN_FCTL_MOREDATA 0x2000 10555992Swpaul#define AN_FCTL_WEP 0x4000 10655992Swpaul#define AN_FCTL_ORDER 0x8000 10755992Swpaul 10855992Swpaul#define AN_FTYPE_MGMT 0x0000 10955992Swpaul#define AN_FTYPE_CTL 0x0004 11055992Swpaul#define AN_FTYPE_DATA 0x0008 11155992Swpaul 11255992Swpaul#define AN_STYPE_MGMT_ASREQ 0x0000 /* association request */ 11355992Swpaul#define AN_STYPE_MGMT_ASRESP 0x0010 /* association response */ 11455992Swpaul#define AN_STYPE_MGMT_REASREQ 0x0020 /* reassociation request */ 11555992Swpaul#define AN_STYPE_MGMT_REASRESP 0x0030 /* reassociation response */ 11655992Swpaul#define AN_STYPE_MGMT_PROBEREQ 0x0040 /* probe request */ 11755992Swpaul#define AN_STYPE_MGMT_PROBERESP 0x0050 /* probe response */ 11855992Swpaul#define AN_STYPE_MGMT_BEACON 0x0080 /* beacon */ 11955992Swpaul#define AN_STYPE_MGMT_ATIM 0x0090 /* announcement traffic ind msg */ 12055992Swpaul#define AN_STYPE_MGMT_DISAS 0x00A0 /* disassociation */ 12155992Swpaul#define AN_STYPE_MGMT_AUTH 0x00B0 /* authentication */ 12255992Swpaul#define AN_STYPE_MGMT_DEAUTH 0x00C0 /* deauthentication */ 12355992Swpaul 12455992Swpaulstruct an_mgmt_hdr { 12555992Swpaul u_int16_t frame_ctl; 12655992Swpaul u_int16_t duration; 12755992Swpaul u_int8_t dst_addr[6]; 12855992Swpaul u_int8_t src_addr[6]; 12955992Swpaul u_int8_t bssid[6]; 13055992Swpaul u_int16_t seq_ctl; 13155992Swpaul}; 13255992Swpaul 13355992Swpaul/* 13455992Swpaul * Aironet IEEE signal strength cache 13555992Swpaul * 13655992Swpaul * driver keeps cache of last 13755992Swpaul * MAXANCACHE packets to arrive including signal strength info. 13855992Swpaul * daemons may read this via ioctl 13955992Swpaul * 14055992Swpaul * Each entry in the wi_sigcache has a unique macsrc. 14155992Swpaul */ 14255992Swpaul#ifdef ANCACHE 14355992Swpaul#define MAXANCACHE 10 14455992Swpaul 14555992Swpaulstruct an_sigcache { 14655992Swpaul char macsrc[6]; /* unique MAC address for entry */ 14755992Swpaul int ipsrc; /* ip address associated with packet */ 14855992Swpaul int signal; /* signal strength of the packet */ 14955992Swpaul int noise; /* noise value */ 15055992Swpaul int quality; /* quality of the packet */ 15155992Swpaul}; 15255992Swpaul#endif 15355992Swpaul 15468692Swpaulstruct an_ltv_key { 15568692Swpaul u_int16_t an_len; 15668692Swpaul u_int16_t an_type; 15768692Swpaul u_int16_t kindex; 15868692Swpaul u_int8_t mac[6]; 15968692Swpaul u_int16_t klen; 16068692Swpaul u_int8_t key[16]; /* 40-bit keys */ 16168692Swpaul}; 16268692Swpaul 16355992Swpaul#ifndef _KERNEL 16455992Swpaulstruct an_ltv_stats { 16555992Swpaul u_int16_t an_fudge; 16655992Swpaul u_int16_t an_len; /* 0x00 */ 16755992Swpaul u_int16_t an_type; /* 0xXX */ 16855992Swpaul u_int16_t an_spacer; /* 0x02 */ 16955992Swpaul u_int32_t an_rx_overruns; /* 0x04 */ 17055992Swpaul u_int32_t an_rx_plcp_csum_errs; /* 0x08 */ 17155992Swpaul u_int32_t an_rx_plcp_format_errs; /* 0x0C */ 17255992Swpaul u_int32_t an_rx_plcp_len_errs; /* 0x10 */ 17355992Swpaul u_int32_t an_rx_mac_crc_errs; /* 0x14 */ 17455992Swpaul u_int32_t an_rx_mac_crc_ok; /* 0x18 */ 17555992Swpaul u_int32_t an_rx_wep_errs; /* 0x1C */ 17655992Swpaul u_int32_t an_rx_wep_ok; /* 0x20 */ 17755992Swpaul u_int32_t an_retry_long; /* 0x24 */ 17855992Swpaul u_int32_t an_retry_short; /* 0x28 */ 17955992Swpaul u_int32_t an_retry_max; /* 0x2C */ 18055992Swpaul u_int32_t an_no_ack; /* 0x30 */ 18155992Swpaul u_int32_t an_no_cts; /* 0x34 */ 18255992Swpaul u_int32_t an_rx_ack_ok; /* 0x38 */ 18355992Swpaul u_int32_t an_rx_cts_ok; /* 0x3C */ 18455992Swpaul u_int32_t an_tx_ack_ok; /* 0x40 */ 18555992Swpaul u_int32_t an_tx_rts_ok; /* 0x44 */ 18655992Swpaul u_int32_t an_tx_cts_ok; /* 0x48 */ 18755992Swpaul u_int32_t an_tx_lmac_mcasts; /* 0x4C */ 18855992Swpaul u_int32_t an_tx_lmac_bcasts; /* 0x50 */ 18955992Swpaul u_int32_t an_tx_lmac_ucast_frags; /* 0x54 */ 19055992Swpaul u_int32_t an_tx_lmac_ucasts; /* 0x58 */ 19155992Swpaul u_int32_t an_tx_beacons; /* 0x5C */ 19255992Swpaul u_int32_t an_rx_beacons; /* 0x60 */ 19355992Swpaul u_int32_t an_tx_single_cols; /* 0x64 */ 19455992Swpaul u_int32_t an_tx_multi_cols; /* 0x68 */ 19555992Swpaul u_int32_t an_tx_defers_no; /* 0x6C */ 19655992Swpaul u_int32_t an_tx_defers_prot; /* 0x70 */ 19755992Swpaul u_int32_t an_tx_defers_energy; /* 0x74 */ 19855992Swpaul u_int32_t an_rx_dups; /* 0x78 */ 19955992Swpaul u_int32_t an_rx_partial; /* 0x7C */ 20055992Swpaul u_int32_t an_tx_too_old; /* 0x80 */ 20155992Swpaul u_int32_t an_rx_too_old; /* 0x84 */ 20255992Swpaul u_int32_t an_lostsync_max_retries;/* 0x88 */ 20355992Swpaul u_int32_t an_lostsync_missed_beacons;/* 0x8C */ 20455992Swpaul u_int32_t an_lostsync_arl_exceeded;/*0x90 */ 20555992Swpaul u_int32_t an_lostsync_deauthed; /* 0x94 */ 20655992Swpaul u_int32_t an_lostsync_disassociated;/*0x98 */ 20755992Swpaul u_int32_t an_lostsync_tsf_timing; /* 0x9C */ 20855992Swpaul u_int32_t an_tx_host_mcasts; /* 0xA0 */ 20955992Swpaul u_int32_t an_tx_host_bcasts; /* 0xA4 */ 21055992Swpaul u_int32_t an_tx_host_ucasts; /* 0xA8 */ 21155992Swpaul u_int32_t an_tx_host_failed; /* 0xAC */ 21255992Swpaul u_int32_t an_rx_host_mcasts; /* 0xB0 */ 21355992Swpaul u_int32_t an_rx_host_bcasts; /* 0xB4 */ 21455992Swpaul u_int32_t an_rx_host_ucasts; /* 0xB8 */ 21555992Swpaul u_int32_t an_rx_host_discarded; /* 0xBC */ 21655992Swpaul u_int32_t an_tx_hmac_mcasts; /* 0xC0 */ 21755992Swpaul u_int32_t an_tx_hmac_bcasts; /* 0xC4 */ 21855992Swpaul u_int32_t an_tx_hmac_ucasts; /* 0xC8 */ 21955992Swpaul u_int32_t an_tx_hmac_failed; /* 0xCC */ 22055992Swpaul u_int32_t an_rx_hmac_mcasts; /* 0xD0 */ 22155992Swpaul u_int32_t an_rx_hmac_bcasts; /* 0xD4 */ 22255992Swpaul u_int32_t an_rx_hmac_ucasts; /* 0xD8 */ 22355992Swpaul u_int32_t an_rx_hmac_discarded; /* 0xDC */ 22455992Swpaul u_int32_t an_tx_hmac_accepted; /* 0xE0 */ 22555992Swpaul u_int32_t an_ssid_mismatches; /* 0xE4 */ 22655992Swpaul u_int32_t an_ap_mismatches; /* 0xE8 */ 22755992Swpaul u_int32_t an_rates_mismatches; /* 0xEC */ 22855992Swpaul u_int32_t an_auth_rejects; /* 0xF0 */ 22955992Swpaul u_int32_t an_auth_timeouts; /* 0xF4 */ 23055992Swpaul u_int32_t an_assoc_rejects; /* 0xF8 */ 23155992Swpaul u_int32_t an_assoc_timeouts; /* 0xFC */ 23255992Swpaul u_int32_t an_reason_outside_table;/* 0x100 */ 23355992Swpaul u_int32_t an_reason1; /* 0x104 */ 23455992Swpaul u_int32_t an_reason2; /* 0x108 */ 23555992Swpaul u_int32_t an_reason3; /* 0x10C */ 23655992Swpaul u_int32_t an_reason4; /* 0x110 */ 23755992Swpaul u_int32_t an_reason5; /* 0x114 */ 23855992Swpaul u_int32_t an_reason6; /* 0x118 */ 23955992Swpaul u_int32_t an_reason7; /* 0x11C */ 24055992Swpaul u_int32_t an_reason8; /* 0x120 */ 24155992Swpaul u_int32_t an_reason9; /* 0x124 */ 24255992Swpaul u_int32_t an_reason10; /* 0x128 */ 24355992Swpaul u_int32_t an_reason11; /* 0x12C */ 24455992Swpaul u_int32_t an_reason12; /* 0x130 */ 24555992Swpaul u_int32_t an_reason13; /* 0x134 */ 24655992Swpaul u_int32_t an_reason14; /* 0x138 */ 24755992Swpaul u_int32_t an_reason15; /* 0x13C */ 24855992Swpaul u_int32_t an_reason16; /* 0x140 */ 24955992Swpaul u_int32_t an_reason17; /* 0x144 */ 25055992Swpaul u_int32_t an_reason18; /* 0x148 */ 25155992Swpaul u_int32_t an_reason19; /* 0x14C */ 25255992Swpaul u_int32_t an_rx_mgmt_pkts; /* 0x150 */ 25355992Swpaul u_int32_t an_tx_mgmt_pkts; /* 0x154 */ 25455992Swpaul u_int32_t an_rx_refresh_pkts; /* 0x158 */ 25555992Swpaul u_int32_t an_tx_refresh_pkts; /* 0x15C */ 25655992Swpaul u_int32_t an_rx_poll_pkts; /* 0x160 */ 25755992Swpaul u_int32_t an_tx_poll_pkts; /* 0x164 */ 25855992Swpaul u_int32_t an_host_retries; /* 0x168 */ 25955992Swpaul u_int32_t an_lostsync_hostreq; /* 0x16C */ 26055992Swpaul u_int32_t an_host_tx_bytes; /* 0x170 */ 26155992Swpaul u_int32_t an_host_rx_bytes; /* 0x174 */ 26255992Swpaul u_int32_t an_uptime_usecs; /* 0x178 */ 26355992Swpaul u_int32_t an_uptime_secs; /* 0x17C */ 26455992Swpaul u_int32_t an_lostsync_better_ap; /* 0x180 */ 26555992Swpaul u_int32_t an_rsvd[10]; 26655992Swpaul}; 26755992Swpaul 26855992Swpaulstruct an_ltv_genconfig { 26955992Swpaul /* General configuration. */ 27055992Swpaul u_int16_t an_len; /* 0x00 */ 27155992Swpaul u_int16_t an_type; /* XXXX */ 27255992Swpaul u_int16_t an_opmode; /* 0x02 */ 27355992Swpaul u_int16_t an_rxmode; /* 0x04 */ 27455992Swpaul u_int16_t an_fragthresh; /* 0x06 */ 27555992Swpaul u_int16_t an_rtsthresh; /* 0x08 */ 27655992Swpaul u_int8_t an_macaddr[6]; /* 0x0A */ 27755992Swpaul u_int8_t an_rates[8]; /* 0x10 */ 27855992Swpaul u_int16_t an_shortretry_limit; /* 0x18 */ 27955992Swpaul u_int16_t an_longretry_limit; /* 0x1A */ 28055992Swpaul u_int16_t an_tx_msdu_lifetime; /* 0x1C */ 28155992Swpaul u_int16_t an_rx_msdu_lifetime; /* 0x1E */ 28255992Swpaul u_int16_t an_stationary; /* 0x20 */ 28355992Swpaul u_int16_t an_ordering; /* 0x22 */ 28455992Swpaul u_int16_t an_devtype; /* 0x24 */ 28555992Swpaul u_int16_t an_rsvd0[5]; /* 0x26 */ 28655992Swpaul /* Scanning associating. */ 28755992Swpaul u_int16_t an_scanmode; /* 0x30 */ 28855992Swpaul u_int16_t an_probedelay; /* 0x32 */ 28955992Swpaul u_int16_t an_probe_energy_timeout;/* 0x34 */ 29055992Swpaul u_int16_t an_probe_response_timeout;/*0x36 */ 29155992Swpaul u_int16_t an_beacon_listen_timeout;/*0x38 */ 29255992Swpaul u_int16_t an_ibss_join_net_timeout;/*0x3A */ 29355992Swpaul u_int16_t an_auth_timeout; /* 0x3C */ 29455992Swpaul u_int16_t an_authtype; /* 0x3E */ 29555992Swpaul u_int16_t an_assoc_timeout; /* 0x40 */ 29655992Swpaul u_int16_t an_specified_ap_timeout;/* 0x42 */ 29755992Swpaul u_int16_t an_offline_scan_interval;/*0x44 */ 29855992Swpaul u_int16_t an_offline_scan_duration;/*0x46 */ 29955992Swpaul u_int16_t an_link_loss_delay; /* 0x48 */ 30055992Swpaul u_int16_t an_max_beacon_lost_time;/* 0x4A */ 30155992Swpaul u_int16_t an_refresh_interval; /* 0x4C */ 30255992Swpaul u_int16_t an_rsvd1; /* 0x4E */ 30355992Swpaul /* Power save operation */ 30455992Swpaul u_int16_t an_psave_mode; /* 0x50 */ 30555992Swpaul u_int16_t an_sleep_for_dtims; /* 0x52 */ 30655992Swpaul u_int16_t an_listen_interval; /* 0x54 */ 30755992Swpaul u_int16_t an_fast_listen_interval;/* 0x56 */ 30855992Swpaul u_int16_t an_listen_decay; /* 0x58 */ 30955992Swpaul u_int16_t an_fast_listen_decay; /* 0x5A */ 31055992Swpaul u_int16_t an_rsvd2[2]; /* 0x5C */ 31155992Swpaul /* Ad-hoc (or AP) operation. */ 31255992Swpaul u_int16_t an_beacon_period; /* 0x60 */ 31355992Swpaul u_int16_t an_atim_duration; /* 0x62 */ 31455992Swpaul u_int16_t an_rsvd3; /* 0x64 */ 31555992Swpaul u_int16_t an_ds_channel; /* 0x66 */ 31655992Swpaul u_int16_t an_rsvd4; /* 0x68 */ 31755992Swpaul u_int16_t an_dtim_period; /* 0x6A */ 31855992Swpaul u_int16_t an_rsvd5[2]; /* 0x6C */ 31955992Swpaul /* Radio operation. */ 32055992Swpaul u_int16_t an_radiotype; /* 0x70 */ 32155992Swpaul u_int16_t an_diversity; /* 0x72 */ 32255992Swpaul u_int16_t an_tx_power; /* 0x74 */ 32355992Swpaul u_int16_t an_rss_thresh; /* 0x76 */ 32468692Swpaul u_int16_t an_modulation_type; /* 0x78 */ 32568692Swpaul u_int16_t an_short_preamble; /* 0x7A */ 32668692Swpaul u_int16_t an_home_product; /* 0x7C */ 32768692Swpaul u_int16_t an_rsvd6; /* 0x7E */ 32855992Swpaul /* Aironet extensions. */ 32955992Swpaul u_int8_t an_nodename[16]; /* 0x80 */ 33055992Swpaul u_int16_t an_arl_thresh; /* 0x90 */ 33155992Swpaul u_int16_t an_arl_decay; /* 0x92 */ 33255992Swpaul u_int16_t an_arl_delay; /* 0x94 */ 33355992Swpaul u_int8_t an_rsvd7; /* 0x96 */ 33455992Swpaul u_int8_t an_rsvd8; /* 0x97 */ 33555992Swpaul u_int8_t an_magic_packet_action; /* 0x98 */ 33655992Swpaul u_int8_t an_magic_packet_ctl; /* 0x99 */ 33755992Swpaul u_int16_t an_rsvd9; 33855992Swpaul}; 33955992Swpaul 34055992Swpaul#define AN_OPMODE_IBSS_ADHOC 0x0000 34155992Swpaul#define AN_OPMODE_INFRASTRUCTURE_STATION 0x0001 34255992Swpaul#define AN_OPMODE_AP 0x0002 34355992Swpaul#define AN_OPMODE_AP_REPEATER 0x0003 34455992Swpaul#define AN_OPMODE_UNMODIFIED_PAYLOAD 0x0100 34555992Swpaul#define AN_OPMODE_AIRONET_EXTENSIONS 0x0200 34655992Swpaul#define AN_OPMODE_AP_EXTENSIONS 0x0400 34755992Swpaul 34855992Swpaul#define AN_RXMODE_BC_MC_ADDR 0x0000 34955992Swpaul#define AN_RXMODE_BC_ADDR 0x0001 35055992Swpaul#define AN_RXMODE_ADDR 0x0002 35155992Swpaul#define AN_RXMODE_80211_MONITOR_CURBSS 0x0003 35255992Swpaul#define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004 35355992Swpaul#define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005 35455992Swpaul#define AN_RXMODE_NO_8023_HEADER 0x0100 35555992Swpaul 35655992Swpaul#define AN_RATE_1MBPS 0x0002 35755992Swpaul#define AN_RATE_2MBPS 0x0004 35855992Swpaul#define AN_RATE_5_5MBPS 0x000B 35955992Swpaul#define AN_RATE_11MBPS 0x0016 36055992Swpaul 36155992Swpaul#define AN_DEVTYPE_PC4500 0x0065 36255992Swpaul#define AN_DEVTYPE_PC4800 0x006D 36355992Swpaul 36455992Swpaul#define AN_SCANMODE_ACTIVE 0x0000 36555992Swpaul#define AN_SCANMODE_PASSIVE 0x0001 36655992Swpaul#define AN_SCANMODE_AIRONET_ACTIVE 0x0002 36755992Swpaul 36855992Swpaul#define AN_AUTHTYPE_NONE 0x0000 36955992Swpaul#define AN_AUTHTYPE_OPEN 0x0001 37055992Swpaul#define AN_AUTHTYPE_SHAREDKEY 0x0002 37168692Swpaul#define AN_AUTHTYPE_MASK 0x00ff 37268692Swpaul#define AN_AUTHTYPE_ENABLE 0x0100 37369771Sarchie#define AN_AUTHTYPE_PRIVACY_IN_USE 0x0100 37469771Sarchie#define AN_AUTHTYPE_ALLOW_UNENCRYPTED 0x0200 37555992Swpaul 37655992Swpaul#define AN_PSAVE_NONE 0x0000 37755992Swpaul#define AN_PSAVE_CAM 0x0001 37855992Swpaul#define AN_PSAVE_PSP 0x0002 37955992Swpaul#define AN_PSAVE_PSP_CAM 0x0003 38055992Swpaul 38155992Swpaul#define AN_RADIOTYPE_80211_FH 0x0001 38255992Swpaul#define AN_RADIOTYPE_80211_DS 0x0002 38355992Swpaul#define AN_RADIOTYPE_LM2000_DS 0x0004 38455992Swpaul 38555992Swpaul#define AN_DIVERSITY_FACTORY_DEFAULT 0x0000 38655992Swpaul#define AN_DIVERSITY_ANTENNA_1_ONLY 0x0001 38755992Swpaul#define AN_DIVERSITY_ANTENNA_2_ONLY 0x0002 38855992Swpaul#define AN_DIVERSITY_ANTENNA_1_AND_2 0x0003 38955992Swpaul 39055992Swpaul#define AN_TXPOWER_FACTORY_DEFAULT 0x0000 39155992Swpaul#define AN_TXPOWER_50MW 50 39255992Swpaul#define AN_TXPOWER_100MW 100 39355992Swpaul#define AN_TXPOWER_250MW 250 39455992Swpaul 39574698Sarchie#define AN_HOME_NETWORK 0x0001 39674698Sarchie#define AN_HOME_INSTALL_AP 0x0002 39774698Sarchie 39855992Swpaulstruct an_ltv_ssidlist { 39955992Swpaul u_int16_t an_len; 40055992Swpaul u_int16_t an_type; 40155992Swpaul u_int16_t an_ssid1_len; 40255992Swpaul char an_ssid1[32]; 40355992Swpaul u_int16_t an_ssid2_len; 40455992Swpaul char an_ssid2[32]; 40555992Swpaul u_int16_t an_ssid3_len; 40655992Swpaul char an_ssid3[32]; 40755992Swpaul}; 40855992Swpaul 40955992Swpaulstruct an_ltv_aplist { 41055992Swpaul u_int16_t an_len; 41155992Swpaul u_int16_t an_type; 41255992Swpaul u_int8_t an_ap1[8]; 41355992Swpaul u_int8_t an_ap2[8]; 41455992Swpaul u_int8_t an_ap3[8]; 41555992Swpaul u_int8_t an_ap4[8]; 41655992Swpaul}; 41755992Swpaul 41855992Swpaulstruct an_ltv_drvname { 41955992Swpaul u_int16_t an_len; 42055992Swpaul u_int16_t an_type; 42155992Swpaul u_int8_t an_drvname[16]; 42255992Swpaul}; 42355992Swpaul 42455992Swpaulstruct an_rid_encap { 42555992Swpaul u_int16_t an_len; 42655992Swpaul u_int16_t an_type; 42755992Swpaul u_int16_t an_ethertype_default; 42855992Swpaul u_int16_t an_action_default; 42955992Swpaul u_int16_t an_ethertype0; 43055992Swpaul u_int16_t an_action0; 43155992Swpaul u_int16_t an_ethertype1; 43255992Swpaul u_int16_t an_action1; 43355992Swpaul u_int16_t an_ethertype2; 43455992Swpaul u_int16_t an_action2; 43555992Swpaul u_int16_t an_ethertype3; 43655992Swpaul u_int16_t an_action3; 43755992Swpaul u_int16_t an_ethertype4; 43855992Swpaul u_int16_t an_action4; 43955992Swpaul u_int16_t an_ethertype5; 44055992Swpaul u_int16_t an_action5; 44155992Swpaul u_int16_t an_ethertype6; 44255992Swpaul u_int16_t an_action6; 44355992Swpaul}; 44455992Swpaul 44555992Swpaul#define AN_ENCAP_ACTION_RX 0x0001 44655992Swpaul#define AN_ENCAP_ACTION_TX 0x0002 44755992Swpaul 44855992Swpaul#define AN_RXENCAP_NONE 0x0000 44955992Swpaul#define AN_RXENCAP_RFC1024 0x0001 45055992Swpaul 45155992Swpaul#define AN_TXENCAP_RFC1024 0x0000 45255992Swpaul#define AN_TXENCAP_80211 0x0002 45355992Swpaul 45455992Swpaulstruct an_ltv_caps { 45555992Swpaul u_int16_t an_len; /* 0x00 */ 45655992Swpaul u_int16_t an_type; /* XXXX */ 45755992Swpaul u_int8_t an_oui[3]; /* 0x02 */ 45855992Swpaul u_int8_t an_rsvd0; /* 0x05 */ 45955992Swpaul u_int16_t an_prodnum; /* 0x06 */ 46055992Swpaul u_int8_t an_manufname[32]; /* 0x08 */ 46155992Swpaul u_int8_t an_prodname[16]; /* 0x28 */ 46255992Swpaul u_int8_t an_prodvers[8]; /* 0x38 */ 46355992Swpaul u_int8_t an_oemaddr[6]; /* 0x40 */ 46455992Swpaul u_int8_t an_aironetaddr[6]; /* 0x46 */ 46555992Swpaul u_int16_t an_radiotype; /* 0x4C */ 46655992Swpaul u_int16_t an_regdomain; /* 0x4E */ 46755992Swpaul u_int8_t an_callid[6]; /* 0x50 */ 46855992Swpaul u_int8_t an_rates[8]; /* 0x56 */ 46955992Swpaul u_int8_t an_rx_diversity; /* 0x5E */ 47055992Swpaul u_int8_t an_tx_diversity; /* 0x5F */ 47155992Swpaul u_int16_t an_tx_powerlevels[8]; /* 0x60 */ 47255992Swpaul u_int16_t an_hwrev; /* 0x70 */ 47355992Swpaul u_int16_t an_hwcaps; /* 0x72 */ 47455992Swpaul u_int16_t an_temprange; /* 0x74 */ 47555992Swpaul u_int16_t an_fwrev; /* 0x76 */ 47655992Swpaul u_int16_t an_fwsubrev; /* 0x78 */ 47755992Swpaul u_int16_t an_ifacerev; /* 0x7A */ 47855992Swpaul u_int16_t an_softcaps; /* 0x7C */ 47955992Swpaul u_int16_t an_bootblockrev; /* 0x7E */ 48068692Swpaul u_int16_t an_req_hw_support; /* 0x80 */ 48155992Swpaul}; 48255992Swpaul 48355992Swpaulstruct an_ltv_apinfo { 48455992Swpaul u_int16_t an_len; 48555992Swpaul u_int16_t an_type; 48655992Swpaul u_int16_t an_tim_addr; 48755992Swpaul u_int16_t an_airo_addr; 48855992Swpaul}; 48955992Swpaul 49055992Swpaulstruct an_ltv_radioinfo { 49155992Swpaul u_int16_t an_len; 49255992Swpaul u_int16_t an_type; 49355992Swpaul /* ??? */ 49455992Swpaul}; 49555992Swpaul 49655992Swpaulstruct an_ltv_status { 49755992Swpaul u_int16_t an_len; /* 0x00 */ 49855992Swpaul u_int16_t an_type; /* 0xXX */ 49955992Swpaul u_int8_t an_macaddr[6]; /* 0x02 */ 50055992Swpaul u_int16_t an_opmode; /* 0x08 */ 50155992Swpaul u_int16_t an_errcode; /* 0x0A */ 50268692Swpaul u_int16_t an_cur_signal_strength; /* 0x0C */ 50355992Swpaul u_int16_t an_ssidlen; /* 0x0E */ 50455992Swpaul u_int8_t an_ssid[32]; /* 0x10 */ 50555992Swpaul u_int8_t an_ap_name[16]; /* 0x30 */ 50655992Swpaul u_int8_t an_cur_bssid[6]; /* 0x40 */ 50755992Swpaul u_int8_t an_prev_bssid1[6]; /* 0x46 */ 50855992Swpaul u_int8_t an_prev_bssid2[6]; /* 0x4C */ 50955992Swpaul u_int8_t an_prev_bssid3[6]; /* 0x52 */ 51055992Swpaul u_int16_t an_beacon_period; /* 0x58 */ 51155992Swpaul u_int16_t an_dtim_period; /* 0x5A */ 51255992Swpaul u_int16_t an_atim_duration; /* 0x5C */ 51355992Swpaul u_int16_t an_hop_period; /* 0x5E */ 51455992Swpaul u_int16_t an_cur_channel; /* 0x62 */ 51555992Swpaul u_int16_t an_channel_set; /* 0x60 */ 51655992Swpaul u_int16_t an_hops_to_backbone; /* 0x64 */ 51755992Swpaul u_int16_t an_ap_total_load; /* 0x66 */ 51855992Swpaul u_int16_t an_our_generated_load; /* 0x68 */ 51955992Swpaul u_int16_t an_accumulated_arl; /* 0x6A */ 52068692Swpaul u_int16_t an_cur_signal_quality; /* 0x6C */ 52168692Swpaul u_int16_t an_current_tx_rate; /* 0x6E */ 52268692Swpaul u_int16_t an_ap_device; /* 0x70 */ 52368692Swpaul u_int16_t an_normalized_rssi; /* 0x72 */ 52468692Swpaul u_int16_t an_short_pre_in_use; /* 0x74 */ 52568692Swpaul u_int8_t an_ap_ip_addr[4]; /* 0x76 */ 52668692Swpaul u_int16_t an_max_noise_prev_sec; /* 0x7A */ 52768692Swpaul u_int16_t an_avg_noise_prev_min; /* 0x7C */ 52868692Swpaul u_int16_t an_max_noise_prev_min; /* 0x7E */ 52974698Sarchie u_int16_t an_spare[3]; 53055992Swpaul}; 53155992Swpaul 53255992Swpaul#define AN_STATUS_OPMODE_CONFIGURED 0x0001 53355992Swpaul#define AN_STATUS_OPMODE_MAC_ENABLED 0x0002 53455992Swpaul#define AN_STATUS_OPMODE_RX_ENABLED 0x0004 53555992Swpaul#define AN_STATUS_OPMODE_IN_SYNC 0x0010 53655992Swpaul#define AN_STATUS_OPMODE_ASSOCIATED 0x0020 53755992Swpaul#define AN_STATUS_OPMODE_ERROR 0x8000 53855992Swpaul 53968692Swpaulstruct an_ltv_wepkey { 54068692Swpaul u_int16_t an_len; /* 0x00 */ 54168692Swpaul u_int16_t an_type; /* 0xXX */ 54268692Swpaul u_int16_t an_key_index; /* 0x02 */ 54368692Swpaul u_int8_t an_mac_addr[6]; /* 0x04 */ 54468692Swpaul u_int16_t an_key_len; /* 0x0A */ 54568692Swpaul u_int8_t an_key[13]; /* 0x0C */ 54668692Swpaul}; 54755992Swpaul 54855992Swpaul/* 54955992Swpaul * These are all the LTV record types that we can read or write 55055992Swpaul * from the Aironet. Not all of them are temendously useful, but I 55155992Swpaul * list as many as I know about here for completeness. 55255992Swpaul */ 55355992Swpaul 55455992Swpaul/* 55555992Swpaul * Configuration (read/write) 55655992Swpaul */ 55755992Swpaul#define AN_RID_GENCONFIG 0xFF10 /* General configuration info */ 55855992Swpaul#define AN_RID_SSIDLIST 0xFF11 /* Valid SSID list */ 55955992Swpaul#define AN_RID_APLIST 0xFF12 /* Valid AP list */ 56055992Swpaul#define AN_RID_DRVNAME 0xFF13 /* ID name of this node for diag */ 56155992Swpaul#define AN_RID_ENCAPPROTO 0xFF14 /* Payload encapsulation type */ 56268692Swpaul#define AN_RID_WEP_TEMP 0xFF15 /* Temporary Key */ 56368692Swpaul#define AN_RID_WEP_PERM 0xFF16 /* Perminant Key */ 56455992Swpaul#define AN_RID_ACTUALCFG 0xFF20 /* Current configuration settings */ 56568692Swpaul#define AN_RID_WEP_VOLATILE 0xFF15 /* Volatile WEP Key */ 56668692Swpaul#define AN_RID_WEP_PERSISTENT 0xFF16 /* Persistent WEP Key */ 56755992Swpaul 56855992Swpaul/* 56955992Swpaul * Reporting (read only) 57055992Swpaul */ 57155992Swpaul#define AN_RID_CAPABILITIES 0xFF00 /* PC 4500/4800 capabilities */ 57255992Swpaul#define AN_RID_AP_INFO 0xFF01 /* Access point info */ 57355992Swpaul#define AN_RID_RADIO_INFO 0xFF02 /* Radio info */ 57455992Swpaul#define AN_RID_STATUS 0xFF50 /* Current status info */ 57555992Swpaul 57655992Swpaul/* 57755992Swpaul * Statistics 57855992Swpaul */ 57955992Swpaul#define AN_RID_16BITS_CUM 0xFF60 /* Cumulative 16-bit stats counters */ 58055992Swpaul#define AN_RID_16BITS_DELTA 0xFF61 /* 16-bit stats (since last clear) */ 58155992Swpaul#define AN_RID_16BITS_DELTACLR 0xFF62 /* 16-bit stats, clear on read */ 58255992Swpaul#define AN_RID_32BITS_CUM 0xFF68 /* Cumulative 32-bit stats counters */ 58355992Swpaul#define AN_RID_32BITS_DELTA 0xFF69 /* 32-bit stats (since last clear) */ 58455992Swpaul#define AN_RID_32BITS_DELTACLR 0xFF6A /* 32-bit stats, clear on read */ 58555992Swpaul#endif 58655992Swpaul 58755992Swpaul 58855992Swpaul#endif 589