* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
/* This dissector supports version 3.0 of the dlm(Distributed Lock Manager)
-#define TCP_PORT_DLM3 21064
+#define TCP_PORT_DLM3 21064 /* Not IANA registered */
#define SCTP_PORT_DLM3 TCP_PORT_DLM3
#define DLM3_MAJOR_VERSION 0x00030000
/* configurable parameters */
-static guint dlm3_tcp_port = TCP_PORT_DLM3;
static guint dlm3_sctp_port = SCTP_PORT_DLM3;
/*
dlm3_module = prefs_register_protocol(proto_dlm3,
proto_reg_handoff_dlm3);
- prefs_register_uint_preference(dlm3_module, "tcp.port",
- "DLM3 TCP Port",
- "Set the TCP port for Distributed Lock Manager",
- 10,
- &dlm3_tcp_port);
prefs_register_uint_preference(dlm3_module, "sctp.port",
"DLM3 SCTP Port",
"Set the SCTP port for Distributed Lock Manager",
{
static gboolean dissector_registered = FALSE;
- static guint tcp_port;
static guint sctp_port;
static dissector_handle_t dlm3_tcp_handle;
if (!dissector_registered) {
dlm3_sctp_handle = create_dissector_handle(dissect_dlm3, proto_dlm3);
dlm3_tcp_handle = create_dissector_handle(dissect_dlm3, proto_dlm3);
+ dissector_add_uint_with_preference("tcp.port", TCP_PORT_DLM3, dlm3_tcp_handle);
dissector_registered = TRUE;
} else {
- dissector_delete_uint("tcp.port", tcp_port, dlm3_tcp_handle);
dissector_delete_uint("sctp.port", sctp_port, dlm3_sctp_handle);
}
- tcp_port = dlm3_tcp_port;
sctp_port = dlm3_sctp_port;
- dissector_add_uint("tcp.port", tcp_port, dlm3_tcp_handle);
dissector_add_uint("sctp.port", sctp_port, dlm3_sctp_handle);
}