5 * Definitions for the Metacube2 protocol, used to communicate with Cubemap.
7 * Note: This file is meant to compile as both C and C++, for easier inclusion
13 #define METACUBE2_SYNC "cube!map" /* 8 bytes long. */
14 #define METACUBE_FLAGS_HEADER 0x1
15 #define METACUBE_FLAGS_NOT_SUITABLE_FOR_STREAM_START 0x2
17 struct metacube2_block_header {
18 char sync[8]; /* METACUBE2_SYNC */
19 uint32_t size; /* Network byte order. Does not include header. */
20 uint16_t flags; /* Network byte order. METACUBE_FLAGS_*. */
21 uint16_t csum; /* Network byte order. CRC16 of size and flags. */
24 uint16_t metacube2_compute_crc(const struct metacube2_block_header *hdr);
26 #endif /* !defined(_METACUBE_H) */