diff options
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 538ee1dd3d0a..9fecf902419c 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -7,6 +7,18 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * DOC: Station handling | ||
11 | * | ||
12 | * Stations are added per interface, but a special case exists with VLAN | ||
13 | * interfaces. When a station is bound to an AP interface, it may be moved | ||
14 | * into a VLAN identified by a VLAN interface index (%NL80211_ATTR_STA_VLAN). | ||
15 | * The station is still assumed to belong to the AP interface it was added | ||
16 | * to. | ||
17 | * | ||
18 | * TODO: need more info? | ||
19 | */ | ||
20 | |||
21 | /** | ||
10 | * enum nl80211_commands - supported nl80211 commands | 22 | * enum nl80211_commands - supported nl80211 commands |
11 | * | 23 | * |
12 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 24 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -37,6 +49,35 @@ | |||
37 | * userspace to request deletion of a virtual interface, then requires | 49 | * userspace to request deletion of a virtual interface, then requires |
38 | * attribute %NL80211_ATTR_IFINDEX. | 50 | * attribute %NL80211_ATTR_IFINDEX. |
39 | * | 51 | * |
52 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified | ||
53 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. | ||
54 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or | ||
55 | * %NL80211_ATTR_KEY_THRESHOLD. | ||
56 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, | ||
57 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER | ||
58 | * attributes. | ||
59 | * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX | ||
60 | * or %NL80211_ATTR_MAC. | ||
61 | * | ||
62 | * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a | ||
63 | * %NL80222_CMD_NEW_BEACON message) | ||
64 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface | ||
65 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, | ||
66 | * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. | ||
67 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, | ||
68 | * parameters are like for %NL80211_CMD_SET_BEACON. | ||
69 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | ||
70 | * | ||
71 | * @NL80211_CMD_GET_STATION: Get station attributes for station identified by | ||
72 | * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. | ||
73 | * @NL80211_CMD_SET_STATION: Set station attributes for station identified by | ||
74 | * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. | ||
75 | * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the | ||
76 | * the interface identified by %NL80211_ATTR_IFINDEX. | ||
77 | * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC | ||
78 | * or, if no MAC address given, all stations, on the interface identified | ||
79 | * by %NL80211_ATTR_IFINDEX. | ||
80 | * | ||
40 | * @NL80211_CMD_MAX: highest used command number | 81 | * @NL80211_CMD_MAX: highest used command number |
41 | * @__NL80211_CMD_AFTER_LAST: internal use | 82 | * @__NL80211_CMD_AFTER_LAST: internal use |
42 | */ | 83 | */ |
@@ -54,6 +95,21 @@ enum nl80211_commands { | |||
54 | NL80211_CMD_NEW_INTERFACE, | 95 | NL80211_CMD_NEW_INTERFACE, |
55 | NL80211_CMD_DEL_INTERFACE, | 96 | NL80211_CMD_DEL_INTERFACE, |
56 | 97 | ||
98 | NL80211_CMD_GET_KEY, | ||
99 | NL80211_CMD_SET_KEY, | ||
100 | NL80211_CMD_NEW_KEY, | ||
101 | NL80211_CMD_DEL_KEY, | ||
102 | |||
103 | NL80211_CMD_GET_BEACON, | ||
104 | NL80211_CMD_SET_BEACON, | ||
105 | NL80211_CMD_NEW_BEACON, | ||
106 | NL80211_CMD_DEL_BEACON, | ||
107 | |||
108 | NL80211_CMD_GET_STATION, | ||
109 | NL80211_CMD_SET_STATION, | ||
110 | NL80211_CMD_NEW_STATION, | ||
111 | NL80211_CMD_DEL_STATION, | ||
112 | |||
57 | /* add commands here */ | 113 | /* add commands here */ |
58 | 114 | ||
59 | /* used to define NL80211_CMD_MAX below */ | 115 | /* used to define NL80211_CMD_MAX below */ |
@@ -75,6 +131,36 @@ enum nl80211_commands { | |||
75 | * @NL80211_ATTR_IFNAME: network interface name | 131 | * @NL80211_ATTR_IFNAME: network interface name |
76 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype | 132 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype |
77 | * | 133 | * |
134 | * @NL80211_ATTR_MAC: MAC address (various uses) | ||
135 | * | ||
136 | * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
137 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
138 | * keys | ||
139 | * @NL80211_ATTR_KEY_IDX: key ID (u8, 0-3) | ||
140 | * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
141 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
142 | * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
143 | * CCMP keys, each six bytes in little endian | ||
144 | * | ||
145 | * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU | ||
146 | * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing | ||
147 | * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE | ||
148 | * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE | ||
149 | * | ||
150 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) | ||
151 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of | ||
152 | * &enum nl80211_sta_flags. | ||
153 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by | ||
154 | * IEEE 802.11 7.3.1.6 (u16). | ||
155 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported | ||
156 | * rates as defined by IEEE 802.11 7.3.2.2 but without the length | ||
157 | * restriction (at most %NL80211_MAX_SUPP_RATES). | ||
158 | * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station | ||
159 | * to, or the AP interface the station was originally added to to. | ||
160 | * @NL80211_ATTR_STA_STATS: statistics for a station, part of station info | ||
161 | * given for %NL80211_CMD_GET_STATION, nested attribute containing | ||
162 | * info as possible, see &enum nl80211_sta_stats. | ||
163 | * | ||
78 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 164 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
79 | * @__NL80211_ATTR_AFTER_LAST: internal use | 165 | * @__NL80211_ATTR_AFTER_LAST: internal use |
80 | */ | 166 | */ |
@@ -89,12 +175,34 @@ enum nl80211_attrs { | |||
89 | NL80211_ATTR_IFNAME, | 175 | NL80211_ATTR_IFNAME, |
90 | NL80211_ATTR_IFTYPE, | 176 | NL80211_ATTR_IFTYPE, |
91 | 177 | ||
178 | NL80211_ATTR_MAC, | ||
179 | |||
180 | NL80211_ATTR_KEY_DATA, | ||
181 | NL80211_ATTR_KEY_IDX, | ||
182 | NL80211_ATTR_KEY_CIPHER, | ||
183 | NL80211_ATTR_KEY_SEQ, | ||
184 | NL80211_ATTR_KEY_DEFAULT, | ||
185 | |||
186 | NL80211_ATTR_BEACON_INTERVAL, | ||
187 | NL80211_ATTR_DTIM_PERIOD, | ||
188 | NL80211_ATTR_BEACON_HEAD, | ||
189 | NL80211_ATTR_BEACON_TAIL, | ||
190 | |||
191 | NL80211_ATTR_STA_AID, | ||
192 | NL80211_ATTR_STA_FLAGS, | ||
193 | NL80211_ATTR_STA_LISTEN_INTERVAL, | ||
194 | NL80211_ATTR_STA_SUPPORTED_RATES, | ||
195 | NL80211_ATTR_STA_VLAN, | ||
196 | NL80211_ATTR_STA_STATS, | ||
197 | |||
92 | /* add attributes here, update the policy in nl80211.c */ | 198 | /* add attributes here, update the policy in nl80211.c */ |
93 | 199 | ||
94 | __NL80211_ATTR_AFTER_LAST, | 200 | __NL80211_ATTR_AFTER_LAST, |
95 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 201 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
96 | }; | 202 | }; |
97 | 203 | ||
204 | #define NL80211_MAX_SUPP_RATES 32 | ||
205 | |||
98 | /** | 206 | /** |
99 | * enum nl80211_iftype - (virtual) interface types | 207 | * enum nl80211_iftype - (virtual) interface types |
100 | * | 208 | * |
@@ -126,4 +234,50 @@ enum nl80211_iftype { | |||
126 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 | 234 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 |
127 | }; | 235 | }; |
128 | 236 | ||
237 | /** | ||
238 | * enum nl80211_sta_flags - station flags | ||
239 | * | ||
240 | * Station flags. When a station is added to an AP interface, it is | ||
241 | * assumed to be already associated (and hence authenticated.) | ||
242 | * | ||
243 | * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) | ||
244 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | ||
245 | * with short barker preamble | ||
246 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | ||
247 | */ | ||
248 | enum nl80211_sta_flags { | ||
249 | __NL80211_STA_FLAG_INVALID, | ||
250 | NL80211_STA_FLAG_AUTHORIZED, | ||
251 | NL80211_STA_FLAG_SHORT_PREAMBLE, | ||
252 | NL80211_STA_FLAG_WME, | ||
253 | |||
254 | /* keep last */ | ||
255 | __NL80211_STA_FLAG_AFTER_LAST, | ||
256 | NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1 | ||
257 | }; | ||
258 | |||
259 | /** | ||
260 | * enum nl80211_sta_stats - station statistics | ||
261 | * | ||
262 | * These attribute types are used with %NL80211_ATTR_STA_STATS | ||
263 | * when getting information about a station. | ||
264 | * | ||
265 | * @__NL80211_STA_STAT_INVALID: attribute number 0 is reserved | ||
266 | * @NL80211_STA_STAT_INACTIVE_TIME: time since last activity (u32, msecs) | ||
267 | * @NL80211_STA_STAT_RX_BYTES: total received bytes (u32, from this station) | ||
268 | * @NL80211_STA_STAT_TX_BYTES: total transmitted bytes (u32, to this station) | ||
269 | * @__NL80211_STA_STAT_AFTER_LAST: internal | ||
270 | * @NL80211_STA_STAT_MAX: highest possible station stats attribute | ||
271 | */ | ||
272 | enum nl80211_sta_stats { | ||
273 | __NL80211_STA_STAT_INVALID, | ||
274 | NL80211_STA_STAT_INACTIVE_TIME, | ||
275 | NL80211_STA_STAT_RX_BYTES, | ||
276 | NL80211_STA_STAT_TX_BYTES, | ||
277 | |||
278 | /* keep last */ | ||
279 | __NL80211_STA_STAT_AFTER_LAST, | ||
280 | NL80211_STA_STAT_MAX = __NL80211_STA_STAT_AFTER_LAST - 1 | ||
281 | }; | ||
282 | |||
129 | #endif /* __LINUX_NL80211_H */ | 283 | #endif /* __LINUX_NL80211_H */ |