diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-11-18 17:59:57 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-11-18 17:59:57 +0000 |
commit | 5eb97ceaa6079ea9694e02cea1482d2a3e1da6b1 (patch) | |
tree | 36f603772fe884a81809ac77ab2fdd2ddabcbaa4 /include | |
parent | 64888d56b22345dceab74daa786a4de76dc29e5b (diff) |
add a version field to prevent mayhem if different data gets stored
Diffstat (limited to 'include')
-rw-r--r-- | include/icdb.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/icdb.h b/include/icdb.h index 6960546dbe8..feb3c393d75 100644 --- a/include/icdb.h +++ b/include/icdb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icdb.h,v 1.1 2015/11/18 16:46:49 tedu Exp $ */ +/* $OpenBSD: icdb.h,v 1.2 2015/11/18 17:59:56 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -18,10 +18,10 @@ struct icdb; -struct icdb *icdb_new(uint32_t nentries, uint32_t entrysize, +struct icdb *icdb_new(uint32_t version, uint32_t nentries, uint32_t entrysize, uint32_t nkeys, uint32_t *keysizes, uint32_t *keyoffsets); -struct icdb *icdb_open(const char *name, int flags); +struct icdb *icdb_open(const char *name, int flags, uint32_t version); int icdb_get(struct icdb *db, void *entry, uint32_t idx); int icdb_lookup(struct icdb *db, int keynum, const void *key, void *entry, uint32_t *idxp); |