- uint64_t arena_offset;
- uint64_t arena_size;
- uint64_t arena_max_size; /* obsolete */
- uint64_t arena_min_size; /* obsolete */
- uint64_t arena_keep_free; /* obsolete */
- uint64_t data_hash_table_offset; /* for looking up data objects */
- uint64_t data_hash_table_size;
- uint64_t field_hash_table_offset; /* for looking up field objects */
- uint64_t field_hash_table_size;
- uint64_t tail_object_offset;
- uint64_t n_objects;
- uint64_t n_entries;
- uint64_t seqnum;
- uint64_t first_seqnum;
- uint64_t entry_array_offset;
- uint64_t head_entry_realtime;
- uint64_t tail_entry_realtime;
- uint64_t tail_entry_monotonic;
-};
-
-#endif
+ 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;
+ le64_t field_hash_table_offset; /* for looking up field objects */
+ le64_t field_hash_table_size;
+ le64_t tail_object_offset;
+ le64_t n_objects;
+ le64_t n_entries;
+ le64_t tail_seqnum;
+ le64_t head_seqnum;
+ le64_t entry_array_offset;
+ le64_t head_entry_realtime;
+ le64_t tail_entry_realtime;
+ le64_t tail_entry_monotonic;
+ /* Added in 187 */
+ le64_t n_data;
+ le64_t n_fields;
+};
+
+#define FSPRG_HEADER_SIGNATURE ((char[]) { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' })
+
+_packed_ struct FSPRGHeader {
+ uint8_t signature[8]; /* "KSHHRHLP" */
+ le32_t compatible_flags;
+ le32_t incompatible_flags;
+ sd_id128_t machine_id;
+ sd_id128_t boot_id; /* last writer */
+ le64_t header_size;
+ le64_t fsprg_start_usec;
+ le64_t fsprg_interval_usec;
+ le16_t secpar;
+ le16_t reserved[3];
+ le64_t state_size;
+};