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