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(
99 int bdb_entry_return( Entry *e );
100 BI_entry_release_rw bdb_entry_release;
101 BI_entry_get_rw bdb_entry_get;
106 void bdb_errcall( const char *pfx, char * msg );
111 int bdb_filter_candidates(
121 int bdb_id2entry_add(
126 int bdb_id2entry_update(
131 int bdb_id2entry_delete(
142 void bdb_entry_free ( Entry *e );
147 #ifdef SLAP_IDL_CACHE
148 int bdb_idl_entry_cmp( const void*, const void* );
150 int bdb_idl_cache_get(
151 struct bdb_info *bdb,
158 struct bdb_info *bdb,
166 struct bdb_info *bdb,
171 unsigned bdb_idl_search( ID *ids, ID id );
178 int bdb_idl_fetch_key(
185 int bdb_idl_insert( ID *ids, ID id );
187 int bdb_idl_insert_key(
194 int bdb_idl_delete_key(
210 bdb_idl_intersection(
219 ID bdb_idl_first( ID *ids, ID *cursor );
220 ID bdb_idl_next( ID *ids, ID *cursor );
227 bdb_index_is_indexed LDAP_P((
229 AttributeDescription *desc ));
232 bdb_index_param LDAP_P((
234 AttributeDescription *desc,
238 struct berval *prefix ));
241 bdb_index_values LDAP_P((
244 AttributeDescription *desc,
249 int bdb_index_entry LDAP_P(( Operation *op, DB_TXN *t, int r, Entry *e ));
251 #define bdb_index_entry_add(be,t,e) \
252 bdb_index_entry((be),(t),SLAP_INDEX_ADD_OP,(e))
253 #define bdb_index_entry_del(be,t,e) \
254 bdb_index_entry((be),(t),SLAP_INDEX_DELETE_OP,(e))
259 extern struct berval bdb_uuid;
284 int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
285 int bdb_last_id( BackendDB *be, DB_TXN *tid );
290 int bdb_modify_internal(
293 Modifications *modlist,
302 BI_op_extended bdb_exop_passwd;
309 #define bdb_cache_entryinfo_lock(e) \
310 ldap_pvt_thread_mutex_lock( &(e)->bei_kids_mutex )
311 #define bdb_cache_entryinfo_unlock(e) \
312 ldap_pvt_thread_mutex_unlock( &(e)->bei_kids_mutex )
315 void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e,
316 int rw, DB_LOCK *lock );
318 #define bdb_cache_return_entry_rw( env, cache, e, rw, lock ) \
319 bdb_cache_entry_db_unlock( env, lock )
320 #define bdb_cache_return_entry( env, lock ) \
321 bdb_cache_entry_db_unlock( env, lock )
323 #define bdb_cache_return_entry_r(env, c, e, l) \
324 bdb_cache_return_entry_rw((env), (c), (e), 0, (l))
325 #define bdb_cache_return_entry_w(env, c, e, l) \
326 bdb_cache_return_entry_rw((env), (c), (e), 1, (l))
328 void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw );
330 #define bdb_unlocked_cache_return_entry_rw( a, b, c )
332 #define bdb_unlocked_cache_return_entry_r( c, e ) \
333 bdb_unlocked_cache_return_entry_rw((c), (e), 0)
334 #define bdb_unlocked_cache_return_entry_w( c, e ) \
335 bdb_unlocked_cache_return_entry_rw((c), (e), 1)
337 int bdb_cache_children(
343 struct bdb_info *bdb,
349 int bdb_cache_modrdn(
358 int bdb_cache_modify(
365 int bdb_cache_update_entry(
369 int bdb_cache_find_entry_ndn2id(
377 int bdb_cache_find_entry_id(
387 int bdb_cache_delete_entry(
394 void bdb_cache_release_all( Cache *cache );
400 BI_op_abandon bdb_abandon;
402 BI_op_cancel bdb_cancel;
404 #if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
412 #define bdb_psearch(op, rs, sop, e, ps_type) bdb_do_search(op, rs, sop, e, ps_type)
419 #ifdef LDAP_CLIENT_UPDATE
421 bdb_build_lcup_update_ctrl(
428 struct berval *latest_entrycsn_bv,
432 bdb_build_lcup_done_ctrl(
437 struct berval *latest_entrycsn_bv );
442 bdb_build_sync_state_ctrl(
446 int entry_sync_state,
450 struct berval *latest_entrycsn_bv );
453 bdb_build_sync_done_ctrl(
459 struct berval *latest_entrycsn_bv );
462 bdb_send_ldap_intermediate(
466 struct berval *cookie );
469 #ifdef BDB_REUSE_LOCKERS
471 int bdb_locker_id( Operation *op, DB_ENV *env, int *locker );
476 char *ebcdic_dberror( int rc );
478 #define db_strerror(x) ebcdic_dberror(x)
483 #endif /* _PROTO_BDB_H */