Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 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 | * |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef NL802154_H |
| 18 | #define NL802154_H |
| 19 | |
| 20 | #define IEEE802154_NL_NAME "802.15.4 MAC" |
| 21 | #define IEEE802154_MCAST_COORD_NAME "coordinator" |
| 22 | #define IEEE802154_MCAST_BEACON_NAME "beacon" |
| 23 | |
| 24 | enum { |
| 25 | __IEEE802154_ATTR_INVALID, |
| 26 | |
| 27 | IEEE802154_ATTR_DEV_NAME, |
| 28 | IEEE802154_ATTR_DEV_INDEX, |
| 29 | |
| 30 | IEEE802154_ATTR_STATUS, |
| 31 | |
| 32 | IEEE802154_ATTR_SHORT_ADDR, |
| 33 | IEEE802154_ATTR_HW_ADDR, |
| 34 | IEEE802154_ATTR_PAN_ID, |
| 35 | |
| 36 | IEEE802154_ATTR_CHANNEL, |
| 37 | |
| 38 | IEEE802154_ATTR_COORD_SHORT_ADDR, |
| 39 | IEEE802154_ATTR_COORD_HW_ADDR, |
| 40 | IEEE802154_ATTR_COORD_PAN_ID, |
| 41 | |
| 42 | IEEE802154_ATTR_SRC_SHORT_ADDR, |
| 43 | IEEE802154_ATTR_SRC_HW_ADDR, |
| 44 | IEEE802154_ATTR_SRC_PAN_ID, |
| 45 | |
| 46 | IEEE802154_ATTR_DEST_SHORT_ADDR, |
| 47 | IEEE802154_ATTR_DEST_HW_ADDR, |
| 48 | IEEE802154_ATTR_DEST_PAN_ID, |
| 49 | |
| 50 | IEEE802154_ATTR_CAPABILITY, |
| 51 | IEEE802154_ATTR_REASON, |
| 52 | IEEE802154_ATTR_SCAN_TYPE, |
| 53 | IEEE802154_ATTR_CHANNELS, |
| 54 | IEEE802154_ATTR_DURATION, |
| 55 | IEEE802154_ATTR_ED_LIST, |
| 56 | IEEE802154_ATTR_BCN_ORD, |
| 57 | IEEE802154_ATTR_SF_ORD, |
| 58 | IEEE802154_ATTR_PAN_COORD, |
| 59 | IEEE802154_ATTR_BAT_EXT, |
| 60 | IEEE802154_ATTR_COORD_REALIGN, |
| 61 | IEEE802154_ATTR_SEC, |
| 62 | |
Dmitry Eremin-Solenikov | 16eea49 | 2009-08-19 19:32:24 +0400 | [diff] [blame] | 63 | IEEE802154_ATTR_PAGE, |
Dmitry Eremin-Solenikov | 1eaa9d0 | 2009-09-15 17:04:44 +0400 | [diff] [blame] | 64 | IEEE802154_ATTR_CHANNEL_PAGE_LIST, |
| 65 | |
| 66 | IEEE802154_ATTR_PHY_NAME, |
alex.bluesman.smirnov@gmail.com | 90c049b | 2012-05-15 20:50:27 +0000 | [diff] [blame] | 67 | IEEE802154_ATTR_DEV_TYPE, |
Dmitry Eremin-Solenikov | 16eea49 | 2009-08-19 19:32:24 +0400 | [diff] [blame] | 68 | |
Phoebe Buckheister | 9b2777d | 2014-02-17 11:34:08 +0100 | [diff] [blame] | 69 | IEEE802154_ATTR_TXPOWER, |
Phoebe Buckheister | 84dda3c | 2014-02-17 11:34:10 +0100 | [diff] [blame] | 70 | IEEE802154_ATTR_LBT_ENABLED, |
Phoebe Buckheister | ba08fea | 2014-02-17 11:34:11 +0100 | [diff] [blame] | 71 | IEEE802154_ATTR_CCA_MODE, |
Phoebe Buckheister | 6ca0019 | 2014-02-17 11:34:12 +0100 | [diff] [blame] | 72 | IEEE802154_ATTR_CCA_ED_LEVEL, |
Phoebe Buckheister | 4244db1 | 2014-02-17 11:34:14 +0100 | [diff] [blame] | 73 | IEEE802154_ATTR_CSMA_RETRIES, |
| 74 | IEEE802154_ATTR_CSMA_MIN_BE, |
| 75 | IEEE802154_ATTR_CSMA_MAX_BE, |
| 76 | |
| 77 | IEEE802154_ATTR_FRAME_RETRIES, |
Phoebe Buckheister | 9b2777d | 2014-02-17 11:34:08 +0100 | [diff] [blame] | 78 | |
Phoebe Buckheister | 3e9c156 | 2014-05-16 17:46:44 +0200 | [diff] [blame] | 79 | IEEE802154_ATTR_LLSEC_ENABLED, |
| 80 | IEEE802154_ATTR_LLSEC_SECLEVEL, |
| 81 | IEEE802154_ATTR_LLSEC_KEY_MODE, |
| 82 | IEEE802154_ATTR_LLSEC_KEY_SOURCE_SHORT, |
| 83 | IEEE802154_ATTR_LLSEC_KEY_SOURCE_EXTENDED, |
| 84 | IEEE802154_ATTR_LLSEC_KEY_ID, |
| 85 | IEEE802154_ATTR_LLSEC_FRAME_COUNTER, |
| 86 | IEEE802154_ATTR_LLSEC_KEY_BYTES, |
| 87 | IEEE802154_ATTR_LLSEC_KEY_USAGE_FRAME_TYPES, |
| 88 | IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS, |
| 89 | IEEE802154_ATTR_LLSEC_FRAME_TYPE, |
| 90 | IEEE802154_ATTR_LLSEC_CMD_FRAME_ID, |
| 91 | IEEE802154_ATTR_LLSEC_SECLEVELS, |
| 92 | IEEE802154_ATTR_LLSEC_DEV_OVERRIDE, |
| 93 | IEEE802154_ATTR_LLSEC_DEV_KEY_MODE, |
| 94 | |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 95 | __IEEE802154_ATTR_MAX, |
| 96 | }; |
| 97 | |
| 98 | #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1) |
| 99 | |
Dmitry Baryshkov | 78090a5 | 2009-08-07 02:58:38 +0000 | [diff] [blame] | 100 | extern const struct nla_policy ieee802154_policy[]; |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 101 | |
| 102 | /* commands */ |
| 103 | /* REQ should be responded with CONF |
| 104 | * and INDIC with RESP |
| 105 | */ |
| 106 | enum { |
| 107 | __IEEE802154_COMMAND_INVALID, |
| 108 | |
| 109 | IEEE802154_ASSOCIATE_REQ, |
| 110 | IEEE802154_ASSOCIATE_CONF, |
| 111 | IEEE802154_DISASSOCIATE_REQ, |
| 112 | IEEE802154_DISASSOCIATE_CONF, |
| 113 | IEEE802154_GET_REQ, |
| 114 | IEEE802154_GET_CONF, |
| 115 | IEEE802154_RESET_REQ, |
| 116 | IEEE802154_RESET_CONF, |
| 117 | IEEE802154_SCAN_REQ, |
| 118 | IEEE802154_SCAN_CONF, |
| 119 | IEEE802154_SET_REQ, |
| 120 | IEEE802154_SET_CONF, |
| 121 | IEEE802154_START_REQ, |
| 122 | IEEE802154_START_CONF, |
| 123 | IEEE802154_SYNC_REQ, |
| 124 | IEEE802154_POLL_REQ, |
| 125 | IEEE802154_POLL_CONF, |
| 126 | |
| 127 | IEEE802154_ASSOCIATE_INDIC, |
| 128 | IEEE802154_ASSOCIATE_RESP, |
| 129 | IEEE802154_DISASSOCIATE_INDIC, |
| 130 | IEEE802154_BEACON_NOTIFY_INDIC, |
| 131 | IEEE802154_ORPHAN_INDIC, |
| 132 | IEEE802154_ORPHAN_RESP, |
| 133 | IEEE802154_COMM_STATUS_INDIC, |
| 134 | IEEE802154_SYNC_LOSS_INDIC, |
| 135 | |
| 136 | IEEE802154_GTS_REQ, /* Not supported yet */ |
| 137 | IEEE802154_GTS_INDIC, /* Not supported yet */ |
| 138 | IEEE802154_GTS_CONF, /* Not supported yet */ |
| 139 | IEEE802154_RX_ENABLE_REQ, /* Not supported yet */ |
| 140 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ |
| 141 | |
Dmitry Baryshkov | 8e753dd | 2009-08-07 02:58:40 +0000 | [diff] [blame] | 142 | IEEE802154_LIST_IFACE, |
Dmitry Eremin-Solenikov | 1eaa9d0 | 2009-09-15 17:04:44 +0400 | [diff] [blame] | 143 | IEEE802154_LIST_PHY, |
Dmitry Eremin-Solenikov | bb1cafb | 2009-11-05 16:56:23 +0300 | [diff] [blame] | 144 | IEEE802154_ADD_IFACE, |
| 145 | IEEE802154_DEL_IFACE, |
Dmitry Baryshkov | 8e753dd | 2009-08-07 02:58:40 +0000 | [diff] [blame] | 146 | |
Phoebe Buckheister | e462ded | 2014-03-31 21:37:46 +0200 | [diff] [blame] | 147 | IEEE802154_SET_MACPARAMS, |
Phoebe Buckheister | 9b2777d | 2014-02-17 11:34:08 +0100 | [diff] [blame] | 148 | |
Phoebe Buckheister | 3e9c156 | 2014-05-16 17:46:44 +0200 | [diff] [blame] | 149 | IEEE802154_LLSEC_GETPARAMS, |
| 150 | IEEE802154_LLSEC_SETPARAMS, |
| 151 | IEEE802154_LLSEC_LIST_KEY, |
| 152 | IEEE802154_LLSEC_ADD_KEY, |
| 153 | IEEE802154_LLSEC_DEL_KEY, |
| 154 | IEEE802154_LLSEC_LIST_DEV, |
| 155 | IEEE802154_LLSEC_ADD_DEV, |
| 156 | IEEE802154_LLSEC_DEL_DEV, |
| 157 | IEEE802154_LLSEC_LIST_DEVKEY, |
| 158 | IEEE802154_LLSEC_ADD_DEVKEY, |
| 159 | IEEE802154_LLSEC_DEL_DEVKEY, |
| 160 | IEEE802154_LLSEC_LIST_SECLEVEL, |
| 161 | IEEE802154_LLSEC_ADD_SECLEVEL, |
| 162 | IEEE802154_LLSEC_DEL_SECLEVEL, |
| 163 | |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 164 | __IEEE802154_CMD_MAX, |
| 165 | }; |
| 166 | |
| 167 | #define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1) |
| 168 | |
alex.bluesman.smirnov@gmail.com | 90c049b | 2012-05-15 20:50:27 +0000 | [diff] [blame] | 169 | enum { |
| 170 | __IEEE802154_DEV_INVALID = -1, |
alex.bluesman.smirnov@gmail.com | 0606069 | 2012-05-15 20:50:29 +0000 | [diff] [blame] | 171 | |
alex.bluesman.smirnov@gmail.com | 32bad7e | 2012-06-25 23:24:48 +0000 | [diff] [blame] | 172 | IEEE802154_DEV_WPAN, |
| 173 | IEEE802154_DEV_MONITOR, |
alex.bluesman.smirnov@gmail.com | 0606069 | 2012-05-15 20:50:29 +0000 | [diff] [blame] | 174 | |
alex.bluesman.smirnov@gmail.com | 90c049b | 2012-05-15 20:50:27 +0000 | [diff] [blame] | 175 | __IEEE802154_DEV_MAX, |
| 176 | }; |
| 177 | |
Sergey Lapin | 2c21d11 | 2009-06-08 12:18:49 +0000 | [diff] [blame] | 178 | #endif |