Peer Content Caching and Retrieval: Content Identification [MS-PCCRC].
Definition in file pccrc.h.
#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.
Populate content information.
- Parameters
-
data | Raw data |
len | Length of raw data |
info | Content information to fill in |
- Return values
-
Definition at line 670 of file pccrc.c.
681 sizeof (
version ) ) ) != 0 ) {
682 DBGC (
info,
"PCCRC %p could not get version: %s\n",
686 DBGC2 (
info,
"PCCRC %p version %d.%d\n",
698 DBGC (
info,
"PCCRC %p unsupported version %d.%d\n",
709 DBGC2 (
info,
"PCCRC %p range [%08zx,%08zx) covers [%08zx,%08zx) with " 710 "%d segments\n",
info,
info->range.start,
info->range.end,
struct arbelprm_rc_send_wqe rc
#define ENOTSUP
Operation not supported.
static struct peerdist_info_operations peerdist_info_v1_operations
Content information version 1 operations.
u32 version
Driver version.
#define PEERDIST_INFO_V2
Content Information version 2.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
char * strerror(int errno)
Retrieve string representation of error number.
static int peerdist_info_get(const struct peerdist_info *info, void *data, size_t offset, size_t len)
Get raw data.
static uint16_t struct vmbus_xfer_pages_operations * op
static struct peerdist_info_operations peerdist_info_v2_operations
Content information version 2 operations.
#define cpu_to_le16(value)
uint8_t data[48]
Additional event data.
#define NULL
NULL pointer (VOID *)
#define PEERDIST_INFO_V1
Content Information version 1.
Content Information version number.
void * memset(void *dest, int character, size_t len) __nonnull
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.
Populate content information block.
- Parameters
-
segment | Content information segment |
block | Content information block to fill in |
index | Block index |
- Return values
-
Definition at line 767 of file pccrc.c.
781 DBGC (
info,
"PCCRC %p segment %d block %d of [0,%d) out of " 807 DBGC2 (
info,
"PCCRC %p segment %d block %d hash %s\n",
810 DBGC2 (
info,
"PCCRC %p segment %d block %d range [%08zx,%08zx) covers " uint16_t segment
Code segment.
struct arbelprm_rc_send_wqe rc
static const char * peerdist_info_hash_ntoa(const struct peerdist_info *info, const void *hash)
Transcribe hash value (for debugging)
size_t start
Start offset.
uint32_t start
Starting offset.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
struct peerdist_range trim
Trimmed content range.
#define ERANGE
Result too large.
uint8_t block[3][8]
DES-encrypted blocks.
uint32_t end
Ending offset.
#define NULL
NULL pointer (VOID *)
void * memset(void *dest, int character, size_t len) __nonnull
References assert(), block, DBGC, DBGC2, end, ERANGE, index, info, memset(), NULL, peerdist_info_hash_ntoa(), rc, segment, start, peerdist_range::start, and peerdist_info::trim.