aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-07-12 14:42:14 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-07-12 14:42:14 +0000
commit60cf244b64ff6a1dd4975727ee7cccfa4ab7cc82 (patch)
tree7c736bcc8102322809156a8c60fcdd36eb7b2968 /epan
parent9b8272238b528bc487cf462b6e05d554d74774b5 (diff)
Move the registration for SSL sockets to the protocol dissectors themselves.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25721 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-imap.c3
-rw-r--r--epan/dissectors/packet-pop.c3
-rw-r--r--epan/dissectors/packet-ssl-utils.h12
-rw-r--r--epan/dissectors/packet-ssl.c4
-rw-r--r--epan/dissectors/packet-ssl.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-imap.c b/epan/dissectors/packet-imap.c
index f44bcc0aff..64f1146ef2 100644
--- a/epan/dissectors/packet-imap.c
+++ b/epan/dissectors/packet-imap.c
@@ -35,6 +35,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/strutil.h>
+#include "packet-ssl.h"
static int proto_imap = -1;
static int hf_imap_response = -1;
@@ -44,6 +45,7 @@ static gint ett_imap = -1;
static gint ett_imap_reqresp = -1;
#define TCP_PORT_IMAP 143
+#define TCP_PORT_SSL_IMAP 993
static void
dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -192,4 +194,5 @@ proto_reg_handoff_imap(void)
imap_handle = create_dissector_handle(dissect_imap, proto_imap);
dissector_add("tcp.port", TCP_PORT_IMAP, imap_handle);
+ ssl_dissector_add(TCP_PORT_SSL_IMAP, "imap", TRUE);
}
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index 37bc3d4e0d..06d0a3122f 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -39,6 +39,7 @@
#include <epan/conversation.h>
#include <epan/prefs.h>
#include <epan/reassemble.h>
+#include "packet-ssl.h"
static int proto_pop = -1;
@@ -71,6 +72,7 @@ static dissector_handle_t data_handle;
static dissector_handle_t imf_handle = NULL;
#define TCP_PORT_POP 110
+#define TCP_PORT_SSL_POP 995
/* desegmentation of POP command and response lines */
static gboolean pop_data_desegment = TRUE;
@@ -468,6 +470,7 @@ proto_reg_handoff_pop(void)
pop_handle = create_dissector_handle(dissect_pop, proto_pop);
dissector_add("tcp.port", TCP_PORT_POP, pop_handle);
+ ssl_dissector_add(TCP_PORT_SSL_POP, "pop", TRUE);
data_handle = find_dissector("data");
/* find the IMF dissector */
diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h
index 320e447b81..9937daec60 100644
--- a/epan/dissectors/packet-ssl-utils.h
+++ b/epan/dissectors/packet-ssl-utils.h
@@ -1,9 +1,12 @@
/* packet-ssl-utils.h
+ * ssl manipulation functions
+ * By Paolo Abeni <paolo.abeni@email.com>
*
* $Id$
*
- * ssl manipulation functions
- * By Paolo Abeni <paolo.abeni@email.com>
+ * Wireshark - Network traffic analyzer
+ * 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
@@ -56,11 +59,6 @@
#define SSL_PRIVATE_KEY void
#endif /* HAVE_LIBGNUTLS */
- /* The TCP port to associate with by default */
-#define TCP_PORT_SSL 443
-#define TCP_PORT_SSL_LDAP 636
-#define TCP_PORT_SSL_IMAP 993
-#define TCP_PORT_SSL_POP 995
/* version state tables */
#define SSL_VER_UNKNOWN 0
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 7d84277293..30bb218606 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -4381,10 +4381,6 @@ proto_reg_handoff_ssl(void)
/* parse key list */
ssl_parse();
-
- /* add ssl dissection to defaults ports */
- ssl_dissector_add(TCP_PORT_SSL_IMAP, "imap", TRUE);
- ssl_dissector_add(TCP_PORT_SSL_POP, "pop", TRUE);
}
void
diff --git a/epan/dissectors/packet-ssl.h b/epan/dissectors/packet-ssl.h
index 875392a9c3..db08f1e489 100644
--- a/epan/dissectors/packet-ssl.h
+++ b/epan/dissectors/packet-ssl.h
@@ -4,7 +4,7 @@
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998
+ * Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or