2 * SPDX-License-Identifier: MIT
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>
12 #include "compat/limits.h"
14 #define CTF_INDEX_MAGIC 0xC1F1DCC1
15 #define CTF_INDEX_MAJOR 1
16 #define CTF_INDEX_MINOR 1
19 * Header at the beginning of each index file.
20 * All integer fields are stored in big endian.
22 struct ctf_packet_index_file_hdr
{
26 /* size of struct ctf_packet_index, in bytes. */
27 uint32_t packet_index_len
;
28 } __attribute__((__packed__
));
31 * Packet index generated for each trace packet store in a trace file.
32 * All integer fields are stored in big endian.
34 struct ctf_packet_index
{
35 uint64_t offset
; /* offset of the packet in the file, in bytes */
36 uint64_t packet_size
; /* packet size, in bits */
37 uint64_t content_size
; /* content size, in bits */
38 uint64_t timestamp_begin
;
39 uint64_t timestamp_end
;
40 uint64_t events_discarded
;
42 /* CTF_INDEX 1.0 limit */
43 uint64_t stream_instance_id
; /* ID of the channel instance */
44 uint64_t packet_seq_num
; /* packet sequence number */
45 } __attribute__((__packed__
));
47 #endif /* LTTNG_INDEX_H */