- int (*tdb1_read)(struct tdb1_context *, tdb1_off_t , void *, tdb1_len_t , int );
- int (*tdb1_write)(struct tdb1_context *, tdb1_off_t, const void *, tdb1_len_t);
- void (*next_hash_chain)(struct tdb1_context *, uint32_t *);
- int (*tdb1_oob)(struct tdb1_context *, tdb1_off_t , int );
- int (*tdb1_expand_file)(struct tdb1_context *, tdb1_off_t , tdb1_off_t );
-};
-
-struct tdb1_context {
- char *name; /* the name of the database */
- void *map_ptr; /* where it is currently mapped */
- int fd; /* open file descriptor for the database */
- tdb1_len_t map_size; /* how much space has been mapped */
- int read_only; /* opened read-only */
- int traverse_read; /* read-only traversal */
- int traverse_write; /* read-write traversal */
- struct tdb1_lock_type allrecord_lock; /* .offset == upgradable */
- int num_lockrecs;
- struct tdb1_lock_type *lockrecs; /* only real locks, all with count>0 */
- enum TDB1_ERROR ecode; /* error code for last tdb error */
- struct tdb1_header header; /* a cached copy of the header */
- uint32_t flags; /* the flags passed to tdb1_open */
- struct tdb1_traverse_lock travlocks; /* current traversal locks */
- struct tdb1_context *next; /* all tdbs to avoid multiple opens */
- dev_t device; /* uniquely identifies this tdb */
- ino_t inode; /* uniquely identifies this tdb */
- struct tdb1_logging_context log;
- unsigned int (*hash_fn)(TDB1_DATA *key);
- int open_flags; /* flags used in the open - needed by reopen */
- const struct tdb1_methods *methods;
- struct tdb1_transaction *transaction;
- int page_size;
- int max_dead_records;
-#ifdef TDB1_TRACE
- int tracefd;
-#endif
- volatile sig_atomic_t *interrupt_sig_ptr;
+ int (*tdb1_read)(struct tdb_context *, tdb1_off_t , void *, tdb1_len_t , int );
+ int (*tdb1_write)(struct tdb_context *, tdb1_off_t, const void *, tdb1_len_t);
+ void (*next_hash_chain)(struct tdb_context *, uint32_t *);
+ int (*tdb1_oob)(struct tdb_context *, tdb1_off_t , int );
+ int (*tdb1_expand_file)(struct tdb_context *, tdb1_off_t , tdb1_off_t );