From 3bc3ad24a2c089b4ee80fc1765fab3d2af378d00 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 Aug 2003 21:43:31 +0000 Subject: Initial commit git-svn-id: file:///home/lennart/svn/public/syrep/trunk@2 07ea20a6-d2c5-0310-9e02-9ef735347d72 --- src/dbstruct.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/dbstruct.h (limited to 'src/dbstruct.h') diff --git a/src/dbstruct.h b/src/dbstruct.h new file mode 100644 index 0000000..2555cc1 --- /dev/null +++ b/src/dbstruct.h @@ -0,0 +1,60 @@ +#ifndef foodbstructhfoo +#define foodbstructhfoo + +#include +#include + +#include "syrep.h" + +struct syrep_md { + uint8_t digest[SYREP_DIGESTLENGTH]; +}; + +struct syrep_name { + char path[PATH_MAX+1]; +}; + +struct syrep_id { + struct syrep_md md; + struct syrep_name name; +}; + +struct syrep_meta { + uint32_t first_seen; + uint32_t last_seen; +}; + +/* struct syrep_namels { */ +/* uint32_t last_seen; */ +/* struct syrep_name name; */ +/* }; */ + +/* struct syrep_mdls { */ +/* uint32_t last_seen; */ +/* struct syrep_md md; */ +/* }; */ + +struct syrep_timestamp { + uint32_t t; +}; + +struct syrep_version { + uint32_t v; +}; + +/* Table layout: + * + * syrep_id :: syrep_meta => id_meta + * syrep_md :: syrep_name => md_name (DUP) + * syrep_name :: syrep_md => name_md (DUP) + * syrep_version :: syrep_timestamp => version_timestamp + * syrep_name :: syrep_md => name_lastmd + * syrep_md :: last_md => md_lastmd + * + */ + +/* + * syrep_namels :: syrep_md => namels_md + * syrep_mdls :: syrep_name => mdls_name + */ +#endif -- cgit