proto-slap.h 60.7 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
234
LDAP_SLAPD_F (const char *) at_syntax LDAP_P((
	AttributeType *at ));
235
LDAP_SLAPD_F (int) is_at_syntax LDAP_P((
236
237
238
	AttributeType *at,
	const char *oid ));

239
240
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
241
LDAP_SLAPD_F (void) at_delete LDAP_P(( AttributeType *at ));
242

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

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

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

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

261
262
263
#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
264
LDAP_SLAPD_F (Attribute *) attr_alloc LDAP_P(( AttributeDescription *ad ));
265
266
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
267
268
269
270
271
272
273
274
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 ));
275
276
277
278
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 ));
279
280
LDAP_SLAPD_F (int) attr_merge_normalize LDAP_P(( Entry *e,
	AttributeDescription *desc,
Howard Chu's avatar
Howard Chu committed
281
	BerVarray vals, void *memctx ));
282
283
LDAP_SLAPD_F (int) attr_merge_normalize_one LDAP_P(( Entry *e,
	AttributeDescription *desc,
Howard Chu's avatar
Howard Chu committed
284
	struct berval *val, void *memctx ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
285
286
287
288
289
290
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 ));
291

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

297

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

/*
 * backend.c
 */
315

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

319
320
321
322
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
323
LDAP_SLAPD_F (int) backend_startup_one LDAP_P((Backend *be));
324
LDAP_SLAPD_F (int) backend_sync LDAP_P((Backend *be));
325
326
LDAP_SLAPD_F (int) backend_shutdown LDAP_P((Backend *be));
LDAP_SLAPD_F (int) backend_destroy LDAP_P((void));
327
LDAP_SLAPD_F (void) backend_stopdown_one LDAP_P((BackendDB *bd ));
Howard Chu's avatar
Howard Chu committed
328
LDAP_SLAPD_F (void) backend_destroy_one LDAP_P((BackendDB *bd, int dynamic));
329

330
LDAP_SLAPD_F (BackendInfo *) backend_info LDAP_P(( const char *type ));
331
LDAP_SLAPD_F (BackendDB *) backend_db_init LDAP_P(( const char *type,
332
333
334
	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));
335

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

Kurt Zeilenga's avatar
Kurt Zeilenga committed
341
LDAP_SLAPD_F (int) be_issuffix LDAP_P(( Backend *be,
342
	struct berval *suffix ));
343
344
LDAP_SLAPD_F (int) be_isroot LDAP_P(( Operation *op ));
LDAP_SLAPD_F (int) be_isroot_dn LDAP_P(( Backend *be, struct berval *ndn ));
345
LDAP_SLAPD_F (int) be_isroot_pw LDAP_P(( Operation *op ));
346
347
348
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 ));
349
LDAP_SLAPD_F (int) be_isupdate_dn LDAP_P(( Backend *be, struct berval *ndn ));
350
LDAP_SLAPD_F (struct berval *) be_root_dn LDAP_P(( Backend *be ));
351
LDAP_SLAPD_F (int) be_entry_get_rw LDAP_P(( struct slap_op *o,
352
353
		struct berval *ndn, ObjectClass *oc,
		AttributeDescription *at, int rw, Entry **e ));
354
LDAP_SLAPD_F (int) be_entry_release_rw LDAP_P((
355
356
357
	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 )
358

359
360
361
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));
362

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

371
LDAP_SLAPD_F( int )	backend_check_referrals LDAP_P((
372
	Operation *op,
373
	SlapReply *rs ));
374

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

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

393
394
395
396
397
398
399
400
401
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 ));

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

407
408
LDAP_SLAPD_V(BackendInfo) slap_binfo[]; 

409
410
411
412
413
/*
 * backglue.c
 */

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

418
419
420
/*
 * backover.c
 */
Pierangelo Masarati's avatar
Pierangelo Masarati committed
421
LDAP_SLAPD_F (int) overlay_register LDAP_P(( slap_overinst *on ));
422
423
LDAP_SLAPD_F (int) overlay_config LDAP_P(( BackendDB *be, const char *ov,
	int idx, BackendInfo **res ));
424
425
426
LDAP_SLAPD_F (void) overlay_destroy_one LDAP_P((
	BackendDB *be,
	slap_overinst *on ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
427
428
429
430
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 ));
431
432
433
LDAP_SLAPD_F (int) overlay_register_control LDAP_P((
	BackendDB *be,
	const char *oid ));
434
435
436
437
438
439
LDAP_SLAPD_F (int) overlay_op_walk LDAP_P((
	Operation *op,
	SlapReply *rs,
	slap_operation_t which,
	slap_overinfo *oi,
	slap_overinst *on ));
