ldap-int.h 14.8 KB
Newer Older
Kurt Zeilenga's avatar
Kurt Zeilenga committed
1
/*  ldap-int.h - defines & prototypes internal to the LDAP library */
2
/* $OpenLDAP$ */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
3
/*
Kurt Zeilenga's avatar
Kurt Zeilenga committed
4
 * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
5
6
7
 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 */
/*  Portions
Kurt Zeilenga's avatar
Kurt Zeilenga committed
8
9
10
11
 *  Copyright (c) 1995 Regents of the University of Michigan.
 *  All rights reserved.
 */

12
13
#ifndef	_LDAP_INT_H
#define	_LDAP_INT_H 1
Kurt Zeilenga's avatar
Kurt Zeilenga committed
14

15
#ifdef LDAP_R_COMPILE
16
17
18
#define LDAP_THREAD_SAFE 1
#endif

19
#include "../liblber/lber-int.h"
20

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* 
 * Support needed if the library is running in the kernel
 */
#if LDAP_INT_IN_KERNEL
	/* 
	 * Platform specific function to return a pointer to the
	 * process-specific global options. 
	 *
	 * This function should perform the following functions:
	 *  Allocate and initialize a global options struct on a per process basis
	 *  Use callers process identifier to return its global options struct
	 *  Note: Deallocate structure when the process exits
	 */
#	define LDAP_INT_GLOBAL_OPT() ldap_int_global_opt()
   struct ldapoptions *ldap_int_global_opt(void);
#else
#	define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
#endif

#define ldap_debug	((LDAP_INT_GLOBAL_OPT())->ldo_debug)
41
42
43

#include "ldap_log.h"

44
45
46
#undef Debug
#define Debug( level, fmt, arg1, arg2, arg3 ) \
	ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
47

48
49
#include "ldap.h"

Bart Hartgers's avatar
   
Bart Hartgers committed
50
51
#include "ldap_pvt.h"

52
53
LDAP_BEGIN_DECL

Kurt Zeilenga's avatar
Kurt Zeilenga committed
54
#define LDAP_URL_PREFIX         "ldap://"
55
56
57
#define LDAP_URL_PREFIX_LEN     (sizeof(LDAP_URL_PREFIX)-1)
#define LDAPS_URL_PREFIX		"ldaps://"
#define LDAPS_URL_PREFIX_LEN	(sizeof(LDAPS_URL_PREFIX)-1)
58
59
#define LDAPI_URL_PREFIX	"ldapi://"
#define LDAPI_URL_PREFIX_LEN	(sizeof(LDAPI_URL_PREFIX)-1)
60
61
#define LDAP_URL_URLCOLON		"URL:"
#define LDAP_URL_URLCOLON_LEN	(sizeof(LDAP_URL_URLCOLON)-1)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
62
63
64

#define CLDAP_URL_PREFIX         "cldap://"
#define CLDAP_URL_PREFIX_LEN     (sizeof(CLDAP_URL_PREFIX)-1)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
65
66

#define LDAP_REF_STR		"Referral:\n"
67
#define LDAP_REF_STR_LEN	(sizeof(LDAP_REF_STR)-1)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
68
#define LDAP_LDAP_REF_STR	LDAP_URL_PREFIX
Kurt Zeilenga's avatar
Kurt Zeilenga committed
69
#define LDAP_LDAP_REF_STR_LEN	LDAP_URL_PREFIX_LEN
Kurt Zeilenga's avatar
Kurt Zeilenga committed
70

71
72
#define LDAP_DEFAULT_REFHOPLIMIT 5

73
74
#define LDAP_BOOL_REFERRALS		0
#define LDAP_BOOL_RESTART		1
Julio Sánchez Fernández's avatar
Julio Sánchez Fernández committed
75
#define LDAP_BOOL_TLS			3
76

