1 #ifndef _PROTO_BACK_BDB2
2 #define _PROTO_BACK_BDB2
4 #include <ldap_cdefs.h>
13 Entry *bdb2i_derefAlias_r LDAP_P((
18 char *bdb2i_derefDN LDAP_P((
28 void bdb2i_attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask,
30 void bdb2i_attr_index_config LDAP_P(( struct ldbminfo *li, char *fname,
31 int lineno, int argc, char **argv, int init ));
37 int bdb2i_cache_add_entry_rw LDAP_P(( struct cache *cache, Entry *e, int rw ));
38 int bdb2i_cache_update_entry LDAP_P(( struct cache *cache, Entry *e ));
39 void bdb2i_cache_return_entry_rw LDAP_P(( struct cache *cache, Entry *e,
41 #define bdb2i_cache_return_entry_r(c, e) bdb2i_cache_return_entry_rw((c), (e), 0)
42 #define bdb2i_cache_return_entry_w(c, e) bdb2i_cache_return_entry_rw((c), (e), 1)
44 ID bdb2i_cache_find_entry_dn2id LDAP_P(( BackendDB *be, struct cache *cache,
46 Entry * bdb2i_cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw ));
47 int bdb2i_cache_delete_entry LDAP_P(( struct cache *cache, Entry *e ));
53 struct dbcache * bdb2i_cache_open LDAP_P(( BackendDB *be, char *name, char *suffix,
55 void bdb2i_cache_close LDAP_P(( BackendDB *be, struct dbcache *db ));
56 void bdb2i_cache_really_close LDAP_P(( BackendDB *be, struct dbcache *db ));
57 void bdb2i_cache_flush_all LDAP_P(( BackendDB *be ));
58 Datum bdb2i_cache_fetch LDAP_P(( struct dbcache *db, Datum key ));
59 int bdb2i_cache_store LDAP_P(( struct dbcache *db, Datum key, Datum data, int flags ));
60 int bdb2i_cache_delete LDAP_P(( struct dbcache *db, Datum key ));
66 int bdb2i_dn2id_add LDAP_P(( BackendDB *be, char *dn, ID id ));
67 ID bdb2i_dn2id LDAP_P(( BackendDB *be, char *dn ));
68 int bdb2i_dn2id_delete LDAP_P(( BackendDB *be, char *dn ));
70 Entry * bdb2i_dn2entry_rw LDAP_P(( BackendDB *be, char *dn, char **matched,
72 #define bdb2i_dn2entry_r(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 0)
73 #define bdb2i_dn2entry_w(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 1)
79 ID_BLOCK * bdb2i_filter_candidates LDAP_P(( BackendDB *be, Filter *f ));
85 int bdb2i_id2children_add LDAP_P(( BackendDB *be, Entry *p, Entry *e ));
86 int bdb2i_id2children_remove LDAP_P(( BackendDB *be, Entry *p, Entry *e ));
87 int bdb2i_has_children LDAP_P(( BackendDB *be, Entry *p ));
93 int bdb2i_id2entry_add LDAP_P(( BackendDB *be, Entry *e ));
94 int bdb2i_id2entry_delete LDAP_P(( BackendDB *be, Entry *e ));
96 Entry * bdb2i_id2entry_rw LDAP_P(( BackendDB *be, ID id, int rw ));
97 #define bdb2i_id2entry_r(be, id) bdb2i_id2entry_rw((be), (id), 0)
98 #define bdb2i_id2entry_w(be, id) bdb2i_id2entry_rw((be), (id), 1)
104 ID_BLOCK * bdb2i_idl_alloc LDAP_P(( unsigned long nids ));
105 ID_BLOCK * bdb2i_idl_allids LDAP_P(( BackendDB *be ));
106 void bdb2i_idl_free LDAP_P(( ID_BLOCK *idl ));
107 ID_BLOCK * bdb2i_idl_fetch LDAP_P(( BackendDB *be, struct dbcache *db, Datum key ));
108 int bdb2i_idl_insert_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
109 int bdb2i_idl_insert LDAP_P(( ID_BLOCK **idl, ID id, unsigned long maxids ));
110 int bdb2i_idl_delete_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
111 ID_BLOCK * bdb2i_idl_intersection LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
112 ID_BLOCK * bdb2i_idl_union LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
113 ID_BLOCK * bdb2i_idl_notin LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
114 ID bdb2i_idl_firstid LDAP_P(( ID_BLOCK *idl ));
115 ID bdb2i_idl_nextid LDAP_P(( ID_BLOCK *idl, ID id ));
121 int bdb2i_index_add_entry LDAP_P(( BackendDB *be, Entry *e ));
122 int bdb2i_index_add_mods LDAP_P(( BackendDB *be, LDAPModList *ml, ID id ));
123 ID_BLOCK * bdb2i_index_read LDAP_P(( BackendDB *be, char *type, int indextype, char *val ));
124 int bdb2i_index_add_values LDAP_P(( BackendDB *be, char *type, struct berval **vals, ID id ));
131 /* bdb2i_krbv4_ldap_auth LDAP_P(( BackendDB *be, struct berval *cred, AUTH_DAT *ad )); */
136 * These prototypes are placed here because they are used by modify and
137 * modify rdn which are implemented in different files.
140 int bdb2i_add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
141 int bdb2i_delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
142 int bdb2i_replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
148 ID bdb2i_next_id LDAP_P(( BackendDB *be ));
149 void bdb2i_next_id_return LDAP_P(( BackendDB *be, ID id ));
150 ID bdb2i_next_id_get LDAP_P(( BackendDB *be ));
151 int bdb2i_next_id_save LDAP_P(( BackendDB *be ));
157 int bdb2i_back_startup LDAP_P(( BackendInfo *bi ));
158 int bdb2i_back_shutdown LDAP_P(( BackendInfo *bi ));
159 int bdb2i_back_db_startup LDAP_P(( BackendDB *be ));
160 int bdb2i_back_db_shutdown LDAP_P(( BackendDB *be ));
166 void bdb2i_uncond_start_timing LDAP_P(( struct timeval *time1 ));
167 #define bdb2i_start_timing(bi,time1) if ( with_timing( bi )) bdb2i_uncond_start_timing( (time1) )
168 void bdb2i_uncond_stop_timing LDAP_P(( struct timeval time1,
169 char *func, Connection *conn, Operation *op, int level ));
170 #define bdb2i_stop_timing(bi,time1,func,conn,op) if ( with_timing( bi )) bdb2i_uncond_stop_timing( (time1), (func), (conn), (op), LDAP_DEBUG_ANY )
176 int bdb2i_enter_backend_rw LDAP_P(( DB_LOCK *lock, int writer ));
177 #define bdb2i_enter_backend_r(lock) bdb2i_enter_backend_rw((lock), 0 )
178 #define bdb2i_enter_backend_w(lock) bdb2i_enter_backend_rw((lock), 1 )
179 int bdb2i_leave_backend_rw LDAP_P(( DB_LOCK lock, int writer ));
180 #define bdb2i_leave_backend_r(lock) bdb2i_leave_backend_rw((lock), 0 )
181 #define bdb2i_leave_backend_w(lock) bdb2i_leave_backend_rw((lock), 1 )
187 int bdb2i_txn_head_init LDAP_P(( BDB2_TXN_HEAD *head ));
188 void bdb2i_txn_attr_config LDAP_P((
192 int bdb2i_txn_open_files LDAP_P(( BackendDB *be ));
193 void bdb2i_txn_close_files LDAP_P(( BackendDB *be ));
194 BDB2_TXN_FILES *bdb2i_get_db_file_cache LDAP_P((
197 int bdb2i_check_additional_attr_index LDAP_P(( struct ldbminfo *li ));
198 void bdb2i_check_default_attr_index_add LDAP_P((
201 void bdb2i_check_default_attr_index_mod LDAP_P((
203 LDAPModList *modlist ));
204 ID bdb2i_get_nextid LDAP_P(( BackendDB *be ));
205 int bdb2i_put_nextid LDAP_P(( BackendDB *be, ID id ));
206 LDBM bdb2i_db_open LDAP_P(( char *name, int type, int rw, int mode,
208 int bdb2i_db_store LDAP_P(( LDBM ldbm, Datum key, Datum data, int flags ));
209 int bdb2i_db_delete LDAP_P(( LDBM ldbm, Datum key ));
210 Datum bdb2i_db_fetch LDAP_P(( LDBM ldbm, Datum key ));
211 Datum bdb2i_db_firstkey LDAP_P(( LDBM ldbm, DBC **dbch ));
212 Datum bdb2i_db_nextkey LDAP_P(( LDBM ldbm, Datum key, DBC *dbcp ));
213 int bdb2i_start_transction LDAP_P(( DB_TXNMGR *txmgr ));
214 int bdb2i_finish_transaction LDAP_P(( ));
215 int bdb2i_set_txn_checkpoint LDAP_P(( DB_TXNMGR *txmgr, int forced ));