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,
    sequence: SequenceNumber,
    payload: [u8; 32],
) -> PhantomPacket
Expand description

Build a V2 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 a sequence value — pick a fresh per-(session, path_id) counter so the replay window can dedupe duplicates if the same challenge is retransmitted.