]> git.sur5r.net Git - openldap/blob - servers/slapd/tools/slapcommon.h
925b9976b185f406d91129d9837b4a02153aec70
[openldap] / servers / slapd / tools / slapcommon.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6 /* slapcommon.h - common definitions for the slap tools */
7
8 #ifndef SLAPCOMMON_H_
9 #define SLAPCOMMON_H_ 1
10
11 #define SLAPD_TOOLS 1
12 #include "../slap.h"
13
14 enum slaptool {
15         SLAPCAT=1,      /* database -> LDIF tool */
16         SLAPADD,        /* LDIF -> database tool */
17         SLAPINDEX,      /* database index tool */
18         SLAPTEST        /* database testing tool */
19 };
20
21 #define SLAP_TOOL_CTXCSN_NONE   0
22 #define SLAP_TOOL_CTXCSN_ENTRY  1
23 #define SLAP_TOOL_CTXCSN_BATCH  2
24
25 extern  char    *progname;
26 extern  char    *conffile;
27 extern  Backend *be;
28 extern  int             appendmode;
29 extern  int             verbose;
30 extern  int             update_ctxcsn;
31 extern  int             retrieve_ctxcsn;
32 extern  int             retrieve_synccookie;
33 extern  int             continuemode;
34 extern  int             nosubordinates;
35 extern  int             dryrun;
36 extern  struct berval   sub_ndn;
37
38 extern  char    *ldiffile;
39 extern  FILE    *ldiffp;
40
41 void slap_tool_init LDAP_P((
42         const char* name,
43         int tool,
44         int argc, char **argv ));
45
46 void slap_tool_destroy LDAP_P((void));
47
48 #endif /* SLAPCOMMON_H_ */