fn parse_icmpv6(
packet_bytes: &[u8],
measurement_id: u32,
origin_map: &Vec<Origin>,
) -> Option<(Reply, bool)>
Expand description
Parse ICMPv6 packets (including v6 headers) into a Reply result.
Filters out spoofed packets and only parses ICMP echo replies valid for the current measurement.
§Arguments
-
packet_bytes
- the bytes of the packet to parse -
measurement_id
- the ID of the current measurement -
origin_map
- mapping of origin to origin ID
§Returns
Option<Reply>
- the received ping reply
§Remarks
The function returns None if the packet is not an ICMP echo reply or if the packet is too short to contain the necessary information.
The function also discards packets that do not belong to the current measurement.