diff options
Diffstat (limited to 'src/include/ipxe/peerblk.h')
-rw-r--r-- | src/include/ipxe/peerblk.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/include/ipxe/peerblk.h b/src/include/ipxe/peerblk.h index 6fc9172f..f16f207b 100644 --- a/src/include/ipxe/peerblk.h +++ b/src/include/ipxe/peerblk.h @@ -111,6 +111,10 @@ struct peerdist_block { struct peerdisc_client discovery; /** Current position in discovered peer list */ struct peerdisc_peer *peer; + /** Block download queue */ + struct peerdist_block_queue *queue; + /** List of queued block downloads */ + struct list_head queued; /** Retry timer */ struct retry_timer timer; /** Number of full attempt cycles completed */ @@ -124,6 +128,26 @@ struct peerdist_block { unsigned long attempted; }; +/** PeerDist block download queue */ +struct peerdist_block_queue { + /** Download opening process */ + struct process process; + /** List of queued downloads */ + struct list_head list; + + /** Number of open downloads */ + unsigned int count; + /** Maximum number of open downloads */ + unsigned int max; + + /** Open block download + * + * @v peerblk PeerDist block download + * @ret rc Return status code + */ + int ( * open ) ( struct peerdist_block *peerblk ); +}; + /** Retrieval protocol block fetch response (including transport header) * * @v digestsize Digest size |