Home | History | Annotate | Line # | Download | only in ic
anvar.h revision 1.1
      1  1.1  onoe /*	$NetBSD: anvar.h,v 1.1 2000/12/11 23:16:50 onoe Exp $	*/
      2  1.1  onoe /*
      3  1.1  onoe  * Copyright (c) 1997, 1998, 1999
      4  1.1  onoe  *	Bill Paul <wpaul (at) ctr.columbia.edu>.  All rights reserved.
      5  1.1  onoe  *
      6  1.1  onoe  * Redistribution and use in source and binary forms, with or without
      7  1.1  onoe  * modification, are permitted provided that the following conditions
      8  1.1  onoe  * are met:
      9  1.1  onoe  * 1. Redistributions of source code must retain the above copyright
     10  1.1  onoe  *    notice, this list of conditions and the following disclaimer.
     11  1.1  onoe  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.1  onoe  *    notice, this list of conditions and the following disclaimer in the
     13  1.1  onoe  *    documentation and/or other materials provided with the distribution.
     14  1.1  onoe  * 3. All advertising materials mentioning features or use of this software
     15  1.1  onoe  *    must display the following acknowledgement:
     16  1.1  onoe  *	This product includes software developed by Bill Paul.
     17  1.1  onoe  * 4. Neither the name of the author nor the names of any co-contributors
     18  1.1  onoe  *    may be used to endorse or promote products derived from this software
     19  1.1  onoe  *    without specific prior written permission.
     20  1.1  onoe  *
     21  1.1  onoe  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
     22  1.1  onoe  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1  onoe  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1  onoe  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
     25  1.1  onoe  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26  1.1  onoe  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27  1.1  onoe  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28  1.1  onoe  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29  1.1  onoe  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30  1.1  onoe  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     31  1.1  onoe  * THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  onoe  *
     33  1.1  onoe  * $FreeBSD: src/sys/dev/an/if_aironet_ieee.h,v 1.2 2000/11/13 23:04:12 wpaul Exp $
     34  1.1  onoe  */
     35  1.1  onoe 
     36  1.1  onoe #ifndef _IF_AIRONET_IEEE_H
     37  1.1  onoe #define _IF_AIRONET_IEEE_H
     38  1.1  onoe 
     39  1.1  onoe /*
     40  1.1  onoe  * This header defines a simple command interface to the FreeBSD
     41  1.1  onoe  * Aironet driver (an) driver, which is used to set certain
     42  1.1  onoe  * device-specific parameters which can't be easily managed through
     43  1.1  onoe  * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_
     44  1.1  onoe  * interface, didn't I.
     45  1.1  onoe  */
     46  1.1  onoe 
     47  1.1  onoe #ifndef SIOCSAIRONET
     48  1.1  onoe #define SIOCSAIRONET	SIOCSIFGENERIC
     49  1.1  onoe #endif
     50  1.1  onoe 
     51  1.1  onoe #ifndef SIOCGAIRONET
     52  1.1  onoe #define SIOCGAIRONET	SIOCGIFGENERIC
     53  1.1  onoe #endif
     54  1.1  onoe 
     55  1.1  onoe /*
     56  1.1  onoe  * This is a make-predend RID value used only by the driver
     57  1.1  onoe  * to allow the user to set the speed.
     58  1.1  onoe  */
     59  1.1  onoe #define AN_RID_TX_SPEED		0x1234
     60  1.1  onoe 
     61  1.1  onoe /*
     62  1.1  onoe  * Technically I don't think there's a limit to a record
     63  1.1  onoe  * length. The largest record is the one that contains the CIS
     64  1.1  onoe  * data, which is 240 words long, so 256 should be a safe
     65  1.1  onoe  * value.
     66  1.1  onoe  */
     67  1.1  onoe #define AN_MAX_DATALEN	512
     68  1.1  onoe 
     69  1.1  onoe struct an_req {
     70  1.1  onoe 	u_int16_t	an_len;
     71  1.1  onoe 	u_int16_t	an_type;
     72  1.1  onoe 	u_int16_t	an_val[AN_MAX_DATALEN];
     73  1.1  onoe };
     74  1.1  onoe 
     75  1.1  onoe /*
     76  1.1  onoe  * Private LTV records (interpreted only by the driver). This is
     77  1.1  onoe  * a minor kludge to allow reading the interface statistics from
     78  1.1  onoe  * the driver.
     79  1.1  onoe  */
     80  1.1  onoe #define AN_RID_IFACE_STATS	0x0100
     81  1.1  onoe #define AN_RID_MGMT_XMIT	0x0200
     82  1.1  onoe #ifdef ANCACHE
     83  1.1  onoe #define AN_RID_ZERO_CACHE	0x0300
     84  1.1  onoe #define AN_RID_READ_CACHE	0x0400
     85  1.1  onoe #endif
     86  1.1  onoe 
     87  1.1  onoe struct an_80211_hdr {
     88  1.1  onoe 	u_int16_t		frame_ctl;
     89  1.1  onoe 	u_int16_t		dur_id;
     90  1.1  onoe 	u_int8_t		addr1[6];
     91  1.1  onoe 	u_int8_t		addr2[6];
     92  1.1  onoe 	u_int8_t		addr3[6];
     93  1.1  onoe 	u_int16_t		seq_ctl;
     94  1.1  onoe 	u_int8_t		addr4[6];
     95  1.1  onoe };
     96  1.1  onoe 
     97  1.1  onoe #define AN_FCTL_VERS		0x0002
     98  1.1  onoe #define AN_FCTL_FTYPE		0x000C
     99  1.1  onoe #define AN_FCTL_STYPE		0x00F0
    100  1.1  onoe #define AN_FCTL_TODS		0x0100
    101  1.1  onoe #define AN_FCTL_FROMDS		0x0200
    102  1.1  onoe #define AN_FCTL_MOREFRAGS	0x0400
    103  1.1  onoe #define AN_FCTL_RETRY		0x0800
    104  1.1  onoe #define AN_FCTL_PM		0x1000
    105  1.1  onoe #define AN_FCTL_MOREDATA	0x2000
    106  1.1  onoe #define AN_FCTL_WEP		0x4000
    107  1.1  onoe #define AN_FCTL_ORDER		0x8000
    108  1.1  onoe 
    109  1.1  onoe #define AN_FTYPE_MGMT		0x0000
    110  1.1  onoe #define AN_FTYPE_CTL		0x0004
    111  1.1  onoe #define AN_FTYPE_DATA		0x0008
    112  1.1  onoe 
    113  1.1  onoe #define AN_STYPE_MGMT_ASREQ	0x0000	/* association request */
    114  1.1  onoe #define AN_STYPE_MGMT_ASRESP	0x0010	/* association response */
    115  1.1  onoe #define AN_STYPE_MGMT_REASREQ	0x0020	/* reassociation request */
    116  1.1  onoe #define AN_STYPE_MGMT_REASRESP	0x0030	/* reassociation response */
    117  1.1  onoe #define AN_STYPE_MGMT_PROBEREQ	0x0040	/* probe request */
    118  1.1  onoe #define AN_STYPE_MGMT_PROBERESP	0x0050	/* probe response */
    119  1.1  onoe #define AN_STYPE_MGMT_BEACON	0x0080	/* beacon */
    120  1.1  onoe #define AN_STYPE_MGMT_ATIM	0x0090	/* announcement traffic ind msg */
    121  1.1  onoe #define AN_STYPE_MGMT_DISAS	0x00A0	/* disassociation */
    122  1.1  onoe #define AN_STYPE_MGMT_AUTH	0x00B0	/* authentication */
    123  1.1  onoe #define AN_STYPE_MGMT_DEAUTH	0x00C0	/* deauthentication */
    124  1.1  onoe 
    125  1.1  onoe struct an_mgmt_hdr {
    126  1.1  onoe 	u_int16_t		frame_ctl;
    127  1.1  onoe 	u_int16_t		duration;
    128  1.1  onoe 	u_int8_t		dst_addr[6];
    129  1.1  onoe 	u_int8_t		src_addr[6];
    130  1.1  onoe 	u_int8_t		bssid[6];
    131  1.1  onoe 	u_int16_t		seq_ctl;
    132  1.1  onoe };
    133  1.1  onoe 
    134  1.1  onoe /*
    135  1.1  onoe  * Aironet IEEE signal strength cache
    136  1.1  onoe  *
    137  1.1  onoe  * driver keeps cache of last
    138  1.1  onoe  * MAXANCACHE packets to arrive including signal strength info.
    139  1.1  onoe  * daemons may read this via ioctl
    140  1.1  onoe  *
    141  1.1  onoe  * Each entry in the wi_sigcache has a unique macsrc.
    142  1.1  onoe  */
    143  1.1  onoe #ifdef ANCACHE
    144  1.1  onoe #define MAXANCACHE      10
    145  1.1  onoe 
    146  1.1  onoe struct an_sigcache {
    147  1.1  onoe 	char	macsrc[6];	/* unique MAC address for entry */
    148  1.1  onoe 	int	ipsrc;		/* ip address associated with packet */
    149  1.1  onoe 	int	signal;		/* signal strength of the packet */
    150  1.1  onoe 	int	noise;		/* noise value */
    151  1.1  onoe 	int	quality;	/* quality of the packet */
    152  1.1  onoe };
    153  1.1  onoe #endif
    154  1.1  onoe 
    155  1.1  onoe struct an_ltv_key {
    156  1.1  onoe 	u_int16_t	an_len;
    157  1.1  onoe 	u_int16_t	an_type;
    158  1.1  onoe 	u_int16_t       kindex;
    159  1.1  onoe 	u_int8_t        mac[6];
    160  1.1  onoe 	u_int16_t       klen;
    161  1.1  onoe 	u_int8_t        key[16];  /* 40-bit keys */
    162  1.1  onoe };
    163  1.1  onoe 
    164  1.1  onoe #ifndef _KERNEL
    165  1.1  onoe struct an_ltv_stats {
    166  1.1  onoe 	u_int16_t		an_fudge;
    167  1.1  onoe 	u_int16_t		an_len;			/* 0x00 */
    168  1.1  onoe 	u_int16_t		an_type;		/* 0xXX */
    169  1.1  onoe 	u_int16_t		an_spacer;		/* 0x02 */
    170  1.1  onoe 	u_int32_t		an_rx_overruns;		/* 0x04 */
    171  1.1  onoe 	u_int32_t		an_rx_plcp_csum_errs;	/* 0x08 */
    172  1.1  onoe 	u_int32_t		an_rx_plcp_format_errs;	/* 0x0C */
    173  1.1  onoe 	u_int32_t		an_rx_plcp_len_errs;	/* 0x10 */
    174  1.1  onoe 	u_int32_t		an_rx_mac_crc_errs;	/* 0x14 */
    175  1.1  onoe 	u_int32_t		an_rx_mac_crc_ok;	/* 0x18 */
    176  1.1  onoe 	u_int32_t		an_rx_wep_errs;		/* 0x1C */
    177  1.1  onoe 	u_int32_t		an_rx_wep_ok;		/* 0x20 */
    178  1.1  onoe 	u_int32_t		an_retry_long;		/* 0x24 */
    179  1.1  onoe 	u_int32_t		an_retry_short;		/* 0x28 */
    180  1.1  onoe 	u_int32_t		an_retry_max;		/* 0x2C */
    181  1.1  onoe 	u_int32_t		an_no_ack;		/* 0x30 */
    182  1.1  onoe 	u_int32_t		an_no_cts;		/* 0x34 */
    183  1.1  onoe 	u_int32_t		an_rx_ack_ok;		/* 0x38 */
    184  1.1  onoe 	u_int32_t		an_rx_cts_ok;		/* 0x3C */
    185  1.1  onoe 	u_int32_t		an_tx_ack_ok;		/* 0x40 */
    186  1.1  onoe 	u_int32_t		an_tx_rts_ok;		/* 0x44 */
    187  1.1  onoe 	u_int32_t		an_tx_cts_ok;		/* 0x48 */
    188  1.1  onoe 	u_int32_t		an_tx_lmac_mcasts;	/* 0x4C */
    189  1.1  onoe 	u_int32_t		an_tx_lmac_bcasts;	/* 0x50 */
    190  1.1  onoe 	u_int32_t		an_tx_lmac_ucast_frags;	/* 0x54 */
    191  1.1  onoe 	u_int32_t		an_tx_lmac_ucasts;	/* 0x58 */
    192  1.1  onoe 	u_int32_t		an_tx_beacons;		/* 0x5C */
    193  1.1  onoe 	u_int32_t		an_rx_beacons;		/* 0x60 */
    194  1.1  onoe 	u_int32_t		an_tx_single_cols;	/* 0x64 */
    195  1.1  onoe 	u_int32_t		an_tx_multi_cols;	/* 0x68 */
    196  1.1  onoe 	u_int32_t		an_tx_defers_no;	/* 0x6C */
    197  1.1  onoe 	u_int32_t		an_tx_defers_prot;	/* 0x70 */
    198  1.1  onoe 	u_int32_t		an_tx_defers_energy;	/* 0x74 */
    199  1.1  onoe 	u_int32_t		an_rx_dups;		/* 0x78 */
    200  1.1  onoe 	u_int32_t		an_rx_partial;		/* 0x7C */
    201  1.1  onoe 	u_int32_t		an_tx_too_old;		/* 0x80 */
    202  1.1  onoe 	u_int32_t		an_rx_too_old;		/* 0x84 */
    203  1.1  onoe 	u_int32_t		an_lostsync_max_retries;/* 0x88 */
    204  1.1  onoe 	u_int32_t		an_lostsync_missed_beacons;/* 0x8C */
    205  1.1  onoe 	u_int32_t		an_lostsync_arl_exceeded;/*0x90 */
    206  1.1  onoe 	u_int32_t		an_lostsync_deauthed;	/* 0x94 */
    207  1.1  onoe 	u_int32_t		an_lostsync_disassociated;/*0x98 */
    208  1.1  onoe 	u_int32_t		an_lostsync_tsf_timing;	/* 0x9C */
    209  1.1  onoe 	u_int32_t		an_tx_host_mcasts;	/* 0xA0 */
    210  1.1  onoe 	u_int32_t		an_tx_host_bcasts;	/* 0xA4 */
    211  1.1  onoe 	u_int32_t		an_tx_host_ucasts;	/* 0xA8 */
    212  1.1  onoe 	u_int32_t		an_tx_host_failed;	/* 0xAC */
    213  1.1  onoe 	u_int32_t		an_rx_host_mcasts;	/* 0xB0 */
    214  1.1  onoe 	u_int32_t		an_rx_host_bcasts;	/* 0xB4 */
    215  1.1  onoe 	u_int32_t		an_rx_host_ucasts;	/* 0xB8 */
    216  1.1  onoe 	u_int32_t		an_rx_host_discarded;	/* 0xBC */
    217  1.1  onoe 	u_int32_t		an_tx_hmac_mcasts;	/* 0xC0 */
    218  1.1  onoe 	u_int32_t		an_tx_hmac_bcasts;	/* 0xC4 */
    219  1.1  onoe 	u_int32_t		an_tx_hmac_ucasts;	/* 0xC8 */
    220  1.1  onoe 	u_int32_t		an_tx_hmac_failed;	/* 0xCC */
    221  1.1  onoe 	u_int32_t		an_rx_hmac_mcasts;	/* 0xD0 */
    222  1.1  onoe 	u_int32_t		an_rx_hmac_bcasts;	/* 0xD4 */
    223  1.1  onoe 	u_int32_t		an_rx_hmac_ucasts;	/* 0xD8 */
    224  1.1  onoe 	u_int32_t		an_rx_hmac_discarded;	/* 0xDC */
    225  1.1  onoe 	u_int32_t		an_tx_hmac_accepted;	/* 0xE0 */
    226  1.1  onoe 	u_int32_t		an_ssid_mismatches;	/* 0xE4 */
    227  1.1  onoe 	u_int32_t		an_ap_mismatches;	/* 0xE8 */
    228  1.1  onoe 	u_int32_t		an_rates_mismatches;	/* 0xEC */
    229  1.1  onoe 	u_int32_t		an_auth_rejects;	/* 0xF0 */
    230  1.1  onoe 	u_int32_t		an_auth_timeouts;	/* 0xF4 */
    231  1.1  onoe 	u_int32_t		an_assoc_rejects;	/* 0xF8 */
    232  1.1  onoe 	u_int32_t		an_assoc_timeouts;	/* 0xFC */
    233  1.1  onoe 	u_int32_t		an_reason_outside_table;/* 0x100 */
    234  1.1  onoe 	u_int32_t		an_reason1;		/* 0x104 */
    235  1.1  onoe 	u_int32_t		an_reason2;		/* 0x108 */
    236  1.1  onoe 	u_int32_t		an_reason3;		/* 0x10C */
    237  1.1  onoe 	u_int32_t		an_reason4;		/* 0x110 */
    238  1.1  onoe 	u_int32_t		an_reason5;		/* 0x114 */
    239  1.1  onoe 	u_int32_t		an_reason6;		/* 0x118 */
    240  1.1  onoe 	u_int32_t		an_reason7;		/* 0x11C */
    241  1.1  onoe 	u_int32_t		an_reason8;		/* 0x120 */
    242  1.1  onoe 	u_int32_t		an_reason9;		/* 0x124 */
    243  1.1  onoe 	u_int32_t		an_reason10;		/* 0x128 */
    244  1.1  onoe 	u_int32_t		an_reason11;		/* 0x12C */
    245  1.1  onoe 	u_int32_t		an_reason12;		/* 0x130 */
    246  1.1  onoe 	u_int32_t		an_reason13;		/* 0x134 */
    247  1.1  onoe 	u_int32_t		an_reason14;		/* 0x138 */
    248  1.1  onoe 	u_int32_t		an_reason15;		/* 0x13C */
    249  1.1  onoe 	u_int32_t		an_reason16;		/* 0x140 */
    250  1.1  onoe 	u_int32_t		an_reason17;		/* 0x144 */
    251  1.1  onoe 	u_int32_t		an_reason18;		/* 0x148 */
    252  1.1  onoe 	u_int32_t		an_reason19;		/* 0x14C */
    253  1.1  onoe 	u_int32_t		an_rx_mgmt_pkts;	/* 0x150 */
    254  1.1  onoe 	u_int32_t		an_tx_mgmt_pkts;	/* 0x154 */
    255  1.1  onoe 	u_int32_t		an_rx_refresh_pkts;	/* 0x158 */
    256  1.1  onoe 	u_int32_t		an_tx_refresh_pkts;	/* 0x15C */
    257  1.1  onoe 	u_int32_t		an_rx_poll_pkts;	/* 0x160 */
    258  1.1  onoe 	u_int32_t		an_tx_poll_pkts;	/* 0x164 */
    259  1.1  onoe 	u_int32_t		an_host_retries;	/* 0x168 */
    260  1.1  onoe 	u_int32_t		an_lostsync_hostreq;	/* 0x16C */
    261  1.1  onoe 	u_int32_t		an_host_tx_bytes;	/* 0x170 */
    262  1.1  onoe 	u_int32_t		an_host_rx_bytes;	/* 0x174 */
    263  1.1  onoe 	u_int32_t		an_uptime_usecs;	/* 0x178 */
    264  1.1  onoe 	u_int32_t		an_uptime_secs;		/* 0x17C */
    265  1.1  onoe 	u_int32_t		an_lostsync_better_ap;	/* 0x180 */
    266  1.1  onoe 	u_int32_t		an_rsvd[10];
    267  1.1  onoe };
    268  1.1  onoe 
    269  1.1  onoe struct an_ltv_genconfig {
    270  1.1  onoe 	/* General configuration. */
    271  1.1  onoe 	u_int16_t		an_len;			/* 0x00 */
    272  1.1  onoe 	u_int16_t		an_type;		/* XXXX */
    273  1.1  onoe 	u_int16_t		an_opmode;		/* 0x02 */
    274  1.1  onoe 	u_int16_t		an_rxmode;		/* 0x04 */
    275  1.1  onoe 	u_int16_t		an_fragthresh;		/* 0x06 */
    276  1.1  onoe 	u_int16_t		an_rtsthresh;		/* 0x08 */
    277  1.1  onoe 	u_int8_t		an_macaddr[6];		/* 0x0A */
    278  1.1  onoe 	u_int8_t		an_rates[8];		/* 0x10 */
    279  1.1  onoe 	u_int16_t		an_shortretry_limit;	/* 0x18 */
    280  1.1  onoe 	u_int16_t		an_longretry_limit;	/* 0x1A */
    281  1.1  onoe 	u_int16_t		an_tx_msdu_lifetime;	/* 0x1C */
    282  1.1  onoe 	u_int16_t		an_rx_msdu_lifetime;	/* 0x1E */
    283  1.1  onoe 	u_int16_t		an_stationary;		/* 0x20 */
    284  1.1  onoe 	u_int16_t		an_ordering;		/* 0x22 */
    285  1.1  onoe 	u_int16_t		an_devtype;		/* 0x24 */
    286  1.1  onoe 	u_int16_t		an_rsvd0[5];		/* 0x26 */
    287  1.1  onoe 	/* Scanning associating. */
    288  1.1  onoe 	u_int16_t		an_scanmode;		/* 0x30 */
    289  1.1  onoe 	u_int16_t		an_probedelay;		/* 0x32 */
    290  1.1  onoe 	u_int16_t		an_probe_energy_timeout;/* 0x34 */
    291  1.1  onoe 	u_int16_t		an_probe_response_timeout;/*0x36 */
    292  1.1  onoe 	u_int16_t		an_beacon_listen_timeout;/*0x38 */
    293  1.1  onoe 	u_int16_t		an_ibss_join_net_timeout;/*0x3A */
    294  1.1  onoe 	u_int16_t		an_auth_timeout;	/* 0x3C */
    295  1.1  onoe 	u_int16_t		an_authtype;		/* 0x3E */
    296  1.1  onoe 	u_int16_t		an_assoc_timeout;	/* 0x40 */
    297  1.1  onoe 	u_int16_t		an_specified_ap_timeout;/* 0x42 */
    298  1.1  onoe 	u_int16_t		an_offline_scan_interval;/*0x44 */
    299  1.1  onoe 	u_int16_t		an_offline_scan_duration;/*0x46 */
    300  1.1  onoe 	u_int16_t		an_link_loss_delay;	/* 0x48 */
    301  1.1  onoe 	u_int16_t		an_max_beacon_lost_time;/* 0x4A */
    302  1.1  onoe 	u_int16_t		an_refresh_interval;	/* 0x4C */
    303  1.1  onoe 	u_int16_t		an_rsvd1;		/* 0x4E */
    304  1.1  onoe 	/* Power save operation */
    305  1.1  onoe 	u_int16_t		an_psave_mode;		/* 0x50 */
    306  1.1  onoe 	u_int16_t		an_sleep_for_dtims;	/* 0x52 */
    307  1.1  onoe 	u_int16_t		an_listen_interval;	/* 0x54 */
    308  1.1  onoe 	u_int16_t		an_fast_listen_interval;/* 0x56 */
    309  1.1  onoe 	u_int16_t		an_listen_decay;	/* 0x58 */
    310  1.1  onoe 	u_int16_t		an_fast_listen_decay;	/* 0x5A */
    311  1.1  onoe 	u_int16_t		an_rsvd2[2];		/* 0x5C */
    312  1.1  onoe 	/* Ad-hoc (or AP) operation. */
    313  1.1  onoe 	u_int16_t		an_beacon_period;	/* 0x60 */
    314  1.1  onoe 	u_int16_t		an_atim_duration;	/* 0x62 */
    315  1.1  onoe 	u_int16_t		an_rsvd3;		/* 0x64 */
    316  1.1  onoe 	u_int16_t		an_ds_channel;		/* 0x66 */
    317  1.1  onoe 	u_int16_t		an_rsvd4;		/* 0x68 */
    318  1.1  onoe 	u_int16_t		an_dtim_period;		/* 0x6A */
    319  1.1  onoe 	u_int16_t		an_rsvd5[2];		/* 0x6C */
    320  1.1  onoe 	/* Radio operation. */
    321  1.1  onoe 	u_int16_t		an_radiotype;		/* 0x70 */
    322  1.1  onoe 	u_int16_t		an_diversity;		/* 0x72 */
    323  1.1  onoe 	u_int16_t		an_tx_power;		/* 0x74 */
    324  1.1  onoe 	u_int16_t		an_rss_thresh;		/* 0x76 */
    325  1.1  onoe 	u_int16_t		an_modulation_type;	/* 0x78 */
    326  1.1  onoe 	u_int16_t		an_short_preamble;	/* 0x7A */
    327  1.1  onoe 	u_int16_t		an_home_product;	/* 0x7C */
    328  1.1  onoe 	u_int16_t		an_rsvd6;		/* 0x7E */
    329  1.1  onoe 	/* Aironet extensions. */
    330  1.1  onoe 	u_int8_t		an_nodename[16];	/* 0x80 */
    331  1.1  onoe 	u_int16_t		an_arl_thresh;		/* 0x90 */
    332  1.1  onoe 	u_int16_t		an_arl_decay;		/* 0x92 */
    333  1.1  onoe 	u_int16_t		an_arl_delay;		/* 0x94 */
    334  1.1  onoe 	u_int8_t		an_rsvd7;		/* 0x96 */
    335  1.1  onoe 	u_int8_t		an_rsvd8;		/* 0x97 */
    336  1.1  onoe 	u_int8_t		an_magic_packet_action;	/* 0x98 */
    337  1.1  onoe 	u_int8_t		an_magic_packet_ctl;	/* 0x99 */
    338  1.1  onoe 	u_int16_t		an_rsvd9;
    339  1.1  onoe };
    340  1.1  onoe 
    341  1.1  onoe #define AN_OPMODE_IBSS_ADHOC			0x0000
    342  1.1  onoe #define AN_OPMODE_INFRASTRUCTURE_STATION	0x0001
    343  1.1  onoe #define AN_OPMODE_AP				0x0002
    344  1.1  onoe #define AN_OPMODE_AP_REPEATER			0x0003
    345  1.1  onoe #define AN_OPMODE_UNMODIFIED_PAYLOAD		0x0100
    346  1.1  onoe #define AN_OPMODE_AIRONET_EXTENSIONS		0x0200
    347  1.1  onoe #define AN_OPMODE_AP_EXTENSIONS			0x0400
    348  1.1  onoe 
    349  1.1  onoe #define AN_RXMODE_BC_MC_ADDR			0x0000
    350  1.1  onoe #define AN_RXMODE_BC_ADDR			0x0001
    351  1.1  onoe #define AN_RXMODE_ADDR				0x0002
    352  1.1  onoe #define AN_RXMODE_80211_MONITOR_CURBSS		0x0003
    353  1.1  onoe #define AN_RXMODE_80211_MONITOR_ANYBSS		0x0004
    354  1.1  onoe #define AN_RXMODE_LAN_MONITOR_CURBSS		0x0005
    355  1.1  onoe #define AN_RXMODE_NO_8023_HEADER		0x0100
    356  1.1  onoe 
    357  1.1  onoe #define AN_RATE_1MBPS				0x0002
    358  1.1  onoe #define AN_RATE_2MBPS				0x0004
    359  1.1  onoe #define AN_RATE_5_5MBPS				0x000B
    360  1.1  onoe #define AN_RATE_11MBPS				0x0016
    361  1.1  onoe 
    362  1.1  onoe #define AN_DEVTYPE_PC4500			0x0065
    363  1.1  onoe #define AN_DEVTYPE_PC4800			0x006D
    364  1.1  onoe 
    365  1.1  onoe #define AN_SCANMODE_ACTIVE			0x0000
    366  1.1  onoe #define AN_SCANMODE_PASSIVE			0x0001
    367  1.1  onoe #define AN_SCANMODE_AIRONET_ACTIVE		0x0002
    368  1.1  onoe 
    369  1.1  onoe #define AN_AUTHTYPE_NONE			0x0000
    370  1.1  onoe #define AN_AUTHTYPE_OPEN			0x0001
    371  1.1  onoe #define AN_AUTHTYPE_SHAREDKEY			0x0002
    372  1.1  onoe #define AN_AUTHTYPE_EXCLUDE_UNENCRYPTED		0x0004
    373  1.1  onoe #define AN_AUTHTYPE_MASK                        0x00ff
    374  1.1  onoe #define AN_AUTHTYPE_ENABLE			0x0100
    375  1.1  onoe 
    376  1.1  onoe #define AN_PSAVE_NONE				0x0000
    377  1.1  onoe #define AN_PSAVE_CAM				0x0001
    378  1.1  onoe #define AN_PSAVE_PSP				0x0002
    379  1.1  onoe #define AN_PSAVE_PSP_CAM			0x0003
    380  1.1  onoe 
    381  1.1  onoe #define AN_RADIOTYPE_80211_FH			0x0001
    382  1.1  onoe #define AN_RADIOTYPE_80211_DS			0x0002
    383  1.1  onoe #define AN_RADIOTYPE_LM2000_DS			0x0004
    384  1.1  onoe 
    385  1.1  onoe #define AN_DIVERSITY_FACTORY_DEFAULT		0x0000
    386  1.1  onoe #define AN_DIVERSITY_ANTENNA_1_ONLY		0x0001
    387  1.1  onoe #define AN_DIVERSITY_ANTENNA_2_ONLY		0x0002
    388  1.1  onoe #define AN_DIVERSITY_ANTENNA_1_AND_2		0x0003
    389  1.1  onoe 
    390  1.1  onoe #define AN_TXPOWER_FACTORY_DEFAULT		0x0000
    391  1.1  onoe #define AN_TXPOWER_50MW				50
    392  1.1  onoe #define AN_TXPOWER_100MW			100
    393  1.1  onoe #define AN_TXPOWER_250MW			250
    394  1.1  onoe 
    395  1.1  onoe struct an_ltv_ssidlist {
    396  1.1  onoe 	u_int16_t		an_len;
    397  1.1  onoe 	u_int16_t		an_type;
    398  1.1  onoe 	u_int16_t		an_ssid1_len;
    399  1.1  onoe 	char			an_ssid1[32];
    400  1.1  onoe 	u_int16_t		an_ssid2_len;
    401  1.1  onoe 	char			an_ssid2[32];
    402  1.1  onoe 	u_int16_t		an_ssid3_len;
    403  1.1  onoe 	char			an_ssid3[32];
    404  1.1  onoe };
    405  1.1  onoe 
    406  1.1  onoe struct an_ltv_aplist {
    407  1.1  onoe 	u_int16_t		an_len;
    408  1.1  onoe 	u_int16_t		an_type;
    409  1.1  onoe 	u_int8_t		an_ap1[8];
    410  1.1  onoe 	u_int8_t		an_ap2[8];
    411  1.1  onoe 	u_int8_t		an_ap3[8];
    412  1.1  onoe 	u_int8_t		an_ap4[8];
    413  1.1  onoe };
    414  1.1  onoe 
    415  1.1  onoe struct an_ltv_drvname {
    416  1.1  onoe 	u_int16_t		an_len;
    417  1.1  onoe 	u_int16_t		an_type;
    418  1.1  onoe 	u_int8_t		an_drvname[16];
    419  1.1  onoe };
    420  1.1  onoe 
    421  1.1  onoe struct an_rid_encap {
    422  1.1  onoe 	u_int16_t		an_len;
    423  1.1  onoe 	u_int16_t		an_type;
    424  1.1  onoe 	u_int16_t		an_ethertype_default;
    425  1.1  onoe 	u_int16_t		an_action_default;
    426  1.1  onoe 	u_int16_t		an_ethertype0;
    427  1.1  onoe 	u_int16_t		an_action0;
    428  1.1  onoe 	u_int16_t		an_ethertype1;
    429  1.1  onoe 	u_int16_t		an_action1;
    430  1.1  onoe 	u_int16_t		an_ethertype2;
    431  1.1  onoe 	u_int16_t		an_action2;
    432  1.1  onoe 	u_int16_t		an_ethertype3;
    433  1.1  onoe 	u_int16_t		an_action3;
    434  1.1  onoe 	u_int16_t		an_ethertype4;
    435  1.1  onoe 	u_int16_t		an_action4;
    436  1.1  onoe 	u_int16_t		an_ethertype5;
    437  1.1  onoe 	u_int16_t		an_action5;
    438  1.1  onoe 	u_int16_t		an_ethertype6;
    439  1.1  onoe 	u_int16_t		an_action6;
    440  1.1  onoe };
    441  1.1  onoe 
    442  1.1  onoe #define AN_ENCAP_ACTION_RX	0x0001
    443  1.1  onoe #define AN_ENCAP_ACTION_TX	0x0002
    444  1.1  onoe 
    445  1.1  onoe #define AN_RXENCAP_NONE		0x0000
    446  1.1  onoe #define AN_RXENCAP_RFC1024	0x0001
    447  1.1  onoe 
    448  1.1  onoe #define AN_TXENCAP_RFC1024	0x0000
    449  1.1  onoe #define AN_TXENCAP_80211	0x0002
    450  1.1  onoe 
    451  1.1  onoe struct an_ltv_caps {
    452  1.1  onoe 	u_int16_t		an_len;			/* 0x00 */
    453  1.1  onoe 	u_int16_t		an_type;		/* XXXX */
    454  1.1  onoe 	u_int8_t		an_oui[3];		/* 0x02 */
    455  1.1  onoe 	u_int8_t		an_rsvd0;		/* 0x05 */
    456  1.1  onoe 	u_int16_t		an_prodnum;		/* 0x06 */
    457  1.1  onoe 	u_int8_t		an_manufname[32];	/* 0x08 */
    458  1.1  onoe 	u_int8_t		an_prodname[16];	/* 0x28 */
    459  1.1  onoe 	u_int8_t		an_prodvers[8];		/* 0x38 */
    460  1.1  onoe 	u_int8_t		an_oemaddr[6];		/* 0x40 */
    461  1.1  onoe 	u_int8_t		an_aironetaddr[6];	/* 0x46 */
    462  1.1  onoe 	u_int16_t		an_radiotype;		/* 0x4C */
    463  1.1  onoe 	u_int16_t		an_regdomain;		/* 0x4E */
    464  1.1  onoe 	u_int8_t		an_callid[6];		/* 0x50 */
    465  1.1  onoe 	u_int8_t		an_rates[8];		/* 0x56 */
    466  1.1  onoe 	u_int8_t		an_rx_diversity;	/* 0x5E */
    467  1.1  onoe 	u_int8_t		an_tx_diversity;	/* 0x5F */
    468  1.1  onoe 	u_int16_t		an_tx_powerlevels[8];	/* 0x60 */
    469  1.1  onoe 	u_int16_t		an_hwrev;		/* 0x70 */
    470  1.1  onoe 	u_int16_t		an_hwcaps;		/* 0x72 */
    471  1.1  onoe 	u_int16_t		an_temprange;		/* 0x74 */
    472  1.1  onoe 	u_int16_t		an_fwrev;		/* 0x76 */
    473  1.1  onoe 	u_int16_t		an_fwsubrev;		/* 0x78 */
    474  1.1  onoe 	u_int16_t		an_ifacerev;		/* 0x7A */
    475  1.1  onoe 	u_int16_t		an_softcaps;		/* 0x7C */
    476  1.1  onoe 	u_int16_t		an_bootblockrev;	/* 0x7E */
    477  1.1  onoe 	u_int16_t		an_req_hw_support;	/* 0x80 */
    478  1.1  onoe };
    479  1.1  onoe 
    480  1.1  onoe struct an_ltv_apinfo {
    481  1.1  onoe 	u_int16_t		an_len;
    482  1.1  onoe 	u_int16_t		an_type;
    483  1.1  onoe 	u_int16_t		an_tim_addr;
    484  1.1  onoe 	u_int16_t		an_airo_addr;
    485  1.1  onoe };
    486  1.1  onoe 
    487  1.1  onoe struct an_ltv_radioinfo {
    488  1.1  onoe 	u_int16_t		an_len;
    489  1.1  onoe 	u_int16_t		an_type;
    490  1.1  onoe 	/* ??? */
    491  1.1  onoe };
    492  1.1  onoe 
    493  1.1  onoe struct an_ltv_status {
    494  1.1  onoe 	u_int16_t		an_len;			/* 0x00 */
    495  1.1  onoe 	u_int16_t		an_type;		/* 0xXX */
    496  1.1  onoe 	u_int8_t		an_macaddr[6];		/* 0x02 */
    497  1.1  onoe 	u_int16_t		an_opmode;		/* 0x08 */
    498  1.1  onoe 	u_int16_t		an_errcode;		/* 0x0A */
    499  1.1  onoe 	u_int16_t		an_cur_signal_strength;	/* 0x0C */
    500  1.1  onoe 	u_int16_t		an_ssidlen;		/* 0x0E */
    501  1.1  onoe 	u_int8_t		an_ssid[32];		/* 0x10 */
    502  1.1  onoe 	u_int8_t		an_ap_name[16];		/* 0x30 */
    503  1.1  onoe 	u_int8_t		an_cur_bssid[6];	/* 0x40 */
    504  1.1  onoe 	u_int8_t		an_prev_bssid1[6];	/* 0x46 */
    505  1.1  onoe 	u_int8_t		an_prev_bssid2[6];	/* 0x4C */
    506  1.1  onoe 	u_int8_t		an_prev_bssid3[6];	/* 0x52 */
    507  1.1  onoe 	u_int16_t		an_beacon_period;	/* 0x58 */
    508  1.1  onoe 	u_int16_t		an_dtim_period;		/* 0x5A */
    509  1.1  onoe 	u_int16_t		an_atim_duration;	/* 0x5C */
    510  1.1  onoe 	u_int16_t		an_hop_period;		/* 0x5E */
    511  1.1  onoe 	u_int16_t		an_cur_channel;		/* 0x62 */
    512  1.1  onoe 	u_int16_t		an_channel_set;		/* 0x60 */
    513  1.1  onoe 	u_int16_t		an_hops_to_backbone;	/* 0x64 */
    514  1.1  onoe 	u_int16_t		an_ap_total_load;	/* 0x66 */
    515  1.1  onoe 	u_int16_t		an_our_generated_load;	/* 0x68 */
    516  1.1  onoe 	u_int16_t		an_accumulated_arl;	/* 0x6A */
    517  1.1  onoe 	u_int16_t		an_cur_signal_quality;	/* 0x6C */
    518  1.1  onoe 	u_int16_t		an_current_tx_rate;	/* 0x6E */
    519  1.1  onoe 	u_int16_t		an_ap_device;		/* 0x70 */
    520  1.1  onoe 	u_int16_t		an_normalized_rssi;	/* 0x72 */
    521  1.1  onoe 	u_int16_t		an_short_pre_in_use;	/* 0x74 */
    522  1.1  onoe 	u_int8_t		an_ap_ip_addr[4];	/* 0x76 */
    523  1.1  onoe 	u_int16_t		an_max_noise_prev_sec;	/* 0x7A */
    524  1.1  onoe 	u_int16_t		an_avg_noise_prev_min;	/* 0x7C */
    525  1.1  onoe 	u_int16_t		an_max_noise_prev_min;	/* 0x7E */
    526  1.1  onoe 	u_int16_t		an_spare[2];
    527  1.1  onoe };
    528  1.1  onoe 
    529  1.1  onoe #define AN_STATUS_OPMODE_CONFIGURED		0x0001
    530  1.1  onoe #define AN_STATUS_OPMODE_MAC_ENABLED		0x0002
    531  1.1  onoe #define AN_STATUS_OPMODE_RX_ENABLED		0x0004
    532  1.1  onoe #define AN_STATUS_OPMODE_IN_SYNC		0x0010
    533  1.1  onoe #define AN_STATUS_OPMODE_ASSOCIATED		0x0020
    534  1.1  onoe #define AN_STATUS_OPMODE_ERROR			0x8000
    535  1.1  onoe 
    536  1.1  onoe struct an_ltv_wepkey {
    537  1.1  onoe 	u_int16_t		an_len;			/* 0x00 */
    538  1.1  onoe 	u_int16_t		an_type;		/* 0xXX */
    539  1.1  onoe 	u_int16_t		an_key_index;		/* 0x02 */
    540  1.1  onoe 	u_int8_t		an_mac_addr[6];		/* 0x04 */
    541  1.1  onoe 	u_int16_t		an_key_len;		/* 0x0A */
    542  1.1  onoe 	u_int8_t		an_key[13];		/* 0x0C */
    543  1.1  onoe };
    544  1.1  onoe 
    545  1.1  onoe /*
    546  1.1  onoe  * These are all the LTV record types that we can read or write
    547  1.1  onoe  * from the Aironet. Not all of them are temendously useful, but I
    548  1.1  onoe  * list as many as I know about here for completeness.
    549  1.1  onoe  */
    550  1.1  onoe 
    551  1.1  onoe /*
    552  1.1  onoe  * Configuration (read/write)
    553  1.1  onoe  */
    554  1.1  onoe #define AN_RID_GENCONFIG	0xFF10	/* General configuration info */
    555  1.1  onoe #define AN_RID_SSIDLIST		0xFF11	/* Valid SSID list */
    556  1.1  onoe #define AN_RID_APLIST		0xFF12	/* Valid AP list */
    557  1.1  onoe #define AN_RID_DRVNAME		0xFF13	/* ID name of this node for diag */
    558  1.1  onoe #define AN_RID_ENCAPPROTO	0xFF14	/* Payload encapsulation type */
    559  1.1  onoe #define AN_RID_WEP_TEMP	        0xFF15  /* Temporary Key */
    560  1.1  onoe #define AN_RID_WEP_PERM	        0xFF16  /* Perminant Key */
    561  1.1  onoe #define AN_RID_ACTUALCFG	0xFF20	/* Current configuration settings */
    562  1.1  onoe #define AN_RID_WEP_VOLATILE	0xFF15	/* Volatile WEP Key */
    563  1.1  onoe #define AN_RID_WEP_PERSISTENT	0xFF16	/* Persistent WEP Key */
    564  1.1  onoe 
    565  1.1  onoe /*
    566  1.1  onoe  * Reporting (read only)
    567  1.1  onoe  */
    568  1.1  onoe #define AN_RID_CAPABILITIES	0xFF00	/* PC 4500/4800 capabilities */
    569  1.1  onoe #define AN_RID_AP_INFO		0xFF01	/* Access point info */
    570  1.1  onoe #define AN_RID_RADIO_INFO	0xFF02	/* Radio info */
    571  1.1  onoe #define AN_RID_STATUS		0xFF50	/* Current status info */
    572  1.1  onoe 
    573  1.1  onoe /*
    574  1.1  onoe  * Statistics
    575  1.1  onoe  */
    576  1.1  onoe #define AN_RID_16BITS_CUM	0xFF60	/* Cumulative 16-bit stats counters */
    577  1.1  onoe #define AN_RID_16BITS_DELTA	0xFF61	/* 16-bit stats (since last clear) */
    578  1.1  onoe #define AN_RID_16BITS_DELTACLR	0xFF62	/* 16-bit stats, clear on read */
    579  1.1  onoe #define AN_RID_32BITS_CUM	0xFF68	/* Cumulative 32-bit stats counters */
    580  1.1  onoe #define AN_RID_32BITS_DELTA	0xFF69	/* 32-bit stats (since last clear) */
    581  1.1  onoe #define AN_RID_32BITS_DELTACLR	0xFF6A	/* 32-bit stats, clear on read */
    582  1.1  onoe #endif
    583  1.1  onoe 
    584  1.1  onoe 
    585  1.1  onoe #endif
    586