Cross Reference: /illumos-gate/usr/src/lib/libldap5/sources/ldap/common/llib-lldap
llib-lldap revision 7c478bd95313f5f23a4c958a745db2134aa03244
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
/* LINTLIBRARY */
/* PROTOLIB1 */
/*
* Copyright 2001, 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <sys/types.h>
#include <lber.h>
#include <ldap.h>
/*
* in abandon.c:
*/
int ldap_abandon_ext(LDAP *ld, int msgid, LDAPControl **serverctrls, LDAPControl ** clientctrls);
int ldap_abandon( LDAP *ld, int msgid );
/*
* in add.c:
*/
int ldap_add_ext( LDAP *ld, const char *dn, LDAPMod **attrs, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_add_ext_s( LDAP *ld, const char *dn, LDAPMod **attrs, LDAPControl ** serverctrls, LDAPControl **clientctrls);
int ldap_add( LDAP *ld, const char *dn, LDAPMod **attrs );
int ldap_add_s( LDAP *ld, const char *dn, LDAPMod **attrs );
/*
* in bind.c:
*/
int ldap_bind(LDAP *ld, const char *dn, const char *passwd, int authmethod);
int ldap_bind_s(LDAP *ld, const char *dn, const char *passwd, int authmethod);
void ldap_set_rebind_proc(LDAP *ld, LDAP_REBINDPROC_CALLBACK *rebindproc, void *arg);
/*
* in sbind.c:
*/
int ldap_simple_bind( LDAP *ld, const char *dn, const char *passwd );
int ldap_simple_bind_s( LDAP *ld, const char *dn, const char *passwd );
/*
* in saslbind.c:
*/
int ldap_sasl_bind(LDAP *ld, const char *dn, const char *mechanism, const struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_sasl_bind_s(LDAP *ld, const char *dn, const char *mechanism, const struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls, struct berval **servercredp);
/*
* in kbind.c:
*/
/*
* in cache.c
*/
/*
* in compare.c:
*/
int ldap_compare_ext(LDAP *ld, const char *dn, const char *attr, const struct berval *bvalue, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_compare_ext_s(LDAP *ld, const char *dn, const char *attr, const struct berval *bvalue, LDAPControl ** serverctrls, LDAPControl **clientctrls) ;
int ldap_compare( LDAP *ld, const char *dn, const char *attr, const char *value );
int ldap_compare_s( LDAP *ld, const char *dn, const char *attr, const char *value );
/*
* in delete.c:
*/
int ldap_delete_ext(LDAP *ld, const char *dn, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_delete_ext_s(LDAP *ld, const char *dn, LDAPControl **serverctrls, LDAPControl **clientctrls);
int ldap_delete( LDAP *ld, const char *dn );
int ldap_delete_s( LDAP *ld, const char *dn );
/*
* in error.c:
*/
char *ldap_err2string( int err );
void ldap_perror(LDAP *ld, const char *s);
int ldap_result2error(LDAP *ld, LDAPMessage *r, int freeit);
int ldap_get_lderrno(LDAP *ld, char **m, char **s);
int ldap_set_lderrno(LDAP *ld, int e, char *m, char *s);
/*
* in modify.c:
*/
int ldap_modify_ext(LDAP *ld, const char *dn, LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_modify_ext_s(LDAP *ld, const char *dn, LDAPMod **mods, LDAPControl **serverctrls, LDAPControl **clientctrls) ;
int ldap_modify( LDAP *ld, const char *dn, LDAPMod **mods );
int ldtap_modify_s( LDAP *ld, const char *dn, LDAPMod **mods );
/*
* in modrdn.c:
*/
/*
* in rename.c:
*/
int ldap_rename(LDAP *ld, const char *dn, const char *newrdn, const char *newparent, int deleteoldrdn, LDAPControl ** serverctrls, LDAPControl **clientctrls, int *msgidp);
int ldap_rename_s(LDAP *ld, const char *dn, const char *newrdn, const char *newparent, int deleteoldrdn, LDAPControl ** serverctrls, LDAPControl **clientctrls);
int ldap_modrdn(LDAP *ld, const char *dn, const char *newrdn);
int ldap_modrdn_s(LDAP *ld, const char *dn, const char *newrdn);
int ldap_modrdn2(LDAP *ld, const char *dn, const char *newrdn, int deleteoldrdn);
int ldap_modrdn2_s(LDAP *ld, const char *dn, const char *newrdn, int deleteoldrdn);
/*
* in open.c:
*/
LDAP *ldap_init( const char *defhost, int defport );
LDAP *ldap_open(const char *host, int port);
int ldap_version(LDAPVersion *ver);
/*
* in getentry.c:
*/
LDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *res );
LDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry );
int ldap_count_entries( LDAP *ld, LDAPMessage *res );
int ldap_get_entry_controls(LDAP *ld, LDAPMessage *entry, LDAPControl ***serverctrlsp);
/*
* in getmsg.c:
*/
LDAPMessage *ldap_first_message( LDAP *ld, LDAPMessage *res );
LDAPMessage *ldap_next_message( LDAP *ld, LDAPMessage *msg );
int ldap_count_messages( LDAP *ld, LDAPMessage *res );
/*
* in getref.c:
*/
LDAPMessage *ldap_first_reference( LDAP *ld, LDAPMessage *res );
LDAPMessage *ldap_next_reference( LDAP *ld, LDAPMessage *entry );
int ldap_count_references( LDAP *ld, LDAPMessage *res );
/*
* in getdn.c
*/
char *ldap_get_dn( LDAP *ld, LDAPMessage *entry );
char **ldap_explode_dn( const char *dn, const int notypes );
char ** ldap_explode_rdn( const char *rdn, const int notypes );
char *ldap_dn2ufn( const char *dn );
char **ldap_explode_dns( const char *dn );
int ldap_is_dns_dn( const char *dn );
char *ldap_dns_to_dn(char *dns_name, int *nameparts);
/*
* in getattr.c
*/
char *ldap_first_attribute( LDAP *ld, LDAPMessage *entry,
BerElement **ber );
char *ldap_next_attribute( LDAP *ld, LDAPMessage *entry,
BerElement *ber );
void ldap_memfree(void *p);
/*
* in getvalues.c
*/
char **ldap_get_values( LDAP *ld, LDAPMessage *entry, const char *target );
int ldap_count_values( char **vals );
int ldap_count_values_len( struct berval **vals );
void ldap_value_free( char **vals );
void ldap_value_free_len( struct berval **vals );
struct berval **ldap_get_values_len(LDAP *ld, LDAPMessage *entry, const char *target);
char **ldap_get_lang_values(LDAP *ld, LDAPMessage *entry, const char *target, char **type);
struct berval **ldap_get_lang_values_len(LDAP *ld, LDAPMessage *entry, const char *target, char **type);
/*
* in referral.c:
*/
int ldap_parse_reference(LDAP *ld, LDAPMessage *ref,
char ***referralsp, LDAPControl ***serverctrlsp, int freeit);
char ** ldap_get_reference_urls(LDAP *ld, LDAPMessage *res);
/*
* in result.c:
*/
int ldap_result( LDAP *ld, int msgid, int all,
struct timeval *timeout, LDAPMessage **result );
int ldap_msgfree( LDAPMessage *lm );
int ldap_msgtype( LDAPMessage *res );
int ldap_msgid( LDAPMessage *res );
int ldap_parse_result(LDAP *ld, LDAPMessage *res, int *errcodep, char **matcheddnp, char **errmsgp, char ***referralsp, LDAPControl ***serverctrlsp, int freeit) ;
int ldap_parse_sasl_bind_result(LDAP *ld, LDAPMessage *res, struct berval **servercredp, int freeit);
int ldap_parse_extended_result(LDAP *ld, LDAPMessage *res, char **resultoidp, struct berval **resultdata, int freeit);
/*
* in search.c:
*/
int ldap_search_ext(LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPControl **serverctrls, LDAPControl **clientctrls, struct timeval *timeoutp, int sizelimit, int *msgidp);
int ldap_search_ext_s(LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPControl **serverctrls, LDAPControl **clientctrls, struct timeval *timeoutp, int sizelimit, LDAPMessage **res);
int ldap_search( LDAP *ld, const char *base, int scope, const char *filter,
char **attrs, int attrsonly );
int ldap_search_s( LDAP *ld, const char *base, int scope, const char *filter,
char **attrs, int attrsonly, LDAPMessage **res );
int ldap_search_st( LDAP *ld, const char *base, int scope, const char *filter,
char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res );
/*
* in ufn.c
*/
int ldap_ufn_search_c( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, LDAP_CANCELPROC_CALLBACK cancelproc,
void *cancelparm );
int ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, LDAP_CANCELPROC_CALLBACK cancelproc,
void *cancelparm, char *tag1, char *tag2, char *tag3 );
int ldap_ufn_search_s( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res );
LDAPFiltDesc *ldap_ufn_setfilter( LDAP *ld, char *fname );
void ldap_ufn_setprefix( LDAP *ld, char *prefix );
int ldap_ufn_timeout( void *tvparam );
/*
* in unbind.c
*/
int ldap_unbind( LDAP *ld );
int ldap_unbind_s( LDAP *ld );
int ldap_unbind_ext(LDAP *ld, LDAPControl **serverctrls, LDAPControl **clientctrls);
/*
* in getfilter.c
*/
LDAPFiltDesc *ldap_init_getfilter( char *fname );
LDAPFiltDesc *ldap_init_getfilter_buf( char *buf, ssize_t buflen );
LDAPFiltInfo *ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat,
char *value );
LDAPFiltInfo *ldap_getnextfilter( LDAPFiltDesc *lfdp );
void ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix );
void ldap_build_filter( char *filtbuf, size_t buflen,
char *pattern, char *prefix, char *suffix, char *attr,
char *value, char **valwords );
int ldap_create_filter(char *buf, unsigned long buflen, char *pattern, char *prefix, char *suffix, char *attr, char *value, char **valwords);
/*
* in free.c
*/
void ldap_getfilter_free( LDAPFiltDesc *lfdp );
void ldap_mods_free( LDAPMod **mods, int freemods );
void ldap_ber_free(BerElement *ber, int freebuf);
/*
* in friendly.c
*/
char *ldap_friendly_name( char *filename, char *uname,
FriendlyMap *map );
void ldap_free_friendlymap( FriendlyMap *map );
/*
* in cldap.c
*/
/*
* in sort.c
*/
int ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr,
int (*cmp)() );
int ldap_sort_values( LDAP *ld, char **vals, int (*cmp)() );
int ldap_sort_strcasecmp( const char **a, const char **b );
int ldap_multisort_entries(LDAP *ld, LDAPMessage **chain, char **attr, LDAP_CMP_CALLBACK *cmp);
/*
* in url.c
*/
int ldap_is_ldap_url( const char *url );
int ldap_url_parse( const char *url, LDAPURLDesc **ludpp );
int ldap_url_parse_nodn(const char *url, LDAPURLDesc **ludpp);
void ldap_free_urldesc( LDAPURLDesc *ludp );
int ldap_url_search( LDAP *ld, const char *url, int attrsonly );
int ldap_url_search_s( LDAP *ld, const char *url, int attrsonly,
LDAPMessage **res );
int ldap_url_search_st( LDAP *ld, const char *url, int attrsonly,
struct timeval *timeout, LDAPMessage **res );
char *ldap_dns_to_url(LDAP *ld, char *dns_name, char *attrs,
char *scope, char *filter);
char *ldap_dn_to_url(LDAP *ld, char *dn, int nameparts);
/*
* in charset.c
*/
void ldap_set_string_translators( LDAP *ld,
BERTranslateProc encode_proc, BERTranslateProc decode_proc );
int ldap_translate_from_t61( LDAP *ld, char **bufp,
unsigned int *lenp, int free_input );
int ldap_translate_to_t61( LDAP *ld, char **bufp,
unsigned int *lenp, int free_input );
void ldap_enable_translation( LDAP *ld, LDAPMessage *entry,
int enable );
int ldap_t61_to_8859(char **bufp, unsigned long *buflenp,
int free_input);
int ldap_8859_to_t61(char **bufp, unsigned long *buflenp,
int free_input);
/*
* in io.c
*/
BerElement *ber_alloc_t(int options);
int ber_flatten(BerElement *ber, struct berval **bvPtr);
void ber_free(BerElement *ber, int freebuf);
BerElement *ber_alloc(void);
BerElement *ber_init(const struct berval *bv);
/*
* in decode.c
*/
struct berval *ber_bvdup(const struct berval *bv);
void ber_bvecfree(struct berval **bv);
void ber_bvfree(struct berval *bv);
ber_tag_t ber_first_element(BerElement *ber, unsigned int *len, char **last);
ber_tag_t ber_next_element(BerElement *ber, ber_tag_t *len, char *last);
ber_tag_t ber_peek_tag(BerElement *ber, ber_tag_t *len);
ber_tag_t ber_scanf(BerElement *ber, const char *fmt, ...);
ber_tag_t ber_skip_tag(BerElement *ber, ber_tag_t *len);
ber_tag_t ber_get_int(BerElement *ber, ber_int_t *num);
/*
* in encode.c
*/
int ber_printf(BerElement *ber, const char *fmt, ...);
/*
* in control.c
*/
void ldap_control_free (LDAPControl *ctrl);
void ldap_controls_free (LDAPControl **ctrls);
/*
* in spagectrl.c
*/
int ldap_create_page_control(LDAP *ld, unsigned int pagesize, struct berval *cookie, char isCritical, LDAPControl **output);
int ldap_parse_page_control(LDAP *ld, LDAPControl **controls, unsigned int *totalcount, struct berval **cookie);
/*
* in tmplout.c
*/
int ldap_entry2html(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, unsigned long opts, char *urlprefix, char *base);
int ldap_entry2html_search(LDAP *ld, char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl*tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol,int rdncount, unsigned long opts, char *urlprefix);
int ldap_entry2text(LDAP *ld, char *buf, LDAPMessage *entry, struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol, int rdncount, unsigned long opts);
int ldap_entry2text_search(LDAP *ld,char *dn, char *base, LDAPMessage *entry, struct ldap_disptmpl*tmpllist, char **defattrs, char ***defvals, writeptype writeproc, void *writeparm, char *eol,int rdncount, unsigned long opts);
int ldap_vals2html(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, char *eol, int rdncount, char *urlprefix);
int ldap_vals2text(LDAP *ld, char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, char *eol, int rdncount);
/*
* in extendop.c
*/
int ldap_extended_operation(LDAP *ld, const char *requestoid, const struct berval *requestdata, LDAPControl **serverctrls, LDAPControl**clientctrls, int *msgidp);
int ldap_extended_operation_s(LDAP *ld, const char *requestoid, const struct berval *requestdata, LDAPControl **serverctrls, LDAPControl **clientctrls, char **retoidp, struct berval **retdatap);
/*
* in disptmpl.c
*/
struct ldap_disptmpl *ldap_first_disptmpl(struct ldap_disptmpl *tmpllist);
struct ldap_tmplitem *ldap_first_tmplcol(struct ldap_disptmpl *tmpl,struct ldap_tmplitem *row);
struct ldap_tmplitem *ldap_first_tmplrow(struct ldap_disptmpl *tmpl);
void ldap_free_templates(struct ldap_disptmpl *tmpllist);
int ldap_init_templates(char *file, struct ldap_disptmpl **tmpllistp);
int ldap_init_templates_buf(char *buf, long buflen, struct ldap_disptmpl **tmpllistp);
struct ldap_disptmpl *ldap_next_disptmpl(struct ldap_disptmpl *tmpllist, struct ldap_disptmpl *tmpl);
struct ldap_tmplitem *ldap_next_tmplcol(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row, struct ldap_tmplitem *col);
struct ldap_tmplitem *ldap_next_tmplrow(struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row);
struct ldap_disptmpl *ldap_oc2template(char **oclist, struct ldap_disptmpl *tmpllist);
char **ldap_tmplattrs(struct ldap_disptmpl *tmpl, char **includeattrs, int exclude, unsigned long syntaxmask);
struct ldap_disptmpl *ldap_name2template(char *name, struct ldap_disptmpl *tmpllist);
/*
* in cram_md5.c
*/
int ldap_sasl_cram_md5_bind_s(LDAP *ld, char *dn, struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls);
/*
* in setoption.c
*/
int ldap_set_option (LDAP *ld, int option, const void *optdata);
/*
* in log.c
*/
void ldaplogconfigf(FILE *fd);
/*
* in line64.c
*/
char *ldif_type_and_value(char *type, char *val, int vlen);
char *str_getline(char **next);
int str_parse_line(char *line, char **type, char **value, int *vlen);
/*
* in sortctrl.c
*/
int ldap_create_sort_control (LDAP *ld, LDAPsortkey **sortKeyList, const char ctl_iscritical, LDAPControl **ctrlp);
int ldap_parse_sort_control(LDAP *ld, LDAPControl **ctrlp, unsigned long *result, char **attribute);
int ldap_create_sort_keylist(LDAPsortkey ***sortKeyList, const char *string_rep);
void ldap_free_sort_keylist(LDAPsortkey **sortKeyList);
/*
* in vlistctrl.c
*/
int ldap_create_virtuallist_control(LDAP *ld, LDAPVirtualList *ldvlistp, LDAPControl **ctrlp);
int ldap_parse_virtuallist_control(LDAP *ld, LDAPControl **ctrls, unsigned long *target_posp, unsigned long *list_sizep, int *errcodep);
/*
* in ldapsinit.c
*/
LDAP * ldapssl_init( const char *defhost, int defport, int defsecure );
int ldapssl_install_routines( LDAP *ld );
int ldapssl_enable_clientauth( LDAP *ld, char *keynickname, char *keypasswd, char *certnickname );
/*
* in clientinit.c
*/
int ldapssl_client_init( const char *certdbpath, void *certdbhandle);
int ldapssl_clientauth_init(const char *certdbpath, void *certdbhandle, const int needkeydb, const char *keydbpath, void *keydbhandle);
int ldapssl_advclientauth_init( const char *certdbpath, void *certdbhandle, const int needkeydb, const char *keydbpath, void *keydbhandle, const int needsecmoddb, const char *secmoddbpath, const int sslstrength );
int ldapssl_pkcs_init( const struct ldapssl_pkcs_fns *pfns);
/*
* in errormap.c
*/
const char * ldapssl_err2string( const int prerrno );
/*
* in psearch.c
*/
int ldap_create_persistentsearch_control(LDAP *ld, int changetypes, int changesonly, int return_echg_ctls, char ctl_iscritical, LDAPControl **ctrlp);
int ldap_parse_entrychange_control(LDAP *ld, LDAPControl **ctrls, int *chgtypep, char **prevdnp, int *chgnumpresentp, ber_int_t *chgnump);
/*
* in proxyauthctrl.c
*/
int ldap_create_proxyauth_control(LDAP *ld, const char *dn, const char ctl_iscritical, LDAPControl **ctrlp);
int ldap_create_proxiedauth_control(LDAP *ld, const char *authzid, LDAPControl **ctrlp);
/*
* in srchpref.c
*/
struct ldap_searchobj *ldap_first_searchobj(struct ldap_searchobj *solist);
void ldap_free_searchprefs(struct ldap_searchobj *solist);
int ldap_init_searchprefs(char *file, struct ldap_searchobj **solistp);
int ldap_init_searchprefs_buf(char *buf, long buflen, struct ldap_searchobj **solistp);
struct ldap_searchobj *ldap_next_searchobj(struct ldap_searchobj *solist, struct ldap_searchobj *so);
/*
* in getoption.c
*/
int ldap_get_option (LDAP *ld, int option, void *outvalue);
/*
* in memcache.c
*/
int ldap_memcache_init(unsigned long ttl, unsigned long size, char **baseDNs, struct ldap_thread_fns *thread_fns, LDAPMemCache **cachep);
int ldap_memcache_set(LDAP *ld, LDAPMemCache *cache);
int ldap_memcache_get(LDAP *ld, LDAPMemCache **cachep);
void ldap_memcache_flush(LDAPMemCache *cache, char *dn, int scope);
void ldap_memcache_destroy(LDAPMemCache *cache);
void ldap_memcache_update(LDAPMemCache *cache);
/*
* in digest_md5.c
*/
int ldap_x_sasl_digest_md5_bind_s(LDAP *ld, char *dn, struct berval *cred, LDAPControl **serverctrls, LDAPControl **clientctrls);