aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cisco-wids.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-cisco-wids.c')
-rw-r--r--epan/dissectors/packet-cisco-wids.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/epan/dissectors/packet-cisco-wids.c b/epan/dissectors/packet-cisco-wids.c
index fd26ecf606..7199c05727 100644
--- a/epan/dissectors/packet-cisco-wids.c
+++ b/epan/dissectors/packet-cisco-wids.c
@@ -50,11 +50,8 @@
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/expert.h>
-#include <epan/prefs.h>
#include <epan/show_exception.h>
-static guint global_udp_port = 0;
-
static int proto_cwids = -1;
static int hf_cwids_version = -1;
static int hf_cwids_timestamp = -1;
@@ -179,7 +176,6 @@ proto_register_cwids(void)
{ &ie_ieee80211_subpacket, { "cwids.ieee80211_malformed", PI_MALFORMED, PI_ERROR, "Malformed or short IEEE80211 subpacket", EXPFILL }},
};
- module_t *cwids_module;
expert_module_t* expert_cwids;
proto_cwids = proto_register_protocol("Cisco Wireless IDS Captures", "CWIDS", "cwids");
@@ -187,36 +183,16 @@ proto_register_cwids(void)
proto_register_subtree_array(ett, array_length(ett));
expert_cwids = expert_register_protocol(proto_cwids);
expert_register_field_array(expert_cwids, ei, array_length(ei));
-
- cwids_module = prefs_register_protocol(proto_cwids, proto_reg_handoff_cwids);
- prefs_register_uint_preference(cwids_module, "udp.port",
- "CWIDS port",
- "Set the destination UDP port Cisco wireless IDS messages",
- 10, &global_udp_port);
-
}
void
proto_reg_handoff_cwids(void)
{
- static dissector_handle_t cwids_handle;
- static guint saved_udp_port;
- static gboolean initialized = FALSE;
-
- if (!initialized) {
- cwids_handle = create_dissector_handle(dissect_cwids, proto_cwids);
- dissector_add_for_decode_as("udp.port", cwids_handle);
- ieee80211_radio_handle = find_dissector_add_dependency("wlan_noqos_radio", proto_cwids);
- initialized = TRUE;
- } else {
- if (saved_udp_port != 0) {
- dissector_delete_uint("udp.port", saved_udp_port, cwids_handle);
- }
- }
- if (global_udp_port != 0) {
- dissector_add_uint("udp.port", global_udp_port, cwids_handle);
- }
- saved_udp_port = global_udp_port;
+ dissector_handle_t cwids_handle;
+
+ cwids_handle = create_dissector_handle(dissect_cwids, proto_cwids);
+ dissector_add_for_decode_as_with_preference("udp.port", cwids_handle);
+ ieee80211_radio_handle = find_dissector_add_dependency("wlan_noqos_radio", proto_cwids);
}
/*