]> git.sur5r.net Git - openldap/blob - servers/slapd/tools/slapcommon.h
misc cleanup
[openldap] / servers / slapd / tools / slapcommon.h
1 /* slapcommon.h - common definitions for the slap tools */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 1998-2003 The OpenLDAP Foundation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted only as authorized by the OpenLDAP
10  * Public License.
11  *
12  * A copy of this license is available in the file LICENSE in the
13  * top-level directory of the distribution or, alternatively, at
14  * <http://www.OpenLDAP.org/license.html>.
15  */
16
17 #ifndef SLAPCOMMON_H_
18 #define SLAPCOMMON_H_ 1
19
20 #define SLAPD_TOOLS 1
21 #include "../slap.h"
22
23 enum slaptool {
24         SLAPCAT=1,      /* database -> LDIF tool */
25         SLAPADD,        /* LDIF -> database tool */
26         SLAPINDEX,      /* database index tool */
27         SLAPTEST        /* database testing tool */
28 };
29
30 #define SLAP_TOOL_CTXCSN_KEEP   0
31 #define SLAP_TOOL_CTXCSN_ENTRY  1
32 #define SLAP_TOOL_CTXCSN_BATCH  2
33
34 extern  char    *progname;
35 extern  char    *conffile;
36 extern  Backend *be;
37 extern  int             appendmode;
38 extern  int             verbose;
39 extern  int             update_ctxcsn;
40 extern  int             retrieve_ctxcsn;
41 extern  int             retrieve_synccookie;
42 extern  int             replica_promotion;
43 extern  int             replica_demotion;
44 extern  char    *replica_id_string;
45 extern  char    **replica_id_strlist;
46 extern  int     *replica_id_list;
47 extern  int             continuemode;
48 extern  int             nosubordinates;
49 extern  int             dryrun;
50 extern  struct berval   sub_ndn;
51
52 extern  char    *ldiffile;
53 extern  FILE    *ldiffp;
54
55 void slap_tool_init LDAP_P((
56         const char* name,
57         int tool,
58         int argc, char **argv ));
59
60 void slap_tool_destroy LDAP_P((void));
61
62 #endif /* SLAPCOMMON_H_ */