]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ldap-int.h
Add LDAP_DEPRECATED macro
[openldap] / libraries / libldap / ldap-int.h
index 9bb6a9b2ca9cba95e05136976635e05bbcdce1a5..02523bf0b74e6be0029bf53fb6e6d415de36c1f8 100644 (file)
@@ -1,11 +1,19 @@
 /*  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.
  */
 
@@ -48,7 +56,7 @@
         *  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
@@ -58,6 +66,9 @@
 #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"
@@ -188,7 +207,8 @@ typedef struct ldap_conn {
        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 */
@@ -391,10 +411,6 @@ LDAP_F (int) ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *
 /*
  * 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,
@@ -433,15 +449,16 @@ LDAP_F (int) ldap_int_open_connection( LDAP *ld,
  * 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 );