diff options
author | Chris Brandson <chris.brandson@gmail.com> | 2016-04-15 13:29:47 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-04-16 15:58:36 +0000 |
commit | eab63865d8e6cf03e7002c09775f1f799e11b4d3 (patch) | |
tree | 339b6b4bc924b74d5c3dae0f330c3bd5249a1a42 /epan | |
parent | 61b3d0392b3cfcbb48bba7fc9ae2099bf53f47a3 (diff) |
ZigBee support for NWK unknown command status and enhanced status message in R22
Added support for the a new Network UNKNOWN_COMMAND status value for and the
added payload to the Network Status frame to hold the Command Id that is not known.
Change-Id: Ia0ff890ea17c18c98eb47c15f1074df30cb9d568
Reviewed-on: https://code.wireshark.org/review/14934
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 1c1c47a18c..3816f08080 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -123,6 +123,7 @@ static int hf_zbee_nwk_cmd_route_opt_resp_ext = -1; static int hf_zbee_nwk_cmd_route_opt_orig_ext = -1; static int hf_zbee_nwk_cmd_route_opt_many_to_one = -1; static int hf_zbee_nwk_cmd_nwk_status = -1; +static int hf_zbee_nwk_cmd_nwk_status_command_id = -1; static int hf_zbee_nwk_cmd_leave_rejoin = -1; static int hf_zbee_nwk_cmd_leave_request = -1; static int hf_zbee_nwk_cmd_leave_children = -1; @@ -1026,6 +1027,7 @@ static guint dissect_zbee_nwk_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset) { guint8 status_code; + guint8 command_id; guint16 addr; /* Get and display the status code. */ @@ -1041,6 +1043,14 @@ dissect_zbee_nwk_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui /* Update the info column. */ col_append_fstr(pinfo->cinfo, COL_INFO, ", 0x%04x: %s", addr, val_to_str_const(status_code, zbee_nwk_status_codes, "Unknown Status Code")); + if (status_code == ZBEE_NWK_STATUS_UNKNOWN_COMMAND) { + command_id = tvb_get_guint8(tvb, offset); + proto_tree_add_uint(tree, hf_zbee_nwk_cmd_nwk_status_command_id, tvb, offset, 1, command_id); + col_append_fstr(pinfo->cinfo, COL_INFO, ", Unknown Command ID 0x%02x (%s)", command_id, + val_to_str_const(command_id, zbee_nwk_cmd_names, "Unknown ID")); + offset++; + } + /* Done */ return offset; } /* dissect_zbee_nwk_status */ @@ -1905,6 +1915,10 @@ void proto_register_zbee_nwk(void) { "Status Code", "zbee_nwk.cmd.status", FT_UINT8, BASE_HEX, VALS(zbee_nwk_status_codes), 0x0, NULL, HFILL }}, + { &hf_zbee_nwk_cmd_nwk_status_command_id, + { "Unknown Command ID", "zbee_nwk.cmd.status.unknown_command_id", FT_UINT8, BASE_HEX, + VALS(zbee_nwk_cmd_names), 0x0, NULL, HFILL }}, + { &hf_zbee_nwk_cmd_leave_rejoin, { "Rejoin", "zbee_nwk.cmd.leave.rejoin", FT_BOOLEAN, 8, NULL, ZBEE_NWK_CMD_LEAVE_OPTION_REJOIN, "Flag instructing the device to rejoin the network.", HFILL }}, diff --git a/epan/dissectors/packet-zbee-nwk.h b/epan/dissectors/packet-zbee-nwk.h index a7e7de3402..4bd9273bf0 100644 --- a/epan/dissectors/packet-zbee-nwk.h +++ b/epan/dissectors/packet-zbee-nwk.h @@ -130,6 +130,7 @@ #define ZBEE_NWK_STATUS_ADDRESS_UPDATE 0x10 #define ZBEE_NWK_STATUS_BAD_FRAME_COUNTER 0x11 #define ZBEE_NWK_STATUS_BAD_KEY_SEQNO 0x12 +#define ZBEE_NWK_STATUS_UNKNOWN_COMMAND 0x13 #define ZBEE_SEC_CONST_KEYSIZE 16 |