440
441
442
443
444
445
446
447
448
449
450
451
452
LDAP_SLAPD_F (int) overlay_entry_get_ov LDAP_P((
	Operation *op,
	struct berval *dn,
	ObjectClass *oc,
	AttributeDescription *ad,
	int rw,
	Entry **e,
	slap_overinst *ov ));
LDAP_SLAPD_F (int) overlay_entry_release_ov LDAP_P((
	Operation *op,
	Entry *e,
	int rw,
	slap_overinst *ov ));
453
454
455
456
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 ));
457

458
459
460
461
/*
 * bconfig.c
 */
LDAP_SLAPD_F (int) slap_loglevel_register LDAP_P (( slap_mask_t m, struct berval *s ));
462
LDAP_SLAPD_F (int) slap_loglevel_get LDAP_P(( struct berval *s, int *l ));
463
LDAP_SLAPD_F (int) str2loglevel LDAP_P(( const char *s, int *l ));
464
465
466
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 ));
467
LDAP_SLAPD_F (int) loglevel_print LDAP_P(( FILE *out ));
468
469
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 ));
470

Kurt Zeilenga's avatar
Kurt Zeilenga committed
471
472
473
/*
 * ch_malloc.c
 */
Howard Chu's avatar
Howard Chu committed
474
LDAP_SLAPD_V (BerMemoryFunctions) ch_mfuncs;
475
476
477
478
479
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 * ));
480
481
482

#ifndef CH_FREE
#undef free
483
#define free ch_free
484
#endif
Kurt Zeilenga's avatar
Kurt Zeilenga committed
485

486
487
488
489
/*
 * component.c
 */
#ifdef LDAP_COMP_MATCH
490
491
struct comp_attribute_aliasing;

492
493
494
495
496
LDAP_SLAPD_F (int) test_comp_filter_entry LDAP_P((
	Operation* op,
	Entry* e,
	MatchingRuleAssertion* mr));

497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
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 ));

515
516
517
518
519
520
LDAP_SLAPD_F (int) get_comp_filter LDAP_P((
	Operation* op,
	BerValue* bv,
	ComponentFilter** filt,
	const char **text ));

521
522
523
524
525
526
527
528
529
530
531
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 ));

532
533
534
535
536
537
538
539
LDAP_SLAPD_F (int) componentFilterMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

540
541
542
543
544
545
546
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
547
548
549
550
551
552
553
554

LDAP_SLAPD_F (int) allComponentsMatch LDAP_P((
        int *matchp,
        slap_mask_t flags,
        Syntax *syntax,
        MatchingRule *mr,
        struct berval *value,
        void *assertedValue ));
555
556
557
558

LDAP_SLAPD_F (ComponentReference*) dup_comp_ref LDAP_P((
	Operation *op,
	ComponentReference *cr ));
Sang Seok Lim's avatar
Sang Seok Lim committed
559
                                                                          
560
561
562
LDAP_SLAPD_F (int) componentFilterValidate LDAP_P(( 
	Syntax *syntax,
	struct berval* bv ));
Sang Seok Lim's avatar
Sang Seok Lim committed
563
564
565
566

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

568
569
570
571
572
573
LDAP_SLAPD_F (void) component_free LDAP_P((
	ComponentFilter *f ));

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

574
575
576
577
LDAP_SLAPD_V (test_membership_func*) is_aliased_attribute;

LDAP_SLAPD_V (free_component_func*) component_destructor;

578
579
580
581
582
583
584
585
586
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;
587
588
#endif

589
590
591
/*
 * controls.c
 */
Howard Chu's avatar
Howard Chu committed
592
LDAP_SLAPD_V( struct slap_control_ids ) slap_cids;
593
594
595
LDAP_SLAPD_F (void) slap_free_ctrls LDAP_P((
	Operation *op,
	LDAPControl **ctrls ));
596
597
598
599
600
LDAP_SLAPD_F (int) slap_parse_ctrl LDAP_P((
	Operation *op,
	SlapReply *rs,
	LDAPControl *control,
	const char **text ));
601
LDAP_SLAPD_F (int) get_ctrls LDAP_P((
602
	Operation *op,
603
	SlapReply *rs,
604
	int senderrors ));
605
LDAP_SLAPD_F (int) register_supported_control2 LDAP_P((
606
607
608
	const char *controloid,
	slap_mask_t controlmask,
	char **controlexops,
Howard Chu's avatar
Howard Chu committed
609
	SLAP_CTRL_PARSE_FN *controlparsefn,
610
	unsigned flags,
Howard Chu's avatar
Howard Chu committed
611
	int *controlcid ));
