iPXE
Data Fields
peerdist_block Struct Reference

A PeerDist block download. More...

#include <peerblk.h>

Data Fields

struct refcnt refcnt
 Reference count. More...
 
struct interface xfer
 Data transfer interface. More...
 
struct interface raw
 Raw data interface. More...
 
struct interface retrieval
 Retrieval protocol interface. More...
 
struct uriuri
 Original URI. More...
 
struct peerdist_range range
 Content range of this block. More...
 
struct peerdist_range trim
 Trimmed range of this block. More...
 
size_t offset
 Offset of first byte in trimmed range within overall download. More...
 
struct digest_algorithmdigest
 Digest algorithm. More...
 
size_t digestsize
 Digest size. More...
 
void * digestctx
 Digest context (statically allocated at instantiation time) More...
 
struct cipher_algorithmcipher
 Cipher algorithm. More...
 
void * cipherctx
 Cipher context (dynamically allocated as needed) More...
 
unsigned int segment
 Segment index. More...
 
uint8_t id [PEERDIST_DIGEST_MAX_SIZE]
 Segment identifier. More...
 
uint8_t secret [PEERDIST_DIGEST_MAX_SIZE]
 Segment secret. More...
 
unsigned int block
 Block index. More...
 
uint8_t hash [PEERDIST_DIGEST_MAX_SIZE]
 Block hash. More...
 
size_t pos
 Current position (relative to incoming data stream) More...
 
size_t start
 Start of trimmed content (relative to incoming data stream) More...
 
size_t end
 End of trimmed content (relative to incoming data stream) More...
 
struct xfer_buffer buffer
 Data buffer. More...
 
struct process process
 Decryption process. More...
 
struct peerdist_block_decrypt decrypt [PEERBLK_NUM_BUFFERS]
 Decryption data buffer descriptors. More...
 
size_t cipher_remaining
 Remaining decryption length. More...
 
size_t digest_remaining
 Remaining digest length (excluding AES padding bytes) More...
 
struct peerdisc_client discovery
 Discovery client. More...
 
struct peerdisc_peerpeer
 Current position in discovered peer list. More...
 
struct peerdist_block_queuequeue
 Block download queue. More...
 
struct list_head queued
 List of queued block downloads. More...
 
struct retry_timer timer
 Retry timer. More...
 
unsigned int cycles
 Number of full attempt cycles completed. More...
 
int rc
 Most recent attempt failure. More...
 
unsigned long started
 Time at which block download was started. More...
 
unsigned long attempted
 Time at which most recent attempt was started. More...
 

Detailed Description

A PeerDist block download.

Definition at line 46 of file peerblk.h.

Field Documentation

◆ refcnt

struct refcnt peerdist_block::refcnt

Reference count.

Definition at line 48 of file peerblk.h.

Referenced by peerblk_open().

◆ xfer

struct interface peerdist_block::xfer

Data transfer interface.

Definition at line 50 of file peerblk.h.

Referenced by peerblk_close(), peerblk_decrypt(), peerblk_deliver(), peerblk_done(), and peerblk_open().

◆ raw

struct interface peerdist_block::raw

Raw data interface.

Definition at line 52 of file peerblk.h.

Referenced by peerblk_close(), peerblk_open(), peerblk_raw_close(), peerblk_raw_open(), peerblk_raw_rx(), and peerblk_reset().

◆ retrieval

struct interface peerdist_block::retrieval

Retrieval protocol interface.

Definition at line 54 of file peerblk.h.

Referenced by peerblk_close(), peerblk_open(), peerblk_reset(), peerblk_retrieval_close(), peerblk_retrieval_open(), and peerblk_retrieval_rx().

◆ uri

struct uri* peerdist_block::uri

Original URI.

Definition at line 57 of file peerblk.h.

Referenced by peerblk_free(), peerblk_open(), and peerblk_raw_open().

◆ range

struct peerdist_range peerdist_block::range

Content range of this block.

Definition at line 59 of file peerblk.h.

Referenced by peerblk_open(), peerblk_parse_block(), peerblk_raw_open(), peerblk_raw_rx(), and peerblk_reset().

◆ trim

struct peerdist_range peerdist_block::trim

Trimmed range of this block.

Definition at line 61 of file peerblk.h.

Referenced by peerblk_open(), and peerblk_reset().

◆ offset

size_t peerdist_block::offset

Offset of first byte in trimmed range within overall download.

Definition at line 63 of file peerblk.h.

Referenced by peerblk_offset(), and peerblk_open().

◆ digest

struct digest_algorithm* peerdist_block::digest

Digest algorithm.

Definition at line 66 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_done(), peerblk_open(), peerblk_raw_rx(), and peerblk_reset().

◆ digestsize

size_t peerdist_block::digestsize

Digest size.

Note that this may be shorter than the digest size of the digest algorithm.

Definition at line 72 of file peerblk.h.

