aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec-tcp.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-07-27 14:45:25 +0000
committerBill Meier <wmeier@newsguy.com>2009-07-27 14:45:25 +0000
commit61683c409ae60c4e8dd44c5a4c16220f641c4fad (patch)
tree503f6ae55f260c4872d16fb1b35e87178a36542f /epan/dissectors/packet-ipsec-tcp.c
parent5aef94e6eb268b3480467c238434c90e21bf164e (diff)
Move proto_reg_handoff to the end ...
svn path=/trunk/; revision=29206
Diffstat (limited to 'epan/dissectors/packet-ipsec-tcp.c')
-rw-r--r--epan/dissectors/packet-ipsec-tcp.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/epan/dissectors/packet-ipsec-tcp.c b/epan/dissectors/packet-ipsec-tcp.c
index c040ebdca9..b9fa8c7c27 100644
--- a/epan/dissectors/packet-ipsec-tcp.c
+++ b/epan/dissectors/packet-ipsec-tcp.c
@@ -79,7 +79,7 @@ static dissector_handle_t udp_handle;
/* oh what a crap protocol.
there is nothing in the protocol that makes it easy to identify and then
- worse is that by default it is using port 10000 which ndmp has been
+ worse is that by default it is using port 10000 which ndmp has been
using for ages.
assume it is tcpencap if it does not look like ndmp
@@ -164,26 +164,6 @@ dissect_tcpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
void
-proto_reg_handoff_tcpencap(void)
-{
- static dissector_handle_t tcpencap_handle;
- static gboolean initialized = FALSE;
- static guint tcpencap_tcp_port;
-
- if (!initialized) {
- tcpencap_handle = new_create_dissector_handle(dissect_tcpencap, proto_tcpencap);
- esp_handle = find_dissector("esp");
- udp_handle = find_dissector("udp");
- initialized = TRUE;
- } else {
- dissector_delete("tcp.port", tcpencap_tcp_port, tcpencap_handle);
- }
-
- tcpencap_tcp_port = global_tcpencap_tcp_port;
- dissector_add("tcp.port", global_tcpencap_tcp_port, tcpencap_handle);
-}
-
-void
proto_register_tcpencap(void)
{
static hf_register_info hf[] = {
@@ -229,6 +209,8 @@ proto_register_tcpencap(void)
module_t *tcpencap_module;
+ void proto_reg_handoff_tcpencap(void);
+
proto_tcpencap = proto_register_protocol(
"TCP Encapsulation of IPsec Packets", "TCPENCAP", "tcpencap");
proto_register_field_array(proto_tcpencap, hf, array_length(hf));
@@ -240,3 +222,23 @@ proto_register_tcpencap(void)
10, &global_tcpencap_tcp_port);
}
+void
+proto_reg_handoff_tcpencap(void)
+{
+ static dissector_handle_t tcpencap_handle;
+ static gboolean initialized = FALSE;
+ static guint tcpencap_tcp_port;
+
+ if (!initialized) {
+ tcpencap_handle = new_create_dissector_handle(dissect_tcpencap, proto_tcpencap);
+ esp_handle = find_dissector("esp");
+ udp_handle = find_dissector("udp");
+ initialized = TRUE;
+ } else {
+ dissector_delete("tcp.port", tcpencap_tcp_port, tcpencap_handle);
+ }
+
+ tcpencap_tcp_port = global_tcpencap_tcp_port;
+ dissector_add("tcp.port", global_tcpencap_tcp_port, tcpencap_handle);
+}
+