612
613
#define register_supported_control(oid, mask, exops, fn, cid) \
	register_supported_control2((oid), (mask), (exops), (fn), 0, (cid))
614
615
616
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));
617
618
619
620
621
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 ((
622
	Operation *op, const char *oid, int *cid ));
623
624
625
626
627
LDAP_SLAPD_F (int) slap_remove_control LDAP_P((
	Operation	*op,
	SlapReply	*rs,
	int		ctrl,
	BI_chk_controls	fnc ));
628

Kurt Zeilenga's avatar
Kurt Zeilenga committed
629
630
631
/*
 * config.c
 */
632
LDAP_SLAPD_F (int) read_config LDAP_P(( const char *fname, const char *dir ));
Howard Chu's avatar
Howard Chu committed
633
LDAP_SLAPD_F (void) config_destroy LDAP_P ((void));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
634
LDAP_SLAPD_F (char **) slap_str2clist LDAP_P((
635
	char ***, char *, const char * ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
636
637
LDAP_SLAPD_F (int) bverb_to_mask LDAP_P((
	struct berval *bword,  slap_verbmasks *v ));
Howard Chu's avatar
Howard Chu committed
638
639
640
641
642
643
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 ));
644
645
LDAP_SLAPD_F (int) enum_to_verb LDAP_P((
	slap_verbmasks *v, slap_mask_t m, struct berval *bv ));
646
647
648
649
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 ));
650
651
652
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
653
654
655
656
LDAP_SLAPD_F (int) bindconf_tls_parse LDAP_P((
	const char *word,  slap_bindconf *bc ));
LDAP_SLAPD_F (int) bindconf_tls_unparse LDAP_P((
	slap_bindconf *bc, struct berval *bv ));
Howard Chu's avatar
Howard Chu committed
657
658
659
660
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
661
662
LDAP_SLAPD_F (int) bindconf_tls_set LDAP_P((
	slap_bindconf *bc, LDAP *ld ));
Howard Chu's avatar
Howard Chu committed
663
LDAP_SLAPD_F (void) bindconf_free LDAP_P(( slap_bindconf *bc ));
664
LDAP_SLAPD_F (int) slap_client_connect LDAP_P(( LDAP **ldp, slap_bindconf *sb ));
665
666
LDAP_SLAPD_F (int) config_generic_wrapper LDAP_P(( Backend *be,
	const char *fname, int lineno, int argc, char **argv ));
667
LDAP_SLAPD_F (char *) anlist_unparse LDAP_P(( AttributeName *, char *, ber_len_t buflen ));
Howard Chu's avatar
Howard Chu committed
668

669
670
671
672
#ifdef LDAP_SLAPI
LDAP_SLAPD_V (int) slapi_plugins_used;
#endif

Kurt Zeilenga's avatar
Kurt Zeilenga committed
673
674
675
/*
 * connection.c
 */
676
677
678
679
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
680

681
682
683
684
685
686
687
688
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 ));


689
LDAP_SLAPD_F (long) connection_init LDAP_P((
690
	ber_socket_t s,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
691
	Listener* url,
Kurt Zeilenga's avatar
Kurt Zeilenga committed
692
693
	const char* dnsname,
	const char* peername,
694
	int use_tls,
695
	slap_ssf_t ssf,
696
	struct berval *id ));
697

698
699
LDAP_SLAPD_F (void) connection_closing LDAP_P((
	Connection *c, const char *why ));
