]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapcommon.h
Partial revert of f30269f5d2e4bb5ee7486fe6542078d1b59dba6d
[openldap] / servers / slapd / slapcommon.h
index b5de462cb05c702abb2528b25c34e1c3e27276a4..fbea04d325aa3d7c167e2de123784395cf6f0c21 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2011 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -65,6 +65,8 @@ typedef struct tool_vars {
        unsigned tv_dn_mode;
        unsigned int tv_csnsid;
        ber_len_t tv_ldif_wrap;
+       char tv_maxcsnbuf[ LDAP_PVT_CSNSTR_BUFSIZE * ( SLAP_SYNC_SID_MAX + 1 ) ];
+       struct berval tv_maxcsn[ SLAP_SYNC_SID_MAX + 1 ];
 } tool_vars;
 
 extern tool_vars tool_globals;
@@ -100,6 +102,8 @@ extern tool_vars tool_globals;
 #define dn_mode tool_globals.tv_dn_mode
 #define csnsid tool_globals.tv_csnsid
 #define ldif_wrap tool_globals.tv_ldif_wrap
+#define maxcsn tool_globals.tv_maxcsn
+#define maxcsnbuf tool_globals.tv_maxcsnbuf
 
 #define SLAP_TOOL_LDAPDN_PRETTY                SLAP_LDAPDN_PRETTY
 #define SLAP_TOOL_LDAPDN_NORMAL                (SLAP_LDAPDN_PRETTY << 1)
@@ -111,4 +115,24 @@ void slap_tool_init LDAP_P((
 
 int slap_tool_destroy LDAP_P((void));
 
+int slap_tool_update_ctxcsn LDAP_P((
+       const char *progname,
+       unsigned long sid,
+       struct berval *bvtext ));
+
+unsigned long slap_tool_update_ctxcsn_check LDAP_P((
+       const char *progname,
+       Entry *e ));
+
+int slap_tool_update_ctxcsn_init LDAP_P((void));
+
+int slap_tool_entry_check LDAP_P((
+       const char *progname,
+       Operation *op,
+       Entry *e,
+       int lineno,
+       const char **text,
+       char *textbuf,
+       size_t textlen ));
+
 #endif /* SLAPCOMMON_H_ */