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