iPXE
|
Peer Content Caching and Retrieval (PeerDist) protocol block downloads. More...
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ipxe/http.h>
#include <ipxe/iobuf.h>
#include <ipxe/xfer.h>
#include <ipxe/uri.h>
#include <ipxe/timer.h>
#include <ipxe/profile.h>
#include <ipxe/fault.h>
#include <ipxe/pccrr.h>
#include <ipxe/peerblk.h>
Go to the source code of this file.
Macros | |
#define | PEERBLK_DECRYPT_CHUNKSIZE 2048 |
PeerDist decryption chunksize. More... | |
#define | PEERBLK_RAW_MAX 2 |
PeerDist maximum number of concurrent raw block downloads. More... | |
#define | PEERBLK_RAW_OPEN_TIMEOUT ( 10 * TICKS_PER_SEC ) |
PeerDist raw block download attempt initial progress timeout. More... | |
#define | PEERBLK_RAW_RX_TIMEOUT ( 15 * TICKS_PER_SEC ) |
PeerDist raw block download attempt ongoing progress timeout. More... | |
#define | PEERBLK_RETRIEVAL_OPEN_TIMEOUT ( 3 * TICKS_PER_SEC ) |
PeerDist retrieval protocol block download attempt initial progress timeout. More... | |
#define | PEERBLK_RETRIEVAL_RX_TIMEOUT ( 5 * TICKS_PER_SEC ) |
PeerDist retrieval protocol block download attempt ongoing progress timeout. More... | |
#define | PEERBLK_MAX_ATTEMPT_CYCLES 4 |
PeerDist maximum number of full download attempt cycles. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | peerblk_dequeue (struct peerdist_block *peerblk) |
Remove block from download queue. More... | |
static unsigned long | peerblk_timestamp (void) |
Get profiling timestamp. More... | |
static void | peerblk_free (struct refcnt *refcnt) |
Free PeerDist block download. More... | |
static void | peerblk_reset (struct peerdist_block *peerblk, int rc) |
Reset PeerDist block download attempt. More... | |
static void | peerblk_close (struct peerdist_block *peerblk, int rc) |
Close PeerDist block download. More... | |
static size_t | peerblk_offset (struct peerdist_block *peerblk, size_t pos) |
Calculate offset within overall download. More... | |
static int | peerblk_deliver (struct peerdist_block *peerblk, struct io_buffer *iobuf, struct xfer_metadata *meta, size_t pos) |
Deliver download attempt data block. More... | |
static void | peerblk_done (struct peerdist_block *peerblk, int rc) |
Finish PeerDist block download attempt. More... | |
static int | peerblk_raw_open (struct peerdist_block *peerblk) |
Open PeerDist raw block download attempt. More... | |
static int | peerblk_raw_rx (struct peerdist_block *peerblk, struct io_buffer *iobuf, struct xfer_metadata *meta) |
Receive PeerDist raw data. More... | |
static void | peerblk_raw_close (struct peerdist_block *peerblk, int rc) |
Close PeerDist raw block download attempt. More... | |
static void | peerblk_step (struct peerdist_block_queue *queue) |
PeerDist block download queue process. More... | |
static void | peerblk_enqueue (struct peerdist_block *peerblk, struct peerdist_block_queue *queue) |
Add block to download queue. More... | |
static struct uri * | peerblk_retrieval_uri (const char *location) |
Construct PeerDist retrieval protocol URI. More... | |
static int | peerblk_retrieval_open (struct peerdist_block *peerblk, const char *location) |
Open PeerDist retrieval protocol block download attempt. More... | |
static int | peerblk_retrieval_rx (struct peerdist_block *peerblk, struct io_buffer *iobuf, struct xfer_metadata *meta) |
Receive PeerDist retrieval protocol data. More... | |
static int | peerblk_parse_header (struct peerdist_block *peerblk) |
Parse retrieval protocol message header. More... | |
static int | peerblk_parse_block (struct peerdist_block *peerblk, size_t *buf_len) |
Parse retrieval protocol message segment and block details. More... | |
static int | peerblk_parse_useless (struct peerdist_block *peerblk, size_t buf_len, size_t *vrf_len) |
Parse retrieval protocol message useless details. More... | |
static int | peerblk_parse_iv (struct peerdist_block *peerblk, size_t buf_len, size_t vrf_len) |
Parse retrieval protocol message initialisation vector details. More... | |
static int | peerblk_decrypt_read (struct peerdist_block *peerblk, void *data, size_t len) |
Read from decryption buffers. More... | |
static int | peerblk_decrypt_write (struct peerdist_block *peerblk, const void *data, size_t len) |
Write to decryption buffers and update offsets and lengths. More... | |
static void | peerblk_decrypt (struct peerdist_block *peerblk) |
Decrypt one chunk of PeerDist retrieval protocol data. More... | |
static void | peerblk_retrieval_close (struct peerdist_block *peerblk, int rc) |
Close PeerDist retrieval protocol block download attempt. More... | |
static void | peerblk_expired (struct retry_timer *timer, int over __unused) |
Handle PeerDist retry timer expiry. More... | |
static void | peerblk_discovered (struct peerdisc_client *discovery) |
Handle PeerDist peer discovery. More... | |
int | peerblk_open (struct interface *xfer, struct uri *uri, struct peerdist_info_block *block) |
Open PeerDist block download. More... | |
Variables | |
static struct profiler peerblk_download_profiler | __profiler |
PeerDist block download profiler. More... | |
static struct process_descriptor | peerblk_queue_desc |
PeerDist block download queue process descriptor. More... | |
static struct peerdist_block_queue | peerblk_raw_queue |
Raw block download queue. More... | |
static struct interface_operation | peerblk_xfer_operations [] |
PeerDist block download data transfer interface operations. More... | |
static struct interface_descriptor | peerblk_xfer_desc |
PeerDist block download data transfer interface descriptor. More... | |
static struct interface_operation | peerblk_raw_operations [] |
PeerDist block download raw data interface operations. More... | |
static struct interface_descriptor | peerblk_raw_desc |
PeerDist block download raw data interface descriptor. More... | |
static struct interface_operation | peerblk_retrieval_operations [] |
PeerDist block download retrieval protocol interface operations. More... | |
static struct interface_descriptor | peerblk_retrieval_desc |
PeerDist block download retrieval protocol interface descriptor. More... | |
static struct process_descriptor | peerblk_process_desc |
PeerDist block download decryption process descriptor. More... | |
static struct peerdisc_client_operations | peerblk_discovery_operations |
PeerDist block download discovery operations. More... | |
Peer Content Caching and Retrieval (PeerDist) protocol block downloads.
Definition in file peerblk.c.
#define PEERBLK_DECRYPT_CHUNKSIZE 2048 |
#define PEERBLK_RAW_MAX 2 |
PeerDist maximum number of concurrent raw block downloads.
Raw block downloads are expensive if the origin server uses HTTPS, since each concurrent download will require local TLS resources (including potentially large received encrypted data buffers).
Raw block downloads may also be prohibitively slow to initiate when the origin server is using HTTPS and client certificates. Origin servers for PeerDist downloads are likely to be running IIS, which has a bug that breaks session resumption and requires each connection to go through the full client certificate verification.
Limit the total number of concurrent raw block downloads to ameliorate these problems.
This is a policy decision.
#define PEERBLK_RAW_OPEN_TIMEOUT ( 10 * TICKS_PER_SEC ) |
#define PEERBLK_RAW_RX_TIMEOUT ( 15 * TICKS_PER_SEC ) |
#define PEERBLK_RETRIEVAL_OPEN_TIMEOUT ( 3 * TICKS_PER_SEC ) |
#define PEERBLK_RETRIEVAL_RX_TIMEOUT ( 5 * TICKS_PER_SEC ) |
#define PEERBLK_MAX_ATTEMPT_CYCLES 4 |
PeerDist maximum number of full download attempt cycles.
This is the maximum number of times that we will try a full cycle of download attempts (i.e. a retrieval protocol download attempt from each discovered peer plus a raw download attempt from the origin server).
This is a policy decision.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Remove block from download queue.
peerblk | PeerDist block download |
Definition at line 536 of file peerblk.c.
References assert(), INIT_LIST_HEAD, list_del, list_empty, NULL, process_add(), queue, peerdist_block::queue, and peerdist_block::queued.
Referenced by peerblk_reset().
|
inlinestatic |
Get profiling timestamp.
timestamp | Timestamp |
Definition at line 137 of file peerblk.c.
References currticks(), and PROFILING.
Referenced by peerblk_close(), peerblk_discovered(), peerblk_done(), peerblk_expired(), and peerblk_open().
|
static |
Free PeerDist block download.
refcnt | Reference count |
Definition at line 151 of file peerblk.c.
References peerdist_block::cipherctx, container_of, free, peerdist_block::uri, and uri_put().
Referenced by peerblk_open().
|
static |
Reset PeerDist block download attempt.
peerblk | PeerDist block download |
rc | Reason for reset |
Definition at line 166 of file peerblk.c.
References assert(), peerdist_block::buffer, peerdist_block::cipher, peerdist_block::cipherctx, peerdist_block::digest, digest_init(), peerdist_block::digestctx, peerdist_block::end, peerdist_range::end, free, intf_restart(), NULL, peerblk_dequeue(), peerdist_block::pos, peerdist_block::process, process_del(), peerdist_block::queue, peerdist_block::range, peerdist_block::raw, rc, peerdist_block::retrieval, peerdist_block::start, peerdist_range::start, stop_timer(), peerdist_block::timer, peerdist_block::trim, and xferbuf_free().
Referenced by peerblk_close(), peerblk_done(), and peerblk_expired().
|
static |
Close PeerDist block download.
peerblk | PeerDist block download |
rc | Reason for close |
Definition at line 204 of file peerblk.c.
References peerdist_block::discovery, intf_shutdown(), peerblk_reset(), peerblk_timestamp(), peerdisc_close(), profile_custom(), peerdist_block::raw, rc, peerdist_block::retrieval, peerdist_block::started, and peerdist_block::xfer.
Referenced by peerblk_done(), peerblk_expired(), peerblk_open(), and peerblk_step().
|
inlinestatic |
Calculate offset within overall download.
peerblk | PeerDist block download |
pos | Position within incoming data stream |
offset | Offset within overall download |
Definition at line 231 of file peerblk.c.
References peerdist_block::offset, peerdist_block::pos, and peerdist_block::start.
Referenced by peerblk_deliver(), and peerblk_parse_block().
|
static |
Deliver download attempt data block.
peerblk | PeerDist block download |
iobuf | I/O buffer |
meta | Original data transfer metadata |
pos | Position within incoming data stream |
rc | Return status code |
Definition at line 245 of file peerblk.c.
References peerdist_block::block, DBGC, end, peerdist_block::end, xfer_metadata::flags, free_iob(), iob_disown, iob_len(), iob_pull, iob_unput, len, memcpy(), meta(), xfer_metadata::offset, peerblk_offset(), rc, peerdist_block::segment, start, peerdist_block::start, strerror(), peerdist_block::xfer, xfer_deliver(), and XFER_FL_ABS_OFFSET.
Referenced by peerblk_raw_rx(), and peerblk_retrieval_rx().
|
static |
Finish PeerDist block download attempt.
peerblk | PeerDist block download |
rc | Reason for close |
Definition at line 296 of file peerblk.c.
References peerdist_block::attempted, peerdist_block::block, DBGC, DBGC_HDA, peerdist_block::digest, digest_final(), peerdist_block::digestctx, digest_algorithm::digestsize, peerdist_block::digestsize, peerdist_block::discovery, EIO, hash, peerdist_block::hash, head, peerdisc_peer::list, list_entry, memcmp(), NULL, peer, peerdist_block::peer, peerblk_close(), peerblk_reset(), peerblk_timestamp(), peerdisc_stat(), profile_custom(), peerdist_block::rc, rc, peerdisc_client::segment, peerdist_block::segment, segment, start_timer_nodelay(), strerror(), peerdist_block::timer, and peerdist_block::xfer.
Referenced by peerblk_decrypt(), peerblk_raw_close(), peerblk_raw_rx(), peerblk_retrieval_close(), and peerblk_retrieval_rx().
|
static |
Open PeerDist raw block download attempt.
peerblk | PeerDist block download |
rc | Return status code |
Definition at line 358 of file peerblk.c.
References peerdist_block::block, DBGC, DBGC2, peerdist_range::end, ETIMEDOUT, http_get, http_open(), intf_restart(), memset(), NULL, PEERBLK_ANNUL_RATE, PEERBLK_RAW_OPEN_TIMEOUT, range, peerdist_block::range, peerdist_block::raw, peerdist_block::rc, rc, peerdist_block::segment, pci_range::start, peerdist_range::start, start_timer_fixed(), strerror(), peerdist_block::timer, and peerdist_block::uri.
|
static |
Receive PeerDist raw data.
peerblk | PeerDist block download |
iobuf | I/O buffer |
meta | Data transfer metadata |
rc | Return status code |
Definition at line 401 of file peerblk.c.
References io_buffer::data, peerdist_block::digest, digest_update(), peerdist_block::digestctx, peerdist_range::end, free_iob(), intf_restart(), iob_disown, iob_len(), len, meta(), mid, PEERBLK_CORRUPT_RATE, peerblk_deliver(), peerblk_done(), PEERBLK_RAW_RX_TIMEOUT, PEERBLK_STALL_RATE, peerdist_block::pos, peerdist_block::range, peerdist_block::raw, rc, peerdist_range::start, start_timer_fixed(), peerdist_block::timer, and xfer_check_order().
|
static |
Close PeerDist raw block download attempt.
peerblk | PeerDist block download |
rc | Reason for close |
Definition at line 449 of file peerblk.c.
References done, intf_restart(), PEERBLK_ABORT_RATE, peerblk_done(), peerdist_block::raw, and rc.
|
static |
PeerDist block download queue process.
queue | Block download queue |
Definition at line 479 of file peerblk.c.
References INIT_LIST_HEAD, list_del, list_first_entry, peerblk_close(), process_add(), queue, peerdist_block::queued, and rc.
|
static |
Add block to download queue.
peerblk | PeerDist block download |
queue | Block download queue |
Definition at line 516 of file peerblk.c.
References assert(), list_add_tail, list_empty, NULL, process_add(), queue, peerdist_block::queue, and peerdist_block::queued.
Referenced by peerblk_expired().
|
static |
Construct PeerDist retrieval protocol URI.
location | Peer location |
uri | Retrieval URI, or NULL on error |
Definition at line 583 of file peerblk.c.
References parse_uri(), PEERDIST_MAGIC_PATH, snprintf(), and strlen().
Referenced by peerblk_retrieval_open().
|
static |
Open PeerDist retrieval protocol block download attempt.
peerblk | PeerDist block download |
location | Peer location |
rc | Return status code |
Definition at line 602 of file peerblk.c.
References peerdist_block::block, http_request_content::data, DBGC, DBGC2, digestsize, peerdist_block::digestsize, peerdist_block::end, ENOMEM, ETIMEDOUT, htonl, http_open(), http_post, peerdist_block::id, intf_restart(), http_request_content::len, memcpy(), memset(), msg(), NULL, offsetof, PEERBLK_ANNUL_RATE, peerblk_msg_blk_t, PEERBLK_RETRIEVAL_OPEN_TIMEOUT, peerblk_retrieval_uri(), PEERDIST_MSG_AES_128_CBC, peerdist_msg_getblks_t, PEERDIST_MSG_GETBLKS_TYPE, PEERDIST_MSG_GETBLKS_VERSION, peerdist_block::rc, rc, peerdist_block::retrieval, rsp, peerdist_block::segment, peerdist_block::start, start_timer_fixed(), strerror(), peerdist_block::timer, typeof(), and uri_put().
Referenced by peerblk_expired().
|
static |
Receive PeerDist retrieval protocol data.
peerblk | PeerDist block download |
iobuf | I/O buffer |
meta | Data transfer metadata |
rc | Return status code |
Definition at line 675 of file peerblk.c.
References after, before, peerdist_block::block, peerdist_block::buffer, io_buffer::data, DBGC, end, peerdist_block::end, free_iob(), intf_restart(), iob_disown, iob_len(), len, meta(), PEERBLK_CORRUPT_RATE, peerblk_deliver(), peerblk_done(), PEERBLK_RETRIEVAL_RX_TIMEOUT, PEERBLK_STALL_RATE, peerdist_block::pos, rc, peerdist_block::retrieval, peerdist_block::segment, start, peerdist_block::start, start_timer_fixed(), strerror(), peerdist_block::timer, XFER_FL_ABS_OFFSET, and xferbuf_write().
|
static |
Parse retrieval protocol message header.
peerblk | PeerDist block download |
rc | Return status code |
Definition at line 788 of file peerblk.c.
References __attribute__, aes_cbc_algorithm, assert(), peerdist_block::block, peerdist_block::buffer, peerdist_block::cipher, cipher_setkey(), peerdist_block::cipherctx, cipher_algorithm::ctxsize, xfer_buffer::data, DBGC, DBGC2, peerdist_block::digestsize, ENOMEM, ENOTSUP, EPROTO, ERANGE, hdr, htonl, len, xfer_buffer::len, malloc(), msg(), cipher_algorithm::name, ntohl, NULL, PEERDIST_MSG_AES_128_CBC, PEERDIST_MSG_AES_192_CBC, PEERDIST_MSG_AES_256_CBC, PEERDIST_MSG_BLK_TYPE, PEERDIST_MSG_PLAINTEXT, rc, peerdist_block::secret, peerdist_block::segment, and strerror().
Referenced by peerblk_retrieval_close().
|
static |
Parse retrieval protocol message segment and block details.
peerblk | PeerDist block download |
buf_len | Length of buffered data to fill in |
rc | Return status code |
Definition at line 878 of file peerblk.c.
References assert(), be32_to_cpu, peerdist_block::block, peerdist_block::buffer, peerdist_block::cipher_remaining, xfer_buffer::data, data_len, DBGC, peerdist_block::decrypt, peerdist_block::digest_remaining, digestsize, peerdist_block::digestsize, peerdist_block::end, peerdist_range::end, ENOENT, EPROTO, ERANGE, peerdist_block::id, len, xfer_buffer::len, peerdist_block_decrypt::len, memcmp(), msg(), ntohl, peerdist_block_decrypt::offset, offsetof, PEERBLK_AFTER, PEERBLK_BEFORE, PEERBLK_DURING, peerblk_msg_blk_t, peerblk_offset(), peerdist_block::range, peerdist_block::segment, peerdist_block::start, peerdist_range::start, typeof(), and peerdist_block_decrypt::xferbuf.
Referenced by peerblk_retrieval_close().
|
static |
Parse retrieval protocol message useless details.
peerblk | PeerDist block download |
buf_len | Length of buffered data |
vrf_len | Length of uselessness to fill in |
rc | Return status code |
Definition at line 982 of file peerblk.c.
References be32_to_cpu, peerdist_block::block, peerdist_block::buffer, xfer_buffer::data, DBGC, digestsize, peerdist_block::digestsize, ERANGE, len, xfer_buffer::len, msg(), offsetof, peerblk_msg_blk_t, peerdist_block::segment, and typeof().
Referenced by peerblk_retrieval_close().
|
static |
Parse retrieval protocol message initialisation vector details.
peerblk | PeerDist block download |
buf_len | Length of buffered data |
vrf_len | Length of uselessness |
rc | Return status code |
Definition at line 1011 of file peerblk.c.
References blksize, peerdist_block::block, cipher_algorithm::blocksize, peerdist_block::buffer, peerdist_block::cipher, cipher_setiv(), peerdist_block::cipherctx, xfer_buffer::data, DBGC, digestsize, peerdist_block::digestsize, EPROTO, ERANGE, len, xfer_buffer::len, msg(), ntohl, peerblk_msg_blk_t, and peerdist_block::segment.
Referenced by peerblk_retrieval_close().
|
static |
Read from decryption buffers.
peerblk | PeerDist block download |
data | Data buffer |
len | Length to read |
rc | Return status code |
Definition at line 1050 of file peerblk.c.
References data, peerdist_block::decrypt, len, peerdist_block_decrypt::len, peerdist_block_decrypt::offset, rc, peerdist_block_decrypt::xferbuf, and xferbuf_read().
Referenced by peerblk_decrypt().
|
static |
Write to decryption buffers and update offsets and lengths.
peerblk | PeerDist block download |
data | Data buffer |
len | Length to read |
rc | Return status code |
Definition at line 1083 of file peerblk.c.
References data, peerdist_block::decrypt, len, peerdist_block_decrypt::len, peerdist_block_decrypt::offset, rc, peerdist_block_decrypt::xferbuf, and xferbuf_write().
Referenced by peerblk_decrypt().
|
static |
Decrypt one chunk of PeerDist retrieval protocol data.
peerblk | PeerDist block download |
Definition at line 1117 of file peerblk.c.
References assert(), peerdist_block::block, cipher_algorithm::blocksize, peerdist_block::cipher, cipher_decrypt, peerdist_block::cipher_remaining, peerdist_block::cipherctx, data, DBGC, peerdist_block::decrypt, peerdist_block::digest, peerdist_block::digest_remaining, digest_update(), peerdist_block::digestctx, ENOMEM, ENOTSUP, free, malloc(), PEERBLK_DECRYPT_CHUNKSIZE, peerblk_decrypt_read(), peerblk_decrypt_write(), peerblk_done(), PEERBLK_DURING, rc, peerdist_block::segment, strerror(), peerdist_block::xfer, xfer_buffer(), and peerdist_block_decrypt::xferbuf.
|
static |
Close PeerDist retrieval protocol block download attempt.
peerblk | PeerDist block download |
rc | Reason for close |
Definition at line 1207 of file peerblk.c.
References peerdist_block::block, cipher_algorithm::blocksize, peerdist_block::cipher, peerdist_block::cipher_remaining, DBGC, done, EPROTO, intf_restart(), PEERBLK_ABORT_RATE, peerblk_done(), peerblk_parse_block(), peerblk_parse_header(), peerblk_parse_iv(), peerblk_parse_useless(), peerdist_block::process, process_add(), rc, peerdist_block::retrieval, peerdist_block::segment, stop_timer(), and peerdist_block::timer.
|
static |
Handle PeerDist retry timer expiry.
timer | Retry timer |
over | Failure indicator |
Definition at line 1278 of file peerblk.c.
References assert(), peerdist_block::attempted, peerdist_block::block, container_of, peerdist_block::cycles, DBGC, peerdist_block::discovery, ETIMEDOUT, head, peerdisc_peer::list, list_entry, list_for_each_entry_continue, peerdisc_peer::location, NULL, peerdist_block::peer, peerblk_close(), peerblk_enqueue(), PEERBLK_MAX_ATTEMPT_CYCLES, peerblk_raw_queue, peerblk_reset(), peerblk_retrieval_open(), peerblk_timestamp(), profile_custom(), peerdist_block::rc, rc, peerdisc_client::segment, peerdist_block::segment, segment, and peerdist_block::started.
Referenced by peerblk_open().
|
static |
Handle PeerDist peer discovery.
discovery | PeerDist discovery client |
Definition at line 1359 of file peerblk.c.
References container_of, peerdist_block::discovery, NULL, peerdist_block::peer, peerblk_timestamp(), profile_custom(), start_timer_nodelay(), peerdist_block::started, retry_timer::timeout, and peerdist_block::timer.
int peerblk_open | ( | struct interface * | xfer, |
struct uri * | uri, | ||
struct peerdist_info_block * | block | ||
) |
Open PeerDist block download.
xfer | Data transfer interface |
uri | Original URI |
info | Content information block |
rc | Return status code |
Definition at line 1432 of file peerblk.c.
References block, peerdist_block::block, peerdist_block::buffer, digest_algorithm::ctxsize, DBGC2, peerdist_block::digest, peerdist_block::digestctx, digestsize, peerdist_block::digestsize, peerdist_block::discovery, peerdist_range::end, ENOMEM, peerdist_block::hash, peerdist_block::id, info, INIT_LIST_HEAD, intf_init(), intf_plug_plug(), list_empty, memcpy(), peerdist_block::offset, peerblk_close(), peerblk_discovery_operations, peerblk_expired(), peerblk_free(), peerblk_process_desc, peerblk_raw_desc, peerblk_retrieval_desc, peerblk_timestamp(), peerblk_xfer_desc, peerdisc_init(), peerdisc_open(), peerdisc_timeout_secs, peerdisc_segment::peers, peerdist_block::process, process_init_stopped(), peerdist_block::queued, peerdist_block::range, peerdist_block::raw, rc, ref_init, ref_put, peerdist_block::refcnt, peerdist_block::retrieval, peerdist_block::secret, peerdisc_client::segment, peerdist_block::segment, segment, peerdist_range::start, start_timer_fixed(), peerdist_block::started, TICKS_PER_SEC, timeout(), peerdist_block::timer, peerdist_block::trim, peerdist_block::uri, uri_get(), peerdist_block::xfer, xferbuf_malloc_init(), and zalloc().
Referenced by peermux_step().
|
static |
PeerDist block download profiler.
PeerDist block download discovery timeout profiler.
PeerDist block download discovery success profiler.
PeerDist block download attempt timeout profiler.
PeerDist block download attempt failure profiler.
PeerDist block download attempt success profiler.
|
static |
PeerDist block download queue process descriptor.
|
static |
Raw block download queue.
Definition at line 563 of file peerblk.c.
Referenced by peerblk_expired().
|
static |
PeerDist block download data transfer interface operations.
|
static |
PeerDist block download data transfer interface descriptor.
Definition at line 1391 of file peerblk.c.
Referenced by peerblk_open().
|
static |
PeerDist block download raw data interface operations.
|
static |
PeerDist block download raw data interface descriptor.
Definition at line 1401 of file peerblk.c.
Referenced by peerblk_open().
|
static |
PeerDist block download retrieval protocol interface operations.
|
static |
PeerDist block download retrieval protocol interface descriptor.
Definition at line 1411 of file peerblk.c.
Referenced by peerblk_open().
|
static |
PeerDist block download decryption process descriptor.
Definition at line 1416 of file peerblk.c.
Referenced by peerblk_open().
|
static |
PeerDist block download discovery operations.
Definition at line 1420 of file peerblk.c.
Referenced by peerblk_open().