Function parse_dns_a_record_v4

Source
fn parse_dns_a_record_v4(packet_bytes: &[u8]) -> Option<DnsResult>
Expand description

Attempts to parse the DNS A record from a UDP payload body.

§Arguments

  • packet_bytes - the bytes of the packet to parse

§Returns

  • Option<UdpResult, u16, u128, u128, bool> - the UDP result containing the DNS A record with the source port and source and destination addresses and whether it is a discovery packet TODO rustdoc

§Remarks

The function returns None if the packet is too short to contain a DNS A record.