chiark / gitweb /
journal: default ImportKernel=no until we make use of structured logging
[elogind.git] / src / journal / journal-def.h
index 9cb80510822a2a89771de9fdc6ddf40406461536..b30ae796836d6586222f4143d1d7660254ac0d9c 100644 (file)
@@ -9,16 +9,16 @@
   Copyright 2011 Lennart Poettering
 
   systemd 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
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
   systemd 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.
+  Lesser General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
+  You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #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;
@@ -142,10 +160,10 @@ _packed_ struct Header {
         uint8_t state;
         uint8_t reserved[7];
         sd_id128_t file_id;
-        sd_id128_t machine_id;
-        sd_id128_t boot_id;
+        sd_id128_t machine_id; /* last writer */
+        sd_id128_t boot_id;    /* last writer */
         sd_id128_t seqnum_id;
-        le64_t arena_offset;
+        le64_t header_size;
         le64_t arena_size;
         le64_t data_hash_table_offset;     /* for looking up data objects */
         le64_t data_hash_table_size;