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 LDAP_P(( BackendDB *be, DB_TXN *tid,
56 struct berval *dn, EntryInfo **e, int matched,
57 u_int32_t locker, DB_LOCK *lock, void *ctx));
83 int bdb_dn2id_children(
98 int bdb_entry_return( Entry *e );
99 BI_entry_release_rw bdb_entry_release;
100 BI_entry_get_rw bdb_entry_get;
105 void bdb_errcall( const char *pfx, char * msg );
110 int bdb_filter_candidates(
120 int bdb_id2entry_add(
125 int bdb_id2entry_update(
130 int bdb_id2entry_delete(
141 void bdb_entry_free ( Entry *e );
146 #ifdef SLAP_IDL_CACHE
147 int bdb_idl_entry_cmp( const void*, const void* );
149 int bdb_idl_cache_get(
150 struct bdb_info *bdb,
157 struct bdb_info *bdb,
165 struct bdb_info *bdb,
170 unsigned bdb_idl_search( ID *ids, ID id );
177 int bdb_idl_fetch_key(
184 int bdb_idl_insert( ID *ids, ID id );
186 int bdb_idl_insert_key(
193 int bdb_idl_delete_key(
209 bdb_idl_intersection(
218 ID bdb_idl_first( ID *ids, ID *cursor );
219 ID bdb_idl_next( ID *ids, ID *cursor );
226 bdb_index_is_indexed LDAP_P((
228 AttributeDescription *desc ));
231 bdb_index_param LDAP_P((
233 AttributeDescription *desc,
237 struct berval *prefix ));
240 bdb_index_values LDAP_P((
243 AttributeDescription *desc,
248 int bdb_index_entry LDAP_P(( Operation *op, DB_TXN *t, int r, Entry *e ));
250 #define bdb_index_entry_add(be,t,e) \
251 bdb_index_entry((be),(t),SLAP_INDEX_ADD_OP,(e))
252 #define bdb_index_entry_del(be,t,e) \
253 bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e))
258 extern struct berval bdb_uuid;
283 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
284 int bdb_last_id( BackendDB *be, DB_TXN *tid );
289 int bdb_modify_internal(
292 Modifications *modlist,
301 BI_op_extended bdb_exop_passwd;
308 #define bdb_cache_entryinfo_lock(e) \
309 ldap_pvt_thread_mutex_lock( &(e)->bei_kids_mutex )
310 #define bdb_cache_entryinfo_unlock(e) \
311 ldap_pvt_thread_mutex_unlock( &(e)->bei_kids_mutex )
314 void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e,
315 int rw, DB_LOCK *lock );
317 #define bdb_cache_return_entry_rw( env, cache, e, rw, lock ) \
318 bdb_cache_entry_db_unlock( env, lock )
319 #define bdb_cache_return_entry( env, lock ) \
320 bdb_cache_entry_db_unlock( env, lock )
322 #define bdb_cache_return_entry_r(env, c, e, l) \
323 bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
324 #define bdb_cache_return_entry_w(env, c, e, l) \
325 bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
327 void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw );
329 #define bdb_unlocked_cache_return_entry_rw( a, b, c )
331 #define bdb_unlocked_cache_return_entry_r( c, e ) \
332 bdb_unlocked_cache_return_entry_rw((c), (e), 0)
333 #define bdb_unlocked_cache_return_entry_w( c, e ) \
334 bdb_unlocked_cache_return_entry_rw((c), (e), 1)
336 int bdb_cache_children(
342 struct bdb_info *bdb,
348 int bdb_cache_modrdn(
357 int bdb_cache_modify(
364 int bdb_cache_update_entry(
368 int bdb_cache_find_entry_ndn2id(
376 int bdb_cache_find_entry_id(
386 int bdb_cache_delete_entry(
393 void bdb_cache_release_all( Cache *cache );
399 BI_op_abandon bdb_abandon;
401 BI_op_cancel bdb_cancel;
403 #if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
411 #define bdb_psearch(op, rs, sop, e, ps_type) bdb_do_search(op, rs, sop, e, ps_type)
418 #ifdef LDAP_CLIENT_UPDATE
420 bdb_build_lcup_update_ctrl(
427 struct berval *latest_entrycsn_bv,
431 bdb_build_lcup_done_ctrl(
436 struct berval *latest_entrycsn_bv );
441 bdb_build_sync_state_ctrl(
445 int entry_sync_state,
449 struct berval *latest_entrycsn_bv );
452 bdb_build_sync_done_ctrl(
458 struct berval *latest_entrycsn_bv );
461 bdb_send_ldap_intermediate(
465 struct berval *cookie );
468 #ifdef BDB_REUSE_LOCKERS
470 int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
475 char *ebcdic_dberror( int rc );
477 #define db_strerror(x) ebcdic_dberror(x)
482 #endif /* _PROTO_BDB_H */