Zbee(zc): Changing comment format(javadoc=>Doxygen)

Change-Id: Ic0b5d7139e324cbbe786cb4a0cf7d9f924acdf04
Reviewed-on: https://code.wireshark.org/review/12818
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: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Rishi Dev Singh 2015-12-22 11:43:31 +05:30 committed by Michael Mann
parent b978d25179
commit 3bd69dac73
6 changed files with 1019 additions and 1958 deletions

View File

@ -547,20 +547,13 @@ uat_key_record_free_cb(void *r)
} }
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *Parses a key string from left to right into a buffer with increasing (normal byte order) or decreasing (reverse
* zbee_gp_security_parse_key *
* DESCRIPTION *@param key_str pointer to the string
* Parses a key string from left to right into a buffer with increasing (normal byte order) or decreasing (reverse *@param key_buf destination buffer in memory
* byte order) address. *@param byte_order byte order
* PARAMETERS */
* const gchar *key_str - pointer to the string
* guint8 *key_buf - destination buffer in memory
* gboolean byte_order - byte order
* RETURNS
* gboolean
*---------------------------------------------------------------
*/
static gboolean static gboolean
zbee_gp_security_parse_key(const gchar *key_str, guint8 *key_buf, gboolean byte_order) zbee_gp_security_parse_key(const gchar *key_str, guint8 *key_buf, gboolean byte_order)
{ {
@ -637,21 +630,16 @@ uat_key_record_update_cb(void *r, char **err)
return TRUE; return TRUE;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power commissioning.
* dissect_zbee_nwk_gp_cmd_commissioning *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power commissioning. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_commissioning(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_commissioning(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -745,21 +733,16 @@ dissect_zbee_nwk_gp_cmd_commissioning(tvbuff_t *tvb, packet_info *pinfo _U_, pro
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_commissioning */ } /* dissect_zbee_nwk_gp_cmd_commissioning */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power channel request.
* dissect_zbee_nwk_gp_cmd_channel_request *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power channel request. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_channel_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_channel_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -776,21 +759,16 @@ dissect_zbee_nwk_gp_cmd_channel_request(tvbuff_t *tvb, packet_info *pinfo _U_, p
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_channel_request */ } /* dissect_zbee_nwk_gp_cmd_channel_request */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power channel configuration.
* dissect_zbee_nwk_gp_cmd_channel_configuration *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power channel configuration. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_channel_configuration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_channel_configuration(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -807,21 +785,16 @@ dissect_zbee_nwk_gp_cmd_channel_configuration(tvbuff_t *tvb, packet_info *pinfo
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_channel_configuration */ } /* dissect_zbee_nwk_gp_cmd_channel_configuration */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power commands attrib reporting.
* dissect_zbee_nwk_gp_cmd_attr_reporting *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power commands attrib reporting. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_attr_reporting(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_attr_reporting(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -842,21 +815,16 @@ dissect_zbee_nwk_gp_cmd_attr_reporting(tvbuff_t *tvb, packet_info *pinfo _U_, pr
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_attr_reporting */ } /* dissect_zbee_nwk_gp_cmd_attr_reporting */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power comissioning reply.
* dissect_zbee_nwk_gp_cmd_commissioning_reply *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power comissioning reply. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_commissioning_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_commissioning_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -896,21 +864,16 @@ dissect_zbee_nwk_gp_cmd_commissioning_reply(tvbuff_t *tvb, packet_info *pinfo _U
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_commissioning_reply */ } /* dissect_zbee_nwk_gp_cmd_commissioning_reply */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power Move Color.
* dissect_zbee_nwk_gp_cmd_move_color *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power Move Color. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_move_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_move_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -922,21 +885,16 @@ dissect_zbee_nwk_gp_cmd_move_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_move_color */ } /* dissect_zbee_nwk_gp_cmd_move_color */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power Move Up/Down.
* dissect_zbee_nwk_gp_cmd_move_up_down *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power Move Up/Down. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_move_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_move_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -946,21 +904,16 @@ dissect_zbee_nwk_gp_cmd_move_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, prot
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_move_up_down */ } /* dissect_zbee_nwk_gp_cmd_move_up_down */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power Step Color.
* dissect_zbee_nwk_gp_cmd_step_color *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power Step Color. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_step_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_step_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -977,21 +930,16 @@ dissect_zbee_nwk_gp_cmd_step_color(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_step_color */ } /* dissect_zbee_nwk_gp_cmd_step_color */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power Step Up/Down.
* dissect_zbee_nwk_gp_cmd_step_up_down *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power Step Up/Down. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param packet packet data.
* packet_into *pinfo - pointer to packet information fields. *@param offset current payload offset.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@return payload processed offset.
* zbee_nwk_green_power_packet *packet - packet data. */
* guint offset - current payload offset.
* RETURNS
* guint - payload processed offset.
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd_step_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, dissect_zbee_nwk_gp_cmd_step_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
zbee_nwk_green_power_packet *packet _U_, guint offset) zbee_nwk_green_power_packet *packet _U_, guint offset)
@ -1003,20 +951,15 @@ dissect_zbee_nwk_gp_cmd_step_up_down(tvbuff_t *tvb, packet_info *pinfo _U_, prot
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd_step_up_down */ } /* dissect_zbee_nwk_gp_cmd_step_up_down */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissector for ZigBee Green Power commands.
* dissect_zbee_nwk_gp_cmd *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissector for ZigBee Green Power commands. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data raw packet private data.
* packet_into *pinfo - pointer to packet information fields. *@return payload processed offset
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* void *data - raw packet private data.
* RETURNS
* guint - payload processed offset
*---------------------------------------------------------------
*/
static guint static guint
dissect_zbee_nwk_gp_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) dissect_zbee_nwk_gp_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{ {
@ -1152,18 +1095,12 @@ dissect_zbee_nwk_gp_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
return offset; return offset;
} /* dissect_zbee_nwk_gp_cmd */ } /* dissect_zbee_nwk_gp_cmd */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Fills in ZigBee GP security nonce from the provided packet structure.
* zbee_sec_make_nonce *
* DESCRIPTION *@param packet ZigBee NWK packet.
* Fills in ZigBee GP security nonce from the provided packet structure. *@param nonce nonce buffer.
* PARAMETERS */
* zbee_nwk_green_power_packet *packet - ZigBee NWK packet.
* gchar *nonce - nonce buffer.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
zbee_gp_make_nonce(zbee_nwk_green_power_packet *packet, gchar *nonce) zbee_gp_make_nonce(zbee_nwk_green_power_packet *packet, gchar *nonce)
{ {
@ -1192,23 +1129,17 @@ zbee_gp_make_nonce(zbee_nwk_green_power_packet *packet, gchar *nonce)
/* TODO: implement if application_id != ZB_ZGP_APP_ID_0000. */ /* TODO: implement if application_id != ZB_ZGP_APP_ID_0000. */
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *Creates a nonce and decrypts secured ZigBee GP payload.
* zbee_sec_decrypt_payload *
* DESCRIPTION *@param packet ZigBee NWK packet.
* Creates a nonce and decrypts secured ZigBee GP payload. *@param enc_buffer encoded payload buffer.
* PARAMETERS *@param offset payload offset.
* zbee_nwk_green_power_packet *packet - ZigBee NWK packet. *@param dec_buffer decoded payload buffer.
* const gchar *enc_buffer - encoded payload buffer. *@param payload_len payload length.
* const gchar offset - payload offset. *@param mic_len MIC length.
* guint8 *dec_buffer - decoded payload buffer. *@param key key.
* guint payload_len - payload length. */
* guint mic_len - MIC length.
* guint8 *key - key.
* RETURNS
* gboolean
*---------------------------------------------------------------
*/
static gboolean static gboolean
zbee_gp_decrypt_payload(zbee_nwk_green_power_packet *packet, const gchar *enc_buffer, const gchar offset, guint8 zbee_gp_decrypt_payload(zbee_nwk_green_power_packet *packet, const gchar *enc_buffer, const gchar offset, guint8
*dec_buffer, guint payload_len, guint mic_len, guint8 *key) *dec_buffer, guint payload_len, guint mic_len, guint8 *key)
@ -1225,20 +1156,14 @@ zbee_gp_decrypt_payload(zbee_nwk_green_power_packet *packet, const gchar *enc_bu
return FALSE; return FALSE;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee NWK packet dissection routine for Green Power profile.
* dissect_zbee_nwk_gp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee NWK packet dissection routine for Green Power profile. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data raw packet private data.
* packet_into *pinfo - pointer to packet information fields. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* void *data - raw packet private data.
* RETURNS
* int
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_nwk_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) dissect_zbee_nwk_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{ {
@ -1390,20 +1315,14 @@ dissect_zbee_nwk_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /* dissect_zbee_nwk_gp */ } /* dissect_zbee_nwk_gp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Heuristic interpreter for the ZigBee Green Power dissectors.
* dissect_zbee_nwk_heur_gp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Heuristic interpreter for the ZigBee Green Power dissectors. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data raw packet private data.
* packet_into *pinfo - pointer to packet information fields. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* void *data - raw packet private data.
* RETURNS
* Boolean value, whether it handles the packet or not.
*---------------------------------------------------------------
*/
static gboolean static gboolean
dissect_zbee_nwk_heur_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) dissect_zbee_nwk_heur_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{ {
@ -1435,17 +1354,10 @@ dissect_zbee_nwk_heur_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
return FALSE; return FALSE;
} /* dissect_zbee_nwk_heur_gp */ } /* dissect_zbee_nwk_heur_gp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Init routine for the ZigBee GP profile security.
* gp_init_zbee_security *
* DESCRIPTION */
* Init routine for the ZigBee GP profile security.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
gp_init_zbee_security(void) gp_init_zbee_security(void)
{ {
@ -1484,17 +1396,10 @@ gp_cleanup_zbee_security(void)
zbee_gp_keyring = NULL; zbee_gp_keyring = NULL;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee NWK GP protocol registration routine.
* proto_register_zbee_nwk_gp *
* DESCRIPTION */
* ZigBee NWK GP protocol registration routine.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_register_zbee_nwk_gp(void) proto_register_zbee_nwk_gp(void)
{ {
@ -1784,17 +1689,10 @@ proto_register_zbee_nwk_gp(void)
register_dissector(ZBEE_PROTOABBREV_NWK_GP, dissect_zbee_nwk_gp, proto_zbee_nwk_gp); register_dissector(ZBEE_PROTOABBREV_NWK_GP, dissect_zbee_nwk_gp, proto_zbee_nwk_gp);
} /* proto_register_zbee_nwk_gp */ } /* proto_register_zbee_nwk_gp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Registers the ZigBee dissector with Wireshark.
* proto_reg_handoff_zbee_nwk_gp *
* DESCRIPTION */
* Registers the ZigBee dissector with Wireshark.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_nwk_gp(void) proto_reg_handoff_zbee_nwk_gp(void)
{ {

View File

@ -203,41 +203,28 @@ static const value_string zbee_zcl_appl_idt_ceced_spec_ver_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Appliance Identification cluster dissector for wireshark.
* dissect_zbee_zcl_appl_idt *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Appliance Identification cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_appl_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_appl_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_appl_idt*/ } /*dissect_zbee_zcl_appl_idt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_appl_idt_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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
*---------------------------------------------------------------
*/
void void
dissect_zcl_appl_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_appl_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -296,18 +283,10 @@ dissect_zcl_appl_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, g
} /*dissect_zcl_appl_idt_attr_data*/ } /*dissect_zcl_appl_idt_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Appliance Identification dissector
* proto_register_zbee_zcl_appl_idt *
* DESCRIPTION */
* this function registers the ZCL Appliance Identification dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_appl_idt(void) proto_register_zbee_zcl_appl_idt(void)
{ {
@ -358,17 +337,10 @@ proto_register_zbee_zcl_appl_idt(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_APPLIDT, dissect_zbee_zcl_appl_idt, proto_zbee_zcl_appl_idt); register_dissector(ZBEE_PROTOABBREV_ZCL_APPLIDT, dissect_zbee_zcl_appl_idt, proto_zbee_zcl_appl_idt);
} /*proto_register_zbee_zcl_appl_idt*/ } /*proto_register_zbee_zcl_appl_idt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Appliance Identification dissector.
* proto_reg_handoff_zbee_zcl_appl_idt *
* DESCRIPTION */
* Hands off the Zcl Appliance Identification dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_appl_idt(void) proto_reg_handoff_zbee_zcl_appl_idt(void)
{ {
@ -492,41 +464,28 @@ static const value_string zbee_zcl_met_idt_data_quality_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Meter Identification cluster dissector for wireshark.
* dissect_zbee_zcl_met_idt *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Meter Identification cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_met_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_met_idt(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_met_idt*/ } /*dissect_zbee_zcl_met_idt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_met_idt_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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
*---------------------------------------------------------------
*/
void void
dissect_zcl_met_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_met_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -550,18 +509,10 @@ dissect_zcl_met_idt_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, gu
} /*dissect_zcl_met_idt_attr_data*/ } /*dissect_zcl_met_idt_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Meter Identification dissector
* proto_register_zbee_zcl_met_idt *
* DESCRIPTION */
* this function registers the ZCL Meter Identification dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_met_idt(void) proto_register_zbee_zcl_met_idt(void)
{ {
@ -589,17 +540,10 @@ proto_register_zbee_zcl_met_idt(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_METIDT, dissect_zbee_zcl_met_idt, proto_zbee_zcl_met_idt); register_dissector(ZBEE_PROTOABBREV_ZCL_METIDT, dissect_zbee_zcl_met_idt, proto_zbee_zcl_met_idt);
} /*proto_register_zbee_zcl_met_idt*/ } /*proto_register_zbee_zcl_met_idt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Meter Identification dissector.
* proto_reg_handoff_zbee_zcl_met_idt *
* DESCRIPTION */
* Hands off the Zcl Meter Identification dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_met_idt(void) proto_reg_handoff_zbee_zcl_met_idt(void)
{ {
@ -743,19 +687,13 @@ static const value_string zbee_zcl_appl_evtalt_status_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Appliance Events and Alerts cluster dissector for wireshark.
* dissect_zbee_zcl_appl_evtalt *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Appliance Events and Alerts cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_appl_evtalt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_appl_evtalt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -831,19 +769,13 @@ dissect_zbee_zcl_appl_evtalt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_appl_evtalt*/ } /*dissect_zbee_zcl_appl_evtalt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode alerts structure payload
* dissect_zcl_appl_evtalt_alerts_struct *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function is called in order to decode alerts structure payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset offset in the tvb buffer
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - offset in the tvb buffer
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_evtalt_alerts_struct(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_evtalt_alerts_struct(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -855,19 +787,13 @@ dissect_zcl_appl_evtalt_alerts_struct(tvbuff_t *tvb, proto_tree *tree, guint *of
*offset += 3; *offset += 3;
} /*dissect_zcl_appl_evtalt_alerts_struct*/ } /*dissect_zcl_appl_evtalt_alerts_struct*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode the GetAlertsRespose payload
* dissect_zcl_appl_evtalt_get_alerts *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function is called in order to decode the GetAlertsRespose payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset offset in the tvb buffer
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - offset in the tvb buffer
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_evtalt_get_alerts_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_evtalt_get_alerts_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -892,19 +818,13 @@ dissect_zcl_appl_evtalt_get_alerts_rsp(tvbuff_t *tvb, proto_tree *tree, guint *o
} }
} /*dissect_zcl_appl_evtalt_get_alerts_rsp*/ } /*dissect_zcl_appl_evtalt_get_alerts_rsp*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode the EventNotification payload
* dissect_zcl_appl_evtalt_event_notif *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function is called in order to decode the EventNotification payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset offset in the tvb buffer
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - offset in the tvb buffer
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_evtalt_event_notif(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_evtalt_event_notif(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -916,18 +836,10 @@ dissect_zcl_appl_evtalt_event_notif(tvbuff_t *tvb, proto_tree *tree, guint *offs
*offset += 1; *offset += 1;
} /*dissect_zcl_appl_evtalt_event_notif*/ } /*dissect_zcl_appl_evtalt_event_notif*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Appliance Events and Alert dissector
* proto_register_zbee_zcl_appl_evtalt *
* DESCRIPTION */
* this function registers the ZCL Appliance Events and Alert dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_appl_evtalt(void) proto_register_zbee_zcl_appl_evtalt(void)
{ {
@ -1001,17 +913,10 @@ proto_register_zbee_zcl_appl_evtalt(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_APPLEVTALT, dissect_zbee_zcl_appl_evtalt, proto_zbee_zcl_appl_evtalt); register_dissector(ZBEE_PROTOABBREV_ZCL_APPLEVTALT, dissect_zbee_zcl_appl_evtalt, proto_zbee_zcl_appl_evtalt);
} /*proto_register_zbee_zcl_appl_evtalt*/ } /*proto_register_zbee_zcl_appl_evtalt*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Appliance Events And Alerts dissector.
* proto_reg_handoff_zbee_zcl_appl_evtalt *
* DESCRIPTION */
* Hands off the Zcl Appliance Events And Alerts dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_appl_evtalt(void) proto_reg_handoff_zbee_zcl_appl_evtalt(void)
{ {
@ -1122,19 +1027,13 @@ static const value_string zbee_zcl_appl_stats_srv_tx_cmd_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Appliance Statistics cluster dissector for wireshark.
* dissect_zbee_zcl_appl_stats *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Appliance Statistics cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_appl_stats (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_appl_stats (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -1215,19 +1114,13 @@ dissect_zbee_zcl_appl_stats (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_appl_stats*/ } /*dissect_zbee_zcl_appl_stats*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode "LogRequest" payload command.
* dissect_zcl_appl_stats_log_req *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* this function is called in order to decode "LogRequest" payload command. *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to buffer offset
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - pointer to buffer offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_stats_log_req(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_stats_log_req(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1236,20 +1129,13 @@ dissect_zcl_appl_stats_log_req(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 4; *offset += 4;
} /*dissect_zcl_appl_stats_log_req*/ } /*dissect_zcl_appl_stats_log_req*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode "LogNotification" and
* dissect_zcl_appl_stats_log_rsp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* this function is called in order to decode "LogNotification" and *@param tree pointer to data tree Wireshark uses to display packet.
* "LogResponse" payload command. *@param offset pointer to buffer offset
* PARAMETERS */
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - pointer to buffer offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_stats_log_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_stats_log_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1273,20 +1159,13 @@ dissect_zcl_appl_stats_log_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += log_len; *offset += log_len;
}/*dissect_zcl_appl_stats_log_rsp*/ }/*dissect_zcl_appl_stats_log_rsp*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called in order to decode "LogQueueResponse" and
* dissect_zcl_appl_stats_log_queue_rsp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* this function is called in order to decode "LogQueueResponse" and *@param tree pointer to data tree Wireshark uses to display packet.
* "StatisticsAvailable" payload command. *@param offset pointer to buffer offset
* PARAMETERS */
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* guint *offset - pointer to buffer offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_appl_stats_log_queue_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_appl_stats_log_queue_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1307,19 +1186,12 @@ dissect_zcl_appl_stats_log_queue_rsp(tvbuff_t *tvb, proto_tree *tree, guint *off
} }
}/*dissect_zcl_appl_stats_log_queue_rsp*/ }/*dissect_zcl_appl_stats_log_queue_rsp*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes utc time, with peculiarity case for
* decode_zcl_appl_stats_utc_time *
* DESCRIPTION *@param s string to display
* this function decodes utc time, with peculiarity case for *@param value value to decode
* appliance statitics specifications. */
* PARAMETERS
* guint *s - string to display
* guint32 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_zcl_appl_stats_utc_time(gchar *s, guint32 value) decode_zcl_appl_stats_utc_time(gchar *s, guint32 value)
{ {
@ -1334,18 +1206,10 @@ decode_zcl_appl_stats_utc_time(gchar *s, guint32 value)
} }
} /* decode_zcl_appl_stats_utc_time */ } /* decode_zcl_appl_stats_utc_time */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Appliance Statistics dissector
* proto_register_zbee_zcl_appl_stats *
* DESCRIPTION */
* this function registers the ZCL Appliance Statistics dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_appl_stats(void) proto_register_zbee_zcl_appl_stats(void)
{ {
@ -1407,17 +1271,10 @@ proto_register_zbee_zcl_appl_stats(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_APPLSTATS, dissect_zbee_zcl_appl_stats, proto_zbee_zcl_appl_stats); register_dissector(ZBEE_PROTOABBREV_ZCL_APPLSTATS, dissect_zbee_zcl_appl_stats, proto_zbee_zcl_appl_stats);
} /* proto_register_zbee_zcl_appl_stats */ } /* proto_register_zbee_zcl_appl_stats */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Appliance Statistics cluster dissector.
* proto_reg_handoff_zbee_zcl_appl_stats *
* DESCRIPTION */
* Hands off the Zcl Appliance Statistics cluster dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_appl_stats(void) proto_reg_handoff_zbee_zcl_appl_stats(void)
{ {

View File

@ -126,41 +126,28 @@ static const value_string zbee_zcl_illum_meas_sensor_type_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Illuminance Measurement cluster dissector for wireshark.
* dissect_zbee_zcl_illum_meas *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Illuminance Measurement cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_illum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_illum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_illum_meas*/ } /*dissect_zbee_zcl_illum_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_illum_meas_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_illum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_illum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -198,18 +185,12 @@ dissect_zcl_illum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset,
} }
} /*dissect_zcl_illum_meas_attr_data*/ } /*dissect_zcl_illum_meas_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes illuminance value
* decode_illum_meas_value *
* DESCRIPTION *@param s string to display
* this function decodes illuminance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_illum_meas_value(gchar *s, guint16 value) decode_illum_meas_value(gchar *s, guint16 value)
{ {
@ -224,18 +205,12 @@ decode_illum_meas_value(gchar *s, guint16 value)
return; return;
} /*decode_illum_meas_value*/ } /*decode_illum_meas_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes minimum illuminance value
* decode_illum_meas_min_value *
* DESCRIPTION *@param s string to display
* this function decodes minimum illuminance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_illum_meas_min_value(gchar *s, guint16 value) decode_illum_meas_min_value(gchar *s, guint16 value)
{ {
@ -248,18 +223,12 @@ decode_illum_meas_min_value(gchar *s, guint16 value)
return; return;
} /*decode_illum_meas_min_value*/ } /*decode_illum_meas_min_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes maximum illuminance value
* decode_illum_meas_max_value *
* DESCRIPTION *@param s string to display
* this function decodes maximum illuminance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_illum_meas_max_value(gchar *s, guint16 value) decode_illum_meas_max_value(gchar *s, guint16 value)
{ {
@ -272,18 +241,12 @@ decode_illum_meas_max_value(gchar *s, guint16 value)
return; return;
} /*decode_illum_meas_max_value*/ } /*decode_illum_meas_max_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes tolerance value
* decode_illum_meas_tolerance *
* DESCRIPTION *@param s string to display
* this function decodes tolerance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_illum_meas_tolerance(gchar *s, guint16 value) decode_illum_meas_tolerance(gchar *s, guint16 value)
{ {
@ -295,18 +258,10 @@ decode_illum_meas_tolerance(gchar *s, guint16 value)
return; return;
} /*decode_illum_meas_tolerance*/ } /*decode_illum_meas_tolerance*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Illuminance Measurement dissector
* proto_register_zbee_zcl_illum_meas *
* DESCRIPTION */
* this function registers the ZCL Illuminance Measurement dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_illum_meas(void) proto_register_zbee_zcl_illum_meas(void)
{ {
@ -348,17 +303,10 @@ proto_register_zbee_zcl_illum_meas(void)
} /*proto_register_zbee_zcl_illum_meas*/ } /*proto_register_zbee_zcl_illum_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Illuminance Measurement dissector.
* proto_reg_handoff_zbee_zcl_illum_meas *
* DESCRIPTION */
* Hands off the ZCL Illuminance Measurement dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_illum_meas(void) proto_reg_handoff_zbee_zcl_illum_meas(void)
{ {
@ -455,41 +403,28 @@ static const value_string zbee_zcl_illum_level_sen_level_status_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Illuminance Level Sensing cluster dissector for wireshark.
* dissect_zbee_zcl_illum_level_sen *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Illuminance Level Sensing cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_illum_level_sen(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_illum_level_sen(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_illum_level_sen*/ } /*dissect_zbee_zcl_illum_level_sen*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_illum_level_sen_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_illum_level_sen_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_illum_level_sen_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -517,18 +452,12 @@ dissect_zcl_illum_level_sen_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *of
} }
} /*dissect_zcl_illum_level_sen_attr_data*/ } /*dissect_zcl_illum_level_sen_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes illuminance value
* decode_illum_level_sen_target_level *
* DESCRIPTION *@param s string to display
* this function decodes illuminance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_illum_level_sen_target_level(gchar *s, guint16 value) decode_illum_level_sen_target_level(gchar *s, guint16 value)
{ {
@ -543,18 +472,10 @@ decode_illum_level_sen_target_level(gchar *s, guint16 value)
return; return;
} /*decode_illum_level_sen_value*/ } /*decode_illum_level_sen_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Illuminance Level Sensing dissector
* proto_register_zbee_zcl_illum_level_sen *
* DESCRIPTION */
* this function registers the ZCL Illuminance Level Sensing dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_illum_level_sen(void) proto_register_zbee_zcl_illum_level_sen(void)
{ {
@ -587,17 +508,10 @@ proto_register_zbee_zcl_illum_level_sen(void)
} /*proto_register_zbee_zcl_illum_level_sen*/ } /*proto_register_zbee_zcl_illum_level_sen*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Illuminance Level Sensing dissector.
* proto_reg_handoff_zbee_zcl_illum_level_sen *
* DESCRIPTION */
* Hands off the ZCL Illuminance Level Sensing dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_illum_level_sen(void) proto_reg_handoff_zbee_zcl_illum_level_sen(void)
{ {
@ -689,41 +603,28 @@ static const value_string zbee_zcl_temp_meas_attr_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Temperature Measurement cluster dissector for wireshark.
* dissect_zbee_zcl_temp_meas *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Temperature Measurement cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_temp_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_temp_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_temp_meas*/ } /*dissect_zbee_zcl_temp_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_temp_meas_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_temp_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_temp_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -757,18 +658,12 @@ dissect_zcl_temp_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset,
} /*dissect_zcl_temp_meas_attr_data*/ } /*dissect_zcl_temp_meas_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes temperature value
* decode_temp_meas_value *
* DESCRIPTION *@param s string to display
* this function decodes temperature value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_temp_meas_value(gchar *s, gint16 value) decode_temp_meas_value(gchar *s, gint16 value)
{ {
@ -780,18 +675,12 @@ decode_temp_meas_value(gchar *s, gint16 value)
return; return;
} /*decode_temp_meas_value*/ } /*decode_temp_meas_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes minimum temperature value
* decode_temp_meas_min_value *
* DESCRIPTION *@param s string to display
* this function decodes minimum temperature value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_temp_meas_min_value(gchar *s, gint16 value) decode_temp_meas_min_value(gchar *s, gint16 value)
{ {
@ -804,18 +693,12 @@ decode_temp_meas_min_value(gchar *s, gint16 value)
return; return;
} /*decode_temp_meas_min_value*/ } /*decode_temp_meas_min_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes maximum temperature value
* decode_temp_meas_max_value *
* DESCRIPTION *@param s string to display
* this function decodes maximum temperature value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_temp_meas_max_value(gchar *s, gint16 value) decode_temp_meas_max_value(gchar *s, gint16 value)
{ {
@ -827,18 +710,12 @@ decode_temp_meas_max_value(gchar *s, gint16 value)
return; return;
} /*decode_temp_meas_max_value*/ } /*decode_temp_meas_max_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes tolerance value
* decode_temp_meas_tolerance *
* DESCRIPTION *@param s string to display
* this function decodes tolerance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_temp_meas_tolerance(gchar *s, guint16 value) decode_temp_meas_tolerance(gchar *s, guint16 value)
{ {
@ -850,18 +727,10 @@ decode_temp_meas_tolerance(gchar *s, guint16 value)
return; return;
} /*decode_temp_meas_tolerance*/ } /*decode_temp_meas_tolerance*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Temperature Measurement dissector
* proto_register_zbee_zcl_temp_meas *
* DESCRIPTION */
* this function registers the ZCL Temperature Measurement dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_temp_meas(void) proto_register_zbee_zcl_temp_meas(void)
{ {
@ -897,17 +766,10 @@ proto_register_zbee_zcl_temp_meas(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_TEMPMEAS, dissect_zbee_zcl_temp_meas, proto_zbee_zcl_temp_meas); register_dissector(ZBEE_PROTOABBREV_ZCL_TEMPMEAS, dissect_zbee_zcl_temp_meas, proto_zbee_zcl_temp_meas);
} /*proto_register_zbee_zcl_temp_meas*/ } /*proto_register_zbee_zcl_temp_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Temperature Measurement dissector.
* proto_reg_handoff_zbee_zcl_temp_meas *
* DESCRIPTION */
* Hands off the ZCL Temperature Measurement dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_temp_meas(void) proto_reg_handoff_zbee_zcl_temp_meas(void)
{ {
@ -1016,41 +878,28 @@ static const value_string zbee_zcl_press_meas_attr_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Pressure Measurement cluster dissector for wireshark.
* dissect_zbee_zcl_press_meas *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Pressure Measurement cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_press_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_press_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_press_meas*/ } /*dissect_zbee_zcl_press_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_press_meas_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_press_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_press_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -1108,18 +957,12 @@ dissect_zcl_press_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset,
} }
} /*dissect_zcl_press_meas_attr_data*/ } /*dissect_zcl_press_meas_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes pressure value
* decode_press_meas_value *
* DESCRIPTION *@param s string to display
* this function decodes pressure value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_press_meas_value(gchar *s, gint16 value) decode_press_meas_value(gchar *s, gint16 value)
{ {
@ -1133,18 +976,12 @@ decode_press_meas_value(gchar *s, gint16 value)
return; return;
} /*decode_press_meas_value*/ } /*decode_press_meas_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes minimum pressure value
* decode_press_meas_min_value *
* DESCRIPTION *@param s string to display
* this function decodes minimum pressure value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_press_meas_min_value(gchar *s, gint16 value) decode_press_meas_min_value(gchar *s, gint16 value)
{ {
@ -1156,18 +993,12 @@ decode_press_meas_min_value(gchar *s, gint16 value)
return; return;
} /*decode_press_meas_min_value*/ } /*decode_press_meas_min_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes maximum pressure value
* decode_press_meas_max_value *
* DESCRIPTION *@param s string to display
* this function decodes maximum pressure value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_press_meas_max_value(gchar *s, gint16 value) decode_press_meas_max_value(gchar *s, gint16 value)
{ {
@ -1179,18 +1010,12 @@ decode_press_meas_max_value(gchar *s, gint16 value)
return; return;
} /*decode_press_meas_max_value*/ } /*decode_press_meas_max_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes tolerance value
* decode_press_meas_tolerance *
* DESCRIPTION *@param s string to display
* this function decodes tolerance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_press_meas_tolerance(gchar *s, guint16 value) decode_press_meas_tolerance(gchar *s, guint16 value)
{ {
@ -1202,18 +1027,10 @@ decode_press_meas_tolerance(gchar *s, guint16 value)
return; return;
} /*decode_press_meas_tolerance*/ } /*decode_press_meas_tolerance*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Pressure Measurement dissector
* proto_register_zbee_zcl_press_meas *
* DESCRIPTION */
* this function registers the ZCL Pressure Measurement dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_press_meas(void) proto_register_zbee_zcl_press_meas(void)
{ {
@ -1269,17 +1086,10 @@ proto_register_zbee_zcl_press_meas(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_PRESSMEAS, dissect_zbee_zcl_press_meas, proto_zbee_zcl_press_meas); register_dissector(ZBEE_PROTOABBREV_ZCL_PRESSMEAS, dissect_zbee_zcl_press_meas, proto_zbee_zcl_press_meas);
} /*proto_register_zbee_zcl_press_meas*/ } /*proto_register_zbee_zcl_press_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Pressure Measurement dissector.
* proto_reg_handoff_zbee_zcl_press_meas *
* DESCRIPTION */
* Hands off the ZCL Pressure Measurement dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_press_meas(void) proto_reg_handoff_zbee_zcl_press_meas(void)
{ {
@ -1631,41 +1441,28 @@ static const value_string zbee_zcl_relhum_meas_attr_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Relative Humidity Measurement cluster dissector for wireshark.
* dissect_zbee_zcl_relhum_meas *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Relative Humidity Measurement cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_relhum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) dissect_zbee_zcl_relhum_meas(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_)
{ {
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_relhum_meas*/ } /*dissect_zbee_zcl_relhum_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_relhum_meas_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_relhum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_relhum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -1698,18 +1495,12 @@ dissect_zcl_relhum_meas_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset
} }
} /*dissect_zcl_relhum_meas_attr_data*/ } /*dissect_zcl_relhum_meas_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes relative humidity value
* decode_relhum_meas_value *
* DESCRIPTION *@param s string to display
* this function decodes relative humidity value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_relhum_meas_value(gchar *s, guint16 value) decode_relhum_meas_value(gchar *s, guint16 value)
{ {
@ -1721,18 +1512,12 @@ decode_relhum_meas_value(gchar *s, guint16 value)
return; return;
} /*decode_relhum_meas_value*/ } /*decode_relhum_meas_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes minimum relative humidity value
* decode_relhum_meas_min_value *
* DESCRIPTION *@param s string to display
* this function decodes minimum relative humidity value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_relhum_meas_min_value(gchar *s, guint16 value) decode_relhum_meas_min_value(gchar *s, guint16 value)
{ {
@ -1744,18 +1529,12 @@ decode_relhum_meas_min_value(gchar *s, guint16 value)
return; return;
} /*decode_relhum_meas_min_value*/ } /*decode_relhum_meas_min_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes maximum relative humidity value
* decode_relhum_meas_max_value *
* DESCRIPTION *@param s string to display
* this function decodes maximum relative humidity value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_relhum_meas_max_value(gchar *s, guint16 value) decode_relhum_meas_max_value(gchar *s, guint16 value)
{ {
@ -1767,18 +1546,12 @@ decode_relhum_meas_max_value(gchar *s, guint16 value)
return; return;
} /*decode_relhum_meas_max_value*/ } /*decode_relhum_meas_max_value*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes tolerance value
* decode_relhum_meas_tolerance *
* DESCRIPTION *@param s string to display
* this function decodes tolerance value *@param value value to decode
* PARAMETERS */
* guint *s - string to display
* guint16 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_relhum_meas_tolerance(gchar *s, guint16 value) decode_relhum_meas_tolerance(gchar *s, guint16 value)
{ {
@ -1790,18 +1563,10 @@ decode_relhum_meas_tolerance(gchar *s, guint16 value)
return; return;
} /*decode_relhum_meas_tolerance*/ } /*decode_relhum_meas_tolerance*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Relative Humidity Measurement dissector
* proto_register_zbee_zcl_relhum_meas *
* DESCRIPTION */
* this function registers the ZCL Relative Humidity Measurement dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_relhum_meas(void) proto_register_zbee_zcl_relhum_meas(void)
{ {
@ -1838,17 +1603,10 @@ proto_register_zbee_zcl_relhum_meas(void)
} /*proto_register_zbee_zcl_relhum_meas*/ } /*proto_register_zbee_zcl_relhum_meas*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Relative Humidity Measurement dissector.
* proto_reg_handoff_zbee_zcl_relhum_meas *
* DESCRIPTION */
* Hands off the ZCL Relative Humidity Measurement dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_relhum_meas(void) proto_reg_handoff_zbee_zcl_relhum_meas(void)
{ {

View File

@ -248,19 +248,13 @@ static int dissect_zcl_thermostat_schedule(proto_tree *tree, tvbuff_t *tvb, gui
static void dissect_zcl_thermostat_schedule_days(proto_tree *tree, tvbuff_t *tvb, guint offset); static void dissect_zcl_thermostat_schedule_days(proto_tree *tree, tvbuff_t *tvb, guint offset);
static void dissect_zcl_thermostat_schedule_mode(proto_tree *tree, tvbuff_t *tvb, guint offset); static void dissect_zcl_thermostat_schedule_mode(proto_tree *tree, tvbuff_t *tvb, guint offset);
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper function to dissect a Thermostat scheduling days bitmask.
* dissect_zcl_thermostat_schedule_days *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* Helper function to dissect a Thermostat scheduling days bitmask. *@param tvb pointer to buffer containing raw packet.
* PARAMETERS *@param offset payload offset of the ZoneStatus value.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* guint offset - payload offset of the ZoneStatus value.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_thermostat_schedule_days(proto_tree *tree, tvbuff_t *tvb, guint offset) dissect_zcl_thermostat_schedule_days(proto_tree *tree, tvbuff_t *tvb, guint offset)
{ {
@ -282,19 +276,13 @@ dissect_zcl_thermostat_schedule_days(proto_tree *tree, tvbuff_t *tvb, guint offs
} /* dissect_zcl_thermostat_schedule_days */ } /* dissect_zcl_thermostat_schedule_days */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper function to dissect a Thermostat scheduling mode bitmask.
* dissect_zcl_thermostat_schedule_mode *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* Helper function to dissect a Thermostat scheduling mode bitmask. *@param tvb pointer to buffer containing raw packet.
* PARAMETERS *@param offset payload offset of the ZoneStatus value.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* guint offset - payload offset of the ZoneStatus value.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_thermostat_schedule_mode(proto_tree *tree, tvbuff_t *tvb, guint offset) dissect_zcl_thermostat_schedule_mode(proto_tree *tree, tvbuff_t *tvb, guint offset)
{ {
@ -309,21 +297,14 @@ dissect_zcl_thermostat_schedule_mode(proto_tree *tree, tvbuff_t *tvb, guint offs
ett_zbee_zcl_thermostat_schedule_mode, thermostat_schedule_modes, ENC_NA); ett_zbee_zcl_thermostat_schedule_mode, thermostat_schedule_modes, ENC_NA);
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper function to dissect a Thermostat schedule, which has
* dissect_zcl_thermostat_cmd_schedule *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* Helper function to dissect a Thermostat schedule, which has *@param tvb pointer to buffer containing raw packet.
* a common format in both the Set Weekly Schedule, and Get *@param offset payload offset of the ZoneStatus value.
* Weekly Schedule Response commands. *@return length of parsed 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 - payload offset of the ZoneStatus value.
* RETURNS
* int - length of parsed data.
*---------------------------------------------------------------
*/
static int static int
dissect_zcl_thermostat_schedule(proto_tree *tree, tvbuff_t *tvb, guint offset) dissect_zcl_thermostat_schedule(proto_tree *tree, tvbuff_t *tvb, guint offset)
{ {
@ -370,20 +351,15 @@ dissect_zcl_thermostat_schedule(proto_tree *tree, tvbuff_t *tvb, guint offset)
return (offset - start); return (offset - start);
} /* dissect_zcl_thermostat_cmd_schedule */ } /* dissect_zcl_thermostat_cmd_schedule */
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Thermostat cluster dissector for wireshark.
* dissect_zbee_zcl_thermostat *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Thermostat cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data pointer to ZCL packet structure.
* packet_info *pinfo - pointer to packet information fields *@return length of parsed data.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* void *data - pointer to ZCL packet structure.
* RETURNS
* int - length of parsed data.
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_thermostat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_thermostat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -466,22 +442,15 @@ dissect_zbee_zcl_thermostat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /* dissect_zbee_zcl_thermostat */ } /* dissect_zbee_zcl_thermostat */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_thermostat_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_thermostat_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_thermostat_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -493,17 +462,10 @@ dissect_zcl_thermostat_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset,
} }
} /*dissect_zcl_thermostat_attr_data*/ } /*dissect_zcl_thermostat_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL IAS Zone cluste protocol registration.
* proto_register_zbee_zcl_ias_zone *
* DESCRIPTION */
* ZigBee ZCL IAS Zone cluste protocol registration.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_thermostat(void) proto_register_zbee_zcl_thermostat(void)
{ {
@ -608,17 +570,10 @@ proto_register_zbee_zcl_thermostat(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_THERMOSTAT, dissect_zbee_zcl_thermostat, proto_zbee_zcl_thermostat); register_dissector(ZBEE_PROTOABBREV_ZCL_THERMOSTAT, dissect_zbee_zcl_thermostat, proto_zbee_zcl_thermostat);
} /*proto_register_zbee_zcl_thermostat*/ } /*proto_register_zbee_zcl_thermostat*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL Thermostat dissector.
* proto_reg_handoff_zbee_zcl_thermostat *
* DESCRIPTION */
* Hands off the ZCL Thermostat dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_thermostat(void) proto_reg_handoff_zbee_zcl_thermostat(void)
{ {
@ -811,19 +766,13 @@ static void dissect_zcl_ias_zone_attr_data (proto_tree *tree, tvbuff_t *tvb, gu
/* ZoneStatus bitmask helper */ /* ZoneStatus bitmask helper */
static void dissect_zcl_ias_zone_status (proto_tree *tree, tvbuff_t *tvb, guint offset); static void dissect_zcl_ias_zone_status (proto_tree *tree, tvbuff_t *tvb, guint offset);
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper function to dissect the IAS ZoneStatus bitmask.
* dissect_zcl_ias_zone_status *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* Helper function to dissect the IAS ZoneStatus bitmask. *@param tvb pointer to buffer containing raw packet.
* PARAMETERS *@param offset payload offset of the ZoneStatus value.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* guint offset - payload offset of the ZoneStatus value.
* RETURNS
* int - length of parsed data.
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_ias_zone_status(proto_tree *tree, tvbuff_t *tvb, guint offset) dissect_zcl_ias_zone_status(proto_tree *tree, tvbuff_t *tvb, guint offset)
{ {
@ -843,20 +792,15 @@ dissect_zcl_ias_zone_status(proto_tree *tree, tvbuff_t *tvb, guint offset)
} /* dissect_zcl_ias_zone_status */ } /* dissect_zcl_ias_zone_status */
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL IAS Zone cluster dissector for wireshark.
* dissect_zbee_zcl_ias_zone *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL IAS Zone cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data pointer to ZCL packet structure.
* packet_info *pinfo - pointer to packet information fields *@return length of parsed data.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. */
* void *data - pointer to ZCL packet structure.
* RETURNS
* int - length of parsed data.
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_ias_zone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) dissect_zbee_zcl_ias_zone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{ {
@ -925,22 +869,15 @@ dissect_zbee_zcl_ias_zone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
return tvb_reported_length(tvb); return tvb_reported_length(tvb);
} /* dissect_zbee_zcl_ias_zone */ } /* dissect_zbee_zcl_ias_zone */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_ias_zone_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_ias_zone_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_ias_zone_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -968,17 +905,10 @@ dissect_zcl_ias_zone_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, g
} }
} /*dissect_zcl_ias_zone_attr_data*/ } /*dissect_zcl_ias_zone_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the ZCL IAS Zone dissector.
* proto_reg_handoff_zbee_zcl_ias_zone *
* DESCRIPTION */
* Hands off the ZCL IAS Zone dissector.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_ias_zone(void) proto_reg_handoff_zbee_zcl_ias_zone(void)
{ {
@ -998,17 +928,10 @@ proto_reg_handoff_zbee_zcl_ias_zone(void)
); );
} /*proto_reg_handoff_zbee_zcl_ias_zone*/ } /*proto_reg_handoff_zbee_zcl_ias_zone*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL IAS Zone cluste protocol registration.
* proto_register_zbee_zcl_ias_zone *
* DESCRIPTION */
* ZigBee ZCL IAS Zone cluste protocol registration.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_ias_zone(void) proto_register_zbee_zcl_ias_zone(void)
{ {

View File

@ -196,22 +196,15 @@ static const value_string zbee_zcl_msg_ctrl_importance_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_msg_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_msg_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_msg_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -230,19 +223,13 @@ dissect_zcl_msg_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint1
} }
} /*dissect_zcl_ias_zone_attr_data*/ } /*dissect_zcl_ias_zone_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Messaging cluster dissector for wireshark.
* dissect_zbee_zcl_msg *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Messaging cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -335,19 +322,13 @@ dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_msg*/ } /*dissect_zbee_zcl_msg*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_msg_display *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -402,19 +383,13 @@ dissect_zcl_msg_display(tvbuff_t *tvb, proto_tree *tree, guint *offset)
} /*dissect_zcl_msg_display*/ } /*dissect_zcl_msg_display*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Cancel Message payload
* dissect_zcl_msg_cancel *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Cancel Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint *offset) dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint *offset)
{ {
@ -436,19 +411,13 @@ dissect_zcl_msg_cancel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
} /* dissect_zcl_msg_cancel */ } /* dissect_zcl_msg_cancel */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Send Cancel All command
* dissect_zcl_msg_cancel_all *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Send Cancel All command *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -462,19 +431,13 @@ dissect_zcl_msg_cancel_all(tvbuff_t *tvb, proto_tree *tree, guint *offset)
} /* dissect_zcl_msg_cancel_all */ } /* dissect_zcl_msg_cancel_all */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Send Cancel All command
* dissect_zcl_msg_get_cancel *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Send Cancel All command *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -489,19 +452,13 @@ dissect_zcl_msg_get_cancel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
} /* dissect_zcl_msg_get_cancel */ } /* dissect_zcl_msg_get_cancel */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Message Confirmation payload
* dissect_zcl_msg_confirm *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Message Confirmation payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -539,16 +496,10 @@ dissect_zcl_msg_confirm(tvbuff_t *tvb, proto_tree *tree, guint *offset)
} /* dissect_zcl_msg_confirm */ } /* dissect_zcl_msg_confirm */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes duration in minute type variable
* decode_zcl_msg_duration *
* DESCRIPTION */
* this function decodes duration in minute type variable
* PARAMETERS
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_zcl_msg_duration(gchar *s, guint16 value) decode_zcl_msg_duration(gchar *s, guint16 value)
{ {
@ -559,19 +510,12 @@ decode_zcl_msg_duration(gchar *s, guint16 value)
return; return;
} /*decode_zcl_msg_duration*/ } /*decode_zcl_msg_duration*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes start time, with peculiarity case for
* decode_zcl_msg_start_time *
* DESCRIPTION *@param s string to display
* this function decodes start time, with peculiarity case for *@param value value to decode
* messaging specifications. */
* PARAMETERS
* guint *s - string to display
* guint32 value - value to decode
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
decode_zcl_msg_start_time(gchar *s, guint32 value) decode_zcl_msg_start_time(gchar *s, guint32 value)
{ {
@ -586,18 +530,10 @@ decode_zcl_msg_start_time(gchar *s, guint32 value)
} }
} /* decode_zcl_msg_start_time */ } /* decode_zcl_msg_start_time */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Messaging dissector
* proto_register_zbee_zcl_msg *
* DESCRIPTION */
* this function registers the ZCL Messaging dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_msg(void) proto_register_zbee_zcl_msg(void)
{ {
@ -726,17 +662,10 @@ proto_register_zbee_zcl_msg(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_MSG, dissect_zbee_zcl_msg, proto_zbee_zcl_msg); register_dissector(ZBEE_PROTOABBREV_ZCL_MSG, dissect_zbee_zcl_msg, proto_zbee_zcl_msg);
} /*proto_register_zbee_zcl_msg*/ } /*proto_register_zbee_zcl_msg*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Messaging dissector.
* proto_reg_handoff_zbee_zcl_msg *
* DESCRIPTION */
* Hands off the Zcl Messaging dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_msg(void) proto_reg_handoff_zbee_zcl_msg(void)
{ {
@ -915,22 +844,15 @@ static const value_string zbee_zcl_tun_status_names[] = {
/* Function Bodies */ /* Function Bodies */
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function is called by ZCL foundation dissector in order to decode
* dissect_zcl_tun_attr_data *
* DESCRIPTION *@param tree pointer to data tree Wireshark uses to display packet.
* this function is called by ZCL foundation dissector in order to decode *@param tvb pointer to buffer containing raw packet.
* specific cluster attributes data. *@param offset pointer to buffer offset
* PARAMETERS *@param attr_id attribute identifier
* proto_tree *tree - pointer to data tree Wireshark uses to display packet. *@param data_type attribute data type
* 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 void static void
dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type) dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint16 attr_id, guint data_type)
{ {
@ -953,19 +875,13 @@ dissect_zcl_tun_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint1
} }
} /*dissect_zcl_ias_zone_attr_data*/ } /*dissect_zcl_ias_zone_attr_data*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_request_tunnel *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -982,19 +898,13 @@ dissect_zcl_tun_request_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_close_tunnel *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1002,19 +912,13 @@ dissect_zcl_tun_close_tunnel(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_transfer_data *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1028,19 +932,13 @@ dissect_zcl_tun_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += length; *offset += length;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_transfer_data_error *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1051,19 +949,13 @@ dissect_zcl_tun_transfer_data_error(tvbuff_t *tvb, proto_tree *tree, guint *offs
*offset += 1; *offset += 1;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_ack_transfer_data *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1074,19 +966,13 @@ dissect_zcl_tun_ack_transfer_data(tvbuff_t *tvb, proto_tree *tree, guint *offset
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_ready_data *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1097,19 +983,13 @@ dissect_zcl_tun_ready_data(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_get_supported *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1117,19 +997,13 @@ dissect_zcl_tun_get_supported(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_request_tunnel_rsp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1143,19 +1017,13 @@ dissect_zcl_tun_request_tunnel_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offse
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_get_supported_rsp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1182,19 +1050,13 @@ dissect_zcl_tun_get_supported_rsp(tvbuff_t *tvb, proto_tree *tree, guint *offset
} }
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Display Message payload
* dissect_zcl_tun_closure_notify *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Display Message payload *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_tun_closure_notify(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_tun_closure_notify(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1202,19 +1064,13 @@ dissect_zcl_tun_closure_notify(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Messaging cluster dissector for wireshark.
* dissect_zbee_zcl_tun *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Messaging cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_tun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_tun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -1335,18 +1191,10 @@ dissect_zbee_zcl_tun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /*dissect_zbee_zcl_tun*/ } /*dissect_zbee_zcl_tun*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Messaging dissector
* proto_register_zbee_zcl_tun *
* DESCRIPTION */
* this function registers the ZCL Messaging dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_tun(void) proto_register_zbee_zcl_tun(void)
{ {
@ -1437,17 +1285,10 @@ proto_register_zbee_zcl_tun(void)
} /* proto_register_zbee_zcl_tun */ } /* proto_register_zbee_zcl_tun */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Messaging dissector.
* proto_reg_handoff_zbee_zcl_tun *
* DESCRIPTION */
* Hands off the Zcl Messaging dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_tun(void) proto_reg_handoff_zbee_zcl_tun(void)
{ {
@ -1608,19 +1449,13 @@ static const value_string zbee_zcl_ke_status_names[] = {
/*************************/ /*************************/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Suite 1 Certificate
* dissect_zcl_ke_suite1_certificate *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Suite 1 Certificate *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1638,19 +1473,13 @@ dissect_zcl_ke_suite1_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset
} /*dissect_zcl_ke_suite1_certificate*/ } /*dissect_zcl_ke_suite1_certificate*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Suite 2 Certificate
* dissect_zcl_ke_suite2_certificate *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Suite 2 Certificate *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1706,19 +1535,13 @@ dissect_zcl_ke_suite2_certificate(tvbuff_t *tvb, proto_tree *tree, guint *offset
} /*dissect_zcl_ke_suite2_certificate*/ } /*dissect_zcl_ke_suite2_certificate*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function manages the Initiate Key Establishment message
* dissect_zcl_ke_initiate_req *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function manages the Initiate Key Establishment message *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1754,19 +1577,13 @@ dissect_zcl_ke_initiate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
} }
} /* dissect_zcl_ke_initiate */ } /* dissect_zcl_ke_initiate */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Ephemeral Data QEU
* dissect_zcl_ke_ephemeral_qeu *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Ephemeral Data QEU *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1780,19 +1597,13 @@ dissect_zcl_ke_ephemeral_qeu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Ephemeral Data QEV
* dissect_zcl_ke_ephemeral_qev *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Ephemeral Data QEV *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1806,19 +1617,13 @@ dissect_zcl_ke_ephemeral_qev(tvbuff_t *tvb, proto_tree *tree, guint *offset)
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Confirm MACU
* dissect_zcl_ke_confirm_macu *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Confirm MACU *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1827,19 +1632,13 @@ dissect_zcl_ke_confirm_macu(tvbuff_t *tvb, proto_tree *tree, guint *offset)
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Confirm MACV
* dissect_zcl_ke_confirm_macv *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Confirm MACV *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1848,19 +1647,13 @@ dissect_zcl_ke_confirm_macv(tvbuff_t *tvb, proto_tree *tree, guint *offset)
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function dissects the Terminate Key Establishment message
* dissect_zcl_ke_terminate *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* This function dissects the Terminate Key Establishment message *@param tree pointer to data tree Wireshark uses to display packet.
* PARAMETERS *@param offset pointer to offset from caller
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* offset - offset
* RETURNS
* none
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_ke_terminate(tvbuff_t *tvb, proto_tree *tree, guint *offset) dissect_zcl_ke_terminate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
{ {
@ -1874,19 +1667,13 @@ dissect_zcl_ke_terminate(tvbuff_t *tvb, proto_tree *tree, guint *offset)
*offset += 2; *offset += 2;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL Key Establishment cluster dissector for wireshark.
* dissect_zbee_zcl_ke *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee ZCL Key Establishment cluster dissector for wireshark. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree Wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* none
*---------------------------------------------------------------
*/
static int static int
dissect_zbee_zcl_ke(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_zbee_zcl_ke(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
@ -1975,18 +1762,10 @@ dissect_zbee_zcl_ke(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
} /*dissect_zbee_zcl_ke*/ } /*dissect_zbee_zcl_ke*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function registers the ZCL Messaging dissector
* proto_register_zbee_zcl_ke *
* DESCRIPTION */
* this function registers the ZCL Messaging dissector
* and all its information.
* PARAMETERS
* none
* RETURNS
* none
*---------------------------------------------------------------
*/
void void
proto_register_zbee_zcl_ke(void) proto_register_zbee_zcl_ke(void)
{ {
@ -2105,17 +1884,10 @@ proto_register_zbee_zcl_ke(void)
register_dissector(ZBEE_PROTOABBREV_ZCL_KE, dissect_zbee_zcl_ke, proto_zbee_zcl_ke); register_dissector(ZBEE_PROTOABBREV_ZCL_KE, dissect_zbee_zcl_ke, proto_zbee_zcl_ke);
} /*proto_register_zbee_zcl_ke*/ } /*proto_register_zbee_zcl_ke*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Hands off the Zcl Key Establishment dissector.
* proto_reg_handoff_zbee_zcl_ke *
* DESCRIPTION */
* Hands off the Zcl Key Establishment dissector.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
proto_reg_handoff_zbee_zcl_ke(void) proto_reg_handoff_zbee_zcl_ke(void)
{ {

View File

@ -759,20 +759,14 @@ static const value_string zbee_zcl_dis_names[] = {
{ 0, NULL } { 0, NULL }
}; };
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee Cluster Library dissector for wireshark.
* dissect_zbee_zcl *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* ZigBee Cluster Library dissector for wireshark. *@param pinfo pointer to packet information fields.
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param data raw packet private data.
* packet_into *pinfo - pointer to packet information fields. */
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* void *data - raw packet private data.
* RETURNS
* void
*---------------------------------------------------------------
*/
static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{ {
tvbuff_t *payload_tvb; tvbuff_t *payload_tvb;
@ -961,21 +955,15 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return tvb_captured_length(tvb); return tvb_captured_length(tvb);
} /* dissect_zbee_zcl */ } /* dissect_zbee_zcl */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Read Attributes and
* dissect_zcl_read_attr *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Read Attributes and *@param pinfo pointer to packet information fields
* Write Attributes No Response commands. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset pointer from caller.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param cluster_id cluster id
* packet_info *pinfo - pointer to packet information fields */
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
void dissect_zcl_read_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id) void dissect_zcl_read_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
guint tvb_len; guint tvb_len;
@ -989,20 +977,15 @@ void dissect_zcl_read_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
return; return;
} /* dissect_zcl_read_attr */ } /* dissect_zcl_read_attr */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Read Attributes Response command.
* dissect_zcl_read_attr_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Read Attributes Response command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
void dissect_zcl_read_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id) void dissect_zcl_read_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
proto_tree *sub_tree; proto_tree *sub_tree;
@ -1032,20 +1015,15 @@ void dissect_zcl_read_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
} }
} /* dissect_zcl_read_attr_resp */ } /* dissect_zcl_read_attr_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Report Attribute commands.
* dissect_zcl_write_attr *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Report Attribute commands. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
void dissect_zcl_write_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id) void dissect_zcl_write_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
proto_tree *sub_tree; proto_tree *sub_tree;
@ -1070,20 +1048,15 @@ void dissect_zcl_write_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
} }
} /* dissect_zcl_write_attr */ } /* dissect_zcl_write_attr */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Write Attribute Response command.
* dissect_zcl_write_attr_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Write Attribute Response command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
static void dissect_zcl_write_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id) static void dissect_zcl_write_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
proto_tree *sub_tree; proto_tree *sub_tree;
@ -1109,18 +1082,14 @@ static void dissect_zcl_write_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, p
} /* dissect_zcl_write_attr_resp */ } /* dissect_zcl_write_attr_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Report Attribute commands.
* dissect_zcl_read_report_config_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Report Attribute commands. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields */
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - pointer to offset from caller
*---------------------------------------------------------------
*/
static void dissect_zcl_read_report_config_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, static void dissect_zcl_read_report_config_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint *offset, guint16 cluster_id) guint *offset, guint16 cluster_id)
{ {
@ -1180,18 +1149,15 @@ static void dissect_zcl_read_report_config_resp(tvbuff_t *tvb, packet_info *pinf
} /* dissect_zcl_read_report_config_resp */ } /* dissect_zcl_read_report_config_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Report Attribute commands.
* dissect_zcl_config_report *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Report Attribute commands. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
*---------------------------------------------------------------
*/
static void dissect_zcl_config_report(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id) static void dissect_zcl_config_report(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
proto_tree *sub_tree; proto_tree *sub_tree;
@ -1244,20 +1210,15 @@ static void dissect_zcl_config_report(tvbuff_t *tvb, packet_info *pinfo _U_, pro
} /* dissect_zcl_config_report */ } /* dissect_zcl_config_report */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Report Attribute commands.
* dissect_zcl_config_report_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Report Attribute commands. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
static void dissect_zcl_config_report_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, static void dissect_zcl_config_report_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint *offset, guint16 cluster_id) guint *offset, guint16 cluster_id)
{ {
@ -1285,20 +1246,15 @@ static void dissect_zcl_config_report_resp(tvbuff_t *tvb, packet_info *pinfo _U_
} }
} /* dissect_zcl_config_report_resp */ } /* dissect_zcl_config_report_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Read Report Configuration command.
* dissect_zcl_read_report_config *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Read Report Configuration command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* guint - offset after command dissection.
*---------------------------------------------------------------
*/
static void dissect_zcl_read_report_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, static void dissect_zcl_read_report_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint *offset, guint16 cluster_id) guint *offset, guint16 cluster_id)
{ {
@ -1323,21 +1279,16 @@ static void dissect_zcl_read_report_config(tvbuff_t *tvb, packet_info *pinfo _U_
} /* dissect_zcl_read_report_config */ } /* dissect_zcl_read_report_config */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Default Response command.
* dissect_zcl_default_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Default Response command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller.
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id.
* proto_tree *tree - pointer to data tree wireshark uses to display packet. *@param dir direction.
* offset - pointer to offset from caller */
* dir - direction
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_default_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, static void dissect_zcl_default_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint *offset, guint16 cluster_id, guint8 dir) guint *offset, guint16 cluster_id, guint8 dir)
{ {
@ -1359,20 +1310,14 @@ static void dissect_zcl_default_resp(tvbuff_t *tvb, packet_info *pinfo _U_, prot
dissect_zcl_attr_uint8(tvb, tree, offset, &hf_zbee_zcl_attr_status); dissect_zcl_attr_uint8(tvb, tree, offset, &hf_zbee_zcl_attr_status);
} /* dissect_zcl_default_resp */ } /* dissect_zcl_default_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Discover Attributes command.
* dissect_zcl_discover_attr *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Discover Attributes command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields */
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - pointer to offset from caller
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_discover_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset) static void dissect_zcl_discover_attr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{ {
/* Dissect the starting attribute identifier */ /* Dissect the starting attribute identifier */
@ -1386,20 +1331,15 @@ static void dissect_zcl_discover_attr(tvbuff_t *tvb, packet_info *pinfo _U_, pro
} /* dissect_zcl_discover_attr */ } /* dissect_zcl_discover_attr */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Discover Attributes command.
* dissect_zcl_discover_attr_resp *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Discover Attributes command. *@param pinfo pointer to packet information fields
* PARAMETERS *@param tree pointer to data tree wireshark uses to display packet.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param offset pointer to offset from caller
* packet_info *pinfo - pointer to packet information fields *@param cluster_id cluster id
* proto_tree *tree - pointer to data tree wireshark uses to display packet. */
* offset - pointer to offset from caller
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_discover_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, static void dissect_zcl_discover_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint *offset, guint16 cluster_id) guint *offset, guint16 cluster_id)
{ {
@ -1428,21 +1368,13 @@ static void dissect_zcl_discover_attr_resp(tvbuff_t *tvb, packet_info *pinfo _U_
} /* dissect_zcl_discover_attr_resp */ } /* dissect_zcl_discover_attr_resp */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissects Attribute ID field. This could be done with the
* dissect_zcl_attr_id *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissects Attribute ID field. This could be done with the *@param tree pointer to data tree wireshark uses to display packet.
* dissect_zcl_attr_uint16 function, but we leave it separate *@param offset into the tvb to begin dissection.
* so we can dissect the attr_id with a hash in the future. */
* PARAMETERS
* tvbuff_t *tvb - pointer to buffer containing raw packet.
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - offset into the tvb to begin dissection.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_attr_id(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 cluster_id) static void dissect_zcl_attr_id(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 cluster_id)
{ {
zbee_zcl_cluster_desc *desc; zbee_zcl_cluster_desc *desc;
@ -1457,19 +1389,13 @@ static void dissect_zcl_attr_id(tvbuff_t *tvb, proto_tree *tree, guint *offset,
*offset += 2; *offset += 2;
} /* dissect_zcl_attr_id */ } /* dissect_zcl_attr_id */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Attribute commands.
* dissect_zcl_attr_data_type_val *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Attribute commands. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - offset into the tvb to begin dissection.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_attr_data_type_val(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 attr_id, guint16 cluster_id) static void dissect_zcl_attr_data_type_val(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 attr_id, guint16 cluster_id)
{ {
zbee_zcl_cluster_desc *desc; zbee_zcl_cluster_desc *desc;
@ -1487,21 +1413,16 @@ static void dissect_zcl_attr_data_type_val(tvbuff_t *tvb, proto_tree *tree, guin
} /* dissect_zcl_attr_data_type_val */ } /* dissect_zcl_attr_data_type_val */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Attribute commands.
* dissect_zcl_attr_data_general *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Attribute commands. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param attr_id attribute identification
* proto_tree *tree - pointer to data tree wireshark uses to display packet. *@param data_type type of data
* offset - offset into the tvb to begin dissection. *@param cluster_id cluster id
* attr_id - attribute identification */
* data_type - type of data
* RETURNS
* void
*---------------------------------------------------------------
*/
static void dissect_zcl_attr_data_general(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 attr_id, guint data_type, guint16 cluster_id) static void dissect_zcl_attr_data_general(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint16 attr_id, guint data_type, guint16 cluster_id)
{ {
zbee_zcl_cluster_desc *desc; zbee_zcl_cluster_desc *desc;
@ -1516,21 +1437,13 @@ static void dissect_zcl_attr_data_general(tvbuff_t *tvb, proto_tree *tree, guint
} /*dissect_zcl_attr_data_general*/ } /*dissect_zcl_attr_data_general*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *Dissects the various types of ZCL attribute data.
* dissect_zcl_attr_data *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Dissects the various types of ZCL attribute data. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. */
* packet_info *pinfo - pointer to packet information fields
* proto_tree *tree - pointer to data tree wireshark uses to display packet.
* offset - offset into the tvb to begin dissection.
* data_type - the type of ZCL data in the packet buffer
* RETURNS
* void
*---------------------------------------------------------------
*/
void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint data_type) void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint data_type)
{ {
guint attr_uint; guint attr_uint;
@ -1943,20 +1856,15 @@ void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint
} /* dissect_zcl_attr_data */ } /* dissect_zcl_attr_data */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL Attribute commands.
* dissect_zcl_attr_uint8 *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL Attribute commands. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param hf_zbee_zcl pointer to header field index
* proto_tree *tree - pointer to data tree wireshark uses to display packet. *@return dissected data
* offset - offset into the tvb to begin dissection. */
* hf_zbee_zcl - pointer to header field index
* RETURNS
* guint - dissected data
*---------------------------------------------------------------
*/
static guint dissect_zcl_attr_uint8(tvbuff_t *tvb, proto_tree *tree, guint *offset, int *hf_zbee_zcl) static guint dissect_zcl_attr_uint8(tvbuff_t *tvb, proto_tree *tree, guint *offset, int *hf_zbee_zcl)
{ {
guint attr_uint; guint attr_uint;
@ -1968,21 +1876,15 @@ static guint dissect_zcl_attr_uint8(tvbuff_t *tvb, proto_tree *tree, guint *offs
return attr_uint; return attr_uint;
} /* dissect_zcl_attr_uint8 */ } /* dissect_zcl_attr_uint8 */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL attribute array type.
* dissect_zcl_array_type *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL attribute array type. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param elements_type element type
* proto_tree *tree - pointer to data tree wireshark uses to display packet. *@param elements_num elements number
* offset - offset into the tvb to begin dissection. */
* elements_type - element type
* elements_num - elements number
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_array_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 elements_type, guint16 elements_num) dissect_zcl_array_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 elements_type, guint16 elements_num)
{ {
@ -2009,21 +1911,15 @@ dissect_zcl_array_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 el
} }
} /* dissect_zcl_array_type */ } /* dissect_zcl_array_type */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper dissector for ZCL attribute set and bag types.
* dissect_zcl_set_type *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper dissector for ZCL attribute set and bag types. *@param tree pointer to data tree wireshark uses to display packet.
* PARAMETERS *@param offset into the tvb to begin dissection.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param elements_type element type
* proto_tree *tree - pointer to data tree wireshark uses to display packet. *@param elements_num elements number
* offset - offset into the tvb to begin dissection. */
* elements_type - element type
* elements_num - elements number
* RETURNS
* void
*---------------------------------------------------------------
*/
static void static void
dissect_zcl_set_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 elements_type, guint16 elements_num) dissect_zcl_set_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 elements_type, guint16 elements_num)
{ {
@ -2050,20 +1946,14 @@ dissect_zcl_set_type(tvbuff_t *tvb, proto_tree *tree, guint *offset, guint8 elem
} }
} /* dissect_zcl_set_type */ } /* dissect_zcl_set_type */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Helper functions dumps any remaining data into the data dissector.
* zcl_dump_data *
* DESCRIPTION *@param tvb pointer to buffer containing raw packet.
* Helper functions dumps any remaining data into the data dissector. *@param offset offset after parsing last item.
* PARAMETERS *@param pinfo packet information structure.
* tvbuff_t *tvb - pointer to buffer containing raw packet. *@param tree pointer to data tree Wireshark uses to display packet.
* guint offset - offset after parsing last item. */
* packet_info *pinfo - packet information structure.
* proto_tree *tree - pointer to data tree Wireshark uses to display packet.
* RETURNS
* void
*---------------------------------------------------------------
*/
static void zcl_dump_data(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree) static void zcl_dump_data(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
{ {
proto_tree *root = proto_tree_get_root(tree); proto_tree *root = proto_tree_get_root(tree);
@ -2078,49 +1968,30 @@ static void zcl_dump_data(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto
return; return;
} /* zcl_dump_data */ } /* zcl_dump_data */
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes second time type variable
* decode_zcl_time_in_seconds *
* DESCRIPTION */
* this function decodes second time type variable
* PARAMETERS
* RETURNS
* none
*---------------------------------------------------------------
*/
void decode_zcl_time_in_seconds(gchar *s, guint16 value) void decode_zcl_time_in_seconds(gchar *s, guint16 value)
{ {
g_snprintf(s, ITEM_LABEL_LENGTH, "%d seconds", value); g_snprintf(s, ITEM_LABEL_LENGTH, "%d seconds", value);
return; return;
} /* decode_zcl_time_in_seconds*/ } /* decode_zcl_time_in_seconds*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *This function decodes minute time type variable
* 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) void decode_zcl_time_in_minutes(gchar *s, guint16 value)
{ {
g_snprintf(s, ITEM_LABEL_LENGTH, "%d minutes", value); g_snprintf(s, ITEM_LABEL_LENGTH, "%d minutes", value);
return; return;
} /*decode_zcl_time_in_minutes*/ } /*decode_zcl_time_in_minutes*/
/*FUNCTION:------------------------------------------------------ /**
* NAME *ZigBee ZCL protocol registration routine.
* proto_register_zbee_zcl *
* DESCRIPTION */
* ZigBee ZCL protocol registration routine.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void proto_register_zbee_zcl(void) void proto_register_zbee_zcl(void)
{ {
guint i, j; guint i, j;
@ -2405,17 +2276,10 @@ void proto_register_zbee_zcl(void)
register_dissector(ZBEE_PROTOABBREV_ZCL, dissect_zbee_zcl, proto_zbee_zcl); register_dissector(ZBEE_PROTOABBREV_ZCL, dissect_zbee_zcl, proto_zbee_zcl);
} /* proto_register_zbee_zcl */ } /* proto_register_zbee_zcl */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Finds the dissectors used in this module.
* proto_reg_handoff_zbee_zcl *
* DESCRIPTION */
* Finds the dissectors used in this module.
* PARAMETERS
* none
* RETURNS
* void
*---------------------------------------------------------------
*/
void proto_reg_handoff_zbee_zcl(void) void proto_reg_handoff_zbee_zcl(void)
{ {
dissector_handle_t zbee_zcl_handle; dissector_handle_t zbee_zcl_handle;
@ -2439,23 +2303,17 @@ void proto_reg_handoff_zbee_zcl(void)
} /* proto_reg_handoff_zbee_zcl */ } /* proto_reg_handoff_zbee_zcl */
/*FUNCTION:------------------------------------------------------ /**
* NAME *Register the specific cluster.
* zbee_zcl_init_cluster *
* DESCRIPTION *@param proto dissector
* Register the specific cluster. *@param ett proto (not used at the moment)
* PARAMETERS *@param cluster_id cluster identification
* proto - dissector proto *@param hf_attr_id cluster-specific attribute ID field.
* ett - ett proto (not used at the moment) *@param hf_cmd_rx_id cluster-specific client-to-server command ID field, or -1.
* cluster_id - cluster id *@param hf_cmd_tx_id cluster-specific server-to-client command ID field, or -1.
* hf_attr_id - cluster-specific attribute ID field. *@param fn_attr_data specific cluster attribute data decode function
* hf_cmd_rx_id - cluster-specific client-to-server command ID field, or -1. */
* hf_cmd_tx_id - cluster-specific server-to-client command ID field, or -1.
* fn_attr_data - specific cluster attribute data decode function
* RETURNS
* void
*---------------------------------------------------------------
*/
void void
zbee_zcl_init_cluster(int proto, gint ett, guint16 cluster_id, int hf_attr_id, int hf_cmd_rx_id, int hf_cmd_tx_id, zbee_zcl_fn_attr_data fn_attr_data) zbee_zcl_init_cluster(int proto, gint ett, guint16 cluster_id, int hf_attr_id, int hf_cmd_rx_id, int hf_cmd_tx_id, zbee_zcl_fn_attr_data fn_attr_data)
{ {
@ -2477,17 +2335,12 @@ zbee_zcl_init_cluster(int proto, gint ett, guint16 cluster_id, int hf_attr_id, i
return; return;
} }
/*FUNCTION:------------------------------------------------------ /**
* NAME *Retrieves the registered specific cluster descriptor.
* zbee_zcl_get_cluster_desc *
* DESCRIPTION *@param cluster_id cluster identification
* Retrieves the registered specific cluster descriptor. *@return cluster descriptor pointer
* PARAMETERS */
* cluster_id - cluster id
* RETURNS
* zbee_zcl_cluster_desc - cluster descriptor pointer
*---------------------------------------------------------------
*/
zbee_zcl_cluster_desc zbee_zcl_cluster_desc
*zbee_zcl_get_cluster_desc(guint16 cluster_id) *zbee_zcl_get_cluster_desc(guint16 cluster_id)
{ {