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-2003 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>.
16 /* This file was initially created by Hallvard B. Furuseth based (in
17 * part) upon argument parsing code for individual tools located in
21 #ifndef _CLIENT_TOOLS_COMMON_H_
22 #define _CLIENT_TOOLS_COMMON_H_
26 /* Defined and set in common.c */
27 extern int authmethod;
33 extern char *ldaphost;
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;
45 extern char *assertion;
47 extern int manageDSAit;
49 extern int preread, postread;
52 extern int want_bindpw;
53 extern struct berval passwd;
60 /* Defined in common.c, set in main() */
62 extern const char __Version[];
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 ));
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 ));
79 #endif /* _CLIENT_TOOLS_COMMON_H_ */