forked from osmocom/wireshark
ZigBee: implemented Green Power ZCL cluster dissector.
Implemented basic Green Power ZCL cluster support and parsing of some GP cluster commands. Implemented following commands parsing: GP_NOTIFICATION GP_COMMISSIONING_NOTIFICATION GP_PAIRING GP_PROXY_COMMISSIONING_MODE GP_RESPONSE That is enough for Green Power Basic Proxy commissioning. Change-Id: Icbe00667a6dfb89346288843ce8fa20d62b822dc Reviewed-on: https://code.wireshark.org/review/15363 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
01830846ef
commit
a558178874
|
@ -355,6 +355,7 @@ const range_string zbee_aps_apid_names[] = {
|
|||
{ ZBEE_PROFILE_STD_MIN, ZBEE_PROFILE_STD_MAX, "Unknown ZigBee Standard" },
|
||||
|
||||
{ ZBEE_PROFILE_T2, ZBEE_PROFILE_T2, "Test Profile #2" },
|
||||
{ ZBEE_PROFILE_GP, ZBEE_PROFILE_GP, "Green Power" },
|
||||
{ ZBEE_PROFILE_RSVD0_MIN, ZBEE_PROFILE_RSVD0_MAX, "Unknown ZigBee Reserved" },
|
||||
{ ZBEE_PROFILE_RSVD1_MIN, ZBEE_PROFILE_RSVD1_MAX, "Unknown ZigBee Reserved" },
|
||||
|
||||
|
@ -536,6 +537,7 @@ const range_string zbee_aps_apid_abbrs[] = {
|
|||
{ ZBEE_PROFILE_SE, ZBEE_PROFILE_SE, "SE" },
|
||||
{ ZBEE_PROFILE_RS, ZBEE_PROFILE_RS, "RS" },
|
||||
{ ZBEE_PROFILE_T2, ZBEE_PROFILE_T2, "T2" },
|
||||
{ ZBEE_PROFILE_GP, ZBEE_PROFILE_GP, "GP" },
|
||||
/* Manufacturer Allocations */
|
||||
{ ZBEE_PROFILE_C4_MIN, ZBEE_PROFILE_C4_MAX, "C4" },
|
||||
|
||||
|
@ -572,6 +574,7 @@ const value_string zbee_aps_cid_names[] = {
|
|||
{ ZBEE_ZCL_CID_PARTITION, "Partition"},
|
||||
{ ZBEE_ZCL_CID_OTA_UPGRADE, "OTA Upgrade"},
|
||||
{ ZBEE_ZCL_CID_POLL_CONTROL, "Poll Control"},
|
||||
{ ZBEE_ZCL_CID_GP, "Green Power"},
|
||||
/* */
|
||||
{ ZBEE_ZCL_CID_POWER_PROFILE, "Power Profile"},
|
||||
{ ZBEE_ZCL_CID_APPLIANCE_CONTROL, "Appliance Control"},
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
#define ZBEE_ZCL_CID_PARTITION 0x0016
|
||||
#define ZBEE_ZCL_CID_OTA_UPGRADE 0x0019
|
||||
#define ZBEE_ZCL_CID_POLL_CONTROL 0x0020
|
||||
#define ZBEE_ZCL_CID_GP 0x0021
|
||||
/* */
|
||||
#define ZBEE_ZCL_CID_POWER_PROFILE 0x001a
|
||||
#define ZBEE_ZCL_CID_APPLIANCE_CONTROL 0x001b
|
||||
|
|
|
@ -417,11 +417,11 @@ static const value_string zbee_nwk_gp_app_id_names[] = {
|
|||
VALUE_STRING_ENUM(zbee_nwk_gp_cmd_names);
|
||||
|
||||
VALUE_STRING_ARRAY(zbee_nwk_gp_cmd_names);
|
||||
static value_string_ext zbee_nwk_gp_cmd_names_ext = VALUE_STRING_EXT_INIT(zbee_nwk_gp_cmd_names);
|
||||
value_string_ext zbee_nwk_gp_cmd_names_ext = VALUE_STRING_EXT_INIT(zbee_nwk_gp_cmd_names);
|
||||
|
||||
|
||||
/* Green Power devices. */
|
||||
static const value_string zbee_nwk_gp_device_ids_names[] = {
|
||||
const value_string zbee_nwk_gp_device_ids_names[] = {
|
||||
|
||||
/* GP GENERIC */
|
||||
{ GPD_DEVICE_ID_GENERIC_GP_SIMPLE_GENERIC_1STATE_SWITCH, "Generic: GP Simple Generic 1-state Switch" },
|
||||
|
@ -959,7 +959,7 @@ dissect_zbee_nwk_gp_cmd_step_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, prot
|
|||
*@param data raw packet private data.
|
||||
*@return payload processed offset
|
||||
*/
|
||||
static guint
|
||||
static int
|
||||
dissect_zbee_nwk_gp_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
||||
{
|
||||
guint offset = 0;
|
||||
|
@ -1686,6 +1686,7 @@ proto_register_zbee_nwk_gp(void)
|
|||
|
||||
/* Register the dissectors. */
|
||||
register_dissector(ZBEE_PROTOABBREV_NWK_GP, dissect_zbee_nwk_gp, proto_zbee_nwk_gp);
|
||||
register_dissector(ZBEE_PROTOABBREV_NWK_GP_CMD, dissect_zbee_nwk_gp_cmd, proto_zbee_nwk_gp);
|
||||
} /* proto_register_zbee_nwk_gp */
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2289,6 +2289,7 @@ void proto_reg_handoff_zbee_zcl(void)
|
|||
dissector_add_uint("zbee.profile", ZBEE_PROFILE_HC, zbee_zcl_handle);
|
||||
dissector_add_uint("zbee.profile", ZBEE_PROFILE_SE, zbee_zcl_handle);
|
||||
dissector_add_uint("zbee.profile", ZBEE_PROFILE_RS, zbee_zcl_handle);
|
||||
dissector_add_uint("zbee.profile", ZBEE_PROFILE_GP, zbee_zcl_handle);
|
||||
|
||||
dissector_add_uint("zbee.profile", ZBEE_PROFILE_C4_CL, zbee_zcl_handle);
|
||||
} /* proto_reg_handoff_zbee_zcl */
|
||||
|
|
|
@ -80,6 +80,8 @@
|
|||
#define ZBEE_PROFILE_RSVD1_MIN 0x8000
|
||||
#define ZBEE_PROFILE_RSVD1_MAX 0xbeff
|
||||
|
||||
#define ZBEE_PROFILE_GP 0xa1e0
|
||||
|
||||
/* Organization Profile IDs */
|
||||
#define ZBEE_PROFILE_IEEE_1451_5 0xbf00
|
||||
|
||||
|
@ -1117,6 +1119,7 @@
|
|||
/* Protocol Abbreviations */
|
||||
#define ZBEE_PROTOABBREV_NWK "zbee_nwk"
|
||||
#define ZBEE_PROTOABBREV_NWK_GP "zbee_nwk_gp"
|
||||
#define ZBEE_PROTOABBREV_NWK_GP_CMD "zbee_nwk_gp_cmd"
|
||||
#define ZBEE_PROTOABBREV_APS "zbee_aps"
|
||||
#define ZBEE_PROTOABBREV_ZCL "zbee_zcl"
|
||||
#define ZBEE_PROTOABBREV_ZCL_APPLCTRL "zbee_zcl_general.applctrl"
|
||||
|
@ -1173,6 +1176,7 @@
|
|||
#define ZBEE_PROTOABBREV_ZCL_DOOR_LOCK "zbee_zcl_closures.door_lock"
|
||||
#define ZBEE_PROTOABBREV_ZCL_COLOR_CONTROL "zbee_zcl_lighting.color_ctrl"
|
||||
#define ZBEE_PROTOABBREV_ZCL_BALLAST_CONFIG "zbee_zcl_lighting.ballast_ctrl"
|
||||
#define ZBEE_PROTOABBREV_ZCL_GP "zbee_zcl_general.gp"
|
||||
|
||||
/* ZigBee Vendor Sub IE Fields */
|
||||
#define ZBEE_ZIGBEE_IE_ID_MASK 0xFFC0
|
||||
|
|
Loading…
Reference in New Issue