700
LDAP_SLAPD_F (int) connection_state_closing LDAP_P(( Connection *c ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
701
702
LDAP_SLAPD_F (const char *) connection_state2str LDAP_P(( int state ))
	LDAP_GCCATTR((const));
703

704
#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
Kurt Zeilenga's avatar
Kurt Zeilenga committed
705
LDAP_SLAPD_F (int) connection_read_activate LDAP_P((ber_socket_t s));
706
#else
707
LDAP_SLAPD_F (int) connection_read LDAP_P((ber_socket_t s));
708
#endif
709
LDAP_SLAPD_F (int) connection_write LDAP_P((ber_socket_t s));
710

711
LDAP_SLAPD_F (unsigned long) connections_nextid(void);
712

Kurt Zeilenga's avatar
Kurt Zeilenga committed
713
714
715
LDAP_SLAPD_F (Connection *) connection_first LDAP_P(( ber_socket_t * ));
LDAP_SLAPD_F (Connection *) connection_next LDAP_P((
	Connection *, ber_socket_t *));
716
LDAP_SLAPD_F (void) connection_done LDAP_P((Connection *));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
717

718
LDAP_SLAPD_F (void) connection2anonymous LDAP_P((Connection *));
Howard Chu's avatar
Howard Chu committed
719
720
721
722
LDAP_SLAPD_F (void) connection_fake_init LDAP_P((
	Connection *conn,
	Operation *op,
	void *threadctx ));
723
LDAP_SLAPD_F (void) connection_assign_nextid LDAP_P((Connection *));
724

725
726
727
728
/*
 * cr.c
 */
LDAP_SLAPD_F (int) cr_schema_info( Entry *e );
Howard Chu's avatar
Howard Chu committed
729
730
LDAP_SLAPD_F (void) cr_unparse LDAP_P((
	BerVarray *bva, ContentRule *start, ContentRule *end, int system ));
731
732
733
734

LDAP_SLAPD_F (int) cr_add LDAP_P((
	LDAPContentRule *oc,
	int user,
Howard Chu's avatar
Howard Chu committed
735
	ContentRule **scr,
736
	const char **err));
Howard Chu's avatar
Howard Chu committed
737

738
739
740
741
742
743
744
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
745
746
747
748
/*
 * ctxcsn.c
 */

749
LDAP_SLAPD_V( int ) slap_serverID;
750
751
LDAP_SLAPD_V( const struct berval ) slap_ldapsync_bv;
LDAP_SLAPD_V( const struct berval ) slap_ldapsync_cn_bv;
752
LDAP_SLAPD_F (void) slap_get_commit_csn LDAP_P((
753
	Operation *, struct berval *maxcsn ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
754
755
756
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
757
LDAP_SLAPD_F (int) slap_get_csn LDAP_P(( Operation *, struct berval *, int ));
758
LDAP_SLAPD_F (void) slap_queue_csn LDAP_P(( Operation *, struct berval * ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
759

Kurt Zeilenga's avatar
Kurt Zeilenga committed
760
/*
Kurt Zeilenga's avatar
Kurt Zeilenga committed
761
 * daemon.c
Kurt Zeilenga's avatar
Kurt Zeilenga committed
762
 */
763
LDAP_SLAPD_F (void) slapd_add_internal(ber_socket_t s, int isactive);
Kurt Zeilenga's avatar
Kurt Zeilenga committed
764
765
766
767
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));
768
769
LDAP_SLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, Sockbuf *sb,
	int wasactive, int wake, int locked ));
770
771
LDAP_SLAPD_F (void) slapd_sd_lock();
LDAP_SLAPD_F (void) slapd_sd_unlock();
Kurt Zeilenga's avatar
Kurt Zeilenga committed
772

Kurt Zeilenga's avatar
Kurt Zeilenga committed
773
774
LDAP_SLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig));
LDAP_SLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
775
LDAP_SLAPD_F (void) slap_wake_listener LDAP_P((void));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
776
777
778
779

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));
780
LDAP_SLAPD_F (int) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
781

782
783
784
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;
785
LDAP_SLAPD_V (const char *) slapd_slp_attrs;
786
LDAP_SLAPD_V (slap_ssf_t) local_ssf;
787
LDAP_SLAPD_V (struct runqueue_s) slapd_rq;
788

Kurt Zeilenga's avatar
Kurt Zeilenga committed
789
790
791
/*
 * dn.c
 */
792

793
#define dn_match(dn1, dn2) 	( ber_bvcmp((dn1), (dn2)) == 0 )
794
#define bvmatch(bv1, bv2)	( ((bv1)->bv_len == (bv2)->bv_len) && (memcmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0) )
795

796
797
798
LDAP_SLAPD_F (int) dnValidate LDAP_P((
	Syntax *syntax, 
	struct berval *val ));
799
800
801
LDAP_SLAPD_F (int) rdnValidate LDAP_P((
	Syntax *syntax, 
	struct berval *val ));
802

Howard Chu's avatar
Howard Chu committed
803
LDAP_SLAPD_F (slap_mr_normalize_func) dnNormalize;
804

805
806
LDAP_SLAPD_F (slap_mr_normalize_func) rdnNormalize;

Kurt Zeilenga's avatar
Kurt Zeilenga committed
807
LDAP_SLAPD_F (slap_syntax_transform_func) dnPretty;
808

809
810
LDAP_SLAPD_F (slap_syntax_transform_func) rdnPretty;

811
812
813
814
LDAP_SLAPD_F (int) dnPrettyNormal LDAP_P(( 
	Syntax *syntax, 
	struct berval *val, 
	struct berval *pretty,
Howard Chu's avatar
Howard Chu committed
815
816
	struct berval *normal,
	void *ctx ));
817

