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