Skip to main content

parse_path_validation

Function parse_path_validation 

Source
pub fn parse_path_validation(
    packet: &PhantomPacket,
) -> Result<Option<ParsedPathValidation>, PathValidationParseError>
Expand description

Attempt to parse a V2 packet as a PATH_VALIDATION frame.

Returns:

  • Ok(Some(...)) when the packet is a well-formed PATH_VALIDATION (correct flag + correct payload length).
  • Ok(None) when the packet is a valid V2 frame but NOT a PATH_VALIDATION frame — the caller routes it normally.
  • Err(...) when the PATH_VALIDATION flag is set but the payload length is wrong.