1 /* slapcommon.h - common definitions for the slap tools */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2005 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 SLAPPASSWD, /* password generation tool */
29 SLAPTEST, /* slapd.conf test tool */
30 SLAPAUTH, /* test authz-regexp and authc/authz stuff */
31 SLAPACL, /* test acl */
35 typedef struct tool_vars {
40 int tv_nosubordinates;
43 struct berval tv_sub_ndn;
45 struct berval tv_authcDN;
46 struct berval tv_baseDN;
47 struct berval tv_authcID;
48 struct berval tv_authzID;
49 struct berval tv_mech;
51 struct berval tv_listener_url;
52 struct berval tv_peer_domain;
53 struct berval tv_peer_name;
54 struct berval tv_sock_name;
56 slap_ssf_t tv_transport_ssf;
57 slap_ssf_t tv_tls_ssf;
58 slap_ssf_t tv_sasl_ssf;
61 extern tool_vars tool_globals;
63 #define be tool_globals.tv_be
64 #define verbose tool_globals.tv_verbose
65 #define update_ctxcsn tool_globals.tv_update_ctxcsn
66 #define continuemode tool_globals.tv_continuemode
67 #define nosubordinates tool_globals.tv_nosubordinates
68 #define dryrun tool_globals.tv_dryrun
69 #define filter tool_globals.tv_filter
70 #define sub_ndn tool_globals.tv_sub_ndn
71 #define ldiffp tool_globals.tv_ldiffp
72 #define authcDN tool_globals.tv_authcDN
73 #define baseDN tool_globals.tv_baseDN
74 #define authcID tool_globals.tv_authcID
75 #define authzID tool_globals.tv_authzID
76 #define mech tool_globals.tv_mech
77 #define realm tool_globals.tv_realm
78 #define listener_url tool_globals.tv_listener_url
79 #define peer_domain tool_globals.tv_peer_domain
80 #define peer_name tool_globals.tv_peer_name
81 #define sock_name tool_globals.tv_sock_name
82 #define ssf tool_globals.tv_ssf
83 #define transport_ssf tool_globals.tv_transport_ssf
84 #define tls_ssf tool_globals.tv_tls_ssf
85 #define sasl_ssf tool_globals.tv_sasl_ssf
87 void slap_tool_init LDAP_P((
90 int argc, char **argv ));
92 void slap_tool_destroy LDAP_P((void));
94 #endif /* SLAPCOMMON_H_ */