77
#define LDAP_BOOLEANS	unsigned long
78
#define LDAP_BOOL(n)	(1 << (n))
Kurt Zeilenga's avatar
Kurt Zeilenga committed
79
80
#define LDAP_BOOL_GET(lo, bool)	\
	((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
81
82
83
#define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
#define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
#define LDAP_BOOL_ZERO(lo) ((lo)->ldo_booleans = 0)
84

85
86
87
88
89
90
/*
 * This structure represents both ldap messages and ldap responses.
 * These are really the same, except in the case of search responses,
 * where a response has multiple messages.
 */

91
struct ldapmsg {
92
93
	ber_int_t		lm_msgid;	/* the message id */
	ber_tag_t		lm_msgtype;	/* the message type */
94
95
96
	BerElement	*lm_ber;	/* the ber encoded message contents */
	struct ldapmsg	*lm_chain;	/* for search - next msg in the resp */
	struct ldapmsg	*lm_next;	/* next response */
97
	time_t	lm_time;	/* used to maintain cache */
98
};
99

100
101
102
103
104
/*
 * structure representing get/set'able options
 * which have global defaults.
 */
struct ldapoptions {
105
106
107
108
109
	short ldo_valid;
#define LDAP_UNINITIALIZED	0x0
#define LDAP_INITIALIZED	0x1
#define LDAP_VALID_SESSION	0x2

110
	int		ldo_debug;
111
112
113
	/* per API call timeout */
	struct timeval		*ldo_tm_api;
	struct timeval		*ldo_tm_net;
114

115
	ber_int_t		ldo_version;
116
117
118
	ber_int_t		ldo_deref;
	ber_int_t		ldo_timelimit;
	ber_int_t		ldo_sizelimit;
119

120
	LDAPURLDesc *ldo_defludp;
121
	int		ldo_defport;
122
	char*	ldo_defbase;
123
	char*	ldo_defbinddn;	/* simple bind dn */
124

125
#ifdef LDAP_CONNECTIONLESS
126
127
	int		ldo_cldaptries;	/* connectionless search retry count */
	int		ldo_cldaptimeout;/* time between retries */
128
129
#endif

130
131
	int		ldo_refhoplimit;	/* limit on referral nesting */

132
	/* LDAPv3 server and client controls */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
133
134
	LDAPControl	**ldo_sctrls;
	LDAPControl **ldo_cctrls;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
135
136

	/* LDAP rebind callback function */
137
	LDAP_REBIND_PROC		*ldo_rebindproc;
Julio Sánchez Fernández's avatar
Julio Sánchez Fernández committed
138
139
140
141
142

#ifdef HAVE_TLS
   	/* tls context */
   	void		*ldo_tls_ctx;
   	int		ldo_tls_mode;
143
144
145
146
#endif
#ifdef HAVE_CYRUS_SASL
	sasl_ssf_t	ldo_sasl_minssf;
	sasl_ssf_t	ldo_sasl_maxssf;
Julio Sánchez Fernández's avatar
Julio Sánchez Fernández committed
147
#endif
148
149
150
	LDAP_BOOLEANS ldo_booleans;	/* boolean options */
};

151

152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/*
 * structure for tracking LDAP server host, ports, DNs, etc.
 */
typedef struct ldap_server {
	char			*lsrv_host;
	char			*lsrv_dn;	/* if NULL, use default */
	int			lsrv_port;
	struct ldap_server	*lsrv_next;
} LDAPServer;


/*
 * structure for representing an LDAP server connection
 */
typedef struct ldap_conn {
	Sockbuf			*lconn_sb;
	int			lconn_refcnt;
	time_t		lconn_lastused;	/* time */
170
171
	int			lconn_rebind_inprogress;	/* set if rebind in progress */
	char		***lconn_rebind_queue;		/* used if rebind in progress */
172
173
174
175
	int			lconn_status;
#define LDAP_CONNST_NEEDSOCKET		1
#define LDAP_CONNST_CONNECTING		2
#define LDAP_CONNST_CONNECTED		3
176
	LDAPURLDesc		*lconn_server;
177
178
	char			*lconn_krbinstance;
	struct ldap_conn	*lconn_next;
179
	BerElement		*lconn_ber;/* ber receiving on this conn. */
180
181
182
183
184
185
186
} LDAPConn;


/*
 * structure used to track outstanding requests
 */
typedef struct ldapreq {
187
	ber_int_t		lr_msgid;	/* the message id */
188
	int		lr_status;	/* status of request */
189
#define LDAP_REQST_COMPLETED	0
190
191
192
193
194
#define LDAP_REQST_INPROGRESS	1
#define LDAP_REQST_CHASINGREFS	2
#define LDAP_REQST_NOTCONNECTED	3
#define LDAP_REQST_WRITING	4
	int		lr_outrefcnt;	/* count of outstanding referrals */
195
	ber_int_t		lr_origid;	/* original request's message id */
196
	int		lr_parentcnt;	/* count of parent requests */
197
198
	ber_tag_t		lr_res_msgtype;	/* result message type */
	ber_int_t		lr_res_errno;	/* result LDAP errno */
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
	char		*lr_res_error;	/* result error string */
	char		*lr_res_matched;/* result matched DN string */
	BerElement	*lr_ber;	/* ber encoded request contents */
	LDAPConn	*lr_conn;	/* connection used to send request */
	struct ldapreq	*lr_parent;	/* request that spawned this referral */
	struct ldapreq	*lr_refnext;	/* next referral spawned */
	struct ldapreq	*lr_prev;	/* previous request */
	struct ldapreq	*lr_next;	/* next request */
} LDAPRequest;

/*
 * structure for client cache
 */
#define LDAP_CACHE_BUCKETS	31	/* cache hash table size */
typedef struct ldapcache {
	LDAPMessage	*lc_buckets[LDAP_CACHE_BUCKETS];/* hash table */
	LDAPMessage	*lc_requests;			/* unfulfilled reqs */
	long		lc_timeout;			/* request timeout */
217
218
	ber_len_t		lc_maxmem;			/* memory to use */
	ber_len_t		lc_memused;			/* memory in use */
219
220
221
222
223
224
	int		lc_enabled;			/* enabled? */
	unsigned long	lc_options;			/* options */
#define LDAP_CACHE_OPT_CACHENOERRS	0x00000001
#define LDAP_CACHE_OPT_CACHEALLERRS	0x00000002
}  LDAPCache;

225
226
227
228
229
230
231
232
233
/*
 * structure containing referral request info for rebind procedure
 */
typedef struct ldapreqinfo {
	ber_len_t	ri_msgid;
	int			ri_request;
	char 		*ri_url;
} LDAPreqinfo;

234
235
236
237
238
/*
 * handy macro for checking if handle is connectionless
 */

#define LDAP_IS_CLDAP(ld) ((ld)->ld_cldapnaddr>0)
239

240
241
242
243
/*
 * structure representing an ldap connection
 */

244
struct ldap {
245
	Sockbuf		*ld_sb;		/* socket descriptor & buffer */
246
247
248

	struct ldapoptions ld_options;

249
250
251
#define ld_valid		ld_options.ldo_valid
#define ld_debug		ld_options.ldo_debug

252
253
254
255
#define ld_deref		ld_options.ldo_deref
#define ld_timelimit	ld_options.ldo_timelimit
#define ld_sizelimit	ld_options.ldo_sizelimit

256
#define ld_defbinddn	ld_options.ldo_defbinddn
257
258
259
260
#define ld_defbase		ld_options.ldo_defbase
#define ld_defhost		ld_options.ldo_defhost
#define ld_defport		ld_options.ldo_defport

261
262
263
264
#define ld_cldaptries	ld_options.ldo_cldaptries
#define ld_cldaptimeout	ld_options.ldo_cldaptimeout
#define ld_refhoplimit	ld_options.ldo_refhoplimit

Kurt Zeilenga's avatar
Kurt Zeilenga committed
265
266
#define ld_sctrls		ld_options.ldo_sctrls
#define ld_cctrls		ld_options.ldo_cctrls
267
#define ld_rebindproc	ld_options.ldo_rebindproc
Kurt Zeilenga's avatar
Kurt Zeilenga committed
268

269
#define ld_version		ld_options.ldo_version	
270
	char	*ld_host;
271
272
	int		ld_port;

273
	unsigned short	ld_lberoptions;
274
275
276
277

	LDAPFiltDesc	*ld_filtd;	/* from getfilter for ufn searches */
	char		*ld_ufnprefix;	/* for incomplete ufn's */

278
	ber_int_t	ld_errno;
279
280
	char	*ld_error;
	char	*ld_matched;
281
	ber_len_t		ld_msgid;
282
283
284
285

	/* do not mess with these */
	LDAPRequest	*ld_requests;	/* list of outstanding requests */
	LDAPMessage	*ld_responses;	/* list of outstanding responses */
Kurt Zeilenga's avatar
ldap.h:    
Kurt Zeilenga committed
286

287
	ber_int_t		*ld_abandoned;	/* array of abandoned requests */
Kurt Zeilenga's avatar
ldap.h:    
Kurt Zeilenga committed
288

289
	LDAPCache	*ld_cache;	/* non-null if cache is initialized */
290
	/* stuff used by connectionless searches. */
291

292
293
   	char		*ld_cldapdn;	/* DN used in connectionless search */
	int		ld_cldapnaddr; /* number of addresses */
294
   	void		**ld_cldapaddrs;/* addresses to send request to */
Kurt Zeilenga's avatar
ldap.h:    
Kurt Zeilenga committed
295

296
	/* do not mess with the rest though */
297

298
299
300
	LDAPConn	*ld_defconn;	/* default connection */
	LDAPConn	*ld_conns;	/* list of server connections */
	void		*ld_selectinfo;	/* platform specifics for select */
301
302
303
#ifdef HAVE_CYRUS_SASL
	sasl_conn_t		*ld_sasl_context;
#endif /* HAVE_CYRUS_SASL */
304
};
305
#define LDAP_VALID(ld)	( (ld)->ld_valid == LDAP_VALID_SESSION )
306

307
#if defined(HAVE_RES_QUERY) && defined(LDAP_R_COMPILE)
Luke Howard's avatar
   
Luke Howard committed
308
309
#include <ldap_pvt_thread.h>
extern ldap_pvt_thread_mutex_t ldap_int_resolv_mutex;
310
#endif /* HAVE_RES_QUERY && LDAP_R_COMPILE */
Luke Howard's avatar
   
Luke Howard committed
311

312
313
314
/*
 * in init.c
 */
315

316
317
318
LDAP_F ( struct ldapoptions ) ldap_int_global_options;
LDAP_F ( void ) ldap_int_initialize LDAP_P((struct ldapoptions *, int *));
LDAP_F ( void ) ldap_int_initialize_global_options LDAP_P((
319
	struct ldapoptions *, int *));
320

321
322
/* memory.c */
	/* simple macros to realloc for now */
323
324
325
326
#define LDAP_INT_MALLOC(s)		(LBER_MALLOC((s)))
#define LDAP_INT_CALLOC(n,s)	(LBER_CALLOC((n),(s)))
#define LDAP_INT_REALLOC(p,s)	(LBER_REALLOC((p),(s)))
#define LDAP_INT_FREE(p)		(LBER_FREE((p)))
327
#define LDAP_INT_VFREE(v)		(LBER_VFREE((void **)(v)))
328
#define LDAP_INT_STRDUP(s)		(LBER_STRDUP((s)))
329

330
331
332
333
#define LDAP_MALLOC(s)		(LBER_MALLOC((s)))
#define LDAP_CALLOC(n,s)	(LBER_CALLOC((n),(s)))
#define LDAP_REALLOC(p,s)	(LBER_REALLOC((p),(s)))
#define LDAP_FREE(p)		(LBER_FREE((p)))
334
#define LDAP_VFREE(v)		(LBER_VFREE((void **)(v)))
335
#define LDAP_STRDUP(s)		(LBER_STRDUP((s)))
336

337
338
339
/*
 * in unit-int.c
 */
340
LDAP_F (void) ldap_int_utils_init LDAP_P(( void ));
341
342


343
344
345
/*
 * in print.c
 */
346
LDAP_F (int) ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...)) LDAP_GCCATTR((format(printf, 3, 4)));
347

