Fix: set the enable all event command type
[lttng-tools.git] / src / common / index / lttng-index.h
CommitLineData
309167d2
JD
1/*
2 * Copyright (C) 2013 - Julien Desfossez <jdesfossez@efficios.com>
c404302f 3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
309167d2
JD
4 * David Goulet <dgoulet@efficios.com>
5 *
c404302f
JD
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
309167d2 12 *
c404302f
JD
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
309167d2 15 *
c404302f
JD
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
309167d2
JD
23 */
24
25#ifndef LTTNG_INDEX_H
26#define LTTNG_INDEX_H
27
28#include <limits.h>
29
30#define INDEX_MAGIC "CTFIDX"
31#define INDEX_MAJOR 1
32#define INDEX_MINOR 0
33
34/*
35 * Header at the beginning of each index file.
36 * All integer fields are stored in big endian.
37 */
38struct lttng_packet_index_file_hdr {
39 char magic[6];
40 uint32_t index_major;
41 uint32_t index_minor;
42} __attribute__((__packed__));
43
44/*
45 * Packet index generated for each trace packet store in a trace file.
46 * All integer fields are stored in big endian.
47 */
48struct lttng_packet_index {
49 uint64_t offset; /* offset of the packet in the file, in bytes */
50 uint64_t packet_size; /* packet size, in bits */
51 uint64_t content_size; /* content size, in bits */
52 uint64_t timestamp_begin;
53 uint64_t timestamp_end;
54 uint64_t events_discarded;
55 uint64_t stream_id;
56} __attribute__((__packed__));
57
58#endif /* LTTNG_INDEX_H */
This page took 0.024495 seconds and 4 git commands to generate.