diff options
Diffstat (limited to 'epan/dissectors/packet-ulp.c')
-rw-r--r-- | epan/dissectors/packet-ulp.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index eebb9548ca..9d7fb5fa73 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -60,7 +60,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; @@ -711,7 +710,7 @@ static int hf_ulp_GANSSSignals_signal7 = -1; static int hf_ulp_GANSSSignals_signal8 = -1; /*--- End of included file: packet-ulp-hf.c ---*/ -#line 66 "./asn1/ulp/packet-ulp-template.c" +#line 65 "./asn1/ulp/packet-ulp-template.c" static int hf_ulp_mobile_directory_number = -1; static int hf_ulp_ganssTimeModels_bit0 = -1; static int hf_ulp_ganssTimeModels_bit1 = -1; @@ -942,7 +941,7 @@ static gint ett_ulp_PolygonArea = -1; static gint ett_ulp_PolygonDescription = -1; /*--- End of included file: packet-ulp-ett.c ---*/ -#line 80 "./asn1/ulp/packet-ulp-template.c" +#line 79 "./asn1/ulp/packet-ulp-template.c" static dissector_handle_t ulp_tcp_handle; @@ -1212,7 +1211,7 @@ ulp_Coordinate_longitude_fmt(gchar *s, guint32 v) #define maxWimaxBSMeas 32 /*--- End of included file: packet-ulp-val.h ---*/ -#line 330 "./asn1/ulp/packet-ulp-template.c" +#line 329 "./asn1/ulp/packet-ulp-template.c" typedef struct { @@ -7791,7 +7790,7 @@ static int dissect_ULP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_ /*--- End of included file: packet-ulp-fn.c ---*/ -#line 346 "./asn1/ulp/packet-ulp-template.c" +#line 345 "./asn1/ulp/packet-ulp-template.c" static guint @@ -10362,7 +10361,7 @@ void proto_register_ulp(void) { NULL, HFILL }}, /*--- End of included file: packet-ulp-hfarr.c ---*/ -#line 372 "./asn1/ulp/packet-ulp-template.c" +#line 371 "./asn1/ulp/packet-ulp-template.c" { &hf_ulp_mobile_directory_number, { "Mobile Directory Number", "ulp.mobile_directory_number", FT_STRING, BASE_NONE, NULL, 0, @@ -10616,7 +10615,7 @@ void proto_register_ulp(void) { &ett_ulp_PolygonDescription, /*--- End of included file: packet-ulp-ettarr.c ---*/ -#line 409 "./asn1/ulp/packet-ulp-template.c" +#line 408 "./asn1/ulp/packet-ulp-template.c" }; module_t *ulp_module; @@ -10630,21 +10629,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); - } @@ -10652,23 +10643,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); } |