Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-zbncp.h
1
2/* packet-zbncp.h
3 * Dissector routines for the ZBOSS Network Co-Processor (NCP)
4 * Copyright 2021 DSR Corporation, http://dsr-wireless.com/
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <[email protected]>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef _PACKET_ZBNCP_H
14#define _PACKET_ZBNCP_H
15
16#define ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST 0x00
17#define ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE 0x01
18#define ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION 0x02
19
20#define ZBNCP_HIGH_LVL_STAT_CAT_GENERIC 0x00
21#define ZBNCP_HIGH_LVL_STAT_CAT_SYSTEM 0x01
22#define ZBNCP_HIGH_LVL_STAT_CAT_MAC 0x02
23#define ZBNCP_HIGH_LVL_STAT_CAT_NWK 0x03
24#define ZBNCP_HIGH_LVL_STAT_CAT_APS 0x04
25#define ZBNCP_HIGH_LVL_STAT_CAT_ZDO 0x05
26#define ZBNCP_HIGH_LVL_STAT_CAT_CBKE 0x06
27
28#define ZBNCP_CMD_GET_MODULE_VERSION 0x0001
29#define ZBNCP_CMD_NCP_RESET 0x0002
30#define ZBNCP_CMD_NCP_FACTORY_RESET 0x0003
31#define ZBNCP_CMD_GET_ZIGBEE_ROLE 0x0004
32#define ZBNCP_CMD_SET_ZIGBEE_ROLE 0x0005
33#define ZBNCP_CMD_GET_ZIGBEE_CHANNEL_MASK 0x0006
34#define ZBNCP_CMD_SET_ZIGBEE_CHANNEL_MASK 0x0007
35#define ZBNCP_CMD_GET_ZIGBEE_CHANNEL 0x0008
36#define ZBNCP_CMD_GET_PAN_ID 0x0009
37#define ZBNCP_CMD_SET_PAN_ID 0x000A
38#define ZBNCP_CMD_GET_LOCAL_IEEE_ADDR 0x000B
39#define ZBNCP_CMD_SET_LOCAL_IEEE_ADDR 0x000C
40#define ZBNCP_CMD_SET_TRACE 0x000D
41#define ZBNCP_CMD_GET_KEEPALIVE_TIMEOUT 0x000E
42#define ZBNCP_CMD_SET_KEEPALIVE_TIMEOUT 0x000F
43#define ZBNCP_CMD_GET_TX_POWER 0x0010
44#define ZBNCP_CMD_SET_TX_POWER 0x0011
45#define ZBNCP_CMD_GET_RX_ON_WHEN_IDLE 0x0012
46#define ZBNCP_CMD_SET_RX_ON_WHEN_IDLE 0x0013
47#define ZBNCP_CMD_GET_JOINED 0x0014
48#define ZBNCP_CMD_GET_AUTHENTICATED 0x0015
49#define ZBNCP_CMD_GET_ED_TIMEOUT 0x0016
50#define ZBNCP_CMD_SET_ED_TIMEOUT 0x0017
51#define ZBNCP_CMD_ADD_VISIBLE_DEV 0x0018
52#define ZBNCP_CMD_ADD_INVISIBLE_SHORT 0x0019
53#define ZBNCP_CMD_RM_INVISIBLE_SHORT 0x001A
54#define ZBNCP_CMD_SET_NWK_KEY 0x001B
55#define ZBNCP_CMD_GET_SERIAL_NUMBER 0x001C
56#define ZBNCP_CMD_GET_VENDOR_DATA 0x001D
57#define ZBNCP_CMD_GET_NWK_KEYS 0x001E
58#define ZBNCP_CMD_GET_APS_KEY_BY_IEEE 0x001F
59#define ZBNCP_CMD_BIG_PKT_TO_NCP 0x0020
60#define ZBNCP_CMD_GET_PARENT_ADDR 0x0022
61#define ZBNCP_CMD_GET_EXT_PAN_ID 0x0023
62#define ZBNCP_CMD_GET_COORDINATOR_VERSION 0x0024
63#define ZBNCP_CMD_GET_SHORT_ADDRESS 0x0025
64#define ZBNCP_CMD_GET_TRUST_CENTER_ADDRESS 0x0026
65#define ZBNCP_CMD_DEBUG_WRITE 0x0027
66#define ZBNCP_CMD_GET_CONFIG_PARAMETER 0x0028
67#define ZBNCP_CMD_GET_LOCK_STATUS 0x0029
68#define ZBNCP_CMD_GET_TRACE 0x002A
69#define ZBNCP_CMD_NCP_RESET_IND 0x002B
70#define ZBNCP_CMD_SET_NWK_LEAVE_ALLOWED 0x002C
71#define ZBNCP_CMD_GET_NWK_LEAVE_ALLOWED 0x002D
72#define ZBNCP_CMD_NVRAM_WRITE 0x002E
73#define ZBNCP_CMD_NVRAM_READ 0x002F
74#define ZBNCP_CMD_NVRAM_ERASE 0x0030
75#define ZBCNP_CMD_NVRAM_CLEAR 0x0031
76#define ZBNCP_CMD_SET_TC_POLICY 0x0032
77#define ZBNCP_CMD_SET_EXTENDED_PAN_ID 0x0033
78#define ZBNCP_CMD_SET_ED_CAPACITY 0x0034
79#define ZBNCP_CMD_GET_ED_CAPACITY 0x0035
80#define ZBNCP_CMD_SET_ZDO_LEAVE_ALLOWED 0x0036
81#define ZBNCP_CMD_GET_ZDO_LEAVE_ALLOWED 0x0037
82#define ZBNCP_CMD_SET_LEAVE_WO_REJOIN_ALLOWED 0x0038
83#define ZBNCP_CMD_GET_LEAVE_WO_REJOIN_ALLOWED 0x0039
84#define ZBNCP_CMD_DISABLE_GPPB 0x003A
85#define ZBNCP_CMD_GP_SET_SHARED_KEY_TYPE 0x003B
86#define ZBNCP_CMD_GP_SET_DEFAULT_LINK_KEY 0x003C
87#define ZBNCP_CMD_PRODUCTION_CONFIG_READ 0x003D
88#define ZBNCP_CMD_SET_MAX_JOINS 0x003E
89#define ZBNCP_CMD_GET_MAX_JOINS 0x003F
90#define ZBNCP_CMD_TRACE_IND 0x0040
91#define ZBNCP_CMD_GET_KEY_NEG_METHOD 0x0041
92#define ZBNCP_CMD_SET_KEY_NEG_METHOD 0x0042
93#define ZBNCP_CMD_GET_PSK_SECRETS 0x0043
94#define ZBNCP_CMD_SET_PSK_SECRETS 0x0044
95#define ZBNCP_CMD_SET_R22_JOIN_USAGE 0x0045
96#define ZBNCP_CMD_SET_NWK_CONF_PRESET 0x0046
97#define ZBNCP_CMD_DEBUG_BROAD_NWK_KEY 0x0047
98#define ZBNCP_CMD_DEBUG_BROAD_APS_KEY 0x0048
99
100#define ZBNCP_CMD_AF_SET_SIMPLE_DESC 0x0101
101#define ZBNCP_CMD_AF_DEL_EP 0x0102
102#define ZBNCP_CMD_AF_SET_NODE_DESC 0x0103
103#define ZBNCP_CMD_AF_SET_POWER_DESC 0x0104
104#define ZBNCP_CMD_AF_SUBGHZ_SUSPEND_IND 0x0105
105#define ZBNCP_CMD_AF_SUBGHZ_RESUME_IND 0x0106
106
107#define ZBNCP_CMD_ZDO_NWK_ADDR_REQ 0x0201
108#define ZBNCP_CMD_ZDO_IEEE_ADDR_REQ 0x0202
109#define ZBNCP_CMD_ZDO_POWER_DESC_REQ 0x0203
110#define ZBNCP_CMD_ZDO_NODE_DESC_REQ 0x0204
111#define ZBNCP_CMD_ZDO_SIMPLE_DESC_REQ 0x0205
112#define ZBNCP_CMD_ZDO_ACTIVE_EP_REQ 0x0206
113#define ZBNCP_CMD_ZDO_MATCH_DESC_REQ 0x0207
114#define ZBNCP_CMD_ZDO_BIND_REQ 0x0208
115#define ZBNCP_CMD_ZDO_UNBIND_REQ 0x0209
116#define ZBNCP_CMD_ZDO_MGMT_LEAVE_REQ 0x020A
117#define ZBNCP_CMD_ZDO_PERMIT_JOINING_REQ 0x020B
118#define ZBNCP_CMD_ZDO_DEV_ANNCE_IND 0x020C
119#define ZBNCP_CMD_ZDO_REJOIN 0x020D
120#define ZBNCP_CMD_ZDO_SYSTEM_SRV_DISCOVERY_REQ 0x020E
121#define ZBNCP_CMD_ZDO_MGMT_BIND_REQ 0x020F
122#define ZBNCP_CMD_ZDO_MGMT_LQI_REQ 0x0210
123#define ZBNCP_CMD_ZDO_MGMT_NWK_UPDATE_REQ 0x0211
124#define ZBNCP_CMD_ZDO_REMOTE_CMD_IND 0x0212
125#define ZBNCP_CMD_ZDO_GET_STATS 0x0213
126#define ZBNCP_CMD_ZDO_DEV_AUTHORIZED_IND 0x0214
127#define ZBNCP_CMD_ZDO_DEV_UPDATE_IND 0x0215
128#define ZBNCP_CMD_ZDO_SET_NODE_DESC_MANUF_CODE 0x0216
129#define ZBNCP_CMD_HL_ZDO_GET_DIAG_DATA_REQ 0x0217
130#define ZBNCP_CMD_HL_ZDO_RAW_REQ 0x0218
131#define ZBNCP_CMD_HL_ZDO_SEND_CONF_PARAMS_REQ 0x0219
132#define ZBNCP_CMD_HL_ZDO_MGMT_BEACON_SURVEY_REQ 0x021A
133#define ZBNCP_CMD_HL_ZDO_DECOMMISSION_REQ 0x021B
134#define ZBNCP_CMD_HL_ZDO_GET_AUTH_LEVEL_REQ 0x021C
135
136#define ZBNCP_CMD_APSDE_DATA_REQ 0x0301
137#define ZBNCP_CMD_APSME_BIND 0x0302
138#define ZBNCP_CMD_APSME_UNBIND 0x0303
139#define ZBNCP_CMD_APSME_ADD_GROUP 0x0304
140#define ZBNCP_CMD_APSME_RM_GROUP 0x0305
141#define ZBNCP_CMD_APSDE_DATA_IND 0x0306
142#define ZBNCP_CMD_APSME_RM_ALL_GROUPS 0x0307
143#define ZBNCP_CMD_APS_GET_GROUP_TABLE 0x0309
144#define ZBNCP_CMD_APSME_UNBIND_ALL 0x030A
145#define ZBNCP_CMD_APSME_GET_BIND_ENTRY_BY_ID 0x030B
146#define ZBNCP_CMD_APSME_RM_BIND_ENTRY_BY_ID 0x030C
147#define ZBNCP_CMD_APSME_CLEAR_BIND_TABLE 0x030D
148#define ZBNCP_CMD_APSME_REMOTE_BIND_IND 0x030E
149#define ZBNCP_CMD_APSME_REMOTE_UNBIND_IND 0x030F
150#define ZBNCP_CMD_APSME_SET_REMOTE_BIND_OFFSET 0x0310
151#define ZBNCP_CMD_APSME_GET_REMOTE_BIND_OFFSET 0x0311
152
153#define ZBNCP_CMD_NWK_FORMATION 0x0401
154#define ZBNCP_CMD_NWK_DISCOVERY 0x0402
155#define ZBNCP_CMD_NWK_NLME_JOIN 0x0403
156#define ZBNCP_CMD_NWK_PERMIT_JOINING 0x0404
157#define ZBNCP_CMD_NWK_GET_IEEE_BY_SHORT 0x0405
158#define ZBNCP_CMD_NWK_GET_SHORT_BY_IEEE 0x0406
159#define ZBNCP_CMD_NWK_GET_NEIGHBOR_BY_IEEE 0x0407
160#define ZBNCP_CMD_NWK_STARTED_IND 0x0408
161#define ZBNCP_CMD_NWK_REJOINED_IND 0x0409
162#define ZBNCP_CMD_NWK_REJOIN_FAILED_IND 0x040A
163#define ZBNCP_CMD_NWK_LEAVE_IND 0x040B
164#define ZBNCP_CMD_PIM_SET_FAST_POLL_INTERVAL 0x040E
165#define ZBNCP_CMD_PIM_SET_LONG_POLL_INTERVAL 0x040F
166#define ZBNCP_CMD_PIM_START_FAST_POLL 0x0410
167#define ZBNCP_CMD_PIM_START_POLL 0x0412
168#define ZBNCP_CMD_PIM_SET_ADAPTIVE_POLL 0x0413
169#define ZBNCP_CMD_PIM_STOP_FAST_POLL 0x0414
170#define ZBNCP_CMD_PIM_STOP_POLL 0x0415
171#define ZBNCP_CMD_PIM_ENABLE_TURBO_POLL 0x0416
172#define ZBNCP_CMD_PIM_DISABLE_TURBO_POLL 0x0417
173#define ZBNCP_CMD_NWK_GET_FIRST_NBT_ENTRY 0x0418
174#define ZBNCP_CMD_NWK_GET_NEXT_NBT_ENTRY 0x0419
175#define ZBNCP_CMD_NWK_PAN_ID_CONFLICT_RESOLVE 0x041A
176#define ZBNCP_CMD_NWK_PAN_ID_CONFLICT_IND 0x041B
177#define ZBNCP_CMD_NWK_ADDRESS_UPDATE_IND 0x041C
178#define ZBNCP_CMD_NWK_START_WITHOUT_FORMATION 0x041D
179#define ZBNCP_CMD_NWK_NLME_ROUTER_START 0x041E
180#define ZBNCP_CMD_PIM_SINGLE_POLL 0x041F
181#define ZBNCP_CMD_PARENT_LOST_IND 0x0420
182#define ZBNCP_CMD_PIM_START_TURBO_POLL_PACKETS 0x0424
183#define ZBNCP_CMD_PIM_START_TURBO_POLL_CONTINUOUS 0x0425
184#define ZBNCP_CMD_PIM_TURBO_POLL_CONTINUOUS_LEAVE 0x0426
185#define ZBNCP_CMD_PIM_TURBO_POLL_PACKETS_LEAVE 0x0427
186#define ZBNCP_CMD_PIM_PERMIT_TURBO_POLL 0x0428
187#define ZBNCP_CMD_PIM_SET_FAST_POLL_TIMEOUT 0x0429
188#define ZBNCP_CMD_PIM_GET_LONG_POLL_INTERVAL 0x042A
189#define ZBNCP_CMD_PIM_GET_IN_FAST_POLL_FLAG 0x042B
190#define ZBNCP_CMD_SET_KEEPALIVE_MODE 0x042C
191#define ZBNCP_CMD_START_CONCENTRATOR_MODE 0x042D
192#define ZBNCP_CMD_STOP_CONCENTRATOR_MODE 0x042E
193#define ZBNCP_CMD_NWK_ENABLE_PAN_ID_CONFLICT_RESOLUTION 0x042F
194#define ZBNCP_CMD_NWK_ENABLE_AUTO_PAN_ID_CONFLICT_RESOLUTION 0x0430
195#define ZBNCP_CMD_PIM_TURBO_POLL_CANCEL_PACKET 0x0431
196#define ZBNCP_CMD_SET_FORCE_ROUTE_RECORD 0x0432
197#define ZBNCP_CMD_GET_FORCE_ROUTE_RECORD 0x0433
198#define ZBNCP_CMD_NWK_NBR_ITERATOR_NEXT 0x0434
199
200#define ZBNCP_CMD_ZB_DEBUG_SIGNAL_TCLK_READY_IND 0x0435
201#define ZBNCP_CMD_ZB_DEVICE_READY_FOR_INTERVIEW_IND 0x0436
202#define ZBNCP_CMD_ZB_DEVICE_INTERVIEW_FINISHED_IND 0x0437
203#define ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_PAN_ID_CHANGE 0x0438
204#define ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_CHANGE 0x0439
205#define ZBNCP_CMD_ZB_START_CHANNEL_CHANGE 0x043A
206#define ZBNCP_CMD_ZB_START_PAN_ID_CHANGE 0x043B
207
208#define ZBNCP_CMD_SECUR_SET_LOCAL_IC 0x0501
209#define ZBNCP_CMD_SECUR_ADD_IC 0x0502
210#define ZBNCP_CMD_SECUR_DEL_IC 0x0503
211#define ZBNCP_CMD_SECUR_ADD_CERT 0x0504
212#define ZBNCP_CMD_SECUR_DEL_CERT 0x0505
213#define ZBNCP_CMD_SECUR_START_KE 0x0506
214#define ZBNCP_CMD_SECUR_START_PARTNER_LK 0x0507
215#define ZBNCP_CMD_SECUR_CBKE_SRV_FINISHED_IND 0x0508
216#define ZBNCP_CMD_SECUR_PARTNER_LK_FINISHED_IND 0x0509
217#define ZBNCP_CMD_SECUR_JOIN_USES_IC 0x050A
218#define ZBNCP_CMD_SECUR_GET_IC_BY_IEEE 0x050B
219#define ZBNCP_CMD_SECUR_GET_CERT 0x050C
220#define ZBNCP_CMD_SECUR_GET_LOCAL_IC 0x050D
221#define ZBNCP_CMD_SECUR_TCLK_IND 0x050E
222#define ZBNCP_CMD_SECUR_TCLK_EXCHANGE_FAILED_IND 0x050F
223#define ZBNCP_CMD_SECUR_KE_WHITELIST_ADD 0x0510
224#define ZBNCP_CMD_SECUR_KE_WHITELIST_DEL 0x0511
225#define ZBNCP_CMD_SECUR_KE_WHITELIST_DEL_ALL 0x0512
226#define ZBNCP_CMD_SECUR_GET_KEY_IDX 0x0513
227#define ZBNCP_CMD_SECUR_GET_KEY 0x0514
228#define ZBNCP_CMD_SECUR_ERASE_KEY 0x0515
229#define ZBNCP_CMD_SECUR_CLEAR_KEY_TABLE 0x0516
230#define ZBNCP_CMD_SECUR_NWK_INITIATE_KEY_SWITCH_PROCEDURE 0x0517
231#define ZBNCP_CMD_SECUR_GET_IC_LIST 0x0518
232#define ZBNCP_CMD_SECUR_GET_IC_BY_IDX 0x0519
233#define ZBNCP_CMD_SECUR_REMOVE_ALL_IC 0x051A
234#define ZBNCP_CMD_SECUR_PARTNER_LK_ENABLE 0x051B
235#define ZBNCP_CMD_SECUR_AUTH_DEVICE_AFTER_INTERVIEW 0x051C
236#define ZBNCP_CMD_ZDO_SECUR_UPDATE_DEVICE_TCLK 0x051D
237
238#define ZBNCP_CMD_MANUF_MODE_START 0x0601
239#define ZBNCP_CMD_MANUF_MODE_END 0x0602
240#define ZBNCP_CMD_MANUF_SET_CHANNEL 0x0603
241#define ZBNCP_CMD_MANUF_GET_CHANNEL 0x0604
242#define ZBNCP_CMD_MANUF_SET_POWER 0x0605
243#define ZBNCP_CMD_MANUF_GET_POWER 0x0606
244#define ZBNCP_CMD_MANUF_START_TONE 0x0607
245#define ZBNCP_CMD_MANUF_STOP_TONE 0x0608
246#define ZBNCP_CMD_MANUF_START_STREAM_RANDOM 0x0609
247#define ZBNCP_CMD_MANUF_STOP_STREAM_RANDOM 0x060A
248#define ZBNCP_CMD_NCP_HL_MANUF_SEND_SINGLE_PACKET 0x060B
249#define ZBNCP_CMD_MANUF_START_TEST_RX 0x060C
250#define ZBNCP_CMD_MANUF_STOP_TEST_RX 0x060D
251#define ZBNCP_CMD_MANUF_RX_PACKET_IND 0x060E
252
253#define ZBNCP_CMD_OTA_RUN_BOOTLOADER 0x0701
254#define ZBNCP_CMD_OTA_START_UPGRADE_IND 0x0702
255#define ZBNCP_CMD_OTA_SEND_PORTION_FW 0x0703
256
257#define ZBNCP_CMD_READ_NVRAM_RESERVED 0x0801
258#define ZBNCP_CMD_WRITE_NVRAM_RESERVED 0x0802
259#define ZBNCP_CMD_GET_CALIBRATION_INFO 0x0803
260
261/* MAC enums */
262#define MAC_ENUM_SUCCESS 0x00
263#define MAC_ENUM_BEACON_LOSS 0xe0
264#define MAC_ENUM_CHANNEL_ACCESS_FAILURE 0xe1
265#define MAC_ENUM_COUNTER_ERROR 0xdb
266#define MAC_ENUM_DENIED 0xe2
267#define MAC_ENUM_DISABLE_TRX_FAILURE 0xe3
268#define MAC_ENUM_FRAME_TOO_LONG 0xe5
269#define MAC_ENUM_IMPROPER_KEY_TYPE 0xdc
270#define MAC_ENUM_IMPROPER_SECURITY_LEVEL 0xdd
271#define MAC_ENUM_INVALID_ADDRESS 0xf5
272#define MAC_ENUM_INVALID_GTS 0xe6
273#define MAC_ENUM_INVALID_HANDLE 0xe7
274#define MAC_ENUM_INVALID_INDEX 0xf9
275#define MAC_ENUM_INVALID_PARAMETER 0xe8
276#define MAC_ENUM_LIMIT_REACHED 0xfa
277#define MAC_ENUM_NO_ACK 0xe9
278#define MAC_ENUM_NO_BEACON 0xea
279#define MAC_ENUM_NO_DATA 0xeb
280#define MAC_ENUM_NO_SHORT_ADDRESS 0xec
281#define MAC_ENUM_ON_TIME_TOO_LONG 0xf6
282#define MAC_ENUM_OUT_OF_CAP 0xed
283#define MAC_ENUM_PAN_ID_CONFLICT 0xee
284#define MAC_ENUM_PAST_TIME 0xf7
285#define MAC_ENUM_READ_ONLY 0xfb
286#define MAC_ENUM_REALIGNMENT 0xef
287#define MAC_ENUM_SCAN_IN_PROGRESS 0xfc
288#define MAC_ENUM_SECURITY_ERROR 0xe4
289#define MAC_ENUM_SUPERFRAME_OVERLAP 0xfd
290#define MAC_ENUM_TRACKING_OFF 0xf8
291#define MAC_ENUM_TRANSACTION_EXPIRED 0xf0
292#define MAC_ENUM_TRANSACTION_OVERFLOW 0xf1
293#define MAC_ENUM_TX_ACTIVE 0xf2
294#define MAC_ENUM_UNAVAILABLE_KEY 0xf3
295#define MAC_ENUM_UNSUPPORTED_LEGACY 0xde
296#define MAC_ENUM_UNSUPPORTED_SECURITY 0xdf
297
298/* NVRAM database types enum */
299#define ZB_NVRAM_RESERVED 0
300#define ZB_NVRAM_COMMON_DATA 1
301#define ZB_NVRAM_HA_DATA 2
302#define ZB_NVRAM_ZCL_REPORTING_DATA 3
303#define ZB_NVRAM_APS_SECURE_DATA_GAP 4
304#define ZB_NVRAM_APS_BINDING_DATA_GAP 5
305#define ZB_NVRAM_HA_POLL_CONTROL_DATA 6
306#define ZB_IB_COUNTERS 7
307#define ZB_NVRAM_DATASET_GRPW_DATA 8
308#define ZB_NVRAM_APP_DATA1 9
309#define ZB_NVRAM_APP_DATA2 10
310#define ZB_NVRAM_ADDR_MAP 11
311#define ZB_NVRAM_NEIGHBOUR_TBL 12
312#define ZB_NVRAM_INSTALLCODES 13
313#define ZB_NVRAM_APS_SECURE_DATA 14
314#define ZB_NVRAM_APS_BINDING_DATA 15
315#define ZB_NVRAM_DATASET_GP_PRPOXYT 16
316#define ZB_NVRAM_DATASET_GP_SINKT 17
317#define ZB_NVRAM_DATASET_GP_CLUSTER 18
318#define ZB_NVRAM_APS_GROUPS_DATA 19
319#define ZB_NVRAM_DATASET_SE_CERTDB 20
320#define ZB_NVRAM_DATASET_GP_APP_TBL 22
321#define ZB_NVRAM_APP_DATA3 27
322#define ZB_NVRAM_APP_DATA4 28
323#define ZB_NVRAM_KE_WHITELIST 29
324#define ZB_NVRAM_ZDO_DIAGNOSTICS_DATA 31
325#define ZB_NVRAM_DATASET_NUMBER 32
326#define ZB_NVRAM_DATA_SET_TYPE_PAGE_HDR 30
329/* NWK statuses */
330#define ZBNCP_NWK_STATUS_SUCCESS 0x00
331#define ZBNCP_NWK_STATUS_INVALID_PARAMETER 0xc1
332#define ZBNCP_NWK_STATUS_INVALID_REQUEST 0xc2
333#define ZBNCP_NWK_STATUS_NOT_PERMITTED 0xc3
334#define ZBNCP_NWK_STATUS_ALREADY_PRESENT 0xc5
335#define ZBNCP_NWK_STATUS_SYNC_FAILURE 0xc6
336#define ZBNCP_NWK_STATUS_NEIGHBOR_TABLE_FULL 0xc7
337#define ZBNCP_NWK_STATUS_UNKNOWN_DEVICE 0xc8
338#define ZBNCP_NWK_STATUS_UNSUPPORTED_ATTRIBUTE 0xc9
339#define ZBNCP_NWK_STATUS_NO_NETWORKS 0xca
340#define ZBNCP_NWK_STATUS_MAX_FRM_COUNTER 0xcc
341#define ZBNCP_NWK_STATUS_NO_KEY 0xcd
342#define ZBNCP_NWK_STATUS_ROUTE_DISCOVERY_FAILED 0xd0
343#define ZBNCP_NWK_STATUS_ROUTE_ERROR 0xd1
344#define ZBNCP_NWK_STATUS_BT_TABLE_FULL 0xd2
345#define ZBNCP_NWK_STATUS_FRAME_NOT_BUFFERED 0xd3
346#define ZBNCP_NWK_STATUS_INVALID_INTERFACE 0xd5
347
348/* CBKE statuses */
349#define ZBNCP_CBKE_STATUS_OK 0x00
350#define ZBNCP_CBKE_STATUS_UNKNOWN_ISSUER 0x01
351#define ZBNCP_CBKE_STATUS_BAD_KEY_CONFIRM 0x02
352#define ZBNCP_CBKE_STATUS_BAD_MESSAGE 0x03
353#define ZBNCP_CBKE_STATUS_NO_RESOURCES 0x04
354#define ZBNCP_CBKE_STATUS_UNSUPPORTED_SUITE 0x05
355#define ZBNCP_CBKE_STATUS_INVALID_CERTIFICATE 0x06
356#define ZBNCP_CBKE_STATUS_NO_KE_EP 0x07
357
358/* ZB NCP LL HDR PACKET FLAGS BITS */
359#define ZBNCP_GET_PACKET_FLAGS_ACK_BIT(x) ((x) & 0x1)
360#define ZBNCP_GET_PACKET_FLAGS_RETRANS_BIT(x) (((x) >> 1) & 0x1)
361#define ZBNCP_GET_PACKET_FLAGS_SECNUM_BIT(x) (((x) >> 2) & 0x3)
362#define ZBNCP_GET_PACKET_FLAGS_ACKNUM_BIT(x) (((x) >> 4) & 0x3)
363#define ZBNCP_GET_PACKET_FLAGS_FIRST_FRAG_BIT(x) (((x) >> 6) & 0x1)
364#define ZBNCP_GET_PACKET_FLAGS_LAST_FRAG_BIT(x) (((x) >> 7) & 0x1)
365
366/* Parameter ID enum */
367#define ZBNCP_PARAMETER_ID_IEEE_ADDR_TABLE_SIZE 1
368#define ZBNCP_PARAMETER_ID_NEIGHBOR_TABLE_SIZE 2
369#define ZBNCP_PARAMETER_ID_APS_SRC_BINDING_TABLE_SIZE 3
370#define ZBNCP_PARAMETER_ID_APS_GROUP_TABLE_SIZE 4
371#define ZBNCP_PARAMETER_ID_NWK_ROUTING_TABLE_SIZE 5
372#define ZBNCP_PARAMETER_ID_NWK_ROUTE_DISCOVERY_TABLE_SIZE 6
373#define ZBNCP_PARAMETER_ID_IOBUF_POOL_SIZE 7
374#define ZBNCP_PARAMETER_ID_PANID_TABLE_SIZE 8
375#define ZBNCP_PARAMETER_ID_APS_DUPS_TABLE_SIZE 9
376#define ZBNCP_PARAMETER_ID_APS_BIND_TRANS_TABLE_SIZE 10
377#define ZBNCP_PARAMETER_ID_N_APS_RETRANS_ENTRIES 11
378#define ZBNCP_PARAMETER_ID_NWK_MAX_HOPS 12
379#define ZBNCP_PARAMETER_ID_NIB_MAX_CHILDREN 13
380#define ZBNCP_PARAMETER_ID_N_APS_KEY_PAIR_ARR_MAX_SIZE 14
381#define ZBNCP_PARAMETER_ID_NWK_MAX_SRC_ROUTES 15
382#define ZBNCP_PARAMETER_ID_APS_MAX_WINDOW_SIZE 16
383#define ZBNCP_PARAMETER_ID_APS_INTERFRAME_DELAY 17
384#define ZBNCP_PARAMETER_ID_ZDO_ED_BIND_TIMEOUT 18
385#define ZBNCP_PARAMETER_ID_NIB_PASSIVE_ASK_TIMEOUT 19
386#define ZBNCP_PARAMETER_ID_APS_ACK_TIMEOUTS 20
387#define ZBNCP_PARAMETER_ID_MAC_BEACON_JITTER 21
388#define ZBNCP_PARAMETER_ID_TX_POWER 22
389#define ZBNCP_PARAMETER_ID_ZLL_DEFAULT_RSSI_THRESHOLD 23
390#define ZBNCP_PARAMETER_ID_NIB_MTORR 24
391
392#define ZB_APSDE_DST_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT 0x00
393#define ZB_APSDE_DST_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT 0x01
394#define ZB_APSDE_DST_ADDR_MODE_16_ENDP_PRESENT 0x02
395#define ZB_APSDE_DST_ADDR_MODE_64_ENDP_PRESENT 0x03
396#define ZB_APSDE_DST_ADDR_MODE_BIND_TBL_ID 0x04
398/* ZDO Auth types */
399#define ZB_ZDO_AUTH_LEGACY_TYPE 0x00
400#define ZB_ZDO_AUTH_TCLK_TYPE 0x01
401
402#define ZBNCP_CMD_APSDE_DATA_REQ_DST_ADDR_MODE_OFFSET ( \
403 8 /* union - short or long addr */ \
404 + 2 /* profile id */ \
405 + 2 /* cluster id */ \
406 + 1 /* dst ep */ \
407 + 1 /* src ep */ \
408 + 1) /* radius */
409
410#define ZBNCP_CMD_APSDE_DATA_REQ_RSP_DST_ADDR_MODE_OFFSET ( \
4118 /* union - short or long addr */ \
412+ 1 /* dst ep */ \
413+ 1 /* src ep */ \
414+ 4) /* tx time */
415
416#endif