]> git.sur5r.net Git - openldap/blob - clients/tools/common.h
6b2710501dd35ea88e30eef7017475f7ddcaf0b4
[openldap] / clients / tools / common.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 2002 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 /* Defined and set in common.c */
12 extern int   authmethod;
13 extern char *binddn;
14 extern int   contoper;
15 extern int   debug;
16 extern char *infile;
17 extern char *ldapuri;
18 extern char *ldaphost;
19 extern int   ldapport;
20 #ifdef HAVE_CYRUS_SASL
21 extern unsigned sasl_flags;
22 extern char     *sasl_realm;
23 extern char     *sasl_authc_id;
24 extern char     *sasl_authz_id;
25 extern char     *sasl_mech;
26 extern char     *sasl_secprops;
27 #endif
28 extern int   use_tls;
29
30 extern char *authzid;
31 extern int   manageDSAit;
32 extern int   noop;
33
34 extern int   not;
35 extern int   want_bindpw;
36 extern struct berval passwd;
37 extern char *pw_file;
38 extern int   referrals;
39 extern int   verbose;
40 extern int   version;
41
42 /* Defined in common.c, set in main() */
43 char *prog;
44
45 /* Defined in main program */
46 extern const char options[];
47 void usage LDAP_P(( void )) LDAP_GCCATTR((noreturn));
48 int handle_private_option LDAP_P(( int i ));
49
50 /* Defined in common.c */
51 void tool_common_usage LDAP_P(( void ));
52 void tool_args LDAP_P(( int, char ** ));
53 LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
54 void tool_bind LDAP_P(( LDAP * ));
55 void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
56
57 #endif /* _COMMON_H_ */