blob: 5a3db3aa5f17425587411e26ed1736cb92a6a5c4 [file] [log] [blame]
Sergey Lapin2c21d112009-06-08 12:18:49 +00001/*
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 NL802154_H
22#define NL802154_H
23
24#define IEEE802154_NL_NAME "802.15.4 MAC"
25#define IEEE802154_MCAST_COORD_NAME "coordinator"
26#define IEEE802154_MCAST_BEACON_NAME "beacon"
27
28enum {
29 __IEEE802154_ATTR_INVALID,
30
31 IEEE802154_ATTR_DEV_NAME,
32 IEEE802154_ATTR_DEV_INDEX,
33
34 IEEE802154_ATTR_STATUS,
35
36 IEEE802154_ATTR_SHORT_ADDR,
37 IEEE802154_ATTR_HW_ADDR,
38 IEEE802154_ATTR_PAN_ID,
39
40 IEEE802154_ATTR_CHANNEL,
41
42 IEEE802154_ATTR_COORD_SHORT_ADDR,
43 IEEE802154_ATTR_COORD_HW_ADDR,
44 IEEE802154_ATTR_COORD_PAN_ID,
45
46 IEEE802154_ATTR_SRC_SHORT_ADDR,
47 IEEE802154_ATTR_SRC_HW_ADDR,
48 IEEE802154_ATTR_SRC_PAN_ID,
49
50 IEEE802154_ATTR_DEST_SHORT_ADDR,
51 IEEE802154_ATTR_DEST_HW_ADDR,
52 IEEE802154_ATTR_DEST_PAN_ID,
53
54 IEEE802154_ATTR_CAPABILITY,
55 IEEE802154_ATTR_REASON,
56 IEEE802154_ATTR_SCAN_TYPE,
57 IEEE802154_ATTR_CHANNELS,
58 IEEE802154_ATTR_DURATION,
59 IEEE802154_ATTR_ED_LIST,
60 IEEE802154_ATTR_BCN_ORD,
61 IEEE802154_ATTR_SF_ORD,
62 IEEE802154_ATTR_PAN_COORD,
63 IEEE802154_ATTR_BAT_EXT,
64 IEEE802154_ATTR_COORD_REALIGN,
65 IEEE802154_ATTR_SEC,
66
Dmitry Eremin-Solenikov16eea492009-08-19 19:32:24 +040067 IEEE802154_ATTR_PAGE,
Dmitry Eremin-Solenikov1eaa9d02009-09-15 17:04:44 +040068 IEEE802154_ATTR_CHANNEL_PAGE_LIST,
69
70 IEEE802154_ATTR_PHY_NAME,
alex.bluesman.smirnov@gmail.com90c049b2012-05-15 20:50:27 +000071 IEEE802154_ATTR_DEV_TYPE,
Dmitry Eremin-Solenikov16eea492009-08-19 19:32:24 +040072
Sergey Lapin2c21d112009-06-08 12:18:49 +000073 __IEEE802154_ATTR_MAX,
74};
75
76#define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
77
Dmitry Baryshkov78090a52009-08-07 02:58:38 +000078extern const struct nla_policy ieee802154_policy[];
Sergey Lapin2c21d112009-06-08 12:18:49 +000079
80/* commands */
81/* REQ should be responded with CONF
82 * and INDIC with RESP
83 */
84enum {
85 __IEEE802154_COMMAND_INVALID,
86
87 IEEE802154_ASSOCIATE_REQ,
88 IEEE802154_ASSOCIATE_CONF,
89 IEEE802154_DISASSOCIATE_REQ,
90 IEEE802154_DISASSOCIATE_CONF,
91 IEEE802154_GET_REQ,
92 IEEE802154_GET_CONF,
93 IEEE802154_RESET_REQ,
94 IEEE802154_RESET_CONF,
95 IEEE802154_SCAN_REQ,
96 IEEE802154_SCAN_CONF,
97 IEEE802154_SET_REQ,
98 IEEE802154_SET_CONF,
99 IEEE802154_START_REQ,
100 IEEE802154_START_CONF,
101 IEEE802154_SYNC_REQ,
102 IEEE802154_POLL_REQ,
103 IEEE802154_POLL_CONF,
104
105 IEEE802154_ASSOCIATE_INDIC,
106 IEEE802154_ASSOCIATE_RESP,
107 IEEE802154_DISASSOCIATE_INDIC,
108 IEEE802154_BEACON_NOTIFY_INDIC,
109 IEEE802154_ORPHAN_INDIC,
110 IEEE802154_ORPHAN_RESP,
111 IEEE802154_COMM_STATUS_INDIC,
112 IEEE802154_SYNC_LOSS_INDIC,
113
114 IEEE802154_GTS_REQ, /* Not supported yet */
115 IEEE802154_GTS_INDIC, /* Not supported yet */
116 IEEE802154_GTS_CONF, /* Not supported yet */
117 IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
118 IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
119
Dmitry Baryshkov8e753dd2009-08-07 02:58:40 +0000120 IEEE802154_LIST_IFACE,
Dmitry Eremin-Solenikov1eaa9d02009-09-15 17:04:44 +0400121 IEEE802154_LIST_PHY,
Dmitry Eremin-Solenikovbb1cafb2009-11-05 16:56:23 +0300122 IEEE802154_ADD_IFACE,
123 IEEE802154_DEL_IFACE,
Dmitry Baryshkov8e753dd2009-08-07 02:58:40 +0000124
Sergey Lapin2c21d112009-06-08 12:18:49 +0000125 __IEEE802154_CMD_MAX,
126};
127
128#define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
129
alex.bluesman.smirnov@gmail.com90c049b2012-05-15 20:50:27 +0000130enum {
131 __IEEE802154_DEV_INVALID = -1,
alex.bluesman.smirnov@gmail.com06060692012-05-15 20:50:29 +0000132
133 /* TODO:
134 * Nowadays three device types supported by this stack at linux-zigbee
135 * project: WPAN = 0, MONITOR = 1 and SMAC = 2.
136 *
137 * Since this stack implementation exists many years, it's definitely
138 * bad idea to change the assigned values due to they are already used
139 * by third-party userspace software like: iz-tools, wireshark...
140 *
141 * Currently only monitor device is added and initialized by '1' for
142 * compatibility.
143 */
144 IEEE802154_DEV_MONITOR = 1,
145
alex.bluesman.smirnov@gmail.com90c049b2012-05-15 20:50:27 +0000146 __IEEE802154_DEV_MAX,
147};
148
Sergey Lapin2c21d112009-06-08 12:18:49 +0000149#endif