18#define PEERDIST_MAGIC_PATH "/116B50EB-ECE2-41ac-8429-9F9E963361B7/"
34#define PEERDIST_MSG_VERSION_1_0 0x00000001UL
37#define PEERDIST_MSG_VERSION_2_0 0x00000002UL
70#define peerdist_msg_segment_t( digestsize ) \
72 struct peerdist_msg_segment segment; \
73 uint8_t id[digestsize]; \
74 uint8_t pad[ ( -(digestsize) ) & 0x3 ]; \
75 } __attribute__ (( packed ))
91#define peerdist_msg_ranges_t( count ) \
93 struct peerdist_msg_ranges ranges; \
94 struct peerdist_msg_range range[count]; \
95 } __attribute__ (( packed ))
108#define peerdist_msg_block_t( len ) \
110 struct peerdist_msg_block block; \
112 } __attribute__ (( packed ))
125#define peerdist_msg_iv_t( blksize ) \
127 struct peerdist_msg_iv iv; \
128 uint8_t data[blksize]; \
129 } __attribute__ (( packed ))
144#define peerdist_msg_useless_vrf_t( vrf_len ) \
146 struct peerdist_msg_useless_vrf vrf; \
147 uint8_t data[vrf_len]; \
148 uint8_t pad[ ( -(vrf_len) ) & 0x3 ]; \
149 } __attribute__ (( packed ))
199#define PEERDIST_MSG_NEGO_REQ_VERSION PEERDIST_MSG_VERSION_1_0
202#define PEERDIST_MSG_NEGO_REQ_TYPE 0x00000000UL
213#define PEERDIST_MSG_NEGO_RESP_VERSION PEERDIST_MSG_VERSION_1_0
216#define PEERDIST_MSG_NEGO_RESP_TYPE 0x00000001UL
234#define peerdist_msg_getblklist_t( digestsize, count ) \
236 struct peerdist_msg_getblklist getblklist; \
237 peerdist_msg_segment_t ( digestsize ) segment; \
238 peerdist_msg_ranges_t ( count ) ranges; \
239 } __attribute__ (( packed ))
242#define PEERDIST_MSG_GETBLKLIST_VERSION PEERDIST_MSG_VERSION_1_0
245#define PEERDIST_MSG_GETBLKLIST_TYPE 0x00000002UL
266#define peerdist_msg_getblks_t( digestsize, count, vrf_len ) \
268 struct peerdist_msg_getblks getblks; \
269 peerdist_msg_segment_t ( digestsize ) segment; \
270 peerdist_msg_ranges_t ( count ) ranges; \
271 peerdist_msg_useless_vrf_t ( vrf_len ); \
272 } __attribute__ (( packed ))
275#define PEERDIST_MSG_GETBLKS_VERSION PEERDIST_MSG_VERSION_1_0
278#define PEERDIST_MSG_GETBLKS_TYPE 0x00000003UL
298#define peerdist_msg_blklist_t( digestsize, count ) \
300 struct peerdist_msg_blklist blklist; \
301 peerdist_msg_segment_t ( digestsize ) segment; \
302 peerdist_msg_ranges_t ( count ) ranges; \
304 } __attribute__ (( packed ))
307#define PEERDIST_MSG_BLKLIST_VERSION PEERDIST_MSG_VERSION_1_0
310#define PEERDIST_MSG_BLKLIST_TYPE 0x00000004UL
336#define peerdist_msg_blk_t( digestsize, len, vrf_len, blksize ) \
338 struct peerdist_msg_blk blk; \
339 peerdist_msg_segment_t ( digestsize ) segment; \
342 peerdist_msg_block_t ( len ) block; \
343 peerdist_msg_useless_vrf_t ( vrf_len ) vrf; \
344 peerdist_msg_iv_t ( blksize ) iv; \
345 } __attribute__ (( packed ))
348#define PEERDIST_MSG_BLK_VERSION PEERDIST_MSG_VERSION_1_0
351#define PEERDIST_MSG_BLK_TYPE 0x00000005UL
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
enum peerdist_msg_algorithm __attribute__
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
peerdist_msg_algorithm
Retrieval protocol cryptographic algorithm IDs.
@ PEERDIST_MSG_AES_192_CBC
AES-192 in CBC mode.
@ PEERDIST_MSG_AES_128_CBC
AES-128 in CBC mode.
@ PEERDIST_MSG_PLAINTEXT
No encryption.
@ PEERDIST_MSG_AES_256_CBC
AES-256 in CBC mode.
Retrieval protocol block fetch response header.
struct peerdist_msg_header hdr
Message header.
Retrieval protocol block list response header.
struct peerdist_msg_header hdr
Message header.
Retrieval protocol data block header.
uint32_t len
Length of data block.
Retrieval protocol block list request header.
struct peerdist_msg_header hdr
Message header.
Retrieval protocol block fetch request header.
struct peerdist_msg_header hdr
Message header.
Retrieval protocol initialisation vector header.
uint32_t blksize
Cipher block size.
Retrieval protocol negotiation request.
struct peerdist_msg_header hdr
Message header.
struct peerdist_msg_versions versions
Supported versions.
Retrieval protocol negotiation response.
struct peerdist_msg_header hdr
Message header.
struct peerdist_msg_versions versions
Supported versions.
Retrieval protocol block range.
uint32_t count
Number of blocks in range.
uint32_t first
First block in range.
Retrieval protocol block range list header.
uint32_t count
Number of ranges.
Retrieval protocol segment ID header.
uint32_t digestsize
Digest size (i.e.
Retrieval protocol useless VRF data header.
uint32_t len
Length of useless VRF data.
Retrieval protocol supported versions.
union peerdist_msg_version max
Maximum supported protocol version.
union peerdist_msg_version min
Minimum supported protocol version.
Retrieval protocol version.
uint32_t raw
Raw version number.
uint16_t minor
Minor version number.
uint16_t major
Major version number.