818
819
820
821
822
823
824
825
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
826
827
828
829
830
831
832
833
LDAP_SLAPD_F (int) dnRelativeMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

834
835
836
837
838
839
840
841
LDAP_SLAPD_F (int) rdnMatch LDAP_P(( 
	int *matchp, 
	slap_mask_t flags, 
	Syntax *syntax, 
	MatchingRule *mr,
	struct berval *value, 
	void *assertedValue ));

842

843
844
845
LDAP_SLAPD_F (int) dnIsSuffix LDAP_P((
	const struct berval *dn, const struct berval *suffix ));

846
847
LDAP_SLAPD_F (int) dnIsOneLevelRDN LDAP_P(( struct berval *rdn ));

848
LDAP_SLAPD_F (int) dnExtractRdn LDAP_P((
Howard Chu's avatar
Howard Chu committed
849
	struct berval *dn, struct berval *rdn, void *ctx ));
850

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

Pierangelo Masarati's avatar
Pierangelo Masarati committed
853
LDAP_SLAPD_F (ber_len_t) dn_rdnlen LDAP_P(( Backend *be, struct berval *dn ));
854
855
856
857

LDAP_SLAPD_F (void) build_new_dn LDAP_P((
	struct berval * new_dn,
	struct berval * parent_dn,
858
859
	struct berval * newrdn,
	void *memctx ));
860

861
LDAP_SLAPD_F (void) dnParent LDAP_P(( struct berval *dn, struct berval *pdn ));
862
LDAP_SLAPD_F (void) dnRdn LDAP_P(( struct berval *dn, struct berval *rdn ));
Pierangelo Masarati's avatar
Pierangelo Masarati committed
863

864
865
LDAP_SLAPD_F (int) dnX509normalize LDAP_P(( void *x509_name, struct berval *out ));

866
LDAP_SLAPD_F (int) dnX509peerNormalize LDAP_P(( void *ssl, struct berval *dn ));
867

Howard Chu's avatar
Howard Chu committed
868
869
870
871
872
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)
873

874
875
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 ));
876

Kurt Zeilenga's avatar
Kurt Zeilenga committed
877
878
879
/*
 * entry.c
 */
Howard Chu's avatar
Howard Chu committed
880
LDAP_SLAPD_V (const Entry) slap_entry_root;
881

Pierangelo Masarati's avatar
Pierangelo Masarati committed
882
LDAP_SLAPD_F (int) entry_init LDAP_P((void));
883
LDAP_SLAPD_F (int) entry_destroy LDAP_P((void));
884

885
LDAP_SLAPD_F (Entry *) str2entry LDAP_P(( char	*s ));
886
LDAP_SLAPD_F (Entry *) str2entry2 LDAP_P(( char	*s, int checkvals ));
887
LDAP_SLAPD_F (char *) entry2str LDAP_P(( Entry *e, int *len ));
Kurt Zeilenga's avatar
Kurt Zeilenga committed
888

889
890
891
892
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 ));

893
LDAP_SLAPD_F (int) entry_header LDAP_P(( EntryHeader *eh ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
894
895
#ifdef SLAP_ZONE_ALLOC
LDAP_SLAPD_F (int) entry_decode LDAP_P((
896
						EntryHeader *eh, Entry **e, void *ctx ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
897
898
#else
LDAP_SLAPD_F (int) entry_decode LDAP_P((
899
						EntryHeader *eh, Entry **e ));
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
900
#endif
901
LDAP_SLAPD_F (int) entry_encode LDAP_P(( Entry *e, struct berval *bv ));
902

903
LDAP_SLAPD_F (void) entry_clean LDAP_P(( Entry *e ));
904
LDAP_SLAPD_F (void) entry_free LDAP_P(( Entry *e ));
905
LDAP_SLAPD_F (int) entry_cmp LDAP_P(( Entry *a, Entry *b ));
906
907
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 ));
908
LDAP_SLAPD_F (Entry *) entry_dup LDAP_P(( Entry *e ));
909
LDAP_SLAPD_F (Entry *) entry_dup_bv LDAP_P(( Entry *e ));
910
911
LDAP_SLAPD_F (Entry *) entry_alloc LDAP_P((void));
LDAP_SLAPD_F (int) entry_prealloc LDAP_P((int num));
912

913
914
915
/*
 * extended.c
 */
916
917
LDAP_SLAPD_F (int) exop_root_dse_info LDAP_P ((Entry *e));

918
919
#define exop_is_write( op )	((op->ore_flags & SLAP_EXOP_WRITES) != 0)

Howard Chu's avatar
Howard Chu committed
920
921
922
923
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;
924
925
926
927
#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
928

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