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));
81 int bdb_dn2id_children(
96 int bdb_entry_return( Entry *e );
97 BI_entry_release_rw bdb_entry_release;
98 BI_entry_get_rw bdb_entry_get;
103 void bdb_errcall( const char *pfx, char * msg );
108 int bdb_filter_candidates(
118 int bdb_id2entry_add(
123 int bdb_id2entry_update(
128 int bdb_id2entry_delete(
139 void bdb_entry_free ( Entry *e );
144 #ifdef SLAP_IDL_CACHE
145 int bdb_idl_entry_cmp( const void*, const void* );
148 unsigned bdb_idl_search( ID *ids, ID id );
155 int bdb_idl_fetch_key(
162 int bdb_idl_insert( ID *ids, ID id );
164 int bdb_idl_insert_key(
171 int bdb_idl_delete_key(
187 bdb_idl_intersection(
196 ID bdb_idl_first( ID *ids, ID *cursor );
197 ID bdb_idl_next( ID *ids, ID *cursor );
204 bdb_index_is_indexed LDAP_P((
206 AttributeDescription *desc ));
209 bdb_index_param LDAP_P((
211 AttributeDescription *desc,
215 struct berval *prefix ));
218 bdb_index_values LDAP_P((
221 AttributeDescription *desc,
226 int bdb_index_entry LDAP_P(( Operation *op, DB_TXN *t, int r, Entry *e ));
228 #define bdb_index_entry_add(be,t,e) \
229 bdb_index_entry((be),(t),SLAP_INDEX_ADD_OP,(e))
230 #define bdb_index_entry_del(be,t,e) \
231 bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e))
236 extern struct berval bdb_uuid;
261 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
262 int bdb_last_id( BackendDB *be, DB_TXN *tid );
267 int bdb_modify_internal(
270 Modifications *modlist,
279 BI_op_extended bdb_exop_passwd;
286 #define bdb_cache_entryinfo_lock(e) \
287 ldap_pvt_thread_mutex_lock( &(e)->bei_kids_mutex )
288 #define bdb_cache_entryinfo_unlock(e) \
289 ldap_pvt_thread_mutex_unlock( &(e)->bei_kids_mutex )
292 void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e,
293 int rw, DB_LOCK *lock );
295 #define bdb_cache_return_entry_rw( env, cache, e, rw, lock ) \
296 bdb_cache_entry_db_unlock( env, lock )
297 #define bdb_cache_return_entry( env, lock ) \
298 bdb_cache_entry_db_unlock( env, lock )
300 #define bdb_cache_return_entry_r(env, c, e, l) \
301 bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
302 #define bdb_cache_return_entry_w(env, c, e, l) \
303 bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
305 void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw );
307 #define bdb_unlocked_cache_return_entry_rw( a, b, c )
309 #define bdb_unlocked_cache_return_entry_r( c, e ) \
310 bdb_unlocked_cache_return_entry_rw((c), (e), 0)
311 #define bdb_unlocked_cache_return_entry_w( c, e ) \
312 bdb_unlocked_cache_return_entry_rw((c), (e), 1)
314 struct bdb_info *bdb,
320 int bdb_cache_modrdn(
329 int bdb_cache_modify(
336 int bdb_cache_update_entry(
340 int bdb_cache_find_entry_ndn2id(
348 int bdb_cache_find_entry_id(
358 int bdb_cache_delete_entry(
365 void bdb_cache_release_all( Cache *cache );
371 BI_op_abandon bdb_abandon;
373 BI_op_cancel bdb_cancel;
375 #if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
383 #define bdb_psearch(op, rs, sop, e, ps_type) bdb_do_search(op, rs, sop, e, ps_type)
390 #ifdef LDAP_CLIENT_UPDATE
392 bdb_build_lcup_update_ctrl(
399 struct berval *latest_entrycsn_bv,
403 bdb_build_lcup_done_ctrl(
408 struct berval *latest_entrycsn_bv );
413 bdb_build_sync_state_ctrl(
417 int entry_sync_state,
421 struct berval *latest_entrycsn_bv );
424 bdb_build_sync_done_ctrl(
430 struct berval *latest_entrycsn_bv );
433 bdb_send_ldap_intermediate(
437 struct berval *cookie );
440 #ifdef BDB_REUSE_LOCKERS
442 int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
447 char *ebcdic_dberror( int rc );
449 #define db_strerror(x) ebcdic_dberror(x)
454 #endif /* _PROTO_BDB_H */