iPXE
|
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 uri * | uri |
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_algorithm * | digest |
Digest algorithm. More... | |
size_t | digestsize |
Digest size. More... | |
void * | digestctx |
Digest context (statically allocated at instantiation time) More... | |
struct cipher_algorithm * | cipher |
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_peer * | peer |
Current position in discovered peer list. More... | |
struct peerdist_block_queue * | queue |
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... | |
struct refcnt peerdist_block::refcnt |
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
unsigned int peerdist_block::segment |
Segment index.
Definition at line 82 of file peerblk.h.
Referenced by peerblk_decrypt(), peerblk_deliver(), peerblk_done(), peerblk_expired(), peerblk_open(), peerblk_parse_block(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_parse_useless(), peerblk_raw_open(), peerblk_retrieval_close(), peerblk_retrieval_open(), and peerblk_retrieval_rx().
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().
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().
unsigned int peerdist_block::block |
Block index.
Definition at line 88 of file peerblk.h.
Referenced by peerblk_decrypt(), peerblk_deliver(), peerblk_done(), peerblk_expired(), peerblk_open(), peerblk_parse_block(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_parse_useless(), peerblk_raw_open(), peerblk_retrieval_close(), peerblk_retrieval_open(), and peerblk_retrieval_rx().
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().
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().
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().
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().
struct xfer_buffer peerdist_block::buffer |
Data buffer.
Definition at line 99 of file peerblk.h.
Referenced by peerblk_open(), peerblk_parse_block(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_parse_useless(), peerblk_reset(), and peerblk_retrieval_rx().
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().
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().
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().
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().
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().
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().
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().
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().
struct retry_timer peerdist_block::timer |
Retry timer.
Definition at line 119 of file peerblk.h.
Referenced by peerblk_discovered(), peerblk_done(), peerblk_open(), peerblk_raw_open(), peerblk_raw_rx(), peerblk_reset(), peerblk_retrieval_close(), peerblk_retrieval_open(), and peerblk_retrieval_rx().
unsigned int peerdist_block::cycles |
Number of full attempt cycles completed.
Definition at line 121 of file peerblk.h.
Referenced by peerblk_expired().
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().
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().
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().