Function parse_dnsv6

Source
fn parse_dnsv6(
    packet_bytes: &[u8],
    measurement_type: u8,
    origin_map: &Vec<Origin>,
) -> Option<(Reply, bool)>
Expand description

Parse DNSv6 packets (including v6 headers) into a Reply.

Filters out spoofed packets and only parses DNS replies valid for the current measurement.

§Arguments

  • packet_bytes - the bytes of the packet to parse

  • measurement_type - the type of measurement being performed

  • origin_map - mapping of origin to origin ID

§Returns

  • Option<Reply> - the received DNS reply

§Remarks

The function returns None if the packet is too short to contain a UDP header.