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