From Fabio Tarabelloni via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718 Zigbee dissectors for the power profile cluster and the appliance control cluster svn path=/trunk/; revision=50229
This commit is contained in:
parent
7c72e1c5ce
commit
04f8906be3
File diff suppressed because it is too large
Load Diff
|
@ -707,17 +707,17 @@ static void dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
|
||||
zbee_zcl_packet packet;
|
||||
zbee_zcl_cluster_desc *desc;
|
||||
|
||||
|
||||
guint8 fcf;
|
||||
guint offset = 0;
|
||||
|
||||
/* Init. */
|
||||
memset(&packet, 0, sizeof(zbee_zcl_packet));
|
||||
|
||||
|
||||
/* Fill the zcl cluster id */
|
||||
zcl_cluster_id = pinfo->zbee_cluster_id;
|
||||
cluster_handle = dissector_get_uint_handle(zbee_zcl_dissector_table, zcl_cluster_id);
|
||||
|
||||
|
||||
/* Create the protocol tree */
|
||||
if ( tree ) {
|
||||
proto_root = proto_tree_add_protocol_format(tree, proto_zbee_zcl, tvb, offset,
|
||||
|
@ -788,10 +788,10 @@ static void dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
packet.cmd_id = tvb_get_guint8(tvb, offset);
|
||||
|
||||
desc = zbee_zcl_get_cluster_desc(zcl_cluster_id);
|
||||
if (desc != NULL) {
|
||||
if (desc != NULL) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s: ", desc->name);
|
||||
}
|
||||
|
||||
|
||||
/* Add command ID to the tree. */
|
||||
if ( packet.frame_type == ZBEE_ZCL_FCF_PROFILE_WIDE ) {
|
||||
if ( tree ) {
|
||||
|
@ -799,11 +799,11 @@ static void dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
val_to_str_ext_const(packet.cmd_id, &zbee_zcl_cmd_names_ext, "Unknown Command"),
|
||||
packet.tran_seqno);
|
||||
}
|
||||
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s, Seq: %u",
|
||||
val_to_str_ext_const(packet.cmd_id, &zbee_zcl_cmd_names_ext, "Unknown Command"),
|
||||
packet.tran_seqno);
|
||||
|
||||
|
||||
if ( zcl_tree ) {
|
||||
proto_tree_add_uint(zcl_tree, hf_zbee_zcl_cmd_id, tvb, offset, (int)1,
|
||||
packet.cmd_id);
|
||||
|
@ -813,11 +813,11 @@ static void dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
else {
|
||||
/* Cluster Specific */
|
||||
payload_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
|
||||
|
||||
if (cluster_handle != NULL) {
|
||||
/* Call the specific cluster dissector registered */
|
||||
pinfo->private_data = (void *)&packet;
|
||||
call_dissector(cluster_handle, payload_tvb, pinfo, zcl_tree);
|
||||
pinfo->private_data = (void *)&packet;
|
||||
call_dissector(cluster_handle, payload_tvb, pinfo, zcl_tree);
|
||||
}
|
||||
else {
|
||||
proto_item_append_text(proto_root, ", Cluster-specific Command: 0x%02x, Seq: %u",
|
||||
|
@ -2133,6 +2133,22 @@ void decode_zcl_time_in_seconds(gchar *s, guint16 value)
|
|||
return;
|
||||
} /* decode_zcl_time_in_seconds*/
|
||||
|
||||
/*FUNCTION:------------------------------------------------------
|
||||
* NAME
|
||||
* decode_zcl_time_in_minutes
|
||||
* DESCRIPTION
|
||||
* this function decodes minute time type variable
|
||||
* PARAMETERS
|
||||
* RETURNS
|
||||
* none
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
void decode_zcl_time_in_minutes(gchar *s, guint16 value)
|
||||
{
|
||||
g_snprintf(s, ITEM_LABEL_LENGTH, "%d minutes", value);
|
||||
return;
|
||||
} /*decode_zcl_time_in_minutes*/
|
||||
|
||||
/*FUNCTION:------------------------------------------------------
|
||||
* NAME
|
||||
* proto_register_zbee_zcl
|
||||
|
|
|
@ -197,6 +197,7 @@ extern void dissect_zcl_read_attr_resp (tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
|
||||
/* Helper functions */
|
||||
void decode_zcl_time_in_seconds (gchar *s, guint16 value);
|
||||
void decode_zcl_time_in_minutes (gchar *s, guint16 value);
|
||||
void dissect_zcl_attr_data (tvbuff_t *tvb, proto_tree *tree, guint *offset, guint data_type);
|
||||
void zbee_zcl_init_cluster(int proto, gint ett, guint16 cluster_id, zbee_zcl_fn_attr_id fn_attr_id, zbee_zcl_fn_attr_data fn_attr_data);
|
||||
zbee_zcl_cluster_desc *zbee_zcl_get_cluster_desc(guint16 cluster_id);
|
||||
|
|
|
@ -787,6 +787,7 @@
|
|||
#define ZBEE_PROTOABBREV_APS "zbee_aps"
|
||||
#define ZBEE_PROTOABBREV_APF "zbee_apf"
|
||||
#define ZBEE_PROTOABBREV_ZCL "zbee_zcl"
|
||||
#define ZBEE_PROTOABBREV_ZCL_APPLCTRL "zbee_zcl_general.applctrl"
|
||||
#define ZBEE_PROTOABBREV_ZCL_BASIC "zbee_zcl_general.basic"
|
||||
#define ZBEE_PROTOABBREV_ZCL_IDENTIFY "zbee_zcl_general.identify"
|
||||
#define ZBEE_PROTOABBREV_ZCL_APPLEVTALT "zbee_zcl_ha.applevtalt"
|
||||
|
@ -795,6 +796,7 @@
|
|||
#define ZBEE_PROTOABBREV_ZCL_METIDT "zbee_zcl_ha.metidt"
|
||||
#define ZBEE_PROTOABBREV_ZCL_ONOFF "zbee_zcl_general.onoff"
|
||||
#define ZBEE_PROTOABBREV_ZCL_PART "zbee_zcl_general.part"
|
||||
#define ZBEE_PROTOABBREV_ZCL_PWRPROF "zbee_zcl_general.pwrprof"
|
||||
#define ZBEE_PROTOABBREV_ZCL_ILLUMMEAS "zbee_zcl_meas_sensing.illummeas"
|
||||
#define ZBEE_PROTOABBREV_ZCL_PRESSMEAS "zbee_zcl_meas_sensing.pressmeas"
|
||||
#define ZBEE_PROTOABBREV_ZCL_RELHUMMEAS "zbee_zcl_meas_sensing.relhummeas"
|
||||
|
|
Loading…
Reference in New Issue