2019-05-27 14:55:21 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-06-08 20:18:49 +08:00
|
|
|
/*
|
|
|
|
* nl802154.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007, 2008, 2009 Siemens AG
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NL802154_H
|
|
|
|
#define NL802154_H
|
|
|
|
|
2022-07-27 05:56:52 +08:00
|
|
|
#include <net/netlink.h>
|
|
|
|
|
2009-06-08 20:18:49 +08:00
|
|
|
#define IEEE802154_NL_NAME "802.15.4 MAC"
|
|
|
|
#define IEEE802154_MCAST_COORD_NAME "coordinator"
|
|
|
|
#define IEEE802154_MCAST_BEACON_NAME "beacon"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
__IEEE802154_ATTR_INVALID,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_DEV_NAME,
|
|
|
|
IEEE802154_ATTR_DEV_INDEX,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_STATUS,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_SHORT_ADDR,
|
|
|
|
IEEE802154_ATTR_HW_ADDR,
|
|
|
|
IEEE802154_ATTR_PAN_ID,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_CHANNEL,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_COORD_SHORT_ADDR,
|
|
|
|
IEEE802154_ATTR_COORD_HW_ADDR,
|
|
|
|
IEEE802154_ATTR_COORD_PAN_ID,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_SRC_SHORT_ADDR,
|
|
|
|
IEEE802154_ATTR_SRC_HW_ADDR,
|
|
|
|
IEEE802154_ATTR_SRC_PAN_ID,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_DEST_SHORT_ADDR,
|
|
|
|
IEEE802154_ATTR_DEST_HW_ADDR,
|
|
|
|
IEEE802154_ATTR_DEST_PAN_ID,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_CAPABILITY,
|
|
|
|
IEEE802154_ATTR_REASON,
|
|
|
|
IEEE802154_ATTR_SCAN_TYPE,
|
|
|
|
IEEE802154_ATTR_CHANNELS,
|
|
|
|
IEEE802154_ATTR_DURATION,
|
|
|
|
IEEE802154_ATTR_ED_LIST,
|
|
|
|
IEEE802154_ATTR_BCN_ORD,
|
|
|
|
IEEE802154_ATTR_SF_ORD,
|
|
|
|
IEEE802154_ATTR_PAN_COORD,
|
|
|
|
IEEE802154_ATTR_BAT_EXT,
|
|
|
|
IEEE802154_ATTR_COORD_REALIGN,
|
|
|
|
IEEE802154_ATTR_SEC,
|
|
|
|
|
2009-08-19 23:32:24 +08:00
|
|
|
IEEE802154_ATTR_PAGE,
|
2009-09-15 21:04:44 +08:00
|
|
|
IEEE802154_ATTR_CHANNEL_PAGE_LIST,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_PHY_NAME,
|
2012-05-16 04:50:27 +08:00
|
|
|
IEEE802154_ATTR_DEV_TYPE,
|
2009-08-19 23:32:24 +08:00
|
|
|
|
2014-02-17 18:34:08 +08:00
|
|
|
IEEE802154_ATTR_TXPOWER,
|
2014-02-17 18:34:10 +08:00
|
|
|
IEEE802154_ATTR_LBT_ENABLED,
|
2014-02-17 18:34:11 +08:00
|
|
|
IEEE802154_ATTR_CCA_MODE,
|
2014-02-17 18:34:12 +08:00
|
|
|
IEEE802154_ATTR_CCA_ED_LEVEL,
|
2014-02-17 18:34:14 +08:00
|
|
|
IEEE802154_ATTR_CSMA_RETRIES,
|
|
|
|
IEEE802154_ATTR_CSMA_MIN_BE,
|
|
|
|
IEEE802154_ATTR_CSMA_MAX_BE,
|
|
|
|
|
|
|
|
IEEE802154_ATTR_FRAME_RETRIES,
|
2014-02-17 18:34:08 +08:00
|
|
|
|
2014-05-16 23:46:44 +08:00
|
|
|
IEEE802154_ATTR_LLSEC_ENABLED,
|
|
|
|
IEEE802154_ATTR_LLSEC_SECLEVEL,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_MODE,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_ID,
|
|
|
|
IEEE802154_ATTR_LLSEC_FRAME_COUNTER,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_BYTES,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES,
|
|
|
|
IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS,
|
|
|
|
IEEE802154_ATTR_LLSEC_FRAME_TYPE,
|
|
|
|
IEEE802154_ATTR_LLSEC_CMD_FRAME_ID,
|
|
|
|
IEEE802154_ATTR_LLSEC_SECLEVELS,
|
|
|
|
IEEE802154_ATTR_LLSEC_DEV_OVERRIDE,
|
|
|
|
IEEE802154_ATTR_LLSEC_DEV_KEY_MODE,
|
|
|
|
|
2016-04-25 16:25:20 +08:00
|
|
|
IEEE802154_ATTR_PAD,
|
|
|
|
|
2009-06-08 20:18:49 +08:00
|
|
|
__IEEE802154_ATTR_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
|
|
|
|
|
2009-08-07 10:58:38 +08:00
|
|
|
extern const struct nla_policy ieee802154_policy[];
|
2009-06-08 20:18:49 +08:00
|
|
|
|
|
|
|
/* commands */
|
|
|
|
/* REQ should be responded with CONF
|
|
|
|
* and INDIC with RESP
|
|
|
|
*/
|
|
|
|
enum {
|
|
|
|
__IEEE802154_COMMAND_INVALID,
|
|
|
|
|
|
|
|
IEEE802154_ASSOCIATE_REQ,
|
|
|
|
IEEE802154_ASSOCIATE_CONF,
|
|
|
|
IEEE802154_DISASSOCIATE_REQ,
|
|
|
|
IEEE802154_DISASSOCIATE_CONF,
|
|
|
|
IEEE802154_GET_REQ,
|
|
|
|
IEEE802154_GET_CONF,
|
|
|
|
IEEE802154_RESET_REQ,
|
|
|
|
IEEE802154_RESET_CONF,
|
|
|
|
IEEE802154_SCAN_REQ,
|
|
|
|
IEEE802154_SCAN_CONF,
|
|
|
|
IEEE802154_SET_REQ,
|
|
|
|
IEEE802154_SET_CONF,
|
|
|
|
IEEE802154_START_REQ,
|
|
|
|
IEEE802154_START_CONF,
|
|
|
|
IEEE802154_SYNC_REQ,
|
|
|
|
IEEE802154_POLL_REQ,
|
|
|
|
IEEE802154_POLL_CONF,
|
|
|
|
|
|
|
|
IEEE802154_ASSOCIATE_INDIC,
|
|
|
|
IEEE802154_ASSOCIATE_RESP,
|
|
|
|
IEEE802154_DISASSOCIATE_INDIC,
|
|
|
|
IEEE802154_BEACON_NOTIFY_INDIC,
|
|
|
|
IEEE802154_ORPHAN_INDIC,
|
|
|
|
IEEE802154_ORPHAN_RESP,
|
|
|
|
IEEE802154_COMM_STATUS_INDIC,
|
|
|
|
IEEE802154_SYNC_LOSS_INDIC,
|
|
|
|
|
|
|
|
IEEE802154_GTS_REQ, /* Not supported yet */
|
|
|
|
IEEE802154_GTS_INDIC, /* Not supported yet */
|
|
|
|
IEEE802154_GTS_CONF, /* Not supported yet */
|
|
|
|
IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
|
|
|
|
IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
|
|
|
|
|
2009-08-07 10:58:40 +08:00
|
|
|
IEEE802154_LIST_IFACE,
|
2009-09-15 21:04:44 +08:00
|
|
|
IEEE802154_LIST_PHY,
|
2009-11-05 21:56:23 +08:00
|
|
|
IEEE802154_ADD_IFACE,
|
|
|
|
IEEE802154_DEL_IFACE,
|
2009-08-07 10:58:40 +08:00
|
|
|
|
2014-04-01 03:37:46 +08:00
|
|
|
IEEE802154_SET_MACPARAMS,
|
2014-02-17 18:34:08 +08:00
|
|
|
|
2014-05-16 23:46:44 +08:00
|
|
|
IEEE802154_LLSEC_GETPARAMS,
|
|
|
|
IEEE802154_LLSEC_SETPARAMS,
|
|
|
|
IEEE802154_LLSEC_LIST_KEY,
|
|
|
|
IEEE802154_LLSEC_ADD_KEY,
|
|
|
|
IEEE802154_LLSEC_DEL_KEY,
|
|
|
|
IEEE802154_LLSEC_LIST_DEV,
|
|
|
|
IEEE802154_LLSEC_ADD_DEV,
|
|
|
|
IEEE802154_LLSEC_DEL_DEV,
|
|
|
|
IEEE802154_LLSEC_LIST_DEVKEY,
|
|
|
|
IEEE802154_LLSEC_ADD_DEVKEY,
|
|
|
|
IEEE802154_LLSEC_DEL_DEVKEY,
|
|
|
|
IEEE802154_LLSEC_LIST_SECLEVEL,
|
|
|
|
IEEE802154_LLSEC_ADD_SECLEVEL,
|
|
|
|
IEEE802154_LLSEC_DEL_SECLEVEL,
|
|
|
|
|
2009-06-08 20:18:49 +08:00
|
|
|
__IEEE802154_CMD_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
|
|
|
|
|
2012-05-16 04:50:27 +08:00
|
|
|
enum {
|
|
|
|
__IEEE802154_DEV_INVALID = -1,
|
2012-05-16 04:50:29 +08:00
|
|
|
|
2012-06-26 07:24:48 +08:00
|
|
|
IEEE802154_DEV_WPAN,
|
|
|
|
IEEE802154_DEV_MONITOR,
|
2012-05-16 04:50:29 +08:00
|
|
|
|
2012-05-16 04:50:27 +08:00
|
|
|
__IEEE802154_DEV_MAX,
|
|
|
|
};
|
|
|
|
|
2009-06-08 20:18:49 +08:00
|
|
|
#endif
|