]>
Commit | Line | Data |
---|---|---|
704232c2 JB |
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 | ||
55682965 JB |
9 | /** |
10 | * enum nl80211_commands - supported nl80211 commands | |
11 | * | |
12 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | |
13 | * | |
14 | * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request | |
15 | * to get a list of all present wiphys. | |
16 | * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and | |
17 | * %NL80211_ATTR_WIPHY_NAME. | |
18 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request | |
19 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and | |
20 | * %NL80211_ATTR_WIPHY_NAME. | |
21 | * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes | |
22 | * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME. | |
23 | * | |
24 | * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration; | |
25 | * either a dump request on a %NL80211_ATTR_WIPHY or a specific get | |
26 | * on an %NL80211_ATTR_IFINDEX is supported. | |
27 | * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires | |
28 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE. | |
29 | * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response | |
30 | * to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX, | |
31 | * %NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also | |
32 | * be sent from userspace to request creation of a new virtual interface, | |
33 | * then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and | |
34 | * %NL80211_ATTR_IFNAME. | |
35 | * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes | |
36 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from | |
37 | * userspace to request deletion of a virtual interface, then requires | |
38 | * attribute %NL80211_ATTR_IFINDEX. | |
39 | * | |
41ade00f JB |
40 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified |
41 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. | |
42 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or | |
43 | * %NL80211_ATTR_KEY_THRESHOLD. | |
44 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, | |
45 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER | |
46 | * attributes. | |
47 | * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX | |
48 | * or %NL80211_ATTR_MAC. | |
49 | * | |
ed1b6cc7 JB |
50 | * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a |
51 | * %NL80222_CMD_NEW_BEACON message) | |
52 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface | |
53 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, | |
54 | * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. | |
55 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, | |
56 | * parameters are like for %NL80211_CMD_SET_BEACON. | |
57 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | |
58 | * | |
55682965 JB |
59 | * @NL80211_CMD_MAX: highest used command number |
60 | * @__NL80211_CMD_AFTER_LAST: internal use | |
61 | */ | |
62 | enum nl80211_commands { | |
63 | /* don't change the order or add anything inbetween, this is ABI! */ | |
64 | NL80211_CMD_UNSPEC, | |
65 | ||
66 | NL80211_CMD_GET_WIPHY, /* can dump */ | |
67 | NL80211_CMD_SET_WIPHY, | |
68 | NL80211_CMD_NEW_WIPHY, | |
69 | NL80211_CMD_DEL_WIPHY, | |
70 | ||
71 | NL80211_CMD_GET_INTERFACE, /* can dump */ | |
72 | NL80211_CMD_SET_INTERFACE, | |
73 | NL80211_CMD_NEW_INTERFACE, | |
74 | NL80211_CMD_DEL_INTERFACE, | |
75 | ||
41ade00f JB |
76 | NL80211_CMD_GET_KEY, |
77 | NL80211_CMD_SET_KEY, | |
78 | NL80211_CMD_NEW_KEY, | |
79 | NL80211_CMD_DEL_KEY, | |
80 | ||
ed1b6cc7 JB |
81 | NL80211_CMD_GET_BEACON, |
82 | NL80211_CMD_SET_BEACON, | |
83 | NL80211_CMD_NEW_BEACON, | |
84 | NL80211_CMD_DEL_BEACON, | |
85 | ||
55682965 JB |
86 | /* add commands here */ |
87 | ||
88 | /* used to define NL80211_CMD_MAX below */ | |
89 | __NL80211_CMD_AFTER_LAST, | |
90 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 | |
91 | }; | |
92 | ||
93 | ||
94 | /** | |
95 | * enum nl80211_attrs - nl80211 netlink attributes | |
96 | * | |
97 | * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors | |
98 | * | |
99 | * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf. | |
100 | * /sys/class/ieee80211/<phyname>/index | |
101 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) | |
102 | * | |
103 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on | |
104 | * @NL80211_ATTR_IFNAME: network interface name | |
105 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype | |
106 | * | |
41ade00f JB |
107 | * @NL80211_ATTR_MAC: MAC address (various uses) |
108 | * | |
109 | * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of | |
110 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | |
111 | * keys | |
112 | * @NL80211_ATTR_KEY_IDX: key ID (u8, 0-3) | |
113 | * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | |
114 | * section 7.3.2.25.1, e.g. 0x000FAC04) | |
115 | * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | |
116 | * CCMP keys, each six bytes in little endian | |
117 | * | |
ed1b6cc7 JB |
118 | * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU |
119 | * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing | |
120 | * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE | |
121 | * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE | |
122 | * | |
55682965 JB |
123 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
124 | * @__NL80211_ATTR_AFTER_LAST: internal use | |
125 | */ | |
126 | enum nl80211_attrs { | |
127 | /* don't change the order or add anything inbetween, this is ABI! */ | |
128 | NL80211_ATTR_UNSPEC, | |
129 | ||
130 | NL80211_ATTR_WIPHY, | |
131 | NL80211_ATTR_WIPHY_NAME, | |
132 | ||
133 | NL80211_ATTR_IFINDEX, | |
134 | NL80211_ATTR_IFNAME, | |
135 | NL80211_ATTR_IFTYPE, | |
136 | ||
41ade00f JB |
137 | NL80211_ATTR_MAC, |
138 | ||
139 | NL80211_ATTR_KEY_DATA, | |
140 | NL80211_ATTR_KEY_IDX, | |
141 | NL80211_ATTR_KEY_CIPHER, | |
142 | NL80211_ATTR_KEY_SEQ, | |
143 | NL80211_ATTR_KEY_DEFAULT, | |
144 | ||
ed1b6cc7 JB |
145 | NL80211_ATTR_BEACON_INTERVAL, |
146 | NL80211_ATTR_DTIM_PERIOD, | |
147 | NL80211_ATTR_BEACON_HEAD, | |
148 | NL80211_ATTR_BEACON_TAIL, | |
149 | ||
55682965 JB |
150 | /* add attributes here, update the policy in nl80211.c */ |
151 | ||
152 | __NL80211_ATTR_AFTER_LAST, | |
153 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | |
154 | }; | |
155 | ||
704232c2 JB |
156 | /** |
157 | * enum nl80211_iftype - (virtual) interface types | |
55682965 | 158 | * |
704232c2 JB |
159 | * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides |
160 | * @NL80211_IFTYPE_ADHOC: independent BSS member | |
161 | * @NL80211_IFTYPE_STATION: managed BSS member | |
162 | * @NL80211_IFTYPE_AP: access point | |
163 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points | |
164 | * @NL80211_IFTYPE_WDS: wireless distribution interface | |
165 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames | |
55682965 | 166 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined |
704232c2 JB |
167 | * @__NL80211_IFTYPE_AFTER_LAST: internal use |
168 | * | |
55682965 | 169 | * These values are used with the %NL80211_ATTR_IFTYPE |
704232c2 JB |
170 | * to set the type of an interface. |
171 | * | |
172 | */ | |
173 | enum nl80211_iftype { | |
174 | NL80211_IFTYPE_UNSPECIFIED, | |
175 | NL80211_IFTYPE_ADHOC, | |
176 | NL80211_IFTYPE_STATION, | |
177 | NL80211_IFTYPE_AP, | |
178 | NL80211_IFTYPE_AP_VLAN, | |
179 | NL80211_IFTYPE_WDS, | |
180 | NL80211_IFTYPE_MONITOR, | |
181 | ||
182 | /* keep last */ | |
55682965 JB |
183 | __NL80211_IFTYPE_AFTER_LAST, |
184 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 | |
704232c2 | 185 | }; |
704232c2 JB |
186 | |
187 | #endif /* __LINUX_NL80211_H */ |