Loading...
1/*
2 * nl802154.h
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#ifndef IEEE802154_NL_H
22#define IEEE802154_NL_H
23
24struct net_device;
25struct ieee802154_addr;
26
27/**
28 * ieee802154_nl_assoc_indic - Notify userland of an association request.
29 * @dev: The network device on which this association request was
30 * received.
31 * @addr: The address of the device requesting association.
32 * @cap: The capability information field from the device.
33 *
34 * This informs a userland coordinator of a device requesting to
35 * associate with the PAN controlled by the coordinator.
36 *
37 * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document.
38 */
39int ieee802154_nl_assoc_indic(struct net_device *dev,
40 struct ieee802154_addr *addr, u8 cap);
41
42/**
43 * ieee802154_nl_assoc_confirm - Notify userland of association.
44 * @dev: The device which has completed association.
45 * @short_addr: The short address assigned to the device.
46 * @status: The status of the association.
47 *
48 * Inform userland of the result of an association request. If the
49 * association request included asking the coordinator to allocate
50 * a short address then it is returned in @short_addr.
51 *
52 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document.
53 */
54int ieee802154_nl_assoc_confirm(struct net_device *dev,
55 u16 short_addr, u8 status);
56
57/**
58 * ieee802154_nl_disassoc_indic - Notify userland of disassociation.
59 * @dev: The device on which disassociation was indicated.
60 * @addr: The device which is disassociating.
61 * @reason: The reason for the disassociation.
62 *
63 * Inform userland that a device has disassociated from the network.
64 *
65 * Note: This is in section 7.3.3 of the IEEE 802.15.4 document.
66 */
67int ieee802154_nl_disassoc_indic(struct net_device *dev,
68 struct ieee802154_addr *addr, u8 reason);
69
70/**
71 * ieee802154_nl_disassoc_confirm - Notify userland of disassociation
72 * completion.
73 * @dev: The device on which disassociation was ordered.
74 * @status: The result of the disassociation.
75 *
76 * Inform userland of the result of requesting that a device
77 * disassociate, or the result of requesting that we disassociate from
78 * a PAN managed by another coordinator.
79 *
80 * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document.
81 */
82int ieee802154_nl_disassoc_confirm(struct net_device *dev,
83 u8 status);
84
85/**
86 * ieee802154_nl_scan_confirm - Notify userland of completion of scan.
87 * @dev: The device which was instructed to scan.
88 * @status: The status of the scan operation.
89 * @scan_type: What type of scan was performed.
90 * @unscanned: Any channels that the device was unable to scan.
91 * @edl: The energy levels (if a passive scan).
92 *
93 *
94 * Note: This is in section 7.1.11 of the IEEE 802.15.4 document.
95 * Note: This API does not permit the return of an active scan result.
96 */
97int ieee802154_nl_scan_confirm(struct net_device *dev,
98 u8 status, u8 scan_type, u32 unscanned, u8 page,
99 u8 *edl/*, struct list_head *pan_desc_list */);
100
101/**
102 * ieee802154_nl_beacon_indic - Notify userland of a received beacon.
103 * @dev: The device on which a beacon was received.
104 * @panid: The PAN of the coordinator.
105 * @coord_addr: The short address of the coordinator on that PAN.
106 *
107 * Note: This is in section 7.1.5 of the IEEE 802.15.4 document.
108 * Note: This API does not provide extended information such as what
109 * channel the PAN is on or what the LQI of the beacon frame was on
110 * receipt.
111 * Note: This API cannot indicate a beacon frame for a coordinator
112 * operating in long addressing mode.
113 */
114int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid,
115 u16 coord_addr);
116
117/**
118 * ieee802154_nl_start_confirm - Notify userland of completion of start.
119 * @dev: The device which was instructed to scan.
120 * @status: The status of the scan operation.
121 *
122 * Note: This is in section 7.1.14 of the IEEE 802.15.4 document.
123 */
124int ieee802154_nl_start_confirm(struct net_device *dev, u8 status);
125
126#endif
1#ifndef __NL802154_H
2#define __NL802154_H
3/*
4 * 802.15.4 netlink interface public header
5 *
6 * Copyright 2014 Alexander Aring <aar@pengutronix.de>
7 *
8 * Permission to use, copy, modify, and/or distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 *
20 */
21
22#include <linux/types.h>
23
24#define NL802154_GENL_NAME "nl802154"
25
26enum nl802154_commands {
27/* don't change the order or add anything between, this is ABI! */
28/* currently we don't shipping this file via uapi, ignore the above one */
29 NL802154_CMD_UNSPEC,
30
31 NL802154_CMD_GET_WPAN_PHY, /* can dump */
32 NL802154_CMD_SET_WPAN_PHY,
33 NL802154_CMD_NEW_WPAN_PHY,
34 NL802154_CMD_DEL_WPAN_PHY,
35
36 NL802154_CMD_GET_INTERFACE, /* can dump */
37 NL802154_CMD_SET_INTERFACE,
38 NL802154_CMD_NEW_INTERFACE,
39 NL802154_CMD_DEL_INTERFACE,
40
41 NL802154_CMD_SET_CHANNEL,
42
43 NL802154_CMD_SET_PAN_ID,
44 NL802154_CMD_SET_SHORT_ADDR,
45
46 NL802154_CMD_SET_TX_POWER,
47 NL802154_CMD_SET_CCA_MODE,
48 NL802154_CMD_SET_CCA_ED_LEVEL,
49
50 NL802154_CMD_SET_MAX_FRAME_RETRIES,
51
52 NL802154_CMD_SET_BACKOFF_EXPONENT,
53 NL802154_CMD_SET_MAX_CSMA_BACKOFFS,
54
55 NL802154_CMD_SET_LBT_MODE,
56
57 NL802154_CMD_SET_ACKREQ_DEFAULT,
58
59 NL802154_CMD_SET_WPAN_PHY_NETNS,
60
61 NL802154_CMD_SET_SEC_PARAMS,
62 NL802154_CMD_GET_SEC_KEY, /* can dump */
63 NL802154_CMD_NEW_SEC_KEY,
64 NL802154_CMD_DEL_SEC_KEY,
65 NL802154_CMD_GET_SEC_DEV, /* can dump */
66 NL802154_CMD_NEW_SEC_DEV,
67 NL802154_CMD_DEL_SEC_DEV,
68 NL802154_CMD_GET_SEC_DEVKEY, /* can dump */
69 NL802154_CMD_NEW_SEC_DEVKEY,
70 NL802154_CMD_DEL_SEC_DEVKEY,
71 NL802154_CMD_GET_SEC_LEVEL, /* can dump */
72 NL802154_CMD_NEW_SEC_LEVEL,
73 NL802154_CMD_DEL_SEC_LEVEL,
74
75 NL802154_CMD_SCAN_EVENT,
76
77 /* add new commands above here */
78
79 /* used to define NL802154_CMD_MAX below */
80 __NL802154_CMD_AFTER_LAST,
81 NL802154_CMD_MAX = __NL802154_CMD_AFTER_LAST - 1
82};
83
84enum nl802154_attrs {
85/* don't change the order or add anything between, this is ABI! */
86/* currently we don't shipping this file via uapi, ignore the above one */
87 NL802154_ATTR_UNSPEC,
88
89 NL802154_ATTR_WPAN_PHY,
90 NL802154_ATTR_WPAN_PHY_NAME,
91
92 NL802154_ATTR_IFINDEX,
93 NL802154_ATTR_IFNAME,
94 NL802154_ATTR_IFTYPE,
95
96 NL802154_ATTR_WPAN_DEV,
97
98 NL802154_ATTR_PAGE,
99 NL802154_ATTR_CHANNEL,
100
101 NL802154_ATTR_PAN_ID,
102 NL802154_ATTR_SHORT_ADDR,
103
104 NL802154_ATTR_TX_POWER,
105
106 NL802154_ATTR_CCA_MODE,
107 NL802154_ATTR_CCA_OPT,
108 NL802154_ATTR_CCA_ED_LEVEL,
109
110 NL802154_ATTR_MAX_FRAME_RETRIES,
111
112 NL802154_ATTR_MAX_BE,
113 NL802154_ATTR_MIN_BE,
114 NL802154_ATTR_MAX_CSMA_BACKOFFS,
115
116 NL802154_ATTR_LBT_MODE,
117
118 NL802154_ATTR_GENERATION,
119
120 NL802154_ATTR_CHANNELS_SUPPORTED,
121 NL802154_ATTR_SUPPORTED_CHANNEL,
122
123 NL802154_ATTR_EXTENDED_ADDR,
124
125 NL802154_ATTR_WPAN_PHY_CAPS,
126
127 NL802154_ATTR_SUPPORTED_COMMANDS,
128
129 NL802154_ATTR_ACKREQ_DEFAULT,
130
131 NL802154_ATTR_PAD,
132
133 NL802154_ATTR_PID,
134 NL802154_ATTR_NETNS_FD,
135
136 NL802154_ATTR_COORDINATOR,
137
138 /* add attributes here, update the policy in nl802154.c */
139
140#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
141 NL802154_ATTR_SEC_ENABLED,
142 NL802154_ATTR_SEC_OUT_LEVEL,
143 NL802154_ATTR_SEC_OUT_KEY_ID,
144 NL802154_ATTR_SEC_FRAME_COUNTER,
145
146 NL802154_ATTR_SEC_LEVEL,
147 NL802154_ATTR_SEC_DEVICE,
148 NL802154_ATTR_SEC_DEVKEY,
149 NL802154_ATTR_SEC_KEY,
150#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
151
152 __NL802154_ATTR_AFTER_LAST,
153 NL802154_ATTR_MAX = __NL802154_ATTR_AFTER_LAST - 1
154};
155
156enum nl802154_iftype {
157 NL802154_IFTYPE_UNSPEC = (~(__u32)0),
158
159 NL802154_IFTYPE_NODE = 0,
160 NL802154_IFTYPE_MONITOR,
161 NL802154_IFTYPE_COORD,
162
163 /* keep last */
164 NUM_NL802154_IFTYPES,
165 NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1
166};
167
168/**
169 * enum nl802154_wpan_phy_capability_attr - wpan phy capability attributes
170 *
171 * @__NL802154_CAP_ATTR_INVALID: attribute number 0 is reserved
172 * @NL802154_CAP_ATTR_CHANNELS: a nested attribute for nl802154_channel_attr
173 * @NL802154_CAP_ATTR_TX_POWERS: a nested attribute for
174 * nl802154_wpan_phy_tx_power
175 * @NL802154_CAP_ATTR_MIN_CCA_ED_LEVEL: minimum value for cca_ed_level
176 * @NL802154_CAP_ATTR_MAX_CCA_ED_LEVEL: maxmimum value for cca_ed_level
177 * @NL802154_CAP_ATTR_CCA_MODES: nl802154_cca_modes flags
178 * @NL802154_CAP_ATTR_CCA_OPTS: nl802154_cca_opts flags
179 * @NL802154_CAP_ATTR_MIN_MINBE: minimum of minbe value
180 * @NL802154_CAP_ATTR_MAX_MINBE: maximum of minbe value
181 * @NL802154_CAP_ATTR_MIN_MAXBE: minimum of maxbe value
182 * @NL802154_CAP_ATTR_MAX_MINBE: maximum of maxbe value
183 * @NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS: minimum of csma backoff value
184 * @NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS: maximum of csma backoffs value
185 * @NL802154_CAP_ATTR_MIN_FRAME_RETRIES: minimum of frame retries value
186 * @NL802154_CAP_ATTR_MAX_FRAME_RETRIES: maximum of frame retries value
187 * @NL802154_CAP_ATTR_IFTYPES: nl802154_iftype flags
188 * @NL802154_CAP_ATTR_LBT: nl802154_supported_bool_states flags
189 * @NL802154_CAP_ATTR_MAX: highest cap attribute currently defined
190 * @__NL802154_CAP_ATTR_AFTER_LAST: internal use
191 */
192enum nl802154_wpan_phy_capability_attr {
193 __NL802154_CAP_ATTR_INVALID,
194
195 NL802154_CAP_ATTR_IFTYPES,
196
197 NL802154_CAP_ATTR_CHANNELS,
198 NL802154_CAP_ATTR_TX_POWERS,
199
200 NL802154_CAP_ATTR_CCA_ED_LEVELS,
201 NL802154_CAP_ATTR_CCA_MODES,
202 NL802154_CAP_ATTR_CCA_OPTS,
203
204 NL802154_CAP_ATTR_MIN_MINBE,
205 NL802154_CAP_ATTR_MAX_MINBE,
206
207 NL802154_CAP_ATTR_MIN_MAXBE,
208 NL802154_CAP_ATTR_MAX_MAXBE,
209
210 NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS,
211 NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS,
212
213 NL802154_CAP_ATTR_MIN_FRAME_RETRIES,
214 NL802154_CAP_ATTR_MAX_FRAME_RETRIES,
215
216 NL802154_CAP_ATTR_LBT,
217
218 /* keep last */
219 __NL802154_CAP_ATTR_AFTER_LAST,
220 NL802154_CAP_ATTR_MAX = __NL802154_CAP_ATTR_AFTER_LAST - 1
221};
222
223/**
224 * enum nl802154_coord - Netlink attributes for a coord
225 *
226 * @__NL802154_COORD_INVALID: invalid
227 * @NL802154_COORD_PANID: PANID of the coordinator (2 bytes)
228 * @NL802154_COORD_ADDR: coordinator address, (8 bytes or 2 bytes)
229 * @NL802154_COORD_CHANNEL: channel number, related to @NL802154_COORD_PAGE (u8)
230 * @NL802154_COORD_PAGE: channel page, related to @NL802154_COORD_CHANNEL (u8)
231 * @NL802154_COORD_PREAMBLE_CODE: Preamble code used when the beacon was received,
232 * this is PHY dependent and optional (u8)
233 * @NL802154_COORD_MEAN_PRF: Mean PRF used when the beacon was received,
234 * this is PHY dependent and optional (u8)
235 * @NL802154_COORD_SUPERFRAME_SPEC: superframe specification of the PAN (u16)
236 * @NL802154_COORD_LINK_QUALITY: signal quality of beacon in unspecified units,
237 * scaled to 0..255 (u8)
238 * @NL802154_COORD_GTS_PERMIT: set to true if GTS is permitted on this PAN
239 * @NL802154_COORD_PAYLOAD_DATA: binary data containing the raw data from the
240 * frame payload, (only if beacon or probe response had data)
241 * @NL802154_COORD_PAD: attribute used for padding for 64-bit alignment
242 * @NL802154_COORD_MAX: highest coordinator attribute
243 */
244enum nl802154_coord {
245 __NL802154_COORD_INVALID,
246 NL802154_COORD_PANID,
247 NL802154_COORD_ADDR,
248 NL802154_COORD_CHANNEL,
249 NL802154_COORD_PAGE,
250 NL802154_COORD_PREAMBLE_CODE,
251 NL802154_COORD_MEAN_PRF,
252 NL802154_COORD_SUPERFRAME_SPEC,
253 NL802154_COORD_LINK_QUALITY,
254 NL802154_COORD_GTS_PERMIT,
255 NL802154_COORD_PAYLOAD_DATA,
256 NL802154_COORD_PAD,
257
258 /* keep last */
259 NL802154_COORD_MAX,
260};
261
262/**
263 * enum nl802154_cca_modes - cca modes
264 *
265 * @__NL802154_CCA_INVALID: cca mode number 0 is reserved
266 * @NL802154_CCA_ENERGY: Energy above threshold
267 * @NL802154_CCA_CARRIER: Carrier sense only
268 * @NL802154_CCA_ENERGY_CARRIER: Carrier sense with energy above threshold
269 * @NL802154_CCA_ALOHA: CCA shall always report an idle medium
270 * @NL802154_CCA_UWB_SHR: UWB preamble sense based on the SHR of a frame
271 * @NL802154_CCA_UWB_MULTIPLEXED: UWB preamble sense based on the packet with
272 * the multiplexed preamble
273 * @__NL802154_CCA_ATTR_AFTER_LAST: Internal
274 * @NL802154_CCA_ATTR_MAX: Maximum CCA attribute number
275 */
276enum nl802154_cca_modes {
277 __NL802154_CCA_INVALID,
278 NL802154_CCA_ENERGY,
279 NL802154_CCA_CARRIER,
280 NL802154_CCA_ENERGY_CARRIER,
281 NL802154_CCA_ALOHA,
282 NL802154_CCA_UWB_SHR,
283 NL802154_CCA_UWB_MULTIPLEXED,
284
285 /* keep last */
286 __NL802154_CCA_ATTR_AFTER_LAST,
287 NL802154_CCA_ATTR_MAX = __NL802154_CCA_ATTR_AFTER_LAST - 1
288};
289
290/**
291 * enum nl802154_cca_opts - additional options for cca modes
292 *
293 * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL802154_CCA_ENERGY_CARRIER with OR
294 * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802154_CCA_ENERGY_CARRIER with AND
295 */
296enum nl802154_cca_opts {
297 NL802154_CCA_OPT_ENERGY_CARRIER_AND,
298 NL802154_CCA_OPT_ENERGY_CARRIER_OR,
299
300 /* keep last */
301 __NL802154_CCA_OPT_ATTR_AFTER_LAST,
302 NL802154_CCA_OPT_ATTR_MAX = __NL802154_CCA_OPT_ATTR_AFTER_LAST - 1
303};
304
305/**
306 * enum nl802154_supported_bool_states - bool states for bool capability entry
307 *
308 * @NL802154_SUPPORTED_BOOL_FALSE: indicates to set false
309 * @NL802154_SUPPORTED_BOOL_TRUE: indicates to set true
310 * @__NL802154_SUPPORTED_BOOL_INVALD: reserved
311 * @NL802154_SUPPORTED_BOOL_BOTH: indicates to set true and false
312 * @__NL802154_SUPPORTED_BOOL_AFTER_LAST: Internal
313 * @NL802154_SUPPORTED_BOOL_MAX: highest value for bool states
314 */
315enum nl802154_supported_bool_states {
316 NL802154_SUPPORTED_BOOL_FALSE,
317 NL802154_SUPPORTED_BOOL_TRUE,
318 /* to handle them in a mask */
319 __NL802154_SUPPORTED_BOOL_INVALD,
320 NL802154_SUPPORTED_BOOL_BOTH,
321
322 /* keep last */
323 __NL802154_SUPPORTED_BOOL_AFTER_LAST,
324 NL802154_SUPPORTED_BOOL_MAX = __NL802154_SUPPORTED_BOOL_AFTER_LAST - 1
325};
326
327#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
328
329enum nl802154_dev_addr_modes {
330 NL802154_DEV_ADDR_NONE,
331 __NL802154_DEV_ADDR_INVALID,
332 NL802154_DEV_ADDR_SHORT,
333 NL802154_DEV_ADDR_EXTENDED,
334
335 /* keep last */
336 __NL802154_DEV_ADDR_AFTER_LAST,
337 NL802154_DEV_ADDR_MAX = __NL802154_DEV_ADDR_AFTER_LAST - 1
338};
339
340enum nl802154_dev_addr_attrs {
341 NL802154_DEV_ADDR_ATTR_UNSPEC,
342
343 NL802154_DEV_ADDR_ATTR_PAN_ID,
344 NL802154_DEV_ADDR_ATTR_MODE,
345 NL802154_DEV_ADDR_ATTR_SHORT,
346 NL802154_DEV_ADDR_ATTR_EXTENDED,
347 NL802154_DEV_ADDR_ATTR_PAD,
348
349 /* keep last */
350 __NL802154_DEV_ADDR_ATTR_AFTER_LAST,
351 NL802154_DEV_ADDR_ATTR_MAX = __NL802154_DEV_ADDR_ATTR_AFTER_LAST - 1
352};
353
354enum nl802154_key_id_modes {
355 NL802154_KEY_ID_MODE_IMPLICIT,
356 NL802154_KEY_ID_MODE_INDEX,
357 NL802154_KEY_ID_MODE_INDEX_SHORT,
358 NL802154_KEY_ID_MODE_INDEX_EXTENDED,
359
360 /* keep last */
361 __NL802154_KEY_ID_MODE_AFTER_LAST,
362 NL802154_KEY_ID_MODE_MAX = __NL802154_KEY_ID_MODE_AFTER_LAST - 1
363};
364
365enum nl802154_key_id_attrs {
366 NL802154_KEY_ID_ATTR_UNSPEC,
367
368 NL802154_KEY_ID_ATTR_MODE,
369 NL802154_KEY_ID_ATTR_INDEX,
370 NL802154_KEY_ID_ATTR_IMPLICIT,
371 NL802154_KEY_ID_ATTR_SOURCE_SHORT,
372 NL802154_KEY_ID_ATTR_SOURCE_EXTENDED,
373 NL802154_KEY_ID_ATTR_PAD,
374
375 /* keep last */
376 __NL802154_KEY_ID_ATTR_AFTER_LAST,
377 NL802154_KEY_ID_ATTR_MAX = __NL802154_KEY_ID_ATTR_AFTER_LAST - 1
378};
379
380enum nl802154_seclevels {
381 NL802154_SECLEVEL_NONE,
382 NL802154_SECLEVEL_MIC32,
383 NL802154_SECLEVEL_MIC64,
384 NL802154_SECLEVEL_MIC128,
385 NL802154_SECLEVEL_ENC,
386 NL802154_SECLEVEL_ENC_MIC32,
387 NL802154_SECLEVEL_ENC_MIC64,
388 NL802154_SECLEVEL_ENC_MIC128,
389
390 /* keep last */
391 __NL802154_SECLEVEL_AFTER_LAST,
392 NL802154_SECLEVEL_MAX = __NL802154_SECLEVEL_AFTER_LAST - 1
393};
394
395enum nl802154_frames {
396 NL802154_FRAME_BEACON,
397 NL802154_FRAME_DATA,
398 NL802154_FRAME_ACK,
399 NL802154_FRAME_CMD,
400
401 /* keep last */
402 __NL802154_FRAME_AFTER_LAST,
403 NL802154_FRAME_MAX = __NL802154_FRAME_AFTER_LAST - 1
404};
405
406enum nl802154_cmd_frames {
407 __NL802154_CMD_FRAME_INVALID,
408 NL802154_CMD_FRAME_ASSOC_REQUEST,
409 NL802154_CMD_FRAME_ASSOC_RESPONSE,
410 NL802154_CMD_FRAME_DISASSOC_NOTIFY,
411 NL802154_CMD_FRAME_DATA_REQUEST,
412 NL802154_CMD_FRAME_PAN_ID_CONFLICT_NOTIFY,
413 NL802154_CMD_FRAME_ORPHAN_NOTIFY,
414 NL802154_CMD_FRAME_BEACON_REQUEST,
415 NL802154_CMD_FRAME_COORD_REALIGNMENT,
416 NL802154_CMD_FRAME_GTS_REQUEST,
417
418 /* keep last */
419 __NL802154_CMD_FRAME_AFTER_LAST,
420 NL802154_CMD_FRAME_MAX = __NL802154_CMD_FRAME_AFTER_LAST - 1
421};
422
423enum nl802154_seclevel_attrs {
424 NL802154_SECLEVEL_ATTR_UNSPEC,
425
426 NL802154_SECLEVEL_ATTR_LEVELS,
427 NL802154_SECLEVEL_ATTR_FRAME,
428 NL802154_SECLEVEL_ATTR_CMD_FRAME,
429 NL802154_SECLEVEL_ATTR_DEV_OVERRIDE,
430
431 /* keep last */
432 __NL802154_SECLEVEL_ATTR_AFTER_LAST,
433 NL802154_SECLEVEL_ATTR_MAX = __NL802154_SECLEVEL_ATTR_AFTER_LAST - 1
434};
435
436/* TODO what is this? couldn't find in mib */
437enum {
438 NL802154_DEVKEY_IGNORE,
439 NL802154_DEVKEY_RESTRICT,
440 NL802154_DEVKEY_RECORD,
441
442 /* keep last */
443 __NL802154_DEVKEY_AFTER_LAST,
444 NL802154_DEVKEY_MAX = __NL802154_DEVKEY_AFTER_LAST - 1
445};
446
447enum nl802154_dev {
448 NL802154_DEV_ATTR_UNSPEC,
449
450 NL802154_DEV_ATTR_FRAME_COUNTER,
451 NL802154_DEV_ATTR_PAN_ID,
452 NL802154_DEV_ATTR_SHORT_ADDR,
453 NL802154_DEV_ATTR_EXTENDED_ADDR,
454 NL802154_DEV_ATTR_SECLEVEL_EXEMPT,
455 NL802154_DEV_ATTR_KEY_MODE,
456 NL802154_DEV_ATTR_PAD,
457
458 /* keep last */
459 __NL802154_DEV_ATTR_AFTER_LAST,
460 NL802154_DEV_ATTR_MAX = __NL802154_DEV_ATTR_AFTER_LAST - 1
461};
462
463enum nl802154_devkey {
464 NL802154_DEVKEY_ATTR_UNSPEC,
465
466 NL802154_DEVKEY_ATTR_FRAME_COUNTER,
467 NL802154_DEVKEY_ATTR_EXTENDED_ADDR,
468 NL802154_DEVKEY_ATTR_ID,
469 NL802154_DEVKEY_ATTR_PAD,
470
471 /* keep last */
472 __NL802154_DEVKEY_ATTR_AFTER_LAST,
473 NL802154_DEVKEY_ATTR_MAX = __NL802154_DEVKEY_ATTR_AFTER_LAST - 1
474};
475
476enum nl802154_key {
477 NL802154_KEY_ATTR_UNSPEC,
478
479 NL802154_KEY_ATTR_ID,
480 NL802154_KEY_ATTR_USAGE_FRAMES,
481 NL802154_KEY_ATTR_USAGE_CMDS,
482 NL802154_KEY_ATTR_BYTES,
483
484 /* keep last */
485 __NL802154_KEY_ATTR_AFTER_LAST,
486 NL802154_KEY_ATTR_MAX = __NL802154_KEY_ATTR_AFTER_LAST - 1
487};
488
489#define NL802154_KEY_SIZE 16
490#define NL802154_CMD_FRAME_NR_IDS 256
491
492#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
493
494#endif /* __NL802154_H */