Kurt Zeilenga's avatar
Kurt Zeilenga committed
348
349
350
/*
 * in cache.c
 */
351
LDAP_F (void) ldap_add_request_to_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
352
        BerElement *request ));
353
354
LDAP_F (void) ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result ));
LDAP_F (int) ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *request ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
355

356
357
358
/*
 * in controls.c
 */
359
LDAP_F (LDAPControl *) ldap_control_dup LDAP_P((
360
	const LDAPControl *ctrl ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
361

362
LDAP_F (LDAPControl **) ldap_controls_dup LDAP_P((
363
	LDAPControl *const *ctrls ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
364

365
LDAP_F (int) ldap_int_get_controls LDAP_P((
Kurt Zeilenga's avatar
Kurt Zeilenga committed
366
	BerElement *be,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
367
	LDAPControl ***ctrlsp));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
368

369
LDAP_F (int) ldap_int_put_controls LDAP_P((
Kurt Zeilenga's avatar
Kurt Zeilenga committed
370
	LDAP *ld,
371
	LDAPControl *const *ctrls,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
372
	BerElement *ber ));
373

374
LDAP_F( int ) 
375
376
377
378
379
380
ldap_int_create_control LDAP_P(( 
	const char *requestOID, 
	BerElement *ber, 
	int iscritical,
	LDAPControl **ctrlp ));

381
/*
382
 * in dsparse.c
383
 */
384
LDAP_F (int) ldap_int_next_line_tokens LDAP_P(( char **bufp, ber_len_t *blenp, char ***toksp ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
385

386
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
Kurt Zeilenga's avatar
Kurt Zeilenga committed
387
388
389
/*
 * in kerberos.c
 */
390
LDAP_F (char *) ldap_get_kerberosv4_credentials LDAP_P((
391
392
393
	LDAP *ld,
	LDAP_CONST char *who,
	LDAP_CONST char *service,
394
	ber_len_t *len ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
395

396
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
397
398
399
400
401


/*
 * in open.c
 */
402
403
LDAP_F (int) ldap_open_defconn( LDAP *ld );
LDAP_F (int) open_ldap_connection( LDAP *ld, Sockbuf *sb, LDAPURLDesc *srvlist, char **krbinstancep, int async );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
404
405
406
407

/*
 * in os-ip.c
 */
408
409
410
LDAP_F (int) ldap_int_tblsize;
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, const char *host, unsigned long address, int port, int async );
Hallvard Furuseth's avatar
Hallvard Furuseth committed
411

412
#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) || defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
413
LDAP_F (char *) ldap_host_connected_to( Sockbuf *sb );
414
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
415

416
417
418
419
420
421
422
423
424
LDAP_F (void) ldap_int_ip_init( void );
LDAP_F (int) do_ldap_select( LDAP *ld, struct timeval *timeout );
LDAP_F (void *) ldap_new_select_info( void );
LDAP_F (void) ldap_free_select_info( void *sip );
LDAP_F (void) ldap_mark_select_write( LDAP *ld, Sockbuf *sb );
LDAP_F (void) ldap_mark_select_read( LDAP *ld, Sockbuf *sb );
LDAP_F (void) ldap_mark_select_clear( LDAP *ld, Sockbuf *sb );
LDAP_F (int) ldap_is_read_ready( LDAP *ld, Sockbuf *sb );
LDAP_F (int) ldap_is_write_ready( LDAP *ld, Sockbuf *sb );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
425

426
427
428
/*
 * in os-local.c
 */
429
#ifdef LDAP_PF_UNIX 
430
LDAP_F (int) ldap_connect_to_path( LDAP *ld, Sockbuf *sb, const char *path, int async );
431
#endif /* LDAP_PF_UNIX */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
432
433
434
435

/*
 * in request.c
 */
436
LDAP_F (ber_int_t) ldap_send_initial_request( LDAP *ld, ber_tag_t msgtype,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
437
	const char *dn, BerElement *ber );
438
439
440
441
442
443
444
445
446
447
448
449
450
LDAP_F (BerElement *) ldap_alloc_ber_with_options( LDAP *ld );
LDAP_F (void) ldap_set_ber_options( LDAP *ld, BerElement *ber );

LDAP_F (int) ldap_send_server_request( LDAP *ld, BerElement *ber, ber_int_t msgid, LDAPRequest *parentreq, LDAPURLDesc *srvlist, LDAPConn *lc, LDAPreqinfo *bind );
LDAP_F (LDAPConn *) ldap_new_connection( LDAP *ld, LDAPURLDesc *srvlist, int use_ldsb, int connect, LDAPreqinfo *bind );
LDAP_F (LDAPRequest *) ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid );
LDAP_F (void) ldap_free_request( LDAP *ld, LDAPRequest *lr );
LDAP_F (void) ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind );
LDAP_F (void) ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all );
LDAP_F (void) ldap_dump_requests_and_responses( LDAP *ld );
LDAP_F (int) ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp );
LDAP_F (int) ldap_chase_v3referrals( LDAP *ld, LDAPRequest *lr, char **refs, char **referralsp, int *hadrefp );
LDAP_F (int) ldap_append_referral( LDAP *ld, char **referralsp, char *s );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
451

452
453
454
455
/*
 * in result.c:
 */
#ifdef LDAP_CONNECTIONLESS
456
LDAP_F (int) cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber );
457
#endif
458
LDAP_F (char *) ldap_int_msgtype2str( ber_tag_t tag );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
459
460
461
462

/*
 * in search.c
 */
463
LDAP_F (BerElement *) ldap_build_search_req LDAP_P((
464
	LDAP *ld,
465
466
467
468
469
	const char *base,
	ber_int_t scope,
	const char *filter,
	char **attrs,
	ber_int_t attrsonly,
470
471
	LDAPControl **sctrls,
	LDAPControl **cctrls,
472
473
	ber_int_t timelimit,
	ber_int_t sizelimit ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
474

475
/*
476
 * in string.c
477
 */
478
	/* see <ac/string.h> */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
479
480
481
482

/*
 * in unbind.c
 */
483
LDAP_F (int) ldap_ld_free LDAP_P((
Kurt Zeilenga's avatar
Kurt Zeilenga committed
484
485
486
487
488
	LDAP *ld,
	int close,
	LDAPControl **sctrls,
	LDAPControl **cctrls ));

489
LDAP_F (int) ldap_send_unbind LDAP_P((
Kurt Zeilenga's avatar
Kurt Zeilenga committed
490
491
492
493
	LDAP *ld,
	Sockbuf *sb,
	LDAPControl **sctrls,
	LDAPControl **cctrls ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
494

495
496
497
/*
 * in url.c
 */
498
LDAP_F (LDAPURLDesc *) ldap_url_dup LDAP_P((
499
500
	LDAPURLDesc *ludp ));

501
LDAP_F (LDAPURLDesc *) ldap_url_duplist LDAP_P((
502
503
	LDAPURLDesc *ludlist ));

504
LDAP_F (int) ldap_url_parselist LDAP_P((
505
506
507
	LDAPURLDesc **ludlist,
	const char *url ));

508
LDAP_F (int) ldap_url_parsehosts LDAP_P((
509
510
511
	LDAPURLDesc **ludlist,
	const char *hosts ));

512
LDAP_F (char *) ldap_url_list2hosts LDAP_P((
513
514
	LDAPURLDesc *ludlist ));

515
LDAP_F (char *) ldap_url_list2urls LDAP_P((
516
517
	LDAPURLDesc *ludlist ));

518
LDAP_F (void) ldap_free_urllist LDAP_P((
519
520
521
	LDAPURLDesc *ludlist ));


Kurt Zeilenga's avatar
Kurt Zeilenga committed
522
LDAP_END_DECL
523
524

#endif /* _LDAP_INT_H */