diff options
author | Chris Brandson <cjb@exegin.com> | 2017-07-17 16:54:06 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-07-18 04:40:38 +0000 |
commit | e46bd2827f581f1c5b18c4e166c13741fa6a99a8 (patch) | |
tree | 7b307902af2a6f137cd8290e0e763fcaaf9a8516 | |
parent | aec147efa1f27518f6927ca5078e0547dd1a234d (diff) |
ZigBee cleanup minor errors
Alarm Code now correctly displayed as a byte
Missing ZCL status codes from ZCL 6 and ZCL 7 have been added
Input and Output Cluster Lists now displayed in hex as they are everywhere else
The term Device is no longer used, instead Nwk Addr and Address are used as applicable
Change-Id: I552f4b64974bf44088a1c8f90d44e5459a0f81a6
Reviewed-on: https://code.wireshark.org/review/22683
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-zbee-zcl-general.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zcl.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zcl.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp-discovery.c | 130 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-zdp.h | 2 |
6 files changed, 76 insertions, 72 deletions
diff --git a/epan/dissectors/packet-zbee-zcl-general.c b/epan/dissectors/packet-zbee-zcl-general.c index d401c43d5f..030d3defcd 100644 --- a/epan/dissectors/packet-zbee-zcl-general.c +++ b/epan/dissectors/packet-zbee-zcl-general.c @@ -3419,7 +3419,7 @@ proto_register_zbee_zcl_alarms(void) 0x00, NULL, HFILL } }, { &hf_zbee_zcl_alarms_alarm_code, - { "Alarm Code", "zbee_zcl_general.alarms.alarm_code", FT_UINT16, BASE_HEX, NULL, + { "Alarm Code", "zbee_zcl_general.alarms.alarm_code", FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL } }, { &hf_zbee_zcl_alarms_cluster_id, diff --git a/epan/dissectors/packet-zbee-zcl.c b/epan/dissectors/packet-zbee-zcl.c index 5d6dd1ee52..eb6685db55 100644 --- a/epan/dissectors/packet-zbee-zcl.c +++ b/epan/dissectors/packet-zbee-zcl.c @@ -573,6 +573,8 @@ static value_string_ext zbee_mfr_code_names_ext = VALUE_STRING_EXT_INIT(zbee_mfr { ZBEE_ZCL_STAT_HARDWARE_FAILURE, "Hardware Failure"}, { ZBEE_ZCL_STAT_SOFTWARE_FAILURE, "Software Failure"}, { ZBEE_ZCL_STAT_CALIBRATION_ERROR, "Calibration Error"}, + { ZBEE_ZCL_STAT_UNSUPPORTED_CLUSTER, "Unsupported Cluster"}, + { ZBEE_ZCL_STAT_LIMIT_REACHED, "Limit Reached"}, { 0, NULL } }; diff --git a/epan/dissectors/packet-zbee-zcl.h b/epan/dissectors/packet-zbee-zcl.h index 2aa1ab9a29..fa317c2b1f 100644 --- a/epan/dissectors/packet-zbee-zcl.h +++ b/epan/dissectors/packet-zbee-zcl.h @@ -178,6 +178,8 @@ typedef struct{ #define ZBEE_ZCL_STAT_HARDWARE_FAILURE 0xc0 #define ZBEE_ZCL_STAT_SOFTWARE_FAILURE 0xc1 #define ZBEE_ZCL_STAT_CALIBRATION_ERROR 0xc2 +#define ZBEE_ZCL_STAT_UNSUPPORTED_CLUSTER 0xc3 +#define ZBEE_ZCL_STAT_LIMIT_REACHED 0xc4 /* Misc. */ #define INT24_SIGN_BITS 0xffff8000 diff --git a/epan/dissectors/packet-zbee-zdp-discovery.c b/epan/dissectors/packet-zbee-zdp-discovery.c index cb79f4a26e..d780564b0f 100644 --- a/epan/dissectors/packet-zbee-zdp-discovery.c +++ b/epan/dissectors/packet-zbee-zdp-discovery.c @@ -54,7 +54,7 @@ dissect_zbee_zdp_req_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /*req_type =*/ zbee_parse_uint(tree, hf_zbee_zdp_req_type, tvb, &offset, sizeof(guint8), NULL); /*idx =*/ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, sizeof(guint8), NULL); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -76,11 +76,11 @@ dissect_zbee_zdp_req_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /*guint8 req_type;*/ /*guint8 idx;*/ - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, sizeof(guint16), NULL); /*req_type =*/ zbee_parse_uint(tree, hf_zbee_zdp_req_type, tvb, &offset, sizeof(guint8), NULL); /*idx =*/ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, sizeof(guint8), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -99,9 +99,9 @@ dissect_zbee_zdp_req_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint offset = 0; guint16 device; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, sizeof(guint16), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -120,9 +120,9 @@ dissect_zbee_zdp_req_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t guint offset = 0; guint16 device; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, sizeof(guint16), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -142,10 +142,10 @@ dissect_zbee_zdp_req_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * guint16 device; guint8 endpt; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, sizeof(guint16), NULL); endpt = zbee_parse_uint(tree, hf_zbee_zdp_endpoint, tvb, &offset, sizeof(guint8), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x, Endpoint: %d", device, endpt); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Endpoint: %d", device, endpt); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -164,9 +164,9 @@ dissect_zbee_zdp_req_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint offset = 0; guint16 device; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, sizeof(guint16), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -191,7 +191,7 @@ dissect_zbee_zdp_req_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t guint8 in_count; guint8 out_count; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); profile = zbee_parse_uint(tree, hf_zbee_zdp_profile, tvb, &offset, (int)sizeof(guint16), NULL); /* Add the input cluster list. */ @@ -209,7 +209,7 @@ dissect_zbee_zdp_req_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t } for (i=0; i<out_count; i++) zbee_parse_uint(field_tree, hf_zbee_zdp_out_cluster, tvb, &offset, sizeof_cluster, NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x, Profile: 0x%04x", device, profile); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Profile: 0x%04x", device, profile); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -228,9 +228,9 @@ dissect_zbee_zdp_req_complex_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint offset = 0; guint16 device; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -249,9 +249,9 @@ dissect_zbee_zdp_req_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint offset = 0; guint16 device; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -271,10 +271,10 @@ dissect_zbee_zdp_req_discovery_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr /*guint16 device;*/ guint64 ext_addr; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Nwk Addr: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -295,11 +295,11 @@ dissect_zbee_zdp_device_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre guint64 ext_addr; /*guint8 capability;*/ - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); /*capability =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Nwk Addr: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -384,7 +384,7 @@ dissect_zbee_zdp_req_set_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint8 user_length; gchar *user; - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if (version >= ZBEE_VERSION_2007) { user_length = zbee_parse_uint(tree, hf_zbee_zdp_user_length, tvb, &offset, (int)sizeof(guint8), NULL); } @@ -400,7 +400,7 @@ dissect_zbee_zdp_req_set_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree } offset += user_length; - zbee_append_info(tree, pinfo, ", Device: 0x%04x, Desc: \'%s\'", device, user); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Desc: \'%s\'", device, user); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -446,7 +446,7 @@ dissect_zbee_zdp_req_store_discovery(tvbuff_t *tvb, packet_info *pinfo, proto_tr /*guint8 ep_count;*/ guint8 simple_count; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); /*node_size =*/ zbee_parse_uint(tree, hf_zbee_zdp_disc_node_size, tvb, &offset, (int)sizeof(guint8), NULL); /*power_size =*/ zbee_parse_uint(tree, hf_zbee_zdp_disc_power_size, tvb, &offset, (int)sizeof(guint8), NULL); @@ -459,7 +459,7 @@ dissect_zbee_zdp_req_store_discovery(tvbuff_t *tvb, packet_info *pinfo, proto_tr zbee_parse_uint(field_tree, hf_zbee_zdp_disc_simple_size, tvb, &offset, (int)sizeof(guint8), NULL); } - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Nwk Addr: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -479,11 +479,11 @@ dissect_zbee_zdp_req_store_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr /*guint16 device;*/ guint64 ext_addr; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); zdp_parse_node_desc(tree, pinfo, FALSE, ett_zbee_zdp_node, tvb, &offset, version); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -503,11 +503,11 @@ dissect_zbee_zdp_req_store_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_t /*guint16 device;*/ guint64 ext_addr; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); zdp_parse_power_desc(tree, ett_zbee_zdp_power, tvb, &offset); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -531,7 +531,7 @@ dissect_zbee_zdp_req_store_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tr guint64 ext_addr; guint8 ep_count; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); ep_count = zbee_parse_uint(tree, hf_zbee_zdp_ep_count, tvb, &offset, (int)sizeof(guint8), NULL); @@ -562,12 +562,12 @@ dissect_zbee_zdp_req_store_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_ guint64 ext_addr; /*guint8 simple_len;*/ - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); /*simple_len =*/ zbee_parse_uint(tree, hf_zbee_zdp_simple_length, tvb, &offset, (int)sizeof(guint8), NULL); zdp_parse_simple_desc(tree, ett_zbee_zdp_simple, tvb, &offset, version); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -587,7 +587,7 @@ dissect_zbee_zdp_req_remove_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_ /*guint16 device;*/ guint64 ext_addr; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); @@ -610,10 +610,10 @@ dissect_zbee_zdp_req_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr /*guint16 device;*/ guint64 ext_addr; - /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + /*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); - zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr)); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -634,11 +634,11 @@ dissect_zbee_zdp_req_ext_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr guint8 endpt; /*guint8 idx;*/ - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); endpt = zbee_parse_uint(tree, hf_zbee_zdp_endpoint, tvb, &offset, (int)sizeof(guint8), NULL); /*idx =*/ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, (int)sizeof(guint8), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x, Endpoint: %d", device, endpt); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Endpoint: %d", device, endpt); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -658,10 +658,10 @@ dissect_zbee_zdp_req_ext_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint16 device; /*guint8 idx;*/ - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); /*idx =*/ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, (int)sizeof(guint8), NULL); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -693,7 +693,7 @@ dissect_zbee_zdp_rsp_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre status = zdp_parse_status(tree, tvb, &offset); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if (tvb_bytes_exist(tvb, offset, 2*(int)sizeof(guint8))) { /* The presence of these fields depends on the request message. Include them if they exist. */ @@ -711,7 +711,7 @@ dissect_zbee_zdp_rsp_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); if (status == ZBEE_ZDP_STATUS_SUCCESS) { - zbee_append_info(tree, pinfo, ", Device: %s = 0x%04x", eui64_to_display(wmem_packet_scope(), ext_addr), device); + zbee_append_info(tree, pinfo, ", Address: %s = 0x%04x", eui64_to_display(wmem_packet_scope(), ext_addr), device); } /* Dump any leftover bytes. */ @@ -740,7 +740,7 @@ dissect_zbee_zdp_rsp_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre status = zdp_parse_status(tree, tvb, &offset); ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if (tvb_bytes_exist(tvb, offset, 2*(int)sizeof(guint8))) { /* The presence of these fields depends on the request message. Include them if they exist. */ @@ -758,7 +758,7 @@ dissect_zbee_zdp_rsp_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); if (status == ZBEE_ZDP_STATUS_SUCCESS) { - zbee_append_info(tree, pinfo, ", Device: 0x%04x = %s", device, eui64_to_display(wmem_packet_scope(), ext_addr)); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x = %s", device, eui64_to_display(wmem_packet_scope(), ext_addr)); } /* Dump any leftover bytes. */ @@ -781,12 +781,12 @@ dissect_zbee_zdp_rsp_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint16 device; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if (status == ZBEE_ZDP_STATUS_SUCCESS) { zdp_parse_node_desc(tree, pinfo, TRUE, ett_zbee_zdp_node, tvb, &offset, version); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -809,12 +809,12 @@ dissect_zbee_zdp_rsp_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t guint16 device; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if (status == ZBEE_ZDP_STATUS_SUCCESS) { zdp_parse_power_desc(tree, ett_zbee_zdp_power, tvb, &offset); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -838,13 +838,13 @@ dissect_zbee_zdp_rsp_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * guint16 device; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); /*length =*/ zbee_parse_uint(tree, hf_zbee_zdp_simple_length, tvb, &offset, (int)sizeof(guint8), NULL); if (status == ZBEE_ZDP_STATUS_SUCCESS) { zdp_parse_simple_desc(tree, ett_zbee_zdp_simple, tvb, &offset, version); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -870,7 +870,7 @@ dissect_zbee_zdp_rsp_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint8 ep_count; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ep_count = zbee_parse_uint(tree, hf_zbee_zdp_ep_count, tvb, &offset, (int)sizeof(guint8), NULL); if (tree && ep_count) { @@ -881,7 +881,7 @@ dissect_zbee_zdp_rsp_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr (void)zbee_parse_uint(field_tree, hf_zbee_zdp_endpoint, tvb, &offset, (int)sizeof(guint8), NULL); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -907,7 +907,7 @@ dissect_zbee_zdp_rsp_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t guint8 ep_count; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ep_count = zbee_parse_uint(tree, hf_zbee_zdp_ep_count, tvb, &offset, (int)sizeof(guint8), NULL); if (tree && ep_count) { @@ -918,7 +918,7 @@ dissect_zbee_zdp_rsp_match_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t (void)zbee_parse_uint(field_tree, hf_zbee_zdp_endpoint, tvb, &offset, (int)sizeof(guint8), NULL); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -942,13 +942,13 @@ dissect_zbee_zdp_rsp_complex_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint16 device; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); length = zbee_parse_uint(tree, hf_zbee_zdp_complex_length, tvb, &offset, (int)sizeof(guint8), NULL); if (length) { zdp_parse_complex_desc(tree, -1, tvb, &offset, length); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -972,7 +972,7 @@ dissect_zbee_zdp_rsp_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr gchar *user; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); if ((version >= ZBEE_VERSION_2007) || (status == ZBEE_ZDP_STATUS_SUCCESS)) { /* In ZigBee 2003 & earlier, the length field is omitted if not successful. */ user_length = zbee_parse_uint(tree, hf_zbee_zdp_user_length, tvb, &offset, (int)sizeof(guint8), NULL); @@ -985,7 +985,7 @@ dissect_zbee_zdp_rsp_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr } offset += user_length; - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); if (status == ZBEE_ZDP_STATUS_SUCCESS) { zbee_append_info(tree, pinfo, ", Desc: \'%s\'", user); } @@ -1012,10 +1012,10 @@ dissect_zbee_zdp_rsp_user_desc_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tre status = zdp_parse_status(tree, tvb, &offset); if (version >= ZBEE_VERSION_2007) { /* Device address present only on ZigBee 2006 & later. */ - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -1217,11 +1217,11 @@ dissect_zbee_zdp_rsp_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr /*guint64 ext_addr;*/ cache = zbee_parse_uint(tree, hf_zbee_zdp_cache, tvb, &offset, (int)sizeof(guint16), NULL); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); /*ext_addr =*/ zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL); zbee_append_info(tree, pinfo, ", Cache: 0x%04x", cache); - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); /* Dump any leftover bytes. */ zdp_dump_excess(tvb, offset, pinfo, tree); @@ -1249,7 +1249,7 @@ dissect_zbee_zdp_rsp_ext_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr guint8 idx; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); /*endpt =*/ zbee_parse_uint(tree, hf_zbee_zdp_endpoint, tvb, &offset, (int)sizeof(guint8), NULL); in_count = zbee_parse_uint(tree, hf_zbee_zdp_in_count, tvb, &offset, (int)sizeof(guint8), NULL); out_count = zbee_parse_uint(tree, hf_zbee_zdp_out_count, tvb, &offset, (int)sizeof(guint8), NULL); @@ -1263,7 +1263,7 @@ dissect_zbee_zdp_rsp_ext_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr zbee_parse_uint(tree, hf_zbee_zdp_out_cluster, tvb, &offset, sizeof_cluster, NULL); } /* for */ - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ @@ -1290,7 +1290,7 @@ dissect_zbee_zdp_rsp_ext_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint8 idx; status = zdp_parse_status(tree, tvb, &offset); - device = zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL); + device = zbee_parse_uint(tree, hf_zbee_zdp_nwk_addr, tvb, &offset, (int)sizeof(guint16), NULL); ep_count = zbee_parse_uint(tree, hf_zbee_zdp_ep_count, tvb, &offset, (int)sizeof(guint8), NULL); idx = zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, (int)sizeof(guint8), NULL); @@ -1302,7 +1302,7 @@ dissect_zbee_zdp_rsp_ext_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tree } } - zbee_append_info(tree, pinfo, ", Device: 0x%04x", device); + zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x", device); zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status)); /* Dump any leftover bytes. */ diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c index 3e52ef3fa8..3c5e42f9c6 100644 --- a/epan/dissectors/packet-zbee-zdp.c +++ b/epan/dissectors/packet-zbee-zdp.c @@ -55,7 +55,7 @@ static int hf_zbee_zdp_length = -1; /* Deprecates since ZigBee 2006. */ /* General indicies. */ int hf_zbee_zdp_ext_addr = -1; - int hf_zbee_zdp_device = -1; + int hf_zbee_zdp_nwk_addr = -1; int hf_zbee_zdp_req_type = -1; int hf_zbee_zdp_index = -1; static int hf_zbee_zdp_status = -1; @@ -1333,8 +1333,8 @@ void proto_register_zbee_zdp(void) { "Extended Address", "zbee_zdp.ext_addr", FT_EUI64, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_zbee_zdp_device, - { "Device", "zbee_zdp.device", FT_UINT16, BASE_HEX, NULL, 0x0, + { &hf_zbee_zdp_nwk_addr, + { "Nwk Addr of Interest", "zbee_zdp.nwk_addr", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_zbee_zdp_req_type, @@ -1390,11 +1390,11 @@ void proto_register_zbee_zdp(void) NULL, HFILL }}, { &hf_zbee_zdp_in_cluster, - { "Input Cluster", "zbee_zdp.in_cluster", FT_UINT16, BASE_DEC, NULL, 0x0, + { "Input Cluster", "zbee_zdp.in_cluster", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_zbee_zdp_out_cluster, - { "Output Cluster", "zbee_zdp.out_cluster", FT_UINT16, BASE_DEC, NULL, 0x0, + { "Output Cluster", "zbee_zdp.out_cluster", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_zbee_zdp_assoc_device_count, diff --git a/epan/dissectors/packet-zbee-zdp.h b/epan/dissectors/packet-zbee-zdp.h index 9a47640be4..1d8aa35f11 100644 --- a/epan/dissectors/packet-zbee-zdp.h +++ b/epan/dissectors/packet-zbee-zdp.h @@ -209,7 +209,7 @@ */ /* General indicies. */ extern int hf_zbee_zdp_ext_addr; -extern int hf_zbee_zdp_device; +extern int hf_zbee_zdp_nwk_addr; extern int hf_zbee_zdp_req_type; extern int hf_zbee_zdp_index; extern int hf_zbee_zdp_ep_count; |