X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Fproto-bdb.h;h=5ec4228d434f27007586aed40c257c16dfbbaa35;hb=282f6bc32d942d866edde41e8c35a96ae5b040c5;hp=6cef37e39c57fa2b7433f4b9a0ef2ccb2d5b2405;hpb=cd60deb4a98c04e39d427c1d4a228162c942d104;p=openldap diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 6cef37e39c..5ec4228d43 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 2000-2002 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 2000-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -58,9 +58,12 @@ bdb_db_cache( * dn2entry.c */ int bdb_dn2entry_rw LDAP_P(( BackendDB *be, DB_TXN *tid, - struct berval *dn, Entry **e, Entry **matched, int flags, int rw , u_int32_t locker, DB_LOCK *lock)); -#define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock) -#define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock) + struct berval *dn, Entry **e, Entry **matched, int flags, int rw, + u_int32_t locker, DB_LOCK *lock)); +#define bdb_dn2entry_r(be, tid, dn, e, m, f, locker, lock) \ + bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 0, locker, lock) +#define bdb_dn2entry_w(be, tid, dn, e, m, f, locker, lock) \ + bdb_dn2entry_rw((be), (tid), (dn), (e), (m), (f), 1, locker, lock) /* * dn2id.c @@ -158,8 +161,10 @@ int bdb_id2entry_rw( int rw, u_int32_t locker, DB_LOCK *lock ); -#define bdb_id2entry_r(be, tid, id, e, locker, lock) bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock) -#define bdb_id2entry_w(be, tid, id, e, locker, lock) bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock) +#define bdb_id2entry_r(be, tid, id, e, locker, lock) \ + bdb_id2entry_rw((be), (tid), (id), (e), 0, locker, lock) +#define bdb_id2entry_w(be, tid, id, e, locker, lock) \ + bdb_id2entry_rw((be), (tid), (id), (e), 1, locker, lock) void bdb_entry_free ( Entry *e ); @@ -295,6 +300,17 @@ int bdb_modify_internal( char *textbuf, size_t textlen ); +/* + * operational.c + */ +int +bdb_hasSubordinates( + BackendDB *be, + Connection *conn, + Operation *op, + Entry *e, + int *hasSubordinates ); + /* * passwd.c */ @@ -306,12 +322,17 @@ BI_op_extended bdb_exop_passwd; */ void bdb_cache_entry_commit( Entry *e ); -void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e, int rw, DB_LOCK *lock ); -#define bdb_cache_return_entry_r(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 0, (l)) -#define bdb_cache_return_entry_w(env, c, e, l) bdb_cache_return_entry_rw((env), (c), (e), 1, (l)) +void bdb_cache_return_entry_rw( DB_ENV *env, Cache *cache, Entry *e, + int rw, DB_LOCK *lock ); +#define bdb_cache_return_entry_r(env, c, e, l) \ + bdb_cache_return_entry_rw((env), (c), (e), 0, (l)) +#define bdb_cache_return_entry_w(env, c, e, l) \ + bdb_cache_return_entry_rw((env), (c), (e), 1, (l)) void bdb_unlocked_cache_return_entry_rw( Cache *cache, Entry *e, int rw ); -#define bdb_unlocked_cache_return_entry_r( c, e ) bdb_unlocked_cache_return_entry_rw((c), (e), 0) -#define bdb_unlocked_cache_return_entry_w( c, e ) bdb_unlocked_cache_return_entry_rw((c), (e), 1) +#define bdb_unlocked_cache_return_entry_r( c, e ) \ + bdb_unlocked_cache_return_entry_rw((c), (e), 0) +#define bdb_unlocked_cache_return_entry_w( c, e ) \ + bdb_unlocked_cache_return_entry_rw((c), (e), 1) int bdb_cache_add_entry_rw( DB_ENV *env, Cache *cache, @@ -343,6 +364,112 @@ int bdb_cache_delete_entry( ); void bdb_cache_release_all( Cache *cache ); +/* + * lcup.c + */ + +#ifdef LDAP_CLIENT_UPDATE +int bdb_abandon( + BackendDB *be, + Connection *conn, + ber_int_t id +); +#endif + +#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC) +int bdb_add_psearch_spec( + BackendDB *be, + Connection *conn, + Operation *op, + struct berval *base, + struct berval *nbase, + int scope, + int deref, + int slimit, + int tlimit, + Filter *filter, + struct berval *fstr, + AttributeName *attrs, + int attrsonly, + int protocol +); + +int bdb_psearch( + BackendDB *be, + Connection *conn, + Operation *op, + Operation *ps_op, + Entry *entry, + int psearch_type +); +#endif + +/* + * search.c + */ + +#ifdef LDAP_CLIENT_UPDATE +int +bdb_build_lcup_update_ctrl( + Connection *conn, + Operation *op, + Entry *e, + int entry_count, + LDAPControl **ctrls, + int num_ctrls, + struct berval *latest_entrycsn_bv, + int isdeleted ); + +int +bdb_build_lcup_done_ctrl( + Connection *conn, + Operation *op, + LDAPControl **ctrls, + int num_ctrls, + struct berval *latest_entrycsn_bv ); +#endif + +#ifdef LDAP_SYNC +int +bdb_build_sync_state_ctrl( + Connection *conn, + Operation *op, + Entry *e, + int entry_sync_state, + LDAPControl **ctrls, + int num_ctrls, + int send_cookie, + struct berval *latest_entrycsn_bv ); + +int +bdb_build_sync_done_ctrl( + Connection *conn, + Operation *op, + LDAPControl **ctrls, + int num_ctrls, + int send_cookie, + struct berval *latest_entrycsn_bv ); + +int +bdb_send_ldap_intermediate( + Connection *conn, + Operation *op, + ber_int_t err, + const char *matched, + const char *text, + BerVarray refs, + const char *rspoid, + int state, + struct berval *cookie, + LDAPControl **ctrls ); +#endif + +#ifdef BDB_REUSE_LOCKERS + +int bdb_locker_id( Operation *op, DB_ENV *env, int *locker ); + +#endif + #ifdef HAVE_EBCDIC char *ebcdic_dberror( int rc );