/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*
#include "../liblber/lber-int.h"
#define ldap_debug (openldap_ldap_global_options.ldo_debug)
+#undef Debug
+#define Debug( level, fmt, arg1, arg2, arg3 ) \
+ ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
#include "ldap_log.h"
#include "ldap.h"
+#include "ldap_pvt.h"
+
LDAP_BEGIN_DECL
#define LDAP_URL_PREFIX "ldap://"
* which have global defaults.
*/
struct ldapoptions {
+ int ldo_debug;
+
int ldo_version; /* version to connect at */
int ldo_deref;
int ldo_timelimit;
int ldo_sizelimit;
- int ldo_debug;
-
+ int ldo_defport;
char* ldo_defbase;
char* ldo_defhost;
- int ldo_defport;
int ldo_cldaptries; /* connectionless search retry count */
int ldo_cldaptimeout;/* time between retries */
int ldo_refhoplimit; /* limit on referral nesting */
+ /* LDAPv3 server and client controls */
+ LDAPControl **ldo_server_controls;
+ LDAPControl **ldo_client_controls;
+
LDAP_BOOLEANS ldo_booleans; /* boolean options */
};
extern struct ldapoptions openldap_ldap_global_options;
void openldap_ldap_initialize LDAP_P((void));
+/*
+ * in print.c
+ */
+int ldap_log_printf LDAP_P((LDAP *ld, int level, char *fmt, ...));
+
/*
* in cache.c
*/
void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result ));
int ldap_check_cache LDAP_P(( LDAP *ld, unsigned long msgtype, BerElement *request ));
+/*
+ * in controls.c
+ */
+LDAPControl *ldap_control_dup LDAP_P(( LDAPControl *ctrl ));
+LDAPControl **ldap_controls_dup LDAP_P(( LDAPControl **ctrl ));
+int ldap_get_ber_controls LDAP_P(( BerElement *be, LDAPControl ***cp));
+
/*
* in dsparse.c
*/
#endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */
#endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */
-/*
- * in util_r.c
- *
- */
-
-struct hostent; /* avoid pulling in <netdb.h> */
-
-extern char *ldap_int_strtok( char *str, const char *delim, char **pos );
-extern char *ldap_int_ctime( const time_t *tp, char *buf );
-extern int ldap_int_gethostbyname_a(
- const char *name,
- struct hostent *resbuf,
- char **buf,
- struct hostent **result,
- int *herrno_ptr );
-extern int ldap_int_gethostbyaddr_a(
- const char *addr,
- int len,
- int type,
- struct hostent *resbuf,
- char **buf,
- struct hostent **result,
- int *herrno_ptr );
-
LDAP_END_DECL
#endif /* _LDAP_INT_H */