package
2.12.0+incompatible
Repository: https://github.com/adguardteam/adguarddns.git
Documentation: pkg.go.dev

# Functions

Clone returns a new *Msg which is a deep copy of msg.
ECSFromMsg returns the EDNS Client Subnet option information from msg, if any.
FindLowestTTL gets the lowest TTL among all DNS message's RRs.
IsDO returns true if msg has an EDNS option pseudosection and that pseudosection has the DNSSEC OK (DO) bit set.
NewCloner returns a new properly initialized *Cloner.
NewConstructor returns a properly initialized constructor using conf.
SetMinTTL overrides TTL values of all answer records according to the min TTL.

# Constants

DefaultEDNSUDPSize is the default size used for EDNS content.
MaxTXTStringLen is the maximum length of a single string within a TXT resource record.
ServFailMaxCacheTTL is the maximum time-to-live value for caching SERVFAIL responses in seconds.

# Structs

BadECSError is returned by functions that work with EDNS Client Subnet option when the data in the option is invalid.
BlockingModeCustomIP makes the [dnsmsg.Constructor] return responses with custom IP addresses to A and AAAA requests.
BlockingModeNullIP makes the [dnsmsg.Constructor] return a null-IP response to A and AAAA requests.
BlockingModeNXDOMAIN makes the [dnsmsg.Constructor] return responses with code NXDOMAIN.
BlockingModeREFUSED makes the [dnsmsg.Constructor] return responses with code REFUSED.
Cloner is a pool that can clone common parts of DNS messages with fewer allocations.
Constructor creates DNS messages for blocked or modified responses.
ConstructorConfig is a configuration for the constructor of DNS messages.
ECS is the content of the EDNS Client Subnet option of a DNS message.
EmptyClonerStat is a [ClonerStat] implementation that does nothing.
StructuredDNSErrorsConfig is the configuration structure for the experimental Structured DNS Errors feature.

# Interfaces

BlockingMode is a sum type of all possible ways to construct blocked or modified responses.
ClonerStat is an interface for entities that collect statistics about a [Cloner].

# Type aliases

Class is a semantic alias for uint16 values when they are used as a DNS class code.
RCode is a semantic alias for uint16 values when they are used as a DNS response code RCODE.
RRType is a semantic alias for uint16 values when they are used as a DNS resource record (RR) type.