aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-simulcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-simulcrypt.c')
-rw-r--r--epan/dissectors/packet-simulcrypt.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/epan/dissectors/packet-simulcrypt.c b/epan/dissectors/packet-simulcrypt.c
index 7f16632044..65218c621b 100644
--- a/epan/dissectors/packet-simulcrypt.c
+++ b/epan/dissectors/packet-simulcrypt.c
@@ -73,7 +73,6 @@ static void dissect_simulcrypt_data(proto_tree *simulcrypt_tree, proto_item *sim
static guint proto_simulcrypt = -1;
/* Preferences (with default values) */
-static guint global_simulcrypt_udp_port = 0; /* Simulcrypt registered only if pref set to non-zero value */
static int ca_system_id_mikey = CA_SYSTEM_ID_MIKEY; /* MIKEY ECM CA_system_ID */
/* MIKEY payload start bytes */
@@ -1837,10 +1836,6 @@ proto_register_simulcrypt (void)
/* called when preferences are applied. */
simulcrypt_module = prefs_register_protocol(proto_simulcrypt, proto_reg_handoff_simulcrypt);
- prefs_register_uint_preference(simulcrypt_module, "udp.port", "Simulcrypt UDP Port",
- "Set the UDP port for Simulcrypt messages ('0' means no port is assigned)",
- 10, &global_simulcrypt_udp_port);
-
prefs_register_uint_preference(simulcrypt_module, "ca_system_id_mikey","MIKEY ECM CA_system_ID (in hex)",
"Set the CA_system_ID used to decode ECM datagram as MIKEY", 16, &ca_system_id_mikey);
}
@@ -1850,8 +1845,7 @@ void
proto_reg_handoff_simulcrypt(void)
{
static gboolean initialized=FALSE;
- static dissector_handle_t simulcrypt_handle;
- static guint udp_port;
+ dissector_handle_t simulcrypt_handle;
guint i;
if (!initialized) {
@@ -1860,18 +1854,10 @@ proto_reg_handoff_simulcrypt(void)
{
tab_ecm_inter[i].protocol_handle = find_dissector(tab_ecm_inter[i].protocol_name);
}
- dissector_add_for_decode_as("udp.port", simulcrypt_handle);
+ dissector_add_for_decode_as_with_preference("udp.port", simulcrypt_handle);
dissector_add_for_decode_as_with_preference("tcp.port", simulcrypt_handle);
initialized = TRUE;
}
- else {
- dissector_delete_uint("udp.port", udp_port, simulcrypt_handle);
- }
-
- if (global_simulcrypt_udp_port != 0) {
- dissector_add_uint("udp.port", global_simulcrypt_udp_port, simulcrypt_handle);
- }
- udp_port = global_simulcrypt_udp_port;
/* update tab_ecm_inter table (always do this) */
tab_ecm_inter[ECM_MIKEY_INDEX].ca_system_id=ca_system_id_mikey;