]> git.sur5r.net Git - openldap/blob - servers/slapd/tools/slapcommon.h
Implement slapcat -s <dn>: Only dump a subtree of the database.
[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
22 extern  char    *progname;
23 extern  char    *conffile;
24 extern  Backend *be;
25 extern  int             appendmode;
26 extern  int             verbose;
27 extern  int             continuemode;
28 extern  int             nosubordinates;
29 extern  int             dryrun;
30 extern  struct berval   sub_ndn;
31
32 extern  char    *ldiffile;
33 extern  FILE    *ldiffp;
34
35 void slap_tool_init LDAP_P((
36         const char* name,
37         int tool,
38         int argc, char **argv ));
39
40 void slap_tool_destroy LDAP_P((void));
41
42 #endif /* SLAPCOMMON_H_ */