pub struct Init<'a> {
pub control: TransferControl,
pub max_block_size: u16,
pub start_offset: Option<u64>,
pub definite_length: Option<u64>,
pub file_designator: &'a [u8],
pub metadata: &'a [u8],
}Expand description
A SendInit or ReceiveInit message (§11.22.5.1).
The two share a format exactly; which one it is decides who sends the data, and that is the opcode, not a field. Everything here is a proposal: the Responder answers with the parameters it will actually use.
Fields§
§control: TransferControlProposed Transfer Control: version and the modes the Initiator supports.
max_block_size: u16Proposed Max Block Size, “exclusive of block header fields, such as a block counter”.
start_offset: Option<u64>Where in the file to start, when the Initiator asks for part of it.
definite_length: Option<u64>The size the Initiator commits to, or expects. None is §11.22.5.1.5’s indefinite
length, and so is a length of zero — the two are the same thing on the wire.
file_designator: &'a [u8]The File Designator: whatever names the payload to the two ends.
metadata: &'a [u8]Optional application metadata, TLV, running to the end of the payload.