/* ldap-int.h - defines & prototypes internal to the LDAP library */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-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-2003 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>.
*/
-/* Portions
- * Copyright (c) 1995 Regents of the University of Michigan.
+/* Portions Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
*/
* Note: Deallocate structure when the process exits
*/
# define LDAP_INT_GLOBAL_OPT() ldap_int_global_opt()
- struct ldapoptions *ldap_int_global_opt(void);
+ struct ldapoptions *ldap_int_global_opt(void);
#else
# define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
#endif
#include "ldap_log.h"
#undef Debug
+
+#ifdef LDAP_DEBUG
+
#define Debug( level, fmt, arg1, arg2, arg3 ) \
do { if ( ldap_debug & level ) \
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) ); \
#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 )\
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
+#else
+
+#define Debug( level, fmt, arg1, arg2, arg3 ) ((void)0)
+#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 ) ((void)0)
+
+#endif /* LDAP_DEBUG */
+
+#define LDAP_DEPRECATED 1
#include "ldap.h"
#include "ldap_pvt.h"
void *lconn_tls_ctx;
#endif
#ifdef HAVE_CYRUS_SASL
- void *lconn_sasl_ctx;
+ void *lconn_sasl_authctx; /* context for bind */
+ void *lconn_sasl_sockctx; /* for security layer */
#endif
int lconn_refcnt;
time_t lconn_lastused; /* time */
/*
* in controls.c
*/
-LDAP_F (int) ldap_int_get_controls LDAP_P((
- BerElement *be,
- LDAPControl ***ctrlsp));
-
LDAP_F (int) ldap_int_put_controls LDAP_P((
LDAP *ld,
LDAPControl *const *ctrls,
* in os-ip.c
*/
LDAP_V (int) ldap_int_tblsize;
-LDAP_F (int) ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
+LDAP_F (int) ldap_int_timeval_dup( struct timeval **dest,
+ const struct timeval *tm );
LDAP_F (int) ldap_connect_to_host( LDAP *ld, Sockbuf *sb,
- int proto, const char *host, unsigned long address, int port,
- int async );
+ int proto, const char *host, int port, int async );
#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) || \
defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
LDAP_V (char *) ldap_int_hostname;
-LDAP_F (char *) ldap_host_connected_to( Sockbuf *sb );
+LDAP_F (char *) ldap_host_connected_to( Sockbuf *sb,
+ const char *host );
#endif
LDAP_F (void) ldap_int_ip_init( void );