API Fix : give access to trace_handle and context
[babeltrace.git] / include / babeltrace / ctf / metadata.h
1 #ifndef _BABELTRACE_CTF_METADATA_H
2 #define _BABELTRACE_CTF_METADATA_H
3
4 /*
5 * BabelTrace
6 *
7 * CTF Metadata Header
8 *
9 * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 */
21
22 #include <babeltrace/types.h>
23 #include <babeltrace/format.h>
24 #include <babeltrace/ctf/types.h>
25 #include <babeltrace/ctf-ir/metadata.h>
26 #include <babeltrace/trace-handle-internal.h>
27 #include <babeltrace/context-internal.h>
28 #include <sys/types.h>
29 #include <dirent.h>
30 #include <assert.h>
31 #include <glib.h>
32
33 #define CTF_MAGIC 0xC1FC1FC1
34 #define TSDL_MAGIC 0x75D11D57
35
36 struct ctf_file_stream {
37 struct ctf_stream parent;
38 struct ctf_stream_pos pos; /* current stream position */
39 };
40
41 #define HEADER_END char end_field
42 #define header_sizeof(type) offsetof(typeof(type), end_field)
43
44 struct metadata_packet_header {
45 uint32_t magic; /* 0x75D11D57 */
46 uint8_t uuid[16]; /* Unique Universal Identifier */
47 uint32_t checksum; /* 0 if unused */
48 uint32_t content_size; /* in bits */
49 uint32_t packet_size; /* in bits */
50 uint8_t compression_scheme; /* 0 if unused */
51 uint8_t encryption_scheme; /* 0 if unused */
52 uint8_t checksum_scheme; /* 0 if unused */
53 uint8_t major; /* CTF spec major version number */
54 uint8_t minor; /* CTF spec minor version number */
55 HEADER_END;
56 };
57
58 #endif /* _BABELTRACE_CTF_METADATA_H */
This page took 0.043306 seconds and 4 git commands to generate.