summaryrefslogtreecommitdiff
path: root/src/journal/journal-def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journal-def.h')
-rw-r--r--src/journal/journal-def.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/journal/journal-def.h b/src/journal/journal-def.h
index 53f1e22cf0..86aef8f372 100644
--- a/src/journal/journal-def.h
+++ b/src/journal/journal-def.h
@@ -29,13 +29,17 @@
#include "macro.h"
typedef struct Header Header;
+
typedef struct ObjectHeader ObjectHeader;
typedef union Object Object;
+
typedef struct DataObject DataObject;
typedef struct FieldObject FieldObject;
typedef struct EntryObject EntryObject;
typedef struct HashTableObject HashTableObject;
typedef struct EntryArrayObject EntryArrayObject;
+typedef struct SignatureObject SignatureObject;
+
typedef struct EntryItem EntryItem;
typedef struct HashItem HashItem;
@@ -48,6 +52,7 @@ enum {
OBJECT_DATA_HASH_TABLE,
OBJECT_FIELD_HASH_TABLE,
OBJECT_ENTRY_ARRAY,
+ OBJECT_SIGNATURE,
_OBJECT_TYPE_MAX
};
@@ -115,6 +120,14 @@ _packed_ struct EntryArrayObject {
le64_t items[];
};
+#define SIGNATURE_LENGTH 160
+
+_packed_ struct SignatureObject {
+ ObjectHeader object;
+ le64_t from;
+ uint8_t signature[SIGNATURE_LENGTH];
+};
+
union Object {
ObjectHeader object;
DataObject data;
@@ -122,6 +135,7 @@ union Object {
EntryObject entry;
HashTableObject hash_table;
EntryArrayObject entry_array;
+ SignatureObject signature;
};
enum {
@@ -135,6 +149,10 @@ enum {
HEADER_INCOMPATIBLE_COMPRESSED = 1
};
+enum {
+ HEADER_COMPATIBLE_SIGNED = 1
+};
+
_packed_ struct Header {
uint8_t signature[8]; /* "LPKSHHRH" */
uint32_t compatible_flags;