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