]> git.sur5r.net Git - openldap/blob - servers/slapd/proto-slap.h
Removed active_threads count and associated mutex/cond. Replaced with
[openldap] / servers / slapd / proto-slap.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6 #ifndef _PROTO_SLAP
7 #define _PROTO_SLAP
8
9 #include <ldap_cdefs.h>
10
11 LDAP_BEGIN_DECL
12
13 LIBSLAPD_F( int ) schema_init_done;
14 LIBSLAPD_F( struct slap_internal_schema ) slap_schema;
15
16 LIBSLAPD_F (int) slap_str2ad LDAP_P((
17         const char *,
18         AttributeDescription **ad,
19         const char **text ));
20
21 LIBSLAPD_F (int) slap_bv2ad LDAP_P((
22         struct berval *bv,
23         AttributeDescription **ad,
24         const char **text ));
25
26 LIBSLAPD_F (AttributeDescription *) ad_dup LDAP_P((
27         AttributeDescription *desc ));
28
29 LIBSLAPD_F (void) ad_free LDAP_P((
30         AttributeDescription *desc,
31         int freeit ));
32
33 #define ad_cmp(l,r)     ( strcasecmp( \
34         (l)->ad_cname->bv_val, (r)->ad_cname->bv_val ))
35
36 LIBSLAPD_F (int) is_ad_subtype LDAP_P((
37         AttributeDescription *sub,
38         AttributeDescription *super ));
39
40 LIBSLAPD_F (int) ad_inlist LDAP_P((
41         AttributeDescription *desc,
42         char **attrs ));
43
44 /*
45  * acl.c
46  */
47
48 LIBSLAPD_F (int) access_allowed LDAP_P((
49         Backend *be, Connection *conn, Operation *op,
50         Entry *e, AttributeDescription *desc, struct berval *val,
51         slap_access_t access ));
52 LIBSLAPD_F (int) acl_check_modlist LDAP_P((
53         Backend *be, Connection *conn, Operation *op,
54         Entry *e, Modifications *ml ));
55
56 LIBSLAPD_F (void) acl_append( AccessControl **l, AccessControl *a );
57
58 /*
59  * aclparse.c
60  */
61
62 LIBSLAPD_F (void) parse_acl LDAP_P(( Backend *be,
63         const char *fname, int lineno,
64         int argc, char **argv ));
65
66 LIBSLAPD_F (char *) access2str LDAP_P(( slap_access_t access ));
67 LIBSLAPD_F (slap_access_t) str2access LDAP_P(( const char *str ));
68
69 #define ACCESSMASK_MAXLEN       sizeof("unknown (+wrscan)")
70 LIBSLAPD_F (char *) accessmask2str LDAP_P(( slap_access_mask_t mask, char* ));
71 LIBSLAPD_F (slap_access_mask_t) str2accessmask LDAP_P(( const char *str ));
72
73 /*
74  * at.c
75  */
76
77 LIBSLAPD_F (void) at_config LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
78 LIBSLAPD_F (AttributeType *) at_find LDAP_P(( const char *name ));
79 LIBSLAPD_F (int) at_find_in_list LDAP_P(( AttributeType *sat, AttributeType **list ));
80 LIBSLAPD_F (int) at_append_to_list LDAP_P(( AttributeType *sat, AttributeType ***listp ));
81 LIBSLAPD_F (int) at_delete_from_list LDAP_P(( int pos, AttributeType ***listp ));
82 LIBSLAPD_F (int) at_schema_info LDAP_P(( Entry *e ));
83 LIBSLAPD_F (int) at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, const char **err ));
84
85 LIBSLAPD_F (int) is_at_subtype LDAP_P((
86         AttributeType *sub,
87         AttributeType *super ));
88
89 LIBSLAPD_F (int) is_at_syntax LDAP_P((
90         AttributeType *at,
91         const char *oid ));
92
93 #       define at_canonical_name(at) ((at)->sat_cname)  
94
95
96 /*
97  * attr.c
98  */
99
100 LIBSLAPD_F (void) attr_free LDAP_P(( Attribute *a ));
101 LIBSLAPD_F (Attribute *) attr_dup LDAP_P(( Attribute *a ));
102
103 LIBSLAPD_F (int) attr_merge LDAP_P(( Entry *e,
104         AttributeDescription *desc,
105         struct berval **vals ));
106 LIBSLAPD_F (Attribute *) attrs_find LDAP_P(( Attribute *a, AttributeDescription *desc ));
107 LIBSLAPD_F (Attribute *) attr_find LDAP_P(( Attribute *a, AttributeDescription *desc ));
108 LIBSLAPD_F (int) attr_delete LDAP_P(( Attribute **attrs, AttributeDescription *desc ));
109
110 LIBSLAPD_F (void) attrs_free LDAP_P(( Attribute *a ));
111 LIBSLAPD_F (Attribute *) attrs_dup LDAP_P(( Attribute *a ));
112
113
114 /*
115  * ava.c
116  */
117 LIBSLAPD_F (int) get_ava LDAP_P((
118         BerElement *ber,
119         AttributeAssertion **ava,
120         unsigned usage,
121         const char **text ));
122 LIBSLAPD_F (void) ava_free LDAP_P((
123         AttributeAssertion *ava,
124         int freeit ));
125
126 /*
127  * backend.c
128  */
129
130 LIBSLAPD_F (int) backend_init LDAP_P((void));
131 LIBSLAPD_F (int) backend_add LDAP_P((BackendInfo *aBackendInfo));
132 LIBSLAPD_F (int) backend_num LDAP_P((Backend *be));
133 LIBSLAPD_F (int) backend_startup LDAP_P((Backend *be));
134 LIBSLAPD_F (int) backend_shutdown LDAP_P((Backend *be));
135 LIBSLAPD_F (int) backend_destroy LDAP_P((void));
136
137 LIBSLAPD_F (BackendInfo *) backend_info LDAP_P(( const char *type ));
138 LIBSLAPD_F (BackendDB *) backend_db_init LDAP_P(( const char *type ));
139
140 LIBSLAPD_F (BackendDB *) select_backend LDAP_P(( const char * dn ));
141
142 LIBSLAPD_F (int) be_issuffix LDAP_P(( Backend *be, const char *suffix ));
143 LIBSLAPD_F (int) be_isroot LDAP_P(( Backend *be, const char *ndn ));
144 LIBSLAPD_F (int) be_isroot_pw LDAP_P(( Backend *be, const char *ndn, struct berval *cred ));
145 LIBSLAPD_F (char *) be_root_dn LDAP_P(( Backend *be ));
146 LIBSLAPD_F (int) be_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
147 #define be_entry_release_r( be, e ) be_entry_release_rw( be, e, 0 )
148 #define be_entry_release_w( be, e ) be_entry_release_rw( be, e, 1 )
149
150 LIBSLAPD_F (int) backend_unbind LDAP_P((Connection *conn, Operation *op));
151
152 LIBSLAPD_F( int )       backend_check_controls LDAP_P((
153         Backend *be,
154         Connection *conn,
155         Operation *op,
156         const char **text ));
157
158 LIBSLAPD_F (int) backend_connection_init LDAP_P((Connection *conn));
159 LIBSLAPD_F (int) backend_connection_destroy LDAP_P((Connection *conn));
160
161 LIBSLAPD_F (int) backend_group LDAP_P((Backend *be,
162         Entry *target,
163         const char *gr_ndn,
164         const char *op_ndn,
165         ObjectClass *group_oc,
166         AttributeDescription *group_at
167 ));
168
169 LIBSLAPD_F (Attribute *) backend_operational( Backend *, Entry * );
170
171
172
173 /*
174  * ch_malloc.c
175  */
176
177 #ifdef CSRIMALLOC
178 #define ch_malloc malloc
179 #define ch_realloc realloc
180 #define ch_calloc calloc
181 #define ch_strdup strdup
182 #define ch_free free
183
184 #else
185 LIBSLAPD_F (void *) ch_malloc LDAP_P(( ber_len_t size ));
186 LIBSLAPD_F (void *) ch_realloc LDAP_P(( void *block, ber_len_t size ));
187 LIBSLAPD_F (void *) ch_calloc LDAP_P(( ber_len_t nelem, ber_len_t size ));
188 LIBSLAPD_F (char *) ch_strdup LDAP_P(( const char *string ));
189 LIBSLAPD_F (void) ch_free LDAP_P(( void * ));
190
191 #ifndef CH_FREE
192 #undef free
193 #define free ch_free
194 #endif
195 #endif
196
197 /*
198  * charray.c
199  */
200
201 LIBSLAPD_F (void) charray_add LDAP_P(( char ***a, const char *s ));
202 LIBSLAPD_F (void) charray_merge LDAP_P(( char ***a, char **s ));
203 LIBSLAPD_F (void) charray_free LDAP_P(( char **array ));
204 LIBSLAPD_F (int) charray_inlist LDAP_P(( char **a, const char *s ));
205 LIBSLAPD_F (char **) charray_dup LDAP_P(( char **a ));
206 LIBSLAPD_F (char **) str2charray LDAP_P(( const char *str, const char *brkstr ));
207
208 /*
209  * controls.c
210  */
211 LIBSLAPD_F (int) get_ctrls LDAP_P((
212         Connection *co,
213         Operation *op,
214         int senderrors ));
215
216 LIBSLAPD_F (int) get_manageDSAit LDAP_P(( Operation *op ));
217
218 /*
219  * config.c
220  */
221
222 LIBSLAPD_F (int) read_config LDAP_P(( const char *fname ));
223
224
225 /*
226  * index.c
227  */
228 LIBSLAPD_F (int) slap_index2prefix LDAP_P(( int indextype ));
229 LIBSLAPD_F (int) slap_str2index LDAP_P(( const char *str, slap_index *idx ));
230
231 /*
232  * connection.c
233  */
234 LIBSLAPD_F (int) connections_init LDAP_P((void));
235 LIBSLAPD_F (int) connections_shutdown LDAP_P((void));
236 LIBSLAPD_F (int) connections_destroy LDAP_P((void));
237 LIBSLAPD_F (int) connections_timeout_idle LDAP_P((time_t));
238
239 LIBSLAPD_F (long) connection_init LDAP_P((
240         ber_socket_t s,
241         const char* url,
242         const char* dnsname,
243         const char* peername,
244         const char* sockname,
245         int use_tls ));
246
247 LIBSLAPD_F (void) connection_closing LDAP_P(( Connection *c ));
248 LIBSLAPD_F (int) connection_state_closing LDAP_P(( Connection *c ));
249 LIBSLAPD_F (const char *) connection_state2str LDAP_P(( int state )) LDAP_GCCATTR((const));
250
251 LIBSLAPD_F (int) connection_write LDAP_P((ber_socket_t s));
252 LIBSLAPD_F (int) connection_read LDAP_P((ber_socket_t s));
253
254 LIBSLAPD_F (unsigned long) connections_nextid(void);
255
256 LIBSLAPD_F (Connection *) connection_first LDAP_P((ber_socket_t *));
257 LIBSLAPD_F (Connection *) connection_next LDAP_P((Connection *, ber_socket_t *));
258 LIBSLAPD_F (void) connection_done LDAP_P((Connection *));
259
260 /*
261  * dn.c
262  */
263
264 LIBSLAPD_F (char *) dn_validate LDAP_P(( char *dn ));
265 LIBSLAPD_F (char *) dn_normalize LDAP_P(( char *dn ));
266 LIBSLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn ));
267 LIBSLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn ));
268 LIBSLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, const char *dn ));
269 LIBSLAPD_F (int) dn_issuffix LDAP_P(( const char *dn, const char *suffix ));
270 LIBSLAPD_F (int) rdn_validate LDAP_P(( const char* str ));
271 LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( const char * rdn ));
272 LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( const char * rdn ));
273
274 LIBSLAPD_F (void) build_new_dn LDAP_P(( char ** new_dn,
275         const char *e_dn,
276         const char * p_dn,
277         const char * newrdn ));
278 /*
279  * entry.c
280  */
281
282 LIBSLAPD_F (int) entry_destroy LDAP_P((void));
283
284 LIBSLAPD_F (Entry *) str2entry LDAP_P(( char    *s ));
285 LIBSLAPD_F (char *) entry2str LDAP_P(( Entry *e, int *len ));
286 LIBSLAPD_F (void) entry_free LDAP_P(( Entry *e ));
287
288 LIBSLAPD_F (int) entry_cmp LDAP_P(( Entry *a, Entry *b ));
289 LIBSLAPD_F (int) entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
290 LIBSLAPD_F (int) entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
291
292 /*
293  * extended.c
294  */
295
296 #define SLAPD_EXTOP_GETVERSION 0
297 #define SLAPD_EXTOP_GETPROTO 1
298 #define SLAPD_EXTOP_GETAUTH 2
299 #define SLAPD_EXTOP_GETDN 3
300 #define SLAPD_EXTOP_GETCLIENT 4
301
302 typedef int (*SLAP_EXTOP_CALLBACK_FN) LDAP_P((
303         Connection *conn, Operation *op,
304         int msg, int arg, void *argp ));
305
306 typedef int (*SLAP_EXTOP_MAIN_FN) LDAP_P((
307         SLAP_EXTOP_CALLBACK_FN,
308         Connection *conn, Operation *op,
309         const char * reqoid,
310         struct berval * reqdata,
311         char ** rspoid,
312         struct berval ** rspdata,
313         LDAPControl *** rspctrls,
314         const char ** text,
315         struct berval *** refs ));
316
317 typedef int (*SLAP_EXTOP_GETOID_FN) LDAP_P((
318         int index, char *oid, int blen ));
319
320 LIBSLAPD_F (int) load_extension LDAP_P((const void *module, const char *file_name));
321 LIBSLAPD_F (char *) get_supported_extension LDAP_P((int index));
322
323 LIBSLAPD_F (int) load_extop LDAP_P((
324         const char *ext_oid,
325         SLAP_EXTOP_MAIN_FN ext_main ));
326
327 LIBSLAPD_F (int) extops_init LDAP_P(( void ));
328
329 LIBSLAPD_F (int) extops_kill LDAP_P(( void ));
330
331 LIBSLAPD_F (char *) get_supported_extop LDAP_P((int index));
332
333 /*
334  * filter.c
335  */
336
337 LIBSLAPD_F (int) get_filter LDAP_P((
338         Connection *conn,
339         BerElement *ber,
340         Filter **filt,
341         char **fstr,
342         const char **text ));
343
344 LIBSLAPD_F (void) filter_free LDAP_P(( Filter *f ));
345 LIBSLAPD_F (void) filter_print LDAP_P(( Filter *f ));
346
347 /*
348  * filterentry.c
349  */
350
351 LIBSLAPD_F (int) test_filter LDAP_P((
352         Backend *be, Connection *conn, Operation *op, Entry *e, Filter  *f ));
353
354 /*
355  * lock.c
356  */
357
358 LIBSLAPD_F (FILE *) lock_fopen LDAP_P(( const char *fname, const char *type, FILE **lfp ));
359 LIBSLAPD_F (int) lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
360
361
362 /*
363  * modify.c
364  *      should be relocated to separate file
365  */
366 LIBSLAPD_F( void ) slap_mod_free LDAP_P(( Modification *mod, int freeit ));
367 LIBSLAPD_F( void ) slap_mods_free LDAP_P(( Modifications *mods ));
368 LIBSLAPD_F( void ) slap_modlist_free LDAP_P(( LDAPModList *ml ));
369
370 LIBSLAPD_F( int ) slap_modlist2mods(
371         LDAPModList *ml,
372         int update,
373         Modifications **mods,
374         const char **text );
375
376 LIBSLAPD_F( int ) slap_mods_opattrs(
377         Operation *op,
378         Modifications **modlist,
379         const char **text );
380
381 /*
382  * module.c
383  */
384
385 #ifdef SLAPD_MODULES
386
387 LIBSLAPD_F (int) module_init LDAP_P(( void ));
388 LIBSLAPD_F (int) module_kill LDAP_P(( void ));
389
390 LIBSLAPD_F (int) load_null_module(
391         const void *module, const char *file_name);
392 LIBSLAPD_F (int) load_extop_module(
393         const void *module, const char *file_name);
394
395 LIBSLAPD_F (int) module_load LDAP_P((
396         const char* file_name,
397         int argc, char *argv[] ));
398 LIBSLAPD_F (int) module_path LDAP_P(( const char* path ));
399
400 LIBSLAPD_F (void) *module_resolve LDAP_P((
401         const void *module, const char *name));
402
403 #endif /* SLAPD_MODULES */
404
405 /*
406  * monitor.c
407  */
408 LIBSLAPD_F (char *) supportedControls[];
409
410 LIBSLAPD_F (int) monitor_info LDAP_P((
411         Entry **entry, const char **text ));
412
413 /*
414  * operation.c
415  */
416
417 LIBSLAPD_F (void) slap_op_free LDAP_P(( Operation *op ));
418 LIBSLAPD_F (Operation *) slap_op_alloc LDAP_P((
419         BerElement *ber, ber_int_t msgid,
420         ber_tag_t tag, ber_int_t id ));
421
422 LIBSLAPD_F (int) slap_op_add LDAP_P(( Operation **olist, Operation *op ));
423 LIBSLAPD_F (int) slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
424 LIBSLAPD_F (Operation *) slap_op_pop LDAP_P(( Operation **olist ));
425
426 /*
427  * phonetic.c
428  */
429
430 LIBSLAPD_F (char *) first_word LDAP_P(( char *s ));
431 LIBSLAPD_F (char *) next_word LDAP_P(( char *s ));
432 LIBSLAPD_F (char *) word_dup LDAP_P(( char *w ));
433 LIBSLAPD_F (char *) phonetic LDAP_P(( char *s ));
434
435 /*
436  * repl.c
437  */
438
439 LIBSLAPD_F (void) replog LDAP_P(( Backend *be, Operation *op, char *dn, void *change ));
440
441 /*
442  * result.c
443  */
444
445 LIBSLAPD_F (struct berval **) get_entry_referrals LDAP_P((
446         Backend *be, Connection *conn, Operation *op,
447         Entry *e ));
448
449 LIBSLAPD_F (void) send_ldap_result LDAP_P((
450         Connection *conn, Operation *op,
451         ber_int_t err, const char *matched, const char *text,
452         struct berval **refs,
453         LDAPControl **ctrls ));
454
455 LIBSLAPD_F (void) send_ldap_sasl LDAP_P((
456         Connection *conn, Operation *op,
457         ber_int_t err, const char *matched,
458         const char *text,
459         struct berval **refs,
460         LDAPControl **ctrls,
461         struct berval *cred ));
462
463 LIBSLAPD_F (void) send_ldap_disconnect LDAP_P((
464         Connection *conn, Operation *op,
465         ber_int_t err, const char *text ));
466
467 LIBSLAPD_F (void) send_ldap_extended LDAP_P((
468         Connection *conn, Operation *op,
469         ber_int_t err, const char *matched,
470         const char *text, struct berval **refs,
471         const char *rspoid, struct berval *rspdata,
472         LDAPControl **ctrls ));
473
474 LIBSLAPD_F (void) send_ldap_partial LDAP_P((
475         Connection *conn, Operation *op,
476         const char *rspoid, struct berval *rspdata,
477         LDAPControl **ctrls ));
478
479 LIBSLAPD_F (void) send_search_result LDAP_P((
480         Connection *conn, Operation *op,
481         ber_int_t err, const char *matched, const char *text,
482         struct berval **refs,
483         LDAPControl **ctrls,
484         int nentries ));
485
486 LIBSLAPD_F (int) send_search_reference LDAP_P((
487         Backend *be, Connection *conn, Operation *op,
488         Entry *e, struct berval **refs, int scope,
489         LDAPControl **ctrls,
490         struct berval ***v2refs ));
491
492 LIBSLAPD_F (int) send_search_entry LDAP_P((
493         Backend *be, Connection *conn, Operation *op,
494         Entry *e, char **attrs, int attrsonly,
495         LDAPControl **ctrls ));
496
497 LIBSLAPD_F (int) str2result LDAP_P(( char *s,
498         int *code, char **matched, char **info ));
499
500 /*
501  * sasl.c
502  */
503 LIBSLAPD_F (char **) supportedSASLMechanisms;
504
505 LIBSLAPD_F (int) sasl_init(void);
506 LIBSLAPD_F (int) sasl_destroy(void);
507 LIBSLAPD_F (int) sasl_errldap LDAP_P(( int ));
508 LIBSLAPD_F (int) sasl_bind LDAP_P((
509         Connection *conn, Operation *op, 
510         const char *dn, const char *ndn,
511         const char *mech, struct berval *cred,
512         char **edn ));
513
514 /* oc.c */
515 LIBSLAPD_F (int) oc_schema_info( Entry *e );
516
517 /* mr.c */
518 LIBSLAPD_F (int) mr_schema_info( Entry *e );
519
520 /* syntax.c */
521 LIBSLAPD_F (int) syn_schema_info( Entry *e );
522
523 /*
524  * schema.c
525  */
526
527 LIBSLAPD_F (ObjectClass *) oc_find LDAP_P((
528         const char *ocname));
529
530 LIBSLAPD_F (int) oc_add LDAP_P((
531         LDAP_OBJECT_CLASS *oc,
532         const char **err));
533
534 LIBSLAPD_F (int) is_object_subclass LDAP_P((
535         ObjectClass *sub,
536         ObjectClass *sup ));
537
538
539 LIBSLAPD_F (Syntax *) syn_find LDAP_P((const char *synname));
540 LIBSLAPD_F (Syntax *) syn_find_desc LDAP_P((const char *syndesc, int *slen));
541 #ifdef SLAPD_BINARY_CONVERSION
542 LIBSLAPD_F (int) syn_add LDAP_P((
543         LDAP_SYNTAX *syn,
544         unsigned flags,
545         slap_syntax_validate_func *validate,
546         slap_syntax_transform_func *normalize,
547         slap_syntax_transform_func *pretty,
548         slap_syntax_transform_func *ber2str,
549         slap_syntax_transform_func *str2ber,
550         const char **err));
551 #else
552 LIBSLAPD_F (int) syn_add LDAP_P((
553         LDAP_SYNTAX *syn,
554         unsigned flags,
555         slap_syntax_validate_func *validate,
556         slap_syntax_transform_func *normalize,
557         slap_syntax_transform_func *pretty,
558         const char **err));
559 #endif
560
561 LIBSLAPD_F (MatchingRule *) mr_find LDAP_P((const char *mrname));
562 LIBSLAPD_F (int) mr_add LDAP_P((LDAP_MATCHING_RULE *mr,
563         unsigned usage,
564         slap_mr_convert_func *convert,
565         slap_mr_normalize_func *normalize,
566         slap_mr_match_func *match,
567         slap_mr_indexer_func *indexer,
568         slap_mr_filter_func *filter,
569         const char **err));
570
571 LIBSLAPD_F (int) register_syntax LDAP_P((
572         char *desc,
573         unsigned flags,
574         slap_syntax_validate_func *validate,
575         slap_syntax_transform_func *ber2str,
576         slap_syntax_transform_func *str2ber ));
577
578 LIBSLAPD_F (int) register_matching_rule LDAP_P((
579         char * desc,
580         unsigned usage,
581         slap_mr_convert_func *convert,
582         slap_mr_normalize_func *normalize,
583         slap_mr_match_func *match,
584         slap_mr_indexer_func *indexer,
585         slap_mr_filter_func *filter     ));
586
587 LIBSLAPD_F (int) schema_info LDAP_P(( Entry **entry, const char **text ));
588
589 LIBSLAPD_F (int) is_entry_objectclass LDAP_P((
590         Entry *, ObjectClass *oc ));
591 #define is_entry_alias(e)               is_entry_objectclass((e), slap_schema.si_oc_alias)
592 #define is_entry_referral(e)    is_entry_objectclass((e), slap_schema.si_oc_referral)
593
594
595 /*
596  * schema_check.c
597  */
598 int oc_check_allowed(
599         AttributeType *type,
600         struct berval **oclist );
601 LIBSLAPD_F (int) entry_schema_check LDAP_P((
602         Entry *e, Attribute *attrs,
603         const char** text ));
604
605
606 /*
607  * schema_init.c
608  */
609 LIBSLAPD_F (int) schema_init LDAP_P((void));
610 LIBSLAPD_F (int) schema_prep LDAP_P((void));
611
612
613 /*
614  * schemaparse.c
615  */
616
617 LIBSLAPD_F (void) parse_oc_old LDAP_P(( Backend *be, const char *fname, int lineno, int argc, char **argv ));
618 LIBSLAPD_F (void) parse_oc LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
619 LIBSLAPD_F (void) parse_at LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
620 LIBSLAPD_F (void) parse_oidm LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
621 LIBSLAPD_F (char *) scherr2str LDAP_P((int code)) LDAP_GCCATTR((const));
622 LIBSLAPD_F (int) dscompare LDAP_P(( const char *s1, const char *s2del, char delim ));
623
624
625 /*
626  * starttls.c
627  */
628
629 LIBSLAPD_F (int) starttls_extop LDAP_P((
630         SLAP_EXTOP_CALLBACK_FN,
631         Connection *conn, Operation *op,
632         const char * reqoid,
633         struct berval * reqdata,
634         char ** rspoid,
635         struct berval ** rspdata,
636         LDAPControl ***rspctrls,
637         const char ** text,
638         struct berval *** refs ));
639
640
641 /*
642  * str2filter.c
643  */
644
645 LIBSLAPD_F (Filter *) str2filter LDAP_P(( const char *str ));
646
647 /*
648  * suffixalias.c
649  */
650 LIBSLAPD_F (char *) suffix_alias LDAP_P(( Backend *be, char *ndn ));
651
652 /*
653  * value.c
654  */
655 LIBSLAPD_F (int) value_normalize LDAP_P((
656         AttributeDescription *ad,
657         unsigned usage,
658         struct berval *in,
659         struct berval **out,
660         const char ** text ));
661 LIBSLAPD_F (int) value_match LDAP_P((
662         int *match,
663         AttributeDescription *ad,
664         MatchingRule *mr,
665         struct berval *v1,
666         void *v2,
667         const char ** text ));
668 LIBSLAPD_F (int) value_find LDAP_P((
669         AttributeDescription *ad,
670         struct berval **values,
671         struct berval *value ));
672 LIBSLAPD_F (int) value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
673
674 /*
675  * user.c
676  */
677 #if defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
678 LIBSLAPD_F (void) slap_init_user LDAP_P(( char *username, char *groupname ));
679 #endif
680
681 /*
682  * passwd.c
683  */
684 LIBSLAPD_F (int) passwd_extop LDAP_P((
685         SLAP_EXTOP_CALLBACK_FN,
686         Connection *conn, Operation *op,
687         const char * reqoid,
688         struct berval * reqdata,
689         char ** rspoid,
690         struct berval ** rspdata,
691         LDAPControl *** rspctrls,
692         const char ** text,
693         struct berval *** refs ));
694
695 LIBSLAPD_F (int) slap_passwd_check(
696         Attribute                       *attr,
697         struct berval           *cred );
698
699 LIBSLAPD_F (struct berval *) slap_passwd_generate( void );
700
701 LIBSLAPD_F (struct berval *) slap_passwd_hash(
702         struct berval           *cred );
703
704 LIBSLAPD_F (struct berval *) slap_passwd_return(
705         struct berval           *cred );
706
707 LIBSLAPD_F (int) slap_passwd_parse(
708         struct berval *reqdata,
709         struct berval **id,
710         struct berval **oldpass,
711         struct berval **newpass,
712         const char **text );
713
714 /*
715  * kerberos.c
716  */
717 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
718 extern char             *ldap_srvtab;
719 LIBSLAPD_F (int)        krbv4_ldap_auth();
720 #endif
721
722 /*
723  * Other...
724  */
725
726 LIBSLAPD_F (struct berval **)   default_referral;
727 LIBSLAPD_F (char *)             replogfile;
728 LIBSLAPD_F (const char)         Versionstr[];
729 LIBSLAPD_F (int)                defsize;
730 LIBSLAPD_F (int)                deftime;
731 LIBSLAPD_F (int)                g_argc;
732 LIBSLAPD_F (slap_access_t)      global_default_access;
733 LIBSLAPD_F (int)                global_readonly;
734 LIBSLAPD_F (int)                global_lastmod;
735 LIBSLAPD_F (int)                global_idletimeout;
736 LIBSLAPD_F (int)                global_schemacheck;
737 LIBSLAPD_F (char)               *global_realm;
738 LIBSLAPD_F (char)               *default_passwd_hash;
739 LIBSLAPD_F (int)                lber_debug;
740 LIBSLAPD_F (int)                ldap_syslog;
741
742 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    num_sent_mutex;
743 LIBSLAPD_F (long)               num_bytes_sent;
744 LIBSLAPD_F (long)               num_pdu_sent;
745 LIBSLAPD_F (long)               num_entries_sent;
746 LIBSLAPD_F (long)               num_refs_sent;
747
748 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    num_ops_mutex;
749 LIBSLAPD_F (long)               num_ops_completed;
750 LIBSLAPD_F (long)               num_ops_initiated;
751
752 LIBSLAPD_F (char *)             slapd_pid_file;
753 LIBSLAPD_F (char *)             slapd_args_file;
754 LIBSLAPD_F (char)               **g_argv;
755 LIBSLAPD_F (time_t)             starttime;
756
757 LIBSLAPD_F (time_t) slap_get_time LDAP_P((void));
758
759 LIBSLAPD_F (ldap_pvt_thread_pool_t)     connection_pool;
760
761 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    entry2str_mutex;
762 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    replog_mutex;
763
764 #ifdef SLAPD_CRYPT
765 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    crypt_mutex;
766 #endif
767 LIBSLAPD_F (ldap_pvt_thread_mutex_t)    gmtime_mutex;
768
769 LIBSLAPD_F (AccessControl *) global_acl;
770
771 LIBSLAPD_F (int)        slap_init LDAP_P((int mode, const char* name));
772 LIBSLAPD_F (int)        slap_startup LDAP_P(( Backend *be ));
773 LIBSLAPD_F (int)        slap_shutdown LDAP_P(( Backend *be ));
774 LIBSLAPD_F (int)        slap_destroy LDAP_P((void));
775
776 struct sockaddr_in;
777
778 LIBSLAPD_F (int) slapd_daemon_init( const char *urls );
779 LIBSLAPD_F (int) slapd_daemon_destroy(void);
780 LIBSLAPD_F (int) slapd_daemon(void);
781
782 LIBSLAPD_F (void) slapd_set_write LDAP_P((ber_socket_t s, int wake));
783 LIBSLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake));
784 LIBSLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));
785 LIBSLAPD_F (void) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
786
787 LIBSLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, int wake));
788
789 LIBSLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig));
790 LIBSLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
791
792 LIBSLAPD_F (int) config_info LDAP_P((
793         Entry **e, const char **text ));
794
795 LIBSLAPD_F (int) root_dse_info LDAP_P((
796         Entry **e, const char **text ));
797
798 LIBSLAPD_F (int) do_abandon LDAP_P((Connection *conn, Operation *op));
799 LIBSLAPD_F (int) do_add LDAP_P((Connection *conn, Operation *op));
800 LIBSLAPD_F (int) do_bind LDAP_P((Connection *conn, Operation *op));
801 LIBSLAPD_F (int) do_compare LDAP_P((Connection *conn, Operation *op));
802 LIBSLAPD_F (int) do_delete LDAP_P((Connection *conn, Operation *op));
803 LIBSLAPD_F (int) do_modify LDAP_P((Connection *conn, Operation *op));
804 LIBSLAPD_F (int) do_modrdn LDAP_P((Connection *conn, Operation *op));
805 LIBSLAPD_F (int) do_search LDAP_P((Connection *conn, Operation *op));
806 LIBSLAPD_F (int) do_unbind LDAP_P((Connection *conn, Operation *op));
807 LIBSLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op));
808
809
810 LIBSLAPD_F (ber_socket_t) dtblsize;
811
812 LDAP_END_DECL
813
814 #endif /* _proto_slap */
815