aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-aps.c
diff options
context:
space:
mode:
authorMartin Boye Petersen <martinboyepetersen@gmail.com>2018-01-21 21:17:08 +0100
committerAnders Broman <a.broman58@gmail.com>2018-01-22 11:45:14 +0000
commita6ae7f75714d6a7cb0f8d0ea2b1a4e649da59533 (patch)
tree57dbfe018e1535004311ddd80e64f16c2e45fd4a /epan/dissectors/packet-zbee-aps.c
parent3e14d3b440eb85fce8e48d5d0326c60dff7fe10a (diff)
ZigBee: Add a preference to choose ZigBee Smart Energy version used for dissecting
Some ZigBee commands within the Smart Energy Profile does not have the same payload across different specifications. With this preference it is possible to choose what version of the specification to use when dissecting payloads. The default version is set to the latest one, which is Smart Energy 1.4, even though it is still under development. Change-Id: Iaec5528f2a418aeec4e39cfa087a58e531570d42 Reviewed-on: https://code.wireshark.org/review/25409 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Kenneth Soerensen <knnthsrnsn@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-zbee-aps.c')
-rw-r--r--epan/dissectors/packet-zbee-aps.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c
index 7938c03c0d..d487f44a82 100644
--- a/epan/dissectors/packet-zbee-aps.c
+++ b/epan/dissectors/packet-zbee-aps.c
@@ -1837,6 +1837,18 @@ zbee_apf_transaction_len(tvbuff_t *tvb, guint offset, guint8 type)
}
} /* zbee_apf_transaction_len */
+/* The ZigBee Smart Energy version in enum_val_t for the ZigBee Smart Energy version preferences. */
+static const enum_val_t zbee_zcl_protocol_version_enums[] = {
+ { "se1.1b", "SE 1.1b", ZBEE_SE_VERSION_1_1B },
+ { "se1.2", "SE 1.2", ZBEE_SE_VERSION_1_2 },
+ { "se1.2a", "SE 1.2a", ZBEE_SE_VERSION_1_2A },
+ { "se1.2b", "SE 1.2b", ZBEE_SE_VERSION_1_2B },
+ { "se1.4", "SE 1.4", ZBEE_SE_VERSION_1_4 },
+ { NULL, NULL, 0 }
+};
+
+gint gPREF_zbee_se_protocol_version = ZBEE_SE_VERSION_1_4;
+
/**
*ZigBee APS protocol registration routine.
*
@@ -2129,6 +2141,14 @@ void proto_register_zbee_aps(void)
zbee_aps_dissector_table = register_dissector_table("zbee.profile", "ZigBee Profile ID", proto_zbee_aps, FT_UINT16, BASE_HEX);
zbee_aps_handle = register_dissector(ZBEE_PROTOABBREV_APS, dissect_zbee_aps, proto_zbee_aps);
+ /* Register preferences */
+ module_t* zbee_se_prefs = prefs_register_protocol(proto_zbee_aps, NULL);
+
+ prefs_register_enum_preference(zbee_se_prefs, "zbeeseversion", "ZigBee Smart Energy Version",
+ "Specifies the ZigBee Smart Energy version used when dissecting "
+ "ZigBee APS messages within the Smart Energy Profile",
+ &gPREF_zbee_se_protocol_version, zbee_zcl_protocol_version_enums, FALSE);
+
/* Register reassembly table. */
reassembly_table_register(&zbee_aps_reassembly_table,
&addresses_reassembly_table_functions);