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