aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Sy <dana.hayden.sy@gmail.com>2018-04-09 17:06:48 -0700
committerAnders Broman <a.broman58@gmail.com>2018-04-11 06:32:53 +0000
commit4685dea443b8babb94c28e52b0bf3e3c2864da25 (patch)
tree53689d9742b03352cf46033bc2dabd21600b6a78
parentbddd7577a396de1685f96230f1a2ebdf6251b999 (diff)
ZigBee: MGMT Unsolicited Enh NWKUpdate dissector
Added a dissector for the mgmt_nwk_unsolicited_enhanced_update_notify from the R22 spec (clusterID = 0x003b) Change-Id: I5d60ef0a762f932a7f814743d1c219428c8f9e73 Reviewed-on: https://code.wireshark.org/review/26865 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-zbee-zdp-management.c26
-rw-r--r--epan/dissectors/packet-zbee-zdp.c14
-rw-r--r--epan/dissectors/packet-zbee-zdp.h4
3 files changed, 44 insertions, 0 deletions
diff --git a/epan/dissectors/packet-zbee-zdp-management.c b/epan/dissectors/packet-zbee-zdp-management.c
index cb22b73..5d23e56 100644
--- a/epan/dissectors/packet-zbee-zdp-management.c
+++ b/epan/dissectors/packet-zbee-zdp-management.c
@@ -471,6 +471,32 @@ dissect_zbee_zdp_req_mgmt_ieee_join_list(tvbuff_t *tvb, packet_info *pinfo, prot
zdp_dump_excess(tvb, offset, pinfo, tree);
} /* dissect_zbee_zdp_req_mgmt_ieee_join_list */
+/**
+ *ZigBee Device Profile dissector for the unsolicited nwk update notify.
+ *
+ *@param tvb pointer to buffer containing raw packet.
+ *@param pinfo pointer to packet information fields
+ *@param tree pointer to data tree Wireshark uses to display packet.
+*/
+void
+dissect_zbee_zdp_req_mgmt_unsolicited_nwkupdate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset = 0;
+
+ zdp_parse_chanmask(tree, tvb, &offset, hf_zbee_zdp_channel_page, hf_zbee_zdp_channel_mask);
+ proto_tree_add_item(tree, hf_zbee_zdp_tx_total, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_zbee_zdp_tx_fail, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_zbee_zdp_tx_retries, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_zbee_zdp_period_time_results, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset += 1;
+
+ /* Dump any leftover bytes. */
+ zdp_dump_excess(tvb, offset, pinfo, tree);
+} /* dissect_zbee_zdp_req_mgmt_unsolicited_nwkupdate */
+
/**************************************
* MANAGEMENT RESPONSES
**************************************
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 2327605..1a51bcc 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -151,6 +151,8 @@ static int hf_zbee_zdp_complex = -1;
int hf_zbee_zdp_manager = -1;
int hf_zbee_zdp_tx_total = -1;
int hf_zbee_zdp_tx_fail = -1;
+ int hf_zbee_zdp_tx_retries = -1;
+ int hf_zbee_zdp_period_time_results = -1;
int hf_zbee_zdp_channel_count = -1;
int hf_zbee_zdp_channel_mask = -1;
int hf_zbee_zdp_channel_page = -1;
@@ -277,6 +279,7 @@ const value_string zbee_zdp_cluster_names[] = {
{ ZBEE_ZDP_REQ_MGMT_NWKUPDATE, "Network Update Request" },
{ ZBEE_ZDP_REQ_MGMT_NWKUPDATE_ENH, "Network Update Enhanced Request" },
{ ZBEE_ZDP_REQ_MGMT_IEEE_JOIN_LIST, "IEEE Joining List Request" },
+ { ZBEE_ZDP_REQ_MGMT_UNSOLICITED_NWKUPDATE, "Unsolicited Enhanced Network Update Notify" },
{ ZBEE_ZDP_RSP_NWK_ADDR, "Network Address Response" },
{ ZBEE_ZDP_RSP_IEEE_ADDR, "Extended Address Response" },
@@ -1130,6 +1133,9 @@ dissect_zbee_zdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
case ZBEE_ZDP_REQ_MGMT_IEEE_JOIN_LIST:
dissect_zbee_zdp_req_mgmt_ieee_join_list(zdp_tvb, pinfo, zdp_tree);
break;
+ case ZBEE_ZDP_REQ_MGMT_UNSOLICITED_NWKUPDATE:
+ dissect_zbee_zdp_req_mgmt_unsolicited_nwkupdate(zdp_tvb, pinfo, zdp_tree);
+ break;
case ZBEE_ZDP_RSP_NWK_ADDR:
dissect_zbee_zdp_rsp_nwk_addr(zdp_tvb, pinfo, zdp_tree);
break;
@@ -1642,6 +1648,14 @@ void proto_register_zbee_zdp(void)
{ "Failed Transmissions", "zbee_zdp.tx_fail", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
+ { &hf_zbee_zdp_tx_retries,
+ { "Retried Transmissions", "zbee_zdp.tx_retries", FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_zbee_zdp_period_time_results,
+ { "Period of Time For Results", "zbee_zdp.period_time_results", FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
{ &hf_zbee_zdp_channel_count,
{ "Channel List Count", "zbee_zdp.channel_count", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
diff --git a/epan/dissectors/packet-zbee-zdp.h b/epan/dissectors/packet-zbee-zdp.h
index 3045c71..cba3c5f 100644
--- a/epan/dissectors/packet-zbee-zdp.h
+++ b/epan/dissectors/packet-zbee-zdp.h
@@ -62,6 +62,7 @@
#define ZBEE_ZDP_REQ_MGMT_NWKUPDATE 0x0038 /* ZigBee 2007 & later. */
#define ZBEE_ZDP_REQ_MGMT_NWKUPDATE_ENH 0x0039 /* R22 */
#define ZBEE_ZDP_REQ_MGMT_IEEE_JOIN_LIST 0x003a /* R22 */
+#define ZBEE_ZDP_REQ_MGMT_UNSOLICITED_NWKUPDATE 0x003b /* R22 */
#define ZBEE_ZDP_RSP_NWK_ADDR 0x8000
#define ZBEE_ZDP_RSP_IEEE_ADDR 0x8001
@@ -250,6 +251,8 @@ extern int hf_zbee_zdp_update_id;
extern int hf_zbee_zdp_manager;
extern int hf_zbee_zdp_tx_total;
extern int hf_zbee_zdp_tx_fail;
+extern int hf_zbee_zdp_tx_retries;
+extern int hf_zbee_zdp_period_time_results;
extern int hf_zbee_zdp_channel_count;
extern int hf_zbee_zdp_channel_mask;
extern int hf_zbee_zdp_channel_page;
@@ -383,6 +386,7 @@ extern void dissect_zbee_zdp_req_mgmt_cache (tvbuff_t *tvb, packet_i
extern void dissect_zbee_zdp_req_mgmt_nwkupdate (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_zbee_zdp_req_mgmt_nwkupdate_enh (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_zbee_zdp_req_mgmt_ieee_join_list (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void dissect_zbee_zdp_req_mgmt_unsolicited_nwkupdate (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_zbee_zdp_rsp_nwk_addr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_zbee_zdp_rsp_ext_addr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);