]> git.sur5r.net Git - openldap/blob - clients/tools/common.h
f8cb32e89c2cc69b3133083f7d2a1f2dbd8b2f57
[openldap] / clients / tools / common.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 2002-2003 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6 /* common.h - common definitions for the ldap client tools */
7
8 #ifndef _COMMON_H_
9 #define _COMMON_H_
10
11 LDAP_BEGIN_DECL
12
13 /* Defined and set in common.c */
14 extern int   authmethod;
15 extern char *binddn;
16 extern int   contoper;
17 extern int   debug;
18 extern char *infile;
19 extern char *ldapuri;
20 extern char *ldaphost;
21 extern int   ldapport;
22 #ifdef HAVE_CYRUS_SASL
23 extern unsigned sasl_flags;
24 extern char     *sasl_realm;
25 extern char     *sasl_authc_id;
26 extern char     *sasl_authz_id;
27 extern char     *sasl_mech;
28 extern char     *sasl_secprops;
29 #endif
30 extern int   use_tls;
31
32 extern char *authzid;
33 extern int   manageDSAit;
34 extern int   noop;
35
36 extern int   not;
37 extern int   want_bindpw;
38 extern struct berval passwd;
39 extern char *pw_file;
40 extern int   referrals;
41 extern int   protocol;
42 extern int   verbose;
43 extern int   version;
44
45 /* Defined in common.c, set in main() */
46 extern char *prog;
47
48 /* Defined in main program */
49 extern const char options[];
50 void usage LDAP_P(( void )) LDAP_GCCATTR((noreturn));
51 int handle_private_option LDAP_P(( int i ));
52
53 /* Defined in common.c */
54 void tool_common_usage LDAP_P(( void ));
55 void tool_args LDAP_P(( int, char ** ));
56 LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
57 void tool_bind LDAP_P(( LDAP * ));
58 void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
59
60 LDAP_END_DECL
61
62 #endif /* _COMMON_H_ */