aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zcl-ha.c
diff options
context:
space:
mode:
authorPaul Zander <p.j.zander@lighting.com>2018-03-07 09:09:35 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2018-03-09 12:52:03 +0000
commit1ac90d5254e9e303196c100039b7dd26d23841d1 (patch)
treecd20ede160d51078dd74b02421d42027983f8301 /epan/dissectors/packet-zbee-zcl-ha.c
parent446d9486ae897692fb3e02e90501e38790ac37c8 (diff)
Register and initialize the ZCL clusters in a uniform way.
The cluster registration and initialisation is done in the functions 'proto_reg_handoff_zbee_zcl_XXX'. In these functions the 1st step was to register the dissector. Then the cluster was initialised via the function 'zbee_zcl_init_cluster'. In this patch the registration and initialisation is now done by the function 'zbee_zcl_init_cluster'. In this way we have a more uniform way of registration. Change-Id: If865d904ea51c299a48e5c0004f3f280b7479d49 Reviewed-on: https://code.wireshark.org/review/26325 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-zcl-ha.c')
-rw-r--r--epan/dissectors/packet-zbee-zcl-ha.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/epan/dissectors/packet-zbee-zcl-ha.c b/epan/dissectors/packet-zbee-zcl-ha.c
index 77cb2a91b7..22ffe30044 100644
--- a/epan/dissectors/packet-zbee-zcl-ha.c
+++ b/epan/dissectors/packet-zbee-zcl-ha.c
@@ -332,7 +332,8 @@ proto_register_zbee_zcl_appl_idt(void)
void
proto_reg_handoff_zbee_zcl_appl_idt(void)
{
- zbee_zcl_init_cluster( proto_zbee_zcl_appl_idt,
+ zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_APPLIDT,
+ proto_zbee_zcl_appl_idt,
ett_zbee_zcl_appl_idt,
ZBEE_ZCL_CID_APPLIANCE_IDENTIFICATION,
hf_zbee_zcl_appl_idt_attr_id,
@@ -535,7 +536,8 @@ proto_register_zbee_zcl_met_idt(void)
void
proto_reg_handoff_zbee_zcl_met_idt(void)
{
- zbee_zcl_init_cluster( proto_zbee_zcl_met_idt,
+ zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_METIDT,
+ proto_zbee_zcl_met_idt,
ett_zbee_zcl_met_idt,
ZBEE_ZCL_CID_METER_IDENTIFICATION,
hf_zbee_zcl_met_idt_attr_id,
@@ -908,13 +910,8 @@ proto_register_zbee_zcl_appl_evtalt(void)
void
proto_reg_handoff_zbee_zcl_appl_evtalt(void)
{
- dissector_handle_t appl_evtalt_handle;
-
- /* Register our dissector with the ZigBee application dissectors. */
- appl_evtalt_handle = find_dissector(ZBEE_PROTOABBREV_ZCL_APPLEVTALT);
- dissector_add_uint("zbee.zcl.cluster", ZBEE_ZCL_CID_APPLIANCE_EVENTS_AND_ALERT, appl_evtalt_handle);
-
- zbee_zcl_init_cluster( proto_zbee_zcl_appl_evtalt,
+ zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_APPLEVTALT,
+ proto_zbee_zcl_appl_evtalt,
ett_zbee_zcl_appl_evtalt,
ZBEE_ZCL_CID_APPLIANCE_EVENTS_AND_ALERT,
-1,
@@ -1266,13 +1263,8 @@ proto_register_zbee_zcl_appl_stats(void)
void
proto_reg_handoff_zbee_zcl_appl_stats(void)
{
- dissector_handle_t appl_stats_handle;
-
- /* Register our dissector with the ZigBee application dissectors. */
- appl_stats_handle = find_dissector(ZBEE_PROTOABBREV_ZCL_APPLSTATS);
- dissector_add_uint("zbee.zcl.cluster", ZBEE_ZCL_CID_APPLIANCE_STATISTICS, appl_stats_handle);
-
- zbee_zcl_init_cluster( proto_zbee_zcl_appl_stats,
+ zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_APPLSTATS,
+ proto_zbee_zcl_appl_stats,
ett_zbee_zcl_appl_stats,
ZBEE_ZCL_CID_APPLIANCE_STATISTICS,
hf_zbee_zcl_appl_stats_attr_id,