]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ldap-int.h
Fix ldap_send_initial_request() to open connection if not already
[openldap] / libraries / libldap / ldap-int.h
index 9fc14c3e67c3d1f0bcd90fc039a3ba1174255e5b..ea28e44fd79e0480ff5737dcfd3eb48ecb1640de 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * 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://"
@@ -70,21 +79,25 @@ struct ldapmsg {
  * 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 */
 };
 
@@ -229,6 +242,11 @@ extern int openldap_ldap_initialized;
 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
  */
@@ -237,6 +255,12 @@ void ldap_add_request_to_cache LDAP_P(( LDAP *ld, unsigned long msgtype,
 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 ));
+
 /*
  * in dsparse.c
  */
@@ -356,30 +380,6 @@ int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input );
 #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 */