Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_NL80211_H |
| 2 | #define __LINUX_NL80211_H |
| 3 | /* |
| 4 | * 802.11 netlink interface public header |
| 5 | * |
| 6 | * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> |
| 7 | */ |
| 8 | |
| 9 | /** |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 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 | /** |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 22 | * enum nl80211_commands - supported nl80211 commands |
| 23 | * |
| 24 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
| 25 | * |
| 26 | * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request |
| 27 | * to get a list of all present wiphys. |
| 28 | * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and |
| 29 | * %NL80211_ATTR_WIPHY_NAME. |
| 30 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request |
| 31 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and |
| 32 | * %NL80211_ATTR_WIPHY_NAME. |
| 33 | * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes |
| 34 | * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME. |
| 35 | * |
| 36 | * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration; |
| 37 | * either a dump request on a %NL80211_ATTR_WIPHY or a specific get |
| 38 | * on an %NL80211_ATTR_IFINDEX is supported. |
| 39 | * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires |
| 40 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE. |
| 41 | * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response |
| 42 | * to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX, |
| 43 | * %NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also |
| 44 | * be sent from userspace to request creation of a new virtual interface, |
| 45 | * then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and |
| 46 | * %NL80211_ATTR_IFNAME. |
| 47 | * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes |
| 48 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from |
| 49 | * userspace to request deletion of a virtual interface, then requires |
| 50 | * attribute %NL80211_ATTR_IFINDEX. |
| 51 | * |
Johannes Berg | 41ade00 | 2007-12-19 02:03:29 +0100 | [diff] [blame] | 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 | * |
Johannes Berg | ed1b6cc | 2007-12-19 02:03:32 +0100 | [diff] [blame] | 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 | * |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 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 | * |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 81 | * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to |
| 82 | * destination %NL80211_ATTR_MAC on the interface identified by |
| 83 | * %NL80211_ATTR_IFINDEX. |
| 84 | * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to |
| 85 | * destination %NL80211_ATTR_MAC on the interface identified by |
| 86 | * %NL80211_ATTR_IFINDEX. |
| 87 | * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the |
| 88 | * the interface identified by %NL80211_ATTR_IFINDEX. |
| 89 | * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC |
| 90 | * or, if no MAC address given, all mesh paths, on the interface identified |
| 91 | * by %NL80211_ATTR_IFINDEX. |
Jouni Malinen | 9f1ba90 | 2008-08-07 20:07:01 +0300 | [diff] [blame] | 92 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by |
| 93 | * %NL80211_ATTR_IFINDEX. |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 94 | * |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 95 | * @NL80211_CMD_MAX: highest used command number |
| 96 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 97 | */ |
| 98 | enum nl80211_commands { |
| 99 | /* don't change the order or add anything inbetween, this is ABI! */ |
| 100 | NL80211_CMD_UNSPEC, |
| 101 | |
| 102 | NL80211_CMD_GET_WIPHY, /* can dump */ |
| 103 | NL80211_CMD_SET_WIPHY, |
| 104 | NL80211_CMD_NEW_WIPHY, |
| 105 | NL80211_CMD_DEL_WIPHY, |
| 106 | |
| 107 | NL80211_CMD_GET_INTERFACE, /* can dump */ |
| 108 | NL80211_CMD_SET_INTERFACE, |
| 109 | NL80211_CMD_NEW_INTERFACE, |
| 110 | NL80211_CMD_DEL_INTERFACE, |
| 111 | |
Johannes Berg | 41ade00 | 2007-12-19 02:03:29 +0100 | [diff] [blame] | 112 | NL80211_CMD_GET_KEY, |
| 113 | NL80211_CMD_SET_KEY, |
| 114 | NL80211_CMD_NEW_KEY, |
| 115 | NL80211_CMD_DEL_KEY, |
| 116 | |
Johannes Berg | ed1b6cc | 2007-12-19 02:03:32 +0100 | [diff] [blame] | 117 | NL80211_CMD_GET_BEACON, |
| 118 | NL80211_CMD_SET_BEACON, |
| 119 | NL80211_CMD_NEW_BEACON, |
| 120 | NL80211_CMD_DEL_BEACON, |
| 121 | |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 122 | NL80211_CMD_GET_STATION, |
| 123 | NL80211_CMD_SET_STATION, |
| 124 | NL80211_CMD_NEW_STATION, |
| 125 | NL80211_CMD_DEL_STATION, |
| 126 | |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 127 | NL80211_CMD_GET_MPATH, |
| 128 | NL80211_CMD_SET_MPATH, |
| 129 | NL80211_CMD_NEW_MPATH, |
| 130 | NL80211_CMD_DEL_MPATH, |
| 131 | |
Jouni Malinen | 9f1ba90 | 2008-08-07 20:07:01 +0300 | [diff] [blame] | 132 | NL80211_CMD_SET_BSS, |
| 133 | |
Michael Buesch | 564d9bd | 2008-06-10 14:04:14 +0200 | [diff] [blame] | 134 | /* add commands here */ |
| 135 | |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 136 | /* used to define NL80211_CMD_MAX below */ |
| 137 | __NL80211_CMD_AFTER_LAST, |
| 138 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 |
| 139 | }; |
| 140 | |
Jouni Malinen | 9f1ba90 | 2008-08-07 20:07:01 +0300 | [diff] [blame] | 141 | /* |
| 142 | * Allow user space programs to use #ifdef on new commands by defining them |
| 143 | * here |
| 144 | */ |
| 145 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 146 | |
| 147 | /** |
| 148 | * enum nl80211_attrs - nl80211 netlink attributes |
| 149 | * |
| 150 | * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors |
| 151 | * |
| 152 | * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf. |
| 153 | * /sys/class/ieee80211/<phyname>/index |
| 154 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) |
| 155 | * |
| 156 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on |
| 157 | * @NL80211_ATTR_IFNAME: network interface name |
| 158 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype |
| 159 | * |
Johannes Berg | 41ade00 | 2007-12-19 02:03:29 +0100 | [diff] [blame] | 160 | * @NL80211_ATTR_MAC: MAC address (various uses) |
| 161 | * |
| 162 | * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of |
| 163 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC |
| 164 | * keys |
| 165 | * @NL80211_ATTR_KEY_IDX: key ID (u8, 0-3) |
| 166 | * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 |
| 167 | * section 7.3.2.25.1, e.g. 0x000FAC04) |
| 168 | * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and |
| 169 | * CCMP keys, each six bytes in little endian |
| 170 | * |
Johannes Berg | ed1b6cc | 2007-12-19 02:03:32 +0100 | [diff] [blame] | 171 | * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU |
| 172 | * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing |
| 173 | * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE |
| 174 | * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE |
| 175 | * |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 176 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) |
| 177 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of |
| 178 | * &enum nl80211_sta_flags. |
| 179 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by |
| 180 | * IEEE 802.11 7.3.1.6 (u16). |
| 181 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported |
| 182 | * rates as defined by IEEE 802.11 7.3.2.2 but without the length |
| 183 | * restriction (at most %NL80211_MAX_SUPP_RATES). |
| 184 | * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station |
| 185 | * to, or the AP interface the station was originally added to to. |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 186 | * @NL80211_ATTR_STA_INFO: information about a station, part of station info |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 187 | * given for %NL80211_CMD_GET_STATION, nested attribute containing |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 188 | * info as possible, see &enum nl80211_sta_info. |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 189 | * |
Johannes Berg | ee688b0 | 2008-01-24 19:38:39 +0100 | [diff] [blame] | 190 | * @NL80211_ATTR_WIPHY_BANDS: Information about an operating bands, |
| 191 | * consisting of a nested array. |
| 192 | * |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 193 | * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). |
| 194 | * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link. |
| 195 | * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. |
| 196 | * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path |
| 197 | * info given for %NL80211_CMD_GET_MPATH, nested attribute described at |
| 198 | * &enum nl80211_mpath_info. |
| 199 | * |
| 200 | * |
Michael Wu | 66f7ac5 | 2008-01-31 19:48:22 +0100 | [diff] [blame] | 201 | * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of |
| 202 | * &enum nl80211_mntr_flags. |
| 203 | * |
Jouni Malinen | 9f1ba90 | 2008-08-07 20:07:01 +0300 | [diff] [blame] | 204 | * @NL80211_ATTR_BSS_CTS_PROT: whether CTS protection is enabled (u8, 0 or 1) |
| 205 | * @NL80211_ATTR_BSS_SHORT_PREAMBLE: whether short preamble is enabled |
| 206 | * (u8, 0 or 1) |
| 207 | * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled |
| 208 | * (u8, 0 or 1) |
| 209 | * |
Jouni Malinen | 36aedc9 | 2008-08-25 11:58:58 +0300 | [diff] [blame] | 210 | * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from |
| 211 | * association request when used with NL80211_CMD_NEW_STATION) |
| 212 | * |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 213 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 214 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 215 | */ |
| 216 | enum nl80211_attrs { |
| 217 | /* don't change the order or add anything inbetween, this is ABI! */ |
| 218 | NL80211_ATTR_UNSPEC, |
| 219 | |
| 220 | NL80211_ATTR_WIPHY, |
| 221 | NL80211_ATTR_WIPHY_NAME, |
| 222 | |
| 223 | NL80211_ATTR_IFINDEX, |
| 224 | NL80211_ATTR_IFNAME, |
| 225 | NL80211_ATTR_IFTYPE, |
| 226 | |
Johannes Berg | 41ade00 | 2007-12-19 02:03:29 +0100 | [diff] [blame] | 227 | NL80211_ATTR_MAC, |
| 228 | |
| 229 | NL80211_ATTR_KEY_DATA, |
| 230 | NL80211_ATTR_KEY_IDX, |
| 231 | NL80211_ATTR_KEY_CIPHER, |
| 232 | NL80211_ATTR_KEY_SEQ, |
| 233 | NL80211_ATTR_KEY_DEFAULT, |
| 234 | |
Johannes Berg | ed1b6cc | 2007-12-19 02:03:32 +0100 | [diff] [blame] | 235 | NL80211_ATTR_BEACON_INTERVAL, |
| 236 | NL80211_ATTR_DTIM_PERIOD, |
| 237 | NL80211_ATTR_BEACON_HEAD, |
| 238 | NL80211_ATTR_BEACON_TAIL, |
| 239 | |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 240 | NL80211_ATTR_STA_AID, |
| 241 | NL80211_ATTR_STA_FLAGS, |
| 242 | NL80211_ATTR_STA_LISTEN_INTERVAL, |
| 243 | NL80211_ATTR_STA_SUPPORTED_RATES, |
| 244 | NL80211_ATTR_STA_VLAN, |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 245 | NL80211_ATTR_STA_INFO, |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 246 | |
Johannes Berg | ee688b0 | 2008-01-24 19:38:39 +0100 | [diff] [blame] | 247 | NL80211_ATTR_WIPHY_BANDS, |
| 248 | |
Michael Wu | 66f7ac5 | 2008-01-31 19:48:22 +0100 | [diff] [blame] | 249 | NL80211_ATTR_MNTR_FLAGS, |
| 250 | |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 251 | NL80211_ATTR_MESH_ID, |
| 252 | NL80211_ATTR_STA_PLINK_ACTION, |
| 253 | NL80211_ATTR_MPATH_NEXT_HOP, |
| 254 | NL80211_ATTR_MPATH_INFO, |
| 255 | |
Jouni Malinen | 9f1ba90 | 2008-08-07 20:07:01 +0300 | [diff] [blame] | 256 | NL80211_ATTR_BSS_CTS_PROT, |
| 257 | NL80211_ATTR_BSS_SHORT_PREAMBLE, |
| 258 | NL80211_ATTR_BSS_SHORT_SLOT_TIME, |
| 259 | |
Jouni Malinen | 36aedc9 | 2008-08-25 11:58:58 +0300 | [diff] [blame] | 260 | NL80211_ATTR_HT_CAPABILITY, |
| 261 | |
Michael Buesch | 564d9bd | 2008-06-10 14:04:14 +0200 | [diff] [blame] | 262 | /* add attributes here, update the policy in nl80211.c */ |
| 263 | |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 264 | __NL80211_ATTR_AFTER_LAST, |
| 265 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
| 266 | }; |
| 267 | |
Jouni Malinen | 36aedc9 | 2008-08-25 11:58:58 +0300 | [diff] [blame] | 268 | /* |
| 269 | * Allow user space programs to use #ifdef on new attributes by defining them |
| 270 | * here |
| 271 | */ |
| 272 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY |
| 273 | |
Luis R. Rodriguez | ffd7891 | 2008-06-21 10:02:46 -0400 | [diff] [blame] | 274 | #define NL80211_MAX_SUPP_RATES 32 |
| 275 | #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 |
| 276 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 |
| 277 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
Jouni Malinen | 36aedc9 | 2008-08-25 11:58:58 +0300 | [diff] [blame] | 278 | #define NL80211_HT_CAPABILITY_LEN 26 |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 279 | |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 280 | /** |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 281 | * enum nl80211_iftype - (virtual) interface types |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 282 | * |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 283 | * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides |
| 284 | * @NL80211_IFTYPE_ADHOC: independent BSS member |
| 285 | * @NL80211_IFTYPE_STATION: managed BSS member |
| 286 | * @NL80211_IFTYPE_AP: access point |
| 287 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points |
| 288 | * @NL80211_IFTYPE_WDS: wireless distribution interface |
| 289 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 290 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 291 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 292 | * @__NL80211_IFTYPE_AFTER_LAST: internal use |
| 293 | * |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 294 | * These values are used with the %NL80211_ATTR_IFTYPE |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 295 | * to set the type of an interface. |
| 296 | * |
| 297 | */ |
| 298 | enum nl80211_iftype { |
| 299 | NL80211_IFTYPE_UNSPECIFIED, |
| 300 | NL80211_IFTYPE_ADHOC, |
| 301 | NL80211_IFTYPE_STATION, |
| 302 | NL80211_IFTYPE_AP, |
| 303 | NL80211_IFTYPE_AP_VLAN, |
| 304 | NL80211_IFTYPE_WDS, |
| 305 | NL80211_IFTYPE_MONITOR, |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 306 | NL80211_IFTYPE_MESH_POINT, |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 307 | |
| 308 | /* keep last */ |
Johannes Berg | 5568296 | 2007-09-20 13:09:35 -0400 | [diff] [blame] | 309 | __NL80211_IFTYPE_AFTER_LAST, |
| 310 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 311 | }; |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 312 | |
Johannes Berg | 5727ef1 | 2007-12-19 02:03:34 +0100 | [diff] [blame] | 313 | /** |
| 314 | * enum nl80211_sta_flags - station flags |
| 315 | * |
| 316 | * Station flags. When a station is added to an AP interface, it is |
| 317 | * assumed to be already associated (and hence authenticated.) |
| 318 | * |
| 319 | * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) |
| 320 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
| 321 | * with short barker preamble |
| 322 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
| 323 | */ |
| 324 | enum nl80211_sta_flags { |
| 325 | __NL80211_STA_FLAG_INVALID, |
| 326 | NL80211_STA_FLAG_AUTHORIZED, |
| 327 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
| 328 | NL80211_STA_FLAG_WME, |
| 329 | |
| 330 | /* keep last */ |
| 331 | __NL80211_STA_FLAG_AFTER_LAST, |
| 332 | NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1 |
| 333 | }; |
| 334 | |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 335 | /** |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 336 | * enum nl80211_sta_info - station information |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 337 | * |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 338 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 339 | * when getting information about a station. |
| 340 | * |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 341 | * @__NL80211_STA_INFO_INVALID: attribute number 0 is reserved |
| 342 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) |
| 343 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) |
| 344 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
| 345 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 346 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 347 | */ |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 348 | enum nl80211_sta_info { |
| 349 | __NL80211_STA_INFO_INVALID, |
| 350 | NL80211_STA_INFO_INACTIVE_TIME, |
| 351 | NL80211_STA_INFO_RX_BYTES, |
| 352 | NL80211_STA_INFO_TX_BYTES, |
| 353 | NL80211_STA_INFO_LLID, |
| 354 | NL80211_STA_INFO_PLID, |
| 355 | NL80211_STA_INFO_PLINK_STATE, |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 356 | |
| 357 | /* keep last */ |
Luis Carlos Cobo | 2ec600d | 2008-02-23 15:17:06 +0100 | [diff] [blame] | 358 | __NL80211_STA_INFO_AFTER_LAST, |
| 359 | NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1 |
| 360 | }; |
| 361 | |
| 362 | /** |
| 363 | * enum nl80211_mpath_flags - nl80211 mesh path flags |
| 364 | * |
| 365 | * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active |
| 366 | * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running |
| 367 | * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN |
| 368 | * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set |
| 369 | * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded |
| 370 | */ |
| 371 | enum nl80211_mpath_flags { |
| 372 | NL80211_MPATH_FLAG_ACTIVE = 1<<0, |
| 373 | NL80211_MPATH_FLAG_RESOLVING = 1<<1, |
| 374 | NL80211_MPATH_FLAG_DSN_VALID = 1<<2, |
| 375 | NL80211_MPATH_FLAG_FIXED = 1<<3, |
| 376 | NL80211_MPATH_FLAG_RESOLVED = 1<<4, |
| 377 | }; |
| 378 | |
| 379 | /** |
| 380 | * enum nl80211_mpath_info - mesh path information |
| 381 | * |
| 382 | * These attribute types are used with %NL80211_ATTR_MPATH_INFO when getting |
| 383 | * information about a mesh path. |
| 384 | * |
| 385 | * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved |
| 386 | * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination |
| 387 | * @NL80211_ATTR_MPATH_DSN: destination sequence number |
| 388 | * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path |
| 389 | * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now |
| 390 | * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in |
| 391 | * &enum nl80211_mpath_flags; |
| 392 | * @NL80211_ATTR_MPATH_DISCOVERY_TIMEOUT: total path discovery timeout, in msec |
| 393 | * @NL80211_ATTR_MPATH_DISCOVERY_RETRIES: mesh path discovery retries |
| 394 | */ |
| 395 | enum nl80211_mpath_info { |
| 396 | __NL80211_MPATH_INFO_INVALID, |
| 397 | NL80211_MPATH_INFO_FRAME_QLEN, |
| 398 | NL80211_MPATH_INFO_DSN, |
| 399 | NL80211_MPATH_INFO_METRIC, |
| 400 | NL80211_MPATH_INFO_EXPTIME, |
| 401 | NL80211_MPATH_INFO_FLAGS, |
| 402 | NL80211_MPATH_INFO_DISCOVERY_TIMEOUT, |
| 403 | NL80211_MPATH_INFO_DISCOVERY_RETRIES, |
| 404 | |
| 405 | /* keep last */ |
| 406 | __NL80211_MPATH_INFO_AFTER_LAST, |
| 407 | NL80211_MPATH_INFO_MAX = __NL80211_MPATH_INFO_AFTER_LAST - 1 |
Johannes Berg | fd5b74d | 2007-12-19 02:03:36 +0100 | [diff] [blame] | 408 | }; |
| 409 | |
Johannes Berg | ee688b0 | 2008-01-24 19:38:39 +0100 | [diff] [blame] | 410 | /** |
| 411 | * enum nl80211_band_attr - band attributes |
| 412 | * @__NL80211_BAND_ATTR_INVALID: attribute number 0 is reserved |
| 413 | * @NL80211_BAND_ATTR_FREQS: supported frequencies in this band, |
| 414 | * an array of nested frequency attributes |
| 415 | * @NL80211_BAND_ATTR_RATES: supported bitrates in this band, |
| 416 | * an array of nested bitrate attributes |
| 417 | */ |
| 418 | enum nl80211_band_attr { |
| 419 | __NL80211_BAND_ATTR_INVALID, |
| 420 | NL80211_BAND_ATTR_FREQS, |
| 421 | NL80211_BAND_ATTR_RATES, |
| 422 | |
| 423 | /* keep last */ |
| 424 | __NL80211_BAND_ATTR_AFTER_LAST, |
| 425 | NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 |
| 426 | }; |
| 427 | |
| 428 | /** |
| 429 | * enum nl80211_frequency_attr - frequency attributes |
| 430 | * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz |
| 431 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current |
| 432 | * regulatory domain. |
| 433 | * @NL80211_FREQUENCY_ATTR_PASSIVE_SCAN: Only passive scanning is |
| 434 | * permitted on this channel in current regulatory domain. |
| 435 | * @NL80211_FREQUENCY_ATTR_NO_IBSS: IBSS networks are not permitted |
| 436 | * on this channel in current regulatory domain. |
| 437 | * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory |
| 438 | * on this channel in current regulatory domain. |
| 439 | */ |
| 440 | enum nl80211_frequency_attr { |
| 441 | __NL80211_FREQUENCY_ATTR_INVALID, |
| 442 | NL80211_FREQUENCY_ATTR_FREQ, |
| 443 | NL80211_FREQUENCY_ATTR_DISABLED, |
| 444 | NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, |
| 445 | NL80211_FREQUENCY_ATTR_NO_IBSS, |
| 446 | NL80211_FREQUENCY_ATTR_RADAR, |
| 447 | |
| 448 | /* keep last */ |
| 449 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| 450 | NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 |
| 451 | }; |
| 452 | |
| 453 | /** |
| 454 | * enum nl80211_bitrate_attr - bitrate attributes |
| 455 | * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps |
| 456 | * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported |
| 457 | * in 2.4 GHz band. |
| 458 | */ |
| 459 | enum nl80211_bitrate_attr { |
| 460 | __NL80211_BITRATE_ATTR_INVALID, |
| 461 | NL80211_BITRATE_ATTR_RATE, |
| 462 | NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE, |
| 463 | |
| 464 | /* keep last */ |
| 465 | __NL80211_BITRATE_ATTR_AFTER_LAST, |
| 466 | NL80211_BITRATE_ATTR_MAX = __NL80211_BITRATE_ATTR_AFTER_LAST - 1 |
| 467 | }; |
| 468 | |
Michael Wu | 66f7ac5 | 2008-01-31 19:48:22 +0100 | [diff] [blame] | 469 | /** |
| 470 | * enum nl80211_mntr_flags - monitor configuration flags |
| 471 | * |
| 472 | * Monitor configuration flags. |
| 473 | * |
| 474 | * @__NL80211_MNTR_FLAG_INVALID: reserved |
| 475 | * |
| 476 | * @NL80211_MNTR_FLAG_FCSFAIL: pass frames with bad FCS |
| 477 | * @NL80211_MNTR_FLAG_PLCPFAIL: pass frames with bad PLCP |
| 478 | * @NL80211_MNTR_FLAG_CONTROL: pass control frames |
| 479 | * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering |
| 480 | * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. |
| 481 | * overrides all other flags. |
| 482 | * |
| 483 | * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use |
| 484 | * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag |
| 485 | */ |
| 486 | enum nl80211_mntr_flags { |
| 487 | __NL80211_MNTR_FLAG_INVALID, |
| 488 | NL80211_MNTR_FLAG_FCSFAIL, |
| 489 | NL80211_MNTR_FLAG_PLCPFAIL, |
| 490 | NL80211_MNTR_FLAG_CONTROL, |
| 491 | NL80211_MNTR_FLAG_OTHER_BSS, |
| 492 | NL80211_MNTR_FLAG_COOK_FRAMES, |
| 493 | |
| 494 | /* keep last */ |
| 495 | __NL80211_MNTR_FLAG_AFTER_LAST, |
| 496 | NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1 |
| 497 | }; |
| 498 | |
Johannes Berg | 704232c | 2007-04-23 12:20:05 -0700 | [diff] [blame] | 499 | #endif /* __LINUX_NL80211_H */ |