⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nl80211_copy.h

📁 最新的Host AP 新添加了许多pcmcia 的驱动
💻 H
📖 第 1 页 / 共 3 页
字号:
#ifndef __LINUX_NL80211_H#define __LINUX_NL80211_H/* * 802.11 netlink interface public header * * Copyright 2006, 2007, 2008 Johannes Berg <johannes@sipsolutions.net> * Copyright 2008 Michael Wu <flamingice@sourmilk.net> * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> * Copyright 2008 Michael Buesch <mb@bu3sch.de> * Copyright 2008 Luis R. Rodriguez <lrodriguez@atheros.com> * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> * Copyright 2008 Colin McCabe <colin@cozybit.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * *//** * DOC: Station handling * * Stations are added per interface, but a special case exists with VLAN * interfaces. When a station is bound to an AP interface, it may be moved * into a VLAN identified by a VLAN interface index (%NL80211_ATTR_STA_VLAN). * The station is still assumed to belong to the AP interface it was added * to. * * TODO: need more info? *//** * enum nl80211_commands - supported nl80211 commands * * @NL80211_CMD_UNSPEC: unspecified command to catch errors * * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request *	to get a list of all present wiphys. * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or *	%NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, *	%NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or *	%NL80211_ATTR_WIPHY_CHANNEL_TYPE. * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request *	or rename notification. Has attributes %NL80211_ATTR_WIPHY and *	%NL80211_ATTR_WIPHY_NAME. * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME. * * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration; *	either a dump request on a %NL80211_ATTR_WIPHY or a specific get *	on an %NL80211_ATTR_IFINDEX is supported. * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE. * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response *	to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX, *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also *	be sent from userspace to request creation of a new virtual interface, *	then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and *	%NL80211_ATTR_IFNAME. * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from *	userspace to request deletion of a virtual interface, then requires *	attribute %NL80211_ATTR_IFINDEX. * * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified *	by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, *	%NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, *	%NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER *	attributes. * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX *	or %NL80211_ATTR_MAC. * * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a *	%NL80222_CMD_NEW_BEACON message) * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface *	using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, *	%NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, *	parameters are like for %NL80211_CMD_SET_BEACON. * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it * * @NL80211_CMD_GET_STATION: Get station attributes for station identified by *	%NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. * @NL80211_CMD_SET_STATION: Set station attributes for station identified by *	%NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the *	the interface identified by %NL80211_ATTR_IFINDEX. * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC *	or, if no MAC address given, all stations, on the interface identified *	by %NL80211_ATTR_IFINDEX. * * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to * 	destination %NL80211_ATTR_MAC on the interface identified by * 	%NL80211_ATTR_IFINDEX. * @NL80211_CMD_SET_MPATH:  Set mesh path attributes for mesh path to * 	destination %NL80211_ATTR_MAC on the interface identified by * 	%NL80211_ATTR_IFINDEX. * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the *	the interface identified by %NL80211_ATTR_IFINDEX. * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC *	or, if no MAC address given, all mesh paths, on the interface identified *	by %NL80211_ATTR_IFINDEX. * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by *	%NL80211_ATTR_IFINDEX. * * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set * 	regulatory domain. * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command *	after being queried by the kernel. CRDA replies by sending a regulatory *	domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our *	current alpha2 if it found a match. It also provides * 	NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each * 	regulatory rule is a nested set of attributes  given by * 	%NL80211_ATTR_REG_RULE_FREQ_[START|END] and * 	%NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by * 	%NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and * 	%NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain * 	to the the specified ISO/IEC 3166-1 alpha2 country code. The core will * 	store this as a valid request and then query userspace for it. * * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the *	interface identified by %NL80211_ATTR_IFINDEX * * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the *      interface identified by %NL80211_ATTR_IFINDEX * * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The *	interface is identified with %NL80211_ATTR_IFINDEX and the management *	frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be *	added to the end of the specified management frame is specified with *	%NL80211_ATTR_IE. If the command succeeds, the requested data will be *	added to all specified management frames generated by *	kernel/firmware/driver. * * @NL80211_CMD_GET_SCAN: get scan results * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to *	NL80211_CMD_GET_SCAN and on the "scan" multicast group) * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, *	partial scan results may be available * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */enum nl80211_commands {/* don't change the order or add anything inbetween, this is ABI! */	NL80211_CMD_UNSPEC,	NL80211_CMD_GET_WIPHY,		/* can dump */	NL80211_CMD_SET_WIPHY,	NL80211_CMD_NEW_WIPHY,	NL80211_CMD_DEL_WIPHY,	NL80211_CMD_GET_INTERFACE,	/* can dump */	NL80211_CMD_SET_INTERFACE,	NL80211_CMD_NEW_INTERFACE,	NL80211_CMD_DEL_INTERFACE,	NL80211_CMD_GET_KEY,	NL80211_CMD_SET_KEY,	NL80211_CMD_NEW_KEY,	NL80211_CMD_DEL_KEY,	NL80211_CMD_GET_BEACON,	NL80211_CMD_SET_BEACON,	NL80211_CMD_NEW_BEACON,	NL80211_CMD_DEL_BEACON,	NL80211_CMD_GET_STATION,	NL80211_CMD_SET_STATION,	NL80211_CMD_NEW_STATION,	NL80211_CMD_DEL_STATION,	NL80211_CMD_GET_MPATH,	NL80211_CMD_SET_MPATH,	NL80211_CMD_NEW_MPATH,	NL80211_CMD_DEL_MPATH,	NL80211_CMD_SET_BSS,	NL80211_CMD_SET_REG,	NL80211_CMD_REQ_SET_REG,	NL80211_CMD_GET_MESH_PARAMS,	NL80211_CMD_SET_MESH_PARAMS,	NL80211_CMD_SET_MGMT_EXTRA_IE,	NL80211_CMD_GET_REG,	NL80211_CMD_GET_SCAN,	NL80211_CMD_TRIGGER_SCAN,	NL80211_CMD_NEW_SCAN_RESULTS,	NL80211_CMD_SCAN_ABORTED,	/* add new commands above here */	/* used to define NL80211_CMD_MAX below */	__NL80211_CMD_AFTER_LAST,	NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1};/* * Allow user space programs to use #ifdef on new commands by defining them * here */#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS#define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE/** * enum nl80211_attrs - nl80211 netlink attributes * * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors * * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf. *	/sys/class/ieee80211/<phyname>/index * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ *	if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included): *	NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including *		this attribute) *	NL80211_CHAN_HT20 = HT20 only *	NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel *	NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel * * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on * @NL80211_ATTR_IFNAME: network interface name * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype * * @NL80211_ATTR_MAC: MAC address (various uses) * * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of *	16 bytes encryption key followed by 8 bytes each for TX and RX MIC *	keys * @NL80211_ATTR_KEY_IDX: key ID (u8, 0-3) * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 *	section 7.3.2.25.1, e.g. 0x000FAC04) * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and *	CCMP keys, each six bytes in little endian * * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE * * @NL80211_ATTR_STA_AID: Association ID for the station (u16) * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of *	&enum nl80211_sta_flags. * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by *	IEEE 802.11 7.3.1.6 (u16). * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported *	rates as defined by IEEE 802.11 7.3.2.2 but without the length *	restriction (at most %NL80211_MAX_SUPP_RATES). * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station *	to, or the AP interface the station was originally added to to. * @NL80211_ATTR_STA_INFO: information about a station, part of station info *	given for %NL80211_CMD_GET_STATION, nested attribute containing *	info as possible, see &enum nl80211_sta_info. * * @NL80211_ATTR_WIPHY_BANDS: Information about an operating bands, *	consisting of a nested array. * * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link. * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path * 	info given for %NL80211_CMD_GET_MPATH, nested attribute described at *	&enum nl80211_mpath_info. * * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of *      &enum nl80211_mntr_flags. * * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the * 	current regulatory domain should be set to or is already set to. * 	For example, 'CR', for Costa Rica. This attribute is used by the kernel * 	to query the CRDA to retrieve one regulatory domain. This attribute can * 	also be used by userspace to query the kernel for the currently set * 	regulatory domain. We chose an alpha2 as that is also used by the * 	IEEE-802.11d country information element to identify a country. * 	Users can also simply ask the wireless core to set regulatory domain * 	to a specific alpha2. * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory *	rules. * * @NL80211_ATTR_BSS_CTS_PROT: whether CTS protection is enabled (u8, 0 or 1) * @NL80211_ATTR_BSS_SHORT_PREAMBLE: whether short preamble is enabled *	(u8, 0 or 1) * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled *	(u8, 0 or 1) * @NL80211_ATTR_BSS_BASIC_RATES: basic rates, array of basic *	rates in format defined by IEEE 802.11 7.3.2.2 but without the length *	restriction (at most %NL80211_MAX_SUPP_RATES).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -