Commit | Line | Data |
---|---|---|
c054553d MD |
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> | |
46322b33 | 23 | #include <babeltrace/format.h> |
dd2544fd | 24 | #include <babeltrace/ctf/types.h> |
145b8090 | 25 | #include <babeltrace/ctf-ir/metadata.h> |
bbefb8dd MD |
26 | #include <sys/types.h> |
27 | #include <dirent.h> | |
96513a7f MD |
28 | #include <uuid/uuid.h> |
29 | #include <assert.h> | |
c054553d MD |
30 | #include <glib.h> |
31 | ||
0f980a35 | 32 | #define CTF_MAGIC 0xC1FC1FC1 |
b4c19c1e | 33 | #define TSDL_MAGIC 0x75D11D57 |
0f980a35 | 34 | |
a91a962e MD |
35 | #define HEADER_END char end_field |
36 | #define header_sizeof(type) offsetof(typeof(type), end_field) | |
37 | ||
b4c19c1e MD |
38 | struct metadata_packet_header { |
39 | uint32_t magic; /* 0x75D11D57 */ | |
40 | uint8_t uuid[16]; /* Unique Universal Identifier */ | |
41 | uint32_t checksum; /* 0 if unused */ | |
42 | uint32_t content_size; /* in bits */ | |
43 | uint32_t packet_size; /* in bits */ | |
44 | uint8_t compression_scheme; /* 0 if unused */ | |
45 | uint8_t encryption_scheme; /* 0 if unused */ | |
46 | uint8_t checksum_scheme; /* 0 if unused */ | |
a91a962e MD |
47 | HEADER_END; |
48 | }; | |
49 | ||
c054553d | 50 | #endif /* _BABELTRACE_CTF_METADATA_H */ |