]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
Add error handling to BDB_INDEX code
[openldap] / servers / slapd / slap.h
index 0dcecd3fa4990449d7aef01710aa5e8dfd67d097..2e7d74a8d9773ccc3ab501d4ae8e4898e44dee6c 100644 (file)
@@ -32,7 +32,6 @@
 #include <ldap_schema.h>
 
 #include "ldap_pvt_thread.h"
-#include "ldif.h"
 
 LDAP_BEGIN_DECL
 
@@ -219,6 +218,17 @@ typedef struct slap_ssf_set {
 #define SLAP_SCHERR_NOT_SUPPORTED      15
 #define SLAP_SCHERR_BAD_DESCR  16
 
+typedef union slap_sockaddr {
+       struct sockaddr sa_addr;
+       struct sockaddr_in sa_in_addr;
+#ifdef LDAP_PF_INET6
+       struct sockaddr_in6 sa_in6_addr;
+#endif
+#ifdef LDAP_PF_LOCAL
+       struct sockaddr_un sa_un_addr;
+#endif
+} Sockaddr;
+
 typedef struct slap_oid_macro {
        struct berval som_oid;
        char **som_names;
@@ -450,6 +460,7 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_supportedExtension;
        AttributeDescription *si_ad_supportedLDAPVersion;
        AttributeDescription *si_ad_supportedSASLMechanisms;
+       AttributeDescription *si_ad_supportedFeatures;
 
        /* subschema subentry attribute descriptions */
        AttributeDescription *si_ad_objectClasses;
@@ -814,6 +825,17 @@ struct slap_replica_info {
        char  **ri_nsuffix;     /* array of suffixes this replica accepts */
 };
 
+struct slap_limits_set {
+       /* time limits */
+       int     lms_t_soft;
+       int     lms_t_hard;
+
+       /* size limits */
+       int     lms_s_soft;
+       int     lms_s_hard;
+       int     lms_s_unchecked;
+};
+
 struct slap_limits {
        int     lm_type;        /* type of pattern */
 #define SLAP_LIMITS_UNDEFINED  0x0000
@@ -821,8 +843,7 @@ struct slap_limits {
 #define SLAP_LIMITS_REGEX      0x0002
        regex_t lm_dn_regex;    /* regex-based size and time limits */
        char   *lm_dn_pat;      /* ndn for EXACT; pattern for REGEX */
-       int     lm_timelimit;
-       int     lm_sizelimit;
+       struct slap_limits_set  lm_limits;
 };
 
 /* temporary aliases */
@@ -920,8 +941,9 @@ struct slap_backend_db {
        char    *be_root_ndn;   /* the magic "root" normalized dn for this db   */
        struct berval be_root_pw;       /* the magic "root" password for this db        */
        unsigned int be_max_deref_depth;       /* limit for depth of an alias deref  */
-       int     be_sizelimit;   /* size limit for this backend             */
-       int     be_timelimit;   /* time limit for this backend             */
+#define be_sizelimit   be_def_limit.lms_s_soft
+#define be_timelimit   be_def_limit.lms_t_soft
+       struct slap_limits_set be_def_limit; /* default limits */
        struct slap_limits **be_limits; /* regex-based size and time limits */
        AccessControl *be_acl;  /* access control list for this backend    */
        slap_access_t   be_dfltaccess;  /* access given if no acl matches          */
@@ -1116,6 +1138,9 @@ struct slap_backend_info {
 typedef struct slap_op {
        ber_int_t       o_opid;         /* id of this operation           */
        ber_int_t       o_msgid;        /* msgid of the request           */
+#ifdef LDAP_CONNECTIONLESS
+       Sockaddr        o_peeraddr;     /* UDP peer address               */
+#endif
 
        ldap_pvt_thread_t       o_tid;  /* thread handling this op        */
 
@@ -1183,6 +1208,9 @@ typedef struct slap_conn {
        BerElement      *c_currentber;  /* ber we're attempting to read */
        int             c_writewaiter;  /* true if writer is waiting */
 
+#ifdef LDAP_CONNECTIONLESS
+       int     c_is_udp;               /* true if this is (C)LDAP over UDP */
+#endif
 #ifdef HAVE_TLS
        int     c_is_tls;               /* true if this LDAP over raw TLS */
        int     c_needs_tls_accept;     /* true if SSL_accept should be called */