3 * Copyright 2000-2003 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
15 Entry *bdb_deref_internal_r LDAP_P((
23 #define deref_entry_r( be, e, err, matched, text ) \
24 bdb_deref_internal_r( be, e, NULL, err, matched, text )
25 #define deref_dn_r( be, dn, err, matched, text ) \
26 bdb_deref_internal_r( be, NULL, dn, err, matched, text)
32 void bdb_attr_mask( struct bdb_info *bdb,
33 AttributeDescription *desc,
34 slap_mask_t *indexmask );
36 int bdb_attr_index_config LDAP_P(( struct bdb_info *bdb,
37 const char *fname, int lineno,
38 int argc, char **argv ));
40 void bdb_attr_index_destroy LDAP_P(( Avlnode *tree ));
55 int bdb_dn2entry_rw LDAP_P(( BackendDB *be, DB_TXN *tid,
56 struct berval *dn, Entry **e, Entry **matched, int flags, int rw,
57 u_int32_t locker, DB_LOCK *lock));
58 #define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) \
59 bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock)
60 #define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) \
61 bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock)
73 int bdb_dn2id_matched(
93 int bdb_dn2id_children(
109 int bdb_entry_return( Entry *e );
110 BI_entry_release_rw bdb_entry_release;
111 BI_entry_get_rw bdb_entry_get;
116 void bdb_errcall( const char *pfx, char * msg );
121 int bdb_filter_candidates(
131 int bdb_id2entry_add(
136 int bdb_id2entry_update(
141 int bdb_id2entry_delete(
154 #define bdb_id2entry_r(be, tid, id, e, locker, lock) \
155 bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock)
156 #define bdb_id2entry_w(be, tid, id, e, locker, lock) \
157 bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock)
159 void bdb_entry_free ( Entry *e );
164 #ifdef SLAP_IDL_CACHE
165 int bdb_idl_entry_cmp( const void*, const void* );
168 unsigned bdb_idl_search( ID *ids, ID id );
175 int bdb_idl_fetch_key(
182 int bdb_idl_insert( ID *ids, ID id );
184 int bdb_idl_insert_key(
191 int bdb_idl_delete_key(
207 bdb_idl_intersection(
216 ID bdb_idl_first( ID *ids, ID *cursor );
217 ID bdb_idl_next( ID *ids, ID *cursor );
224 bdb_index_is_indexed LDAP_P((
226 AttributeDescription *desc ));
229 bdb_index_param LDAP_P((
231 AttributeDescription *desc,
235 struct berval *prefix ));
238 bdb_index_values LDAP_P((
241 AttributeDescription *desc,
246 int bdb_index_entry LDAP_P(( Backend *be, DB_TXN *t, int r, Entry *e ));
248 #define bdb_index_entry_add(be,t,e) \
249 bdb_index_entry((be),(t),SLAP_INDEX_ADD_OP,(e))
250 #define bdb_index_entry_del(be,t,e) \
251 bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e))
256 extern struct berval bdb_uuid;
281 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
282 int bdb_last_id( BackendDB *be, DB_TXN *tid );
287 int bdb_modify_internal(
290 Modifications *modlist,
299 BI_op_extended bdb_exop_passwd;
306 void bdb_cache_entry_commit( Entry *e );
307 void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e,
308 int rw, DB_LOCK *lock );
309 #define bdb_cache_return_entry_r(env, c, e, l) \
310 bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
311 #define bdb_cache_return_entry_w(env, c, e, l) \
312 bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
313 void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw );
314 #define bdb_unlocked_cache_return_entry_r( c, e ) \
315 bdb_unlocked_cache_return_entry_rw((c), (e), 0)
316 #define bdb_unlocked_cache_return_entry_w( c, e ) \
317 bdb_unlocked_cache_return_entry_rw((c), (e), 1)
318 int bdb_cache_add_entry_rw(
326 int bdb_cache_update_entry(
330 ID bdb_cache_find_entry_ndn2id(
335 Entry* bdb_cache_find_entry_id(
343 int bdb_cache_delete_entry(
347 void bdb_cache_release_all( Cache *cache );
353 BI_op_abandon bdb_abandon;
355 BI_op_cancel bdb_cancel;
357 #if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
365 #define bdb_psearch(op, rs, sop, e, ps_type) bdb_do_search(op, rs, sop, e, ps_type)
372 #ifdef LDAP_CLIENT_UPDATE
374 bdb_build_lcup_update_ctrl(
381 struct berval *latest_entrycsn_bv,
385 bdb_build_lcup_done_ctrl(
390 struct berval *latest_entrycsn_bv );
395 bdb_build_sync_state_ctrl(
399 int entry_sync_state,
403 struct berval *latest_entrycsn_bv );
406 bdb_build_sync_done_ctrl(
412 struct berval *latest_entrycsn_bv );
415 bdb_send_ldap_intermediate(
419 struct berval *cookie );
422 #ifdef BDB_REUSE_LOCKERS
424 int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
429 char *ebcdic_dberror( int rc );
431 #define db_strerror(x) ebcdic_dberror(x)
436 #endif /* _PROTO_BDB_H */