]> git.sur5r.net Git - openldap/blob - libraries/libldap/ldap-int.h
552855e6f8d7847a91bbb8a2e5a8fd02de28056b
[openldap] / libraries / libldap / ldap-int.h
1 /*  ldap-int.h - defines & prototypes internal to the LDAP library */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
5  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6  */
7 /*  Portions
8  *  Copyright (c) 1995 Regents of the University of Michigan.
9  *  All rights reserved.
10  */
11
12 #ifndef _LDAP_INT_H
13 #define _LDAP_INT_H 1
14
15 #ifdef LDAP_R_COMPILE
16 #define LDAP_THREAD_SAFE 1
17 #endif
18
19 #include "../liblber/lber-int.h"
20
21 /*
22  * Windows does not preprocess correctly unless
23  * this #include precedes queue.h
24  */
25 #ifdef LDAP_R_COMPILE
26 #include <ldap_pvt_thread.h>
27 #endif
28
29 #include <ac/queue.h>
30
31 #ifdef HAVE_CYRUS_SASL
32         /* the need for this should be removed */
33 #include <sasl.h>
34
35 #define SASL_MAX_BUFF_SIZE      65536
36 #define SASL_MIN_BUFF_SIZE      4096
37 #endif
38
39 /* 
40  * Support needed if the library is running in the kernel
41  */
42 #if LDAP_INT_IN_KERNEL
43         /* 
44          * Platform specific function to return a pointer to the
45          * process-specific global options. 
46          *
47          * This function should perform the following functions:
48          *  Allocate and initialize a global options struct on a per process basis
49          *  Use callers process identifier to return its global options struct
50          *  Note: Deallocate structure when the process exits
51          */
52 #       define LDAP_INT_GLOBAL_OPT() ldap_int_global_opt()
53    struct ldapoptions *ldap_int_global_opt(void);
54 #else
55 #       define LDAP_INT_GLOBAL_OPT() (&ldap_int_global_options)
56 #endif
57
58 #define ldap_debug      ((LDAP_INT_GLOBAL_OPT())->ldo_debug)
59
60 #include "ldap_log.h"
61
62 #undef Debug
63 #define Debug( level, fmt, arg1, arg2, arg3 ) \
64         do { if ( ldap_debug & level ) \
65         ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) ); \
66         } while ( 0 )
67
68 #define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 )\
69         ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
70
71 #include "ldap.h"
72
73 #include "ldap_pvt.h"
74
75 LDAP_BEGIN_DECL
76
77 #define LDAP_URL_PREFIX         "ldap://"
78 #define LDAP_URL_PREFIX_LEN     (sizeof(LDAP_URL_PREFIX)-1)
79 #define LDAPS_URL_PREFIX                "ldaps://"
80 #define LDAPS_URL_PREFIX_LEN    (sizeof(LDAPS_URL_PREFIX)-1)
81 #define LDAPI_URL_PREFIX        "ldapi://"
82 #define LDAPI_URL_PREFIX_LEN    (sizeof(LDAPI_URL_PREFIX)-1)
83 #ifdef LDAP_CONNECTIONLESS
84 #define LDAPC_URL_PREFIX        "cldap://"
85 #define LDAPC_URL_PREFIX_LEN    (sizeof(LDAPC_URL_PREFIX)-1)
86 #endif
87 #define LDAP_URL_URLCOLON               "URL:"
88 #define LDAP_URL_URLCOLON_LEN   (sizeof(LDAP_URL_URLCOLON)-1)
89
90 #define LDAP_REF_STR            "Referral:\n"
91 #define LDAP_REF_STR_LEN        (sizeof(LDAP_REF_STR)-1)
92 #define LDAP_LDAP_REF_STR       LDAP_URL_PREFIX
93 #define LDAP_LDAP_REF_STR_LEN   LDAP_URL_PREFIX_LEN
94
95 #define LDAP_DEFAULT_REFHOPLIMIT 5
96
97 #define LDAP_BOOL_REFERRALS             0
98 #define LDAP_BOOL_RESTART               1
99 #define LDAP_BOOL_TLS                   3
100
101 #define LDAP_BOOLEANS   unsigned long
102 #define LDAP_BOOL(n)    (1 << (n))
103 #define LDAP_BOOL_GET(lo, bool) \
104         ((lo)->ldo_booleans & LDAP_BOOL(bool) ? -1 : 0)
105 #define LDAP_BOOL_SET(lo, bool) ((lo)->ldo_booleans |= LDAP_BOOL(bool))
106 #define LDAP_BOOL_CLR(lo, bool) ((lo)->ldo_booleans &= ~LDAP_BOOL(bool))
107 #define LDAP_BOOL_ZERO(lo) ((lo)->ldo_booleans = 0)
108
109 /*
110  * This structure represents both ldap messages and ldap responses.
111  * These are really the same, except in the case of search responses,
112  * where a response has multiple messages.
113  */
114
115 struct ldapmsg {
116         ber_int_t               lm_msgid;       /* the message id */
117         ber_tag_t               lm_msgtype;     /* the message type */
118         BerElement      *lm_ber;        /* the ber encoded message contents */
119         struct ldapmsg  *lm_chain;      /* for search - next msg in the resp */
120         struct ldapmsg  *lm_next;       /* next response */
121         time_t  lm_time;        /* used to maintain cache */
122 };
123
124 /*
125  * structure representing get/set'able options
126  * which have global defaults.
127  */
128 struct ldapoptions {
129         short ldo_valid;
130 #define LDAP_UNINITIALIZED      0x0
131 #define LDAP_INITIALIZED        0x1
132 #define LDAP_VALID_SESSION      0x2
133 #ifdef LDAP_CONNECTIONLESS
134 #define LDAP_IS_UDP(ld)         ((ld)->ld_options.ldo_is_udp)
135         void*                   ldo_peer;       /* struct sockaddr* */
136         char*                   ldo_cldapdn;
137         int                     ldo_is_udp;
138 #endif
139
140         int             ldo_debug;
141         /* per API call timeout */
142         struct timeval          *ldo_tm_api;
143         struct timeval          *ldo_tm_net;
144
145         ber_int_t               ldo_version;
146         ber_int_t               ldo_deref;
147         ber_int_t               ldo_timelimit;
148         ber_int_t               ldo_sizelimit;
149
150 #ifdef HAVE_TLS
151         int                     ldo_tls_mode;
152 #endif
153
154         LDAPURLDesc *ldo_defludp;
155         int             ldo_defport;
156         char*   ldo_defbase;
157         char*   ldo_defbinddn;  /* bind dn */
158
159 #ifdef HAVE_CYRUS_SASL
160         char*   ldo_def_sasl_mech;              /* SASL Mechanism(s) */
161         char*   ldo_def_sasl_realm;             /* SASL realm */
162         char*   ldo_def_sasl_authcid;   /* SASL authentication identity */
163         char*   ldo_def_sasl_authzid;   /* SASL authorization identity */
164
165         /* SASL Security Properties */
166         struct sasl_security_properties ldo_sasl_secprops;
167 #endif
168
169         int             ldo_refhoplimit;        /* limit on referral nesting */
170
171         /* LDAPv3 server and client controls */
172         LDAPControl     **ldo_sctrls;
173         LDAPControl **ldo_cctrls;
174
175         /* LDAP rebind callback function */
176         LDAP_REBIND_PROC *ldo_rebind_proc;
177         void *ldo_rebind_params;
178
179         LDAP_BOOLEANS ldo_booleans;     /* boolean options */
180 };
181
182
183 /*
184  * structure for representing an LDAP server connection
185  */
186 typedef struct ldap_conn {
187         Sockbuf         *lconn_sb;
188 #ifdef HAVE_TLS
189         /* tls context */
190         void            *lconn_tls_ctx;
191 #endif
192 #ifdef HAVE_CYRUS_SASL
193         void            *lconn_sasl_ctx;
194 #endif
195         int                     lconn_refcnt;
196         time_t          lconn_lastused; /* time */
197         int                     lconn_rebind_inprogress;        /* set if rebind in progress */
198         char            ***lconn_rebind_queue;          /* used if rebind in progress */
199         int                     lconn_status;
200 #define LDAP_CONNST_NEEDSOCKET          1
201 #define LDAP_CONNST_CONNECTING          2
202 #define LDAP_CONNST_CONNECTED           3
203         LDAPURLDesc             *lconn_server;
204 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
205         char                    *lconn_krbinstance;
206 #endif
207         BerElement              *lconn_ber;     /* ber receiving on this conn. */
208
209         struct ldap_conn *lconn_next;
210 } LDAPConn;
211
212
213 /*
214  * structure used to track outstanding requests
215  */
216 typedef struct ldapreq {
217         ber_int_t               lr_msgid;       /* the message id */
218         int             lr_status;      /* status of request */
219 #define LDAP_REQST_COMPLETED    0
220 #define LDAP_REQST_INPROGRESS   1
221 #define LDAP_REQST_CHASINGREFS  2
222 #define LDAP_REQST_NOTCONNECTED 3
223 #define LDAP_REQST_WRITING      4
224         int             lr_outrefcnt;   /* count of outstanding referrals */
225         ber_int_t               lr_origid;      /* original request's message id */
226         int             lr_parentcnt;   /* count of parent requests */
227         ber_tag_t               lr_res_msgtype; /* result message type */
228         ber_int_t               lr_res_errno;   /* result LDAP errno */
229         char            *lr_res_error;  /* result error string */
230         char            *lr_res_matched;/* result matched DN string */
231         BerElement      *lr_ber;        /* ber encoded request contents */
232         LDAPConn        *lr_conn;       /* connection used to send request */
233         struct ldapreq  *lr_parent;     /* request that spawned this referral */
234         struct ldapreq  *lr_child;      /* first child request */
235         struct ldapreq  *lr_refnext;    /* next referral spawned */
236         struct ldapreq  *lr_prev;       /* previous request */
237         struct ldapreq  *lr_next;       /* next request */
238 } LDAPRequest;
239
240 /*
241  * structure for client cache
242  */
243 #define LDAP_CACHE_BUCKETS      31      /* cache hash table size */
244 typedef struct ldapcache {
245         LDAPMessage     *lc_buckets[LDAP_CACHE_BUCKETS];/* hash table */
246         LDAPMessage     *lc_requests;                   /* unfulfilled reqs */
247         long            lc_timeout;                     /* request timeout */
248         ber_len_t               lc_maxmem;                      /* memory to use */
249         ber_len_t               lc_memused;                     /* memory in use */
250         int             lc_enabled;                     /* enabled? */
251         unsigned long   lc_options;                     /* options */
252 #define LDAP_CACHE_OPT_CACHENOERRS      0x00000001
253 #define LDAP_CACHE_OPT_CACHEALLERRS     0x00000002
254 }  LDAPCache;
255
256 /*
257  * structure containing referral request info for rebind procedure
258  */
259 typedef struct ldapreqinfo {
260         ber_len_t       ri_msgid;
261         int                     ri_request;
262         char            *ri_url;
263 } LDAPreqinfo;
264
265 /*
266  * structure representing an ldap connection
267  */
268
269 struct ldap {
270         Sockbuf         *ld_sb;         /* socket descriptor & buffer */
271
272         struct ldapoptions ld_options;
273
274 #define ld_valid                ld_options.ldo_valid
275 #define ld_debug                ld_options.ldo_debug
276
277 #define ld_deref                ld_options.ldo_deref
278 #define ld_timelimit    ld_options.ldo_timelimit
279 #define ld_sizelimit    ld_options.ldo_sizelimit
280
281 #define ld_defbinddn    ld_options.ldo_defbinddn
282 #define ld_defbase              ld_options.ldo_defbase
283 #define ld_defhost              ld_options.ldo_defhost
284 #define ld_defport              ld_options.ldo_defport
285
286 #define ld_refhoplimit  ld_options.ldo_refhoplimit
287
288 #define ld_sctrls               ld_options.ldo_sctrls
289 #define ld_cctrls               ld_options.ldo_cctrls
290 #define ld_rebind_proc  ld_options.ldo_rebind_proc
291 #define ld_rebind_params        ld_options.ldo_rebind_params
292
293 #define ld_version              ld_options.ldo_version
294
295         unsigned short  ld_lberoptions;
296
297         ber_int_t       ld_errno;
298         char    *ld_error;
299         char    *ld_matched;
300         ber_len_t               ld_msgid;
301
302         /* do not mess with these */
303         LDAPRequest     *ld_requests;   /* list of outstanding requests */
304         LDAPMessage     *ld_responses;  /* list of outstanding responses */
305
306         ber_int_t               *ld_abandoned;  /* array of abandoned requests */
307
308         LDAPCache       *ld_cache;      /* non-null if cache is initialized */
309
310         /* do not mess with the rest though */
311
312         LDAPConn        *ld_defconn;    /* default connection */
313         LDAPConn        *ld_conns;      /* list of server connections */
314         void            *ld_selectinfo; /* platform specifics for select */
315 };
316 #define LDAP_VALID(ld)  ( (ld)->ld_valid == LDAP_VALID_SESSION )
317
318 #ifdef LDAP_R_COMPILE
319 #ifdef HAVE_RES_QUERY
320 LDAP_V ( ldap_pvt_thread_mutex_t ) ldap_int_resolv_mutex;
321 #endif
322
323 #ifdef HAVE_CYRUS_SASL
324 LDAP_V( ldap_pvt_thread_mutex_t ) ldap_int_sasl_mutex;
325 #endif
326 #endif
327
328 /*
329  * in init.c
330  */
331
332 LDAP_V ( struct ldapoptions ) ldap_int_global_options;
333
334 LDAP_F ( void ) ldap_int_initialize LDAP_P((struct ldapoptions *, int *));
335 LDAP_F ( void ) ldap_int_initialize_global_options LDAP_P((
336         struct ldapoptions *, int *));
337
338 /* memory.c */
339         /* simple macros to realloc for now */
340 #define LDAP_INT_MALLOC(s)              (LBER_MALLOC((s)))
341 #define LDAP_INT_CALLOC(n,s)    (LBER_CALLOC((n),(s)))
342 #define LDAP_INT_REALLOC(p,s)   (LBER_REALLOC((p),(s)))
343 #define LDAP_INT_FREE(p)                (LBER_FREE((p)))
344 #define LDAP_INT_VFREE(v)               (LBER_VFREE((void **)(v)))
345 #define LDAP_INT_STRDUP(s)              (LBER_STRDUP((s)))
346
347 #define LDAP_MALLOC(s)          (LBER_MALLOC((s)))
348 #define LDAP_CALLOC(n,s)        (LBER_CALLOC((n),(s)))
349 #define LDAP_REALLOC(p,s)       (LBER_REALLOC((p),(s)))
350 #define LDAP_FREE(p)            (LBER_FREE((p)))
351 #define LDAP_VFREE(v)           (LBER_VFREE((void **)(v)))
352 #define LDAP_STRDUP(s)          (LBER_STRDUP((s)))
353 #define LDAP_STRNDUP(s,l)       (LBER_STRNDUP((s),(l)))
354
355 /*
356  * in error.c
357  */
358 LDAP_F (void) ldap_int_error_init( void );
359
360 /*
361  * in unit-int.c
362  */
363 LDAP_F (void) ldap_int_utils_init LDAP_P(( void ));
364
365
366 /*
367  * in print.c
368  */
369 LDAP_F (int) ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...)) LDAP_GCCATTR((format(printf, 3, 4)));
370
371 /*
372  * in cache.c
373  */
374 LDAP_F (void) ldap_add_request_to_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype,
375         BerElement *request ));
376 LDAP_F (void) ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result ));
377 LDAP_F (int) ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *request ));
378
379 /*
380  * in controls.c
381  */
382 LDAP_F (LDAPControl *) ldap_control_dup LDAP_P((
383         const LDAPControl *ctrl ));
384
385 LDAP_F (LDAPControl **) ldap_controls_dup LDAP_P((
386         LDAPControl *const *ctrls ));
387
388 LDAP_F (int) ldap_int_get_controls LDAP_P((
389         BerElement *be,
390         LDAPControl ***ctrlsp));
391
392 LDAP_F (int) ldap_int_put_controls LDAP_P((
393         LDAP *ld,
394         LDAPControl *const *ctrls,
395         BerElement *ber ));
396
397 LDAP_F (int) ldap_int_client_controls LDAP_P((
398         LDAP *ld,
399         LDAPControl **ctrlp ));
400
401 /*
402  * in dsparse.c
403  */
404 LDAP_F (int) ldap_int_next_line_tokens LDAP_P(( char **bufp, ber_len_t *blenp, char ***toksp ));
405
406 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
407 /*
408  * in kerberos.c
409  */
410 LDAP_F (char *) ldap_get_kerberosv4_credentials LDAP_P((
411         LDAP *ld,
412         LDAP_CONST char *who,
413         LDAP_CONST char *service,
414         ber_len_t *len ));
415
416 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND */
417
418
419 /*
420  * in open.c
421  */
422 LDAP_F (int) ldap_open_defconn( LDAP *ld );
423 LDAP_F (int) ldap_int_open_connection( LDAP *ld,
424         LDAPConn *conn, LDAPURLDesc *srvlist, int async );
425
426 /*
427  * in os-ip.c
428  */
429 LDAP_V (int) ldap_int_tblsize;
430 LDAP_F (int) ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
431 LDAP_F (int) ldap_connect_to_host( LDAP *ld, Sockbuf *sb,
432         int proto, const char *host, unsigned long address, int port,
433         int async );
434
435 #if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) || \
436         defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
437 LDAP_V (char *) ldap_int_hostname;
438 LDAP_F (char *) ldap_host_connected_to( Sockbuf *sb );
439 #endif
440
441 LDAP_F (void) ldap_int_ip_init( void );
442 LDAP_F (int) ldap_int_select( LDAP *ld, struct timeval *timeout );
443 LDAP_F (void *) ldap_new_select_info( void );
444 LDAP_F (void) ldap_free_select_info( void *sip );
445 LDAP_F (void) ldap_mark_select_write( LDAP *ld, Sockbuf *sb );
446 LDAP_F (void) ldap_mark_select_read( LDAP *ld, Sockbuf *sb );
447 LDAP_F (void) ldap_mark_select_clear( LDAP *ld, Sockbuf *sb );
448 LDAP_F (int) ldap_is_read_ready( LDAP *ld, Sockbuf *sb );
449 LDAP_F (int) ldap_is_write_ready( LDAP *ld, Sockbuf *sb );
450
451 /*
452  * in os-local.c
453  */
454 #ifdef LDAP_PF_LOCAL
455 LDAP_F (int) ldap_connect_to_path( LDAP *ld, Sockbuf *sb,
456         const char *path, int async );
457 #endif /* LDAP_PF_LOCAL */
458
459 /*
460  * in request.c
461  */
462 LDAP_F (ber_int_t) ldap_send_initial_request( LDAP *ld, ber_tag_t msgtype,
463         const char *dn, BerElement *ber );
464 LDAP_F (BerElement *) ldap_alloc_ber_with_options( LDAP *ld );
465 LDAP_F (void) ldap_set_ber_options( LDAP *ld, BerElement *ber );
466
467 LDAP_F (int) ldap_send_server_request( LDAP *ld, BerElement *ber, ber_int_t msgid, LDAPRequest *parentreq, LDAPURLDesc *srvlist, LDAPConn *lc, LDAPreqinfo *bind );
468 LDAP_F (LDAPConn *) ldap_new_connection( LDAP *ld, LDAPURLDesc *srvlist, int use_ldsb, int connect, LDAPreqinfo *bind );
469 LDAP_F (LDAPRequest *) ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid );
470 LDAP_F (void) ldap_free_request( LDAP *ld, LDAPRequest *lr );
471 LDAP_F (void) ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind );
472 LDAP_F (void) ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all );
473 LDAP_F (void) ldap_dump_requests_and_responses( LDAP *ld );
474 LDAP_F (int) ldap_chase_referrals( LDAP *ld, LDAPRequest *lr,
475         char **errstrp, int sref, int *hadrefp );
476 LDAP_F (int) ldap_chase_v3referrals( LDAP *ld, LDAPRequest *lr,
477         char **refs, int sref, char **referralsp, int *hadrefp );
478 LDAP_F (int) ldap_append_referral( LDAP *ld, char **referralsp, char *s );
479
480 /*
481  * in result.c:
482  */
483 LDAP_F (char *) ldap_int_msgtype2str( ber_tag_t tag );
484
485 /*
486  * in search.c
487  */
488 LDAP_F (BerElement *) ldap_build_search_req LDAP_P((
489         LDAP *ld,
490         const char *base,
491         ber_int_t scope,
492         const char *filter,
493         char **attrs,
494         ber_int_t attrsonly,
495         LDAPControl **sctrls,
496         LDAPControl **cctrls,
497         ber_int_t timelimit,
498         ber_int_t sizelimit ));
499
500 LDAP_F( int ) ldap_int_put_filter LDAP_P((
501         BerElement *ber,
502         char *str ));
503
504 /*
505  * in unbind.c
506  */
507 LDAP_F (int) ldap_ld_free LDAP_P((
508         LDAP *ld,
509         int close,
510         LDAPControl **sctrls,
511         LDAPControl **cctrls ));
512
513 LDAP_F (int) ldap_send_unbind LDAP_P((
514         LDAP *ld,
515         Sockbuf *sb,
516         LDAPControl **sctrls,
517         LDAPControl **cctrls ));
518
519 /*
520  * in url.c
521  */
522 LDAP_F (LDAPURLDesc *) ldap_url_dup LDAP_P((
523         LDAPURLDesc *ludp ));
524
525 LDAP_F (LDAPURLDesc *) ldap_url_duplist LDAP_P((
526         LDAPURLDesc *ludlist ));
527
528 LDAP_F (int) ldap_url_parselist LDAP_P((
529         LDAPURLDesc **ludlist,
530         const char *url ));
531
532 LDAP_F (int) ldap_url_parsehosts LDAP_P((
533         LDAPURLDesc **ludlist,
534         const char *hosts,
535         int port ));
536
537 LDAP_F (char *) ldap_url_list2hosts LDAP_P((
538         LDAPURLDesc *ludlist ));
539
540 LDAP_F (char *) ldap_url_list2urls LDAP_P((
541         LDAPURLDesc *ludlist ));
542
543 LDAP_F (void) ldap_free_urllist LDAP_P((
544         LDAPURLDesc *ludlist ));
545
546 /*
547  * in cyrus.c
548  */
549
550 LDAP_F (int) ldap_int_sasl_init LDAP_P(( void ));
551
552 LDAP_F (int) ldap_int_sasl_open LDAP_P((
553         LDAP *ld, LDAPConn *conn,
554         const char* host, ber_len_t ssf ));
555 LDAP_F (int) ldap_int_sasl_close LDAP_P(( LDAP *ld, LDAPConn *conn ));
556
557 LDAP_F (int) ldap_int_sasl_external LDAP_P((
558         LDAP *ld, LDAPConn *conn,
559         const char* authid, ber_len_t ssf ));
560
561 LDAP_F (int) ldap_int_sasl_get_option LDAP_P(( LDAP *ld,
562         int option, void *arg ));
563 LDAP_F (int) ldap_int_sasl_set_option LDAP_P(( LDAP *ld,
564         int option, void *arg ));
565 LDAP_F (int) ldap_int_sasl_config LDAP_P(( struct ldapoptions *lo,
566         int option, const char *arg ));
567
568 LDAP_F (int) ldap_int_sasl_bind LDAP_P((
569         LDAP *ld,
570         const char *,
571         const char *,
572         LDAPControl **, LDAPControl **,
573
574         /* should be passed in client controls */
575         unsigned flags,
576         LDAP_SASL_INTERACT_PROC *interact,
577         void *defaults ));
578
579 /* in schema.c */
580 LDAP_F (char *) ldap_int_parse_numericoid LDAP_P((
581         const char **sp,
582         int *code,
583         const int flags ));
584
585 /*
586  * in tls.c
587  */
588 LDAP_F (int) ldap_int_tls_config LDAP_P(( LDAP *ld,
589         int option, const char *arg ));
590
591 LDAP_F (int) ldap_int_tls_start LDAP_P(( LDAP *ld,
592         LDAPConn *conn, LDAPURLDesc *srv ));
593
594 LDAP_END_DECL
595
596 #endif /* _LDAP_INT_H */