Home | History | Annotate | Line # | Download | only in net80211
ieee80211_ioctl.h revision 1.1.1.3
      1      1.1  dyoung /*-
      2      1.1  dyoung  * Copyright (c) 2001 Atsushi Onoe
      3      1.1  dyoung  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
      4      1.1  dyoung  * All rights reserved.
      5      1.1  dyoung  *
      6      1.1  dyoung  * Redistribution and use in source and binary forms, with or without
      7      1.1  dyoung  * modification, are permitted provided that the following conditions
      8      1.1  dyoung  * are met:
      9      1.1  dyoung  * 1. Redistributions of source code must retain the above copyright
     10      1.1  dyoung  *    notice, this list of conditions and the following disclaimer.
     11      1.1  dyoung  * 2. Redistributions in binary form must reproduce the above copyright
     12      1.1  dyoung  *    notice, this list of conditions and the following disclaimer in the
     13      1.1  dyoung  *    documentation and/or other materials provided with the distribution.
     14      1.1  dyoung  * 3. The name of the author may not be used to endorse or promote products
     15      1.1  dyoung  *    derived from this software without specific prior written permission.
     16      1.1  dyoung  *
     17      1.1  dyoung  * Alternatively, this software may be distributed under the terms of the
     18      1.1  dyoung  * GNU General Public License ("GPL") version 2 as published by the Free
     19      1.1  dyoung  * Software Foundation.
     20      1.1  dyoung  *
     21      1.1  dyoung  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22      1.1  dyoung  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23      1.1  dyoung  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24      1.1  dyoung  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25      1.1  dyoung  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26      1.1  dyoung  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27      1.1  dyoung  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28      1.1  dyoung  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29      1.1  dyoung  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30      1.1  dyoung  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31      1.1  dyoung  *
     32  1.1.1.3  dyoung  * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.5 2004/03/30 22:57:57 sam Exp $
     33      1.1  dyoung  */
     34      1.1  dyoung #ifndef _NET80211_IEEE80211_IOCTL_H_
     35      1.1  dyoung #define _NET80211_IEEE80211_IOCTL_H_
     36      1.1  dyoung 
     37      1.1  dyoung /*
     38      1.1  dyoung  * IEEE 802.11 ioctls.
     39      1.1  dyoung  */
     40      1.1  dyoung 
     41  1.1.1.2  dyoung struct ieee80211_stats {
     42  1.1.1.2  dyoung 	u_int32_t	is_rx_badversion;	/* rx frame with bad version */
     43  1.1.1.2  dyoung 	u_int32_t	is_rx_tooshort;		/* rx frame too short */
     44  1.1.1.2  dyoung 	u_int32_t	is_rx_wrongbss;		/* rx from wrong bssid */
     45  1.1.1.2  dyoung 	u_int32_t	is_rx_dup;		/* rx discard 'cuz dup */
     46  1.1.1.2  dyoung 	u_int32_t	is_rx_wrongdir;		/* rx w/ wrong direction */
     47  1.1.1.2  dyoung 	u_int32_t	is_rx_mcastecho;	/* rx discard 'cuz mcast echo */
     48  1.1.1.2  dyoung 	u_int32_t	is_rx_notassoc;		/* rx discard 'cuz sta !assoc */
     49  1.1.1.2  dyoung 	u_int32_t	is_rx_nowep;		/* rx w/ wep but wep !config */
     50  1.1.1.2  dyoung 	u_int32_t	is_rx_wepfail;		/* rx wep processing failed */
     51  1.1.1.2  dyoung 	u_int32_t	is_rx_decap;		/* rx decapsulation failed */
     52  1.1.1.2  dyoung 	u_int32_t	is_rx_mgtdiscard;	/* rx discard mgt frames */
     53  1.1.1.2  dyoung 	u_int32_t	is_rx_ctl;		/* rx discard ctrl frames */
     54  1.1.1.2  dyoung 	u_int32_t	is_rx_rstoobig;		/* rx rate set truncated */
     55  1.1.1.2  dyoung 	u_int32_t	is_rx_elem_missing;	/* rx required element missing*/
     56  1.1.1.2  dyoung 	u_int32_t	is_rx_elem_toobig;	/* rx element too big */
     57  1.1.1.2  dyoung 	u_int32_t	is_rx_elem_toosmall;	/* rx element too small */
     58  1.1.1.2  dyoung 	u_int32_t	is_rx_elem_unknown;	/* rx element unknown */
     59  1.1.1.2  dyoung 	u_int32_t	is_rx_badchan;		/* rx frame w/ invalid chan */
     60  1.1.1.2  dyoung 	u_int32_t	is_rx_chanmismatch;	/* rx frame chan mismatch */
     61  1.1.1.2  dyoung 	u_int32_t	is_rx_nodealloc;	/* rx frame dropped */
     62  1.1.1.2  dyoung 	u_int32_t	is_rx_ssidmismatch;	/* rx frame ssid mismatch  */
     63  1.1.1.2  dyoung 	u_int32_t	is_rx_auth_unsupported;	/* rx w/ unsupported auth alg */
     64  1.1.1.2  dyoung 	u_int32_t	is_rx_auth_fail;	/* rx sta auth failure */
     65  1.1.1.2  dyoung 	u_int32_t	is_rx_assoc_bss;	/* rx assoc from wrong bssid */
     66  1.1.1.2  dyoung 	u_int32_t	is_rx_assoc_notauth;	/* rx assoc w/o auth */
     67  1.1.1.2  dyoung 	u_int32_t	is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
     68  1.1.1.2  dyoung 	u_int32_t	is_rx_assoc_norate;	/* rx assoc w/ no rate match */
     69  1.1.1.2  dyoung 	u_int32_t	is_rx_deauth;		/* rx deauthentication */
     70  1.1.1.2  dyoung 	u_int32_t	is_rx_disassoc;		/* rx disassociation */
     71  1.1.1.2  dyoung 	u_int32_t	is_rx_badsubtype;	/* rx frame w/ unknown subtype*/
     72  1.1.1.2  dyoung 	u_int32_t	is_rx_nombuf;		/* rx failed for lack of mbuf */
     73  1.1.1.2  dyoung 	u_int32_t	is_rx_decryptcrc;	/* rx decrypt failed on crc */
     74  1.1.1.2  dyoung 	u_int32_t	is_rx_ahdemo_mgt;	/* rx discard ahdemo mgt frame*/
     75  1.1.1.2  dyoung 	u_int32_t	is_rx_bad_auth;		/* rx bad auth request */
     76  1.1.1.2  dyoung 	u_int32_t	is_tx_nombuf;		/* tx failed for lack of mbuf */
     77  1.1.1.2  dyoung 	u_int32_t	is_tx_nonode;		/* tx failed for no node */
     78  1.1.1.2  dyoung 	u_int32_t	is_tx_unknownmgt;	/* tx of unknown mgt frame */
     79  1.1.1.2  dyoung 	u_int32_t	is_scan_active;		/* active scans started */
     80  1.1.1.2  dyoung 	u_int32_t	is_scan_passive;	/* passive scans started */
     81  1.1.1.2  dyoung 	u_int32_t	is_node_timeout;	/* nodes timed out inactivity */
     82  1.1.1.2  dyoung 	u_int32_t	is_crypto_nomem;	/* no memory for crypto ctx */
     83  1.1.1.2  dyoung };
     84  1.1.1.2  dyoung 
     85      1.1  dyoung #ifdef __FreeBSD__
     86      1.1  dyoung /*
     87      1.1  dyoung  * FreeBSD-style ioctls.
     88      1.1  dyoung  */
     89      1.1  dyoung /* the first member must be matched with struct ifreq */
     90      1.1  dyoung struct ieee80211req {
     91      1.1  dyoung 	char		i_name[IFNAMSIZ];	/* if_name, e.g. "wi0" */
     92      1.1  dyoung 	u_int16_t	i_type;			/* req type */
     93      1.1  dyoung 	int16_t		i_val;			/* Index or simple value */
     94      1.1  dyoung 	int16_t		i_len;			/* Index or simple value */
     95      1.1  dyoung 	void		*i_data;		/* Extra data */
     96      1.1  dyoung };
     97      1.1  dyoung #define	SIOCS80211		 _IOW('i', 234, struct ieee80211req)
     98      1.1  dyoung #define	SIOCG80211		_IOWR('i', 235, struct ieee80211req)
     99      1.1  dyoung 
    100      1.1  dyoung #define IEEE80211_IOC_SSID		1
    101      1.1  dyoung #define IEEE80211_IOC_NUMSSIDS		2
    102      1.1  dyoung #define IEEE80211_IOC_WEP		3
    103      1.1  dyoung #define 	IEEE80211_WEP_NOSUP	-1
    104      1.1  dyoung #define 	IEEE80211_WEP_OFF	0
    105      1.1  dyoung #define 	IEEE80211_WEP_ON	1
    106      1.1  dyoung #define 	IEEE80211_WEP_MIXED	2
    107      1.1  dyoung #define IEEE80211_IOC_WEPKEY		4
    108      1.1  dyoung #define IEEE80211_IOC_NUMWEPKEYS	5
    109      1.1  dyoung #define IEEE80211_IOC_WEPTXKEY		6
    110      1.1  dyoung #define IEEE80211_IOC_AUTHMODE		7
    111      1.1  dyoung #define IEEE80211_IOC_STATIONNAME	8
    112      1.1  dyoung #define IEEE80211_IOC_CHANNEL		9
    113      1.1  dyoung #define IEEE80211_IOC_POWERSAVE		10
    114      1.1  dyoung #define 	IEEE80211_POWERSAVE_NOSUP	-1
    115      1.1  dyoung #define 	IEEE80211_POWERSAVE_OFF		0
    116      1.1  dyoung #define 	IEEE80211_POWERSAVE_CAM		1
    117      1.1  dyoung #define 	IEEE80211_POWERSAVE_PSP		2
    118      1.1  dyoung #define 	IEEE80211_POWERSAVE_PSP_CAM	3
    119      1.1  dyoung #define 	IEEE80211_POWERSAVE_ON		IEEE80211_POWERSAVE_CAM
    120      1.1  dyoung #define IEEE80211_IOC_POWERSAVESLEEP	11
    121  1.1.1.2  dyoung #define	IEEE80211_IOC_RTSTHRESHOLD	12
    122  1.1.1.3  dyoung #define IEEE80211_IOC_PROTMODE		13
    123  1.1.1.3  dyoung #define 	IEEE80211_PROTMODE_OFF		0
    124  1.1.1.3  dyoung #define 	IEEE80211_PROTMODE_CTS		1
    125  1.1.1.3  dyoung #define 	IEEE80211_PROTMODE_RTSCTS	2
    126  1.1.1.3  dyoung #define IEEE80211_IOC_TXPOWER		14
    127      1.1  dyoung 
    128      1.1  dyoung #ifndef IEEE80211_CHAN_ANY
    129      1.1  dyoung #define	IEEE80211_CHAN_ANY	0xffff		/* token for ``any channel'' */
    130      1.1  dyoung #endif
    131  1.1.1.2  dyoung 
    132  1.1.1.2  dyoung #define	SIOCG80211STATS		_IOWR('i', 236, struct ifreq)
    133      1.1  dyoung #endif /* __FreeBSD__ */
    134      1.1  dyoung 
    135      1.1  dyoung #endif /* _NET80211_IEEE80211_IOCTL_H_ */
    136