]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/tdb2.h
gitify the tree, especially the web makefile.
[ccan] / ccan / tdb2 / tdb2.h
index 343264d588f0a04db188556f6f1f1f542cd4cd2b..adaf67106551f695d5b5384300b88e812190080c 100644 (file)
@@ -86,7 +86,8 @@ typedef uint64_t (*tdb_hashfn_t)(const void *key, size_t len, uint64_t seed,
 
 enum tdb_attribute_type {
        TDB_ATTRIBUTE_LOG = 0,
-       TDB_ATTRIBUTE_HASH = 1
+       TDB_ATTRIBUTE_HASH = 1,
+       TDB_ATTRIBUTE_SEED = 2
 };
 
 struct tdb_attribute_base {
@@ -106,10 +107,16 @@ struct tdb_attribute_hash {
        void *hash_private;
 };
 
+struct tdb_attribute_seed {
+       struct tdb_attribute_base base; /* .attr = TDB_ATTRIBUTE_SEED */
+       uint64_t seed;
+};
+
 union tdb_attribute {
        struct tdb_attribute_base base;
        struct tdb_attribute_log log;
        struct tdb_attribute_hash hash;
+       struct tdb_attribute_seed seed;
 };
                
 struct tdb_context *tdb_open(const char *name, int tdb_flags,