aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zdp.c
diff options
context:
space:
mode:
authordsrsupport <eugene.exarevsky@dsr-company.com>2016-09-06 17:56:15 +0300
committerAnders Broman <a.broman58@gmail.com>2016-10-16 15:24:30 +0000
commitdc1cd7889da85938b016c6bfec932dd595b7e18b (patch)
treeac8f9410ceaa356372f3063e1dc34654cf28fac6 /epan/dissectors/packet-zbee-zdp.c
parentb240082cf4ca297149a119694e9eb4d205bccc02 (diff)
ZigBee MAC and ZDO dissectors: put useful information into column description for Association req and ZDo Node Desc Resp.
I added that information to column description because I always need it when analyzing logs. For Association request it is joining device type (FFD or RFD), for Node Descriptor Response this is stack version (r21 or legacy). Change-Id: Ic7ca237b1f4b598f9354b406f105c2befe45140d Reviewed-on: https://code.wireshark.org/review/17534 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-zdp.c')
-rw-r--r--epan/dissectors/packet-zbee-zdp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 9c8582b4e4..3b1834c54d 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -26,6 +26,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <wsutil/bits_ctz.h>
#include "packet-zbee.h"
#include "packet-zbee-nwk.h"
@@ -724,7 +725,7 @@ zdp_parse_server_flags(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *of
*@param offset offset into the tvb to find the node descriptor.
*/
void
-zdp_parse_node_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *offset, guint8 version)
+zdp_parse_node_desc(proto_tree *tree, packet_info *pinfo, gint ettindex, tvbuff_t *tvb, guint *offset, guint8 version)
{
proto_item *ti;
proto_item *field_root = NULL;
@@ -775,13 +776,18 @@ zdp_parse_node_desc(proto_tree *tree, gint ettindex, tvbuff_t *tvb, guint *offse
/* Get and display the server flags. */
if (version >= ZBEE_VERSION_2007) {
+ guint16 ver_flags;
const int * descriptors[] = {
&hf_zbee_zdp_dcf_eaela,
&hf_zbee_zdp_dcf_esdla,
NULL
};
- zdp_parse_server_flags(field_tree, ett_zbee_zdp_server, tvb, offset);
+ ver_flags = zdp_parse_server_flags(field_tree, ett_zbee_zdp_server, tvb, offset) & ZBEE_ZDP_NODE_SERVER_STACK_COMPL_REV;
+ if (ver_flags) {
+ zbee_append_info(tree, pinfo, ", Rev: %d",
+ (ver_flags >> ws_ctz(ZBEE_ZDP_NODE_SERVER_STACK_COMPL_REV)));
+ }
zbee_parse_uint(field_tree, hf_zbee_zdp_node_max_outgoing_transfer, tvb, offset, 2, NULL);
proto_tree_add_bitmask_with_flags(field_tree, tvb, *offset, hf_zbee_zdp_dcf, ett_zbee_zdp_descriptor_capability_field, descriptors, ENC_NA, BMT_NO_APPEND);
*offset += 1;