aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/ulp/packet-ulp-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/ulp/packet-ulp-template.c')
-rw-r--r--epan/dissectors/asn1/ulp/packet-ulp-template.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/epan/dissectors/asn1/ulp/packet-ulp-template.c b/epan/dissectors/asn1/ulp/packet-ulp-template.c
index 4861779d73..669f8dd1d1 100644
--- a/epan/dissectors/asn1/ulp/packet-ulp-template.c
+++ b/epan/dissectors/asn1/ulp/packet-ulp-template.c
@@ -52,7 +52,6 @@ static dissector_handle_t lpp_handle;
* oma-ulp 7275/udp OMA UserPlane Location
*/
#define ULP_PORT 7275
-static guint gbl_ulp_udp_port = ULP_PORT;
/* Initialize the protocol and registered fields */
static int proto_ulp = -1;
@@ -419,21 +418,13 @@ void proto_register_ulp(void) {
proto_register_field_array(proto_ulp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- ulp_module = prefs_register_protocol(proto_ulp,proto_reg_handoff_ulp);
+ ulp_module = prefs_register_protocol(proto_ulp, NULL);
prefs_register_bool_preference(ulp_module, "desegment_ulp_messages",
"Reassemble ULP messages spanning multiple TCP segments",
"Whether the ULP dissector should reassemble messages spanning multiple TCP segments."
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
&ulp_desegment);
-
- /* Register a configuration option for port */
- prefs_register_uint_preference(ulp_module, "udp.port",
- "ULP UDP Port",
- "Set the UDP port for ULP messages (IANA registered port is 7275)",
- 10,
- &gbl_ulp_udp_port);
-
}
@@ -441,23 +432,15 @@ void proto_register_ulp(void) {
void
proto_reg_handoff_ulp(void)
{
- static gboolean initialized = FALSE;
- static dissector_handle_t ulp_udp_handle;
- static guint local_ulp_udp_port;
+ dissector_handle_t ulp_udp_handle;
- if (!initialized) {
dissector_add_string("media_type","application/oma-supl-ulp", ulp_tcp_handle);
dissector_add_string("media_type","application/vnd.omaloc-supl-init", ulp_tcp_handle);
ulp_udp_handle = create_dissector_handle(dissect_ULP_PDU_PDU, proto_ulp);
rrlp_handle = find_dissector_add_dependency("rrlp", proto_ulp);
lpp_handle = find_dissector_add_dependency("lpp", proto_ulp);
- dissector_add_uint_with_preference("tcp.port", ULP_PORT, ulp_tcp_handle);
- initialized = TRUE;
- } else {
- dissector_delete_uint("udp.port", local_ulp_udp_port, ulp_udp_handle);
- }
- local_ulp_udp_port = gbl_ulp_udp_port;
- dissector_add_uint("udp.port", gbl_ulp_udp_port, ulp_udp_handle);
+ dissector_add_uint_with_preference("tcp.port", ULP_PORT, ulp_tcp_handle);
+ dissector_add_uint_with_preference("udp.port", ULP_PORT, ulp_udp_handle);
}