]> git.sur5r.net Git - openldap/blob - clients/tools/common.h
Berkeley DB 4.2 support (DB 4.2 required by default)
[openldap] / clients / tools / common.h
1 /* common.h - common definitions for the ldap client 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 /* This file was initially created by Hallvard B. Furuseth based (in
17  * part) upon argument parsing code for individual tools located in
18  * this directory. 
19  */
20
21 #ifndef _CLIENT_TOOLS_COMMON_H_
22 #define _CLIENT_TOOLS_COMMON_H_
23
24 LDAP_BEGIN_DECL
25
26 /* Defined and set in common.c */
27 extern int   authmethod;
28 extern char *binddn;
29 extern int   contoper;
30 extern int   debug;
31 extern char *infile;
32 extern char *ldapuri;
33 extern char *ldaphost;
34 extern int   ldapport;
35 #ifdef HAVE_CYRUS_SASL
36 extern unsigned sasl_flags;
37 extern char     *sasl_realm;
38 extern char     *sasl_authc_id;
39 extern char     *sasl_authz_id;
40 extern char     *sasl_mech;
41 extern char     *sasl_secprops;
42 #endif
43 extern int   use_tls;
44
45 extern char *assertion;
46 extern char *authzid;
47 extern int   manageDSAit;
48 extern int   noop;
49 extern int      preread, postread;
50
51 extern int   not;
52 extern int   want_bindpw;
53 extern struct berval passwd;
54 extern char *pw_file;
55 extern int   referrals;
56 extern int   protocol;
57 extern int   verbose;
58 extern int   version;
59
60 /* Defined in common.c, set in main() */
61 extern char *prog;
62 extern const char __Version[];
63
64 /* Defined in main program */
65 extern const char options[];
66 void usage LDAP_P(( void )) LDAP_GCCATTR((noreturn));
67 int handle_private_option LDAP_P(( int i ));
68
69 /* Defined in common.c */
70 void tool_init LDAP_P(( void ));
71 void tool_common_usage LDAP_P(( void ));
72 void tool_args LDAP_P(( int, char ** ));
73 LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
74 void tool_bind LDAP_P(( LDAP * ));
75 void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
76
77 LDAP_END_DECL
78
79 #endif /* _CLIENT_TOOLS_COMMON_H_ */