aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ldap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-08 07:07:42 +0000
commita831e8f8f2eefe74564ab3356dd7b5bcfd64c449 (patch)
tree8c2187183a707d04b8678a4cbfddb5577187c015 /packet-ldap.c
parent907093903ca0afdc6a9106415d88fc7565a492a7 (diff)
Move calls to "dissector_add()" out of the register routines for TCP and
UDP and into the handoff registration routines for the protocols in question. Make the dissectors for those protocols static if they're not called outside the dissector's source file. Get rid of header files if all they did was declare dissectors that are now static; remove declarations of now-static dissectors from header files that do more than just declare the dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1823 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ldap.c')
-rw-r--r--packet-ldap.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/packet-ldap.c b/packet-ldap.c
index 46037e7717..b00a373ba1 100644
--- a/packet-ldap.c
+++ b/packet-ldap.c
@@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
- * $Id: packet-ldap.c,v 1.8 2000/04/06 03:59:28 guy Exp $
+ * $Id: packet-ldap.c,v 1.9 2000/04/08 07:07:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -114,6 +114,8 @@ static gint ett_ldap_message = -1;
static gint ett_ldap_referrals = -1;
static gint ett_ldap_attribute = -1;
+#define TCP_PORT_LDAP 389
+
static value_string msgTypes [] = {
{LDAP_REQ_BIND, "Bind Request"},
{LDAP_REQ_UNBIND, "Unbind Request"},
@@ -703,7 +705,7 @@ static int dissect_ldap_request_abandon(ASN1_SCK *a, proto_tree *tree,
return 0;
}
-void
+static void
dissect_ldap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *ldap_tree = 0, *ti, *msg_tree;
@@ -1036,3 +1038,10 @@ proto_register_ldap(void)
proto_register_field_array(proto_ldap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ldap(void)
+{
+ dissector_add("tcp.port", TCP_PORT_LDAP, dissect_ldap);
+}
+