X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb2.h;h=adaf67106551f695d5b5384300b88e812190080c;hp=343264d588f0a04db188556f6f1f1f542cd4cd2b;hb=e2cb71e5d46801a94a3f0f546b8dcc2b7a79b66c;hpb=7f63d84eb712c54c57c3d4e9a92ffefe2f1b2ade diff --git a/ccan/tdb2/tdb2.h b/ccan/tdb2/tdb2.h index 343264d5..adaf6710 100644 --- a/ccan/tdb2/tdb2.h +++ b/ccan/tdb2/tdb2.h @@ -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,