aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-lwm.c')
-rw-r--r--epan/dissectors/packet-lwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-lwm.c b/epan/dissectors/packet-lwm.c
index 1bbc38c3de..453416d4cd 100644
--- a/epan/dissectors/packet-lwm.c
+++ b/epan/dissectors/packet-lwm.c
@@ -149,6 +149,8 @@ static expert_field ei_lwm_empty_payload = EI_INIT;
static expert_field ei_lwm_no_decryption_key = EI_INIT;
static expert_field ei_lwm_decryption_failed = EI_INIT;
+static dissector_handle_t lwm_handle;
+
static const value_string lwm_cmd_names[] = {
{ LWM_CMD_ACK, "LwMesh ACK" },
{ LWM_CMD_ROUTE_ERR, "Route Error" },
@@ -905,7 +907,7 @@ void proto_register_lwm(void)
"128-bit decryption key in hexadecimal format", (const char **)&lwmes_key_str);
/* Register dissector with Wireshark. */
- register_dissector("lwm", dissect_lwm, proto_lwm);
+ lwm_handle = register_dissector("lwm", dissect_lwm, proto_lwm);
} /* proto_register_lwm */
@@ -937,7 +939,7 @@ void proto_reg_handoff_lwm(void)
/* Register our dissector with IEEE 802.15.4 */
- dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, find_dissector("lwm"));
+ dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, lwm_handle);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_lwm_heur, "Lightweight Mesh over IEEE 802.15.4", "lwm_wlan", proto_lwm, HEURISTIC_ENABLE);
} /* proto_reg_handoff_lwm */