1 #ifndef _IPXE_PEERBLK_H 2 #define _IPXE_PEERBLK_H 158 #define peerblk_msg_blk_t( digestsize, len, vrf_len, blksize ) \ 160 struct peerdist_msg_transport_header hdr; \ 161 peerdist_msg_blk_t ( digestsize, len, vrf_len, \ 163 } __attribute__ (( packed ))
struct list_head list
List of queued downloads.
struct xfer_buffer buffer
Data buffer.
Data after the trimmed content.
size_t digest_remaining
Remaining digest length (excluding AES padding bytes)
struct interface retrieval
Retrieval protocol interface.
void * digestctx
Digest context (statically allocated at instantiation time)
A PeerDist retrieval protocol decryption buffer descriptor.
size_t offset
Offset of first byte in trimmed range within overall download.
unsigned int cycles
Number of full attempt cycles completed.
struct peerdisc_client discovery
Discovery client.
Peer Content Caching and Retrieval (PeerDist) protocol peer discovery.
struct cipher_algorithm * cipher
Cipher algorithm.
A doubly-linked list entry (or list head)
size_t end
End of trimmed content (relative to incoming data stream)
Data before the trimmed content.
struct digest_algorithm * digest
Digest algorithm.
Data within the trimmed content.
A content information block.
struct uri * uri
Original URI.
int rc
Most recent attempt failure.
struct peerdist_range range
Content range of this block.
unsigned int max
Maximum number of open downloads.
A PeerDist block download.
A PeerDist discovery client.
int(* open)(struct peerdist_block *peerblk)
Open block download.
struct peerdist_block_queue * queue
Block download queue.
unsigned int segment
Segment index.
struct interface raw
Raw data interface.
size_t offset
Offset within data transfer buffer.
unsigned int block
Block index.
struct peerdisc_peer * peer
Current position in discovered peer list.
struct interface xfer
Data transfer interface.
uint8_t hash[PEERDIST_DIGEST_MAX_SIZE]
Block hash.
Peer Content Caching and Retrieval: Content Identification [MS-PCCRC].
void * cipherctx
Cipher context (dynamically allocated as needed)
PeerDist block download queue.
struct xfer_buffer * xferbuf
Data transfer buffer.
size_t digestsize
Digest size.
size_t start
Start of trimmed content (relative to incoming data stream)
unsigned long started
Time at which block download was started.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct list_head queued
List of queued block downloads.
int peerblk_open(struct interface *xfer, struct uri *uri, struct peerdist_info_block *block)
Open PeerDist block download.
unsigned long attempted
Time at which most recent attempt was started.
#define PEERDIST_DIGEST_MAX_SIZE
Maximum digest size for any supported algorithm.
unsigned int count
Number of open downloads.
struct peerdist_block_decrypt decrypt[PEERBLK_NUM_BUFFERS]
Decryption data buffer descriptors.
uint8_t secret[PEERDIST_DIGEST_MAX_SIZE]
Segment secret.
A message digest algorithm.
Number of decryption buffers.
struct peerdist_range trim
Trimmed range of this block.
A Uniform Resource Identifier.
size_t cipher_remaining
Remaining decryption length.
peerdist_block_decrypt_index
PeerDist retrieval protocol decryption data transfer buffer indices.
size_t pos
Current position (relative to incoming data stream)
size_t len
Length to use from data transfer buffer.
A PeerDist discovery peer.