-/* packet-zbee-zcl-on-off.c
- * Dissector routines for the ZigBee ZCL On Off cluster
+/* packet-zbee-zcl-general.c
+ * Dissector routines for the ZigBee ZCL General clusters like
+ * Basic, Identify, OnOff ...
* By Fabio Tarabelloni <fabio.tarabelloni@reloc.it>
- * Copyright 2012 RELOC s.r.l.
+ * Copyright 2013 RELOC s.r.l.
*
* $Id$
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
/* Include Files */
#include "config.h"
#include "packet-zbee-aps.h"
#include "packet-zbee-zcl.h"
+/* ########################################################################## */
+/* #### (0x0006) ON/OFF CLUSTER ############################################# */
+/* ########################################################################## */
+
/*************************/
/* Defines */
/*************************/
static void dissect_zcl_on_off_attr_id (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id);
static void dissect_zcl_on_off_attr_data (proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type);
-/********************
- * Global Variables *
- ********************/
+/*************************/
+/* Global Variables */
+/*************************/
/* Initialize the protocol and registered fields */
static int proto_zbee_zcl_on_off = -1;
{ 0, NULL }
};
+/*************************/
+/* Function Bodies */
+/*************************/
+
/*FUNCTION:------------------------------------------------------
* NAME
* dissect_zbee_zcl_onoff
/* Add the command ID. */
proto_tree_add_item(tree, hf_zbee_zcl_on_off_srv_rx_cmd_id, tvb, offset, sizeof(guint8), cmd_id);
}
- /*offset += (int)sizeof(guint8);*/
+ offset += (int)sizeof(guint8);
/* Append the command name to the info column. */
col_append_fstr(pinfo->cinfo, COL_INFO, "%s, Seq: %u",
* NAME
* dissect_zcl_on_off_attr_id
* DESCRIPTION
+ * this function is called by ZCL foundation dissector in order to decode
+ * specific cluster attributes identifier.
* PARAMETERS
+ * proto_tree *tree - pointer to data tree Wireshark uses to display packet.
+ * tvbuff_t *tvb - pointer to buffer containing raw packet.
+ * guint *offset - pointer to buffer offset
+ * guint16 attr_id - attribute identifier
+ *
* RETURNS
* none
*---------------------------------------------------------------
* NAME
* dissect_zcl_on_off_attr_data
* DESCRIPTION
+ * this function is called by ZCL foundation dissector in order to decode
+ * specific cluster attributes data.
* PARAMETERS
+ * proto_tree *tree - pointer to data tree Wireshark uses to display packet.
+ * tvbuff_t *tvb - pointer to buffer containing raw packet.
+ * guint *offset - pointer to buffer offset
+ * guint16 attr_id - attribute identifier
+ * guint data_type - attribute data type
* RETURNS
* none
*---------------------------------------------------------------
static hf_register_info hf[] = {
{ &hf_zbee_zcl_on_off_attr_id,
- { "Attribute", "zbee.zcl.on_off.attr.id", FT_UINT16, BASE_HEX, VALS(zbee_zcl_on_off_attr_names),
+ { "Attribute", "zbee_zcl_general.onoff.attr_id", FT_UINT16, BASE_HEX, VALS(zbee_zcl_on_off_attr_names),
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_on_off_attr_onoff,
- { "Data Value", "zbee.zcl.on_off.attr.onoff", FT_UINT8, BASE_HEX, VALS(zbee_zcl_on_off_onoff_names),
+ { "Data Value", "zbee_zcl_general.onoff.attr.onoff", FT_UINT8, BASE_HEX, VALS(zbee_zcl_on_off_onoff_names),
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_on_off_srv_rx_cmd_id,
- { "Command", "zbee.zcl.on_off.srv_rx.cmd.id", FT_UINT8, BASE_HEX, VALS(zbee_zcl_on_off_srv_rx_cmd_names),
+ { "Command", "zbee_zcl_general.onoff.cmd.srv_rx.id", FT_UINT8, BASE_HEX, VALS(zbee_zcl_on_off_srv_rx_cmd_names),
0x00, NULL, HFILL } }
};