+/* $OpenLDAP$ */
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
#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))
#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;
/* 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.
*/
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 */
/*
* 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
* in controls.c
*/
LDAPControl *ldap_control_dup LDAP_P((
- LDAPControl *ctrl ));
+ const LDAPControl *ctrl ));
LDAPControl **ldap_controls_dup LDAP_P((
- LDAPControl **ctrls ));
+ LDAPControl *const *ctrls ));
int ldap_int_get_controls LDAP_P((
BerElement *be,
int ldap_int_put_controls LDAP_P((
LDAP *ld,
- LDAPControl **ctrls,
+ LDAPControl *const *ctrls,
BerElement *ber ));
/*
/*
* 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 );
/*
* 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 );
* 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
/*