]> git.sur5r.net Git - openldap/blobdiff - clients/tools/common.h
Import ITS#4812 patch from HEAD, print error from ldap_result()
[openldap] / clients / tools / common.h
index 38ecf7d4bf7f535ba78d9808f44d52ee9760915a..82ab023caeb79917bc17a7140d569b0e2da5b201 100644 (file)
@@ -1,12 +1,26 @@
+/* common.h - common definitions for the ldap client tools */
 /* $OpenLDAP$ */
-/*
- * Copyright 2002-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2007 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This file was initially created by Hallvard B. Furuseth based (in
+ * part) upon argument parsing code for individual tools located in
+ * this directory. 
  */
-/* common.h - common definitions for the ldap client tools */
 
-#ifndef _COMMON_H_
-#define _COMMON_H_
+#ifndef _CLIENT_TOOLS_COMMON_H_
+#define _CLIENT_TOOLS_COMMON_H_
 
 LDAP_BEGIN_DECL
 
@@ -31,8 +45,14 @@ extern int   use_tls;
 
 extern char *assertion;
 extern char *authzid;
+extern int   manageDIT;
 extern int   manageDSAit;
 extern int   noop;
+extern int   ppolicy;
+extern int     preread, postread;
+#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
+extern int     chaining;
+#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
 
 extern int   not;
 extern int   want_bindpw;
@@ -58,8 +78,18 @@ void tool_common_usage LDAP_P(( void ));
 void tool_args LDAP_P(( int, char ** ));
 LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
 void tool_bind LDAP_P(( LDAP * ));
+void tool_unbind LDAP_P(( LDAP * ));
+void tool_destroy LDAP_P(( void ));
 void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
+int tool_check_abandon LDAP_P(( LDAP *ld, int msgid ));
+void tool_perror LDAP_P((
+       char *func,
+       int err,
+       char *extra,
+       char *matched,
+       char *info,
+       char **refs ));
 
 LDAP_END_DECL
 
-#endif /* _COMMON_H_ */
+#endif /* _CLIENT_TOOLS_COMMON_H_ */