package
0.42.2
Repository: https://github.com/nian0114/dnsproxy.git
Documentation: pkg.go.dev

# Functions

AppendIPAddrs appends the IP addresses got from dns.RR to the specified array.
ContainsIP returns true if any of nets contains ip.
DNSSize returns if buffer size *advertised* in the requests OPT record.
IPFromRR returns the IP address from rr if any.
ReadPrefixed reads a DNS message with a 2-byte prefix containing message length from conn.
SortIPAddrs sorts the specified IP addresses array IPv4 addresses go first, then IPv6 addresses.
UDPGetOOBSize returns maximum size of the received OOB data.
UDPRead udpRead reads the message from c using buf receives payload of size udpOOBSize from the UDP socket.
UDPSetOptions sets flag options on a UDP socket to be able to receive the necessary OOB data.
UDPWrite writes the data to the remoteAddr using conn.
WritePrefixed -- write a DNS message to a TCP connection it first writes a 2-byte prefix followed by the message itself.

# Constants

ErrTooLarge means that a DNS message is larger than 64KiB.