summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:05:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:05:13 +0930
commit13238912facb04ab3aafeb020de6226659d83e6b (patch)
tree98cc7793847779f0f36bde9e2a275fc97eb209b3 /lib
parent6d0218598c3f3c69b8c2fdf40d3f9611885a51af (diff)
downloadsamba-13238912facb04ab3aafeb020de6226659d83e6b.tar.gz
samba-13238912facb04ab3aafeb020de6226659d83e6b.tar.bz2
samba-13238912facb04ab3aafeb020de6226659d83e6b.zip
tdb2: expose and document tdb1_incompatible_hash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a4f2eb983b92b68bcad2a0d640924b8b456e3d69)
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb2/tdb1.h2
-rw-r--r--lib/tdb2/tdb2.h12
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/tdb2/tdb1.h b/lib/tdb2/tdb1.h
index 54b6d936d4..c46abc7e5e 100644
--- a/lib/tdb2/tdb1.h
+++ b/lib/tdb2/tdb1.h
@@ -38,8 +38,6 @@
void tdb1_set_max_dead(struct tdb_context *tdb, int max_dead);
-uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, void *);
-
/* @} ******************************************************************/
#endif /* tdb1.h */
diff --git a/lib/tdb2/tdb2.h b/lib/tdb2/tdb2.h
index ebfc918404..0eda9ef84b 100644
--- a/lib/tdb2/tdb2.h
+++ b/lib/tdb2/tdb2.h
@@ -91,6 +91,18 @@ struct tdb_context *tdb_open(const char *name, int tdb_flags,
#define TDB_VERSION1 1024 /* create/open an old style TDB */
/**
+ * tdb1_incompatible_hash - better (Jenkins) hash for tdb1
+ *
+ * This is better than the default hash for tdb1; but older versions of the
+ * tdb library (prior to version 1.2.6) won't be able to open them.
+ *
+ * It only makes sense to specify this (using tdb_attribute_hash) when
+ * creating (with O_CREAT) an old tdb version using TDB_VERSION1. It's
+ * equivalent to the TDB_INCOMPATIBLE_HASH flag for tdb1.
+ */
+uint64_t tdb1_incompatible_hash(const void *, size_t, uint64_t, void *);
+
+/**
* tdb_close - close and free a tdb.
* @tdb: the tdb context returned from tdb_open()
*