1 /* common.h - common definitions for the ldap client 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>.
17 * This file was initially created by Hallvard B. Furuseth based (in
18 * part) upon argument parsing code for individual tools located in
22 #ifndef _CLIENT_TOOLS_COMMON_H_
23 #define _CLIENT_TOOLS_COMMON_H_
27 /* Defined and set in common.c */
28 extern int authmethod;
34 extern char *ldaphost;
36 #ifdef HAVE_CYRUS_SASL
37 extern unsigned sasl_flags;
38 extern char *sasl_realm;
39 extern char *sasl_authc_id;
40 extern char *sasl_authz_id;
41 extern char *sasl_mech;
42 extern char *sasl_secprops;
46 extern char *assertion;
48 extern int manageDSAit;
51 extern int preread, postread;
52 #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
54 #endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
57 extern int want_bindpw;
58 extern struct berval passwd;
65 /* Defined in common.c, set in main() */
67 extern const char __Version[];
69 /* Defined in main program */
70 extern const char options[];
71 void usage LDAP_P(( void )) LDAP_GCCATTR((noreturn));
72 int handle_private_option LDAP_P(( int i ));
74 /* Defined in common.c */
75 void tool_init LDAP_P(( void ));
76 void tool_common_usage LDAP_P(( void ));
77 void tool_args LDAP_P(( int, char ** ));
78 LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
79 void tool_bind LDAP_P(( LDAP * ));
80 void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
84 #endif /* _CLIENT_TOOLS_COMMON_H_ */