]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
Berkeley DB 4.2 support (DB 4.2 required by default)
[openldap] / servers / slapd / slap.h
index 4be38925d1c99a53c9818327f4a93f557ceeb639..4185bba5fc4803a8fa753503224b067e896819f1 100644 (file)
@@ -1287,51 +1287,60 @@ typedef BackendDB Backend;
 #define nbackends nBackendDB
 #define backends backendDB
 
+/*
+ * syncinfo structure for syncrepl
+ */
+
+#define SLAP_SYNC_SID_SIZE     3
+#define SLAP_SYNCUUID_SET_SIZE 256
+
 struct nonpresent_entry {
        struct berval *npe_name;
        struct berval *npe_nname;
        LDAP_LIST_ENTRY(nonpresent_entry) npe_link;
 };
 
-/*
- * syncinfo structure for syncrepl
- */
+struct sync_cookie {
+       struct berval *ctxcsn;
+       long sid;
+       struct berval *octet_str;
+};
+
 typedef struct syncinfo_s {
-       struct slap_backend_db *si_be;
-       unsigned int    si_id;
-       char                    *si_provideruri;
-       BerVarray               si_provideruri_bv;
-#define        SYNCINFO_TLS_OFF                0
-#define        SYNCINFO_TLS_ON                 1
-#define        SYNCINFO_TLS_CRITICAL   2
-       int                             si_tls;
-       struct  berval  si_updatedn;    
-       int                             si_bindmethod;
-       char                    *si_binddn;
-       char                    *si_passwd;
-       char                    *si_saslmech;
-       char                    *si_secprops;
-       char                    *si_realm;
-       char                    *si_authcId;
-       char                    *si_authzId;
-       int                             si_schemachecking;
-       Filter                  *si_filter;
-       struct berval   si_filterstr;
-       struct berval   si_base;
-       int                             si_scope;
-       int                             si_attrsonly;
-       char                    **si_attrs;
-       int                             si_type;
-       time_t                  si_interval;
-       struct berval   si_syncCookie;
-       int                             si_manageDSAit;
-       int                             si_slimit;
-       int                             si_tlimit;
-       struct berval   si_syncUUID_ndn;
-       Avlnode                 *si_presentlist;
-       int                             si_sync_mode;
-       LDAP                    *si_ld;
-       LDAP_LIST_HEAD(np,      nonpresent_entry) si_nonpresentlist;
+        struct slap_backend_db *si_be;
+        unsigned int           si_id;
+        char                           *si_provideruri;
+        BerVarray                      si_provideruri_bv;
+#define SYNCINFO_TLS_OFF               0
+#define SYNCINFO_TLS_ON                        1
+#define SYNCINFO_TLS_CRITICAL  2
+        int                                    si_tls;
+               struct berval           si_updatedn;    
+        int                                    si_bindmethod;
+        char                           *si_binddn;
+        char                           *si_passwd;
+        char                           *si_saslmech;
+        char                           *si_secprops;
+        char                           *si_realm;
+        char                           *si_authcId;
+        char                           *si_authzId;
+               int                                     si_schemachecking;
+        Filter                         *si_filter;
+        struct berval          si_filterstr;
+        struct berval          si_base;
+        int                                    si_scope;
+        int                                    si_attrsonly;
+        char                           **si_attrs;
+        int                                    si_type;
+        time_t                         si_interval;
+               struct sync_cookie      si_syncCookie;
+        int                                    si_manageDSAit;
+        int                                    si_slimit;
+               int                                     si_tlimit;
+               struct berval           si_syncUUID_ndn;
+        Avlnode                                *si_presentlist;
+               LDAP                            *si_ld;
+               LDAP_LIST_HEAD(np, nonpresent_entry) si_nonpresentlist;
 } syncinfo_t;
 
 struct slap_backend_db {
@@ -1812,6 +1821,21 @@ struct psid_entry {
        LDAP_LIST_ENTRY(psid_entry) ps_link;
 };
 
+struct slog_entry {
+       struct berval sl_uuid;
+       struct berval sl_name;
+       struct berval sl_csn;
+       LDAP_STAILQ_ENTRY(slog_entry) sl_link;
+};
+
+/* session lists */
+struct slap_session_entry {
+       int se_id;
+       int se_size;
+       struct berval se_spec;
+       LDAP_LIST_ENTRY( slap_session_entry ) se_link;
+};
+
 struct slap_csn_entry {
        struct berval *csn;
        unsigned long opid;
@@ -1966,13 +1990,21 @@ typedef struct slap_op {
 
        char o_sync;
        char o_sync_mode;
-#define SLAP_SYNC_NONE                         (0x0)
-#define SLAP_SYNC_REFRESH                      (0x1)
-#define SLAP_SYNC_PERSIST                      (0x2)
-#define SLAP_SYNC_REFRESH_AND_PERSIST          (0x3)
-       struct berval o_sync_state;
+#define SLAP_SYNC_NONE                                 (0x0)
+#define SLAP_SYNC_REFRESH                              (0x1)
+#define SLAP_SYNC_PERSIST                              (0x2)
+#define SLAP_SYNC_REFRESH_AND_PERSIST  (0x3)
+       struct sync_cookie      o_sync_state;
+       int                                     o_sync_rhint;
+       struct berval           o_sync_cid;
+       int                                     o_sync_slog_size;
+       struct berval           o_sync_csn;
+       struct berval           o_sync_slog_omitcsn;
+       int                                     o_sync_slog_len;
+       LDAP_STAILQ_HEAD(sl, slog_entry) o_sync_slog_list;
 
        int o_ps_entries;
+       int     o_no_psearch;
        LDAP_LIST_ENTRY(slap_op) o_ps_link;
        LDAP_LIST_HEAD(pe, psid_entry) o_pm_list;