Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-zbee-zdp-management.c
blob14c0d82218aff98172d2f1478cb482db9b0db7b7
1 /* packet-zbee-zdp-management.c
2 * Dissector helper routines for the management services of the ZigBee Device Profile
3 * By Owen Kirby <osk@exegin.com>
4 * Copyright 2009 Exegin Technologies Limited
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 /* Include Files */
14 #include "config.h"
16 #include <epan/packet.h>
17 #include <epan/addr_resolv.h>
19 #include "packet-zbee.h"
20 #include "packet-zbee-zdp.h"
21 #include "packet-zbee-tlv.h"
23 /**************************************
24 * HELPER FUNCTIONS
25 **************************************
27 /**
28 *Parses and displays a single network descriptor
30 *@param tvb pointer to buffer containing raw packet.
31 *@param tree pointer to data tree Wireshark uses to display packet.
33 static void
34 zdp_parse_nwk_desc(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint8_t version)
36 proto_tree *network_tree;
37 proto_item *ti;
39 uint8_t beacon;
41 if (version >= ZBEE_VERSION_2007) {
42 network_tree = proto_tree_add_subtree(tree, tvb, *offset, 12, ett_zbee_zdp_nwk_desc, NULL, "Network descriptor");
43 /* Extended PAN Identifiers are used in ZigBee 2006 & later. */
44 proto_tree_add_item(network_tree, hf_zbee_zdp_pan_eui64, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
45 *offset += 8;
47 else {
48 network_tree = proto_tree_add_subtree(tree, tvb, *offset, 6, ett_zbee_zdp_nwk_desc, NULL, "Network descriptor");
49 /* Short PAN Identifiers are used in ZigBee 2003 and earlier. */
50 proto_tree_add_item(network_tree, hf_zbee_zdp_pan_uint, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
51 *offset += 2;
54 proto_tree_add_item(network_tree, hf_zbee_zdp_channel, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
55 *offset += 1;
57 proto_tree_add_item(network_tree, hf_zbee_zdp_profile, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
58 proto_tree_add_item(network_tree, hf_zbee_zdp_profile_version, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
59 *offset += 1;
61 ti = proto_tree_add_item(network_tree, hf_zbee_zdp_beacon, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
62 proto_tree_add_item(network_tree, hf_zbee_zdp_superframe, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
63 beacon = tvb_get_uint8(tvb, *offset) & 0x0f;
64 if (beacon == 0xf) {
65 proto_item_append_text(ti, " (Beacons Disabled)");
67 *offset += 1;
69 proto_tree_add_item(network_tree, hf_zbee_zdp_permit_joining, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
70 *offset += 1;
72 } /* zdp_parse_nwk_desc */
74 /**
75 *Parses and displays a neighbor table entry.
77 *@param tvb pointer to buffer containing raw packet.
78 *@param tree pointer to data tree Wireshark uses to display packet.
80 static void
81 zdp_parse_neighbor_table_entry(proto_tree *tree, tvbuff_t *tvb, unsigned *offset, uint8_t version)
83 proto_tree *table_tree;
84 proto_item *ti = NULL;
85 unsigned len = 0;
87 if (version >= ZBEE_VERSION_2007) {
88 table_tree = proto_tree_add_subtree(tree, tvb, *offset, 8, ett_zbee_zdp_table_entry, &ti, "Table Entry");
89 /* ZigBee 2006 & later use an extended PAN Identifier. */
90 proto_tree_add_item(table_tree, hf_zbee_zdp_extended_pan, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
91 len += 8;
93 else {
94 table_tree = proto_tree_add_subtree(tree, tvb, *offset, 2, ett_zbee_zdp_table_entry, &ti, "Table Entry");
95 /* ZigBee 2003 & earlier use a short PAN Identifier. */
96 proto_tree_add_item(table_tree, hf_zbee_zdp_pan_uint, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
97 len += 2;
100 proto_tree_add_item(table_tree, hf_zbee_zdp_ext_addr, tvb, *offset + len, 8, ENC_LITTLE_ENDIAN);
101 len += 8;
103 proto_tree_add_item(table_tree, hf_zbee_zdp_addr, tvb, *offset + len, 2, ENC_LITTLE_ENDIAN);
104 len += 2;
106 if (version >= ZBEE_VERSION_2007) {
107 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_type, tvb, *offset + len, 1, ENC_NA);
108 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_idle_rx_0c, tvb, *offset + len, 1, ENC_NA);
109 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_relationship_70, tvb, *offset + len, 1, ENC_NA);
111 else {
112 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_type, tvb, *offset + len, 1, ENC_NA);
113 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_idle_rx_04, tvb, *offset + len, 1, ENC_NA);
114 proto_tree_add_item(table_tree, hf_zbee_zdp_table_entry_relationship_18, tvb, *offset + len, 1, ENC_NA);
116 len += 1;
118 if (version <= ZBEE_VERSION_2004) {
119 /* In ZigBee 2003 & earlier, the depth field is before the permit joining field. */
120 proto_tree_add_item(table_tree, hf_zbee_zdp_depth, tvb, *offset + len, 1, ENC_NA);
121 len += 1;
124 proto_tree_add_item(table_tree, hf_zbee_zdp_permit_joining_03, tvb, *offset + len, 1, ENC_NA);
125 len += 1;
127 if (version >= ZBEE_VERSION_2007) {
128 /* In ZigBee 2006 & later, the depth field is after the permit joining field. */
129 proto_tree_add_item(table_tree, hf_zbee_zdp_depth, tvb, *offset + len, 1, ENC_NA);
130 len += 1;
133 proto_tree_add_item(table_tree, hf_zbee_zdp_lqi, tvb, *offset + len, 1, ENC_NA);
134 len += 1;
136 if (tree) proto_item_set_len(ti, len);
137 *offset += len;
138 } /* zdp_parse_neighbor_table_entry */
141 *Parses and displays a routing table entry.
143 *@param tvb pointer to buffer containing raw packet.
144 *@param tree pointer to data tree Wireshark uses to display packet.
146 static void
147 zdp_parse_routing_table_entry(proto_tree *tree, tvbuff_t *tvb, unsigned *offset)
149 unsigned len = 0;
150 proto_item *ti;
151 proto_tree *field_tree;
152 uint16_t dest;
153 uint8_t status;
154 uint16_t next;
156 ti = proto_tree_add_item(tree, hf_zbee_zdp_rtg_entry, tvb, *offset + len, 2 + 1 + 2, ENC_NA);
157 field_tree = proto_item_add_subtree(ti, ett_zbee_zdp_rtg);
159 proto_tree_add_item(field_tree, hf_zbee_zdp_rtg_destination, tvb, *offset + len, 2, ENC_LITTLE_ENDIAN);
160 dest = tvb_get_letohs(tvb, *offset + len);
161 len += 2;
163 proto_tree_add_item(field_tree, hf_zbee_zdp_rtg_status, tvb, *offset + len , 1, ENC_LITTLE_ENDIAN);
164 status = tvb_get_uint8(tvb, *offset + len);
165 len += 1;
167 proto_tree_add_item(field_tree, hf_zbee_zdp_rtg_next_hop, tvb, *offset + len , 2, ENC_LITTLE_ENDIAN);
168 next = tvb_get_letohs(tvb, *offset + len);
169 len += 2;
171 /* Display the next hop first, because it looks a lot cleaner that way. */
172 proto_item_append_text(ti, " {Destination: 0x%04x, Next Hop: 0x%04x, Status: %s}", dest, next, val_to_str_const(status, zbee_zdp_rtg_status_vals, "Unknown"));
173 *offset += len;
174 } /* zdp_parse_routing_table_entry */
177 /**************************************
178 * MANAGEMENT REQUESTS
179 **************************************
182 *ZigBee Device Profile dissector for the network discovery
184 *@param tvb pointer to buffer containing raw packet.
185 *@param pinfo pointer to packet information fields
186 *@param tree pointer to data tree Wireshark uses to display packet.
188 void
189 dissect_zbee_zdp_req_mgmt_nwk_disc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int hf_channel)
191 proto_item *ti;
192 unsigned i;
194 unsigned offset = 0;
195 uint32_t channels;
197 /* Get the channel bitmap. */
198 channels = tvb_get_letohl(tvb, offset);
199 if (tree) {
200 bool first = 1;
201 ti = proto_tree_add_uint_format(tree, hf_channel, tvb, offset, 4, channels, "Scan Channels: ");
203 for (i=0; i<27; i++) {
204 if (channels & (1<<i)) {
205 if (first) proto_item_append_text(ti, "%d", i);
206 else proto_item_append_text(ti, ", %d", i);
207 if (channels & (2<<i)) {
208 while ((channels&(2<<i)) && (i<26)) i++;
209 proto_item_append_text(ti, "-%d", i);
211 first = 0;
214 if (first) proto_item_append_text(ti, "None");
216 offset += 4;
218 proto_tree_add_item(tree, hf_zbee_zdp_duration, tvb, offset, 1, ENC_LITTLE_ENDIAN);
219 offset += 1;
220 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
221 offset += 1;
223 /* Dump any leftover bytes. */
224 zdp_dump_excess(tvb, offset, pinfo, tree);
225 } /* dissect_zbee_zdp_req_mgmt_nwk_disc */
228 *ZigBee Device Profile dissector for the link quality information
230 *@param tvb pointer to buffer containing raw packet.
231 *@param pinfo pointer to packet information fields
232 *@param tree pointer to data tree Wireshark uses to display packet.
234 void
235 dissect_zbee_zdp_req_mgmt_lqi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
237 unsigned offset = 0;
239 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
240 offset += 1;
242 /* Dump any leftover bytes. */
243 zdp_dump_excess(tvb, offset, pinfo, tree);
244 } /* dissect_zbee_zdp_req_mgmt_lqi */
247 *ZigBee Device Profile dissector for the routing table
249 *@param tvb pointer to buffer containing raw packet.
250 *@param pinfo pointer to packet information fields
251 *@param tree pointer to data tree Wireshark uses to display packet.
253 void
254 dissect_zbee_zdp_req_mgmt_rtg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
256 unsigned offset = 0;
258 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
259 offset += 1;
261 /* Dump any leftover bytes. */
262 zdp_dump_excess(tvb, offset, pinfo, tree);
263 } /* dissect_zbee_zdp_req_mgmt_rtg */
266 *ZigBee Device Profile dissector for the binding table
268 *@param tvb pointer to buffer containing raw packet.
269 *@param pinfo pointer to packet information fields
270 *@param tree pointer to data tree Wireshark uses to display packet.
272 void
273 dissect_zbee_zdp_req_mgmt_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
275 unsigned offset = 0;
277 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
278 offset += 1;
280 /* Dump any leftover bytes. */
281 zdp_dump_excess(tvb, offset, pinfo, tree);
282 } /* dissect_zbee_zdp_req_mgmt_bind */
285 *ZigBee Device Profile dissector for the leave request.
287 *@param tvb pointer to buffer containing raw packet.
288 *@param pinfo pointer to packet information fields
289 *@param tree pointer to data tree Wireshark uses to display packet.
291 void
292 dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t version)
294 unsigned offset = 0;
295 uint64_t ext_addr;
296 static int * const flags[] = {
297 &hf_zbee_zdp_leave_children,
298 &hf_zbee_zdp_leave_rejoin,
299 NULL
302 ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, 8, NULL);
303 if (version >= ZBEE_VERSION_2007) {
304 /* Flags present on ZigBee 2006 & later. */
305 proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_NA);
306 offset += 1;
309 zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
311 /* Dump any leftover bytes. */
312 zdp_dump_excess(tvb, offset, pinfo, tree);
313 } /* dissect_zbee_zdp_req_mgmt_bind */
316 *ZigBee Device Profile dissector for the direct join request.
318 *@param tvb pointer to buffer containing raw packet.
319 *@param pinfo pointer to packet information fields
320 *@param tree pointer to data tree Wireshark uses to display packet.
322 void
323 dissect_zbee_zdp_req_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
325 unsigned offset = 0;
326 uint64_t ext_addr;
327 /*uint8_t cinfo;*/
329 ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, 8, NULL);
330 /*cinfo =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset);
332 zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
334 /* Dump any leftover bytes. */
335 zdp_dump_excess(tvb, offset, pinfo, tree);
336 } /* dissect_zbee_zdp_req_mgmt_direct_join */
339 *ZigBee Device Profile dissector for the permit joining
341 *@param tvb pointer to buffer containing raw packet.
342 *@param pinfo pointer to packet information fields
343 *@param tree pointer to data tree Wireshark uses to display packet.
345 void
346 dissect_zbee_zdp_req_mgmt_permit_join(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
348 unsigned offset = 0;
350 proto_tree_add_item(tree, hf_zbee_zdp_duration, tvb, offset, 1, ENC_LITTLE_ENDIAN);
351 offset += 1;
353 proto_tree_add_item(tree, hf_zbee_zdp_significance, tvb, offset, 1, ENC_LITTLE_ENDIAN);
354 offset += 1;
356 if (tvb_captured_length_remaining(tvb, offset))
358 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_MGMT_PERMIT_JOIN);
360 /* Dump any leftover bytes. */
361 zdp_dump_excess(tvb, offset, pinfo, tree);
363 } /* dissect_zbee_zdp_req_mgmt_permit_join */
366 *ZigBee Device Profile dissector for the cache request.
368 *@param tvb pointer to buffer containing raw packet.
369 *@param pinfo pointer to packet information fields
370 *@param tree pointer to data tree Wireshark uses to display packet.
372 void
373 dissect_zbee_zdp_req_mgmt_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
375 unsigned offset = 0;
377 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
378 offset += 1;
380 /* Dump any leftover bytes. */
381 zdp_dump_excess(tvb, offset, pinfo, tree);
382 } /* dissect_zbee_zdp_req_mgmt_cache */
385 *ZigBee Device Profile dissector for the nwk update request.
387 *@param tvb pointer to buffer containing raw packet.
388 *@param pinfo pointer to packet information fields
389 *@param tree pointer to data tree Wireshark uses to display packet.
391 void
392 dissect_zbee_zdp_req_mgmt_nwkupdate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
394 unsigned offset = 0;
395 uint32_t duration;
397 zdp_parse_chanmask(tree, tvb, &offset, hf_zbee_zdp_channel_page, hf_zbee_zdp_channel_mask);
398 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_duration, tvb, offset, 1, ENC_LITTLE_ENDIAN, &duration);
399 offset += 1;
401 if (duration == ZBEE_ZDP_NWKUPDATE_PARAMETERS) {
402 proto_tree_add_item(tree, hf_zbee_zdp_update_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
403 offset += 1;
404 proto_tree_add_item(tree, hf_zbee_zdp_manager, tvb, offset, 2, ENC_LITTLE_ENDIAN);
405 offset += 2;
407 else if (duration == ZBEE_ZDP_NWKUPDATE_CHANNEL_HOP) {
408 proto_tree_add_item(tree, hf_zbee_zdp_update_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
409 offset += 1;
411 else if (duration <= ZBEE_ZDP_NWKUPDATE_SCAN_MAX) {
412 proto_tree_add_item(tree, hf_zbee_zdp_scan_count, tvb, offset, 1, ENC_LITTLE_ENDIAN);
413 offset += 1;
416 /* Dump any leftover bytes. */
417 zdp_dump_excess(tvb, offset, pinfo, tree);
418 } /* dissect_zbee_zdp_req_mgmt_nwkupdate */
421 *ZigBee Device Profile dissector for the enhanced nwk update request.
423 *@param tvb pointer to buffer containing raw packet.
424 *@param pinfo pointer to packet information fields
425 *@param tree pointer to data tree Wireshark uses to display packet.
427 void
428 dissect_zbee_zdp_req_mgmt_nwkupdate_enh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
430 unsigned offset = 0;
431 uint32_t i, duration, count;
433 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_channel_page_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &count);
434 offset += 1;
436 for (i=0; i<count; i++) {
437 zdp_parse_chanmask(tree, tvb, &offset, hf_zbee_zdp_channel_page, hf_zbee_zdp_channel_mask);
440 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_duration, tvb, offset, 1, ENC_LITTLE_ENDIAN, &duration);
441 offset += 1;
443 if (duration == ZBEE_ZDP_NWKUPDATE_PARAMETERS) {
444 proto_tree_add_item(tree, hf_zbee_zdp_update_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
445 offset += 1;
446 proto_tree_add_item(tree, hf_zbee_zdp_manager, tvb, offset, 2, ENC_LITTLE_ENDIAN);
447 offset += 2;
449 else if (duration == ZBEE_ZDP_NWKUPDATE_CHANNEL_HOP) {
450 proto_tree_add_item(tree, hf_zbee_zdp_update_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
451 offset += 1;
453 else if (duration <= ZBEE_ZDP_NWKUPDATE_SCAN_MAX) {
454 proto_tree_add_item(tree, hf_zbee_zdp_scan_count, tvb, offset, 1, ENC_LITTLE_ENDIAN);
455 offset += 1;
458 /* Dump any leftover bytes. */
459 zdp_dump_excess(tvb, offset, pinfo, tree);
460 } /* dissect_zbee_zdp_req_mgmt_nwkupdate_enh */
463 *ZigBee Device Profile dissector for the IEEE Joining List Request.
465 *@param tvb pointer to buffer containing raw packet.
466 *@param pinfo pointer to packet information fields
467 *@param tree pointer to data tree Wireshark uses to display packet.
469 void
470 dissect_zbee_zdp_req_mgmt_ieee_join_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
472 unsigned offset = 0;
474 proto_tree_add_item(tree, hf_zbee_zdp_ieee_join_start_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
475 offset += 1;
477 /* Dump any leftover bytes. */
478 zdp_dump_excess(tvb, offset, pinfo, tree);
479 } /* dissect_zbee_zdp_req_mgmt_ieee_join_list */
482 *ZigBee Device Profile dissector for the NWK Beacon Survey Request.
484 *@param tvb pointer to buffer containing raw packet.
485 *@param pinfo pointer to packet information fields
486 *@param tree pointer to data tree Wireshark uses to display packet.
488 void
489 dissect_zbee_zdp_req_mgmt_nwk_beacon_survey(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
491 unsigned offset = 0;
493 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_MGMT_NWK_BEACON_SURVEY);
495 /* Dump any leftover bytes. */
496 zdp_dump_excess(tvb, offset, pinfo, tree);
497 } /* dissect_zbee_zdp_req_mgmt_nwk_beacon_survey */
500 *ZigBee Device Profile dissector for the NWK Beacon Survey Response.
502 *@param tvb pointer to buffer containing raw packet.
503 *@param pinfo pointer to packet information fields
504 *@param tree pointer to data tree Wireshark uses to display packet.
506 void
507 dissect_zbee_zdp_rsp_mgmt_nwk_beacon_survey(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
509 unsigned offset = 0;
511 zdp_parse_status(tree, tvb, &offset);
513 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_MGMT_NWK_BEACON_SURVEY);
515 /* Dump any leftover bytes. */
516 zdp_dump_excess(tvb, offset, pinfo, tree);
517 } /* dissect_zbee_zdp_rsp_mgmt_nwk_beacon_survey */
520 *ZigBee Device Profile dissector for the Security Start Key Negotiation Request.
522 *@param tvb pointer to buffer containing raw packet.
523 *@param pinfo pointer to packet information fields
524 *@param tree pointer to data tree Wireshark uses to display packet.
526 void
527 dissect_zbee_zdp_req_security_start_key_negotiation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
529 unsigned offset = 0;
531 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_START_KEY_NEGOTIATION);
533 /* Dump any leftover bytes. */
534 zdp_dump_excess(tvb, offset, pinfo, tree);
535 } /* dissect_zbee_zdp_req_security_start_key_negotiation */
538 *ZigBee Device Profile dissector for the Security Get Authentication Token Request.
540 *@param tvb pointer to buffer containing raw packet.
541 *@param pinfo pointer to packet information fields
542 *@param tree pointer to data tree Wireshark uses to display packet.
544 void
545 dissect_zbee_zdp_req_security_get_auth_token(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
547 unsigned offset = 0;
549 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_GET_AUTH_TOKEN);
551 /* Dump any leftover bytes. */
552 zdp_dump_excess(tvb, offset, pinfo, tree);
553 } /* dissect_zbee_zdp_req_security_get_auth_token */
556 *ZigBee Device Profile dissector for the Security Get Authentication Level Request.
558 *@param tvb pointer to buffer containing raw packet.
559 *@param pinfo pointer to packet information fields
560 *@param tree pointer to data tree Wireshark uses to display packet.
562 void
563 dissect_zbee_zdp_req_security_get_auth_level(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
565 unsigned offset = 0;
567 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_GET_AUTH_LEVEL);
569 /* Dump any leftover bytes. */
570 zdp_dump_excess(tvb, offset, pinfo, tree);
571 } /* dissect_zbee_zdp_req_security_get_auth_level */
574 *ZigBee Device Profile dissector for the Security Set Configuration Request.
576 *@param tvb pointer to buffer containing raw packet.
577 *@param pinfo pointer to packet information fields
578 *@param tree pointer to data tree Wireshark uses to display packet.
580 void
581 dissect_zbee_zdp_req_security_set_configuration(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
583 unsigned offset = 0;
585 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_SET_CONFIGURATION);
587 /* Dump any leftover bytes. */
588 zdp_dump_excess(tvb, offset, pinfo, tree);
589 } /* dissect_zbee_zdp_req_security_set_configuration */
592 *ZigBee Device Profile dissector for the Security Get Configuration Request.
594 *@param tvb pointer to buffer containing raw packet.
595 *@param pinfo pointer to packet information fields
596 *@param tree pointer to data tree Wireshark uses to display packet.
598 void
599 dissect_zbee_zdp_req_security_get_configuration(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
601 unsigned offset = 0;
602 uint8_t count;
603 uint8_t i;
604 unsigned remaining_length;
606 remaining_length = tvb_captured_length_remaining(tvb, offset);
607 if (remaining_length > 0U)
609 count = tvb_get_uint8(tvb, offset);
610 proto_tree_add_item(tree, hf_zbee_zdp_tlv_count, tvb, offset, 1, ENC_NA);
611 offset += 1;
613 for (i = 0; i < count; i++)
615 proto_tree_add_item(tree, hf_zbee_zdp_tlv_id, tvb, offset, 1, ENC_NA);
616 offset += 1;
620 /* Dump any leftover bytes. */
621 zdp_dump_excess(tvb, offset, pinfo, tree);
622 } /* dissect_zbee_zdp_req_security_get_configuration */
625 *ZigBee Device Profile dissector for the Security Start Key Update Request.
627 *@param tvb pointer to buffer containing raw packet.
628 *@param pinfo pointer to packet information fields
629 *@param tree pointer to data tree Wireshark uses to display packet.
631 void
632 dissect_zbee_zdp_req_security_start_key_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
634 unsigned offset = 0;
636 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_START_KEY_UPDATE);
638 /* Dump any leftover bytes. */
639 zdp_dump_excess(tvb, offset, pinfo, tree);
640 } /* dissect_zbee_zdp_req_security_start_key_update */
643 *ZigBee Device Profile dissector for the Security Decommission Request.
645 *@param tvb pointer to buffer containing raw packet.
646 *@param pinfo pointer to packet information fields
647 *@param tree pointer to data tree Wireshark uses to display packet.
649 void
650 dissect_zbee_zdp_req_security_decommission(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
652 unsigned offset = 0;
654 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_DECOMMISSION);
656 /* Dump any leftover bytes. */
657 zdp_dump_excess(tvb, offset, pinfo, tree);
658 } /* dissect_zbee_zdp_req_security_decommission */
661 *ZigBee Device Profile dissector for the Security Challenge Request.
663 *@param tvb pointer to buffer containing raw packet.
664 *@param pinfo pointer to packet information fields
665 *@param tree pointer to data tree Wireshark uses to display packet.
667 void
668 dissect_zbee_zdp_req_security_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
670 unsigned offset = 0;
672 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_REQ_SECURITY_CHALLENGE);
674 /* Dump any leftover bytes. */
675 zdp_dump_excess(tvb, offset, pinfo, tree);
677 /**************************************
678 * MANAGEMENT RESPONSES
679 **************************************
682 *ZigBee Device Profile dissector for the network discovery
684 *@param tvb pointer to buffer containing raw packet.
685 *@param pinfo pointer to packet information fields
686 *@param tree pointer to data tree Wireshark uses to display packet.
688 void
689 dissect_zbee_zdp_rsp_mgmt_nwk_disc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t version)
691 proto_tree *field_tree = NULL;
692 unsigned offset = 0;
694 uint8_t status;
695 uint32_t i, table_count;
697 status = zdp_parse_status(tree, tvb, &offset);
698 proto_tree_add_item(tree, hf_zbee_zdp_table_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
699 offset += 1;
700 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
701 offset += 1;
702 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_table_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &table_count);
703 offset += 1;
705 if (tree && table_count) {
706 field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_zbee_zdp_nwk, NULL, "Network List");
708 for (i=0; i<table_count; i++) {
709 zdp_parse_nwk_desc(field_tree, tvb, &offset, version);
710 } /* for */
712 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
714 /* Dump any leftover bytes. */
715 zdp_dump_excess(tvb, offset, pinfo, tree);
716 } /* dissect_zbee_zdp_rsp_mgmt_nwk_disc */
719 *ZigBee Device Profile dissector for the link quality information
721 *@param tvb pointer to buffer containing raw packet.
722 *@param pinfo pointer to packet information fields
723 *@param tree pointer to data tree Wireshark uses to display packet.
725 void
726 dissect_zbee_zdp_rsp_mgmt_lqi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t version)
728 proto_tree *field_tree = NULL;
729 unsigned offset = 0;
731 uint8_t status;
732 uint32_t i, table_count;
734 status = zdp_parse_status(tree, tvb, &offset);
735 proto_tree_add_item(tree, hf_zbee_zdp_table_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
736 offset += 1;
737 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
738 offset += 1;
739 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_table_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &table_count);
740 offset += 1;
742 if (table_count) {
743 field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_zbee_zdp_lqi, NULL, "Neighbor Table");
744 for (i=0; i<table_count; i++) {
745 zdp_parse_neighbor_table_entry(field_tree, tvb, &offset, version);
749 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
751 /* Dump any leftover bytes. */
752 zdp_dump_excess(tvb, offset, pinfo, tree);
753 } /* dissect_zbee_zdp_rsp_mgmt_lqi */
756 *ZigBee Device Profile dissector for the routing table
758 *@param tvb pointer to buffer containing raw packet.
759 *@param pinfo pointer to packet information fields
760 *@param tree pointer to data tree Wireshark uses to display packet.
762 void
763 dissect_zbee_zdp_rsp_mgmt_rtg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
765 proto_item *ti;
766 proto_tree *field_tree = NULL;
767 unsigned offset = 0;
769 uint8_t status;
770 uint32_t i, table_count;
772 status = zdp_parse_status(tree, tvb, &offset);
773 proto_tree_add_item(tree, hf_zbee_zdp_table_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
774 offset += 1;
775 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
776 offset += 1;
777 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_table_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &table_count);
778 offset += 1;
780 if (tree && table_count) {
781 ti = proto_tree_add_item(tree, hf_zbee_zdp_rtg, tvb, offset, -1, ENC_NA);
782 field_tree = proto_item_add_subtree(ti, ett_zbee_zdp_rtg);
784 for (i=0; i<table_count; i++) {
785 zdp_parse_routing_table_entry(field_tree, tvb, &offset);
786 } /* for */
788 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
790 /* Dump any leftover bytes. */
791 zdp_dump_excess(tvb, offset, pinfo, tree);
792 } /* dissect_zbee_zdp_rsp_mgmt_rtg */
795 *ZigBee Device Profile dissector for the binding table
797 *@param tvb pointer to buffer containing raw packet.
798 *@param pinfo pointer to packet information fields
799 *@param tree pointer to data tree Wireshark uses to display packet.
801 void
802 dissect_zbee_zdp_rsp_mgmt_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t version)
804 proto_tree *field_tree = NULL;
805 unsigned offset = 0;
807 uint8_t status;
808 uint32_t i, table_count;
810 status = zdp_parse_status(tree, tvb, &offset);
811 proto_tree_add_item(tree, hf_zbee_zdp_table_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
812 offset += 1;
813 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
814 offset += 1;
815 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_table_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &table_count);
816 offset += 1;
819 if (tree && table_count) {
820 field_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_zbee_zdp_bind, NULL, "Binding Table");
822 for (i=0; i<table_count; i++) {
823 zdp_parse_bind_table_entry(field_tree, tvb, &offset, version);
824 } /* for */
826 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
828 /* Dump any leftover bytes. */
829 zdp_dump_excess(tvb, offset, pinfo, tree);
830 } /* dissect_zbee_zdp_rsp_mgmt_bind */
833 *ZigBee Device Profile dissector for the leave response.
835 *@param tvb pointer to buffer containing raw packet.
836 *@param pinfo pointer to packet information fields
837 *@param tree pointer to data tree Wireshark uses to display packet.
839 void
840 dissect_zbee_zdp_rsp_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
842 unsigned offset = 0;
843 uint8_t status;
845 status = zdp_parse_status(tree, tvb, &offset);
847 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
849 /* Dump any leftover bytes. */
850 zdp_dump_excess(tvb, offset, pinfo, tree);
851 } /* dissect_zbee_zdp_rsp_mgmt_bind */
854 *ZigBee Device Profile dissector for the direct join response.
856 *@param tvb pointer to buffer containing raw packet.
857 *@param pinfo pointer to packet information fields
858 *@param tree pointer to data tree Wireshark uses to display packet.
860 void
861 dissect_zbee_zdp_rsp_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
863 unsigned offset = 0;
864 uint8_t status;
866 status = zdp_parse_status(tree, tvb, &offset);
868 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
870 /* Dump any leftover bytes. */
871 zdp_dump_excess(tvb, offset, pinfo, tree);
872 } /* dissect_zbee_zdp_rsp_mgmt_direct_join */
875 *ZigBee Device Profile dissector for the permit joining response.
877 *@param tvb pointer to buffer containing raw packet.
878 *@param pinfo pointer to packet information fields
879 *@param tree pointer to data tree Wireshark uses to display packet.
881 void
882 dissect_zbee_zdp_rsp_mgmt_permit_join(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
884 unsigned offset = 0;
885 uint8_t status;
887 status = zdp_parse_status(tree, tvb, &offset);
889 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
891 /* Dump any leftover bytes. */
892 zdp_dump_excess(tvb, offset, pinfo, tree);
893 } /* dissect_zbee_zdp_rsp_mgmt_permit_join */
896 *ZigBee Device Profile dissector for the cache response.
898 *@param tvb pointer to buffer containing raw packet.
899 *@param pinfo pointer to packet information fields
900 *@param tree pointer to data tree Wireshark uses to display packet.
902 void
903 dissect_zbee_zdp_rsp_mgmt_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
905 proto_tree *field_tree = NULL;
906 proto_tree *ti;
907 unsigned offset = 0;
909 uint8_t status;
910 uint32_t i, table_count;
912 status = zdp_parse_status(tree, tvb, &offset);
913 proto_tree_add_item(tree, hf_zbee_zdp_table_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
914 offset += 1;
915 proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
916 offset += 1;
917 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_table_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &table_count);
918 offset += 1;
920 if (table_count) {
921 field_tree = proto_tree_add_subtree(tree, tvb, offset, table_count*(2+8),
922 ett_zbee_zdp_cache, NULL, "Discovery Cache");
924 for (i=0; i<table_count; i++) {
925 uint16_t addr16 = tvb_get_letohs(tvb, offset+8);
927 ti = proto_tree_add_item(field_tree, hf_zbee_zdp_cache_address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
928 /* XXX - make 16-bit address filterable? */
929 proto_item_append_text(ti, " = 0x%04x", addr16);
930 proto_item_set_len(ti, 8+2);
931 offset += 2+8;
935 zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
937 /* Dump any leftover bytes. */
938 zdp_dump_excess(tvb, offset, pinfo, tree);
939 } /* dissect_zbee_zdp_rsp_mgmt_bind */
942 *ZigBee Device Profile dissector for both the enhanced and
943 *non-enhanced nwk update notify.
945 *@param tvb pointer to buffer containing raw packet.
946 *@param pinfo pointer to packet information fields
947 *@param tree pointer to data tree Wireshark uses to display packet.
949 void
950 dissect_zbee_zdp_not_mgmt_nwkupdate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
952 unsigned offset = 0;
953 unsigned i, j;
955 /*uint8_t status;*/
956 uint32_t channels, channel_count;
958 /*status =*/ zdp_parse_status(tree, tvb, &offset);
959 channels = zdp_parse_chanmask(tree, tvb, &offset, hf_zbee_zdp_channel_page, hf_zbee_zdp_channel_mask);
960 proto_tree_add_item(tree, hf_zbee_zdp_tx_total, tvb, offset, 2, ENC_LITTLE_ENDIAN);
961 offset += 2;
962 proto_tree_add_item(tree, hf_zbee_zdp_tx_fail, tvb, offset, 2, ENC_LITTLE_ENDIAN);
963 offset += 2;
964 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_channel_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &channel_count);
965 offset += 1;
967 /* Display the channel list. */
968 for (i=0, j=0; i<(8*4); i++) {
969 uint8_t energy;
971 if ( ! ((1<<i) & channels) ) {
972 /* Channel not scanned. */
973 continue;
975 if (j>=channel_count) {
976 /* Channel list has ended. */
977 break;
979 /* Get and display the channel energy. */
980 energy = tvb_get_uint8(tvb, offset);
981 proto_tree_add_uint_format(tree, hf_zbee_zdp_channel_energy, tvb, offset, 1, energy, "Channel %d Energy: 0x%02x", i, energy);
982 offset += 1;
983 /* Increment the number of channels we found energy values for. */
984 j++;
985 } /* for */
987 /* Dump any leftover bytes. */
988 zdp_dump_excess(tvb, offset, pinfo, tree);
989 } /* dissect_zbee_zdp_not_mgmt_nwkupdate */
992 *ZigBee Device Profile dissector for the IEEE Joining List Response.
994 *@param tvb pointer to buffer containing raw packet.
995 *@param pinfo pointer to packet information fields
996 *@param tree pointer to data tree Wireshark uses to display packet.
998 void
999 dissect_zbee_zdp_rsp_mgmt_ieee_join_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1001 uint32_t i, status, list_total, list_count;
1002 unsigned offset = 0;
1004 status = zdp_parse_status(tree, tvb, &offset);
1005 if (status == 0x00) {
1006 proto_tree_add_item(tree, hf_zbee_zdp_ieee_join_update_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1007 offset += 1;
1008 proto_tree_add_item(tree, hf_zbee_zdp_ieee_join_policy, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1009 offset += 1;
1010 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_ieee_join_list_total, tvb, offset, 1, ENC_LITTLE_ENDIAN, &list_total);
1011 offset += 1;
1013 if (list_total > 0) {
1014 proto_tree_add_item(tree, hf_zbee_zdp_ieee_join_list_start, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1015 offset += 1;
1016 proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_ieee_join_list_count, tvb, offset, 1, ENC_LITTLE_ENDIAN, &list_count);
1017 offset += 1;
1019 for(i=0; i<list_count; i++) {
1020 zbee_parse_eui64(tree, hf_zbee_zdp_ieee_join_list_ieee, tvb, &offset, 8, NULL);
1024 /* Dump any leftover bytes. */
1025 zdp_dump_excess(tvb, offset, pinfo, tree);
1026 } /* dissect_zbee_zdp_rsp_mgmt_ieee_join_list */
1029 *ZigBee Device Profile dissector for the unsolicited nwk update notify.
1031 *@param tvb pointer to buffer containing raw packet.
1032 *@param pinfo pointer to packet information fields
1033 *@param tree pointer to data tree Wireshark uses to display packet.
1035 void
1036 dissect_zbee_zdp_not_mgmt_unsolicited_nwkupdate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1038 unsigned offset = 0;
1040 zdp_parse_status(tree, tvb, &offset);
1041 zdp_parse_chanmask(tree, tvb, &offset, hf_zbee_zdp_channel_page, hf_zbee_zdp_channel_mask);
1042 proto_tree_add_item(tree, hf_zbee_zdp_tx_total, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1043 offset += 2;
1044 proto_tree_add_item(tree, hf_zbee_zdp_tx_fail, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1045 offset += 2;
1046 proto_tree_add_item(tree, hf_zbee_zdp_tx_retries, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1047 offset += 2;
1048 proto_tree_add_item(tree, hf_zbee_zdp_period_time_results, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1049 offset += 1;
1051 /* Dump any leftover bytes. */
1052 zdp_dump_excess(tvb, offset, pinfo, tree);
1053 } /* dissect_zbee_zdp_not_mgmt_unsolicited_nwkupdate */
1056 *ZigBee Device Profile dissector for the security start key negotiation response.
1058 *@param tvb pointer to buffer containing raw packet.
1059 *@param pinfo pointer to packet information fields
1060 *@param tree pointer to data tree Wireshark uses to display packet.
1062 void
1063 dissect_zbee_zdp_rsp_security_start_key_negotiation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1065 unsigned offset = 0;
1067 zdp_parse_status(tree, tvb, &offset);
1068 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_START_KEY_NEGOTIATION);
1070 /* Dump any leftover bytes. */
1071 zdp_dump_excess(tvb, offset, pinfo, tree);
1072 } /* dissect_zbee_zdp_rsp_security_start_key_negotiation */
1075 *ZigBee Device Profile dissector for the security get authentication token response.
1077 *@param tvb pointer to buffer containing raw packet.
1078 *@param pinfo pointer to packet information fields
1079 *@param tree pointer to data tree Wireshark uses to display packet.
1081 void
1082 dissect_zbee_zdp_rsp_security_get_auth_token(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1084 unsigned offset = 0;
1086 zdp_parse_status(tree, tvb, &offset);
1087 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_GET_AUTH_TOKEN);
1089 /* Dump any leftover bytes. */
1090 zdp_dump_excess(tvb, offset, pinfo, tree);
1091 } /* dissect_zbee_zdp_rsp_security_get_auth_token */
1094 *ZigBee Device Profile dissector for the security get authentication level response.
1096 *@param tvb pointer to buffer containing raw packet.
1097 *@param pinfo pointer to packet information fields
1098 *@param tree pointer to data tree Wireshark uses to display packet.
1100 void
1101 dissect_zbee_zdp_rsp_security_get_auth_level(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1103 unsigned offset = 0;
1105 zdp_parse_status(tree, tvb, &offset);
1106 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_GET_AUTH_LEVEL);
1108 /* Dump any leftover bytes. */
1109 zdp_dump_excess(tvb, offset, pinfo, tree);
1110 } /* dissect_zbee_zdp_rsp_security_get_auth_level */
1113 *ZigBee Device Profile dissector for the security set configuration response.
1115 *@param tvb pointer to buffer containing raw packet.
1116 *@param pinfo pointer to packet information fields
1117 *@param tree pointer to data tree Wireshark uses to display packet.
1119 void
1120 dissect_zbee_zdp_rsp_security_set_configuration(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1122 unsigned offset = 0;
1124 zdp_parse_status(tree, tvb, &offset);
1125 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_SET_CONFIGURATION);
1127 /* Dump any leftover bytes. */
1128 zdp_dump_excess(tvb, offset, pinfo, tree);
1129 } /* dissect_zbee_zdp_rsp_security_set_configuration */
1132 *ZigBee Device Profile dissector for the security get configuration response.
1134 *@param tvb pointer to buffer containing raw packet.
1135 *@param pinfo pointer to packet information fields
1136 *@param tree pointer to data tree Wireshark uses to display packet.
1138 void
1139 dissect_zbee_zdp_rsp_security_get_configuration(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1141 unsigned offset = 0;
1143 zdp_parse_status(tree, tvb, &offset);
1144 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_GET_CONFIGURATION);
1146 /* Dump any leftover bytes. */
1147 zdp_dump_excess(tvb, offset, pinfo, tree);
1148 } /* dissect_zbee_zdp_rsp_security_get_configuration */
1151 *ZigBee Device Profile dissector for the security start key update response.
1153 *@param tvb pointer to buffer containing raw packet.
1154 *@param pinfo pointer to packet information fields
1155 *@param tree pointer to data tree Wireshark uses to display packet.
1157 void
1158 dissect_zbee_zdp_rsp_security_start_key_update(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1160 unsigned offset = 0;
1162 zdp_parse_status(tree, tvb, &offset);
1163 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_START_KEY_UPDATE);
1165 /* Dump any leftover bytes. */
1166 zdp_dump_excess(tvb, offset, pinfo, tree);
1167 } /* dissect_zbee_zdp_rsp_security_start_key_update */
1170 *ZigBee Device Profile dissector for the security start key update response.
1172 *@param tvb pointer to buffer containing raw packet.
1173 *@param pinfo pointer to packet information fields
1174 *@param tree pointer to data tree Wireshark uses to display packet.
1176 void
1177 dissect_zbee_zdp_rsp_security_decommission(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1179 unsigned offset = 0;
1181 zdp_parse_status(tree, tvb, &offset);
1182 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_DECOMMISSION);
1184 /* Dump any leftover bytes. */
1185 zdp_dump_excess(tvb, offset, pinfo, tree);
1186 } /* dissect_zbee_zdp_rsp_security_decommission */
1189 *ZigBee Device Profile dissector for the Security Challenge Response.
1191 *@param tvb pointer to buffer containing raw packet.
1192 *@param pinfo pointer to packet information fields
1193 *@param tree pointer to data tree Wireshark uses to display packet.
1195 void
1196 dissect_zbee_zdp_rsp_security_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1198 unsigned offset = 0;
1200 zdp_parse_status(tree, tvb, &offset);
1201 offset = dissect_zbee_tlvs(tvb, pinfo, tree, offset, NULL, ZBEE_TLV_SRC_TYPE_ZBEE_ZDP, ZBEE_ZDP_RSP_SECURITY_CHALLENGE);
1203 /* Dump any leftover bytes. */
1204 zdp_dump_excess(tvb, offset, pinfo, tree);
1208 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1210 * Local variables:
1211 * c-basic-offset: 4
1212 * tab-width: 8
1213 * indent-tabs-mode: nil
1214 * End:
1216 * vi: set shiftwidth=4 tabstop=8 expandtab:
1217 * :indentSize=4:tabSize=8:noTabs=true: