summaryrefslogtreecommitdiffstats
path: root/src/dbstruct.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-08-31 20:46:56 +0000
committerLennart Poettering <lennart@poettering.net>2003-08-31 20:46:56 +0000
commit26973e55d522e6e35a7618646cbdc7f4bf99e152 (patch)
tree27595e184b1123bb6b598f18f6e22be7b05b33d4 /src/dbstruct.h
parenta40ac3a10f6d0dd0edb5acb85f6c94e35e0c440b (diff)
filename hashing implemented
git-svn-id: file:///home/lennart/svn/public/syrep/trunk@19 07ea20a6-d2c5-0310-9e02-9ef735347d72
Diffstat (limited to 'src/dbstruct.h')
-rw-r--r--src/dbstruct.h50
1 files changed, 41 insertions, 9 deletions
diff --git a/src/dbstruct.h b/src/dbstruct.h
index 2df2aed..b5f0c26 100644
--- a/src/dbstruct.h
+++ b/src/dbstruct.h
@@ -3,22 +3,42 @@
/* $Id$ */
+/***
+ This file is part of syrep.
+
+ syrep is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ syrep is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with syrep; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***/
+
#include <limits.h>
#include <stdint.h>
+#include <db.h>
+
#include "syrep.h"
struct syrep_md {
- uint8_t digest[SYREP_DIGESTLENGTH];
+ uint8_t digest[SYREP_DIGESTLENGTH];
};
-struct syrep_name {
- char path[PATH_MAX+1];
+struct syrep_nrecno { /* name record number */
+ db_recno_t recno;
};
struct syrep_id {
struct syrep_md md;
- struct syrep_name name;
+ struct syrep_nrecno nrecno;
};
struct syrep_meta {
@@ -34,15 +54,27 @@ struct syrep_version {
uint32_t v;
};
+struct syrep_nhash { /* name hash */
+ uint32_t hash;
+};
+
+struct syrep_name {
+ char path[PATH_MAX+1];
+};
+
+
/* Table layout:
*
* syrep_id :: syrep_meta => id_meta
- * syrep_md :: syrep_name => md_name (DUP)
- * syrep_name :: syrep_md => name_md (DUP)
+ * syrep_md :: syrep_nrecno => md_nrecno (DUP)
+ * syrep_nrecno :: syrep_md => nrecno_md (DUP)
+ * syrep_nrecno :: syrep_md => nrecno_lastmd
+ * syrep_md :: syrep_nrecono => md_lastnrecno
+ *
* syrep_version :: syrep_timestamp => version_timestamp
- * syrep_name :: syrep_md => name_lastmd
- * syrep_md :: last_md => md_lastmd
- *
+ *
+ * nhash :: nrecno => nhash_nrecno (DUP)
+ * nrecno :: name => nrecno_name
*/
#endif