1 /* slapcommon.h - common definitions for the slap tools */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2010 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
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>.
18 #define SLAPCOMMON_H_ 1
24 SLAPADD=1, /* LDIF -> database tool */
25 SLAPCAT, /* database -> LDIF tool */
26 SLAPDN, /* DN check w/ syntax tool */
27 SLAPINDEX, /* database index tool */
28 SLAPMODIFY, /* database modify tool */
29 SLAPPASSWD, /* password generation tool */
30 SLAPSCHEMA, /* schema checking tool */
31 SLAPTEST, /* slapd.conf test tool */
32 SLAPAUTH, /* test authz-regexp and authc/authz stuff */
33 SLAPACL, /* test acl */
37 typedef struct tool_vars {
44 int tv_nosubordinates;
47 struct berval tv_sub_ndn;
50 struct LDIFFP *tv_ldiffp;
51 struct berval tv_baseDN;
52 struct berval tv_authcDN;
53 struct berval tv_authzDN;
54 struct berval tv_authcID;
55 struct berval tv_authzID;
56 struct berval tv_mech;
58 struct berval tv_listener_url;
59 struct berval tv_peer_domain;
60 struct berval tv_peer_name;
61 struct berval tv_sock_name;
63 slap_ssf_t tv_transport_ssf;
64 slap_ssf_t tv_tls_ssf;
65 slap_ssf_t tv_sasl_ssf;
67 unsigned int tv_csnsid;
70 extern tool_vars tool_globals;
72 #define be tool_globals.tv_be
73 #define dbnum tool_globals.tv_dbnum
74 #define verbose tool_globals.tv_verbose
75 #define quiet tool_globals.tv_quiet
76 #define jumpline tool_globals.tv_jumpline
77 #define update_ctxcsn tool_globals.tv_update_ctxcsn
78 #define continuemode tool_globals.tv_continuemode
79 #define nosubordinates tool_globals.tv_nosubordinates
80 #define dryrun tool_globals.tv_dryrun
81 #define sub_ndn tool_globals.tv_sub_ndn
82 #define scope tool_globals.tv_scope
83 #define filter tool_globals.tv_filter
84 #define ldiffp tool_globals.tv_ldiffp
85 #define baseDN tool_globals.tv_baseDN
86 #define authcDN tool_globals.tv_authcDN
87 #define authzDN tool_globals.tv_authzDN
88 #define authcID tool_globals.tv_authcID
89 #define authzID tool_globals.tv_authzID
90 #define mech tool_globals.tv_mech
91 #define realm tool_globals.tv_realm
92 #define listener_url tool_globals.tv_listener_url
93 #define peer_domain tool_globals.tv_peer_domain
94 #define peer_name tool_globals.tv_peer_name
95 #define sock_name tool_globals.tv_sock_name
96 #define ssf tool_globals.tv_ssf
97 #define transport_ssf tool_globals.tv_transport_ssf
98 #define tls_ssf tool_globals.tv_tls_ssf
99 #define sasl_ssf tool_globals.tv_sasl_ssf
100 #define dn_mode tool_globals.tv_dn_mode
101 #define csnsid tool_globals.tv_csnsid
102 #define SLAP_TOOL_LDAPDN_PRETTY SLAP_LDAPDN_PRETTY
103 #define SLAP_TOOL_LDAPDN_NORMAL (SLAP_LDAPDN_PRETTY << 1)
105 void slap_tool_init LDAP_P((
108 int argc, char **argv ));
110 int slap_tool_destroy LDAP_P((void));
112 #endif /* SLAPCOMMON_H_ */