summaryrefslogtreecommitdiffstats
path: root/src/dbstruct.h
blob: 2df2aeddcbe81ece77d46cb3274a187f6d4a426a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef foodbstructhfoo
#define foodbstructhfoo

/* $Id$ */

#include <limits.h>
#include <stdint.h>

#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_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
 * 
 */

#endif