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