2 * Dissector routines for the ZBOSS Network Co-Processor (NCP)
3 * Copyright 2021 DSR Corporation, http://dsr-wireless.com/
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include <epan/packet.h>
14 #include <epan/conversation.h>
16 #include <wiretap/wtap.h>
17 #include <wsutil/array.h>
19 #include "packet-ieee802154.h"
20 #include "packet-zbncp.h"
22 void proto_reg_handoff_zbncp(void);
23 void proto_register_zbncp(void);
24 extern void dissect_zbee_nwk_status_code(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned offset
);
25 extern void dissect_zbee_aps_status_code(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned offset
);
27 #define ZBNCP_PROTOABBREV "zbncp"
29 #define ZBNCP_SIGN_FST_BYTE 0xDEU
30 #define ZBNCP_SIGN_SEC_BYTE 0xADU
31 #define ZBNCP_HDR_SIZE 7
33 #define ZBNCP_HDR_FLAGS_ISACK_MASK 0x01
34 #define ZBNCP_HDR_FLAGS_RETRANS_MASK 0x02
35 #define ZBNCP_HDR_FLAGS_PKT_SEQ_MASK 0x0C
36 #define ZBNCP_HDR_FLAGS_ACK_SEQ_MASK 0x30
37 #define ZBNCP_HDR_FLAGS_ISFIRST_MASK 0x40
38 #define ZBNCP_HDR_FLAGS_ISLAST_MASK 0x80
40 #define ZBNCP_DUMP_INFO_SIGN "ZBNCP"
41 #define ZBNCP_DUMP_INFO_SIGN_SIZE (sizeof(ZBNCP_DUMP_INFO_SIGN) - 1)
42 #define ZBNCP_DUMP_INFO_PAYLOAD_SIZE 3
43 #define ZBNCP_DUMP_INFO_NCP_TYPE 0x06U
44 #define ZBNCP_DUMP_INFO_SIZE (ZBNCP_DUMP_INFO_SIGN_SIZE + ZBNCP_DUMP_INFO_PAYLOAD_SIZE)
45 #define ZBNCP_DUMP_DIR_MASK 0x01U
46 #define ZBNCP_DUMP_HOST_INT_DUMP_MASK 0x02U
47 #define ZBNCP_DUMP_POTENTIAL_TX_RX_ERROR_MASK 0x04U
49 /* Bit Masks for Configuration Parameters Field */
50 #define CONF_PARAMS_RESERVED 0x07
51 #define CONF_PARAMS_DIS_PANID_CHANGE 0x08
52 #define CONF_PARAMS_DIS_CHAN_CHANGE 0x10
53 #define CONF_PARAMS_LEAVE_REQ_ALLOW 0x20
54 #define CONF_PARAMS_REQ_TCLK 0x40
55 #define CONF_PARAMS_RESTRICT_MODE_EN 0x80
58 /* decryption helpers */
59 static unsigned dissect_zbncp_ll_hdr(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned, uint8_t *);
60 static void dissect_zbncp_body(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned, uint16_t *);
61 static void dissect_zbncp_high_level(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned, uint16_t *);
62 static unsigned dissect_zbncp_high_level_hdr(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned, uint8_t *, uint16_t *);
63 static void dissect_zbncp_high_level_body(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned, uint8_t, uint16_t);
64 static void dissect_zbncp_fragmentation_body(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned);
65 static unsigned dissect_zbncp_packet(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned);
66 static unsigned dissect_zbncp_status(tvbuff_t
*, packet_info
*, proto_tree
*, unsigned);
68 static tvbuff_t
*dissect_zbncp_dump_info(tvbuff_t
*, packet_info
*, proto_tree
*);
70 /*-------------------------------------
71 * Dissector Function Prototypes
72 *-------------------------------------
74 /* Dissection Routines. */
76 /* Initialize Protocol and Registered fields */
79 static int zbncp_frame
= -1;
80 static int proto_zbncp
;
82 static int hf_zbncp_hdr_sign
;
83 static int hf_zbncp_packet_len
;
84 static int hf_zbncp_hdr_type
;
85 static int hf_zbncp_hdr_flags
;
86 static int hf_zbncp_hdr_flags_isack
;
87 static int hf_zbncp_hdr_flags_retrans
;
88 static int hf_zbncp_hdr_flags_packetseq
;
89 static int hf_zbncp_hdr_flags_ackseq
;
90 static int hf_zbncp_hdr_flags_first_frag
;
91 static int hf_zbncp_hdr_flags_last_frag
;
92 static int hf_zbncp_hdr_crc8
;
94 static int hf_zbncp_body_data_crc16
;
95 static int hf_zbncp_data_hl_version
;
96 static int hf_zbncp_data_hl_packet_type
;
97 static int hf_zbncp_data_hl_call_id
;
98 static int hf_zbncp_data_hl_tsn
;
99 static int hf_zbncp_data_hl_status_cat
;
100 static int hf_zbncp_data_hl_status
;
101 static int hf_zbncp_data_hl_status_generic
;
102 static int hf_zbncp_data_hl_status_mac
;
103 static int hf_zbncp_data_hl_status_nwk
;
104 static int hf_zbncp_data_hl_status_cbke
;
105 static int hf_zbncp_data_fw_vers
;
106 static int hf_zbncp_data_stack_vers
;
107 static int hf_zbncp_data_proto_vers
;
108 static int hf_zbncp_data_reset_opt
;
109 static int hf_zbncp_data_zb_role
;
110 static int hf_zbncp_data_ch_list_len
;
111 static int hf_zbncp_data_page
;
112 static int hf_zbncp_data_ch_mask
;
113 static int hf_zbncp_data_channel
;
114 static int hf_zbncp_data_channel4
;
115 static int hf_zbncp_data_pan_id
;
116 static int hf_zbncp_data_mac_int_num
;
117 static int hf_zbncp_data_index
;
118 static int hf_zbncp_data_enable
;
119 static int hf_zbncp_data_bind_type
;
120 static int hf_zbncp_data_ieee_addr
;
121 static int hf_zbncp_data_ext_pan_id
;
122 static int hf_zbncp_data_coordinator_version
;
123 static int hf_zbncp_data_trust_center_addres
;
124 static int hf_zbncp_data_remote_ieee_addr
;
125 static int hf_zbncp_data_src_ieee_addr
;
126 static int hf_zbncp_data_dst_ieee_addr
;
127 static int hf_zbncp_data_partner_ieee_addr
;
128 static int hf_zbncp_data_trace_mask
;
129 static int hf_zbncp_data_trace_wireless_traf
;
130 static int hf_zbncp_data_trace_reserved
;
131 static int hf_zbncp_data_trace_ncp_ll_proto
;
132 static int hf_zbncp_data_trace_host_int_line
;
133 static int hf_zbncp_data_trace_sleep_awake
;
134 static int hf_zbncp_data_trace_input_output
;
135 static int hf_zbncp_data_trace_timestamp
;
136 static int hf_zbncp_data_trace
;
137 static int hf_zbncp_data_key_neg_method
;
138 static int hf_zbncp_data_psk_secrets
;
139 static int hf_zbncp_data_r22_join_usage
;
140 static int hf_zbncp_data_nwk_conf_preset
;
141 static int hf_zbncp_data_short_address
;
142 static int hf_zbncp_data_raw_data
;
143 static int hf_zbncp_data_conf_params
;
144 static int hf_zbncp_data_channel_page_count
;
145 static int hf_zbncp_data_config_mask
;
146 static int hf_zbncp_data_dest_short_address
;
147 static int hf_zbncp_data_current_parents_short_address
;
148 static int hf_zbncp_data_current_parents_lqi
;
149 static int hf_zbncp_data_potential_parent_count
;
150 static int hf_zbncp_data_classification_mask
;
151 static int hf_zbncp_data_total_beacons_surveyed
;
152 static int hf_zbncp_data_current_pan_id_beacons
;
153 static int hf_zbncp_data_current_nwk_potential_parents
;
154 static int hf_zbncp_data_other_zigbee_beacons
;
155 static int hf_zbncp_data_pan_id_conflict_tlv
;
156 static int hf_zbncp_data_eui64_count
;
157 static int hf_zbncp_data_eui64
;
158 static int hf_zbncp_data_target_ieee_addr
;
159 static int hf_zbncp_data_initial_join_auth
;
160 static int hf_zbncp_data_key_update_method
;
161 static int hf_zbncp_data_next_pan_id_change
;
162 static int hf_zbncp_data_next_channel_change
;
163 static int hf_zbncp_data_error_count
;
164 static int hf_zbncp_data_keepalive
;
165 static int hf_zbncp_data_rx_on_idle
;
166 static int hf_zbncp_data_res_tx_power
;
167 static int hf_zbncp_data_req_tx_power
;
168 static int hf_zbncp_data_joined
;
169 static int hf_zbncp_data_joined_bit
;
170 static int hf_zbncp_data_parent_bit
;
171 static int hf_zbncp_data_authenticated
;
172 static int hf_zbncp_data_timeout
;
173 static int hf_zbncp_data_keepalive_mode
;
174 static int hf_zbncp_force_route_record_sending
;
175 static int hf_zbncp_data_nwk_addr
;
176 static int hf_zbncp_data_nwk_parent_addr
;
177 static int hf_zbncp_data_src_nwk_addr
;
178 static int hf_zbncp_data_dst_nwk_addr
;
179 static int hf_zbncp_data_remote_nwk_addr
;
180 static int hf_zbncp_data_group_nwk_addr
;
181 static int hf_zbncp_data_src_mac_addr
;
182 static int hf_zbncp_data_dst_mac_addr
;
183 static int hf_zbncp_data_nwk_key
;
184 static int hf_zbncp_data_key_num
;
185 static int hf_zbncp_data_serial_num
;
186 static int hf_zbncp_data_size
;
187 static int hf_zbncp_data_vendor_data
;
188 static int hf_zbncp_data_dump_type
;
189 static int hf_zbncp_data_dump_text
;
190 static int hf_zbncp_data_dump_bin
;
191 static int hf_zbncp_data_parameter_id
;
192 static int hf_zbncp_data_value8_dec
;
193 static int hf_zbncp_data_value16_dec
;
194 static int hf_zbncp_data_aps_ack_to_non_sleepy
;
195 static int hf_zbncp_data_aps_ack_to_sleepy
;
196 static int hf_zbncp_data_min16
;
197 static int hf_zbncp_data_max16
;
198 static int hf_zbncp_data_default8_sign
;
199 static int hf_zbncp_data_current8_sign
;
200 static int hf_zbncp_data_is_concentrator
;
201 static int hf_zbncp_data_concentrator_radius
;
202 static int hf_zbncp_data_time16
;
203 static int hf_zbncp_data_lock_status
;
204 static int hf_zbncp_data_reset_source
;
205 static int hf_zbncp_nwk_leave_allowed
;
206 static int hf_zbncp_data_nvram_dataset_quantity
;
207 static int hf_zbncp_data_nvram_dataset_type
;
208 static int hf_zbncp_data_nvram_version
;
209 static int hf_zbncp_data_dataset_version
;
210 static int hf_zbncp_data_dataset_length
;
211 static int hf_zbncp_data_nvram_dataset_data
;
212 static int hf_zbncp_data_tc_policy_type
;
213 static int hf_zbncp_data_tc_policy_value
;
214 static int hf_zbncp_ed_capacity
;
215 static int hf_zbncp_max_joins
;
216 static int hf_zbncp_zdo_leave_allowed
;
217 static int hf_zbncp_zdo_leave_wo_rejoin_allowed
;
218 static int hf_zbncp_data_aps_key
;
219 static int hf_zbncp_data_endpoint
;
220 static int hf_zbncp_data_aps_group_num
;
221 static int hf_zbncp_data_aps_group
;
222 static int hf_zbncp_data_src_endpoint
;
223 static int hf_zbncp_data_dst_endpoint
;
224 static int hf_zbncp_data_poll_pkt_cnt
;
225 static int hf_zbncp_data_poll_timeout
;
226 static int hf_zbncp_data_poll_permit_flag
;
227 static int hf_zbncp_data_profile_id
;
228 static int hf_zbncp_data_device_id
;
229 static int hf_zbncp_data_dev_version
;
230 static int hf_zbncp_data_in_cl_cnt
;
231 static int hf_zbncp_data_out_cl_cnt
;
232 static int hf_zbncp_data_cluster_id
;
233 static int hf_zbncp_data_mac_cap
;
234 static int hf_zbncp_data_manuf_id
;
235 static int hf_zbncp_data_cur_pwr_mode
;
236 static int hf_zbncp_data_cur_pwr_lvl
;
237 static int hf_zbncp_data_susp_period
;
238 static int hf_zbncp_data_av_pwr_src
;
239 static int hf_zbncp_data_cur_pwr_src
;
240 static int hf_zbncp_data_pwr_src_const
;
241 static int hf_zbncp_data_pwr_src_recharge
;
242 static int hf_zbncp_data_pwr_src_disposable
;
243 static int hf_zbncp_data_req_type
;
244 static int hf_zbncp_data_start_idx
;
245 static int hf_zbncp_data_start_idx_16b
;
246 static int hf_zbncp_data_upd_idx
;
247 static int hf_zbncp_data_entry_idx
;
248 static int hf_zbncp_data_num_asoc_dec
;
249 static int hf_zbncp_data_pwr_desc
;
250 static int hf_zbncp_data_pwr_desc_cur_power_mode
;
251 static int hf_zbncp_data_pwr_desc_av_pwr_src
;
252 static int hf_zbncp_data_pwr_desc_cur_pwr_src
;
253 static int hf_zbncp_data_pwr_desc_cur_pwr_lvl
;
254 static int hf_zbncp_data_max_buf_size
;
255 static int hf_zbncp_data_max_inc_trans_size
;
256 static int hf_zbncp_data_max_out_trans_size
;
257 static int hf_zbncp_data_desc_cap
;
258 static int hf_zbncp_data_desc_cap_ext_act_ep_list_av
;
259 static int hf_zbncp_data_desc_cap_ext_simple_desc_list_av
;
260 static int hf_zbncp_data_flags8
;
261 static int hf_zbncp_data_flags_permit_join
;
262 static int hf_zbncp_data_flags_router_cap
;
263 static int hf_zbncp_data_flags_ed_cap
;
264 static int hf_zbncp_data_flags_stack_profile
;
265 static int hf_zbncp_data_flags16
;
266 static int hf_zbncp_data_flags_zb_role
;
267 static int hf_zbncp_data_flags_comp_desc_av
;
268 static int hf_zbncp_data_flags_user_desc_av
;
269 static int hf_zbncp_data_flags_freq_868
;
270 static int hf_zbncp_data_flags_freq_902
;
271 static int hf_zbncp_data_flags_freq_2400
;
272 static int hf_zbncp_data_flags_freq_eu_sub_ghz
;
273 static int hf_zbncp_data_srv_msk
;
274 static int hf_zbncp_data_srv_msk_prim_tc
;
275 static int hf_zbncp_data_srv_msk_backup_tc
;
276 static int hf_zbncp_data_srv_msk_prim_bind_tbl_cache
;
277 static int hf_zbncp_data_srv_msk_backup_bind_tbl_cache
;
278 static int hf_zbncp_data_remote_bind_offset
;
279 static int hf_zbncp_data_srv_msk_prim_disc_cache
;
280 static int hf_zbncp_data_srv_msk_backup_disc_cache
;
281 static int hf_zbncp_data_srv_msk_nwk_manager
;
282 static int hf_zbncp_data_srv_msk_stack_compl_rev
;
283 static int hf_zbncp_data_ep_cnt
;
284 static int hf_zbncp_data_dst_addr_mode
;
285 static int hf_zbncp_data_leave_flags
;
286 static int hf_zbncp_data_leave_flags_remove_chil
;
287 static int hf_zbncp_data_leave_flags_rejoin
;
288 static int hf_zbncp_data_permit_dur
;
289 static int hf_zbncp_data_tc_sign
;
290 static int hf_zbncp_data_secur_rejoin
;
291 static int hf_zbncp_data_zdo_rejoin_flags
;
292 static int hf_zbncp_data_zdo_rejoin_flags_tcsw_happened
;
293 static int hf_zbncp_data_dlen8
;
294 static int hf_zbncp_data_dlen16
;
295 static int hf_zbncp_data_param_len
;
296 static int hf_zbncp_data_radius
;
297 static int hf_zbncp_data_time_between_disc
;
298 static int hf_zbncp_data_enable_flag
;
299 static int hf_zbncp_data_array
;
300 static int hf_zbncp_data_use_alias
;
301 static int hf_zbncp_data_alias_src
;
302 static int hf_zbncp_data_alias_seq
;
303 static int hf_zbncp_data_tx_opt
;
304 static int hf_zbncp_data_tx_opt_secur
;
305 static int hf_zbncp_data_tx_opt_obsolete
;
306 static int hf_zbncp_data_tx_opt_ack
;
307 static int hf_zbncp_data_tx_opt_frag
;
308 static int hf_zbncp_data_tx_opt_inc_ext_nonce
;
309 static int hf_zbncp_data_tx_opt_force_mesh_route
;
310 static int hf_zbncp_data_tx_opt_send_route_record
;
311 static int hf_zbncp_data_lqi
;
312 static int hf_zbncp_data_rssi
;
313 static int hf_zbncp_data_do_cleanup
;
314 static int hf_zbncp_data_max_rx_bcast
;
315 static int hf_zbncp_data_mac_tx_bcast
;
316 static int hf_zbncp_data_mac_rx_ucast
;
317 static int hf_zbncp_data_mac_tx_ucast_total_zcl
;
318 static int hf_zbncp_data_mac_tx_ucast_failures_zcl
;
319 static int hf_zbncp_data_mac_tx_ucast_retries_zcl
;
320 static int hf_zbncp_data_mac_tx_ucast_total
;
321 static int hf_zbncp_data_mac_tx_ucast_failures
;
322 static int hf_zbncp_data_mac_tx_ucast_retries
;
323 static int hf_zbncp_data_mac_validate_drop_cnt
;
324 static int hf_zbncp_data_mac_phy_cca_fail_count
;
325 static int hf_zbncp_data_phy_to_mac_que_lim_reached
;
326 static int hf_zbncp_data_period_of_time
;
327 static int hf_zbncp_data_last_msg_lqi
;
328 static int hf_zbncp_data_last_msg_rssi
;
329 static int hf_zbncp_data_number_of_resets
;
330 static int hf_zbncp_data_aps_tx_bcast
;
331 static int hf_zbncp_data_aps_tx_ucast_success
;
332 static int hf_zbncp_data_aps_tx_ucast_retry
;
333 static int hf_zbncp_data_aps_tx_ucast_fail
;
334 static int hf_zbncp_data_route_disc_initiated
;
335 static int hf_zbncp_data_nwk_neighbor_added
;
336 static int hf_zbncp_data_nwk_neighbor_removed
;
337 static int hf_zbncp_data_nwk_neighbor_stale
;
338 static int hf_zbncp_upd_status_code
;
339 static int hf_zbncp_data_join_indication
;
340 static int hf_zbncp_data_childs_removed
;
341 static int hf_zbncp_data_aps_decrypt_failure
;
342 static int hf_zbncp_data_packet_buffer_allocate_failures
;
343 static int hf_zbncp_data_aps_unauthorized_key
;
344 static int hf_zbncp_data_nwk_decrypt_failure
;
345 static int hf_zbncp_data_average_mac_retry_per_aps_message_sent
;
346 static int hf_zbncp_data_nwk_fc_failure
;
347 static int hf_zbncp_data_aps_fc_failure
;
348 static int hf_zbncp_data_nwk_retry_overflow
;
349 static int hf_zbncp_data_nwk_bcast_table_full
;
350 static int hf_zbncp_data_status
;
351 static int hf_zbncp_zdo_auth_type
;
352 static int hf_zbncp_zdo_leg_auth_status_code
;
353 static int hf_zbncp_zdo_tclk_auth_status_code
;
354 static int hf_zbncp_zdo_server_mask
;
355 static int hf_zbncp_zdo_start_entry_idx
;
356 static int hf_zbncp_zdo_scan_duration
;
357 static int hf_zbncp_zdo_scan_cnt
;
358 static int hf_zbncp_zdo_scan_mgr_addr
;
359 static int hf_zbncp_data_aps_cnt
;
360 static int hf_zbncp_data_aps_fc
;
361 static int hf_zbncp_data_aps_fc_deliv_mode
;
362 static int hf_zbncp_data_aps_fc_secur
;
363 static int hf_zbncp_data_aps_fc_ack_retrans
;
364 static int hf_zbncp_data_aps_key_attr
;
365 static int hf_zbncp_data_aps_key_attr_key_src
;
366 static int hf_zbncp_data_aps_key_attr_key_used
;
367 static int hf_zbncp_data_pkt_len
;
368 static int hf_zbncp_data_pkt
;
369 static int hf_zbncp_data_scan_dur
;
370 static int hf_zbncp_data_distr_nwk_flag
;
371 static int hf_zbncp_data_nwk_count
;
372 static int hf_zbncp_data_nwk_upd_id
;
373 static int hf_zbncp_data_rejoin
;
374 static int hf_zbncp_data_rejoin_nwk
;
375 static int hf_zbncp_data_secur_en
;
376 static int hf_zbncp_data_beacon_type
;
377 static int hf_zbncp_data_beacon_order
;
378 static int hf_zbncp_data_superframe_order
;
379 static int hf_zbncp_data_battery_life_ext
;
380 static int hf_zbncp_data_enh_beacon
;
381 static int hf_zbncp_data_mac_if
;
382 static int hf_zbncp_data_mac_if_idx
;
383 static int hf_zbncp_data_ed_config
;
384 static int hf_zbncp_data_timeout_cnt
;
385 static int hf_zbncp_data_dev_timeout
;
386 static int hf_zbncp_data_relationship
;
387 static int hf_zbncp_data_tx_fail_cnt
;
388 static int hf_zbncp_data_out_cost
;
389 static int hf_zbncp_data_age
;
390 static int hf_zbncp_data_keepalive_rec
;
391 static int hf_zbncp_data_fast_poll_int
;
392 static int hf_zbncp_data_long_poll_int
;
393 static int hf_zbncp_data_fast_poll_flag
;
394 static int hf_zbncp_data_stop_fast_poll_result
;
395 static int hf_zbncp_data_time
;
396 static int hf_zbncp_data_pan_id_cnt
;
397 static int hf_zbncp_data_ic
;
398 static int hf_zbncp_data_ic_table_size
;
399 static int hf_zbncp_data_ic_ent_cnt
;
400 static int hf_zbncp_data_cs
;
401 static int hf_zbncp_data_ca_pub_key
;
402 static int hf_zbncp_data_ca_priv_key
;
403 static int hf_zbncp_data_cert
;
404 static int hf_zbncp_data_ic_en
;
405 static int hf_zbncp_data_key_type
;
406 static int hf_zbncp_data_issuer
;
407 static int hf_zbncp_data_tx_power
;
408 static int hf_zbncp_data_seed
;
409 static int hf_zbncp_data_tx_time
;
410 static int hf_zbncp_data_link_key
;
411 static int hf_zbncp_data_aps_link_key_type
;
412 static int hf_zbncp_data_key_src
;
413 static int hf_zbncp_data_key_attr
;
414 static int hf_zbncp_data_out_frame_cnt
;
415 static int hf_zbncp_data_inc_frame_cnt
;
416 static int hf_zbncp_data_offset
;
417 static int hf_zbncp_data_do_erase
;
418 static int hf_zbncp_data_calibration_status
;
419 static int hf_zbncp_data_calibration_value
;
420 static int hf_zbncp_data_zgp_key_type
;
421 static int hf_zbncp_data_zgp_link_key
;
422 static int hf_zbncp_data_prod_conf_hdr_crc
;
423 static int hf_zbncp_data_prod_conf_hdr_len
;
424 static int hf_zbncp_data_prod_conf_hdr_version
;
425 static int hf_zbncp_data_prod_conf_body
;
427 /* IEEE802.15.4 capability info (copied from IEEE802.15.4 95e212e6c7 commit)*/
428 static int hf_ieee802154_cinfo_alt_coord
;
429 static int hf_ieee802154_cinfo_device_type
;
430 static int hf_ieee802154_cinfo_power_src
;
431 static int hf_ieee802154_cinfo_idle_rx
;
432 static int hf_ieee802154_cinfo_sec_capable
;
433 static int hf_ieee802154_cinfo_alloc_addr
;
435 /* Configuration parameters */
436 static int hf_zbncp_data_conf_params_reserved
;
437 static int hf_zbncp_data_conf_params_disable_pan_id_change
;
438 static int hf_zbncp_data_conf_params_disable_channel_change
;
439 static int hf_zbncp_data_conf_params_leave_request_allowed
;
440 static int hf_zbncp_data_conf_params_require_tclk
;
441 static int hf_zbncp_data_conf_params_restricted_enabled
;
443 /* ZBNCP traffic dump */
444 static int hf_zbncp_dump_preamble
;
445 static int hf_zbncp_dump_version
;
446 static int hf_zbncp_dump_type
;
447 static int hf_zbncp_dump_options
;
448 static int hf_zbncp_dump_options_dir
;
449 static int hf_zbncp_dump_options_int_state
;
450 static int hf_zbncp_dump_options_tx_conflict
;
452 /* Initialize subtree pointers */
453 static int ett_zbncp_hdr
;
454 static int ett_zbncp_hdr_flags
;
455 static int ett_zbncp_ll_body
;
456 static int ett_zbncp_hl_hdr
;
457 static int ett_zbncp_hl_body
;
458 static int ett_zbncp_data_in_cl_list
;
459 static int ett_zbncp_data_out_cl_list
;
460 static int ett_zbncp_data_mac_cap
;
461 static int ett_zbncp_data_pwr_src
;
462 static int ett_zbncp_data_cur_pwr_src
;
463 static int ett_zbncp_data_asoc_nwk_list
;
464 static int ett_zbncp_data_pwr_desc
;
465 static int ett_zbncp_data_desc_cap
;
466 static int ett_zbncp_data_flags
;
467 static int ett_zbncp_data_server_mask
;
468 static int ett_zbncp_data_ep_list
;
469 static int ett_zbncp_data_leave_flags
;
470 static int ett_zbncp_data_tx_opt
;
471 static int ett_zbncp_data_zdo_rejoin_flags
;
472 static int ett_zbncp_data_apc_fc
;
473 static int ett_zbncp_data_prod_conf_hdr
;
474 static int ett_zbncp_data_aps_key_attr
;
475 static int ett_zbncp_data_ch_list
;
476 static int ett_zbncp_data_channel
;
477 static int ett_zbncp_data_nwk_descr
;
478 static int ett_zbncp_data_cmd_opt
;
479 static int ett_zbncp_data_joind_bitmask
;
480 static int ett_zbncp_data_trace_bitmask
;
481 static int ett_zbncp_data_conf_params
;
483 static int ett_zbncp_dump
;
484 static int ett_zbncp_dump_opt
;
486 static dissector_handle_t zbncp_handle
;
488 static const value_string zbncp_hl_type
[] =
490 {ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
, "Request"},
491 {ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
, "Response"},
492 {ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
, "Indication"},
496 static const value_string zbncp_hl_status_cat
[] =
498 {ZBNCP_HIGH_LVL_STAT_CAT_GENERIC
, "Generic"},
499 {ZBNCP_HIGH_LVL_STAT_CAT_SYSTEM
, "System"},
500 {ZBNCP_HIGH_LVL_STAT_CAT_MAC
, "MAC"},
501 {ZBNCP_HIGH_LVL_STAT_CAT_NWK
, "NWK"},
502 {ZBNCP_HIGH_LVL_STAT_CAT_APS
, "APS"},
503 {ZBNCP_HIGH_LVL_STAT_CAT_ZDO
, "ZDO"},
504 {ZBNCP_HIGH_LVL_STAT_CAT_CBKE
, "CBKE"},
508 static const value_string zbncp_reset_opt
[] =
512 {2, "Factory Reset"},
513 {3, "Locking reading keys"},
517 static const value_string zbncp_zb_role
[] =
525 static const value_string zbncp_bind_type_vals
[] =
527 {0, "NCP_HL_UNUSED_BINDING"},
528 {1, "NCP_HL_UNICAST_BINDING"},
532 static const value_string zbncp_tc_policy_types
[] =
534 {0, "TC Link Keys Required"},
536 {2, "TC Rejoin Enabled"},
537 {3, "Ignore TC Rejoin"},
538 {4, "APS Insecure Join"},
539 {5, "Disable NWK MGMT Channel Update"},
540 {6, "Unsecure TC Rejoin Enable"},
541 {7, "Enable Device Interview"},
542 {8, "Set APS encryption for ZDO"},
546 static const value_string zbncp_dev_update_status_code
[] =
548 {0, "Standard Device Secured Rejoin"},
549 {1, "Standard Device Unsecured Join"},
551 {3, "Standard Device Trust Center Rejoin"},
555 static const value_string zbncp_nwk_conf_behavior
[] =
563 static const value_string zbncp_hl_call_id
[] =
565 {ZBNCP_CMD_GET_MODULE_VERSION
, "GET_MODULE_VERSION"},
566 {ZBNCP_CMD_NCP_RESET
, "NCP_RESET"},
567 {ZBNCP_CMD_GET_ZIGBEE_ROLE
, "GET_ZIGBEE_ROLE"},
568 {ZBNCP_CMD_SET_ZIGBEE_ROLE
, "SET_ZIGBEE_ROLE"},
569 {ZBNCP_CMD_GET_ZIGBEE_CHANNEL_MASK
, "GET_ZIGBEE_CHANNEL_MASK"},
570 {ZBNCP_CMD_SET_ZIGBEE_CHANNEL_MASK
, "SET_ZIGBEE_CHANNEL_MASK"},
571 {ZBNCP_CMD_GET_ZIGBEE_CHANNEL
, "GET_ZIGBEE_CHANNEL"},
572 {ZBNCP_CMD_GET_PAN_ID
, "GET_PAN_ID"},
573 {ZBNCP_CMD_SET_PAN_ID
, "SET_PAN_ID"},
574 {ZBNCP_CMD_GET_LOCAL_IEEE_ADDR
, "GET_LOCAL_IEEE_ADDR"},
575 {ZBNCP_CMD_SET_LOCAL_IEEE_ADDR
, "SET_LOCAL_IEEE_ADDR"},
576 {ZBNCP_CMD_SET_TRACE
, "SET_TRACE"},
577 {ZBNCP_CMD_GET_KEEPALIVE_TIMEOUT
, "GET_KEEPALIVE_TIMEOUT"},
578 {ZBNCP_CMD_SET_KEEPALIVE_TIMEOUT
, "SET_KEEPALIVE_TIMEOUT"},
579 {ZBNCP_CMD_GET_TX_POWER
, "GET_TX_POWER"},
580 {ZBNCP_CMD_SET_TX_POWER
, "SET_TX_POWER"},
581 {ZBNCP_CMD_GET_RX_ON_WHEN_IDLE
, "GET_RX_ON_WHEN_IDLE"},
582 {ZBNCP_CMD_SET_RX_ON_WHEN_IDLE
, "SET_RX_ON_WHEN_IDLE"},
583 {ZBNCP_CMD_GET_JOINED
, "GET_JOINED"},
584 {ZBNCP_CMD_GET_AUTHENTICATED
, "GET_AUTHENTICATED"},
585 {ZBNCP_CMD_GET_ED_TIMEOUT
, "GET_ED_TIMEOUT"},
586 {ZBNCP_CMD_SET_ED_TIMEOUT
, "SET_ED_TIMEOUT"},
587 {ZBNCP_CMD_ADD_VISIBLE_DEV
, "ADD_VISIBLE_DEV"},
588 {ZBNCP_CMD_ADD_INVISIBLE_SHORT
, "ADD_INVISIBLE_SHORT"},
589 {ZBNCP_CMD_RM_INVISIBLE_SHORT
, "RM_INVISIBLE_SHORT"},
590 {ZBNCP_CMD_SET_NWK_KEY
, "SET_NWK_KEY"},
591 {ZBNCP_CMD_GET_SERIAL_NUMBER
, "GET_SERIAL_NUMBER"},
592 {ZBNCP_CMD_GET_VENDOR_DATA
, "GET_VENDOR_DATA"},
593 {ZBNCP_CMD_GET_NWK_KEYS
, "GET_NWK_KEYS"},
594 {ZBNCP_CMD_GET_APS_KEY_BY_IEEE
, "GET_APS_KEY_BY_IEEE"},
595 {ZBNCP_CMD_BIG_PKT_TO_NCP
, "BIG_PKT_TO_NCP"},
596 {ZBNCP_CMD_GET_PARENT_ADDR
, "GET_PARENT_ADDR"},
597 {ZBNCP_CMD_GET_EXT_PAN_ID
, "GET_EXT_PAN_ID"},
598 {ZBNCP_CMD_GET_COORDINATOR_VERSION
, "GET_COORDINATOR_VERSION"},
599 {ZBNCP_CMD_GET_SHORT_ADDRESS
, "GET_SHORT_ADDRESS"},
600 {ZBNCP_CMD_GET_TRUST_CENTER_ADDRESS
, "GET_TRUST_CENTER_ADDRESS"},
601 {ZBNCP_CMD_DEBUG_WRITE
, "DEBUG_WRITE"},
602 {ZBNCP_CMD_GET_CONFIG_PARAMETER
, "GET_CONFIG_PARAMETER"},
603 {ZBNCP_CMD_GET_LOCK_STATUS
, "GET_LOCK_STATUS"},
604 {ZBNCP_CMD_GET_TRACE
, "GET_TRACE"},
605 {ZBNCP_CMD_NCP_RESET_IND
, "NCP_RESET_IND"},
606 {ZBNCP_CMD_SET_NWK_LEAVE_ALLOWED
, "SET_NWK_LEAVE_ALLOWED"},
607 {ZBNCP_CMD_GET_NWK_LEAVE_ALLOWED
, "GET_NWK_LEAVE_ALLOWED"},
608 {ZBNCP_CMD_NVRAM_WRITE
, "NVRAM_WRITE"},
609 {ZBNCP_CMD_NVRAM_READ
, "NVRAM_READ"},
610 {ZBCNP_CMD_NVRAM_CLEAR
, "NVRAM_CLEAR"},
611 {ZBNCP_CMD_NVRAM_ERASE
, "NVRAM_ERASE"},
612 {ZBNCP_CMD_SET_TC_POLICY
, "SET_TC_POLICY"},
613 {ZBNCP_CMD_SET_EXTENDED_PAN_ID
, "SET_EXTENDED_PAN_ID"},
614 {ZBNCP_CMD_SET_ED_CAPACITY
, "SET_ED_CAPACITY"},
615 {ZBNCP_CMD_GET_ED_CAPACITY
, "GET_ED_CAPACITY"},
616 {ZBNCP_CMD_SET_ZDO_LEAVE_ALLOWED
, "SET_ZDO_LEAVE_ALLOWED"},
617 {ZBNCP_CMD_GET_ZDO_LEAVE_ALLOWED
, "GET_ZDO_LEAVE_ALLOWED"},
618 {ZBNCP_CMD_SET_LEAVE_WO_REJOIN_ALLOWED
, "SET_LEAVE_WO_REJOIN_ALLOWED"},
619 {ZBNCP_CMD_GET_LEAVE_WO_REJOIN_ALLOWED
, "GET_LEAVE_WO_REJOIN_ALLOWED"},
620 {ZBNCP_CMD_DISABLE_GPPB
, "DISABLE_GPPB"},
621 {ZBNCP_CMD_GP_SET_SHARED_KEY_TYPE
, "GP_SET_SHARED_KEY_TYPE"},
622 {ZBNCP_CMD_GP_SET_DEFAULT_LINK_KEY
, "GP_SET_DEFAULT_LINK_KEY"},
623 {ZBNCP_CMD_PRODUCTION_CONFIG_READ
, "PRODUCTION_CONFIG_READ"},
624 {ZBNCP_CMD_SET_MAX_JOINS
, "SET_MAX_JOINS"},
625 {ZBNCP_CMD_GET_MAX_JOINS
, "GET_MAX_JOINS"},
626 {ZBNCP_CMD_TRACE_IND
, "TRACE_IND"},
627 {ZBNCP_CMD_GET_KEY_NEG_METHOD
, "GET_KEY_NEG_METHOD"},
628 {ZBNCP_CMD_SET_KEY_NEG_METHOD
, "SET_KEY_NEG_METHOD"},
629 {ZBNCP_CMD_GET_PSK_SECRETS
, "GET_PSK_SECRETS"},
630 {ZBNCP_CMD_SET_PSK_SECRETS
, "SET_PSK_SECRETS"},
631 {ZBNCP_CMD_SET_R22_JOIN_USAGE
, "SET_R22_JOIN_USAGE"},
632 {ZBNCP_CMD_SET_NWK_CONF_PRESET
, "SET_NWK_CONF_PRESET"},
633 {ZBNCP_CMD_DEBUG_BROAD_NWK_KEY
, "DEBUG_BROAD_NWK_KEY"},
634 {ZBNCP_CMD_DEBUG_BROAD_APS_KEY
, "DEBUG_BROAD_APS_KEY"},
635 {ZBNCP_CMD_AF_SET_SIMPLE_DESC
, "AF_SET_SIMPLE_DESC"},
636 {ZBNCP_CMD_AF_DEL_EP
, "AF_DEL_EP"},
637 {ZBNCP_CMD_AF_SET_NODE_DESC
, "AF_SET_NODE_DESC"},
638 {ZBNCP_CMD_AF_SET_POWER_DESC
, "AF_SET_POWER_DESC"},
639 {ZBNCP_CMD_AF_SUBGHZ_SUSPEND_IND
, "AF_SUBGHZ_SUSPEND_IND"},
640 {ZBNCP_CMD_AF_SUBGHZ_RESUME_IND
, "AF_SUBGHZ_RESUME_IND"},
641 {ZBNCP_CMD_ZDO_NWK_ADDR_REQ
, "ZDO_NWK_ADDR_REQ"},
642 {ZBNCP_CMD_ZDO_IEEE_ADDR_REQ
, "ZDO_IEEE_ADDR_REQ"},
643 {ZBNCP_CMD_ZDO_POWER_DESC_REQ
, "ZDO_POWER_DESC_REQ"},
644 {ZBNCP_CMD_ZDO_NODE_DESC_REQ
, "ZDO_NODE_DESC_REQ"},
645 {ZBNCP_CMD_ZDO_SIMPLE_DESC_REQ
, "ZDO_SIMPLE_DESC_REQ"},
646 {ZBNCP_CMD_ZDO_ACTIVE_EP_REQ
, "ZDO_ACTIVE_EP_REQ"},
647 {ZBNCP_CMD_ZDO_MATCH_DESC_REQ
, "ZDO_MATCH_DESC_REQ"},
648 {ZBNCP_CMD_ZDO_BIND_REQ
, "ZDO_BIND_REQ"},
649 {ZBNCP_CMD_ZDO_UNBIND_REQ
, "ZDO_UNBIND_REQ"},
650 {ZBNCP_CMD_ZDO_MGMT_LEAVE_REQ
, "ZDO_MGMT_LEAVE_REQ"},
651 {ZBNCP_CMD_ZDO_PERMIT_JOINING_REQ
, "ZDO_PERMIT_JOINING_REQ"},
652 {ZBNCP_CMD_ZDO_DEV_ANNCE_IND
, "ZDO_DEV_ANNCE_IND"},
653 {ZBNCP_CMD_ZDO_REJOIN
, "ZDO_REJOIN"},
654 {ZBNCP_CMD_ZDO_SYSTEM_SRV_DISCOVERY_REQ
, "ZDO_SYSTEM_SRV_DISCOVERY_REQ"},
655 {ZBNCP_CMD_ZDO_MGMT_BIND_REQ
, "ZDO_MGMT_BIND_REQ"},
656 {ZBNCP_CMD_ZDO_MGMT_LQI_REQ
, "ZDO_MGMT_LQI_REQ"},
657 {ZBNCP_CMD_ZDO_MGMT_NWK_UPDATE_REQ
, "ZDO_MGMT_NWK_UPDATE_REQ"},
658 {ZBNCP_CMD_ZDO_REMOTE_CMD_IND
, "ZDO_REMOTE_CMD_IND"},
659 {ZBNCP_CMD_ZDO_GET_STATS
, "ZDO_GET_STATS"},
660 {ZBNCP_CMD_ZDO_DEV_AUTHORIZED_IND
, "ZDO_DEV_AUTHORIZED_IND"},
661 {ZBNCP_CMD_ZDO_DEV_UPDATE_IND
, "ZDO_DEV_UPDATE_IND"},
662 {ZBNCP_CMD_ZDO_SET_NODE_DESC_MANUF_CODE
, "ZDO_SET_NODE_DESC_MANUF_CODE"},
663 {ZBNCP_CMD_HL_ZDO_GET_DIAG_DATA_REQ
, "ZDO_GET_DIAG_DATA_REQ"},
664 {ZBNCP_CMD_HL_ZDO_RAW_REQ
, "ZDO_RAW_REQ"},
665 {ZBNCP_CMD_HL_ZDO_SEND_CONF_PARAMS_REQ
, "ZDO_SEND_CONF_PARAMS_REQ"},
666 {ZBNCP_CMD_HL_ZDO_MGMT_BEACON_SURVEY_REQ
, "ZDO_MGMT_BEACON_SURVEY_REQ"},
667 {ZBNCP_CMD_HL_ZDO_DECOMMISSION_REQ
, "ZDO_DECOMMISSION_REQ"},
668 {ZBNCP_CMD_HL_ZDO_GET_AUTH_LEVEL_REQ
, "ZDO_GET_AUTH_LEVEL_REQ"},
669 {ZBNCP_CMD_APSDE_DATA_REQ
, "APSDE_DATA_REQ"},
670 {ZBNCP_CMD_APSME_BIND
, "APSME_BIND"},
671 {ZBNCP_CMD_APSME_UNBIND
, "APSME_UNBIND"},
672 {ZBNCP_CMD_APSME_ADD_GROUP
, "APSME_ADD_GROUP"},
673 {ZBNCP_CMD_APSME_RM_GROUP
, "APSME_RM_GROUP"},
674 {ZBNCP_CMD_APSDE_DATA_IND
, "APSDE_DATA_IND"},
675 {ZBNCP_CMD_APSME_RM_ALL_GROUPS
, "APSME_RM_ALL_GROUPS"},
676 {ZBNCP_CMD_APS_GET_GROUP_TABLE
, "APS_GET_GROUP_TABLE"},
677 {ZBNCP_CMD_APSME_UNBIND_ALL
, "APSME_UNBIND_ALL"},
678 {ZBNCP_CMD_APSME_RM_BIND_ENTRY_BY_ID
, "APSME_RM_BIND_ENTRY_BY_ID"},
679 {ZBNCP_CMD_APSME_CLEAR_BIND_TABLE
, "APSME_CLEAR_BIND_TABLE"},
680 {ZBNCP_CMD_APSME_REMOTE_BIND_IND
, "APSME_REMOTE_BIND_IND"},
681 {ZBNCP_CMD_APSME_REMOTE_UNBIND_IND
, "APSME_REMOTE_UNBIND_IND"},
682 {ZBNCP_CMD_APSME_SET_REMOTE_BIND_OFFSET
, "APSME_SET_REMOTE_BIND_OFFSET"},
683 {ZBNCP_CMD_APSME_GET_REMOTE_BIND_OFFSET
, "APSME_GET_REMOTE_BIND_OFFSET"},
684 {ZBNCP_CMD_APSME_GET_BIND_ENTRY_BY_ID
, "APSME_GET_BIND_ENTRY_BY_ID"},
685 {ZBNCP_CMD_NWK_FORMATION
, "NWK_FORMATION"},
686 {ZBNCP_CMD_NWK_DISCOVERY
, "NWK_DISCOVERY"},
687 {ZBNCP_CMD_NWK_NLME_JOIN
, "NWK_NLME_JOIN"},
688 {ZBNCP_CMD_NWK_PERMIT_JOINING
, "NWK_PERMIT_JOINING"},
689 {ZBNCP_CMD_NWK_GET_IEEE_BY_SHORT
, "NWK_GET_IEEE_BY_SHORT"},
690 {ZBNCP_CMD_NWK_GET_SHORT_BY_IEEE
, "NWK_GET_SHORT_BY_IEEE"},
691 {ZBNCP_CMD_NWK_GET_NEIGHBOR_BY_IEEE
, "NWK_GET_NEIGHBOR_BY_IEEE"},
692 {ZBNCP_CMD_NWK_STARTED_IND
, "NWK_STARTED_IND"},
693 {ZBNCP_CMD_NWK_REJOINED_IND
, "NWK_REJOINED_IND"},
694 {ZBNCP_CMD_NWK_REJOIN_FAILED_IND
, "NWK_REJOIN_FAILED_IND"},
695 {ZBNCP_CMD_NWK_LEAVE_IND
, "NWK_LEAVE_IND"},
696 {ZBNCP_CMD_PIM_SET_FAST_POLL_INTERVAL
, "PIM_SET_FAST_POLL_INTERVAL"},
697 {ZBNCP_CMD_PIM_SET_LONG_POLL_INTERVAL
, "PIM_SET_LONG_POLL_INTERVAL"},
698 {ZBNCP_CMD_PIM_START_FAST_POLL
, "PIM_START_FAST_POLL"},
699 {ZBNCP_CMD_PIM_START_POLL
, "PIM_START_POLL"},
700 {ZBNCP_CMD_PIM_SET_ADAPTIVE_POLL
, "PIM_SET_ADAPTIVE_POLL"},
701 {ZBNCP_CMD_PIM_STOP_FAST_POLL
, "PIM_STOP_FAST_POLL"},
702 {ZBNCP_CMD_PIM_STOP_POLL
, "PIM_STOP_POLL"},
703 {ZBNCP_CMD_PIM_ENABLE_TURBO_POLL
, "PIM_ENABLE_TURBO_POLL"},
704 {ZBNCP_CMD_PIM_DISABLE_TURBO_POLL
, "PIM_DISABLE_TURBO_POLL"},
705 {ZBNCP_CMD_NWK_GET_FIRST_NBT_ENTRY
, "NWK_GET_FIRST_NBT_ENTRY"},
706 {ZBNCP_CMD_NWK_GET_NEXT_NBT_ENTRY
, "NWK_GET_NEXT_NBT_ENTRY"},
707 {ZBNCP_CMD_NWK_PAN_ID_CONFLICT_RESOLVE
, "NWK_PAN_ID_CONFLICT_RESOLVE"},
708 {ZBNCP_CMD_NWK_PAN_ID_CONFLICT_IND
, "NWK_PAN_ID_CONFLICT_IND"},
709 {ZBNCP_CMD_NWK_ADDRESS_UPDATE_IND
, "NWK_ADDRESS_UPDATE_IND"},
710 {ZBNCP_CMD_NWK_START_WITHOUT_FORMATION
, "NWK_START_WITHOUT_FORMATION"},
711 {ZBNCP_CMD_NWK_NLME_ROUTER_START
, "NWK_NLME_ROUTER_START"},
712 {ZBNCP_CMD_PIM_SINGLE_POLL
, "PIM_SINGLE_POLL"},
713 {ZBNCP_CMD_PARENT_LOST_IND
, "PARENT_LOST_IND"},
714 {ZBNCP_CMD_PIM_START_TURBO_POLL_PACKETS
, "PIM_START_TURBO_POLL_PACKETS"},
715 {ZBNCP_CMD_PIM_START_TURBO_POLL_CONTINUOUS
, "PIM_START_TURBO_POLL_CONTINUOUS"},
716 {ZBNCP_CMD_PIM_TURBO_POLL_CONTINUOUS_LEAVE
, "PIM_TURBO_POLL_CONTINUOUS_LEAVE"},
717 {ZBNCP_CMD_PIM_TURBO_POLL_PACKETS_LEAVE
, "PIM_TURBO_POLL_PACKETS_LEAVE"},
718 {ZBNCP_CMD_PIM_PERMIT_TURBO_POLL
, "PIM_PERMIT_TURBO_POLL"},
719 {ZBNCP_CMD_PIM_SET_FAST_POLL_TIMEOUT
, "PIM_SET_FAST_POLL_TIMEOUT"},
720 {ZBNCP_CMD_PIM_GET_LONG_POLL_INTERVAL
, "PIM_GET_LONG_POLL_INTERVAL"},
721 {ZBNCP_CMD_PIM_GET_IN_FAST_POLL_FLAG
, "PIM_GET_IN_FAST_POLL_FLAG"},
722 {ZBNCP_CMD_SET_KEEPALIVE_MODE
, "SET_KEEPALIVE_MODE"},
723 {ZBNCP_CMD_START_CONCENTRATOR_MODE
, "START_CONCENTRATOR_MODE"},
724 {ZBNCP_CMD_STOP_CONCENTRATOR_MODE
, "STOP_CONCENTRATOR_MODE"},
725 {ZBNCP_CMD_NWK_ENABLE_PAN_ID_CONFLICT_RESOLUTION
, "NWK_ENABLE_PAN_ID_CONFLICT_RESOLUTION"},
726 {ZBNCP_CMD_NWK_ENABLE_AUTO_PAN_ID_CONFLICT_RESOLUTION
, "NWK_ENABLE_AUTO_PAN_ID_CONFLICT_RESOLUTION"},
727 {ZBNCP_CMD_PIM_TURBO_POLL_CANCEL_PACKET
, "PIM_TURBO_POLL_CANCEL_PACKET"},
728 {ZBNCP_CMD_SET_FORCE_ROUTE_RECORD
, "SET_FORCE_ROUTE_RECORD"},
729 {ZBNCP_CMD_GET_FORCE_ROUTE_RECORD
, "GET_FORCE_ROUTE_RECORD"},
730 {ZBNCP_CMD_NWK_NBR_ITERATOR_NEXT
, "NWK_NBR_ITERATOR_NEXT"},
731 {ZBNCP_CMD_ZB_DEBUG_SIGNAL_TCLK_READY_IND
, "DEBUG_SIGNAL_TCLK_READY_IND"},
732 {ZBNCP_CMD_ZB_DEVICE_READY_FOR_INTERVIEW_IND
, "DEVICE_READY_FOR_INTERVIEW_IND"},
733 {ZBNCP_CMD_ZB_DEVICE_INTERVIEW_FINISHED_IND
, "DEVICE_INTERVIEW_FINISHED_IND"},
734 {ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_PAN_ID_CHANGE
, "PREPARE_NETWORK_FOR_CHANNEL_PAN_ID_CHANGE"},
735 {ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_CHANGE
, "PREPARE_NETWORK_FOR_CHANNEL_CHANGE"},
736 {ZBNCP_CMD_ZB_START_CHANNEL_CHANGE
, "START_CHANNEL_CHANGE"},
737 {ZBNCP_CMD_ZB_START_PAN_ID_CHANGE
, "START_PAN_ID_CHANGE"},
738 {ZBNCP_CMD_SECUR_SET_LOCAL_IC
, "SECUR_SET_LOCAL_IC"},
739 {ZBNCP_CMD_SECUR_ADD_IC
, "SECUR_ADD_IC"},
740 {ZBNCP_CMD_SECUR_DEL_IC
, "SECUR_DEL_IC"},
741 {ZBNCP_CMD_SECUR_ADD_CERT
, "SECUR_ADD_CERT"},
742 {ZBNCP_CMD_SECUR_DEL_CERT
, "SECUR_DEL_CERT"},
743 {ZBNCP_CMD_SECUR_START_KE
, "SECUR_START_KE"},
744 {ZBNCP_CMD_SECUR_START_PARTNER_LK
, "SECUR_START_PARTNER_LK"},
745 {ZBNCP_CMD_SECUR_CBKE_SRV_FINISHED_IND
, "SECUR_CBKE_SRV_FINISHED_IND"},
746 {ZBNCP_CMD_SECUR_PARTNER_LK_FINISHED_IND
, "SECUR_PARTNER_LK_FINISHED_IND"},
747 {ZBNCP_CMD_SECUR_KE_WHITELIST_ADD
, "SECUR_KE_WHITELIST_ADD"},
748 {ZBNCP_CMD_SECUR_KE_WHITELIST_DEL
, "SECUR_KE_WHITELIST_DEL"},
749 {ZBNCP_CMD_SECUR_KE_WHITELIST_DEL_ALL
, "SECUR_KE_WHITELIST_DEL_ALL"},
750 {ZBNCP_CMD_SECUR_JOIN_USES_IC
, "SECUR_JOIN_USES_IC"},
751 {ZBNCP_CMD_SECUR_GET_IC_BY_IEEE
, "SECUR_GET_IC_BY_IEEE"},
752 {ZBNCP_CMD_SECUR_GET_CERT
, "SECUR_GET_CERT"},
753 {ZBNCP_CMD_SECUR_GET_LOCAL_IC
, "SECUR_GET_LOCAL_IC"},
754 {ZBNCP_CMD_SECUR_TCLK_IND
, "SECUR_TCLK_IND"},
755 {ZBNCP_CMD_SECUR_TCLK_EXCHANGE_FAILED_IND
, "SECUR_TCLK_EXCHANGE_FAILED_IND"},
756 {ZBNCP_CMD_SECUR_GET_KEY_IDX
, "SECUR_GET_KEY_IDX"},
757 {ZBNCP_CMD_SECUR_GET_KEY
, "SECUR_GET_KEY"},
758 {ZBNCP_CMD_SECUR_ERASE_KEY
, "SECUR_ERASE_KEY"},
759 {ZBNCP_CMD_SECUR_CLEAR_KEY_TABLE
, "SECUR_CLEAR_KEY_TABLE"},
760 {ZBNCP_CMD_SECUR_NWK_INITIATE_KEY_SWITCH_PROCEDURE
, "SECUR_NWK_INITIATE_KEY_SWITCH_PROCEDURE"},
761 {ZBNCP_CMD_SECUR_GET_IC_LIST
, "SECUR_GET_IC_LIST"},
762 {ZBNCP_CMD_SECUR_GET_IC_BY_IDX
, "SECUR_GET_IC_BY_IDX"},
763 {ZBNCP_CMD_SECUR_REMOVE_ALL_IC
, "SECUR_REMOVE_ALL_IC"},
764 {ZBNCP_CMD_SECUR_PARTNER_LK_ENABLE
, "SECUR_PARTNER_LK_ENABLE"},
765 {ZBNCP_CMD_SECUR_AUTH_DEVICE_AFTER_INTERVIEW
, "SECUR_AUTH_DEVICE_AFTER_INTERVIEW"},
766 {ZBNCP_CMD_ZDO_SECUR_UPDATE_DEVICE_TCLK
, "SECUR_UPDATE_DEVICE_TCLK"},
767 {ZBNCP_CMD_MANUF_MODE_START
, "MANUF_MODE_START"},
768 {ZBNCP_CMD_MANUF_MODE_END
, "MANUF_MODE_END"},
769 {ZBNCP_CMD_MANUF_SET_CHANNEL
, "MANUF_SET_CHANNEL"},
770 {ZBNCP_CMD_MANUF_GET_CHANNEL
, "MANUF_GET_CHANNEL"},
771 {ZBNCP_CMD_MANUF_SET_POWER
, "MANUF_SET_POWER"},
772 {ZBNCP_CMD_MANUF_GET_POWER
, "MANUF_GET_POWER"},
773 {ZBNCP_CMD_MANUF_START_TONE
, "MANUF_START_TONE"},
774 {ZBNCP_CMD_MANUF_STOP_TONE
, "MANUF_STOP_TONE"},
775 {ZBNCP_CMD_MANUF_START_STREAM_RANDOM
, "MANUF_START_STREAM_RANDOM"},
776 {ZBNCP_CMD_MANUF_STOP_STREAM_RANDOM
, "MANUF_STOP_STREAM_RANDOM"},
777 {ZBNCP_CMD_NCP_HL_MANUF_SEND_SINGLE_PACKET
, "MANUF_SEND_SINGLE_PACKET"},
778 {ZBNCP_CMD_MANUF_START_TEST_RX
, "MANUF_START_TEST_RX"},
779 {ZBNCP_CMD_MANUF_STOP_TEST_RX
, "MANUF_STOP_TEST_RX"},
780 {ZBNCP_CMD_MANUF_RX_PACKET_IND
, "MANUF_RX_PACKET_IND"},
781 {ZBNCP_CMD_OTA_RUN_BOOTLOADER
, "OTA_RUN_BOOTLOADER"},
782 {ZBNCP_CMD_OTA_START_UPGRADE_IND
, "OTA_START_UPGRADE_IND"},
783 {ZBNCP_CMD_OTA_SEND_PORTION_FW
, "OTA_SEND_PORTION_FW"},
784 {ZBNCP_CMD_READ_NVRAM_RESERVED
, "READ_NVRAM_RESERVED"},
785 {ZBNCP_CMD_WRITE_NVRAM_RESERVED
, "WRITE_NVRAM_RESERVED"},
786 {ZBNCP_CMD_GET_CALIBRATION_INFO
, "GET_CALIBRATION_INFO"},
790 static const value_string zbncp_parameter_id_list
[] =
792 {ZBNCP_PARAMETER_ID_IEEE_ADDR_TABLE_SIZE
, "IEEE_ADDR_TABLE_SIZE"},
793 {ZBNCP_PARAMETER_ID_NEIGHBOR_TABLE_SIZE
, "NEIGHBOR_TABLE_SIZE"},
794 {ZBNCP_PARAMETER_ID_APS_SRC_BINDING_TABLE_SIZE
, "APS_SRC_BINDING_TABLE_SIZE"},
795 {ZBNCP_PARAMETER_ID_APS_GROUP_TABLE_SIZE
, "APS_GROUP_TABLE_SIZE"},
796 {ZBNCP_PARAMETER_ID_NWK_ROUTING_TABLE_SIZE
, "NWK_ROUTING_TABLE_SIZE"},
797 {ZBNCP_PARAMETER_ID_NWK_ROUTE_DISCOVERY_TABLE_SIZE
, "NWK_ROUTE_DISCOVERY_TABLE_SIZE"},
798 {ZBNCP_PARAMETER_ID_IOBUF_POOL_SIZE
, "IOBUF_POOL_SIZE"},
799 {ZBNCP_PARAMETER_ID_PANID_TABLE_SIZE
, "PANID_TABLE_SIZE"},
800 {ZBNCP_PARAMETER_ID_APS_DUPS_TABLE_SIZE
, "APS_DUPS_TABLE_SIZE"},
801 {ZBNCP_PARAMETER_ID_APS_BIND_TRANS_TABLE_SIZE
, "APS_BIND_TRANS_TABLE_SIZE"},
802 {ZBNCP_PARAMETER_ID_N_APS_RETRANS_ENTRIES
, "N_APS_RETRANS_ENTRIES"},
803 {ZBNCP_PARAMETER_ID_NWK_MAX_HOPS
, "NWK_MAX_HOPS"},
804 {ZBNCP_PARAMETER_ID_NIB_MAX_CHILDREN
, "NIB_MAX_CHILDREN"},
805 {ZBNCP_PARAMETER_ID_N_APS_KEY_PAIR_ARR_MAX_SIZE
, "N_APS_KEY_PAIR_ARR_MAX_SIZE"},
806 {ZBNCP_PARAMETER_ID_NWK_MAX_SRC_ROUTES
, "NWK_MAX_SRC_ROUTES"},
807 {ZBNCP_PARAMETER_ID_APS_MAX_WINDOW_SIZE
, "APS_MAX_WINDOW_SIZE"},
808 {ZBNCP_PARAMETER_ID_APS_INTERFRAME_DELAY
, "APS_INTERFRAME_DELAY"},
809 {ZBNCP_PARAMETER_ID_ZDO_ED_BIND_TIMEOUT
, "ZDO_ED_BIND_TIMEOUT"},
810 {ZBNCP_PARAMETER_ID_NIB_PASSIVE_ASK_TIMEOUT
, "NIB_PASSIVE_ASK_TIMEOUT"},
811 {ZBNCP_PARAMETER_ID_APS_ACK_TIMEOUTS
, "APS_ACK_TIMEOUTS"},
812 {ZBNCP_PARAMETER_ID_MAC_BEACON_JITTER
, "MAC_BEACON_JITTER"},
813 {ZBNCP_PARAMETER_ID_TX_POWER
, "TX_POWER"},
814 {ZBNCP_PARAMETER_ID_ZLL_DEFAULT_RSSI_THRESHOLD
, "ZLL_DEFAULT_RSSI_THRESHOLD"},
815 {ZBNCP_PARAMETER_ID_NIB_MTORR
, "NIB_MTORR"},
819 static const value_string zbncp_rst_src_list
[] =
821 {0, "ZB_RESET_SRC_POWER_ON"},
822 {1, "ZB_RESET_SRC_SW_RESET"},
823 {2, "ZB_RESET_SRC_RESET_PIN"},
824 {3, "ZB_RESET_SRC_BROWN_OUT"},
825 {4, "ZB_RESET_SRC_CLOCK_LOSS"},
826 {5, "ZB_RESET_SRC_OTHER"},
830 static const value_string zbncp_power_level
[] =
839 static const value_string zbncp_nwk_req_type
[] =
841 {0, "Single device response"},
842 {1, "Extended response"},
846 static const value_string zbncp_hl_status_generic
[] =
857 {10, "INVALID_PARAMETER_1"},
858 {11, "INVALID_PARAMETER_2"},
859 {12, "INVALID_PARAMETER_3"},
860 {13, "INVALID_PARAMETER_4"},
861 {14, "INVALID_PARAMETER_5"},
862 {15, "INVALID_PARAMETER_6"},
863 {16, "INVALID_PARAMETER_7"},
864 {17, "INVALID_PARAMETER_8"},
865 {18, "INVALID_PARAMETER_9"},
866 {19, "INVALID_PARAMETER_10"},
867 {20, "INVALID_PARAMETER_11_OR_MORE"},
870 {23, "INVALID_PARAMETER"},
871 {24, "OPERATION_FAILED"},
872 {25, "BUFFER_TOO_SMALL"},
874 {27, "ALREADY_EXISTS"},
878 {31, "NOT_IMPLEMENTED"},
879 {32, "NO_RESOURCES"},
880 {33, "UNINITIALIZED"},
882 {35, "INVALID_STATE"},
883 {37, "CONNECTION_FAILED"},
884 {38, "CONNECTION_LOST"},
885 {40, "UNAUTHORIZED"},
887 {42, "INVALID_FORMAT"},
889 {44, "PROTOCOL_ERROR"},
891 {46, "MALFORMED_ADDRESS"},
892 {47, "COULD_NOT_READ_FILE"},
893 {48, "FILE_NOT_FOUND"},
894 {49, "DIRECTORY_NOT_FOUND"},
895 {50, "CONVERSION_ERROR"},
896 {51, "INCOMPATIBLE_TYPES"},
897 {56, "FILE_CORRUPTED"},
898 {57, "PAGE_NOT_FOUND"},
899 {62, "ILLEGAL_REQUEST"},
900 {64, "INVALID_GROUP"},
904 {71, "DEVICE_NOT_FOUND"},
909 static const value_string zb_mac_state
[] =
911 {MAC_ENUM_SUCCESS
, "SUCCESS"},
912 {MAC_ENUM_BEACON_LOSS
, "BEACON_LOSS"},
913 {MAC_ENUM_CHANNEL_ACCESS_FAILURE
, "CHANNEL_ACCESS_FAILURE"},
914 {MAC_ENUM_COUNTER_ERROR
, "COUNTER_ERROR"},
915 {MAC_ENUM_DENIED
, "DENIED"},
916 {MAC_ENUM_DISABLE_TRX_FAILURE
, "DISABLE_TRX_FAILURE"},
917 {MAC_ENUM_FRAME_TOO_LONG
, "FRAME_TOO_LONG"},
918 {MAC_ENUM_IMPROPER_KEY_TYPE
, "IMPROPER_KEY_TYPE"},
919 {MAC_ENUM_IMPROPER_SECURITY_LEVEL
, "IMPROPER_SECURITY_LEVEL"},
920 {MAC_ENUM_INVALID_ADDRESS
, "INVALID_ADDRESS"},
921 {MAC_ENUM_INVALID_GTS
, "INVALID_GTS"},
922 {MAC_ENUM_INVALID_HANDLE
, "INVALID_HANDLE"},
923 {MAC_ENUM_INVALID_INDEX
, "INVALID_INDEX"},
924 {MAC_ENUM_INVALID_PARAMETER
, "INVALID_PARAMETER"},
925 {MAC_ENUM_LIMIT_REACHED
, "LIMIT_REACHED"},
926 {MAC_ENUM_NO_ACK
, "NO_ACK"},
927 {MAC_ENUM_NO_BEACON
, "NO_BEACON"},
928 {MAC_ENUM_NO_DATA
, "NO_DATA"},
929 {MAC_ENUM_NO_SHORT_ADDRESS
, "NO_SHORT_ADDRESS"},
930 {MAC_ENUM_ON_TIME_TOO_LONG
, "ON_TIME_TOO_LONG"},
931 {MAC_ENUM_OUT_OF_CAP
, "OUT_OF_CAP"},
932 {MAC_ENUM_PAN_ID_CONFLICT
, "PAN_ID_CONFLICT"},
933 {MAC_ENUM_PAST_TIME
, "PAST_TIME"},
934 {MAC_ENUM_READ_ONLY
, "READ_ONLY"},
935 {MAC_ENUM_REALIGNMENT
, "REALIGNMENT"},
936 {MAC_ENUM_SCAN_IN_PROGRESS
, "SCAN_IN_PROGRESS"},
937 {MAC_ENUM_SECURITY_ERROR
, "SECURITY_ERROR"},
938 {MAC_ENUM_SUPERFRAME_OVERLAP
, "SUPERFRAME_OVERLAP"},
939 {MAC_ENUM_TRACKING_OFF
, "TRACKING_OFF"},
940 {MAC_ENUM_TRANSACTION_EXPIRED
, "TRANSACTION_EXPIRED"},
941 {MAC_ENUM_TRANSACTION_OVERFLOW
, "TRANSACTION_OVERFLOW"},
942 {MAC_ENUM_TX_ACTIVE
, "TX_ACTIVE"},
943 {MAC_ENUM_UNAVAILABLE_KEY
, "UNAVAILABLE_KEY"},
944 {MAC_ENUM_UNSUPPORTED_LEGACY
, "UNSUPPORTED_LEGACY"},
945 {MAC_ENUM_UNSUPPORTED_SECURITY
, "UNSUPPORTED_SECURITY"},
949 static const value_string zb_nwk_state
[] =
951 {ZBNCP_NWK_STATUS_SUCCESS
, "SUCCESS"},
952 {ZBNCP_NWK_STATUS_INVALID_PARAMETER
, "INVALID_PARAMETER"},
953 {ZBNCP_NWK_STATUS_INVALID_REQUEST
, "INVALID_REQUEST"},
954 {ZBNCP_NWK_STATUS_NOT_PERMITTED
, "NOT_PERMITTED, "},
955 {ZBNCP_NWK_STATUS_ALREADY_PRESENT
, "ALREADY_PRESENT"},
956 {ZBNCP_NWK_STATUS_SYNC_FAILURE
, "SYNC_FAILURE"},
957 {ZBNCP_NWK_STATUS_NEIGHBOR_TABLE_FULL
, "NEIGHBOR_TABLE_FULL"},
958 {ZBNCP_NWK_STATUS_UNKNOWN_DEVICE
, "UNKNOWN_DEVICE"},
959 {ZBNCP_NWK_STATUS_UNSUPPORTED_ATTRIBUTE
, "UNSUPPORTED_ATTRIBUTE"},
960 {ZBNCP_NWK_STATUS_NO_NETWORKS
, "NO_NETWORKS"},
961 {ZBNCP_NWK_STATUS_MAX_FRM_COUNTER
, "MAX_FRM_COUNTER"},
962 {ZBNCP_NWK_STATUS_NO_KEY
, "NO_KEY"},
963 {ZBNCP_NWK_STATUS_ROUTE_DISCOVERY_FAILED
, "ROUTE_DISCOVERY_FAILED"},
964 {ZBNCP_NWK_STATUS_ROUTE_ERROR
, "ROUTE_ERROR"},
965 {ZBNCP_NWK_STATUS_BT_TABLE_FULL
, "BT_TABLE_FULL"},
966 {ZBNCP_NWK_STATUS_FRAME_NOT_BUFFERED
, "FRAME_NOT_BUFFERED"},
967 {ZBNCP_NWK_STATUS_INVALID_INTERFACE
, "INVALID_INTERFACE"},
971 static const value_string zb_cbke_state
[] =
973 {ZBNCP_CBKE_STATUS_OK
, "OK"},
974 {ZBNCP_CBKE_STATUS_UNKNOWN_ISSUER
, "UNKNOWN_ISSUER"},
975 {ZBNCP_CBKE_STATUS_BAD_KEY_CONFIRM
, "BAD_KEY_CONFIRM"},
976 {ZBNCP_CBKE_STATUS_BAD_MESSAGE
, "BAD_MESSAGE"},
977 {ZBNCP_CBKE_STATUS_NO_RESOURCES
, "NO_RESOURCES"},
978 {ZBNCP_CBKE_STATUS_UNSUPPORTED_SUITE
, "UNSUPPORTED_SUITE"},
979 {ZBNCP_CBKE_STATUS_INVALID_CERTIFICATE
, "INVALID_CERTIFICATE"},
980 {ZBNCP_CBKE_STATUS_NO_KE_EP
, "NO_KE_EP"},
984 static const value_string zb_nvram_database_types
[] =
986 {ZB_NVRAM_RESERVED
, "ZB_NVRAM_RESERVED"},
987 {ZB_NVRAM_COMMON_DATA
, "ZB_NVRAM_COMMON_DATA"},
988 {ZB_NVRAM_HA_DATA
, "ZB_NVRAM_HA_DATA"},
989 {ZB_NVRAM_ZCL_REPORTING_DATA
, "ZB_NVRAM_ZCL_REPORTING_DATA"},
990 {ZB_NVRAM_APS_SECURE_DATA_GAP
, "ZB_NVRAM_APS_SECURE_DATA_GAP"},
991 {ZB_NVRAM_APS_BINDING_DATA_GAP
, "ZB_NVRAM_APS_BINDING_DATA_GAP"},
992 {ZB_NVRAM_HA_POLL_CONTROL_DATA
, "ZB_NVRAM_HA_POLL_CONTROL_DATA"},
993 {ZB_IB_COUNTERS
, "ZB_IB_COUNTERS"},
994 {ZB_NVRAM_DATASET_GRPW_DATA
, "ZB_NVRAM_DATASET_GRPW_DATA"},
995 {ZB_NVRAM_APP_DATA1
, "ZB_NVRAM_APP_DATA1"},
996 {ZB_NVRAM_APP_DATA2
, "ZB_NVRAM_APP_DATA2"},
997 {ZB_NVRAM_ADDR_MAP
, "ZB_NVRAM_ADDR_MAP"},
998 {ZB_NVRAM_NEIGHBOUR_TBL
, "ZB_NVRAM_NEIGHBOUR_TBL"},
999 {ZB_NVRAM_INSTALLCODES
, "ZB_NVRAM_INSTALLCODES"},
1000 {ZB_NVRAM_APS_SECURE_DATA
, "ZB_NVRAM_APS_SECURE_DATA"},
1001 {ZB_NVRAM_APS_BINDING_DATA
, "ZB_NVRAM_APS_BINDING_DATA"},
1002 {ZB_NVRAM_DATASET_GP_PRPOXYT
, "ZB_NVRAM_DATASET_GP_PRPOXYT"},
1003 {ZB_NVRAM_DATASET_GP_SINKT
, "ZB_NVRAM_DATASET_GP_SINKT"},
1004 {ZB_NVRAM_DATASET_GP_CLUSTER
, "ZB_NVRAM_DATASET_GP_CLUSTER"},
1005 {ZB_NVRAM_APS_GROUPS_DATA
, "ZB_NVRAM_APS_GROUPS_DATA"},
1006 {ZB_NVRAM_DATASET_SE_CERTDB
, "ZB_NVRAM_DATASET_SE_CERTDB"},
1007 {ZB_NVRAM_DATASET_GP_APP_TBL
, "ZB_NVRAM_DATASET_GP_APP_TBL"},
1008 {ZB_NVRAM_APP_DATA3
, "ZB_NVRAM_APP_DATA3"},
1009 {ZB_NVRAM_APP_DATA4
, "ZB_NVRAM_APP_DATA4"},
1010 {ZB_NVRAM_KE_WHITELIST
, "ZB_NVRAM_KE_WHITELIST"},
1011 {ZB_NVRAM_ZDO_DIAGNOSTICS_DATA
, "ZB_NVRAM_ZDO_DIAGNOSTICS_DATA"},
1012 {ZB_NVRAM_DATASET_NUMBER
, "ZB_NVRAM_DATASET_NUMBER"},
1013 {ZB_NVRAM_DATA_SET_TYPE_PAGE_HDR
, "ZB_NVRAM_DATA_SET_TYPE_PAGE_HDR"},
1017 static const value_string zbncp_zgp_key_types
[] =
1020 {1, "Zigbee NWK key"},
1021 {2, "ZGPD group key"},
1022 {3, "NWK-key derived ZGPD group key"},
1023 {4, "(Individual) out-of-the-box ZGPD key"},
1024 {7, "Derived individual ZGPD key"},
1028 static const value_string zbncp_deliv_mode
[] =
1036 static const value_string zbncp_aps_key_src
[] =
1043 static const value_string zbncp_aps_key_used
[] =
1045 {0, "Provisional TCLK"},
1046 {1, "Unverified TCLK"},
1047 {2, "Verified TCLK"},
1048 {3, "Application LK"},
1052 static const value_string zbncp_rejoin_nwk
[] =
1059 static const value_string zbncp_beacon_type
[] =
1061 {0, "Non-enhanced beacon"},
1062 {1, "Enhanced Beacon"},
1066 static const value_string zbncp_relationship
[] =
1068 {0x00, "neighbor is the parent"},
1069 {0x01, "neighbor is a child"},
1070 {0x02, "neighbor is a sibling"},
1071 {0x03, "none of the above"},
1072 {0x04, "previous child"},
1073 {0x05, "unauthenticated child"},
1077 static const value_string zbncp_keepalive_mode
[] =
1079 {0, "ED_KEEPALIVE_DISABLED"},
1080 {1, "MAC_DATA_POLL_KEEPALIVE"},
1081 {2, "ED_TIMEOUT_REQUEST_KEEPALIVE"},
1082 {3, "BOTH_KEEPALIVE_METHODS"},
1086 static const value_string zbncp_stop_fast_poll_result
[] =
1094 static const value_string zbncp_aps_addr_modes
[] =
1096 {ZB_APSDE_DST_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT
, "No addr, no EP"},
1097 {ZB_APSDE_DST_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT
, "16-bit group addr, no EP"},
1098 {ZB_APSDE_DST_ADDR_MODE_16_ENDP_PRESENT
, "16-bit short addr and EP"},
1099 {ZB_APSDE_DST_ADDR_MODE_64_ENDP_PRESENT
, "64-bit ext addr and EP"},
1100 {ZB_APSDE_DST_ADDR_MODE_BIND_TBL_ID
, "From the dst binding table"},
1104 static const value_string zbncp_cs
[] =
1106 {1, "KEC Crypto-suite #1"},
1107 {2, "KEC Crypto-suite #2"},
1111 static const value_string zbncp_key_src
[] =
1118 static const value_string zbncp_key_attr
[] =
1120 {0, "Provisional key"},
1121 {1, "Unverified key"},
1122 {2, "Verified key"},
1123 {3, "Application key"},
1127 static const value_string zbncp_zdo_auth_types
[] =
1129 {ZB_ZDO_AUTH_LEGACY_TYPE
, "legacy"},
1130 {ZB_ZDO_AUTH_TCLK_TYPE
, "TCLK"},
1134 static const value_string zbncp_zdo_leg_auth_status_codes
[] =
1136 {0, "Authorization Success"},
1137 {1, "Authorization Failure"},
1141 static const value_string zbncp_zdo_tclk_auth_status_codes
[] =
1143 {0, "Authorization Success"},
1144 {1, "Authorization Timeout"},
1145 {2, "Authorization Failure"},
1149 static const value_string zbncp_dump_type
[] =
1156 static const value_string zbncp_calibration_status
[] =
1158 {0x00, "Customer value"},
1159 {0x01, "Default value"},
1164 static const value_string zbncp_force_route_record_sending_modes
[] =
1171 static const true_false_string tfs_cinfo_device_type
= {"FFD", "RFD"};
1172 static const true_false_string tfs_cinfo_power_src
= {"AC/Mains Power", "Battery"};
1174 /* Returns changed offset */
1176 dissect_zbncp_status(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned offset
)
1178 unsigned status_category
= tvb_get_uint8(tvb
, offset
);
1181 proto_tree_add_item(tree
, hf_zbncp_data_hl_status_cat
, tvb
, offset
, 1, ENC_NA
);
1185 status
= tvb_get_uint8(tvb
, offset
);
1186 switch (status_category
)
1188 case ZBNCP_HIGH_LVL_STAT_CAT_GENERIC
:
1189 proto_tree_add_item(tree
, hf_zbncp_data_hl_status_generic
, tvb
, offset
, 1, ENC_NA
);
1190 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zbncp_hl_status_generic
, "Unknown Status"));
1193 case ZBNCP_HIGH_LVL_STAT_CAT_MAC
:
1194 proto_tree_add_item(tree
, hf_zbncp_data_hl_status_mac
, tvb
, offset
, 1, ENC_NA
);
1195 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_mac_state
, "Unknown Status"));
1198 case ZBNCP_HIGH_LVL_STAT_CAT_NWK
:
1199 proto_tree_add_item(tree
, hf_zbncp_data_hl_status_nwk
, tvb
, offset
, 1, ENC_NA
);
1200 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_nwk_state
, "Unknown Status"));
1203 case ZBNCP_HIGH_LVL_STAT_CAT_APS
:
1204 dissect_zbee_aps_status_code(tvb
, pinfo
, tree
, offset
);
1207 case ZBNCP_HIGH_LVL_STAT_CAT_CBKE
:
1208 proto_tree_add_item(tree
, hf_zbncp_data_hl_status_cbke
, tvb
, offset
, 1, ENC_NA
);
1209 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_cbke_state
, "Unknown Status"));
1213 proto_tree_add_item(tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
1214 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: 0x%x", status
);
1222 dissect_zbncp_dump_info(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1224 proto_tree
*zbncp_dump_info_tree
;
1225 unsigned idx
, offset
;
1228 static int *const options_field
[] = {
1229 &hf_zbncp_dump_options_dir
,
1230 &hf_zbncp_dump_options_int_state
,
1231 &hf_zbncp_dump_options_tx_conflict
,
1234 /* check is it ZBNCP dump sign or not */
1235 for (idx
= 0; idx
< ZBNCP_DUMP_INFO_SIGN_SIZE
; idx
++)
1237 if (tvb_get_uint8(tvb
, idx
) != ZBNCP_DUMP_INFO_SIGN
[idx
])
1244 if (tvb_get_uint8(tvb
, ZBNCP_DUMP_INFO_SIGN_SIZE
+ 1) != ZBNCP_DUMP_INFO_NCP_TYPE
)
1249 zbncp_dump_info_tree
= proto_tree_add_subtree(tree
, tvb
, 0, ZBNCP_DUMP_INFO_SIZE
, ett_zbncp_dump
, NULL
, "ZBNCP Dump");
1251 proto_tree_add_item(zbncp_dump_info_tree
, hf_zbncp_dump_preamble
, tvb
, 0, ZBNCP_DUMP_INFO_SIGN_SIZE
, ENC_ASCII
|ENC_NA
);
1252 offset
= ZBNCP_DUMP_INFO_SIGN_SIZE
;
1254 proto_tree_add_item(zbncp_dump_info_tree
, hf_zbncp_dump_version
, tvb
, offset
, 1, ENC_NA
);
1257 proto_tree_add_item(zbncp_dump_info_tree
, hf_zbncp_dump_type
, tvb
, offset
, 1, ENC_NA
);
1260 /* options subtree */
1261 options
= tvb_get_uint8(tvb
, offset
);
1262 proto_tree_add_bitmask(zbncp_dump_info_tree
, tvb
, offset
, hf_zbncp_dump_options
, ett_zbncp_dump_opt
, options_field
, ENC_NA
);
1265 if (options
& ZBNCP_DUMP_DIR_MASK
)
1267 col_set_str(pinfo
->cinfo
, COL_DEF_SRC
, "NCP");
1268 col_set_str(pinfo
->cinfo
, COL_DEF_DST
, "HOST");
1272 col_set_str(pinfo
->cinfo
, COL_DEF_SRC
, "HOST");
1273 col_set_str(pinfo
->cinfo
, COL_DEF_DST
, "NCP");
1276 if (options
& ZBNCP_DUMP_POTENTIAL_TX_RX_ERROR_MASK
)
1278 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Potential RX/TX Conflict");
1281 return tvb_new_subset_remaining(tvb
, offset
);
1285 dissect_zbncp_high_level_hdr(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, unsigned offset
, uint8_t *ptype
, uint16_t *call_id
)
1287 proto_tree
*zbncp_comm_hdr_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4, ett_zbncp_hl_hdr
, NULL
, "High Level Header");
1289 /* Dissect common header */
1291 proto_tree_add_item(zbncp_comm_hdr_tree
, hf_zbncp_data_hl_version
, tvb
, offset
, 1, ENC_NA
);
1294 *ptype
= tvb_get_uint8(tvb
, offset
);
1295 proto_tree_add_item(zbncp_comm_hdr_tree
, hf_zbncp_data_hl_packet_type
, tvb
, offset
, 1, ENC_NA
);
1298 *call_id
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1299 proto_tree_add_item(zbncp_comm_hdr_tree
, hf_zbncp_data_hl_call_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1303 col_append_str(pinfo
->cinfo
, COL_INFO
, val_to_str_const(*ptype
, zbncp_hl_type
, "Unknown Type"));
1304 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s", val_to_str_const(*call_id
, zbncp_hl_call_id
, "Unknown Call ID"));
1306 /* Dissect additional values */
1308 if (*ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
||
1309 *ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1312 proto_tree_add_item(zbncp_comm_hdr_tree
, hf_zbncp_data_hl_tsn
, tvb
, offset
, 1, ENC_NA
);
1316 if (*ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1318 offset
= dissect_zbncp_status(tvb
, pinfo
, zbncp_comm_hdr_tree
, offset
);
1325 dissect_zbncp_high_level(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, unsigned offset
, uint16_t *cmd_id
)
1327 uint8_t packet_type
;
1329 offset
= dissect_zbncp_high_level_hdr(tvb
, pinfo
, tree
, offset
, &packet_type
, cmd_id
);
1331 dissect_zbncp_high_level_body(tvb
, pinfo
, tree
, offset
, packet_type
, *cmd_id
);
1335 dissect_zbncp_dst_addrs(proto_tree
*zbncp_hl_body_tree
, tvbuff_t
*tvb
, unsigned dst_addr_mode_offset
, unsigned *offset
)
1337 uint8_t dst_addr_mode
= tvb_get_uint8(tvb
, dst_addr_mode_offset
);
1339 if (dst_addr_mode
== ZB_APSDE_DST_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT
|| dst_addr_mode
== ZB_APSDE_DST_ADDR_MODE_64_ENDP_PRESENT
|| dst_addr_mode
== ZB_APSDE_DST_ADDR_MODE_BIND_TBL_ID
)
1341 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_ieee_addr
, tvb
, *offset
, 8, ENC_NA
);
1344 else if (dst_addr_mode
== ZB_APSDE_DST_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT
|| dst_addr_mode
== ZB_APSDE_DST_ADDR_MODE_16_ENDP_PRESENT
)
1346 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, *offset
, 2, ENC_LITTLE_ENDIAN
);
1352 dissect_zbncp_high_level_body(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, unsigned offset
, uint8_t ptype _U_
, uint16_t cmd_id
)
1354 proto_tree
*zbncp_hl_body_tree
;
1356 if (offset
>= tvb_reported_length(tvb
))
1361 zbncp_hl_body_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ett_zbncp_hl_body
, NULL
, "Data");
1365 /* NCP Configuration API */
1366 case ZBNCP_CMD_GET_MODULE_VERSION
:
1367 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1369 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_fw_vers
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1372 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_stack_vers
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1375 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_proto_vers
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1380 case ZBNCP_CMD_NCP_RESET
:
1381 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1383 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_reset_opt
, tvb
, offset
, 1, ENC_NA
);
1388 case ZBNCP_CMD_GET_ZIGBEE_ROLE
:
1389 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1391 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
1396 case ZBNCP_CMD_SET_ZIGBEE_ROLE
:
1397 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1399 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
1404 case ZBNCP_CMD_GET_ZIGBEE_CHANNEL_MASK
:
1405 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1408 uint8_t ch_list_len
= tvb_get_uint8(tvb
, offset
);
1410 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_list_len
, tvb
, offset
, 1, ENC_NA
);
1415 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
1416 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Channel List");
1417 for (i
= 0; i
< ch_list_len
; i
++)
1419 proto_tree
*zbncp_hl_body_data_channel_tree
= proto_tree_add_subtree_format(
1420 zbncp_hl_body_data_ch_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Channel");
1422 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
1425 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1432 case ZBNCP_CMD_SET_ZIGBEE_CHANNEL_MASK
:
1433 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1435 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
1438 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1443 case ZBNCP_CMD_GET_ZIGBEE_CHANNEL
:
1444 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1446 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
1449 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel
, tvb
, offset
, 1, ENC_NA
);
1454 case ZBNCP_CMD_GET_PAN_ID
:
1455 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1457 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1462 case ZBNCP_CMD_SET_PAN_ID
:
1463 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1465 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1470 case ZBNCP_CMD_GET_LOCAL_IEEE_ADDR
:
1471 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_int_num
, tvb
, offset
, 1, ENC_NA
);
1473 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1475 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1480 case ZBNCP_CMD_SET_LOCAL_IEEE_ADDR
:
1481 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1483 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_int_num
, tvb
, offset
, 1, ENC_NA
);
1486 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1491 case ZBNCP_CMD_SET_TRACE
:
1492 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1494 static int *const trace_bitmask
[] = {
1495 &hf_zbncp_data_trace_wireless_traf
,
1496 &hf_zbncp_data_trace_reserved
,
1497 &hf_zbncp_data_trace_ncp_ll_proto
,
1498 &hf_zbncp_data_trace_host_int_line
,
1499 &hf_zbncp_data_trace_sleep_awake
,
1502 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_trace_mask
, ett_zbncp_data_trace_bitmask
, trace_bitmask
, ENC_LITTLE_ENDIAN
);
1507 case ZBNCP_CMD_GET_KEEPALIVE_TIMEOUT
:
1508 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1510 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1515 case ZBNCP_CMD_SET_KEEPALIVE_TIMEOUT
:
1516 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1518 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
1523 case ZBNCP_CMD_GET_TX_POWER
:
1524 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1526 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_res_tx_power
, tvb
, offset
, 1, ENC_NA
);
1531 case ZBNCP_CMD_SET_TX_POWER
:
1532 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1534 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_req_tx_power
, tvb
, offset
, 1, ENC_NA
);
1537 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1539 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_res_tx_power
, tvb
, offset
, 1, ENC_NA
);
1544 case ZBNCP_CMD_GET_RX_ON_WHEN_IDLE
:
1545 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1547 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rx_on_idle
, tvb
, offset
, 1, ENC_NA
);
1552 case ZBNCP_CMD_SET_RX_ON_WHEN_IDLE
:
1553 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1555 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rx_on_idle
, tvb
, offset
, 1, ENC_NA
);
1560 case ZBNCP_CMD_GET_JOINED
:
1561 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1563 static int *const join_bitmask
[] = {
1564 &hf_zbncp_data_joined_bit
,
1565 &hf_zbncp_data_parent_bit
,
1568 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_joined
, ett_zbncp_data_joind_bitmask
, join_bitmask
, ENC_NA
);
1573 case ZBNCP_CMD_GET_AUTHENTICATED
:
1574 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1576 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_authenticated
, tvb
, offset
, 1, ENC_NA
);
1581 case ZBNCP_CMD_GET_ED_TIMEOUT
:
1582 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1584 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_timeout
, tvb
, offset
, 1, ENC_NA
);
1589 case ZBNCP_CMD_SET_ED_TIMEOUT
:
1590 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1592 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_timeout
, tvb
, offset
, 1, ENC_NA
);
1597 case ZBNCP_CMD_ADD_VISIBLE_DEV
:
1598 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1600 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1605 case ZBNCP_CMD_ADD_INVISIBLE_SHORT
:
1606 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1608 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1613 case ZBNCP_CMD_RM_INVISIBLE_SHORT
:
1614 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1616 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1621 case ZBNCP_CMD_SET_NWK_KEY
:
1622 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1624 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_key
, tvb
, offset
, 16, ENC_NA
);
1627 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_num
, tvb
, offset
, 1, ENC_NA
);
1632 case ZBNCP_CMD_GET_SERIAL_NUMBER
:
1633 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1635 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_serial_num
, tvb
, offset
, 16, ENC_NA
);
1640 case ZBNCP_CMD_GET_VENDOR_DATA
:
1641 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1643 uint8_t size
= tvb_get_uint8(tvb
, offset
);
1644 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_size
, tvb
, offset
, 1, ENC_NA
);
1647 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_vendor_data
, tvb
, offset
, size
, ENC_NA
);
1652 case ZBNCP_CMD_GET_NWK_KEYS
:
1653 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1655 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_key
, tvb
, offset
, 16, ENC_NA
);
1658 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_num
, tvb
, offset
, 1, ENC_NA
);
1661 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_key
, tvb
, offset
, 16, ENC_NA
);
1664 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_num
, tvb
, offset
, 1, ENC_NA
);
1667 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_key
, tvb
, offset
, 16, ENC_NA
);
1670 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_num
, tvb
, offset
, 1, ENC_NA
);
1675 case ZBNCP_CMD_GET_APS_KEY_BY_IEEE
:
1676 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1678 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1681 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1683 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_key
, tvb
, offset
, 16, ENC_NA
);
1688 case ZBNCP_CMD_BIG_PKT_TO_NCP
:
1689 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1693 pkt_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1694 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pkt_len
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1697 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pkt
, tvb
, offset
, pkt_len
, ENC_NA
);
1702 case ZBNCP_CMD_GET_PARENT_ADDR
:
1703 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1705 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_parent_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1710 case ZBNCP_CMD_GET_EXT_PAN_ID
:
1711 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1713 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1718 case ZBNCP_CMD_GET_COORDINATOR_VERSION
:
1719 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1721 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_coordinator_version
, tvb
, offset
++, 1, ENC_NA
);
1725 case ZBNCP_CMD_GET_SHORT_ADDRESS
:
1726 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1728 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1733 case ZBNCP_CMD_GET_TRUST_CENTER_ADDRESS
:
1734 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1736 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_trust_center_addres
, tvb
, offset
, 8, ENC_NA
);
1741 case ZBNCP_CMD_DEBUG_WRITE
:
1742 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1746 uint8_t dump_type
= tvb_get_uint8(tvb
, offset
);
1747 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dump_type
, tvb
, offset
, 1, ENC_NA
);
1750 dump_len
= tvb_reported_length(tvb
) - offset
;
1753 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dump_text
, tvb
, offset
, dump_len
, ENC_ASCII
| ENC_NA
);
1756 else if (dump_type
== 1)
1758 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dump_bin
, tvb
, offset
, dump_len
, ENC_NA
);
1764 case ZBNCP_CMD_GET_CONFIG_PARAMETER
:
1765 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1767 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_parameter_id
, tvb
, offset
, 1, ENC_NA
);
1770 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1774 param_id
= tvb_get_uint8(tvb
, offset
);
1775 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_parameter_id
, tvb
, offset
, 1, ENC_NA
);
1780 case ZBNCP_PARAMETER_ID_IEEE_ADDR_TABLE_SIZE
:
1781 case ZBNCP_PARAMETER_ID_NEIGHBOR_TABLE_SIZE
:
1782 case ZBNCP_PARAMETER_ID_APS_SRC_BINDING_TABLE_SIZE
:
1783 case ZBNCP_PARAMETER_ID_APS_GROUP_TABLE_SIZE
:
1784 case ZBNCP_PARAMETER_ID_NWK_ROUTE_DISCOVERY_TABLE_SIZE
:
1785 case ZBNCP_PARAMETER_ID_IOBUF_POOL_SIZE
:
1786 case ZBNCP_PARAMETER_ID_PANID_TABLE_SIZE
:
1787 case ZBNCP_PARAMETER_ID_APS_DUPS_TABLE_SIZE
:
1788 case ZBNCP_PARAMETER_ID_APS_BIND_TRANS_TABLE_SIZE
:
1789 case ZBNCP_PARAMETER_ID_N_APS_RETRANS_ENTRIES
:
1790 case ZBNCP_PARAMETER_ID_NWK_MAX_HOPS
:
1791 case ZBNCP_PARAMETER_ID_NIB_MAX_CHILDREN
:
1792 case ZBNCP_PARAMETER_ID_N_APS_KEY_PAIR_ARR_MAX_SIZE
:
1793 case ZBNCP_PARAMETER_ID_NWK_MAX_SRC_ROUTES
:
1794 case ZBNCP_PARAMETER_ID_APS_MAX_WINDOW_SIZE
:
1795 case ZBNCP_PARAMETER_ID_APS_INTERFRAME_DELAY
:
1796 case ZBNCP_PARAMETER_ID_ZDO_ED_BIND_TIMEOUT
:
1797 case ZBNCP_PARAMETER_ID_ZLL_DEFAULT_RSSI_THRESHOLD
:
1798 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_value8_dec
, tvb
, offset
, 1, ENC_NA
);
1802 case ZBNCP_PARAMETER_ID_NIB_PASSIVE_ASK_TIMEOUT
:
1803 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_value16_dec
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1807 case ZBNCP_PARAMETER_ID_APS_ACK_TIMEOUTS
:
1808 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_ack_to_non_sleepy
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1811 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_ack_to_sleepy
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1815 case ZBNCP_PARAMETER_ID_MAC_BEACON_JITTER
:
1816 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_min16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1819 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_max16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1823 case ZBNCP_PARAMETER_ID_TX_POWER
:
1824 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_default8_sign
, tvb
, offset
, 1, ENC_NA
);
1827 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_current8_sign
, tvb
, offset
, 1, ENC_NA
);
1832 case ZBNCP_PARAMETER_ID_NIB_MTORR
:
1833 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_is_concentrator
, tvb
, offset
, 1, ENC_NA
);
1836 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_concentrator_radius
, tvb
, offset
, 1, ENC_NA
);
1839 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_time16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1846 case ZBNCP_CMD_GET_LOCK_STATUS
:
1847 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1849 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lock_status
, tvb
, offset
, 1, ENC_NA
);
1854 case ZBNCP_CMD_GET_TRACE
:
1855 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1857 static int *const trace_bitmask
[] = {
1858 &hf_zbncp_data_trace_wireless_traf
,
1859 &hf_zbncp_data_trace_ncp_ll_proto
,
1860 &hf_zbncp_data_trace_host_int_line
,
1861 &hf_zbncp_data_trace_sleep_awake
,
1864 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_trace_mask
, ett_zbncp_data_trace_bitmask
, trace_bitmask
, ENC_LITTLE_ENDIAN
);
1869 case ZBNCP_CMD_NCP_RESET_IND
:
1870 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
1872 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_reset_source
, tvb
, offset
, 1, ENC_NA
);
1877 case ZBNCP_CMD_SET_NWK_LEAVE_ALLOWED
:
1878 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1880 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_nwk_leave_allowed
, tvb
, offset
, 1, ENC_NA
);
1885 case ZBNCP_CMD_GET_NWK_LEAVE_ALLOWED
:
1886 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1888 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_nwk_leave_allowed
, tvb
, offset
, 1, ENC_NA
);
1893 case ZBNCP_CMD_NVRAM_WRITE
:
1894 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1896 unsigned dataset_count
, idx
;
1897 uint16_t dataset_len
;
1899 dataset_count
= tvb_get_uint8(tvb
, offset
);
1900 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_quantity
, tvb
, offset
, 1, ENC_NA
);
1903 /* multiple datasets */
1904 for (idx
= 0; idx
< dataset_count
; idx
++)
1906 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1909 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dataset_version
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1912 dataset_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1913 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dataset_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1916 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_data
, tvb
, offset
, dataset_len
, ENC_NA
);
1917 offset
+= dataset_len
;
1922 case ZBNCP_CMD_NVRAM_READ
:
1923 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1925 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1928 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1930 uint16_t dataset_len
;
1932 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_version
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1935 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1938 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dataset_version
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1941 dataset_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
1942 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dataset_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1945 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nvram_dataset_data
, tvb
, offset
, dataset_len
, ENC_NA
);
1946 offset
+= dataset_len
;
1950 case ZBNCP_CMD_SET_TC_POLICY
:
1951 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1953 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tc_policy_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1954 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tc_policy_value
, tvb
, offset
+ 2, 1, ENC_NA
);
1959 case ZBNCP_CMD_SET_EXTENDED_PAN_ID
:
1960 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1962 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
1967 case ZBNCP_CMD_SET_ED_CAPACITY
:
1968 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1970 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_ed_capacity
, tvb
, offset
, 1, ENC_NA
);
1975 case ZBNCP_CMD_GET_ED_CAPACITY
:
1976 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1978 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_ed_capacity
, tvb
, offset
, 1, ENC_NA
);
1983 case ZBNCP_CMD_SET_ZDO_LEAVE_ALLOWED
:
1984 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
1986 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_leave_allowed
, tvb
, offset
, 1, ENC_NA
);
1991 case ZBNCP_CMD_GET_ZDO_LEAVE_ALLOWED
:
1992 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
1994 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_leave_allowed
, tvb
, offset
, 1, ENC_NA
);
1999 case ZBNCP_CMD_SET_LEAVE_WO_REJOIN_ALLOWED
:
2000 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2002 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_leave_wo_rejoin_allowed
, tvb
, offset
, 1, ENC_NA
);
2007 case ZBNCP_CMD_GET_LEAVE_WO_REJOIN_ALLOWED
:
2008 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2010 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_leave_wo_rejoin_allowed
, tvb
, offset
, 1, ENC_NA
);
2015 case ZBNCP_CMD_GP_SET_SHARED_KEY_TYPE
:
2016 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2018 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zgp_key_type
, tvb
, offset
, 1, ENC_NA
);
2023 case ZBNCP_CMD_GP_SET_DEFAULT_LINK_KEY
:
2024 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2026 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zgp_link_key
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2031 case ZBNCP_CMD_PRODUCTION_CONFIG_READ
:
2032 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2034 proto_tree
*prod_conf_hdr_subtree
;
2035 prod_conf_hdr_subtree
= proto_tree_add_subtree(zbncp_hl_body_tree
, tvb
, offset
, 8, ett_zbncp_data_prod_conf_hdr
, NULL
, "Production config header");
2037 proto_tree_add_item(prod_conf_hdr_subtree
, hf_zbncp_data_prod_conf_hdr_crc
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2040 proto_tree_add_item(prod_conf_hdr_subtree
, hf_zbncp_data_prod_conf_hdr_len
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2043 proto_tree_add_item(prod_conf_hdr_subtree
, hf_zbncp_data_prod_conf_hdr_version
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2046 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_prod_conf_body
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
2047 offset
= tvb_captured_length(tvb
);
2051 case ZBNCP_CMD_SET_MAX_JOINS
:
2052 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2054 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_max_joins
, tvb
, offset
, 1, ENC_NA
);
2059 case ZBNCP_CMD_GET_MAX_JOINS
:
2060 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2062 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_max_joins
, tvb
, offset
, 1, ENC_NA
);
2067 case ZBNCP_CMD_TRACE_IND
:
2068 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2070 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_trace_input_output
, tvb
, offset
, 1, ENC_NA
);
2072 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_trace_timestamp
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2074 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_trace
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
2075 offset
= tvb_captured_length(tvb
);
2079 case ZBNCP_CMD_GET_KEY_NEG_METHOD
:
2080 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2082 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_neg_method
, tvb
, offset
, 1, ENC_NA
);
2087 case ZBNCP_CMD_SET_KEY_NEG_METHOD
:
2088 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2090 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_neg_method
, tvb
, offset
, 1, ENC_NA
);
2095 case ZBNCP_CMD_GET_PSK_SECRETS
:
2096 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2098 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_psk_secrets
, tvb
, offset
, 1, ENC_NA
);
2103 case ZBNCP_CMD_SET_PSK_SECRETS
:
2104 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2106 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_psk_secrets
, tvb
, offset
, 1, ENC_NA
);
2111 case ZBNCP_CMD_SET_R22_JOIN_USAGE
:
2112 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2114 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_r22_join_usage
, tvb
, offset
, 1, ENC_NA
);
2119 case ZBNCP_CMD_SET_NWK_CONF_PRESET
:
2120 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2122 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_conf_preset
, tvb
, offset
, 1, ENC_NA
);
2128 case ZBNCP_CMD_AF_SET_SIMPLE_DESC
:
2129 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2135 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2138 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2141 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_device_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2144 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dev_version
, tvb
, offset
, 1, ENC_NA
);
2147 in_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2148 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_in_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2151 out_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2152 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2157 proto_tree
*zbncp_hl_body_in_cl_list_tree
=
2158 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * in_cl_cnt
, ett_zbncp_data_in_cl_list
, NULL
, "Input Cluster List");
2159 for (i
= 0; i
< in_cl_cnt
; i
++)
2161 proto_tree_add_item(zbncp_hl_body_in_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2168 proto_tree
*zbncp_hl_body_out_cl_list_tree
=
2169 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * out_cl_cnt
, ett_zbncp_data_out_cl_list
, NULL
, "Output Cluster List");
2170 for (i
= 0; i
< out_cl_cnt
; i
++)
2172 proto_tree_add_item(zbncp_hl_body_out_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2179 case ZBNCP_CMD_AF_DEL_EP
:
2180 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2182 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2187 case ZBNCP_CMD_AF_SET_NODE_DESC
:
2188 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2190 /* copy-pasted from packet-ieee802154.c */
2191 static int *const capability
[] = {
2192 &hf_ieee802154_cinfo_alt_coord
,
2193 &hf_ieee802154_cinfo_device_type
,
2194 &hf_ieee802154_cinfo_power_src
,
2195 &hf_ieee802154_cinfo_idle_rx
,
2196 &hf_ieee802154_cinfo_sec_capable
,
2197 &hf_ieee802154_cinfo_alloc_addr
,
2200 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
2203 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_mac_cap
, ett_zbncp_data_mac_cap
, capability
, ENC_NA
);
2206 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_manuf_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2211 case ZBNCP_CMD_AF_SET_POWER_DESC
:
2212 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2214 static int *const pwr_sources
[] = {
2215 &hf_zbncp_data_pwr_src_const
,
2216 &hf_zbncp_data_pwr_src_recharge
,
2217 &hf_zbncp_data_pwr_src_disposable
,
2220 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cur_pwr_mode
, tvb
, offset
, 1, ENC_NA
);
2223 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_av_pwr_src
, ett_zbncp_data_pwr_src
, pwr_sources
, ENC_NA
);
2226 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_cur_pwr_src
, ett_zbncp_data_cur_pwr_src
, pwr_sources
, ENC_NA
);
2229 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cur_pwr_lvl
, tvb
, offset
, 1, ENC_NA
);
2234 case ZBNCP_CMD_AF_SUBGHZ_SUSPEND_IND
:
2235 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2237 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_susp_period
, tvb
, offset
, 1, ENC_NA
);
2242 case ZBNCP_CMD_AF_SUBGHZ_RESUME_IND
:
2243 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2245 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_susp_period
, tvb
, offset
, 1, ENC_NA
);
2251 case ZBNCP_CMD_ZDO_NWK_ADDR_REQ
:
2252 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2254 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2257 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2260 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_req_type
, tvb
, offset
, 1, ENC_NA
);
2263 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
2266 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2268 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2271 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2274 if (offset
< tvb_reported_length(tvb
))
2276 uint8_t num_assoc_dev
= tvb_get_uint8(tvb
, offset
);
2278 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_num_asoc_dec
, tvb
, offset
, 1, ENC_NA
);
2284 proto_tree
*zbncp_hl_body_asoc_nwk_list
;
2286 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
2289 zbncp_hl_body_asoc_nwk_list
=
2290 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * num_assoc_dev
, ett_zbncp_data_asoc_nwk_list
, NULL
, "Assoc Dev NWK Addr List");
2292 for (i
= 0; i
< num_assoc_dev
; i
++)
2294 proto_tree_add_item(zbncp_hl_body_asoc_nwk_list
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2302 case ZBNCP_CMD_ZDO_IEEE_ADDR_REQ
:
2303 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2305 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2307 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2310 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2313 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_req_type
, tvb
, offset
, 1, ENC_NA
);
2316 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
2320 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2322 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2325 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2328 if (offset
< tvb_reported_length(tvb
))
2330 uint8_t num_assoc_dev
= tvb_get_uint8(tvb
, offset
);
2332 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_num_asoc_dec
, tvb
, offset
, 1, ENC_NA
);
2338 proto_tree
*zbncp_hl_body_asoc_nwk_list
;
2340 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
2343 zbncp_hl_body_asoc_nwk_list
=
2344 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * num_assoc_dev
, ett_zbncp_data_asoc_nwk_list
, NULL
, "Assoc Dev NWK Addr List");
2346 for (i
= 0; i
< num_assoc_dev
; i
++)
2348 proto_tree_add_item(zbncp_hl_body_asoc_nwk_list
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2356 case ZBNCP_CMD_ZDO_POWER_DESC_REQ
:
2357 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2359 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2362 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2364 static int *const pwr_desc
[] = {
2365 &hf_zbncp_data_pwr_desc_cur_power_mode
,
2366 &hf_zbncp_data_pwr_desc_av_pwr_src
,
2367 &hf_zbncp_data_pwr_desc_cur_pwr_src
,
2368 &hf_zbncp_data_pwr_desc_cur_pwr_lvl
,
2371 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_pwr_desc
, ett_zbncp_data_pwr_desc
, pwr_desc
, ENC_LITTLE_ENDIAN
);
2374 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2379 case ZBNCP_CMD_ZDO_NODE_DESC_REQ
:
2380 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2382 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2385 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2387 static int *const flags
[] = {
2388 &hf_zbncp_data_flags_zb_role
,
2389 &hf_zbncp_data_flags_comp_desc_av
,
2390 &hf_zbncp_data_flags_user_desc_av
,
2391 &hf_zbncp_data_flags_freq_868
,
2392 &hf_zbncp_data_flags_freq_902
,
2393 &hf_zbncp_data_flags_freq_2400
,
2394 &hf_zbncp_data_flags_freq_eu_sub_ghz
,
2397 static int *const mac_capability
[] = {
2398 &hf_ieee802154_cinfo_alt_coord
,
2399 &hf_ieee802154_cinfo_device_type
,
2400 &hf_ieee802154_cinfo_power_src
,
2401 &hf_ieee802154_cinfo_idle_rx
,
2402 &hf_ieee802154_cinfo_sec_capable
,
2403 &hf_ieee802154_cinfo_alloc_addr
,
2406 static int *const server_mask
[] = {
2407 &hf_zbncp_data_srv_msk_prim_tc
,
2408 &hf_zbncp_data_srv_msk_backup_tc
,
2409 &hf_zbncp_data_srv_msk_prim_bind_tbl_cache
,
2410 &hf_zbncp_data_srv_msk_backup_bind_tbl_cache
,
2411 &hf_zbncp_data_srv_msk_prim_disc_cache
,
2412 &hf_zbncp_data_srv_msk_backup_disc_cache
,
2413 &hf_zbncp_data_srv_msk_nwk_manager
,
2414 &hf_zbncp_data_srv_msk_stack_compl_rev
,
2417 static int *const desc_capability
[] = {
2418 &hf_zbncp_data_desc_cap_ext_act_ep_list_av
,
2419 &hf_zbncp_data_desc_cap_ext_simple_desc_list_av
,
2422 proto_tree_add_bitmask_with_flags(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_flags16
, ett_zbncp_data_flags
, flags
, ENC_LITTLE_ENDIAN
, BMT_NO_APPEND
);
2425 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_mac_cap
, ett_zbncp_data_mac_cap
, mac_capability
, ENC_NA
);
2428 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_manuf_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2431 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_max_buf_size
, tvb
, offset
, 1, ENC_NA
);
2434 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_max_inc_trans_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2437 proto_tree_add_bitmask_with_flags(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_srv_msk
, ett_zbncp_data_server_mask
, server_mask
, ENC_LITTLE_ENDIAN
, BMT_NO_APPEND
);
2440 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_max_out_trans_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2443 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_desc_cap
, ett_zbncp_data_desc_cap
, desc_capability
, ENC_NA
);
2446 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2451 case ZBNCP_CMD_ZDO_SIMPLE_DESC_REQ
:
2452 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2454 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2457 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2460 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2466 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2469 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2472 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_device_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2475 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dev_version
, tvb
, offset
, 1, ENC_NA
);
2478 in_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2479 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_in_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2482 out_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2483 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2488 proto_tree
*zbncp_hl_body_in_cl_list_tree
=
2489 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * in_cl_cnt
, ett_zbncp_data_in_cl_list
, NULL
, "Input Cluster List");
2490 for (i
= 0; i
< in_cl_cnt
; i
++)
2492 proto_tree_add_item(zbncp_hl_body_in_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2499 proto_tree
*zbncp_hl_body_out_cl_list_tree
=
2500 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * out_cl_cnt
, ett_zbncp_data_out_cl_list
, NULL
, "Output Cluster List");
2501 for (i
= 0; i
< out_cl_cnt
; i
++)
2503 proto_tree_add_item(zbncp_hl_body_out_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2508 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2513 case ZBNCP_CMD_ZDO_ACTIVE_EP_REQ
:
2514 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2516 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2519 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2522 uint8_t ep_cnt
= tvb_get_uint8(tvb
, offset
);
2524 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ep_cnt
, tvb
, offset
, 1, ENC_NA
);
2529 proto_tree
*zbncp_hl_body_tree_ep_list
=
2530 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, ep_cnt
, ett_zbncp_data_ep_list
, NULL
, "Endpoint List");
2531 for (i
= 0; i
< ep_cnt
; i
++)
2533 proto_tree_add_item(zbncp_hl_body_tree_ep_list
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2538 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2543 case ZBNCP_CMD_ZDO_MATCH_DESC_REQ
:
2544 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2550 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2553 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2556 in_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2557 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_in_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2560 out_cl_cnt
= tvb_get_uint8(tvb
, offset
);
2561 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cl_cnt
, tvb
, offset
, 1, ENC_NA
);
2566 proto_tree
*zbncp_hl_body_in_cl_list_tree
=
2567 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * in_cl_cnt
, ett_zbncp_data_in_cl_list
, NULL
, "Input Cluster List");
2568 for (i
= 0; i
< in_cl_cnt
; i
++)
2570 proto_tree_add_item(zbncp_hl_body_in_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2577 proto_tree
*zbncp_hl_body_out_cl_list_tree
=
2578 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, 2 * out_cl_cnt
, ett_zbncp_data_out_cl_list
, NULL
, "Output Cluster List");
2579 for (i
= 0; i
< out_cl_cnt
; i
++)
2581 proto_tree_add_item(zbncp_hl_body_out_cl_list_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2586 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2589 uint8_t ep_cnt
= tvb_get_uint8(tvb
, offset
);
2591 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ep_cnt
, tvb
, offset
, 1, ENC_NA
);
2596 proto_tree
*zbncp_hl_body_tree_ep_list
=
2597 proto_tree_add_subtree_format(zbncp_hl_body_tree
, tvb
, offset
, ep_cnt
, ett_zbncp_data_ep_list
, NULL
, "Endpoint List");
2598 for (i
= 0; i
< ep_cnt
; i
++)
2600 proto_tree_add_item(zbncp_hl_body_tree_ep_list
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
2605 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2610 case ZBNCP_CMD_ZDO_BIND_REQ
:
2611 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2613 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2616 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2619 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
2622 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2625 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
2628 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
2630 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
2635 case ZBNCP_CMD_ZDO_UNBIND_REQ
:
2636 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2638 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2641 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_ieee_addr
, tvb
, offset
, 8, ENC_NA
);
2644 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
2647 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2650 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
2653 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
2655 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
2660 case ZBNCP_CMD_ZDO_MGMT_LEAVE_REQ
:
2661 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2663 static int *const leave_flags
[] = {
2664 &hf_zbncp_data_leave_flags_remove_chil
,
2665 &hf_zbncp_data_leave_flags_rejoin
,
2668 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2671 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2674 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_leave_flags
, ett_zbncp_data_leave_flags
, leave_flags
, ENC_NA
);
2679 case ZBNCP_CMD_ZDO_PERMIT_JOINING_REQ
:
2680 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2682 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2685 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_permit_dur
, tvb
, offset
, 1, ENC_NA
);
2688 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tc_sign
, tvb
, offset
, 1, ENC_NA
);
2693 case ZBNCP_CMD_ZDO_DEV_ANNCE_IND
:
2694 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2696 static int *const mac_capability
[] = {
2697 &hf_ieee802154_cinfo_alt_coord
,
2698 &hf_ieee802154_cinfo_device_type
,
2699 &hf_ieee802154_cinfo_power_src
,
2700 &hf_ieee802154_cinfo_idle_rx
,
2701 &hf_ieee802154_cinfo_sec_capable
,
2702 &hf_ieee802154_cinfo_alloc_addr
,
2705 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2708 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2711 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_mac_cap
, ett_zbncp_data_mac_cap
, mac_capability
, ENC_NA
);
2716 case ZBNCP_CMD_ZDO_REJOIN
:
2717 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2720 uint8_t ch_list_len
;
2722 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2725 ch_list_len
= tvb_get_uint8(tvb
, offset
);
2726 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_list_len
, tvb
, offset
, 1, ENC_NA
);
2731 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
2732 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Channel List");
2733 for (i
= 0; i
< ch_list_len
; i
++)
2735 proto_tree
*zbncp_hl_body_data_channel_tree
= proto_tree_add_subtree_format(
2736 zbncp_hl_body_data_ch_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Channel");
2738 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
2741 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2746 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_secur_rejoin
, tvb
, offset
, 1, ENC_NA
);
2749 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2751 static int *const zdo_rejoin_flags
[] = {
2752 &hf_zbncp_data_zdo_rejoin_flags_tcsw_happened
,
2754 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_zdo_rejoin_flags
, ett_zbncp_data_zdo_rejoin_flags
, zdo_rejoin_flags
, ENC_NA
);
2759 case ZBNCP_CMD_ZDO_SYSTEM_SRV_DISCOVERY_REQ
:
2760 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2762 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_server_mask
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2767 case ZBNCP_CMD_ZDO_MGMT_BIND_REQ
:
2768 case ZBNCP_CMD_ZDO_MGMT_LQI_REQ
:
2769 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2771 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2774 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_start_entry_idx
, tvb
, offset
, 1, ENC_NA
);
2779 case ZBNCP_CMD_ZDO_MGMT_NWK_UPDATE_REQ
:
2780 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2782 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2785 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_scan_duration
, tvb
, offset
, 1, ENC_NA
);
2788 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_scan_cnt
, tvb
, offset
, 1, ENC_NA
);
2791 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_scan_mgr_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2794 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2799 case ZBNCP_CMD_ZDO_REMOTE_CMD_IND
:
2800 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2803 static int *const aps_fc
[] = {
2804 &hf_zbncp_data_aps_fc_deliv_mode
,
2805 &hf_zbncp_data_aps_fc_secur
,
2806 &hf_zbncp_data_aps_fc_ack_retrans
,
2809 static int *const aps_key_attr
[] = {
2810 &hf_zbncp_data_aps_key_attr_key_src
,
2811 &hf_zbncp_data_aps_key_attr_key_used
,
2814 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_param_len
, tvb
, offset
, 1, ENC_NA
);
2817 data_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
2818 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2821 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_aps_fc
, ett_zbncp_data_apc_fc
, aps_fc
, ENC_NA
);
2824 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2827 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2830 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_group_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2833 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
2836 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
2839 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2842 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2845 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_cnt
, tvb
, offset
, 1, ENC_NA
);
2848 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_mac_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2851 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_mac_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2854 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
2857 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
2860 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_aps_key_attr
, ett_zbncp_data_aps_key_attr
, aps_key_attr
, ENC_NA
);
2863 if (data_len
> (tvb_reported_length(tvb
) - offset
))
2865 data_len
= tvb_reported_length(tvb
) - offset
;
2868 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
2873 case ZBNCP_CMD_ZDO_GET_STATS
:
2874 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
2876 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_do_cleanup
, tvb
, offset
, 1, ENC_NA
);
2879 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
2881 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_max_rx_bcast
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2884 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_bcast
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2887 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_rx_ucast
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2890 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_total_zcl
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2893 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_failures_zcl
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2896 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_retries_zcl
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2899 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_total
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2902 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_failures
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2905 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_tx_ucast_retries
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2908 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_phy_to_mac_que_lim_reached
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2911 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_validate_drop_cnt
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2914 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_phy_cca_fail_count
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2917 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_period_of_time
, tvb
, offset
, 1, ENC_NA
);
2920 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_last_msg_lqi
, tvb
, offset
, 1, ENC_NA
);
2923 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_last_msg_rssi
, tvb
, offset
, 1, ENC_NA
);
2926 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_number_of_resets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2929 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_tx_bcast
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2932 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_tx_ucast_success
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2935 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_tx_ucast_retry
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2938 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_tx_ucast_fail
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2941 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_route_disc_initiated
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2944 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_neighbor_added
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2947 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_neighbor_removed
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2950 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_neighbor_stale
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2953 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_join_indication
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2956 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_childs_removed
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2959 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_fc_failure
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2962 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_fc_failure
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2965 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_unauthorized_key
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2968 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_decrypt_failure
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2971 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_decrypt_failure
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2974 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_packet_buffer_allocate_failures
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2977 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_average_mac_retry_per_aps_message_sent
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2980 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_retry_overflow
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2983 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_bcast_table_full
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2986 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_status
, tvb
, offset
, 1, ENC_NA
);
2991 case ZBNCP_CMD_ZDO_DEV_AUTHORIZED_IND
:
2992 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
2995 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
2998 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3001 auth_type
= tvb_get_uint8(tvb
, offset
);
3002 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_auth_type
, tvb
, offset
, 1, ENC_NA
);
3005 if (auth_type
== ZB_ZDO_AUTH_LEGACY_TYPE
)
3007 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_leg_auth_status_code
, tvb
, offset
, 1, ENC_NA
);
3010 else if (auth_type
== ZB_ZDO_AUTH_TCLK_TYPE
)
3012 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_zdo_tclk_auth_status_code
, tvb
, offset
, 1, ENC_NA
);
3018 case ZBNCP_CMD_ZDO_DEV_UPDATE_IND
:
3019 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
3021 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3024 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3027 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_upd_status_code
, tvb
, offset
, 1, ENC_NA
);
3032 case ZBNCP_CMD_ZDO_SET_NODE_DESC_MANUF_CODE
:
3033 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3035 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_manuf_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3040 case ZBNCP_CMD_HL_ZDO_GET_DIAG_DATA_REQ
:
3041 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3043 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3046 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3048 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
3051 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
3056 case ZBNCP_CMD_HL_ZDO_RAW_REQ
:
3057 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3059 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3061 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3063 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_raw_data
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
3064 offset
= tvb_captured_length(tvb
);
3066 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3068 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3070 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3072 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_raw_data
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
3073 offset
= tvb_captured_length(tvb
);
3077 case ZBNCP_CMD_HL_ZDO_SEND_CONF_PARAMS_REQ
:
3078 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3080 static int *const parameters
[] = {
3081 &hf_zbncp_data_conf_params_reserved
,
3082 &hf_zbncp_data_conf_params_disable_pan_id_change
,
3083 &hf_zbncp_data_conf_params_disable_channel_change
,
3084 &hf_zbncp_data_conf_params_leave_request_allowed
,
3085 &hf_zbncp_data_conf_params_require_tclk
,
3086 &hf_zbncp_data_conf_params_restricted_enabled
,
3089 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3092 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_conf_params
, ett_zbncp_data_conf_params
, parameters
, ENC_NA
);
3097 case ZBNCP_CMD_HL_ZDO_MGMT_BEACON_SURVEY_REQ
:
3098 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3101 uint8_t ch_list_len
;
3103 ch_list_len
= tvb_get_uint8(tvb
, offset
);
3104 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel_page_count
, tvb
, offset
, 1, ENC_NA
);
3109 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
3110 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 4, ett_zbncp_data_ch_list
, NULL
, "Channel List");
3111 for (i
= 0; i
< ch_list_len
; i
++)
3113 proto_tree_add_item(zbncp_hl_body_data_ch_list
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3117 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_config_mask
, tvb
, offset
, 1, ENC_NA
);
3120 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dest_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3123 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3126 uint8_t parent_list_len
;
3128 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
3130 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_current_parents_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3132 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_current_parents_lqi
, tvb
, offset
, 1, ENC_NA
);
3135 parent_list_len
= tvb_get_uint8(tvb
, offset
);
3136 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_potential_parent_count
, tvb
, offset
, 1, ENC_NA
);
3139 if (parent_list_len
)
3141 proto_tree
*zbncp_hl_body_data_parent_list
= proto_tree_add_subtree_format(
3142 zbncp_hl_body_tree
, tvb
, offset
, parent_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Potential Parent Surveys");
3143 for (i
= 0; i
< parent_list_len
; i
++)
3145 proto_tree
*zbncp_hl_body_data_parent_tree
= proto_tree_add_subtree_format(
3146 zbncp_hl_body_data_parent_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Parent");
3148 proto_tree_add_item(zbncp_hl_body_data_parent_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3150 proto_tree_add_item(zbncp_hl_body_data_parent_tree
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
3152 proto_tree_add_item(zbncp_hl_body_data_parent_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
3154 proto_tree_add_item(zbncp_hl_body_data_parent_tree
, hf_zbncp_data_classification_mask
, tvb
, offset
, 1, ENC_NA
);
3159 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_total_beacons_surveyed
, tvb
, offset
, 1, ENC_NA
);
3161 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_current_pan_id_beacons
, tvb
, offset
, 1, ENC_NA
);
3163 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_current_nwk_potential_parents
, tvb
, offset
, 1, ENC_NA
);
3165 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_other_zigbee_beacons
, tvb
, offset
, 1, ENC_NA
);
3167 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id_conflict_tlv
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3172 case ZBNCP_CMD_HL_ZDO_DECOMMISSION_REQ
:
3173 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3176 uint8_t eui64_list_len
;
3178 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dest_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3181 eui64_list_len
= tvb_get_uint8(tvb
, offset
);
3182 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_eui64_count
, tvb
, offset
, 1, ENC_NA
);
3187 proto_tree
*zbncp_hl_body_data_parent_list
= proto_tree_add_subtree_format(
3188 zbncp_hl_body_tree
, tvb
, offset
, eui64_list_len
* 8, ett_zbncp_data_ch_list
, NULL
, "EUI64s");
3189 for (i
= 0; i
< eui64_list_len
; i
++)
3191 proto_tree_add_item(zbncp_hl_body_data_parent_list
, hf_zbncp_data_eui64
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3198 case ZBNCP_CMD_HL_ZDO_GET_AUTH_LEVEL_REQ
:
3199 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3201 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_target_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3204 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3206 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
3208 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_target_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3210 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_initial_join_auth
, tvb
, offset
, 1, ENC_NA
);
3212 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_update_method
, tvb
, offset
, 1, ENC_NA
);
3218 case ZBNCP_CMD_APSDE_DATA_REQ
:
3219 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3222 static int *const tx_options
[] = {
3223 &hf_zbncp_data_tx_opt_secur
,
3224 &hf_zbncp_data_tx_opt_obsolete
,
3225 &hf_zbncp_data_tx_opt_ack
,
3226 &hf_zbncp_data_tx_opt_frag
,
3227 &hf_zbncp_data_tx_opt_inc_ext_nonce
,
3228 &hf_zbncp_data_tx_opt_force_mesh_route
,
3229 &hf_zbncp_data_tx_opt_send_route_record
,
3232 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_param_len
, tvb
, offset
, 1, ENC_NA
);
3235 data_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
3236 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3239 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
+ ZBNCP_CMD_APSDE_DATA_REQ_DST_ADDR_MODE_OFFSET
, &offset
);
3241 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3244 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3247 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3250 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3253 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_radius
, tvb
, offset
, 1, ENC_NA
);
3256 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3259 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_tx_opt
, ett_zbncp_data_tx_opt
, tx_options
, ENC_NA
);
3262 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_use_alias
, tvb
, offset
, 1, ENC_NA
);
3265 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_alias_src
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3268 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_alias_seq
, tvb
, offset
, 1, ENC_NA
);
3271 if (data_len
> (tvb_reported_length(tvb
) - offset
))
3273 data_len
= tvb_reported_length(tvb
) - offset
;
3276 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
3279 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3281 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
+ ZBNCP_CMD_APSDE_DATA_REQ_RSP_DST_ADDR_MODE_OFFSET
, &offset
);
3283 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3286 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3289 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_time
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3292 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3297 case ZBNCP_CMD_APSME_BIND
:
3298 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3300 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3303 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3306 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3309 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3312 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
3314 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3318 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
|| ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3321 /* Binding table ID - it's an additional field for SNCP only */
3322 data_len
= tvb_reported_length(tvb
) - offset
;
3325 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3331 case ZBNCP_CMD_APSME_UNBIND
:
3332 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3334 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3337 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3340 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3343 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3346 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
3348 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3352 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
|| ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3355 /* Binding table ID - it's an additional field for SNCP only */
3356 data_len
= tvb_reported_length(tvb
) - offset
;
3359 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3365 case ZBNCP_CMD_APSME_ADD_GROUP
:
3366 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3368 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_group_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3371 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
3376 case ZBNCP_CMD_APSME_RM_GROUP
:
3377 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3379 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_group_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3382 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
3387 case ZBNCP_CMD_APSDE_DATA_IND
:
3388 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
3391 static int *const aps_fc
[] = {
3392 &hf_zbncp_data_aps_fc_deliv_mode
,
3393 &hf_zbncp_data_aps_fc_secur
,
3394 &hf_zbncp_data_aps_fc_ack_retrans
,
3397 static int *const aps_key_attr
[] = {
3398 &hf_zbncp_data_aps_key_attr_key_src
,
3399 &hf_zbncp_data_aps_key_attr_key_used
,
3402 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_param_len
, tvb
, offset
, 1, ENC_NA
);
3405 data_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
3406 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3409 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_aps_fc
, ett_zbncp_data_apc_fc
, aps_fc
, ENC_NA
);
3412 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3415 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3418 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_group_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3421 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3424 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3427 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3430 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_profile_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3433 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_cnt
, tvb
, offset
, 1, ENC_NA
);
3436 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_mac_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3439 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_mac_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3442 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
3445 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
3448 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_aps_key_attr
, ett_zbncp_data_aps_key_attr
, aps_key_attr
, ENC_NA
);
3451 if (data_len
> (tvb_reported_length(tvb
) - offset
))
3453 data_len
= tvb_reported_length(tvb
) - offset
;
3456 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
3461 case ZBNCP_CMD_APSME_RM_ALL_GROUPS
:
3462 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3464 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_endpoint
, tvb
, offset
, 1, ENC_NA
);
3469 case ZBNCP_CMD_APS_GET_GROUP_TABLE
:
3470 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3473 group_num
= tvb_get_int8(tvb
, offset
);
3474 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_group_num
, tvb
, offset
++, 1, ENC_NA
);
3478 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_group
, tvb
, offset
, group_num
* 2, ENC_LITTLE_ENDIAN
);
3479 offset
+= group_num
* 2;
3484 case ZBNCP_CMD_APSME_RM_BIND_ENTRY_BY_ID
:
3485 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3487 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3492 case ZBNCP_CMD_APSME_CLEAR_BIND_TABLE
:
3493 /* Empty: only common headers */
3496 case ZBNCP_CMD_APSME_GET_BIND_ENTRY_BY_ID
:
3497 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3499 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3502 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3504 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3507 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3510 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3513 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
3515 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3518 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3521 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_bind_type
, tvb
, offset
, 1, ENC_NA
);
3526 case ZBNCP_CMD_APSME_REMOTE_BIND_IND
:
3527 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3530 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3533 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3536 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
3538 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3541 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3544 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_bind_type
, tvb
, offset
, 1, ENC_NA
);
3548 case ZBNCP_CMD_APSME_REMOTE_UNBIND_IND
:
3549 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_src_endpoint
, tvb
, offset
, 1, ENC_NA
);
3552 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cluster_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3555 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_addr_mode
, tvb
, offset
, 1, ENC_NA
);
3558 dissect_zbncp_dst_addrs(zbncp_hl_body_tree
, tvb
, offset
- 1, &offset
);
3560 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dst_endpoint
, tvb
, offset
, 1, ENC_NA
);
3563 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 1, ENC_NA
);
3566 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_bind_type
, tvb
, offset
, 1, ENC_NA
);
3570 case ZBNCP_CMD_APSME_SET_REMOTE_BIND_OFFSET
:
3571 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3573 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_bind_offset
, tvb
, offset
, 1, ENC_NA
);
3578 case ZBNCP_CMD_APSME_GET_REMOTE_BIND_OFFSET
:
3579 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3581 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_remote_bind_offset
, tvb
, offset
, 1, ENC_NA
);
3586 /* NWK Management API*/
3587 case ZBNCP_CMD_NWK_FORMATION
:
3588 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3591 uint8_t ch_list_len
= tvb_get_uint8(tvb
, offset
);
3593 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_list_len
, tvb
, offset
, 1, ENC_NA
);
3598 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
3599 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Channel List");
3600 for (i
= 0; i
< ch_list_len
; i
++)
3602 proto_tree
*zbncp_hl_body_data_channel_tree
= proto_tree_add_subtree_format(
3603 zbncp_hl_body_data_ch_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Channel");
3605 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3608 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3613 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_scan_dur
, tvb
, offset
, 1, ENC_NA
);
3616 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_distr_nwk_flag
, tvb
, offset
, 1, ENC_NA
);
3619 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3622 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3627 case ZBNCP_CMD_NWK_DISCOVERY
:
3628 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3631 uint8_t ch_list_len
= tvb_get_uint8(tvb
, offset
);
3633 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_list_len
, tvb
, offset
, 1, ENC_NA
);
3638 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
3639 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Channel List");
3640 for (i
= 0; i
< ch_list_len
; i
++)
3642 proto_tree
*zbncp_hl_body_data_channel_tree
= proto_tree_add_subtree_format(
3643 zbncp_hl_body_data_ch_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Channel");
3645 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3648 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3653 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_scan_dur
, tvb
, offset
, 1, ENC_NA
);
3656 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3659 uint8_t nwk_count
= tvb_get_uint8(tvb
, offset
);
3660 static int *flags
[] = {
3661 &hf_zbncp_data_flags_permit_join
,
3662 &hf_zbncp_data_flags_router_cap
,
3663 &hf_zbncp_data_flags_ed_cap
,
3664 &hf_zbncp_data_flags_stack_profile
,
3667 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_count
, tvb
, offset
, 1, ENC_NA
);
3670 for (i
= 0; i
< nwk_count
; i
++)
3672 proto_tree
*zbncp_hl_body_data_nwk_descr
= proto_tree_add_subtree_format(
3673 zbncp_hl_body_tree
, tvb
, offset
, 14, ett_zbncp_data_nwk_descr
, NULL
, "Network Descriptor");
3675 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3678 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_pan_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3681 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_nwk_upd_id
, tvb
, offset
, 1, ENC_NA
);
3684 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3687 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_channel
, tvb
, offset
, 1, ENC_NA
);
3690 proto_tree_add_bitmask(zbncp_hl_body_data_nwk_descr
, tvb
, offset
, hf_zbncp_data_flags8
, ett_zbncp_data_flags
, flags
, ENC_NA
);
3693 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
3696 proto_tree_add_item(zbncp_hl_body_data_nwk_descr
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
3702 case ZBNCP_CMD_NWK_NLME_JOIN
:
3703 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3706 uint8_t ch_list_len
;
3707 static int *const mac_capability
[] = {
3708 &hf_ieee802154_cinfo_alt_coord
,
3709 &hf_ieee802154_cinfo_device_type
,
3710 &hf_ieee802154_cinfo_power_src
,
3711 &hf_ieee802154_cinfo_idle_rx
,
3712 &hf_ieee802154_cinfo_sec_capable
,
3713 &hf_ieee802154_cinfo_alloc_addr
,
3716 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3719 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rejoin_nwk
, tvb
, offset
, 1, ENC_NA
);
3722 ch_list_len
= tvb_get_uint8(tvb
, offset
);
3723 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ch_list_len
, tvb
, offset
, 1, ENC_NA
);
3728 proto_tree
*zbncp_hl_body_data_ch_list
= proto_tree_add_subtree_format(
3729 zbncp_hl_body_tree
, tvb
, offset
, ch_list_len
* 5, ett_zbncp_data_ch_list
, NULL
, "Channel List");
3730 for (i
= 0; i
< ch_list_len
; i
++)
3732 proto_tree
*zbncp_hl_body_data_channel_tree
= proto_tree_add_subtree_format(
3733 zbncp_hl_body_data_ch_list
, tvb
, offset
, 5, ett_zbncp_data_channel
, NULL
, "Channel");
3735 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3738 proto_tree_add_item(zbncp_hl_body_data_channel_tree
, hf_zbncp_data_ch_mask
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3743 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_scan_dur
, tvb
, offset
, 1, ENC_NA
);
3746 proto_tree_add_bitmask(zbncp_hl_body_tree
, tvb
, offset
, hf_zbncp_data_mac_cap
, ett_zbncp_data_mac_cap
, mac_capability
, ENC_NA
);
3749 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_secur_en
, tvb
, offset
, 1, ENC_NA
);
3752 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3754 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3757 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3760 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3763 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel
, tvb
, offset
, 1, ENC_NA
);
3766 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_enh_beacon
, tvb
, offset
, 1, ENC_NA
);
3769 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_if
, tvb
, offset
, 1, ENC_NA
);
3774 case ZBNCP_CMD_NWK_PERMIT_JOINING
:
3775 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3777 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_permit_dur
, tvb
, offset
, 1, ENC_NA
);
3782 case ZBNCP_CMD_NWK_GET_IEEE_BY_SHORT
:
3783 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3785 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3788 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3790 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3795 case ZBNCP_CMD_NWK_GET_SHORT_BY_IEEE
:
3796 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3798 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3801 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3803 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3808 case ZBNCP_CMD_NWK_GET_NEIGHBOR_BY_IEEE
:
3809 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3811 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3814 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3816 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3819 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3822 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
3825 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rx_on_idle
, tvb
, offset
, 1, ENC_NA
);
3828 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ed_config
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3831 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_timeout_cnt
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3834 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dev_timeout
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3837 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_relationship
, tvb
, offset
, 1, ENC_NA
);
3840 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_fail_cnt
, tvb
, offset
, 1, ENC_NA
);
3843 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
3846 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cost
, tvb
, offset
, 1, ENC_NA
);
3849 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_age
, tvb
, offset
, 1, ENC_NA
);
3852 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive_rec
, tvb
, offset
, 1, ENC_NA
);
3855 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_if_idx
, tvb
, offset
, 1, ENC_NA
);
3860 case ZBNCP_CMD_NWK_REJOINED_IND
:
3861 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
3863 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3866 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ext_pan_id
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3869 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
3872 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel
, tvb
, offset
, 1, ENC_NA
);
3875 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_beacon_type
, tvb
, offset
, 1, ENC_NA
);
3878 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_if
, tvb
, offset
, 1, ENC_NA
);
3883 case ZBNCP_CMD_NWK_REJOIN_FAILED_IND
:
3884 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
3886 unsigned status_category
= tvb_get_uint8(tvb
, offset
);
3889 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cat
, tvb
, offset
, 1, ENC_NA
);
3893 status
= tvb_get_uint8(tvb
, offset
);
3894 switch (status_category
)
3896 case ZBNCP_HIGH_LVL_STAT_CAT_GENERIC
:
3897 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_generic
, tvb
, offset
, 1, ENC_NA
);
3898 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zbncp_hl_status_generic
, "Unknown Status"));
3901 case ZBNCP_HIGH_LVL_STAT_CAT_MAC
:
3902 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_mac
, tvb
, offset
, 1, ENC_NA
);
3903 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_mac_state
, "Unknown Status"));
3906 case ZBNCP_HIGH_LVL_STAT_CAT_NWK
:
3907 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_nwk
, tvb
, offset
, 1, ENC_NA
);
3908 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_nwk_state
, "Unknown Status"));
3911 case ZBNCP_HIGH_LVL_STAT_CAT_APS
:
3912 dissect_zbee_aps_status_code(tvb
, pinfo
, zbncp_hl_body_tree
, offset
);
3915 case ZBNCP_HIGH_LVL_STAT_CAT_CBKE
:
3916 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cbke
, tvb
, offset
, 1, ENC_NA
);
3917 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_cbke_state
, "Unknown Status"));
3921 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
3922 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: 0x%x", status
);
3928 case ZBNCP_CMD_NWK_LEAVE_IND
:
3929 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
3931 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
3934 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rejoin
, tvb
, offset
, 1, ENC_NA
);
3939 case ZBNCP_CMD_PIM_SET_FAST_POLL_INTERVAL
:
3940 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3942 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_fast_poll_int
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3947 case ZBNCP_CMD_PIM_SET_LONG_POLL_INTERVAL
:
3948 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3950 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_long_poll_int
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3955 case ZBNCP_CMD_PIM_START_FAST_POLL
:
3956 /* Empty: only common headers */
3959 case ZBNCP_CMD_PIM_START_POLL
:
3960 /* Empty: only common headers */
3963 case ZBNCP_CMD_PIM_SET_ADAPTIVE_POLL
:
3964 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3966 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_time
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3971 case ZBNCP_CMD_PIM_STOP_FAST_POLL
:
3972 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3974 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_stop_fast_poll_result
, tvb
, offset
, 1, ENC_NA
);
3979 case ZBNCP_CMD_PIM_STOP_POLL
:
3980 /* Empty: only common headers */
3983 case ZBNCP_CMD_PIM_ENABLE_TURBO_POLL
:
3984 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
3986 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_time
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3991 case ZBNCP_CMD_PIM_DISABLE_TURBO_POLL
:
3992 /* Empty: only common headers */
3995 case ZBNCP_CMD_NWK_GET_FIRST_NBT_ENTRY
:
3996 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
3998 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4001 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4004 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
4007 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rx_on_idle
, tvb
, offset
, 1, ENC_NA
);
4010 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ed_config
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4013 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_timeout_cnt
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4016 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dev_timeout
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4019 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_relationship
, tvb
, offset
, 1, ENC_NA
);
4022 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_fail_cnt
, tvb
, offset
, 1, ENC_NA
);
4025 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
4028 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cost
, tvb
, offset
, 1, ENC_NA
);
4031 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_age
, tvb
, offset
, 1, ENC_NA
);
4034 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive_rec
, tvb
, offset
, 1, ENC_NA
);
4037 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_if_idx
, tvb
, offset
, 1, ENC_NA
);
4042 case ZBNCP_CMD_NWK_GET_NEXT_NBT_ENTRY
:
4043 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4045 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4048 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4051 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_zb_role
, tvb
, offset
, 1, ENC_NA
);
4054 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rx_on_idle
, tvb
, offset
, 1, ENC_NA
);
4057 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ed_config
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4060 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_timeout_cnt
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4063 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dev_timeout
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4066 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_relationship
, tvb
, offset
, 1, ENC_NA
);
4069 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_fail_cnt
, tvb
, offset
, 1, ENC_NA
);
4072 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
4075 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_cost
, tvb
, offset
, 1, ENC_NA
);
4078 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_age
, tvb
, offset
, 1, ENC_NA
);
4081 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive_rec
, tvb
, offset
, 1, ENC_NA
);
4084 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_mac_if_idx
, tvb
, offset
, 1, ENC_NA
);
4089 case ZBNCP_CMD_NWK_PAN_ID_CONFLICT_RESOLVE
:
4090 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4093 uint16_t pan_id_cnt
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
4095 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id_cnt
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4098 for (i
= 0; i
< pan_id_cnt
; i
++)
4100 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4106 case ZBNCP_CMD_NWK_PAN_ID_CONFLICT_IND
:
4107 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4110 uint16_t pan_id_cnt
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
4112 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id_cnt
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4115 for (i
= 0; i
< pan_id_cnt
; i
++)
4117 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_pan_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4123 case ZBNCP_CMD_NWK_ADDRESS_UPDATE_IND
:
4124 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4126 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4131 case ZBNCP_CMD_NWK_START_WITHOUT_FORMATION
:
4132 /* Empty: only common headers */
4135 case ZBNCP_CMD_NWK_NLME_ROUTER_START
:
4136 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4138 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_beacon_order
, tvb
, offset
, 1, ENC_NA
);
4141 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_superframe_order
, tvb
, offset
, 1, ENC_NA
);
4144 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_battery_life_ext
, tvb
, offset
, 1, ENC_NA
);
4149 case ZBNCP_CMD_PIM_SINGLE_POLL
:
4150 /* Empty: only common headers */
4153 case ZBNCP_CMD_PARENT_LOST_IND
:
4154 /* Empty: only common headers */
4157 case ZBNCP_CMD_PIM_START_TURBO_POLL_PACKETS
:
4158 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4160 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_poll_pkt_cnt
, tvb
, offset
, 1, ENC_NA
);
4165 case ZBNCP_CMD_PIM_START_TURBO_POLL_CONTINUOUS
:
4166 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4168 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_poll_timeout
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4173 case ZBNCP_CMD_PIM_TURBO_POLL_CONTINUOUS_LEAVE
:
4174 /* Empty: only common headers */
4177 case ZBNCP_CMD_PIM_TURBO_POLL_PACKETS_LEAVE
:
4178 /* Empty: only common headers */
4181 case ZBNCP_CMD_PIM_PERMIT_TURBO_POLL
:
4182 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4184 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_poll_permit_flag
, tvb
, offset
, 1, ENC_NA
);
4189 case ZBNCP_CMD_PIM_SET_FAST_POLL_TIMEOUT
:
4190 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4192 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_poll_timeout
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4197 case ZBNCP_CMD_PIM_GET_LONG_POLL_INTERVAL
:
4198 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4200 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_long_poll_int
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4205 case ZBNCP_CMD_PIM_GET_IN_FAST_POLL_FLAG
:
4206 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4208 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_fast_poll_flag
, tvb
, offset
, 1, ENC_NA
);
4213 case ZBNCP_CMD_SET_KEEPALIVE_MODE
:
4214 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4216 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_keepalive_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
4221 case ZBNCP_CMD_START_CONCENTRATOR_MODE
:
4222 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4224 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_radius
, tvb
, offset
, 1, ENC_NA
);
4227 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_time_between_disc
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4232 case ZBNCP_CMD_STOP_CONCENTRATOR_MODE
:
4233 /* Empty: only common headers */
4236 case ZBNCP_CMD_NWK_ENABLE_PAN_ID_CONFLICT_RESOLUTION
:
4237 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4239 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_enable_flag
, tvb
, offset
, 1, ENC_NA
);
4244 case ZBNCP_CMD_NWK_ENABLE_AUTO_PAN_ID_CONFLICT_RESOLUTION
:
4245 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4247 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_enable_flag
, tvb
, offset
, 1, ENC_NA
);
4252 case ZBNCP_CMD_PIM_TURBO_POLL_CANCEL_PACKET
:
4253 /* Empty: only common headers */
4256 case ZBNCP_CMD_SET_FORCE_ROUTE_RECORD
:
4257 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4259 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_force_route_record_sending
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
4264 case ZBNCP_CMD_GET_FORCE_ROUTE_RECORD
:
4265 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4267 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_force_route_record_sending
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
4272 case ZBNCP_CMD_NWK_NBR_ITERATOR_NEXT
:
4273 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4275 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx_16b
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4278 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_upd_idx
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4283 case ZBNCP_CMD_ZB_DEBUG_SIGNAL_TCLK_READY_IND
:
4284 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4286 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4291 case ZBNCP_CMD_ZB_DEVICE_READY_FOR_INTERVIEW_IND
:
4292 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4294 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4296 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4301 case ZBNCP_CMD_ZB_DEVICE_INTERVIEW_FINISHED_IND
:
4302 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4304 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4306 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_short_address
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4308 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
4313 case ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_PAN_ID_CHANGE
:
4314 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4316 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_next_pan_id_change
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4319 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4321 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_error_count
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4326 case ZBNCP_CMD_ZB_PREPARE_NETWORK_FOR_CHANNEL_CHANGE
:
4327 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4329 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_next_channel_change
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4332 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4334 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_error_count
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4339 case ZBNCP_CMD_ZB_START_CHANNEL_CHANGE
:
4340 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4342 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_next_channel_change
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4347 case ZBNCP_CMD_ZB_START_PAN_ID_CHANGE
:
4348 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4350 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_next_pan_id_change
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4356 case ZBNCP_CMD_SECUR_SET_LOCAL_IC
:
4357 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4359 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ENC_NA
);
4360 offset
= tvb_reported_length(tvb
);
4364 case ZBNCP_CMD_SECUR_ADD_IC
:
4365 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4367 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4370 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ENC_NA
);
4371 offset
= tvb_reported_length(tvb
);
4375 case ZBNCP_CMD_SECUR_DEL_IC
:
4376 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4378 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4383 case ZBNCP_CMD_SECUR_ADD_CERT
:
4384 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4386 uint8_t crypto_suite
= tvb_get_uint8(tvb
, offset
);
4387 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cs
, tvb
, offset
, 1, ENC_NA
);
4390 if (crypto_suite
== 1)
4392 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_pub_key
, tvb
, offset
, 22, ENC_NA
);
4395 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cert
, tvb
, offset
, 48, ENC_NA
);
4398 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_priv_key
, tvb
, offset
, 21, ENC_NA
);
4401 else if (crypto_suite
== 2)
4403 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_pub_key
, tvb
, offset
, 37, ENC_NA
);
4406 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cert
, tvb
, offset
, 74, ENC_NA
);
4409 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_priv_key
, tvb
, offset
, 36, ENC_NA
);
4415 case ZBNCP_CMD_SECUR_DEL_CERT
:
4416 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4418 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cs
, tvb
, offset
, 1, ENC_NA
);
4421 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_issuer
, tvb
, offset
, 8, ENC_NA
);
4424 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4429 case ZBNCP_CMD_SECUR_START_KE
:
4430 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4432 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cs
, tvb
, offset
, 1, ENC_NA
);
4435 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4438 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4440 unsigned status_category
= tvb_get_uint8(tvb
, offset
);
4443 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cat
, tvb
, offset
, 1, ENC_NA
);
4447 status
= tvb_get_uint8(tvb
, offset
);
4448 switch (status_category
)
4450 case ZBNCP_HIGH_LVL_STAT_CAT_GENERIC
:
4451 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_generic
, tvb
, offset
, 1, ENC_NA
);
4452 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zbncp_hl_status_generic
, "Unknown Status"));
4455 case ZBNCP_HIGH_LVL_STAT_CAT_MAC
:
4456 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_mac
, tvb
, offset
, 1, ENC_NA
);
4457 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_mac_state
, "Unknown Status"));
4460 case ZBNCP_HIGH_LVL_STAT_CAT_NWK
:
4461 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_nwk
, tvb
, offset
, 1, ENC_NA
);
4462 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_nwk_state
, "Unknown Status"));
4465 case ZBNCP_HIGH_LVL_STAT_CAT_APS
:
4466 dissect_zbee_aps_status_code(tvb
, pinfo
, zbncp_hl_body_tree
, offset
);
4469 case ZBNCP_HIGH_LVL_STAT_CAT_CBKE
:
4470 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cbke
, tvb
, offset
, 1, ENC_NA
);
4471 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_cbke_state
, "Unknown Status"));
4475 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
4476 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: 0x%x", status
);
4482 case ZBNCP_CMD_SECUR_START_PARTNER_LK
:
4483 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4485 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4490 case ZBNCP_CMD_SECUR_CBKE_SRV_FINISHED_IND
:
4491 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4493 unsigned status_category
= tvb_get_uint8(tvb
, offset
);
4496 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cat
, tvb
, offset
, 1, ENC_NA
);
4500 status
= tvb_get_uint8(tvb
, offset
);
4501 switch (status_category
)
4503 case ZBNCP_HIGH_LVL_STAT_CAT_GENERIC
:
4504 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_generic
, tvb
, offset
, 1, ENC_NA
);
4505 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zbncp_hl_status_generic
, "Unknown Status"));
4508 case ZBNCP_HIGH_LVL_STAT_CAT_MAC
:
4509 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_mac
, tvb
, offset
, 1, ENC_NA
);
4510 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_mac_state
, "Unknown Status"));
4513 case ZBNCP_HIGH_LVL_STAT_CAT_NWK
:
4514 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_nwk
, tvb
, offset
, 1, ENC_NA
);
4515 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_nwk_state
, "Unknown Status"));
4518 case ZBNCP_HIGH_LVL_STAT_CAT_APS
:
4519 dissect_zbee_aps_status_code(tvb
, pinfo
, zbncp_hl_body_tree
, offset
);
4522 case ZBNCP_HIGH_LVL_STAT_CAT_CBKE
:
4523 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status_cbke
, tvb
, offset
, 1, ENC_NA
);
4524 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: %s", val_to_str_const(status
, zb_cbke_state
, "Unknown Status"));
4528 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_hl_status
, tvb
, offset
, 1, ENC_NA
);
4529 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Status: 0x%x", status
);
4533 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_nwk_addr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4536 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4541 case ZBNCP_CMD_SECUR_PARTNER_LK_FINISHED_IND
:
4542 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4544 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4549 case ZBNCP_CMD_SECUR_KE_WHITELIST_ADD
:
4550 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4552 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4557 case ZBNCP_CMD_SECUR_KE_WHITELIST_DEL
:
4558 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4560 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4565 case ZBNCP_CMD_SECUR_KE_WHITELIST_DEL_ALL
:
4566 /* Empty: only common headers */
4569 case ZBNCP_CMD_SECUR_JOIN_USES_IC
:
4570 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4572 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic_en
, tvb
, offset
, 1, ENC_NA
);
4577 case ZBNCP_CMD_SECUR_GET_IC_BY_IEEE
:
4578 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4580 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4583 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4585 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ENC_NA
);
4586 offset
= tvb_reported_length(tvb
);
4590 case ZBNCP_CMD_SECUR_GET_CERT
:
4591 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4593 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cs
, tvb
, offset
, 1, ENC_NA
);
4596 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4599 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4601 uint8_t crypto_suite
= tvb_get_uint8(tvb
, offset
);
4602 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cs
, tvb
, offset
, 1, ENC_NA
);
4605 if (crypto_suite
== 1)
4607 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_pub_key
, tvb
, offset
, 22, ENC_NA
);
4610 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cert
, tvb
, offset
, 48, ENC_NA
);
4613 else if (crypto_suite
== 2)
4615 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ca_pub_key
, tvb
, offset
, 37, ENC_NA
);
4618 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_cert
, tvb
, offset
, 74, ENC_NA
);
4624 case ZBNCP_CMD_SECUR_GET_LOCAL_IC
:
4625 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4627 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ENC_NA
);
4628 offset
= tvb_reported_length(tvb
);
4632 case ZBNCP_CMD_SECUR_TCLK_IND
:
4633 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4635 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4638 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_type
, tvb
, offset
, 1, ENC_NA
);
4643 case ZBNCP_CMD_SECUR_TCLK_EXCHANGE_FAILED_IND
:
4644 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4646 offset
= dissect_zbncp_status(tvb
, pinfo
, zbncp_hl_body_tree
, offset
);
4650 case ZBNCP_CMD_SECUR_GET_KEY_IDX
:
4651 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4653 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4656 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4658 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4663 case ZBNCP_CMD_SECUR_GET_KEY
:
4664 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4666 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4669 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4671 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_link_key
, tvb
, offset
, 16, ENC_NA
);
4674 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_aps_link_key_type
, tvb
, offset
, 1, ENC_NA
);
4677 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_src
, tvb
, offset
, 1, ENC_NA
);
4680 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_key_attr
, tvb
, offset
, 1, ENC_NA
);
4683 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_out_frame_cnt
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4686 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_inc_frame_cnt
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4689 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_partner_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4694 case ZBNCP_CMD_SECUR_ERASE_KEY
:
4695 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4697 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_index
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4702 case ZBNCP_CMD_SECUR_CLEAR_KEY_TABLE
:
4703 /* Empty: only common headers */
4706 case ZBNCP_CMD_SECUR_NWK_INITIATE_KEY_SWITCH_PROCEDURE
:
4707 /* Empty: only common headers */
4710 case ZBNCP_CMD_SECUR_GET_IC_LIST
:
4711 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4713 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
4716 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4718 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic_table_size
, tvb
, offset
, 1, ENC_NA
);
4721 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_start_idx
, tvb
, offset
, 1, ENC_NA
);
4724 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic_ent_cnt
, tvb
, offset
, 1, ENC_NA
);
4727 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
4728 offset
+= tvb_captured_length(tvb
) - offset
;
4732 case ZBNCP_CMD_SECUR_GET_IC_BY_IDX
:
4733 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4735 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_entry_idx
, tvb
, offset
, 1, ENC_NA
);
4738 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4740 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ic
, tvb
, offset
, tvb_captured_length(tvb
) - offset
, ENC_NA
);
4741 offset
+= tvb_captured_length(tvb
) - offset
;
4745 case ZBNCP_CMD_SECUR_REMOVE_ALL_IC
:
4746 /* Empty: only common headers */
4749 case ZBNCP_CMD_SECUR_PARTNER_LK_ENABLE
:
4750 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4752 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_enable
, tvb
, offset
, 1, ENC_NA
);
4757 case ZBNCP_CMD_SECUR_AUTH_DEVICE_AFTER_INTERVIEW
:
4758 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4760 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4765 case ZBNCP_CMD_ZDO_SECUR_UPDATE_DEVICE_TCLK
:
4766 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4768 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_ieee_addr
, tvb
, offset
, 8, ENC_LITTLE_ENDIAN
);
4773 /* Manufacturing Test API */
4774 case ZBNCP_CMD_MANUF_MODE_START
:
4775 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4777 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
4780 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel4
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4785 case ZBNCP_CMD_MANUF_MODE_END
:
4786 /* Empty: only common headers */
4789 case ZBNCP_CMD_MANUF_SET_CHANNEL
:
4790 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4792 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
4795 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel4
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4800 case ZBNCP_CMD_MANUF_GET_CHANNEL
:
4801 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4803 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_page
, tvb
, offset
, 1, ENC_NA
);
4806 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_channel4
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
4811 case ZBNCP_CMD_MANUF_SET_POWER
:
4812 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4814 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_power
, tvb
, offset
, 1, ENC_NA
);
4819 case ZBNCP_CMD_MANUF_GET_POWER
:
4820 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4822 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_tx_power
, tvb
, offset
, 1, ENC_NA
);
4827 case ZBNCP_CMD_MANUF_START_TONE
:
4828 /* Empty: only common headers */
4831 case ZBNCP_CMD_MANUF_STOP_TONE
:
4832 /* Empty: only common headers */
4835 case ZBNCP_CMD_MANUF_START_STREAM_RANDOM
:
4836 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4838 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_seed
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4843 case ZBNCP_CMD_MANUF_STOP_STREAM_RANDOM
:
4844 /* Empty: only common headers */
4847 case ZBNCP_CMD_NCP_HL_MANUF_SEND_SINGLE_PACKET
:
4848 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4850 uint8_t data_len
= tvb_get_uint8(tvb
, offset
);
4851 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen8
, tvb
, offset
, 1, ENC_NA
);
4854 if (data_len
> (tvb_reported_length(tvb
) - offset
))
4856 data_len
= tvb_reported_length(tvb
) - offset
;
4859 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
4864 case ZBNCP_CMD_MANUF_START_TEST_RX
:
4865 /* Empty: only common headers */
4868 case ZBNCP_CMD_MANUF_STOP_TEST_RX
:
4869 /* Empty: only common headers */
4872 case ZBNCP_CMD_MANUF_RX_PACKET_IND
:
4873 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_INDICATION
)
4875 uint16_t data_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
4876 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4879 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_lqi
, tvb
, offset
, 1, ENC_NA
);
4882 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_rssi
, tvb
, offset
, 1, ENC_NA
);
4885 if (data_len
> (tvb_reported_length(tvb
) - offset
))
4887 data_len
= tvb_reported_length(tvb
) - offset
;
4890 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
4895 /* NCP FW upgrade API */
4896 case ZBNCP_CMD_OTA_RUN_BOOTLOADER
:
4897 /* Empty: only common headers */
4900 case ZBNCP_CMD_OTA_START_UPGRADE_IND
:
4901 /* Empty: only common headers */
4904 case ZBNCP_CMD_OTA_SEND_PORTION_FW
:
4905 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4907 uint16_t data_len
= tvb_get_uint16(tvb
, offset
, ENC_LITTLE_ENDIAN
);
4908 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4911 if (data_len
> (tvb_reported_length(tvb
) - offset
))
4913 data_len
= tvb_reported_length(tvb
) - offset
;
4916 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
4921 case ZBNCP_CMD_READ_NVRAM_RESERVED
:
4922 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4924 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_offset
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4927 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen8
, tvb
, offset
, 1, ENC_NA
);
4930 else if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4934 data_len
= tvb_get_uint8(tvb
, offset
);
4935 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen8
, tvb
, offset
, 1, ENC_NA
);
4938 if (data_len
> (tvb_reported_length(tvb
) - offset
))
4940 data_len
= tvb_reported_length(tvb
) - offset
;
4942 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
4947 case ZBNCP_CMD_WRITE_NVRAM_RESERVED
:
4948 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_REQUEST
)
4952 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_do_erase
, tvb
, offset
, 1, ENC_NA
);
4955 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_offset
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
4958 data_len
= tvb_get_uint8(tvb
, offset
);
4959 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_dlen8
, tvb
, offset
, 1, ENC_NA
);
4962 if (data_len
> (tvb_reported_length(tvb
) - offset
))
4964 data_len
= tvb_reported_length(tvb
) - offset
;
4966 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_array
, tvb
, offset
, data_len
, ENC_NA
);
4971 case ZBNCP_CMD_GET_CALIBRATION_INFO
:
4972 if (ptype
== ZBNCP_HIGH_LVL_PACKET_TYPE_RESPONSE
)
4974 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_calibration_status
, tvb
, offset
, 1, ENC_NA
);
4976 proto_tree_add_item(zbncp_hl_body_tree
, hf_zbncp_data_calibration_value
, tvb
, offset
, 1, ENC_NA
);
4984 /* Dump the tail. */
4985 if (offset
< tvb_reported_length(tvb
))
4987 tvbuff_t
*leftover_tvb
= tvb_new_subset_remaining(tvb
, offset
);
4988 call_data_dissector(leftover_tvb
, pinfo
, tree
);
4993 dissect_zbncp_fragmentation_body(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, unsigned offset
)
4995 proto_tree
*zbncp_body_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ett_zbncp_ll_body
, NULL
, "ZBNCP Packet Body");
4998 proto_tree_add_item(zbncp_body_tree
, hf_zbncp_body_data_crc16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
5001 /* Dump the tail. */
5002 if (offset
< tvb_reported_length(tvb
))
5004 tvbuff_t
*leftover_tvb
= tvb_new_subset_remaining(tvb
, offset
);
5005 call_data_dissector(leftover_tvb
, pinfo
, zbncp_body_tree
);
5010 dissect_zbncp_body(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
, unsigned offset
, uint16_t *cmd_id
)
5012 proto_tree
*zbncp_body_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ett_zbncp_ll_body
, NULL
, "ZBNCP Packet Body");
5015 proto_tree_add_item(zbncp_body_tree
, hf_zbncp_body_data_crc16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
5018 dissect_zbncp_high_level(tvb
, pinfo
, zbncp_body_tree
, offset
, cmd_id
);
5022 dissect_zbncp_ll_hdr(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned offset
, uint8_t *hdr_flags
)
5024 proto_tree
*ncp_ll_hdr_tree
;
5025 proto_item
*proto_root
;
5027 static int *const packet_flags
[] = {
5028 &hf_zbncp_hdr_flags_isack
,
5029 &hf_zbncp_hdr_flags_retrans
,
5030 &hf_zbncp_hdr_flags_packetseq
,
5031 &hf_zbncp_hdr_flags_ackseq
,
5032 &hf_zbncp_hdr_flags_first_frag
,
5033 &hf_zbncp_hdr_flags_last_frag
,
5036 if (tvb_get_uint8(tvb
, 0) != ZBNCP_SIGN_FST_BYTE
||
5037 tvb_get_uint8(tvb
, 1) != ZBNCP_SIGN_SEC_BYTE
)
5042 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ZB NCP");
5044 proto_root
= proto_tree_add_protocol_format(tree
, zbncp_frame
, tvb
, 0, tvb_captured_length(tvb
), "ZBNCP Low Level Header");
5045 ncp_ll_hdr_tree
= proto_item_add_subtree(proto_root
, ett_zbncp_hdr
);
5048 proto_tree_add_item(ncp_ll_hdr_tree
, hf_zbncp_hdr_sign
, tvb
, offset
, 2, ENC_ASCII
);
5051 /* pkt length without sign */
5052 proto_tree_add_item(ncp_ll_hdr_tree
, hf_zbncp_packet_len
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
5055 /* hl packet type */
5056 proto_tree_add_item(ncp_ll_hdr_tree
, hf_zbncp_hdr_type
, tvb
, offset
, 1, ENC_NA
);
5060 *hdr_flags
= tvb_get_uint8(tvb
, offset
);
5061 proto_tree_add_bitmask(ncp_ll_hdr_tree
, tvb
, offset
, hf_zbncp_hdr_flags
, ett_zbncp_hdr_flags
, packet_flags
, ENC_NA
);
5065 if (*hdr_flags
& ZBNCP_HDR_FLAGS_ISACK_MASK
)
5067 col_set_str(pinfo
->cinfo
, COL_INFO
, "ACK");
5071 proto_tree_add_item(ncp_ll_hdr_tree
, hf_zbncp_hdr_crc8
, tvb
, offset
++, 1, ENC_NA
);
5077 dissect_zbncp_packet(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, unsigned offset
)
5082 conversation_t
*conversation
;
5083 char *zbncp_ctx_str
;
5086 offset
= dissect_zbncp_ll_hdr(tvb
, pinfo
, tree
, offset
, &flags
);
5093 if (offset
< tvb_reported_length(tvb
))
5095 if (ZBNCP_GET_PACKET_FLAGS_FIRST_FRAG_BIT(flags
))
5097 /* No fragmentation or first fragment */
5098 dissect_zbncp_body(tvb
, pinfo
, tree
, offset
, &cmd_id
);
5100 /* First fragment */
5101 if (!ZBNCP_GET_PACKET_FLAGS_LAST_FRAG_BIT(flags
))
5103 const char *tmp
= val_to_str_const(cmd_id
, zbncp_hl_call_id
, "Unknown Call ID");
5104 zbncp_ctx_str
= wmem_alloc(wmem_file_scope(), 64);
5106 if(zbncp_ctx_str
!= NULL
)
5108 memcpy(zbncp_ctx_str
, tmp
, strlen(tmp
) + 1);
5110 conversation
= conversation_new(pinfo
->num
, &pinfo
->src
, &pinfo
->dst
,
5111 conversation_pt_to_conversation_type(pinfo
->ptype
),
5112 pinfo
->srcport
, pinfo
->destport
, 0);
5114 conversation_add_proto_data(conversation
, zbncp_frame
, (void *)zbncp_ctx_str
);
5117 col_append_str(pinfo
->cinfo
, COL_INFO
, ", first fragment");
5120 else /* It's fragmentation frame */
5122 /* Fragmentation frame */
5123 dissect_zbncp_fragmentation_body(tvb
, pinfo
, tree
, offset
);
5125 conversation
= find_conversation(pinfo
->num
, &pinfo
->src
, &pinfo
->dst
,
5126 conversation_pt_to_conversation_type(pinfo
->ptype
),
5127 pinfo
->srcport
, pinfo
->destport
, 0);
5129 if (conversation
!= NULL
)
5131 zbncp_ctx_str
= (char *) conversation_get_proto_data(conversation
, zbncp_frame
);
5133 if (zbncp_ctx_str
!= NULL
)
5135 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s", zbncp_ctx_str
);
5136 conversation_delete_proto_data(conversation
, zbncp_frame
);
5140 if (ZBNCP_GET_PACKET_FLAGS_LAST_FRAG_BIT(flags
))
5142 col_append_str(pinfo
->cinfo
, COL_INFO
, ", last fragment");
5146 col_append_str(pinfo
->cinfo
, COL_INFO
, ", fragment");
5151 return tvb_captured_length(tvb
);
5155 * Dissector for ZBOSS NCP packet with an additional dump info.
5157 * @param tvb pointer to buffer containing raw packet.
5158 * @param pinfo pointer to packet information fields.
5159 * @param tree pointer to data tree wireshark uses to display packet.
5162 dissect_zbncp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
5165 new_tvb
= dissect_zbncp_dump_info(tvb
, pinfo
, tree
);
5167 dissect_zbncp_packet(new_tvb
, pinfo
, tree
, 0);
5169 return tvb_captured_length(tvb
);
5173 * Proto ZBOSS Network Coprocessor product registration routine
5175 void proto_register_zbncp(void)
5177 /* NCP protocol headers */
5178 static hf_register_info hf_zbncp_phy
[] = {
5179 {&hf_zbncp_hdr_sign
,
5180 {"Signature", "zbncp.hdr.sign", FT_UINT16
, BASE_HEX
, NULL
,
5183 {&hf_zbncp_packet_len
,
5184 {"Packet length", "zbncp.hdr.plen", FT_UINT16
, BASE_DEC
, NULL
,
5187 {&hf_zbncp_hdr_type
,
5188 {"Packet type", "zbncp.hdr.ptype", FT_UINT8
, BASE_HEX
, NULL
,
5191 {&hf_zbncp_hdr_flags
,
5192 {"Packet flags", "zbncp.hdr.flags", FT_UINT8
, BASE_HEX
, NULL
,
5195 {&hf_zbncp_hdr_flags_isack
,
5196 {"isACK", "zbncp.hdr.flags.isack", FT_BOOLEAN
, 8, NULL
,
5197 ZBNCP_HDR_FLAGS_ISACK_MASK
, NULL
, HFILL
}},
5199 {&hf_zbncp_hdr_flags_retrans
,
5200 {"Should retransmit", "zbncp.hdr.flags.retrans", FT_BOOLEAN
, 8, NULL
,
5201 ZBNCP_HDR_FLAGS_RETRANS_MASK
, NULL
, HFILL
}},
5203 {&hf_zbncp_hdr_flags_packetseq
,
5204 {"Packet#", "zbncp.hdr.flags.packet_seq", FT_UINT8
, BASE_DEC
, NULL
,
5205 ZBNCP_HDR_FLAGS_PKT_SEQ_MASK
, NULL
, HFILL
}},
5207 {&hf_zbncp_hdr_flags_ackseq
,
5208 {"ACK#", "zbncp.hdr.flags.ack_seq", FT_UINT8
, BASE_DEC
, NULL
,
5209 ZBNCP_HDR_FLAGS_ACK_SEQ_MASK
, NULL
, HFILL
}},
5211 {&hf_zbncp_hdr_flags_first_frag
,
5212 {"First fragment", "zbncp.hdr.flags.first_frag", FT_BOOLEAN
, 8, NULL
,
5213 ZBNCP_HDR_FLAGS_ISFIRST_MASK
, NULL
, HFILL
}},
5215 {&hf_zbncp_hdr_flags_last_frag
,
5216 {"Last fragment", "zbncp.hdr.flags.last_frag", FT_BOOLEAN
, 8, NULL
,
5217 ZBNCP_HDR_FLAGS_ISLAST_MASK
, NULL
, HFILL
}},
5219 {&hf_zbncp_hdr_crc8
,
5220 {"CRC8", "zbncp.hdr.crc8", FT_UINT8
, BASE_HEX
, NULL
,
5223 {&hf_zbncp_body_data_crc16
,
5224 {"CRC16", "zbncp.data.crc16", FT_UINT16
, BASE_HEX
, NULL
,
5227 {&hf_zbncp_data_hl_version
,
5228 {"Version", "zbncp.data.hl.vers", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5230 {&hf_zbncp_data_hl_packet_type
,
5231 {"Packet type", "zbncp.data.hl.ptype", FT_UINT8
, BASE_HEX
, VALS(zbncp_hl_type
), 0x0, NULL
, HFILL
}},
5233 {&hf_zbncp_data_hl_call_id
,
5234 {"Call/evt id", "zbncp.data.hl.id", FT_UINT16
, BASE_HEX
, VALS(zbncp_hl_call_id
), 0x0, NULL
, HFILL
}},
5236 {&hf_zbncp_data_hl_tsn
,
5237 {"TSN", "zbncp.data.hl.tsn", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5239 {&hf_zbncp_data_hl_status_cat
,
5240 {"Status category", "zbncp.data.hl.status_cat", FT_UINT8
, BASE_HEX
, VALS(zbncp_hl_status_cat
), 0x0, NULL
, HFILL
}},
5242 {&hf_zbncp_data_hl_status
,
5243 {"Status", "zbncp.data.hl.status", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5245 {&hf_zbncp_data_hl_status_generic
,
5246 {"Status", "zbncp.data.hl.status", FT_UINT8
, BASE_HEX
, VALS(zbncp_hl_status_generic
), 0x0, NULL
, HFILL
}},
5248 {&hf_zbncp_data_hl_status_mac
,
5249 {"Status", "zbncp.data.hl.status", FT_UINT8
, BASE_HEX
, VALS(zb_mac_state
), 0x0, NULL
, HFILL
}},
5251 {&hf_zbncp_data_hl_status_nwk
,
5252 {"Status", "zbncp.data.hl.status", FT_UINT8
, BASE_HEX
, VALS(zb_nwk_state
), 0x0, NULL
, HFILL
}},
5254 {&hf_zbncp_data_hl_status_cbke
,
5255 {"Status", "zbncp.data.hl.status", FT_UINT8
, BASE_HEX
, VALS(zb_cbke_state
), 0x0, NULL
, HFILL
}},
5257 {&hf_zbncp_data_fw_vers
,
5258 {"FW Version", "zbncp.data.fw_vers", FT_UINT32
, BASE_HEX
, NULL
, 0x0, "NCP module firmware version", HFILL
}},
5260 {&hf_zbncp_data_stack_vers
,
5261 {"Stack Version", "zbncp.data.stack_vers", FT_UINT32
, BASE_HEX
, NULL
, 0x0, "NCP module stack version", HFILL
}},
5263 {&hf_zbncp_data_proto_vers
,
5264 {"Protocol Version", "zbncp.data.proto_vers", FT_UINT32
, BASE_HEX
, NULL
, 0x0, "NCP module protocol version", HFILL
}},
5266 {&hf_zbncp_data_reset_opt
,
5267 {"Options", "zbncp.data.rst_opt", FT_UINT8
, BASE_HEX
, VALS(zbncp_reset_opt
), 0x0, "Force NCP module reboot", HFILL
}},
5269 {&hf_zbncp_data_zb_role
,
5270 {"Zigbee role", "zbncp.data.zb_role", FT_UINT8
, BASE_HEX
, VALS(zbncp_zb_role
), 0x0, "Zigbee role code", HFILL
}},
5272 {&hf_zbncp_data_ch_list_len
,
5273 {"Channel list length", "zbncp.data.ch_list_len", FT_UINT8
, BASE_HEX
, NULL
, 0x0, "Number of entries in the following Channel List array", HFILL
}},
5275 {&hf_zbncp_data_page
,
5276 {"Channel page", "zbncp.data.page", FT_UINT8
, BASE_DEC_HEX
, VALS(zboss_page_names
), 0x0,
5277 "IEEE802.15.4 page number", HFILL
}},
5279 {&hf_zbncp_data_ch_mask
,
5280 {"Channel mask", "zbncp.data.ch_mask", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5282 {&hf_zbncp_data_channel
,
5283 {"Channel", "zbncp.data.mask", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5284 "Channel number", HFILL
}},
5286 {&hf_zbncp_data_channel4
,
5287 {"Channel", "zbncp.data.mask", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5288 "Channel number", HFILL
}},
5290 {&hf_zbncp_data_pan_id
,
5291 {"PAN ID", "zbncp.data.pan_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5293 {&hf_zbncp_data_index
,
5294 {"Index", "zbncp.data.index", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5296 {&hf_zbncp_data_enable
,
5297 {"Enable", "zbncp.data.enable", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5299 {&hf_zbncp_data_bind_type
,
5300 {"Bind Type", "zbncp.data.bind_type", FT_UINT8
, BASE_DEC
, VALS(zbncp_bind_type_vals
), 0x0, NULL
, HFILL
}},
5302 {&hf_zbncp_data_mac_int_num
,
5303 {"MAC Interface Num", "zbncp.data.mac_int_num", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5305 {&hf_zbncp_data_ext_pan_id
,
5306 {"Ext PAN ID", "zbncp.data.ext_pan_id", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5308 {&hf_zbncp_data_coordinator_version
,
5309 {"Coordinator version", "zbncp.data.coord_version", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5311 {&hf_zbncp_data_trust_center_addres
,
5312 {"IEEE trust center address", "zbncp.data.ieee_trust_center_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5314 {&hf_zbncp_data_ieee_addr
,
5315 {"IEEE address", "zbncp.data.ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5317 {&hf_zbncp_data_remote_ieee_addr
,
5318 {"Remote IEEE address", "zbncp.data.rmt_ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5320 {&hf_zbncp_data_src_ieee_addr
,
5321 {"Source IEEE address", "zbncp.data.src_ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5323 {&hf_zbncp_data_dst_ieee_addr
,
5324 {"Destination IEEE address", "zbncp.data.dst_ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5326 {&hf_zbncp_data_target_ieee_addr
,
5327 {"Target IEEE address", "zbncp.data.target_ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5329 {&hf_zbncp_data_partner_ieee_addr
,
5330 {"Partner IEEE address", "zbncp.data.partner_ieee_addr", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5332 {&hf_zbncp_data_keepalive
,
5333 {"Keepalive Timeout", "zbncp.data.keepalive", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5335 {&hf_zbncp_force_route_record_sending
,
5336 {"Force route record sending mode", "zbncp.data.force_route_rec_mode", FT_UINT8
, BASE_DEC
, VALS(zbncp_force_route_record_sending_modes
), 0x0, NULL
, HFILL
}},
5338 {&hf_zbncp_data_rx_on_idle
,
5339 {"Rx On When Idle", "zbncp.data.rx_on_idle", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5341 {&hf_zbncp_data_res_tx_power
,
5342 {"Resultant TX power", "zbncp.data.tx_power", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5344 {&hf_zbncp_data_req_tx_power
,
5345 {"Required TX power", "zbncp.data.tx_power", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5347 {&hf_zbncp_data_joined
,
5348 {"Joined", "zbncp.data.joined", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5350 {&hf_zbncp_data_joined_bit
,
5351 {"Device is joined", "zbncp.data.device_is_joined", FT_BOOLEAN
, 8, NULL
, 0x1, NULL
, HFILL
}},
5353 {&hf_zbncp_data_parent_bit
,
5354 {"Parent is lost", "zbncp.data.parent_is_lost", FT_BOOLEAN
, 8, NULL
, 0x2, NULL
, HFILL
}},
5356 {&hf_zbncp_data_authenticated
,
5357 {"Authenticated", "zbncp.data.auth", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5359 {&hf_zbncp_data_timeout
,
5360 {"Timeout", "zbncp.data.timeout", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5362 {&hf_zbncp_data_nwk_addr
,
5363 {"NWK address", "zbncp.data.nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5365 {&hf_zbncp_data_nwk_parent_addr
,
5366 {"NWK parent address", "zbncp.data.nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5368 {&hf_zbncp_data_dst_nwk_addr
,
5369 {"Destination NWK address", "zbncp.data.dst_nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5371 {&hf_zbncp_data_src_nwk_addr
,
5372 {"Source NWK address", "zbncp.data.src_nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5374 {&hf_zbncp_data_remote_nwk_addr
,
5375 {"Remote NWK address", "zbncp.data.rmt_nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5377 {&hf_zbncp_data_group_nwk_addr
,
5378 {"Group NWK address", "zbncp.data.group_nwk_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5380 {&hf_zbncp_data_src_mac_addr
,
5381 {"Source MAC address", "zbncp.data.src_mac_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5383 {&hf_zbncp_data_dst_mac_addr
,
5384 {"Destination MAC address", "zbncp.data.dst_mac_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5386 {&hf_zbncp_data_nwk_key
,
5387 {"NWK Key", "zbncp.data.nwk_key", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
5389 {&hf_zbncp_data_key_num
,
5390 {"Key number", "zbncp.data.key_num", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5392 {&hf_zbncp_data_serial_num
,
5393 {"Serial number", "zbncp.data.serial_num", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
5395 {&hf_zbncp_data_size
,
5396 {"Size", "zbncp.data.size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5398 {&hf_zbncp_data_parameter_id
,
5399 {"Parameter ID", "zbncp.data.param_id", FT_UINT8
, BASE_DEC
, VALS(zbncp_parameter_id_list
), 0x0, NULL
, HFILL
}},
5401 {&hf_zbncp_data_value8_dec
,
5402 {"Value", "zbncp.data.value", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5404 {&hf_zbncp_data_value16_dec
,
5405 {"Value", "zbncp.data.value", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5407 {&hf_zbncp_data_aps_ack_to_non_sleepy
,
5408 {"Value (for non-sleepy dev)", "zbncp.data.non_sleepy_value", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5410 {&hf_zbncp_data_aps_ack_to_sleepy
,
5411 {"Value (for sleepy dev)", "zbncp.data.sleepy_value", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5413 {&hf_zbncp_data_min16
,
5414 {"Min", "zbncp.data.min_value", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5416 {&hf_zbncp_data_max16
,
5417 {"Max", "zbncp.data.max_value", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5419 {&hf_zbncp_data_default8_sign
,
5420 {"Default", "zbncp.data.default_val", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5422 {&hf_zbncp_data_current8_sign
,
5423 {"Current", "zbncp.data.current_val", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5425 {&hf_zbncp_data_is_concentrator
,
5426 {"Is concentrator", "zbncp.data.is_conc", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5428 {&hf_zbncp_data_concentrator_radius
,
5429 {"Concentrator radius", "zbncp.data.conc_rad", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5431 {&hf_zbncp_data_time16
,
5432 {"Time", "zbncp.data.conc_time", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5434 {&hf_zbncp_data_lock_status
,
5435 {"Locking status", "zbncp.data.lock_status", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5437 {&hf_zbncp_nwk_leave_allowed
,
5438 {"NWK Leave Allowed", "zbncp.data.nwk_leave_allow", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5440 {&hf_zbncp_data_nvram_dataset_quantity
,
5441 {"Dataset quantity", "zbncp.data.nvram_dataset_quantity", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5443 {&hf_zbncp_data_nvram_dataset_type
,
5444 {"NVRAM Database type", "zbncp.data.nvram_database_type", FT_UINT16
, BASE_HEX
, VALS(zb_nvram_database_types
), 0x0, NULL
, HFILL
}},
5446 {&hf_zbncp_data_nvram_version
,
5447 {"NVRAM Version", "zbncp.data.nvram_version", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5449 {&hf_zbncp_data_dataset_version
,
5450 {"NVRAM Dataset Version", "zbncp.data.dataset_version", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5452 {&hf_zbncp_data_dataset_length
,
5453 {"NVRAM Dataset size", "zbncp.data.dataset_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5455 {&hf_zbncp_data_nvram_dataset_data
,
5456 {"NVRAM Dataset data", "zbncp.data.dataset_data", FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5458 {&hf_zbncp_data_tc_policy_type
,
5459 {"Trust center policy type", "zbncp.data.tc_policy_type", FT_UINT16
, BASE_HEX
, VALS(zbncp_tc_policy_types
), 0x0, NULL
, HFILL
}},
5461 {&hf_zbncp_data_tc_policy_value
,
5462 {"Trust center policy value", "zbncp.data.tc_policy_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5464 {&hf_zbncp_ed_capacity
,
5465 {"Number of children", "zbncp.data.num_children", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5467 {&hf_zbncp_max_joins
,
5468 {"Max successfull join attempts", "zbncp.data.max_joins", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5470 {&hf_zbncp_zdo_leave_allowed
,
5471 {"ZDO Leave Allowed", "zbncp.data.zdo_leave_allow", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5473 {&hf_zbncp_zdo_leave_wo_rejoin_allowed
,
5474 {"ZDO Leave Without Rejoin Allowed", "zbncp.data.zdo_leave_wo_rejoin_allow", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5476 {&hf_zbncp_data_reset_source
,
5477 {"Reset source", "zbncp.data.rst_src", FT_UINT8
, BASE_DEC
, VALS(zbncp_rst_src_list
), 0x0, NULL
, HFILL
}},
5479 {&hf_zbncp_data_vendor_data
,
5480 {"Vendor data", "zbncp.data.vendor_data", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
5482 {&hf_zbncp_data_aps_key
,
5483 {"APS Key", "zbncp.data.aps_key", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
5485 {&hf_zbncp_data_endpoint
,
5486 {"Endpoint", "zbncp.data.endpoint", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5488 {&hf_zbncp_data_aps_group_num
,
5489 {"APS group number", "zbncp.data.aps_group_num", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5491 {&hf_zbncp_data_aps_group
,
5492 {"APS group", "zbncp.data.aps_group", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5494 {&hf_zbncp_data_src_endpoint
,
5495 {"Source Endpoint", "zbncp.data.src_endpoint", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5497 {&hf_zbncp_data_dst_endpoint
,
5498 {"Destination Endpoint", "zbncp.data.dst_endpoint", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5500 {&hf_zbncp_data_poll_pkt_cnt
,
5501 {"Packet count", "zbncp.data.poll_pkt_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, "The number of packets to poll", HFILL
}},
5503 {&hf_zbncp_data_poll_timeout
,
5504 {"Poll Timeout", "zbncp.data.poll_timeout", FT_UINT32
, BASE_DEC
, NULL
, 0x0, "The duration of poll in ms", HFILL
}},
5506 {&hf_zbncp_data_poll_permit_flag
,
5507 {"Permit flag", "zbncp.data.poll_permit_flag", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5509 {&hf_zbncp_data_profile_id
,
5510 {"Profile ID", "zbncp.data.profile_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5512 {&hf_zbncp_data_device_id
,
5513 {"Device ID", "zbncp.data.device_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5515 {&hf_zbncp_data_dev_version
,
5516 {"Device Version", "zbncp.data.dev_vers", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5518 {&hf_zbncp_data_in_cl_cnt
,
5519 {"Input Cluster Count", "zbncp.data.in_cl_cnt", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5521 {&hf_zbncp_data_out_cl_cnt
,
5522 {"Output Cluster Count", "zbncp.data.out_cl_cnt", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5524 {&hf_zbncp_data_cluster_id
,
5525 {"Cluster ID", "zbncp.data.cluster_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5527 {&hf_zbncp_data_mac_cap
,
5528 {"MAC capability", "zbncp.data.mac_cap", FT_UINT8
, BASE_HEX
, NULL
,
5531 {&hf_zbncp_data_manuf_id
,
5532 {"Manufacturer ID", "zbncp.data.manuf_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5534 {&hf_zbncp_data_cur_pwr_mode
,
5535 {"Current Power Mode", "zbncp.data.pwr_mode", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5537 {&hf_zbncp_data_cur_pwr_lvl
,
5538 {"Current Power Level", "zbncp.data.pwr_lvl", FT_UINT8
, BASE_DEC
, VALS(zbncp_power_level
), 0x0, NULL
, HFILL
}},
5540 {&hf_zbncp_data_susp_period
,
5541 {"Suspension Period", "zbncp.data.susp_period", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5543 {&hf_zbncp_data_av_pwr_src
,
5544 {"Available Power Sources", "zbncp.data.av_pwr_src", FT_UINT8
, BASE_HEX
, NULL
,
5547 {&hf_zbncp_data_cur_pwr_src
,
5548 {"Current Power Source", "zbncp.data.cur_pwr_src", FT_UINT8
, BASE_HEX
, NULL
,
5551 {&hf_zbncp_data_pwr_src_const
,
5552 {"Constant (mains) power", "zbncp.data.pwr_src_const", FT_BOOLEAN
, 8, NULL
,
5553 0x01, NULL
, HFILL
}},
5555 {&hf_zbncp_data_pwr_src_recharge
,
5556 {"Rechargeable battery", "zbncp.data.pwr_src_recharge", FT_BOOLEAN
, 8, NULL
,
5557 0x02, NULL
, HFILL
}},
5559 {&hf_zbncp_data_pwr_src_disposable
,
5560 {"Disposable battery", "zbncp.data.pwr_src_disp", FT_BOOLEAN
, 8, NULL
,
5561 0x04, NULL
, HFILL
}},
5563 {&hf_zbncp_data_req_type
,
5564 {"Request Type", "zbncp.data.nwk_req_type", FT_UINT8
, BASE_DEC
, VALS(zbncp_nwk_req_type
), 0x0, NULL
, HFILL
}},
5566 {&hf_zbncp_data_start_idx
,
5567 {"Start Index", "zbncp.data.start_idx", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5569 {&hf_zbncp_data_start_idx_16b
,
5570 {"Start Index", "zbncp.data.start_idx", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5572 {&hf_zbncp_data_upd_idx
,
5573 {"Update Index", "zbncp.data.update_idx", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5575 {&hf_zbncp_data_entry_idx
,
5576 {"Entry Index", "zbncp.data.entry_idx", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5578 {&hf_zbncp_data_num_asoc_dec
,
5579 {"Num Assoc Dev", "zbncp.data.num_asoc_dev", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5581 {&hf_zbncp_data_pwr_desc
,
5582 {"Power Descriptor", "zbncp.data.pwr_desc", FT_UINT16
, BASE_HEX
, NULL
,
5585 {&hf_zbncp_data_pwr_desc_cur_power_mode
,
5586 {"Current Power Mode", "zbncp.data.pwr_desc.pwr_mode", FT_UINT16
, BASE_DEC
, NULL
,
5587 0x000F, NULL
, HFILL
}},
5589 {&hf_zbncp_data_pwr_desc_av_pwr_src
,
5590 {"Available Power Sources", "zbncp.data.pwr_desc.av_pwr_src", FT_UINT16
, BASE_DEC
, NULL
,
5591 0x00F0, NULL
, HFILL
}}, /* todo */
5593 {&hf_zbncp_data_pwr_desc_cur_pwr_src
,
5594 {"Current Power Sources", "zbncp.data.pwr_desc.cur_pwr_src", FT_UINT16
, BASE_DEC
, NULL
,
5595 0x0F00, NULL
, HFILL
}}, /* todo */
5597 {&hf_zbncp_data_pwr_desc_cur_pwr_lvl
,
5598 {"Current Power Level", "zbncp.data.cur_pwr_lvl", FT_UINT16
, BASE_DEC
, VALS(zbncp_power_level
),
5599 0xF000, NULL
, HFILL
}},
5601 {&hf_zbncp_data_max_buf_size
,
5602 {"Max buffer size", "zbncp.data.max_buf_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5604 {&hf_zbncp_data_max_inc_trans_size
,
5605 {"Max Incoming transfer size", "zbncp.data.max_inc_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5607 {&hf_zbncp_data_max_out_trans_size
,
5608 {"Max Outgoing transfer size", "zbncp.data.max_out_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5610 {&hf_zbncp_data_desc_cap
,
5611 {"Descriptor Capabilities", "zbncp.data.desc_cap", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5613 {&hf_zbncp_data_desc_cap_ext_act_ep_list_av
,
5614 {"Extended Active Endpoint List Available", "zbncp.data.desc_cap.active_ep_list", FT_BOOLEAN
, 8, NULL
,
5617 {&hf_zbncp_data_desc_cap_ext_simple_desc_list_av
,
5618 {"Extended Simple Descriptor List Available", "zbncp.data.desc_cap.simple_desc_list", FT_BOOLEAN
, 8, NULL
,
5621 {&hf_zbncp_data_flags8
,
5622 {"Flags", "zbncp.data.flags8", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5624 {&hf_zbncp_data_flags_permit_join
,
5625 {"Permit Joining", "zbncp.data.flags.perm_join", FT_BOOLEAN
, 8, NULL
,
5628 {&hf_zbncp_data_flags_router_cap
,
5629 {"Router capacity", "zbncp.data.flags.router_cap", FT_BOOLEAN
, 8, NULL
,
5632 {&hf_zbncp_data_flags_ed_cap
,
5633 {"ED capacity", "zbncp.data.flags.ed_cap", FT_BOOLEAN
, 8, NULL
,
5636 {&hf_zbncp_data_flags_stack_profile
,
5637 {"Stack profile", "zbncp.data.flags.stack_profile", FT_UINT8
, BASE_DEC
, NULL
,
5638 0xF0, NULL
, HFILL
}},
5640 {&hf_zbncp_data_flags16
,
5641 {"Flags", "zbncp.data.flags16", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5643 {&hf_zbncp_data_flags_zb_role
,
5644 {"Zigbee role", "zbncp.data.flags.zb_role", FT_UINT16
, BASE_HEX
, VALS(zbncp_zb_role
),
5647 {&hf_zbncp_data_flags_comp_desc_av
,
5648 {"Complex desc available", "zbncp.data.flags.comp_desc_av", FT_BOOLEAN
, 16, NULL
,
5651 {&hf_zbncp_data_flags_user_desc_av
,
5652 {"User desc available", "zbncp.data.flags.user_desc_av", FT_BOOLEAN
, 16, NULL
,
5653 0x0010, NULL
, HFILL
}},
5655 {&hf_zbncp_data_flags_freq_868
,
5656 {"868MHz BPSK Band", "zbncp.data.flags.freq.868mhz", FT_BOOLEAN
, 16, NULL
,
5657 0x0800, NULL
, HFILL
}},
5659 {&hf_zbncp_data_flags_freq_902
,
5660 {"902MHz BPSK Band", "zbncp.data.flags.freq.902mhz", FT_BOOLEAN
, 16, NULL
,
5661 0x2000, NULL
, HFILL
}},
5663 {&hf_zbncp_data_flags_freq_2400
,
5664 {"2.4GHz OQPSK Band", "zbncp.data.flags.freq.2400mhz", FT_BOOLEAN
, 16, NULL
,
5665 0x4000, NULL
, HFILL
}},
5667 {&hf_zbncp_data_flags_freq_eu_sub_ghz
,
5668 {"EU Sub-GHz FSK Band", "zbncp.data.flags.freq.eu_sub_ghz", FT_BOOLEAN
, 16, NULL
,
5669 0x8000, NULL
, HFILL
}},
5671 {&hf_zbncp_data_srv_msk
,
5672 {"Server mask", "zbncp.data.srv_msk", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5674 {&hf_zbncp_data_srv_msk_prim_tc
,
5675 {"Primary Trust Center", "zbncp.data.srv_msk.prim_tc", FT_BOOLEAN
, 16, NULL
,
5676 0x0001, NULL
, HFILL
}},
5678 {&hf_zbncp_data_srv_msk_backup_tc
,
5679 {"Backup Trust Center", "zbncp.data.srv_msk.backup_tc", FT_BOOLEAN
, 16, NULL
,
5680 0x0002, NULL
, HFILL
}},
5682 {&hf_zbncp_data_srv_msk_prim_bind_tbl_cache
,
5683 {"Primary Binding Table Cache", "zbncp.data.srv_msk.prim_bind_tbl_cache", FT_BOOLEAN
, 16, NULL
,
5684 0x0004, NULL
, HFILL
}},
5686 {&hf_zbncp_data_srv_msk_backup_bind_tbl_cache
,
5687 {"Backup Binding Table Cache", "zbncp.data.srv_msk.backup_bind_tbl_cache", FT_BOOLEAN
, 16, NULL
,
5688 0x0008, NULL
, HFILL
}},
5690 {&hf_zbncp_data_remote_bind_offset
,
5691 {"Remote Bind Offset", "zbncp.data.remote_bind_access", FT_UINT8
, BASE_HEX
, NULL
,
5693 "Remote bind offset, divides the bind table in two parts [0:remote_bind_offset) are for localbindings and "
5694 "[remote_bind_offset:tbl_size) to remote bindings",
5697 {&hf_zbncp_data_srv_msk_prim_disc_cache
,
5698 {"Primary Discovery Cache", "zbncp.data.srv_msk.prim_disc_cache", FT_BOOLEAN
, 16, NULL
,
5699 0x0010, NULL
, HFILL
}},
5701 {&hf_zbncp_data_srv_msk_backup_disc_cache
,
5702 {"Backup Discovery Cache", "zbncp.data.srv_msk.backup_disc_cache", FT_BOOLEAN
, 16, NULL
,
5703 0x0020, NULL
, HFILL
}},
5705 {&hf_zbncp_data_srv_msk_nwk_manager
,
5706 {"Network Manager", "zbncp.data.srv_msk.nwk_manager", FT_BOOLEAN
, 16, NULL
,
5707 0x0040, NULL
, HFILL
}},
5709 {&hf_zbncp_data_srv_msk_stack_compl_rev
,
5710 {"Stack Compliance Revision", "zbncp.data.srv_msk.stack_compl_rev", FT_UINT16
, BASE_DEC
, NULL
,
5711 0xFE00, NULL
, HFILL
}},
5713 {&hf_zbncp_data_ep_cnt
,
5714 {"Endpoint Count", "zbncp.data.endpoint_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5716 {&hf_zbncp_data_dst_addr_mode
,
5717 {"Dst Address Mode", "zbncp.data.dst_addr_mode", FT_UINT8
, BASE_HEX
, VALS(zbncp_aps_addr_modes
), 0x0, NULL
, HFILL
}},
5719 {&hf_zbncp_data_leave_flags
,
5720 {"Leave flags", "zbncp.data.leave_flags", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5722 {&hf_zbncp_data_leave_flags_remove_chil
,
5723 {"Remove children", "zbncp.data.leave_flags.remove_chil", FT_BOOLEAN
, 8, NULL
,
5724 0x40, NULL
, HFILL
}},
5726 {&hf_zbncp_data_leave_flags_rejoin
,
5727 {"Rejoin", "zbncp.data.leave_flags.rejoin", FT_BOOLEAN
, 8, NULL
,
5728 0x80, NULL
, HFILL
}},
5730 {&hf_zbncp_data_permit_dur
,
5731 {"Permit Duration", "zbncp.data.permit_dur", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5733 {&hf_zbncp_data_tc_sign
,
5734 {"TC Significance", "zbncp.data.tc_sign", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5736 {&hf_zbncp_data_secur_rejoin
,
5737 {"Secure Rejoin", "zbncp.data.secure_rejoin", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5739 {&hf_zbncp_data_zdo_rejoin_flags
,
5740 {"Flags", "zbncp.data.zdo_rejoin.flags", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5742 {&hf_zbncp_data_zdo_rejoin_flags_tcsw_happened
,
5743 {"Trust Center Swap-out happened", "zbncp.data.zdo_rejoin.flags.tcsw_happened", FT_BOOLEAN
, 8, NULL
,
5744 0x01, NULL
, HFILL
}},
5746 {&hf_zbncp_data_dlen8
,
5747 {"Data Length", "zbncp.data.dlen8", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5749 {&hf_zbncp_data_dlen16
,
5750 {"Data Length", "zbncp.data.dlen16", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5752 {&hf_zbncp_data_param_len
,
5753 {"Param Length", "zbncp.data.param_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5755 {&hf_zbncp_data_radius
,
5756 {"Radius", "zbncp.data.radius", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5758 {&hf_zbncp_data_time_between_disc
,
5759 {"Time between discoveries", "zbncp.data.time_between_disc", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5761 {&hf_zbncp_data_enable_flag
,
5762 {"Enable flag", "zbncp.data.enable_flag", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, "0 - to disable, 1 - to enable", HFILL
}},
5764 {&hf_zbncp_data_array
,
5765 {"Data", "zbncp.data.data_arr", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
5767 {&hf_zbncp_data_use_alias
,
5768 {"Use alias", "zbncp.data.use_alias", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5770 {&hf_zbncp_data_alias_src
,
5771 {"Alias source address", "zbncp.data.alias_src", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5773 {&hf_zbncp_data_alias_seq
,
5774 {"Alias sequence number", "zbncp.data.alias_seq", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5776 {&hf_zbncp_data_tx_opt
,
5777 {"TX Options", "zbncp.data.tx_opt", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5779 {&hf_zbncp_data_tx_opt_secur
,
5780 {"Security enabled transmission", "zbncp.data.secur", FT_BOOLEAN
, 8, NULL
,
5781 0x01, NULL
, HFILL
}},
5783 {&hf_zbncp_data_tx_opt_obsolete
,
5784 {"Obsolete", "zbncp.data.obsolete", FT_BOOLEAN
, 8, NULL
,
5785 0x02, NULL
, HFILL
}},
5787 {&hf_zbncp_data_tx_opt_ack
,
5788 {"ACK", "zbncp.data.ack", FT_BOOLEAN
, 8, NULL
,
5789 0x04, NULL
, HFILL
}},
5791 {&hf_zbncp_data_tx_opt_frag
,
5792 {"Fragmentation permitted", "zbncp.data.frag", FT_BOOLEAN
, 8, NULL
,
5793 0x08, NULL
, HFILL
}},
5795 {&hf_zbncp_data_tx_opt_inc_ext_nonce
,
5796 {"Include extended nonce", "zbncp.data.ext_nonce", FT_BOOLEAN
, 8, NULL
,
5797 0x10, NULL
, HFILL
}},
5799 {&hf_zbncp_data_tx_opt_force_mesh_route
,
5800 {"Force mesh route discovery for this request", "zbncp.data.force_mesh_route", FT_BOOLEAN
, 8, NULL
,
5801 0x20, NULL
, HFILL
}},
5803 {&hf_zbncp_data_tx_opt_send_route_record
,
5804 {"Send route record for this request", "zbncp.data.send_route_record", FT_BOOLEAN
, 8, NULL
,
5805 0x40, NULL
, HFILL
}},
5807 {&hf_zbncp_data_lqi
,
5808 {"LQI", "zbncp.data.lqi", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5810 {&hf_zbncp_data_rssi
,
5811 {"RSSI", "zbncp.data.rssi", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5813 {&hf_zbncp_data_do_cleanup
,
5814 {"Do cleanup", "zbncp.data.do_clean", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5816 {&hf_zbncp_data_max_rx_bcast
,
5817 {"max_rx_bcast", "zbncp.data.max_rx_bcast", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5819 {&hf_zbncp_data_mac_tx_bcast
,
5820 {"max_tx_bcast", "zbncp.data.max_tx_bcast", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5822 {&hf_zbncp_data_mac_rx_ucast
,
5823 {"mac_rx_ucast", "zbncp.data.mac_rx_ucast", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5825 {&hf_zbncp_data_mac_tx_ucast_total_zcl
,
5826 {"mac_tx_ucast_total_zcl", "zbncp.data.mac_tx_ucast_total_zcl", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5828 {&hf_zbncp_data_mac_tx_ucast_failures_zcl
,
5829 {"mac_tx_ucast_failures_zcl", "zbncp.data.mac_tx_ucast_failures_zcl", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5831 {&hf_zbncp_data_mac_tx_ucast_retries_zcl
,
5832 {"mac_tx_ucast_retries_zcl", "zbncp.data.mac_tx_ucast_retries_zcl", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5834 {&hf_zbncp_data_mac_tx_ucast_total
,
5835 {"mac_tx_ucast_total", "zbncp.data.mac_tx_ucast_total", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5837 {&hf_zbncp_data_mac_tx_ucast_failures
,
5838 {"mac_tx_ucast_failures", "zbncp.data.mac_tx_ucast_failures", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5840 {&hf_zbncp_data_mac_tx_ucast_retries
,
5841 {"mac_tx_ucast_retries", "zbncp.data.mac_tx_ucast_retries", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5843 {&hf_zbncp_data_mac_validate_drop_cnt
,
5844 {"mac_validate_drop_cnt", "zbncp.data.mac_validate_drop_cnt", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5846 {&hf_zbncp_data_mac_phy_cca_fail_count
,
5847 {"phy_cca_fail_count", "zbncp.data.phy_cca_fail_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5849 {&hf_zbncp_data_phy_to_mac_que_lim_reached
,
5850 {"phy_to_mac_que_lim_reached", "zbncp.data.phy_to_mac_que_lim_reached", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5852 {&hf_zbncp_data_period_of_time
,
5853 {"period_of_time", "zbncp.data.period_of_time", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5855 {&hf_zbncp_data_last_msg_lqi
,
5856 {"last_msg_lqi", "zbncp.data.last_msg_lqi", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5858 {&hf_zbncp_data_last_msg_rssi
,
5859 {"last_msg_rssi", "zbncp.data.last_msg_rssi", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5861 {&hf_zbncp_data_number_of_resets
,
5862 {"number_of_resets", "zbncp.data.number_of_resets", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5864 {&hf_zbncp_data_aps_tx_bcast
,
5865 {"aps_tx_bcast", "zbncp.data.aps_tx_bcast", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5867 {&hf_zbncp_data_aps_tx_ucast_success
,
5868 {"aps_tx_ucast_success", "zbncp.data.aps_tx_ucast_success", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5870 {&hf_zbncp_data_aps_tx_ucast_retry
,
5871 {"aps_tx_ucast_retry", "zbncp.data.aps_tx_ucast_retry", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5873 {&hf_zbncp_data_aps_tx_ucast_fail
,
5874 {"aps_tx_ucast_fail", "zbncp.data.aps_tx_ucast_fail", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5876 {&hf_zbncp_data_route_disc_initiated
,
5877 {"route_disc_initiated", "zbncp.data.route_disc_initiated", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5879 {&hf_zbncp_data_nwk_neighbor_added
,
5880 {"nwk_neighbor_added", "zbncp.data.nwk_neighbor_added", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5882 {&hf_zbncp_data_nwk_neighbor_removed
,
5883 {"nwk_neighbor_removed", "zbncp.data.nwk_neighbor_removed", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5885 {&hf_zbncp_data_nwk_neighbor_stale
,
5886 {"nwk_neighbor_stale", "zbncp.data.nwk_neighbor_stale", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5888 {&hf_zbncp_upd_status_code
,
5889 {"Device update status code", "zbncp.data.dev_upd_status_code", FT_UINT8
, BASE_DEC
, VALS(zbncp_dev_update_status_code
), 0x0, NULL
, HFILL
}},
5891 {&hf_zbncp_data_join_indication
,
5892 {"join_indication", "zbncp.data.join_indication", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5894 {&hf_zbncp_data_childs_removed
,
5895 {"childs_removed", "zbncp.data.childs_removed", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5897 {&hf_zbncp_data_nwk_fc_failure
,
5898 {"nwk_fc_failure", "zbncp.data.nwk_fc_failure", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5900 {&hf_zbncp_data_aps_unauthorized_key
,
5901 {"aps_unauthorized_key", "zbncp.data.aps_unauthorized_key", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5903 {&hf_zbncp_data_nwk_decrypt_failure
,
5904 {"nwk_decrypt_failure", "zbncp.data.nwk_decrypt_failure", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5906 {&hf_zbncp_data_aps_decrypt_failure
,
5907 {"aps_decrypt_failure", "zbncp.data.aps_decrypt_failure", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5909 {&hf_zbncp_data_packet_buffer_allocate_failures
,
5910 {"packet_buffer_allocate_failures", "zbncp.data.packet_buffer_allocate_failures", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5912 {&hf_zbncp_data_average_mac_retry_per_aps_message_sent
,
5913 {"average_mac_retry_per_aps_message_sent", "zbncp.data.avg_mac_retry", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5915 {&hf_zbncp_data_aps_fc_failure
,
5916 {"aps_fc_failure", "zbncp.data.aps_fc_failure", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5918 {&hf_zbncp_data_nwk_retry_overflow
,
5919 {"nwk_retry_overflow", "zbncp.data.nwk_retry_overflow", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5921 {&hf_zbncp_data_nwk_bcast_table_full
,
5922 {"nwk_bcast_table_full", "zbncp.data.nwk_bcast_table_full", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5924 {&hf_zbncp_data_status
,
5925 {"status", "zbncp.data.status", FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5927 {&hf_zbncp_zdo_auth_type
,
5928 {"Authorization type", "zbncp.data.zdo_auth_type", FT_UINT8
, BASE_DEC
, VALS(zbncp_zdo_auth_types
), 0x0, NULL
, HFILL
}},
5930 {&hf_zbncp_zdo_leg_auth_status_code
,
5931 {"Status code", "zbncp.data.zdo_status_code", FT_UINT8
, BASE_DEC
, VALS(zbncp_zdo_leg_auth_status_codes
), 0x0, NULL
, HFILL
}},
5933 {&hf_zbncp_zdo_tclk_auth_status_code
,
5934 {"Status code", "zbncp.data.zdo_status_code", FT_UINT8
, BASE_DEC
, VALS(zbncp_zdo_tclk_auth_status_codes
), 0x0, NULL
, HFILL
}},
5936 {&hf_zbncp_zdo_server_mask
,
5937 {"Server mask", "zbncp.data.zdo_serv_mask", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5939 {&hf_zbncp_zdo_start_entry_idx
,
5940 {"Start entry index", "zbncp.data.zdo_start_idx", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5942 {&hf_zbncp_zdo_scan_duration
,
5943 {"Scan duration", "zbncp.data.zdo_scan_duration", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5945 {&hf_zbncp_zdo_scan_cnt
,
5946 {"Scan count", "zbncp.data.zdo_scan_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5948 {&hf_zbncp_zdo_scan_mgr_addr
,
5949 {"Manager NWK address", "zbncp.data.zdo_mgr_addr", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5951 {&hf_zbncp_data_aps_cnt
,
5952 {"APS counter", "zbncp.data.aps_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5954 {&hf_zbncp_data_aps_fc
,
5955 {"APS FC", "zbncp.data.aps_fc", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5957 {&hf_zbncp_data_aps_fc_deliv_mode
,
5958 {"Delivery mode", "zbncp.data.aps_fc.deliv_mode", FT_UINT8
, BASE_DEC
, VALS(zbncp_deliv_mode
),
5959 0x0C, NULL
, HFILL
}},
5961 {&hf_zbncp_data_aps_fc_secur
,
5962 {"Security", "zbncp.data.aps_fc.secur", FT_BOOLEAN
, 8, NULL
,
5963 0x20, NULL
, HFILL
}},
5965 {&hf_zbncp_data_aps_fc_ack_retrans
,
5966 {"ACK & retransmit", "zbncp.data.aps_fc.ack_retrans", FT_BOOLEAN
, 8, NULL
,
5967 0x40, NULL
, HFILL
}},
5969 {&hf_zbncp_data_aps_key_attr
,
5970 {"APS key source & attr", "zbncp.data.aps_key_attr", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
5972 {&hf_zbncp_data_aps_key_attr_key_src
,
5973 {"Key source", "zbncp.data.aps_key_attr.key_src", FT_UINT8
, BASE_HEX
, VALS(zbncp_aps_key_src
),
5976 {&hf_zbncp_data_aps_key_attr_key_used
,
5977 {"Key used", "zbncp.data.aps_key_attr.key_used", FT_UINT8
, BASE_HEX
, VALS(zbncp_aps_key_used
),
5980 {&hf_zbncp_data_pkt_len
,
5981 {"Packet length", "zbncp.data.pkt_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5983 {&hf_zbncp_data_pkt
,
5984 {"Packet", "zbncp.data.pkt", FT_UINT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5986 {&hf_zbncp_data_scan_dur
,
5987 {"Scan Duration", "zbncp.data.scan_dur", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5989 {&hf_zbncp_data_distr_nwk_flag
,
5990 {"Distributed Network Flag", "zbncp.data.distr_nwk_flag", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
5992 {&hf_zbncp_data_nwk_count
,
5993 {"Network Count", "zbncp.data.nwk_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5995 {&hf_zbncp_data_nwk_upd_id
,
5996 {"NWK Update ID", "zbncp.data.nwk_upd_id", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
5998 {&hf_zbncp_data_rejoin
,
5999 {"Rejoin", "zbncp.data.rejoin", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6001 {&hf_zbncp_data_rejoin_nwk
,
6002 {"Rejoin Network", "zbncp.data.rejoin_nwk", FT_UINT8
, BASE_DEC
, VALS(zbncp_rejoin_nwk
), 0x0, NULL
, HFILL
}},
6004 {&hf_zbncp_data_secur_en
,
6005 {"Security Enable", "zbncp.data.secur_en", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6007 {&hf_zbncp_data_enh_beacon
,
6008 {"Enhanced Beacon", "zbncp.data.enh_beacon", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6010 {&hf_zbncp_data_beacon_type
,
6011 {"Beacon Type", "zbncp.data.beacon_type", FT_UINT8
, BASE_DEC
, VALS(zbncp_beacon_type
), 0x0, NULL
, HFILL
}},
6013 {&hf_zbncp_data_beacon_order
,
6014 {"Beacon Order", "zbncp.data.becon_order", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6016 {&hf_zbncp_data_superframe_order
,
6017 {"Superframe Order", "zbncp.data.superframe_order", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6019 {&hf_zbncp_data_battery_life_ext
,
6020 {"Battery Life Extension", "zbncp.data.battery_life_ext", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6022 {&hf_zbncp_data_mac_if
,
6023 {"MAC interface #", "zbncp.data.mac_if", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6025 {&hf_zbncp_data_ed_config
,
6026 {"ED config", "zbncp.data.ed_cfg", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6028 {&hf_zbncp_data_timeout_cnt
,
6029 {"Timeout Counter", "zbncp.data.timeout_cnt", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6031 {&hf_zbncp_data_keepalive_mode
,
6032 {"Keepalive mode", "zbncp.data.keepalive", FT_UINT8
, BASE_DEC
, VALS(zbncp_keepalive_mode
), 0x0, NULL
, HFILL
}},
6034 {&hf_zbncp_data_dev_timeout
,
6035 {"Device Timeout", "zbncp.data.dev_timeout", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6037 {&hf_zbncp_data_relationship
,
6038 {"Relationship", "zbncp.data.relationship", FT_UINT8
, BASE_HEX
, VALS(zbncp_relationship
), 0x0, NULL
, HFILL
}},
6040 {&hf_zbncp_data_tx_fail_cnt
,
6041 {"Transmit Failure Cnt", "zbncp.data.tx_fail_cnt", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6043 {&hf_zbncp_data_out_cost
,
6044 {"Outgoing Cost", "zbncp.data.out_cost", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6046 {&hf_zbncp_data_age
,
6047 {"Age", "zbncp.data.age", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6049 {&hf_zbncp_data_trace_mask
,
6050 {"Trace mask", "zbncp.data.trace_mask", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6052 {&hf_zbncp_data_trace_wireless_traf
,
6053 {"Wireless traffic", "zbncp.data.trace_wireless_traf", FT_UINT32
, BASE_DEC
, NULL
, 0x1, NULL
, HFILL
}},
6055 {&hf_zbncp_data_trace_reserved
,
6056 {"Reserved", "zbncp.data.trace_reserved", FT_UINT32
, BASE_DEC
, NULL
, 0x2, NULL
, HFILL
}},
6058 {&hf_zbncp_data_trace_ncp_ll_proto
,
6059 {"NCP LL protocol", "zbncp.data.trace_ncp_ll_proto", FT_UINT32
, BASE_DEC
, NULL
, 0x4, NULL
, HFILL
}},
6061 {&hf_zbncp_data_trace_host_int_line
,
6062 {"HOST INT line", "zbncp.data.trace_host_int_line", FT_UINT32
, BASE_DEC
, NULL
, 0x8, NULL
, HFILL
}},
6064 {&hf_zbncp_data_trace_sleep_awake
,
6065 {"Sleep/awake", "zbncp.data.trace_sleep_awake", FT_UINT32
, BASE_DEC
, NULL
, 0x10, NULL
, HFILL
}},
6067 {&hf_zbncp_data_trace_input_output
,
6068 {"Input/Output trace", "zbncp.data.trace_input_output", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6070 {&hf_zbncp_data_trace_timestamp
,
6071 {"Trace timestamp in beacon intervals", "zbncp.data.trace_timestamp", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6073 {&hf_zbncp_data_trace
,
6074 {"Raw trace data", "zbncp.data.trace", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6076 {&hf_zbncp_data_key_neg_method
,
6077 {"Key Negotiation Methods Mask", "zbncp.data.key_neg_method", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6079 {&hf_zbncp_data_psk_secrets
,
6080 {"PSK Secrets Mask", "zbncp.data.psk_secrets", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6082 {&hf_zbncp_data_r22_join_usage
,
6083 {"Use r22 join procedure", "zbncp.data.r22_join_usage", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6085 {&hf_zbncp_data_nwk_conf_preset
,
6086 {"Network preset configuration", "zbncp.data.nwk_conf_preset", FT_UINT8
, BASE_HEX
, VALS(zbncp_nwk_conf_behavior
), 0x0, NULL
, HFILL
}},
6088 {&hf_zbncp_data_short_address
,
6089 {"Short Network address", "zbncp.data.short_address", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6091 {&hf_zbncp_data_raw_data
,
6092 {"Raw data", "zbncp.data.raw_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6094 {&hf_zbncp_data_conf_params
,
6095 {"Configuration parameters", "zbncp.data.conf_params", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6097 /* Configuration Parameter Fields */
6098 {&hf_zbncp_data_conf_params_reserved
,
6099 {"Reserved", "zbncp.data.reserved", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_RESERVED
,
6100 "Whether this device can act as a PAN coordinator or not.", HFILL
}},
6102 {&hf_zbncp_data_conf_params_disable_pan_id_change
,
6103 {"Disable PAN ID Change", "zbncp.data.conf_params.disable_pan_id_change", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_DIS_PANID_CHANGE
, "", HFILL
}},
6105 {&hf_zbncp_data_conf_params_disable_channel_change
,
6106 {"Disable Channel Change", "zbncp.data.conf_params.disable_channel_change", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_DIS_CHAN_CHANGE
, "", HFILL
}},
6108 {&hf_zbncp_data_conf_params_leave_request_allowed
,
6109 {"Leave Requests Allowed", "zbncp.data.conf_params.leave_request_allowed", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_LEAVE_REQ_ALLOW
, "", HFILL
}},
6111 {&hf_zbncp_data_conf_params_require_tclk
,
6112 {"Require Link Key for Transport Key transmission", "zbncp.data.conf_params.require_tclk", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_REQ_TCLK
, "", HFILL
}},
6114 {&hf_zbncp_data_conf_params_restricted_enabled
,
6115 {"Restricted Mode Enabled", "zbncp.data.conf_params.restricted_enabled", FT_BOOLEAN
, 8, NULL
, CONF_PARAMS_RESTRICT_MODE_EN
, "", HFILL
}},
6117 {&hf_zbncp_data_channel_page_count
,
6118 {"Channel Page Count", "zbncp.data.channel_page_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6120 {&hf_zbncp_data_config_mask
,
6121 {"Configuration mask", "zbncp.data.config_mask", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6123 {&hf_zbncp_data_dest_short_address
,
6124 {"Destination Short Network address", "zbncp.data.short_address", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6126 {&hf_zbncp_data_current_parents_short_address
,
6127 {"Current Parents Short Address", "zbncp.data.current_parents_short_address", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6129 {&hf_zbncp_data_current_parents_lqi
,
6130 {"Current Parents' LQI", "zbncp.data.current_parents_lqi", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6132 {&hf_zbncp_data_potential_parent_count
,
6133 {"Potential Parent Count", "zbncp.data.potential_parent_count", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6135 {&hf_zbncp_data_classification_mask
,
6136 {"Classification Mask", "zbncp.data.classification_mask", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6138 {&hf_zbncp_data_total_beacons_surveyed
,
6139 {"Total Beacons Surveyed", "zbncp.data.total_beacons_surveyed", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6141 {&hf_zbncp_data_current_pan_id_beacons
,
6142 {"Number of Beacons with Current PAN ID", "zbncp.data.current_pan_id_beacons", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6144 {&hf_zbncp_data_current_nwk_potential_parents
,
6145 {"Number of potential parents from current Zigbee Network", "zbncp.data.current_nwk_potential_parents", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6147 {&hf_zbncp_data_other_zigbee_beacons
,
6148 {"Number of Other Zigbee Beacons", "zbncp.data.other_zigbee_beacons", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6150 {&hf_zbncp_data_pan_id_conflict_tlv
,
6151 {"PAN ID Conflict TLV", "zbncp.data.pan_id_conflict_tlv", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6153 {&hf_zbncp_data_eui64_count
,
6154 {"Amount of EUI64s'", "zbncp.data.eui64_count", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6156 {&hf_zbncp_data_eui64
,
6157 {"EUI64", "zbncp.data.eui64", FT_EUI64
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6159 {&hf_zbncp_data_initial_join_auth
,
6160 {"Initial Join Auth", "zbncp.data.initial_join_auth", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6162 {&hf_zbncp_data_key_update_method
,
6163 {"Key Update Method", "zbncp.data.key_update_method", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6165 {&hf_zbncp_data_next_pan_id_change
,
6166 {"Next PAN Id Change", "zbncp.data.next_pan_id_change", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6168 {&hf_zbncp_data_next_channel_change
,
6169 {"Next Channel Change", "zbncp.data.next_channel_change", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6171 {&hf_zbncp_data_error_count
,
6172 {"Error Count", "zbncp.data.error_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6174 {&hf_zbncp_data_keepalive_rec
,
6175 {"Keepalive Received", "zbncp.data.keepalive_rec", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6177 {&hf_zbncp_data_mac_if_idx
,
6178 {"MAC Interface Index", "zbncp.data.mac_if_idx", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6180 {&hf_zbncp_data_fast_poll_int
,
6181 {"Fast Poll Interval", "zbncp.data.fast_poll", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6183 {&hf_zbncp_data_long_poll_int
,
6184 {"Long Poll Interval", "zbncp.data.long_poll", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6186 {&hf_zbncp_data_fast_poll_flag
,
6187 {"Fast Poll Flag", "zbncp.data.fast_poll_flag", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6189 {&hf_zbncp_data_stop_fast_poll_result
,
6190 {"Stop Fast Poll Result", "zbncp.data.stop_fast_poll_result", FT_UINT8
, BASE_HEX
, VALS(zbncp_stop_fast_poll_result
), 0x0, NULL
, HFILL
}},
6192 {&hf_zbncp_data_time
,
6193 {"Time", "zbncp.data.time", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6195 {&hf_zbncp_data_pan_id_cnt
,
6196 {"Pan ID count", "zbncp.data.pan_id_cnt", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6199 {"Install Code", "zbncp.data.ic", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6201 {&hf_zbncp_data_ic_table_size
,
6202 {"IC Table Size", "zbncp.data.table_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6204 {&hf_zbncp_data_ic_ent_cnt
,
6205 {"Entry Count", "zbncp.data.entry_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6208 {"Suite", "zbncp.data.cs", FT_UINT8
, BASE_DEC
, VALS(zbncp_cs
), 0, NULL
, HFILL
}},
6210 {&hf_zbncp_data_ca_pub_key
,
6211 {"CA Public Key", "zbncp.data.ca_pub_key", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6213 {&hf_zbncp_data_ca_priv_key
,
6214 {"Device Private Key", "zbncp.data.ca_priv_key", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6216 {&hf_zbncp_data_cert
,
6217 {"Certificate", "zbncp.data.cert", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6219 {&hf_zbncp_data_issuer
,
6220 {"Issuer", "zbncp.data.issuer", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6222 {&hf_zbncp_data_ic_en
,
6223 {"Enable IC", "zbncp.data.ic_en", FT_BOOLEAN
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6225 {&hf_zbncp_data_key_type
,
6226 {"Key type", "zbncp.data.key_type", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6228 {&hf_zbncp_data_tx_power
,
6229 {"TX Power", "zbncp.data.tx_power", FT_INT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6231 {&hf_zbncp_data_tx_time
,
6232 {"TX Time", "zbncp.data.tx_time", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6234 {&hf_zbncp_data_seed
,
6235 {"Seed", "zbncp.data.seed", FT_INT16
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6237 {&hf_zbncp_data_link_key
,
6238 {"Link Key", "zbncp.data.link_key", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6240 {&hf_zbncp_data_aps_link_key_type
,
6241 {"APS Link Key Type", "zbncp.data.link_key_type", FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6243 {&hf_zbncp_data_key_src
,
6244 {"Key source", "zbncp.data.key_src", FT_UINT8
, BASE_DEC
, VALS(zbncp_key_src
), 0, NULL
, HFILL
}},
6246 {&hf_zbncp_data_key_attr
,
6247 {"Key attributes", "zbncp.data.key_attr", FT_UINT8
, BASE_DEC
, VALS(zbncp_key_attr
), 0, NULL
, HFILL
}},
6249 {&hf_zbncp_data_out_frame_cnt
,
6250 {"Outgoing frame counter", "zbncp.data.out_cnt", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6252 {&hf_zbncp_data_inc_frame_cnt
,
6253 {"Incoming frame counter", "zbncp.data.inc_cnt", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6255 {&hf_zbncp_data_dump_type
,
6256 {"Dump Type", "zbncp.data.dump_type", FT_UINT8
, BASE_DEC
, VALS(zbncp_dump_type
), 0, NULL
, HFILL
}},
6258 {&hf_zbncp_data_dump_text
,
6259 {"Dump", "zbncp.data.dump_text", FT_STRING
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6261 {&hf_zbncp_data_dump_bin
,
6262 {"Dump", "zbncp.data.dump_bin", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6264 {&hf_zbncp_data_offset
,
6265 {"Offset", "zbncp.data.offset", FT_UINT16
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6267 {&hf_zbncp_data_do_erase
,
6268 {"Do erase", "zbncp.data.do_erase", FT_BOOLEAN
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6270 {&hf_zbncp_data_calibration_status
,
6271 {"Calibration status", "zbncp.data.calibration_status", FT_UINT8
, BASE_HEX
, VALS(zbncp_calibration_status
), 0, NULL
, HFILL
}},
6273 {&hf_zbncp_data_calibration_value
,
6274 {"Calibration value", "zbncp.data.calibration_value", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6276 {&hf_zbncp_data_zgp_key_type
,
6277 {"Key type", "zbncp.data.zgp_key_type", FT_UINT8
, BASE_HEX
, VALS(zbncp_zgp_key_types
), 0, NULL
, HFILL
}},
6279 {&hf_zbncp_data_zgp_link_key
,
6280 {"Link key", "zbncp.data.zgp_link_key", FT_UINT16
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6282 {&hf_zbncp_data_prod_conf_hdr_crc
,
6283 {"Production config crc", "zbncp.data.prod_conf.hdr.crc", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6285 {&hf_zbncp_data_prod_conf_hdr_len
,
6286 {"Length (with application section)", "zbncp.data.prod_conf.hdr.len", FT_UINT16
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6288 {&hf_zbncp_data_prod_conf_hdr_version
,
6289 {"Version", "zbncp.data.prod_conf.hdr.version", FT_UINT16
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6291 {&hf_zbncp_data_prod_conf_body
,
6292 {"Production config body", "zbncp.data.prod_conf.body", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
6294 /* ZBOSS NCP dump */
6295 {&hf_zbncp_dump_preamble
,
6296 {"ZBNCP Dump preamble", "zbncp.dump.preamble", FT_STRING
, BASE_NONE
, NULL
, 0x0,
6299 {&hf_zbncp_dump_version
,
6300 {"ZBNCP Dump version", "zbncp.dump.version", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6302 {&hf_zbncp_dump_type
,
6303 {"Frame type", "zbncp.dump.ftype", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
6306 {&hf_zbncp_dump_options
,
6307 {"Options", "zbncp.dump.options", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
6310 {&hf_zbncp_dump_options_dir
,
6311 {"Direction", "zbncp.dump.options.direction", FT_BOOLEAN
, 8, NULL
, ZBNCP_DUMP_DIR_MASK
,
6314 {&hf_zbncp_dump_options_int_state
,
6315 {"HOST INT", "zbncp.dump.options.int_state", FT_BOOLEAN
, 8, NULL
, ZBNCP_DUMP_HOST_INT_DUMP_MASK
,
6318 {&hf_zbncp_dump_options_tx_conflict
,
6319 {"Potential TX/TX conflict", "zbncp.dump.options.tx_conflict", FT_BOOLEAN
, 8, NULL
, ZBNCP_DUMP_POTENTIAL_TX_RX_ERROR_MASK
,
6322 /* Capability Information Fields */
6324 {&hf_ieee802154_cinfo_alt_coord
,
6325 {"Alternate PAN Coordinator", "zbncp.wpan.cinfo.alt_coord", FT_BOOLEAN
, 8, NULL
, IEEE802154_CMD_CINFO_ALT_PAN_COORD
,
6326 "Whether this device can act as a PAN coordinator or not.", HFILL
}},
6328 {&hf_ieee802154_cinfo_device_type
,
6329 {"Device Type", "zbncp.wpan.cinfo.device_type", FT_BOOLEAN
, 8, TFS(&tfs_cinfo_device_type
), IEEE802154_CMD_CINFO_DEVICE_TYPE
,
6330 "Whether this device is RFD (reduced-function device) or FFD (full-function device).", HFILL
}},
6332 {&hf_ieee802154_cinfo_power_src
,
6333 {"Power Source", "zbncp.wpan.cinfo.power_src", FT_BOOLEAN
, 8, TFS(&tfs_cinfo_power_src
), IEEE802154_CMD_CINFO_POWER_SRC
,
6334 "Whether this device is operating on AC/mains or battery power.", HFILL
}},
6336 {&hf_ieee802154_cinfo_idle_rx
,
6337 {"Receive On When Idle", "zbncp.wpan.cinfo.idle_rx", FT_BOOLEAN
, 8, NULL
, IEEE802154_CMD_CINFO_IDLE_RX
,
6338 "Whether this device can receive packets while idle or not.", HFILL
}},
6340 {&hf_ieee802154_cinfo_sec_capable
,
6341 {"Security Capability", "zbncp.wpan.cinfo.sec_capable", FT_BOOLEAN
, 8, NULL
, IEEE802154_CMD_CINFO_SEC_CAPABLE
,
6342 "Whether this device is capable of receiving encrypted packets.", HFILL
}},
6344 {&hf_ieee802154_cinfo_alloc_addr
,
6345 {"Allocate Address", "zbncp.wpan.cinfo.alloc_addr", FT_BOOLEAN
, 8, NULL
, IEEE802154_CMD_CINFO_ALLOC_ADDR
,
6346 "Whether this device wishes to use a 16-bit short address instead of its IEEE 802.15.4 64-bit long address.", HFILL
}}};
6348 /* Protocol subtrees */
6352 &ett_zbncp_hdr_flags
,
6356 &ett_zbncp_data_in_cl_list
,
6357 &ett_zbncp_data_out_cl_list
,
6358 &ett_zbncp_data_mac_cap
,
6359 &ett_zbncp_data_pwr_src
,
6360 &ett_zbncp_data_cur_pwr_src
,
6361 &ett_zbncp_data_asoc_nwk_list
,
6362 &ett_zbncp_data_pwr_desc
,
6363 &ett_zbncp_data_desc_cap
,
6364 &ett_zbncp_data_flags
,
6365 &ett_zbncp_data_server_mask
,
6366 &ett_zbncp_data_ep_list
,
6367 &ett_zbncp_data_leave_flags
,
6368 &ett_zbncp_data_tx_opt
,
6369 &ett_zbncp_data_zdo_rejoin_flags
,
6370 &ett_zbncp_data_apc_fc
,
6371 &ett_zbncp_data_prod_conf_hdr
,
6372 &ett_zbncp_data_aps_key_attr
,
6373 &ett_zbncp_data_ch_list
,
6374 &ett_zbncp_data_channel
,
6375 &ett_zbncp_data_nwk_descr
,
6376 &ett_zbncp_data_cmd_opt
,
6377 &ett_zbncp_data_joind_bitmask
,
6378 &ett_zbncp_data_trace_bitmask
,
6379 &ett_zbncp_data_conf_params
,
6384 zbncp_frame
= proto_register_protocol("ZBOSS Network Coprocessor product", "ZB NCP",
6387 proto_register_field_array(zbncp_frame
, hf_zbncp_phy
, array_length(hf_zbncp_phy
));
6388 proto_register_subtree_array(ett
, array_length(ett
));
6390 zbncp_handle
= register_dissector("zbncp", dissect_zbncp
, proto_zbncp
);
6391 } /* proto_register_zbncp */
6393 void proto_reg_handoff_zbncp(void)
6395 dissector_add_uint("wtap_encap", WTAP_ENCAP_ZBNCP
, zbncp_handle
);