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