fn parse_dns_a_record(
packet_bytes: &[u8],
is_ipv6: bool,
m_id: u32,
) -> Option<DnsResult>Expand description
Attempts to parse the DNS A record from a DNS payload body.
§Arguments
packet_bytes- the bytes of the packet to parseis_ipv6- whether this is an IPv6 measurementm_id- measurement ID to validate against the QNAME-encoded value
§Returns
Option<DnsResult>- the DNS result containing the DNS A record with the source port and source and destination addresses and whether it is a discovery packet
§Remarks
The function returns None if the packet is too short to contain a DNS A record, or if the measurement ID encoded in the QNAME does not match the current measurement.