proto-slap.h 59.9 KB
Newer Older
1
/* $OpenLDAP$ */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
2
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
Kurt Zeilenga's avatar
Kurt Zeilenga committed
4
 * Copyright 1998-2007 The OpenLDAP Foundation.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */
/* Portions Copyright (c) 1995 Regents of the University of Michigan.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms are permitted
 * provided that this notice is preserved and that due credit is given
 * to the University of Michigan at Ann Arbor. The name of the University
 * may not be used to endorse or promote products derived from this
 * software without specific prior written permission. This software
 * is provided ``as is'' without express or implied warranty.
24
 */
Kurt Zeilenga's avatar
Kurt Zeilenga committed
25

Kurt Zeilenga's avatar
Kurt Zeilenga committed
26
27
#ifndef PROTO_SLAP_H
#define PROTO_SLAP_H
Kurt Zeilenga's avatar
Kurt Zeilenga committed
28

Kurt Zeilenga's avatar
Kurt Zeilenga committed
29
#include <ldap_cdefs.h>
30
#include "ldap_pvt.h"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
31

32
33
LDAP_BEGIN_DECL

34
35
struct config_args_s;	/* config.h */

36
37
38
39
/*
 * aci.c
 */
#ifdef SLAP_DYNACL
40
#ifdef SLAPD_ACI_ENABLED
41
42
LDAP_SLAPD_F (int) dynacl_aci_init LDAP_P(( void ));
#endif /* SLAPD_ACI_ENABLED */
43
#endif /* SLAP_DYNACL */
44

Kurt Zeilenga's avatar
Kurt Zeilenga committed
45
46
47
/*
 * acl.c
 */
Pierangelo Masarati's avatar
Pierangelo Masarati committed
48
LDAP_SLAPD_F (int) access_allowed_mask LDAP_P((
49
	Operation *op,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
50
	Entry *e, AttributeDescription *desc, struct berval *val,
51
	slap_access_t access,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
52
53
54
	AccessControlState *state,
	slap_mask_t *mask ));
#define access_allowed(op,e,desc,val,access,state) access_allowed_mask(op,e,desc,val,access,state,NULL)
Pierangelo Masarati's avatar
Pierangelo Masarati committed
55
56
57
58
59
60
61
62
LDAP_SLAPD_F (int) slap_access_allowed LDAP_P((
	Operation		*op,
	Entry			*e,
	AttributeDescription	*desc,
	struct berval		*val,
	slap_access_t		access,
	AccessControlState	*state,
	slap_mask_t		*maskp ));
63
64
65
66
67
68
69
70
71
LDAP_SLAPD_F (int) slap_access_always_allowed LDAP_P((
	Operation		*op,
	Entry			*e,
	AttributeDescription	*desc,
	struct berval		*val,
	slap_access_t		access,
	AccessControlState	*state,
	slap_mask_t		*maskp ));

Kurt Zeilenga's avatar
Kurt Zeilenga committed
72
LDAP_SLAPD_F (int) acl_check_modlist LDAP_P((
73
	Operation *op, Entry *e, Modifications *ml ));
74

75
LDAP_SLAPD_F (void) acl_append( AccessControl **l, AccessControl *a, int pos );
Kurt Zeilenga's avatar
Kurt Zeilenga committed
76

Pierangelo Masarati's avatar
Pierangelo Masarati committed
77
78
79
80
81
82
#ifdef SLAP_DYNACL
LDAP_SLAPD_F (int) slap_dynacl_register LDAP_P(( slap_dynacl_t *da ));
LDAP_SLAPD_F (slap_dynacl_t *) slap_dynacl_get LDAP_P(( const char *name ));
#endif /* SLAP_DYNACL */
LDAP_SLAPD_F (int) acl_init LDAP_P(( void ));

83
84
85
86
87
88
89
90
91
LDAP_SLAPD_F (int) acl_get_part LDAP_P((
	struct berval	*list,
	int		ix,
	char		sep,
	struct berval	*bv ));
LDAP_SLAPD_F (int) acl_match_set LDAP_P((
	struct berval *subj,
	Operation *op,
	Entry *e,
92
	struct berval *default_set_attribute ));
93
94
95
96
LDAP_SLAPD_F (int) acl_string_expand LDAP_P((
	struct berval *newbuf, struct berval *pattern,
	char *match, int nmatch, regmatch_t *matches ));

Kurt Zeilenga's avatar
Kurt Zeilenga committed
97
98
99
/*
 * aclparse.c
 */
100
101
LDAP_SLAPD_V (char *) style_strings[];

