|
iPXE
|
Peer Content Caching and Retrieval: Content Identification [MS-PCCRC]. More...
Go to the source code of this file.
Data Structures | |
| union | peerdist_info_version |
| Content Information version number. More... | |
| struct | peerdist_info_v1 |
| Content Information version 1 data structure header. More... | |
| struct | peerdist_info_v1_segment |
| Content Information version 1 segment description header. More... | |
| struct | peerdist_info_v1_block |
| Content Information version 1 block description header. More... | |
| struct | peerdist_info_v2 |
| Content Information version 2 data structure header. More... | |
| struct | peerdist_info_v2_chunk |
| Content Information version 2 chunk description header. More... | |
| struct | peerdist_info_v2_segment |
| Content Information version 2 segment description header. More... | |
| struct | peerdist_raw |
| Raw content information. More... | |
| struct | peerdist_range |
| A content range. More... | |
| struct | peerdist_info |
| Content information. More... | |
| struct | peerdist_info_segment |
| A content information segment. More... | |
| struct | peerdist_info_block |
| A content information block. More... | |
| struct | peerdist_info_operations |
| Content information operations. More... | |
Macros | |
| #define | PEERDIST_INFO_V1 0x0100 |
| Content Information version 1. | |
| #define | PEERDIST_INFO_V2 0x0200 |
| Content Information version 2. | |
| #define | PEERDIST_INFO_V1_HASH_SHA256 0x0000800cUL |
| SHA-256 hash algorithm. | |
| #define | PEERDIST_INFO_V1_HASH_SHA384 0x0000800dUL |
| SHA-384 hash algorithm. | |
| #define | PEERDIST_INFO_V1_HASH_SHA512 0x0000800eUL |
| SHA-512 hash algorithm. | |
| #define | peerdist_info_v1_segment_t(digestsize) |
| Content Information version 1 segment description. | |
| #define | peerdist_info_v1_block_t(digestsize, blocks) |
| Content Information version 1 block description. | |
| #define | PEERDIST_INFO_V2_HASH_SHA512_TRUNC 0x04 |
| SHA-512 hash algorithm with output truncated to first 256 bits. | |
| #define | peerdist_info_v2_chunk_t(digestsize) |
| Content Information version 2 chunk description. | |
| #define | PEERDIST_INFO_V2_CHUNK_TYPE 0x00 |
| Chunk type. | |
| #define | peerdist_info_v2_segment_t(digestsize) |
| Content Information version 2 segment description. | |
| #define | PEERDIST_DIGEST_MAX_SIZE 64 |
| Maximum digest size for any supported algorithm. | |
| #define | PEERDIST_SEGMENT_ID_MAGIC L"MS_P2P_CACHING" |
| Magic string constant used to calculate segment identifier. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| int | peerdist_info (const void *data, size_t len, struct peerdist_info *info) |
| Populate content information. | |
| int | peerdist_info_segment (const struct peerdist_info *info, struct peerdist_info_segment *segment, unsigned int index) |
| Populate content information segment. | |
| int | peerdist_info_block (const struct peerdist_info_segment *segment, struct peerdist_info_block *block, unsigned int index) |
| Populate content information block. | |
Variables | |
| struct digest_algorithm | sha512_trunc_algorithm |
Peer Content Caching and Retrieval: Content Identification [MS-PCCRC].
Definition in file pccrc.h.
| #define PEERDIST_INFO_V1 0x0100 |
Content Information version 1.
Definition at line 46 of file pccrc.h.
Referenced by peerdist_info(), and peerdist_info_v1().
| #define PEERDIST_INFO_V2 0x0200 |
Content Information version 2.
Definition at line 49 of file pccrc.h.
Referenced by peerdist_info(), and peerdist_info_v2().
| #define PEERDIST_INFO_V1_HASH_SHA256 0x0000800cUL |
| #define PEERDIST_INFO_V1_HASH_SHA384 0x0000800dUL |
| #define PEERDIST_INFO_V1_HASH_SHA512 0x0000800eUL |
| #define peerdist_info_v1_segment_t | ( | digestsize | ) |
Content Information version 1 segment description.
| digestsize | Digest size |
Definition at line 146 of file pccrc.h.
Referenced by peerdist_info_v1_block_offset(), and peerdist_info_v1_segment().
| #define peerdist_info_v1_block_t | ( | digestsize, | |
| blocks ) |
Content Information version 1 block description.
| digestsize | Digest size |
| blocks | Number of blocks |
Definition at line 179 of file pccrc.h.
Referenced by peerdist_info_v1_block(), and peerdist_info_v1_block_offset().
| #define PEERDIST_INFO_V2_HASH_SHA512_TRUNC 0x04 |
SHA-512 hash algorithm with output truncated to first 256 bits.
Definition at line 225 of file pccrc.h.
Referenced by peerdist_info_v2().
| #define peerdist_info_v2_chunk_t | ( | digestsize | ) |
Content Information version 2 chunk description.
| digestsize | Digest size |
Definition at line 250 of file pccrc.h.
| #define peerdist_info_v2_segment_t | ( | digestsize | ) |
Content Information version 2 segment description.
| digestsize | Digest size |
Definition at line 280 of file pccrc.h.
Referenced by peerdist_info_v2_cursor_next(), and peerdist_info_v2_segment().
| #define PEERDIST_DIGEST_MAX_SIZE 64 |
Maximum digest size for any supported algorithm.
The largest digest size that we support is for SHA-512 at 64 bytes
Definition at line 298 of file pccrc.h.
Referenced by peerdist_info_hash_ntoa().
| #define PEERDIST_SEGMENT_ID_MAGIC L"MS_P2P_CACHING" |
Magic string constant used to calculate segment identifier.
Note that the MS-PCCRC specification states that this constant is
"the null-terminated ASCII string constant "MS_P2P_CACHING"; string literals are all ASCII strings with NULL terminators unless otherwise noted."
The specification lies. This constant is a UTF-16LE string, not an ASCII string. The terminating wNUL is included within the constant.
Definition at line 391 of file pccrc.h.
Referenced by peerdist_info_segment_hash().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Populate content information.
| data | Raw data |
| len | Length of raw data |
| info | Content information to fill in |
| rc | Return status code |
Definition at line 670 of file pccrc.c.
References assert, cpu_to_le16, data, DBGC, DBGC2, ENOTSUP, info, len, memset(), NULL, peerdist_info_get(), PEERDIST_INFO_V1, peerdist_info_v1_operations, PEERDIST_INFO_V2, peerdist_info_v2_operations, rc, strerror(), and version.
|
extern |
Populate content information segment.
| info | Content information |
| segment | Content information segment to fill in |
| index | Segment index |
| rc | Return status code |
Definition at line 724 of file pccrc.c.
References assert, DBGC, DBGC2, ERANGE, index, info, memset(), NULL, peerdist_info_hash_ntoa(), rc, and segment.
|
extern |
Populate content information block.
| segment | Content information segment |
| block | Content information block to fill in |
| index | Block index |
| rc | Return status code |
Definition at line 768 of file pccrc.c.
References assert, block, DBGC, DBGC2, end, ERANGE, index, info, memset(), NULL, peerdist_info_hash_ntoa(), rc, segment, peerdist_range::start, start, and peerdist_info::trim.
|
extern |