Home | History | Annotate | Line # | Download | only in net80211
ieee80211_sysctl.h revision 1.1.2.7
      1  1.1.2.7  christos /* $NetBSD: ieee80211_sysctl.h,v 1.1.2.7 2005/12/11 10:29:22 christos Exp $ */
      2  1.1.2.2     skrll /*-
      3  1.1.2.2     skrll  * Copyright (c) 2005 David Young.  All rights reserved.
      4  1.1.2.2     skrll  *
      5  1.1.2.2     skrll  * Redistribution and use in source and binary forms, with or
      6  1.1.2.2     skrll  * without modification, are permitted provided that the following
      7  1.1.2.2     skrll  * conditions are met:
      8  1.1.2.2     skrll  * 1. Redistributions of source code must retain the above copyright
      9  1.1.2.2     skrll  *    notice, this list of conditions and the following disclaimer.
     10  1.1.2.2     skrll  * 2. Redistributions in binary form must reproduce the above
     11  1.1.2.2     skrll  *    copyright notice, this list of conditions and the following
     12  1.1.2.2     skrll  *    disclaimer in the documentation and/or other materials provided
     13  1.1.2.2     skrll  *    with the distribution.
     14  1.1.2.2     skrll  * 3. The name of David Young may not be used to endorse or promote
     15  1.1.2.2     skrll  *    products derived from this software without specific prior
     16  1.1.2.2     skrll  *    written permission.
     17  1.1.2.2     skrll  *
     18  1.1.2.2     skrll  * THIS SOFTWARE IS PROVIDED BY David Young ``AS IS'' AND ANY
     19  1.1.2.2     skrll  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     20  1.1.2.2     skrll  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
     21  1.1.2.2     skrll  * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL David
     22  1.1.2.2     skrll  * Young BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     23  1.1.2.2     skrll  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
     24  1.1.2.2     skrll  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     25  1.1.2.2     skrll  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     26  1.1.2.2     skrll  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     27  1.1.2.2     skrll  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28  1.1.2.2     skrll  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
     29  1.1.2.2     skrll  * OF SUCH DAMAGE.
     30  1.1.2.2     skrll  */
     31  1.1.2.2     skrll #ifndef _NET80211_IEEE80211_SYSCTL_H_
     32  1.1.2.2     skrll #define _NET80211_IEEE80211_SYSCTL_H_
     33  1.1.2.2     skrll 
     34  1.1.2.6     skrll #include <net80211/_ieee80211.h>
     35  1.1.2.2     skrll 
     36  1.1.2.6     skrll /* sysctl(9) interface to net80211 client/peer records */
     37  1.1.2.2     skrll 
     38  1.1.2.2     skrll /* Name index, offset from net.link.ieee80211.node. */
     39  1.1.2.2     skrll 
     40  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_IF		0
     41  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_OP		1
     42  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_ARG		2
     43  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_TYPE		3
     44  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_ELTSIZE	4
     45  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAME_ELTCOUNT	5
     46  1.1.2.2     skrll #define	IEEE80211_SYSCTL_NODENAMELEN		6
     47  1.1.2.2     skrll 
     48  1.1.2.2     skrll /* Record type numbers. */
     49  1.1.2.2     skrll #define	IEEE80211_SYSCTL_T_NODE		0	/* client/peer record */
     50  1.1.2.2     skrll #define	IEEE80211_SYSCTL_T_RSSADAPT	1	/* rssadapt(9) record
     51  1.1.2.2     skrll 						 * (optional)
     52  1.1.2.2     skrll 						 */
     53  1.1.2.2     skrll #define	IEEE80211_SYSCTL_T_DRVSPEC	2	/* driver-specific record
     54  1.1.2.2     skrll 						 * (optional)
     55  1.1.2.2     skrll 						 */
     56  1.1.2.2     skrll 
     57  1.1.2.2     skrll #define	IEEE80211_SYSCTL_OP_ALL		0
     58  1.1.2.6     skrll 
     59  1.1.2.2     skrll /* Every record begins with this information. */
     60  1.1.2.2     skrll struct ieee80211_node_sysctlhdr {
     61  1.1.2.2     skrll /*00*/	u_int16_t	sh_ifindex;
     62  1.1.2.2     skrll /*02*/	u_int8_t	sh_macaddr[IEEE80211_ADDR_LEN];
     63  1.1.2.2     skrll /*08*/	u_int8_t	sh_bssid[IEEE80211_ADDR_LEN];
     64  1.1.2.2     skrll };
     65  1.1.2.2     skrll 
     66  1.1.2.2     skrll /* Exportable node. */
     67  1.1.2.2     skrll struct ieee80211_node_sysctl {
     68  1.1.2.2     skrll /*00*/	u_int16_t	ns_ifindex;
     69  1.1.2.2     skrll /*02*/	u_int8_t	ns_macaddr[IEEE80211_ADDR_LEN];
     70  1.1.2.2     skrll /*08*/	u_int8_t	ns_bssid[IEEE80211_ADDR_LEN];
     71  1.1.2.2     skrll /*0e*/	u_int16_t	ns_capinfo;	/* capabilities */
     72  1.1.2.2     skrll /*10*/	u_int32_t	ns_flags;	/* properties of this node,
     73  1.1.2.2     skrll 					 * IEEE80211_NODE_SYSCTL_F_*
     74  1.1.2.2     skrll 					 */
     75  1.1.2.2     skrll /*14*/	u_int16_t	ns_freq;
     76  1.1.2.2     skrll /*16*/	u_int16_t	ns_chanflags;
     77  1.1.2.2     skrll /*18*/	u_int16_t	ns_chanidx;
     78  1.1.2.2     skrll /*1a*/	u_int8_t	ns_rssi;	/* recv ssi */
     79  1.1.2.2     skrll /*1b*/	u_int8_t	ns_esslen;
     80  1.1.2.2     skrll /*1c*/	u_int8_t	ns_essid[IEEE80211_NWID_LEN];
     81  1.1.2.6     skrll /*3c*/	u_int8_t	ns_rsvd0;	/* reserved */
     82  1.1.2.2     skrll /*3d*/	u_int8_t	ns_erp;		/* 11g only */
     83  1.1.2.2     skrll /*3e*/	u_int16_t	ns_associd;	/* assoc response */
     84  1.1.2.2     skrll /*40*/	u_int32_t	ns_inact;	/* inactivity mark count */
     85  1.1.2.2     skrll /*44*/	u_int32_t	ns_rstamp;	/* recv timestamp */
     86  1.1.2.2     skrll /*48*/	struct ieee80211_rateset ns_rates;	/* negotiated rate set */
     87  1.1.2.2     skrll /*58*/	u_int16_t	ns_txrate;	/* index to ns_rates[] */
     88  1.1.2.2     skrll /*5a*/	u_int16_t	ns_intval;	/* beacon interval */
     89  1.1.2.2     skrll /*5c*/	u_int8_t	ns_tstamp[8];	/* from last rcv'd beacon */
     90  1.1.2.2     skrll /*64*/	u_int16_t	ns_txseq;	/* seq to be transmitted */
     91  1.1.2.2     skrll /*66*/	u_int16_t	ns_rxseq;	/* seq previous received */
     92  1.1.2.2     skrll /*68*/	u_int16_t	ns_fhdwell;	/* FH only */
     93  1.1.2.2     skrll /*6a*/	u_int8_t	ns_fhindex;	/* FH only */
     94  1.1.2.2     skrll /*6b*/	u_int8_t	ns_fails;	/* failure count to associate */
     95  1.1.2.2     skrll /*6c*/
     96  1.1.2.2     skrll #ifdef notyet
     97  1.1.2.2     skrll 	/* DTIM and contention free period (CFP) */
     98  1.1.2.2     skrll 	u_int8_t	ns_dtimperiod;
     99  1.1.2.2     skrll 	u_int8_t	ns_cfpperiod;	/* # of DTIMs between CFPs */
    100  1.1.2.2     skrll 	u_int16_t	ns_cfpduremain;	/* remaining cfp duration */
    101  1.1.2.2     skrll 	u_int16_t	ns_cfpmaxduration;/* max CFP duration in TU */
    102  1.1.2.2     skrll 	u_int16_t	ns_nextdtim;	/* time to next DTIM */
    103  1.1.2.2     skrll 	u_int16_t	ns_timoffset;
    104  1.1.2.2     skrll #endif
    105  1.1.2.2     skrll } __attribute__((__packed__));
    106  1.1.2.2     skrll 
    107  1.1.2.2     skrll #ifdef __NetBSD__
    108  1.1.2.6     skrll enum ieee80211_node_walk_state {
    109  1.1.2.6     skrll 	IEEE80211_WALK_BSS = 0,
    110  1.1.2.6     skrll 	IEEE80211_WALK_SCAN,
    111  1.1.2.6     skrll 	IEEE80211_WALK_STA
    112  1.1.2.6     skrll };
    113  1.1.2.6     skrll 
    114  1.1.2.2     skrll struct ieee80211_node_walk {
    115  1.1.2.6     skrll 	struct ieee80211com		*nw_ic;
    116  1.1.2.6     skrll 	struct ieee80211_node_table	*nw_nt;
    117  1.1.2.6     skrll 	struct ieee80211_node		*nw_ni;
    118  1.1.2.6     skrll 	u_short				nw_ifindex;
    119  1.1.2.2     skrll };
    120  1.1.2.2     skrll #endif /* __NetBSD__ */
    121  1.1.2.2     skrll 
    122  1.1.2.2     skrll #define	IEEE80211_NODE_SYSCTL_F_BSS	0x00000001	/* this node is the
    123  1.1.2.2     skrll 							 * ic->ic_bss
    124  1.1.2.2     skrll 							 */
    125  1.1.2.7  christos #define	IEEE80211_NODE_SYSCTL_F_STA	0x00000002	/* this node is in
    126  1.1.2.7  christos 							 * the neighbor/sta
    127  1.1.2.7  christos 							 * table
    128  1.1.2.7  christos 							 */
    129  1.1.2.7  christos #define	IEEE80211_NODE_SYSCTL_F_SCAN	0x00000004	/* this node is in
    130  1.1.2.7  christos 							 * the scan table
    131  1.1.2.7  christos 							 */
    132  1.1.2.7  christos #endif /* !_NET80211_IEEE80211_SYSCTL_H_ */
    133