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