-_PUBLIC_ int tdb1_hash_size(struct tdb1_context *tdb)
-{
- return tdb->header.hash_size;
-}
-
-_PUBLIC_ size_t tdb1_map_size(struct tdb1_context *tdb)
-{
- return tdb->map_size;
-}
-
-_PUBLIC_ int tdb1_get_flags(struct tdb1_context *tdb)
-{
- return tdb->flags;
-}
-
-_PUBLIC_ void tdb1_add_flags(struct tdb1_context *tdb, unsigned flags)
-{
- if ((flags & TDB1_ALLOW_NESTING) &&
- (flags & TDB1_DISALLOW_NESTING)) {
- tdb->ecode = TDB1_ERR_NESTING;
- TDB1_LOG((tdb, TDB1_DEBUG_FATAL, "tdb1_add_flags: "
- "allow_nesting and disallow_nesting are not allowed together!"));
- return;
- }
-
- if (flags & TDB1_ALLOW_NESTING) {
- tdb->flags &= ~TDB1_DISALLOW_NESTING;
- }
- if (flags & TDB1_DISALLOW_NESTING) {
- tdb->flags &= ~TDB1_ALLOW_NESTING;
- }
-
- tdb->flags |= flags;
-}
-
-_PUBLIC_ void tdb1_remove_flags(struct tdb1_context *tdb, unsigned flags)
-{
- if ((flags & TDB1_ALLOW_NESTING) &&
- (flags & TDB1_DISALLOW_NESTING)) {
- tdb->ecode = TDB1_ERR_NESTING;
- TDB1_LOG((tdb, TDB1_DEBUG_FATAL, "tdb1_remove_flags: "
- "allow_nesting and disallow_nesting are not allowed together!"));
- return;
- }
-
- if (flags & TDB1_ALLOW_NESTING) {
- tdb->flags |= TDB1_DISALLOW_NESTING;
- }
- if (flags & TDB1_DISALLOW_NESTING) {
- tdb->flags |= TDB1_ALLOW_NESTING;
- }
-
- tdb->flags &= ~flags;
-}
-
-
-/*
- enable sequence number handling on an open tdb
-*/
-_PUBLIC_ void tdb1_enable_seqnum(struct tdb1_context *tdb)
-{
- tdb->flags |= TDB1_SEQNUM;
-}
-