diff options
Diffstat (limited to 'epan/dissectors/asn1/idmp/packet-idmp-template.c')
-rw-r--r-- | epan/dissectors/asn1/idmp/packet-idmp-template.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/epan/dissectors/asn1/idmp/packet-idmp-template.c b/epan/dissectors/asn1/idmp/packet-idmp-template.c index c54a9e7294..41b65229f6 100644 --- a/epan/dissectors/asn1/idmp/packet-idmp-template.c +++ b/epan/dissectors/asn1/idmp/packet-idmp-template.c @@ -47,13 +47,11 @@ void proto_register_idmp(void); void proto_reg_handoff_idm(void); -static void prefs_register_idmp(void); /* forward declaration for use in preferences registration */ void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name); static gboolean idmp_desegment = TRUE; -static guint global_idmp_tcp_port = 1102; /* made up for now */ +#define IDMP_TCP_PORT 1102 /* made up for now - not IANA registered */ static gboolean idmp_reassemble = TRUE; -static guint tcp_port = 0; static dissector_handle_t idmp_handle = NULL; static proto_tree *top_tree = NULL; @@ -343,7 +341,7 @@ void proto_register_idmp(void) /* Register our configuration options for IDMP, particularly our port */ - idmp_module = prefs_register_protocol_subtree("OSI/X.500", proto_idmp, prefs_register_idmp); + idmp_module = prefs_register_protocol_subtree("OSI/X.500", proto_idmp, NULL); prefs_register_bool_preference(idmp_module, "desegment_idmp_messages", "Reassemble IDMP messages spanning multiple TCP segments", @@ -357,33 +355,10 @@ void proto_register_idmp(void) " To use this option, you must also enable" " \"Allow subdissectors to reassemble TCP streams\"" " in the TCP protocol settings.", &idmp_reassemble); - - prefs_register_uint_preference(idmp_module, "tcp.port", "IDMP TCP Port", - "Set the port for Internet Directly Mapped Protocol requests/responses", - 10, &global_idmp_tcp_port); - } /*--- proto_reg_handoff_idm --- */ void proto_reg_handoff_idm(void) { - -} - - -static void -prefs_register_idmp(void) -{ - - /* de-register the old port */ - /* port 102 is registered by TPKT - don't undo this! */ - if(idmp_handle) - dissector_delete_uint("tcp.port", tcp_port, idmp_handle); - - /* Set our port number for future use */ - tcp_port = global_idmp_tcp_port; - - if((tcp_port > 0) && idmp_handle) - dissector_add_uint("tcp.port", global_idmp_tcp_port, idmp_handle); - + dissector_add_uint_with_preference("tcp.port", IDMP_TCP_PORT, idmp_handle); } |