+/*
+ * While it's not important that the subsystem number are
+ * contiguous, it is important that the LDAP_SUBSYS_NUM accurately
+ * reflect the number of subsystems and LDAP_SUBSYS_MAX reflect
+ * the largest subsystem number.
+ */
+#define LDAP_SUBSYS_NUM 20
+#define LDAP_SUBSYS_MAX 19
+
+#define LDAP_SUBSYS_GLOBAL 0
+#define LDAP_SUBSYS_OPERATION 1
+#define LDAP_SUBSYS_TRANSPORT 2
+#define LDAP_SUBSYS_CONNECTION 3
+#define LDAP_SUBSYS_FILTER 4
+#define LDAP_SUBSYS_BER 5
+#define LDAP_SUBSYS_CONFIG 6
+#define LDAP_SUBSYS_ACL 7
+#define LDAP_SUBSYS_CACHE 8
+#define LDAP_SUBSYS_INDEX 9
+#define LDAP_SUBSYS_LDIF 10
+#define LDAP_SUBSYS_TOOLS 11
+#define LDAP_SUBSYS_SLAPD 12
+#define LDAP_SUBSYS_SLURPD 13
+#define LDAP_SUBSYS_BACKEND 14
+#define LDAP_SUBSYS_BACK_BDB 15
+#define LDAP_SUBSYS_BACK_LDBM 16
+#define LDAP_SUBSYS_BACK_LDAP 17
+#define LDAP_SUBSYS_BACK_META 18
+#define LDAP_SUBSYS_BACK_MON 19
+
+/*
+ * debug reporting levels.
+ *
+ * They start with the syslog levels, and
+ * go down in importance. The normal
+ * debugging levels begin with LDAP_LEVEL_ENTRY
+ *
+ */
+#define LDAP_LEVEL_EMERG 0
+#define LDAP_LEVEL_ALERT 1
+#define LDAP_LEVEL_CRIT 2
+#define LDAP_LEVEL_ERR 3
+#define LDAP_LEVEL_WARNING 4
+#define LDAP_LEVEL_NOTICE 5
+#define LDAP_LEVEL_INFO 6
+#define LDAP_LEVEL_ENTRY 7 /* log function entry points */
+#define LDAP_LEVEL_ARGS 8 /* log function call parameters */
+#define LDAP_LEVEL_RESULTS 9 /* Log function results */
+#define LDAP_LEVEL_DETAIL1 10 /* log level 1 function operational details */
+#define LDAP_LEVEL_DETAIL2 11 /* Log level 2 function operational details */
+