]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ldap-int.h
Minor bug fix in ldap_parse_extended_result.
[openldap] / libraries / libldap / ldap-int.h
index d0ee82bfa83f922060db4cac520600a59b0a17f5..2957420a9a2107875abae025699099866a8d1f6d 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -54,6 +55,7 @@ LDAP_BEGIN_DECL
 #define LDAP_BOOL_REFERRALS            0
 #define LDAP_BOOL_RESTART              1
 #define LDAP_BOOL_DNS                  2
+#define LDAP_BOOL_TLS                  3
 
 #define LDAP_BOOLEANS  unsigned long
 #define LDAP_BOOL(n)   (1 << (n))
@@ -89,6 +91,9 @@ struct ldapoptions {
 #define LDAP_VALID_SESSION     0x2
 
        int             ldo_debug;
+       /* per API call timeout */
+       struct timeval          *ldo_tm_api;
+       struct timeval          *ldo_tm_net;
 
        ber_int_t               ldo_version;    /* version to connect at */
        ber_int_t               ldo_deref;
@@ -109,10 +114,16 @@ struct ldapoptions {
        /* LDAPv3 server and client controls */
        LDAPControl     **ldo_sctrls;
        LDAPControl **ldo_cctrls;
-       
+
+#ifdef HAVE_TLS
+       /* tls context */
+       void            *ldo_tls_ctx;
+       int             ldo_tls_mode;
+#endif
        LDAP_BOOLEANS ldo_booleans;     /* boolean options */
 };
 
+
 /*
  * structure for tracking LDAP server host, ports, DNs, etc.
  */
@@ -220,7 +231,7 @@ struct ldap {
        char    *ld_host;
        int             ld_port;
 
-       short           ld_lberoptions;
+       unsigned short  ld_lberoptions;
 
        LDAPFiltDesc    *ld_filtd;      /* from getfilter for ufn searches */
        char            *ld_ufnprefix;  /* for incomplete ufn's */
@@ -260,7 +271,7 @@ struct ldap {
  * in init.c
  */
 
-extern struct ldapoptions ldap_int_global_options;
+LDAP_F ( struct ldapoptions ) ldap_int_global_options;
 void ldap_int_initialize LDAP_P((void));
 
 
@@ -289,7 +300,8 @@ void ldap_int_utils_init LDAP_P(( void ));
 /*
  * in print.c
  */
-int ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...));
+int ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...))
+                    LDAP_GCCATTR((format(printf, 3, 4)));
 
 /*
  * in cache.c
@@ -339,6 +351,7 @@ char *ldap_get_kerberosv4_credentials LDAP_P((
 /*
  * in open.c
  */
+int ldap_open_defconn( LDAP *ld );
 int open_ldap_connection( LDAP *ld, Sockbuf *sb, const char *host, int defport,
        char **krbinstancep, int async );
 
@@ -346,14 +359,18 @@ int open_ldap_connection( LDAP *ld, Sockbuf *sb, const char *host, int defport,
 /*
  * in os-ip.c
  */
-int ldap_connect_to_host( Sockbuf *sb, const char *host, unsigned long address, int port,
-       int async );
+extern int ldap_int_tblsize;
+int ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
+int ldap_connect_to_host( LDAP *ld, Sockbuf *sb, const char *host,
+       unsigned long address, int port, int async );
+
 void ldap_close_connection( Sockbuf *sb );
 
 #ifdef HAVE_KERBEROS
 char *ldap_host_connected_to( Sockbuf *sb );
 #endif /* HAVE_KERBEROS */
 
+void ldap_int_ip_init( void );
 int do_ldap_select( LDAP *ld, struct timeval *timeout );
 void *ldap_new_select_info( void );
 void ldap_free_select_info( void *sip );
@@ -390,7 +407,7 @@ int ldap_append_referral( LDAP *ld, char **referralsp, char *s );
  * in result.c:
  */
 #ifdef LDAP_CONNECTIONLESS
-LDAP_F int cldap_getmsg        ( LDAP *ld, struct timeval *timeout, BerElement *ber );
+int cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber );
 #endif
 
 /*