summaryrefslogtreecommitdiff
path: root/lib/tdb/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-09-24 15:34:06 +0930
committerRusty Russell <rusty@rustcorp.com.au>2010-09-27 10:48:28 +0930
commit3258cf3f11bf7c68a2e69e1808c4551cc899725a (patch)
tree4936334d88f8e159c0412f8f3370f3ab07c0817d /lib/tdb/include
parent7afa7b8a848a6afdb586768168c95b566b7b912f (diff)
downloadsamba-3258cf3f11bf7c68a2e69e1808c4551cc899725a.tar.gz
samba-3258cf3f11bf7c68a2e69e1808c4551cc899725a.tar.bz2
samba-3258cf3f11bf7c68a2e69e1808c4551cc899725a.zip
tdb: add Bob Jenkins lookup3 hash as helper hash.
This is a better hash than the default: shipping it with tdb makes it easy for callers to use it as the hash by passing it to tdb_open_ex(). This version taken from CCAN and modified, which took it from http://www.burtleburtle.net/bob/c/lookup3.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/include')
-rw-r--r--lib/tdb/include/tdb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
index 050f398eec..08b6b3ab55 100644
--- a/lib/tdb/include/tdb.h
+++ b/lib/tdb/include/tdb.h
@@ -142,6 +142,7 @@ _PUBLIC_ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
_PUBLIC_ void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
_PUBLIC_ void tdb_enable_seqnum(struct tdb_context *tdb);
_PUBLIC_ void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
+_PUBLIC_ unsigned int tdb_jenkins_hash(TDB_DATA *key);
_PUBLIC_ int tdb_check(struct tdb_context *tdb,
int (*check) (TDB_DATA key, TDB_DATA data, void *private_data),
void *private_data);