cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition
[babeltrace.git] / src / plugins / ctf / fs-src / lttng-index.hpp
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
5 * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
7 */
8
9 #ifndef LTTNG_INDEX_H
10 #define LTTNG_INDEX_H
11
12 #include <cstdint>
13
14 #include "compat/limits.h" /* IWYU pragma: keep */
15
16 #define CTF_INDEX_MAGIC 0xC1F1DCC1
17 #define CTF_INDEX_MAJOR 1
18 #define CTF_INDEX_MINOR 1
19 #define CTF_INDEX_1_0_SIZE offsetof(struct ctf_packet_index, stream_instance_id)
20
21 /*
22 * Header at the beginning of each index file.
23 * All integer fields are stored in big endian.
24 */
25 struct ctf_packet_index_file_hdr
26 {
27 uint32_t magic;
28 uint32_t index_major;
29 uint32_t index_minor;
30 /* size of struct ctf_packet_index, in bytes. */
31 uint32_t packet_index_len;
32 } __attribute__((__packed__));
33
34 /*
35 * Packet index generated for each trace packet store in a trace file.
36 * All integer fields are stored in big endian.
37 */
38 struct ctf_packet_index
39 {
40 uint64_t offset; /* offset of the packet in the file, in bytes */
41 uint64_t packet_size; /* packet size, in bits */
42 uint64_t content_size; /* content size, in bits */
43 uint64_t timestamp_begin;
44 uint64_t timestamp_end;
45 uint64_t events_discarded;
46 uint64_t stream_id;
47 /* CTF_INDEX 1.0 limit */
48 uint64_t stream_instance_id; /* ID of the channel instance */
49 uint64_t packet_seq_num; /* packet sequence number */
50 } __attribute__((__packed__));
51
52 #endif /* LTTNG_INDEX_H */
This page took 0.030442 seconds and 4 git commands to generate.