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