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