[BACK]Return to ieee80211_sysctl.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / net80211

File: [cvs.NetBSD.org] / src / sys / net80211 / ieee80211_sysctl.h (download)

Revision 1.9, Mon Oct 19 23:19:39 2009 UTC (14 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, tls-maxphys-base-20171202, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, thorpej-ifq-base, thorpej-ifq, thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, thorpej-altq-separation-base, thorpej-altq-separation, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-freebsd-base, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, matt-premerge-20091211, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, localcount-20160914, khorben-n900, jym-xensuspend-nbase, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, cherry-xenmp-base, cherry-xenmp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-sunxi-drm-base, bouyer-sunxi-drm, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache, HEAD
Branch point for: phil-wifi
Changes since 1.8: +1 -4 lines

Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).

/* $NetBSD: ieee80211_sysctl.h,v 1.9 2009/10/19 23:19:39 rmind Exp $ */
/*-
 * Copyright (c) 2005 David Young.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or
 * without modification, are permitted provided that the following
 * conditions are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above
 *    copyright notice, this list of conditions and the following
 *    disclaimer in the documentation and/or other materials provided
 *    with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY David Young ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL David
 * Young BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
 * OF SUCH DAMAGE.
 */
#ifndef _NET80211_IEEE80211_SYSCTL_H_
#define _NET80211_IEEE80211_SYSCTL_H_

#include <net80211/_ieee80211.h>

/* sysctl(9) interface to net80211 client/peer records */   

/* Name index, offset from net.link.ieee80211.node. */

#define	IEEE80211_SYSCTL_NODENAME_IF		0
#define	IEEE80211_SYSCTL_NODENAME_OP		1
#define	IEEE80211_SYSCTL_NODENAME_ARG		2
#define	IEEE80211_SYSCTL_NODENAME_TYPE		3
#define	IEEE80211_SYSCTL_NODENAME_ELTSIZE	4
#define	IEEE80211_SYSCTL_NODENAME_ELTCOUNT	5
#define	IEEE80211_SYSCTL_NODENAMELEN		6

/* Record type numbers. */
#define	IEEE80211_SYSCTL_T_NODE		0	/* client/peer record */
#define	IEEE80211_SYSCTL_T_RSSADAPT	1	/* rssadapt(9) record
						 * (optional)
						 */
#define	IEEE80211_SYSCTL_T_DRVSPEC	2	/* driver-specific record
						 * (optional)
						 */

#define	IEEE80211_SYSCTL_OP_ALL		0
 
/* Every record begins with this information. */
struct ieee80211_node_sysctlhdr {
/*00*/	u_int16_t	sh_ifindex;
/*02*/	u_int8_t	sh_macaddr[IEEE80211_ADDR_LEN];
/*08*/	u_int8_t	sh_bssid[IEEE80211_ADDR_LEN];
};

/* Exportable node. */
struct ieee80211_node_sysctl {
/*00*/	u_int16_t	ns_ifindex;
/*02*/	u_int8_t	ns_macaddr[IEEE80211_ADDR_LEN];
/*08*/	u_int8_t	ns_bssid[IEEE80211_ADDR_LEN];
/*0e*/	u_int16_t	ns_capinfo;	/* capabilities */
/*10*/	u_int32_t	ns_flags;	/* properties of this node,
					 * IEEE80211_NODE_SYSCTL_F_*
					 */
/*14*/	u_int16_t	ns_freq;
/*16*/	u_int16_t	ns_chanflags;
/*18*/	u_int16_t	ns_chanidx;
/*1a*/	u_int8_t	ns_rssi;	/* recv ssi */
/*1b*/	u_int8_t	ns_esslen;
/*1c*/	u_int8_t	ns_essid[IEEE80211_NWID_LEN];
/*3c*/	u_int8_t	ns_rsvd0;	/* reserved */
/*3d*/	u_int8_t	ns_erp;		/* 11g only */
/*3e*/	u_int16_t	ns_associd;	/* assoc response */
/*40*/	u_int32_t	ns_inact;	/* inactivity mark count */
/*44*/	u_int32_t	ns_rstamp;	/* recv timestamp */
/*48*/	struct ieee80211_rateset ns_rates;	/* negotiated rate set */
/*58*/	u_int16_t	ns_txrate;	/* index to ns_rates[] */
/*5a*/	u_int16_t	ns_intval;	/* beacon interval */
/*5c*/	u_int8_t	ns_tstamp[8];	/* from last rcv'd beacon */
/*64*/	u_int16_t	ns_txseq;	/* seq to be transmitted */
/*66*/	u_int16_t	ns_rxseq;	/* seq previous received */
/*68*/	u_int16_t	ns_fhdwell;	/* FH only */
/*6a*/	u_int8_t	ns_fhindex;	/* FH only */
/*6b*/	u_int8_t	ns_fails;	/* failure count to associate */
/*6c*/
#ifdef notyet
	/* DTIM and contention free period (CFP) */
	u_int8_t	ns_dtimperiod;
	u_int8_t	ns_cfpperiod;	/* # of DTIMs between CFPs */
	u_int16_t	ns_cfpduremain;	/* remaining cfp duration */
	u_int16_t	ns_cfpmaxduration;/* max CFP duration in TU */
	u_int16_t	ns_nextdtim;	/* time to next DTIM */
	u_int16_t	ns_timoffset;
#endif
} __packed;

#ifdef __NetBSD__
enum ieee80211_node_walk_state {
	IEEE80211_WALK_BSS = 0,
	IEEE80211_WALK_SCAN,
	IEEE80211_WALK_STA
};

struct ieee80211_node_walk {
	struct ieee80211com		*nw_ic;
	struct ieee80211_node_table	*nw_nt;
	struct ieee80211_node		*nw_ni;
	u_short				nw_ifindex;
};
#endif /* __NetBSD__ */

#define	IEEE80211_NODE_SYSCTL_F_BSS	0x00000001	/* this node is the
							 * ic->ic_bss
							 */
#define	IEEE80211_NODE_SYSCTL_F_STA	0x00000002	/* this node is in
							 * the neighbor/sta
							 * table
							 */
#define	IEEE80211_NODE_SYSCTL_F_SCAN	0x00000004	/* this node is in
							 * the scan table
							 */
#endif /* !_NET80211_IEEE80211_SYSCTL_H_ */