102
LDAP_SLAPD_F (int) parse_acl LDAP_P(( Backend *be,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
103
	const char *fname, int lineno,
104
	int argc, char **argv, int pos ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
105
106
107
108
109

LDAP_SLAPD_F (char *) access2str LDAP_P(( slap_access_t access ));
LDAP_SLAPD_F (slap_access_t) str2access LDAP_P(( const char *str ));

#define ACCESSMASK_MAXLEN	sizeof("unknown (+wrscan)")
110
LDAP_SLAPD_F (char *) accessmask2str LDAP_P(( slap_mask_t mask, char*, int debug ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
111
LDAP_SLAPD_F (slap_mask_t) str2accessmask LDAP_P(( const char *str ));
112
LDAP_SLAPD_F (void) acl_unparse LDAP_P(( AccessControl*, struct berval* ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
113
114
LDAP_SLAPD_F (void) acl_destroy LDAP_P(( AccessControl*, AccessControl* ));
LDAP_SLAPD_F (void) acl_free LDAP_P(( AccessControl *a ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
115

Pierangelo Masarati's avatar
Pierangelo Masarati committed
116

Kurt Zeilenga's avatar
Kurt Zeilenga committed
117
118
119
/*
 * ad.c
 */
120
LDAP_SLAPD_F (int) slap_str2ad LDAP_P((
121
122
	const char *,
	AttributeDescription **ad,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
123
	const char **text ));
124

125
LDAP_SLAPD_F (int) slap_bv2ad LDAP_P((
126
127
	struct berval *bv,
	AttributeDescription **ad,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
128
	const char **text ));
129

Kurt Zeilenga's avatar
Kurt Zeilenga committed
130
131
LDAP_SLAPD_F (void) ad_destroy LDAP_P(( AttributeDescription * ));

132
133
#define ad_cmp(l,r)	(((l)->ad_cname.bv_len < (r)->ad_cname.bv_len) \
	? -1 : (((l)->ad_cname.bv_len > (r)->ad_cname.bv_len) \
Pierangelo Masarati's avatar
Pierangelo Masarati committed
134
		? 1 : strcasecmp((l)->ad_cname.bv_val, (r)->ad_cname.bv_val )))
135

136
LDAP_SLAPD_F (int) is_ad_subtype LDAP_P((
137
138
139
	AttributeDescription *sub,
	AttributeDescription *super ));

140
LDAP_SLAPD_F (int) ad_inlist LDAP_P((
141
	AttributeDescription *desc,
142
	AttributeName *attrs ));
143

144
145
146
LDAP_SLAPD_F (int) slap_str2undef_ad LDAP_P((
	const char *,
	AttributeDescription **ad,
147
148
	const char **text,
	unsigned proxied ));
149
150
151
152

LDAP_SLAPD_F (int) slap_bv2undef_ad LDAP_P((
	struct berval *bv,
	AttributeDescription **ad,
153
154
155
	const char **text,
	unsigned proxied ));

156
157
158
159
LDAP_SLAPD_F (AttributeDescription *) slap_bv2tmp_ad LDAP_P((
	struct berval *bv,
	void *memctx ));

160
161
162
LDAP_SLAPD_F (int) slap_ad_undef_promote LDAP_P((
	char *name,
	AttributeType *nat ));
163

164
LDAP_SLAPD_F (AttributeDescription *) ad_find_tags LDAP_P((
165
	AttributeType *type,
166
	struct berval *tags ));
167

168
LDAP_SLAPD_F (AttributeName *) str2anlist LDAP_P(( AttributeName *an,
169
	char *str, const char *brkstr ));
170
171
172
173
174
175
LDAP_SLAPD_F (char **) anlist2charray_x LDAP_P((
									AttributeName *an, int dup, void *ctx ));
LDAP_SLAPD_F (char **) anlist2charray LDAP_P(( AttributeName *an, int dup ));
LDAP_SLAPD_F (char **) anlist2attrs LDAP_P(( AttributeName *anlist ));
LDAP_SLAPD_F (AttributeName *) file2anlist LDAP_P((
                        AttributeName *, const char *, const char * ));
176
LDAP_SLAPD_F (int) an_find LDAP_P(( AttributeName *a, struct berval *s ));
177
178
LDAP_SLAPD_F (int) ad_define_option LDAP_P(( const char *name,
	const char *fname, int lineno ));
179
LDAP_SLAPD_F (void) ad_unparse_options LDAP_P(( BerVarray *res ));
180

Kurt Zeilenga's avatar
Kurt Zeilenga committed
181
182
183
184
LDAP_SLAPD_F (MatchingRule *) ad_mr(
	AttributeDescription *ad,
	unsigned usage );

185
186
187
188
189
LDAP_SLAPD_V( AttributeName * ) slap_anlist_no_attrs;
LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_user_attributes;
LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_operational_attributes;
LDAP_SLAPD_V( AttributeName * ) slap_anlist_all_attributes;

190
191
192
193
/*
 * add.c
 */
LDAP_SLAPD_F (int) slap_mods2entry LDAP_P(( Modifications *mods, Entry **e,
194
	int initial, int dup, const char **text, char *textbuf, size_t textlen ));
195
196

LDAP_SLAPD_F (int) slap_entry2mods LDAP_P(( Entry *e,
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
197
198
						Modifications **mods, const char **text,
						char *textbuf, size_t textlen ));
Howard Chu's avatar
Howard Chu committed
199
200
201
202
203
204
LDAP_SLAPD_F( int ) slap_add_opattrs(
	Operation *op,
	const char **text,
	char *textbuf, size_t textlen,
	int manage_ctxcsn );

205

206
207
208
/*
 * at.c
 */
Howard Chu's avatar
Howard Chu committed
209
LDAP_SLAPD_V(int) at_oc_cache;
Kurt Zeilenga's avatar
Kurt Zeilenga committed
210
211
212
213
214
LDAP_SLAPD_F (void) at_config LDAP_P((
	const char *fname, int lineno,
	int argc, char **argv ));
LDAP_SLAPD_F (AttributeType *) at_find LDAP_P((
	const char *name ));
215
216
LDAP_SLAPD_F (AttributeType *) at_bvfind LDAP_P((
	struct berval *name ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
217
218
219
220
221
222
LDAP_SLAPD_F (int) at_find_in_list LDAP_P((
	AttributeType *sat, AttributeType **list ));
LDAP_SLAPD_F (int) at_append_to_list LDAP_P((
	AttributeType *sat, AttributeType ***listp ));
LDAP_SLAPD_F (int) at_delete_from_list LDAP_P((
	int pos, AttributeType ***listp ));
223
LDAP_SLAPD_F (int) at_schema_info LDAP_P(( Entry *e ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
224
LDAP_SLAPD_F (int) at_add LDAP_P((
Howard Chu's avatar
Howard Chu committed
225
	LDAPAttributeType *at, int user,
226
	AttributeType **sat, AttributeType *prev, const char **err ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
227
LDAP_SLAPD_F (void) at_destroy LDAP_P(( void ));
228

229
LDAP_SLAPD_F (int) is_at_subtype LDAP_P((
230
231
232
	AttributeType *sub,
	AttributeType *super ));

233
LDAP_SLAPD_F (int) is_at_syntax LDAP_P((
234
235
236
	AttributeType *at,
	const char *oid ));

237
238
LDAP_SLAPD_F (int) at_start LDAP_P(( AttributeType **at ));
LDAP_SLAPD_F (int) at_next LDAP_P(( AttributeType **at ));
Howard Chu's avatar
Howard Chu committed
239
LDAP_SLAPD_F (void) at_delete LDAP_P(( AttributeType *at ));
240

Howard Chu's avatar
Howard Chu committed
241
242
243
LDAP_SLAPD_F (void) at_unparse LDAP_P((
	BerVarray *bva, AttributeType *start, AttributeType *end, int system ));

244
245
246
247
248
LDAP_SLAPD_F (int) register_at LDAP_P((
	char *at,
	AttributeDescription **ad,
	int dupok ));

Kurt Zeilenga's avatar
Kurt Zeilenga committed
249
250
251
/*
 * attr.c
 */
252
253
LDAP_SLAPD_F (void) attr_free LDAP_P(( Attribute *a ));
LDAP_SLAPD_F (Attribute *) attr_dup LDAP_P(( Attribute *a ));
254

255
256
257
258
#ifdef LDAP_COMP_MATCH
LDAP_SLAPD_F (void) comp_tree_free LDAP_P(( Attribute *a ));
#endif

259
260
261
#define attr_mergeit( e, d, v ) attr_merge( e, d, v, NULL /* FIXME */ )
#define attr_mergeit_one( e, d, v ) attr_merge_one( e, d, v, NULL /* FIXME */ )

Howard Chu's avatar
Howard Chu committed
262
LDAP_SLAPD_F (Attribute *) attr_alloc LDAP_P(( AttributeDescription *ad ));
263
264
LDAP_SLAPD_F (Attribute *) attrs_alloc LDAP_P(( int num ));
LDAP_SLAPD_F (int) attr_prealloc LDAP_P(( int num ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
265
266
267
268
269
270
271
272
LDAP_SLAPD_F (int) attr_merge LDAP_P(( Entry *e,
	AttributeDescription *desc,
	BerVarray vals,
	BerVarray nvals ));
LDAP_SLAPD_F (int) attr_merge_one LDAP_P(( Entry *e,
	AttributeDescription *desc,
	struct berval *val,
	struct berval *nval ));
273
274
275
276
LDAP_SLAPD_F (int) attr_normalize LDAP_P(( AttributeDescription *desc,
	BerVarray vals, BerVarray *nvalsp, void *memctx ));
LDAP_SLAPD_F (int) attr_normalize_one LDAP_P(( AttributeDescription *desc,
	struct berval *val, struct berval *nval, void *memctx ));
277
278
LDAP_SLAPD_F (int) attr_merge_normalize LDAP_P(( Entry *e,
	AttributeDescription *desc,
Howard Chu's avatar
Howard Chu committed
279
	BerVarray vals, void *memctx ));
280
281
LDAP_SLAPD_F (int) attr_merge_normalize_one LDAP_P(( Entry *e,
	AttributeDescription *desc,
Howard Chu's avatar
Howard Chu committed
282
	struct berval *val, void *memctx ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
283
284
285
286
287
288
LDAP_SLAPD_F (Attribute *) attrs_find LDAP_P((
	Attribute *a, AttributeDescription *desc ));
LDAP_SLAPD_F (Attribute *) attr_find LDAP_P((
	Attribute *a, AttributeDescription *desc ));
LDAP_SLAPD_F (int) attr_delete LDAP_P((
	Attribute **attrs, AttributeDescription *desc ));
289

290
291
LDAP_SLAPD_F (void) attrs_free LDAP_P(( Attribute *a ));
LDAP_SLAPD_F (Attribute *) attrs_dup LDAP_P(( Attribute *a ));
292
293
LDAP_SLAPD_F (int) attr_init LDAP_P(( void ));
LDAP_SLAPD_F (int) attr_destroy LDAP_P(( void ));
294

295

Kurt Zeilenga's avatar
Kurt Zeilenga committed
296
297
298
/*
 * ava.c
 */
299
LDAP_SLAPD_F (int) get_ava LDAP_P((
300
	Operation *op,
301
	BerElement *ber,
302
	Filter *f,
303
	unsigned usage,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
304
	const char **text ));
305
LDAP_SLAPD_F (void) ava_free LDAP_P((
306
	Operation *op,
307
308
	AttributeAssertion *ava,
	int freeit ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
309
310
311
312

/*
 * backend.c
 */
313

Luke Howard's avatar
Luke Howard committed
314
315
#define be_match( be1, be2 )	( (be1) == (be2) || \
				  ( (be1) && (be2) && (be1)->be_nsuffix == (be2)->be_nsuffix ) )
316

317
318
319
320
LDAP_SLAPD_F (int) backend_init LDAP_P((void));
LDAP_SLAPD_F (int) backend_add LDAP_P((BackendInfo *aBackendInfo));
LDAP_SLAPD_F (int) backend_num LDAP_P((Backend *be));
LDAP_SLAPD_F (int) backend_startup LDAP_P((Backend *be));
Howard Chu's avatar
Howard Chu committed
321
LDAP_SLAPD_F (int) backend_startup_one LDAP_P((Backend *be));
322
LDAP_SLAPD_F (int) backend_sync LDAP_P((Backend *be));
323
324
LDAP_SLAPD_F (int) backend_shutdown LDAP_P((Backend *be));
LDAP_SLAPD_F (int) backend_destroy LDAP_P((void));
325
LDAP_SLAPD_F (void) backend_stopdown_one LDAP_P((BackendDB *bd ));
Howard Chu's avatar
Howard Chu committed
326
LDAP_SLAPD_F (void) backend_destroy_one LDAP_P((BackendDB *bd, int dynamic));
327

328
LDAP_SLAPD_F (BackendInfo *) backend_info LDAP_P(( const char *type ));
329
LDAP_SLAPD_F (BackendDB *) backend_db_init LDAP_P(( const char *type,
330
331
332
	BackendDB *be, int idx ));
LDAP_SLAPD_F (void) backend_db_insert LDAP_P((BackendDB *bd, int idx));
LDAP_SLAPD_F (void) backend_db_move LDAP_P((BackendDB *bd, int idx));
333

334
LDAP_SLAPD_F (BackendDB *) select_backend LDAP_P((
335
	struct berval * dn,
336
337
	int manageDSAit,
	int noSubordinates ));
338

Kurt Zeilenga's avatar
Kurt Zeilenga committed
339
LDAP_SLAPD_F (int) be_issuffix LDAP_P(( Backend *be,
340
	struct berval *suffix ));
341
342
LDAP_SLAPD_F (int) be_isroot LDAP_P(( Operation *op ));
LDAP_SLAPD_F (int) be_isroot_dn LDAP_P(( Backend *be, struct berval *ndn ));
343
LDAP_SLAPD_F (int) be_isroot_pw LDAP_P(( Operation *op ));
344
345
346
LDAP_SLAPD_F (int) be_slurp_update LDAP_P(( Operation *op ));
#define be_isupdate( op ) be_slurp_update( (op) )
LDAP_SLAPD_F (int) be_shadow_update LDAP_P(( Operation *op ));
347
LDAP_SLAPD_F (int) be_isupdate_dn LDAP_P(( Backend *be, struct berval *ndn ));
348
LDAP_SLAPD_F (struct berval *) be_root_dn LDAP_P(( Backend *be ));
349
LDAP_SLAPD_F (int) be_entry_get_rw LDAP_P(( struct slap_op *o,
350
351
		struct berval *ndn, ObjectClass *oc,
		AttributeDescription *at, int rw, Entry **e ));
352
LDAP_SLAPD_F (int) be_entry_release_rw LDAP_P((
353
354
355
	Operation *o, Entry *e, int rw ));
#define be_entry_release_r( o, e ) be_entry_release_rw( o, e, 0 )
#define be_entry_release_w( o, e ) be_entry_release_rw( o, e, 1 )
356

357
358
359
LDAP_SLAPD_F (int) backend_unbind LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) backend_connection_init LDAP_P((Connection *conn));
LDAP_SLAPD_F (int) backend_connection_destroy LDAP_P((Connection *conn));
360

361
362
363
LDAP_SLAPD_F( int ) backend_check_controls LDAP_P((
	Operation *op,
	SlapReply *rs ));
364
LDAP_SLAPD_F( int )	backend_check_restrictions LDAP_P((
365
	Operation *op,
366
367
	SlapReply *rs,
	struct berval *opdata ));
368

369
LDAP_SLAPD_F( int )	backend_check_referrals LDAP_P((
370
	Operation *op,
371
	SlapReply *rs ));
372

373
LDAP_SLAPD_F (int) backend_group LDAP_P((
374
	Operation *op,
375
	Entry *target,
376
	struct berval *gr_ndn,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
377
	struct berval *op_ndn,
378
379
	ObjectClass *group_oc,
	AttributeDescription *group_at
380
));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
381

382
LDAP_SLAPD_F (int) backend_attribute LDAP_P((
383
384
	Operation *op,
	Entry *target,
385
	struct berval *entry_ndn,
386
	AttributeDescription *entry_at,
387
388
	BerVarray *vals,
	slap_access_t access
389
390
));

391
392
393
394
395
396
397
398
399
LDAP_SLAPD_F (int) backend_access LDAP_P((
	Operation		*op,
	Entry			*target,
	struct berval		*edn,
	AttributeDescription	*entry_at,
	struct berval		*nval,
	slap_access_t		access,
	slap_mask_t		*mask ));

400
LDAP_SLAPD_F (int) backend_operational LDAP_P((
401
	Operation *op,
402
403
	SlapReply *rs 
));
404

405
406
LDAP_SLAPD_V(BackendInfo) slap_binfo[]; 

407
408
409
410
411
/*
 * backglue.c
 */

LDAP_SLAPD_F (int) glue_sub_init( void );
412
LDAP_SLAPD_F (int) glue_sub_attach( void );
413
414
415
LDAP_SLAPD_F (int) glue_sub_add( BackendDB *be, int advert, int online );
LDAP_SLAPD_F (int) glue_sub_del( BackendDB *be );

416
417
418
/*
 * backover.c
 */
Pierangelo Masarati's avatar
Pierangelo Masarati committed
419
LDAP_SLAPD_F (int) overlay_register LDAP_P(( slap_overinst *on ));
420
421
LDAP_SLAPD_F (int) overlay_config LDAP_P(( BackendDB *be, const char *ov,
	int idx, BackendInfo **res ));
422
423
424
LDAP_SLAPD_F (void) overlay_destroy_one LDAP_P((
	BackendDB *be,
	slap_overinst *on ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
425
426
427
428
LDAP_SLAPD_F (slap_overinst *) overlay_next LDAP_P(( slap_overinst *on ));
LDAP_SLAPD_F (slap_overinst *) overlay_find LDAP_P(( const char *name ));
LDAP_SLAPD_F (int) overlay_is_over LDAP_P(( BackendDB *be ));
LDAP_SLAPD_F (int) overlay_is_inst LDAP_P(( BackendDB *be, const char *name ));
429
430
431
LDAP_SLAPD_F (int) overlay_register_control LDAP_P((
	BackendDB *be,
	const char *oid ));
432
433
434
435
436
437
LDAP_SLAPD_F (int) overlay_op_walk LDAP_P((
	Operation *op,
	SlapReply *rs,
	slap_operation_t which,
	slap_overinfo *oi,
	slap_overinst *on ));
438
439
440
441
LDAP_SLAPD_F (void) overlay_insert LDAP_P((
	BackendDB *be, slap_overinst *on, slap_overinst ***prev, int idx ));
LDAP_SLAPD_F (void) overlay_move LDAP_P((
	BackendDB *be, slap_overinst *on, int idx ));
442

443
444
445
446
/*
 * bconfig.c
 */
LDAP_SLAPD_F (int) slap_loglevel_register LDAP_P (( slap_mask_t m, struct berval *s ));
447
LDAP_SLAPD_F (int) slap_loglevel_get LDAP_P(( struct berval *s, int *l ));
448
LDAP_SLAPD_F (int) str2loglevel LDAP_P(( const char *s, int *l ));
449
450
451
LDAP_SLAPD_F (int) loglevel2bvarray LDAP_P(( int l, BerVarray *bva ));
LDAP_SLAPD_F (const char *) loglevel2str LDAP_P(( int l ));
LDAP_SLAPD_F (int) loglevel2bv LDAP_P(( int l, struct berval *bv ));
452
LDAP_SLAPD_F (int) loglevel_print LDAP_P(( FILE *out ));
453
454
LDAP_SLAPD_F (int) slap_cf_aux_table_parse LDAP_P(( const char *word, void *bc, slap_cf_aux_table *tab0, LDAP_CONST char *tabmsg ));
LDAP_SLAPD_F (int) slap_cf_aux_table_unparse LDAP_P(( void *bc, struct berval *bv, slap_cf_aux_table *tab0 ));
455

Kurt Zeilenga's avatar
Kurt Zeilenga committed
456
457
458
/*
 * ch_malloc.c
 */
Howard Chu's avatar
Howard Chu committed
459
LDAP_SLAPD_V (BerMemoryFunctions) ch_mfuncs;
460
461
462
463
464
LDAP_SLAPD_F (void *) ch_malloc LDAP_P(( ber_len_t size ));
LDAP_SLAPD_F (void *) ch_realloc LDAP_P(( void *block, ber_len_t size ));
LDAP_SLAPD_F (void *) ch_calloc LDAP_P(( ber_len_t nelem, ber_len_t size ));
LDAP_SLAPD_F (char *) ch_strdup LDAP_P(( const char *string ));
LDAP_SLAPD_F (void) ch_free LDAP_P(( void * ));
465
466
467

#ifndef CH_FREE
#undef free
468
#define free ch_free
469
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
470

471
472
473
474
/*
 * component.c
 */
#ifdef LDAP_COMP_MATCH
475
476
struct comp_attribute_aliasing;

477
478
479
480
481
LDAP_SLAPD_F (int) test_comp_filter_entry LDAP_P((
	Operation* op,
	Entry* e,
	MatchingRuleAssertion* mr));

482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
LDAP_SLAPD_F (int) dup_comp_filter LDAP_P((
	Operation* op,
	struct berval *bv,
	ComponentFilter *in_f,
	ComponentFilter **out_f ));

LDAP_SLAPD_F (int) get_aliased_filter_aa LDAP_P((
	Operation* op,
	AttributeAssertion* a_assert,
	struct comp_attribute_aliasing* aa,
	const char** text ));

LDAP_SLAPD_F (int) get_aliased_filter LDAP_P((
	Operation* op,
	MatchingRuleAssertion* ma,
	struct comp_attribute_aliasing* aa,
	const char** text ));

500
501
502
503
504
505
LDAP_SLAPD_F (int) get_comp_filter LDAP_P((
	Operation* op,
	BerValue* bv,
	ComponentFilter** filt,
	const char **text ));

506
507
508
509
510
511
512
513
514
515
516
LDAP_SLAPD_F (int) insert_component_reference LDAP_P((
	ComponentReference *cr,
	ComponentReference** cr_list ));

LDAP_SLAPD_F (int) is_component_reference LDAP_P((
	char *attr ));

LDAP_SLAPD_F (int) extract_component_reference LDAP_P((
	char* attr,
	ComponentReference** cr ));

517
518
519
520
521
522
523
524
LDAP_SLAPD_F (int) componentFilterMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

525
526
527
528
529
530
531
LDAP_SLAPD_F (int) directoryComponentsMatch LDAP_P((
        int *matchp,
        slap_mask_t flags,
        Syntax *syntax,
        MatchingRule *mr,
        struct berval *value,
        void *assertedValue ));
Sang Seok Lim's avatar
Sang Seok Lim committed
532
533
534
535
536
537
538
539

LDAP_SLAPD_F (int) allComponentsMatch LDAP_P((
        int *matchp,
        slap_mask_t flags,
        Syntax *syntax,
        MatchingRule *mr,
        struct berval *value,
        void *assertedValue ));
540
541
542
543

LDAP_SLAPD_F (ComponentReference*) dup_comp_ref LDAP_P((
	Operation *op,
	ComponentReference *cr ));
Sang Seok Lim's avatar
Sang Seok Lim committed
544
                                                                          
545
546
547
LDAP_SLAPD_F (int) componentFilterValidate LDAP_P(( 
	Syntax *syntax,
	struct berval* bv ));
Sang Seok Lim's avatar
Sang Seok Lim committed
548
549
550
551

LDAP_SLAPD_F (int) allComponentsValidate LDAP_P((
        Syntax *syntax,
        struct berval* bv ));
552

553
554
555
556
557
558
LDAP_SLAPD_F (void) component_free LDAP_P((
	ComponentFilter *f ));

LDAP_SLAPD_F (void) free_ComponentData LDAP_P((
	Attribute *a ));

559
560
561
562
LDAP_SLAPD_V (test_membership_func*) is_aliased_attribute;

LDAP_SLAPD_V (free_component_func*) component_destructor;

563
564
565
566
567
568
569
570
571
LDAP_SLAPD_V (get_component_info_func*) get_component_description;

LDAP_SLAPD_V (component_encoder_func*) component_encoder;

LDAP_SLAPD_V (convert_attr_to_comp_func*) attr_converter;

LDAP_SLAPD_V (alloc_nibble_func*) nibble_mem_allocator;

LDAP_SLAPD_V (free_nibble_func*) nibble_mem_free;
572
573
#endif

574
575
576
/*
 * controls.c
 */
Howard Chu's avatar
Howard Chu committed
577
LDAP_SLAPD_V( struct slap_control_ids ) slap_cids;
578
579
580
LDAP_SLAPD_F (void) slap_free_ctrls LDAP_P((
	Operation *op,
	LDAPControl **ctrls ));
581
582
583
584
585
LDAP_SLAPD_F (int) slap_parse_ctrl LDAP_P((
	Operation *op,
	SlapReply *rs,
	LDAPControl *control,
	const char **text ));
586
LDAP_SLAPD_F (int) get_ctrls LDAP_P((
587
	Operation *op,
588
	SlapReply *rs,
589
	int senderrors ));
590
LDAP_SLAPD_F (int) register_supported_control2 LDAP_P((
591
592
593
	const char *controloid,
	slap_mask_t controlmask,
	char **controlexops,
Howard Chu's avatar
Howard Chu committed
594
	SLAP_CTRL_PARSE_FN *controlparsefn,
595
	unsigned flags,
Howard Chu's avatar
Howard Chu committed
596
	int *controlcid ));
597
598
#define register_supported_control(oid, mask, exops, fn, cid) \
	register_supported_control2((oid), (mask), (exops), (fn), 0, (cid))
599
600
601
LDAP_SLAPD_F (int) slap_controls_init LDAP_P ((void));
LDAP_SLAPD_F (void) controls_destroy LDAP_P ((void));
LDAP_SLAPD_F (int) controls_root_dse_info LDAP_P ((Entry *e));
602
603
604
605
606
LDAP_SLAPD_F (int) get_supported_controls LDAP_P ((
	char ***ctrloidsp, slap_mask_t **ctrlmasks ));
LDAP_SLAPD_F (int) slap_find_control_id LDAP_P ((
	const char *oid, int *cid ));
LDAP_SLAPD_F (int) slap_global_control LDAP_P ((
607
	Operation *op, const char *oid, int *cid ));
608
609
610
611
612
LDAP_SLAPD_F (int) slap_remove_control LDAP_P((
	Operation	*op,
	SlapReply	*rs,
	int		ctrl,
	BI_chk_controls	fnc ));
613

Kurt Zeilenga's avatar
Kurt Zeilenga committed
614
615
616
/*
 * config.c
 */
617
LDAP_SLAPD_F (int) read_config LDAP_P(( const char *fname, const char *dir ));
Howard Chu's avatar
Howard Chu committed
618
LDAP_SLAPD_F (void) config_destroy LDAP_P ((void));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
619
LDAP_SLAPD_F (char **) slap_str2clist LDAP_P((
620
	char ***, char *, const char * ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
621
622
LDAP_SLAPD_F (int) bverb_to_mask LDAP_P((
	struct berval *bword,  slap_verbmasks *v ));
Howard Chu's avatar
Howard Chu committed
623
624
625
626
627
628
LDAP_SLAPD_F (int) verb_to_mask LDAP_P((
	const char *word,  slap_verbmasks *v ));
LDAP_SLAPD_F (int) verbs_to_mask LDAP_P((
	int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m ));
LDAP_SLAPD_F (int) mask_to_verbs LDAP_P((
	slap_verbmasks *v, slap_mask_t m, BerVarray *bva ));
629
630
LDAP_SLAPD_F (int) enum_to_verb LDAP_P((
	slap_verbmasks *v, slap_mask_t m, struct berval *bv ));
631
632
633
634
LDAP_SLAPD_F (int) slap_verbmasks_init LDAP_P(( slap_verbmasks **vp, slap_verbmasks *v ));
LDAP_SLAPD_F (int) slap_verbmasks_destroy LDAP_P(( slap_verbmasks *v ));
LDAP_SLAPD_F (int) slap_verbmasks_append LDAP_P(( slap_verbmasks **vp,
	slap_mask_t m, struct berval *v, slap_mask_t *ignore ));
635
636
637
LDAP_SLAPD_F (int) slap_tls_get_config LDAP_P((
	LDAP *ld, int opt, char **val ));
LDAP_SLAPD_F (void) bindconf_tls_defaults LDAP_P(( slap_bindconf *bc ));
Howard Chu's avatar
Howard Chu committed
638
639
640
641
LDAP_SLAPD_F (int) bindconf_parse LDAP_P((
	const char *word,  slap_bindconf *bc ));
LDAP_SLAPD_F (int) bindconf_unparse LDAP_P((
	slap_bindconf *bc, struct berval *bv ));
Howard Chu's avatar
Howard Chu committed
642
643
LDAP_SLAPD_F (int) bindconf_tls_set LDAP_P((
	slap_bindconf *bc, LDAP *ld ));
Howard Chu's avatar
Howard Chu committed
644
LDAP_SLAPD_F (void) bindconf_free LDAP_P(( slap_bindconf *bc ));
645
LDAP_SLAPD_F (int) slap_client_connect LDAP_P(( LDAP **ldp, slap_bindconf *sb ));
646
647
LDAP_SLAPD_F (int) config_generic_wrapper LDAP_P(( Backend *be,
	const char *fname, int lineno, int argc, char **argv ));
648
LDAP_SLAPD_F (char *) anlist_unparse LDAP_P(( AttributeName *, char *, ber_len_t buflen ));
Howard Chu's avatar
Howard Chu committed
649

650
651
652
653
#ifdef LDAP_SLAPI
LDAP_SLAPD_V (int) slapi_plugins_used;
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
654
655
656
/*
 * connection.c
 */
657
658
659
660
LDAP_SLAPD_F (int) connections_init LDAP_P((void));
LDAP_SLAPD_F (int) connections_shutdown LDAP_P((void));
LDAP_SLAPD_F (int) connections_destroy LDAP_P((void));
LDAP_SLAPD_F (int) connections_timeout_idle LDAP_P((time_t));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
661

662
663
664
665
666
667
668
669
LDAP_SLAPD_F (int) connection_client_setup LDAP_P((
	ber_socket_t s,
	ldap_pvt_thread_start_t *func,
	void *arg ));
LDAP_SLAPD_F (void) connection_client_enable LDAP_P(( ber_socket_t s ));
LDAP_SLAPD_F (void) connection_client_stop LDAP_P(( ber_socket_t s ));


670
LDAP_SLAPD_F (long) connection_init LDAP_P((
671
	ber_socket_t s,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
672
	Listener* url,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
673
674
	const char* dnsname,
	const char* peername,
675
	int use_tls,
676
	slap_ssf_t ssf,
677
	struct berval *id ));
678

679
680
LDAP_SLAPD_F (void) connection_closing LDAP_P((
	Connection *c, const char *why ));
681
LDAP_SLAPD_F (int) connection_state_closing LDAP_P(( Connection *c ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
682
683
LDAP_SLAPD_F (const char *) connection_state2str LDAP_P(( int state ))
	LDAP_GCCATTR((const));
684

685
#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
Kurt Zeilenga's avatar
Kurt Zeilenga committed
686
LDAP_SLAPD_F (int) connection_read_activate LDAP_P((ber_socket_t s));
687
#else
688
LDAP_SLAPD_F (int) connection_read LDAP_P((ber_socket_t s));
689
#endif
690
LDAP_SLAPD_F (int) connection_write LDAP_P((ber_socket_t s));
691

692
LDAP_SLAPD_F (unsigned long) connections_nextid(void);
693

Kurt Zeilenga's avatar
Kurt Zeilenga committed
694
695
696
LDAP_SLAPD_F (Connection *) connection_first LDAP_P(( ber_socket_t * ));
LDAP_SLAPD_F (Connection *) connection_next LDAP_P((
	Connection *, ber_socket_t *));
697
LDAP_SLAPD_F (void) connection_done LDAP_P((Connection *));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
698

699
LDAP_SLAPD_F (void) connection2anonymous LDAP_P((Connection *));
Howard Chu's avatar
Howard Chu committed
700
701
702
703
LDAP_SLAPD_F (void) connection_fake_init LDAP_P((
	Connection *conn,
	Operation *op,
	void *threadctx ));
704
LDAP_SLAPD_F (void) connection_assign_nextid LDAP_P((Connection *));
705

706
707
708
709
/*
 * cr.c
 */
LDAP_SLAPD_F (int) cr_schema_info( Entry *e );
Howard Chu's avatar
Howard Chu committed
710
711
LDAP_SLAPD_F (void) cr_unparse LDAP_P((
	BerVarray *bva, ContentRule *start, ContentRule *end, int system ));
712
713
714
715

LDAP_SLAPD_F (int) cr_add LDAP_P((
	LDAPContentRule *oc,
	int user,
Howard Chu's avatar
Howard Chu committed
716
	ContentRule **scr,
717
	const char **err));
Howard Chu's avatar
Howard Chu committed
718

719
720
721
722
723
724
725
LDAP_SLAPD_F (void) cr_destroy LDAP_P(( void ));

LDAP_SLAPD_F (ContentRule *) cr_find LDAP_P((
	const char *crname));
LDAP_SLAPD_F (ContentRule *) cr_bvfind LDAP_P((
	struct berval *crname));

Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
726
727
728
729
/*
 * ctxcsn.c
 */

730
731
LDAP_SLAPD_V( const struct berval ) slap_ldapsync_bv;
LDAP_SLAPD_V( const struct berval ) slap_ldapsync_cn_bv;
732
LDAP_SLAPD_F (void) slap_get_commit_csn LDAP_P((
733
	Operation *, struct berval *maxcsn ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
734
735
736
LDAP_SLAPD_F (void) slap_rewind_commit_csn LDAP_P(( Operation * ));
LDAP_SLAPD_F (void) slap_graduate_commit_csn LDAP_P(( Operation * ));
LDAP_SLAPD_F (Entry *) slap_create_context_csn_entry LDAP_P(( Backend *, struct berval *));
Howard Chu's avatar
Howard Chu committed
737
LDAP_SLAPD_F (int) slap_get_csn LDAP_P(( Operation *, struct berval *, int ));
738
LDAP_SLAPD_F (void) slap_queue_csn LDAP_P(( Operation *, struct berval * ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
739

Kurt Zeilenga's avatar
Kurt Zeilenga committed
740
/*
Kurt Zeilenga's avatar
Kurt Zeilenga committed
741
 * daemon.c
Kurt Zeilenga's avatar
Kurt Zeilenga committed
742
 */
743
LDAP_SLAPD_F (void) slapd_add_internal(ber_socket_t s, int isactive);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
744
745
746
747
LDAP_SLAPD_F (int) slapd_daemon_init( const char *urls );
LDAP_SLAPD_F (int) slapd_daemon_destroy(void);
LDAP_SLAPD_F (int) slapd_daemon(void);
LDAP_SLAPD_F (Listener **)	slapd_get_listeners LDAP_P((void));
748
749
LDAP_SLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, Sockbuf *sb,
	int wasactive, int wake, int locked ));
750
751
LDAP_SLAPD_F (void) slapd_sd_lock();
LDAP_SLAPD_F (void) slapd_sd_unlock();
Kurt Zeilenga's avatar
Kurt Zeilenga committed
752

Kurt Zeilenga's avatar
Kurt Zeilenga committed
753
754
LDAP_SLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig));
LDAP_SLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
755
LDAP_SLAPD_F (void) slap_wake_listener LDAP_P((void));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
756
757
758
759

LDAP_SLAPD_F (void) slapd_set_write LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake));
LDAP_SLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));
760
LDAP_SLAPD_F (int) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
761

762
763
764
LDAP_SLAPD_V (volatile sig_atomic_t) slapd_abrupt_shutdown;
LDAP_SLAPD_V (volatile sig_atomic_t) slapd_shutdown;
LDAP_SLAPD_V (int) slapd_register_slp;
765
LDAP_SLAPD_V (const char *) slapd_slp_attrs;
766
LDAP_SLAPD_V (slap_ssf_t) local_ssf;
767
LDAP_SLAPD_V (struct runqueue_s) slapd_rq;
768

Kurt Zeilenga's avatar
Kurt Zeilenga committed
769
770
771
/*
 * dn.c
 */
772

773
#define dn_match(dn1, dn2) 	( ber_bvcmp((dn1), (dn2)) == 0 )
774
#define bvmatch(bv1, bv2)	( ((bv1)->bv_len == (bv2)->bv_len) && (memcmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0) )
775

776
777
778
LDAP_SLAPD_F (int) dnValidate LDAP_P((
	Syntax *syntax, 
	struct berval *val ));
779
780
781
LDAP_SLAPD_F (int) rdnValidate LDAP_P((
	Syntax *syntax, 
	struct berval *val ));
782

Howard Chu's avatar
Howard Chu committed
783
LDAP_SLAPD_F (slap_mr_normalize_func) dnNormalize;
784

785
786
LDAP_SLAPD_F (slap_mr_normalize_func) rdnNormalize;

Kurt Zeilenga's avatar
Kurt Zeilenga committed
787
LDAP_SLAPD_F (slap_syntax_transform_func) dnPretty;
788

789
790
LDAP_SLAPD_F (slap_syntax_transform_func) rdnPretty;

791
792
793
794
LDAP_SLAPD_F (int) dnPrettyNormal LDAP_P(( 
	Syntax *syntax, 
	struct berval *val, 
	struct berval *pretty,
Howard Chu's avatar
Howard Chu committed
795
796
	struct berval *normal,
	void *ctx ));
797

798
799
800
801
802
803
804
805
LDAP_SLAPD_F (int) dnMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

Kurt Zeilenga's avatar
Kurt Zeilenga committed
806
807
808
809
810
811
812
813
LDAP_SLAPD_F (int) dnRelativeMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

814
815
816
817
818
819
820
821
LDAP_SLAPD_F (int) rdnMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

822

823
824
825
LDAP_SLAPD_F (int) dnIsSuffix LDAP_P((
	const struct berval *dn, const struct berval *suffix ));

826
827
LDAP_SLAPD_F (int) dnIsOneLevelRDN LDAP_P(( struct berval *rdn ));

828
LDAP_SLAPD_F (int) dnExtractRdn LDAP_P((
Howard Chu's avatar
Howard Chu committed
829
	struct berval *dn, struct berval *rdn, void *ctx ));
830

831
LDAP_SLAPD_F (int) rdn_validate LDAP_P(( struct berval * rdn ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
832

Pierangelo Masarati's avatar
Pierangelo Masarati committed
833
LDAP_SLAPD_F (ber_len_t) dn_rdnlen LDAP_P(( Backend *be, struct berval *dn ));
834
835
836
837

LDAP_SLAPD_F (void) build_new_dn LDAP_P((
	struct berval * new_dn,
	struct berval * parent_dn,
838
839
	struct berval * newrdn,
	void *memctx ));
840

841
LDAP_SLAPD_F (void) dnParent LDAP_P(( struct berval *dn, struct berval *pdn ));
842
LDAP_SLAPD_F (void) dnRdn LDAP_P(( struct berval *dn, struct berval *rdn ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
843

844
845
LDAP_SLAPD_F (int) dnX509normalize LDAP_P(( void *x509_name, struct berval *out ));

846
LDAP_SLAPD_F (int) dnX509peerNormalize LDAP_P(( void *ssl, struct berval *dn ));
847

Howard Chu's avatar
Howard Chu committed
848
849
850
851
852
LDAP_SLAPD_F (int) dnPrettyNormalDN LDAP_P(( Syntax *syntax, struct berval *val, LDAPDN *dn, int flags, void *ctx ));
#define dnPrettyDN(syntax, val, dn, ctx) \
	dnPrettyNormalDN((syntax),(val),(dn), SLAP_LDAPDN_PRETTY, ctx)
#define dnNormalDN(syntax, val, dn, ctx) \
	dnPrettyNormalDN((syntax),(val),(dn), 0, ctx)
853

854
855
typedef int (SLAP_CERT_MAP_FN) LDAP_P(( void *ssl, struct berval *dn ));
LDAP_SLAPD_F (int) register_certificate_map_function LDAP_P(( SLAP_CERT_MAP_FN *fn ));
856

Kurt Zeilenga's avatar
Kurt Zeilenga committed
857
858
859
/*
 * entry.c
 */
Howard Chu's avatar
Howard Chu committed
860
LDAP_SLAPD_V (const Entry) slap_entry_root;
861

Pierangelo Masarati's avatar
Pierangelo Masarati committed
862
LDAP_SLAPD_F (int) entry_init LDAP_P((void));
863
LDAP_SLAPD_F (int) entry_destroy LDAP_P((void));
864

865
LDAP_SLAPD_F (Entry *) str2entry LDAP_P(( char	*s ));
866
LDAP_SLAPD_F (Entry *) str2entry2 LDAP_P(( char	*s, int checkvals ));
867
LDAP_SLAPD_F (char *) entry2str LDAP_P(( Entry *e, int *len ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
868

869
870
871
872
LDAP_SLAPD_F (ber_len_t) entry_flatsize LDAP_P(( Entry *e, int norm ));
LDAP_SLAPD_F (void) entry_partsize LDAP_P(( Entry *e, ber_len_t *len,
	int *nattrs, int *nvals, int norm ));

873
LDAP_SLAPD_F (int) entry_header LDAP_P(( EntryHeader *eh ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
874
875
#ifdef SLAP_ZONE_ALLOC
LDAP_SLAPD_F (int) entry_decode LDAP_P((
876
						EntryHeader *eh, Entry **e, void *ctx ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
877
878
#else
LDAP_SLAPD_F (int) entry_decode LDAP_P((
879
						EntryHeader *eh, Entry **e ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
880
#endif
881
LDAP_SLAPD_F (int) entry_encode LDAP_P(( Entry *e, struct berval *bv ));
882

883
LDAP_SLAPD_F (void) entry_clean LDAP_P(( Entry *e ));
884
LDAP_SLAPD_F (void) entry_free LDAP_P(( Entry *e ));
885
LDAP_SLAPD_F (int) entry_cmp LDAP_P(( Entry *a, Entry *b ));
886
887
LDAP_SLAPD_F (int) entry_dn_cmp LDAP_P(( const void *v_a, const void *v_b ));
LDAP_SLAPD_F (int) entry_id_cmp LDAP_P(( const void *v_a, const void *v_b ));
888
LDAP_SLAPD_F (Entry *) entry_dup LDAP_P(( Entry *e ));
889
LDAP_SLAPD_F (Entry *) entry_dup_bv LDAP_P(( Entry *e ));
890
891
LDAP_SLAPD_F (Entry *) entry_alloc LDAP_P((void));
LDAP_SLAPD_F (int) entry_prealloc LDAP_P((int num));
892

893
894
895
/*
 * extended.c
 */
896
897
LDAP_SLAPD_F (int) exop_root_dse_info LDAP_P ((Entry *e));

898
899
#define exop_is_write( op )	((op->ore_flags & SLAP_EXOP_WRITES) != 0)

Howard Chu's avatar
Howard Chu committed
900
901
902
903
LDAP_SLAPD_V( const struct berval ) slap_EXOP_CANCEL;
LDAP_SLAPD_V( const struct berval ) slap_EXOP_WHOAMI;
LDAP_SLAPD_V( const struct berval ) slap_EXOP_MODIFY_PASSWD;
LDAP_SLAPD_V( const struct berval ) slap_EXOP_START_TLS;
904
905
906
907
#ifdef LDAP_X_TXN
LDAP_SLAPD_V( const struct berval ) slap_EXOP_TXN_START;
LDAP_SLAPD_V( const struct berval ) slap_EXOP_TXN_END;
#endif
908

909
typedef int (SLAP_EXTOP_MAIN_FN) LDAP_P(( Operation *op, SlapReply *rs ));
910

911
typedef int (SLAP_EXTOP_GETOID_FN) LDAP_P((
912
	int index, struct berval *oid, int blen ));
913

914
LDAP_SLAPD_F (int) load_extop2 LDAP_P((
915
	const struct berval *ext_oid,
916
	slap_mask_t flags,
Pierangelo Masarati's avatar