Skip to main content

build_path_validation_packet

Function build_path_validation_packet 

Source
pub fn build_path_validation_packet(
    session_id: SessionId,
    path_id: u8,
    packet_number: u64,
    payload: [u8; 32],
) -> PhantomPacket
Available on crate feature std only.
Expand description

Build a PATH_VALIDATION packet carrying the given 32-byte challenge/response payload on the supplied path_id.

The control stream is hard-coded to id 0. The caller supplies the per-direction packet_number (① — Phase 4) so the replay window can dedupe a retransmitted challenge.