Referenced by peerblk_done(), peerblk_open(), peerblk_parse_block(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_parse_useless(), and peerblk_retrieval_open().

◆ digestctx

void* peerdist_block::digestctx

Digest context (statically allocated at instantiation time)

Definition at line 74 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_done(), peerblk_open(), peerblk_raw_rx(), and peerblk_reset().

◆ cipher

struct cipher_algorithm* peerdist_block::cipher

Cipher algorithm.

Definition at line 77 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_reset(), and peerblk_retrieval_close().

◆ cipherctx

void* peerdist_block::cipherctx

Cipher context (dynamically allocated as needed)

Definition at line 79 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_free(), peerblk_parse_header(), peerblk_parse_iv(), and peerblk_reset().

◆ segment

unsigned int peerdist_block::segment

◆ id

uint8_t peerdist_block::id[PEERDIST_DIGEST_MAX_SIZE]

Segment identifier.

Definition at line 84 of file peerblk.h.

Referenced by peerblk_open(), peerblk_parse_block(), and peerblk_retrieval_open().

◆ secret

uint8_t peerdist_block::secret[PEERDIST_DIGEST_MAX_SIZE]

Segment secret.

Definition at line 86 of file peerblk.h.

Referenced by peerblk_open(), and peerblk_parse_header().

◆ block

unsigned int peerdist_block::block

◆ hash

uint8_t peerdist_block::hash[PEERDIST_DIGEST_MAX_SIZE]

Block hash.

Definition at line 90 of file peerblk.h.

Referenced by peerblk_done(), and peerblk_open().

◆ pos

size_t peerdist_block::pos

Current position (relative to incoming data stream)

Definition at line 93 of file peerblk.h.

Referenced by peerblk_offset(), peerblk_raw_rx(), peerblk_reset(), and peerblk_retrieval_rx().

◆ start

size_t peerdist_block::start

Start of trimmed content (relative to incoming data stream)

Definition at line 95 of file peerblk.h.

Referenced by peerblk_deliver(), peerblk_offset(), peerblk_parse_block(), peerblk_reset(), peerblk_retrieval_open(), and peerblk_retrieval_rx().

◆ end

size_t peerdist_block::end

End of trimmed content (relative to incoming data stream)

Definition at line 97 of file peerblk.h.

Referenced by peerblk_deliver(), peerblk_parse_block(), peerblk_reset(), peerblk_retrieval_open(), and peerblk_retrieval_rx().

◆ buffer

struct xfer_buffer peerdist_block::buffer

◆ process

struct process peerdist_block::process

Decryption process.

Definition at line 102 of file peerblk.h.

Referenced by peerblk_open(), peerblk_reset(), and peerblk_retrieval_close().

◆ decrypt

struct peerdist_block_decrypt peerdist_block::decrypt[PEERBLK_NUM_BUFFERS]

Decryption data buffer descriptors.

Definition at line 104 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_decrypt_read(), peerblk_decrypt_write(), and peerblk_parse_block().

◆ cipher_remaining

size_t peerdist_block::cipher_remaining

Remaining decryption length.

Definition at line 106 of file peerblk.h.

Referenced by peerblk_decrypt(), peerblk_parse_block(), and peerblk_retrieval_close().

◆ digest_remaining

size_t peerdist_block::digest_remaining

Remaining digest length (excluding AES padding bytes)

Definition at line 108 of file peerblk.h.

Referenced by peerblk_decrypt(), and peerblk_parse_block().

◆ discovery

struct peerdisc_client peerdist_block::discovery

Discovery client.

Definition at line 111 of file peerblk.h.

Referenced by peerblk_close(), peerblk_discovered(), peerblk_done(), peerblk_expired(), and peerblk_open().

◆ peer

struct peerdisc_peer* peerdist_block::peer

Current position in discovered peer list.

Definition at line 113 of file peerblk.h.

Referenced by peerblk_discovered(), peerblk_done(), and peerblk_expired().

◆ queue

struct peerdist_block_queue* peerdist_block::queue

Block download queue.

Definition at line 115 of file peerblk.h.

Referenced by peerblk_dequeue(), peerblk_enqueue(), and peerblk_reset().

◆ queued

struct list_head peerdist_block::queued

List of queued block downloads.

Definition at line 117 of file peerblk.h.

Referenced by peerblk_dequeue(), peerblk_enqueue(), peerblk_open(), and peerblk_step().

◆ timer

struct retry_timer peerdist_block::timer

◆ cycles

unsigned int peerdist_block::cycles

Number of full attempt cycles completed.

Definition at line 121 of file peerblk.h.

Referenced by peerblk_expired().

◆ rc

int peerdist_block::rc

Most recent attempt failure.

Definition at line 123 of file peerblk.h.

Referenced by peerblk_done(), peerblk_expired(), peerblk_raw_open(), and peerblk_retrieval_open().

◆ started

unsigned long peerdist_block::started

Time at which block download was started.

Definition at line 126 of file peerblk.h.

Referenced by peerblk_close(), peerblk_discovered(), peerblk_expired(), and peerblk_open().

◆ attempted

unsigned long peerdist_block::attempted

Time at which most recent attempt was started.

Definition at line 128 of file peerblk.h.

Referenced by peerblk_done(), and peerblk_expired().


The documentation for this struct was generated from the following file: