diff options
Diffstat (limited to 'src/storage-mmap.h')
-rw-r--r-- | src/storage-mmap.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/storage-mmap.h b/src/storage-mmap.h index c05bbd0..db45cb0 100644 --- a/src/storage-mmap.h +++ b/src/storage-mmap.h @@ -4,8 +4,12 @@ struct tsnif_storage_header_mmap { struct tsnif_storage_header common; + /* max size of the file */ uint32_t size_max; + /* number of records stored */ uint32_t cnt; + /* offset of the first chunk */ + uint32_t offset_start; }; struct tsnif_storage_rec_mmap { @@ -31,10 +35,14 @@ struct tsnif_storage_chunk { off_t offset; void *current_data; uint32_t *current_index; + + /* for read interface only */ + int read_index; }; struct tsnif_storage_handle { int fd; + struct tsnif_storage_opts *opts; /* file header */ @@ -42,6 +50,10 @@ struct tsnif_storage_handle { /* active chunk */ struct tsnif_storage_chunk active_chunk; + + /* for READ mode only */ + off_t file_size; + }; #endif /* STORAGE_MMAP_H */ |