const useTCPOnly …
const useUDPOrTCP …
const maxDNSPacketSize …
var errLameReferral …
var errCannotUnmarshalDNSMessage …
var errCannotMarshalDNSMessage …
var errServerMisbehaving …
var errInvalidDNSResponse …
var errNoAnswerFromDNSServer …
var errServerTemporarilyMisbehaving …
var netedns0 …
func newRequest(q dnsmessage.Question, ad bool) (id uint16, udpReq, tcpReq []byte, err error) { … }
func checkResponse(reqID uint16, reqQues dnsmessage.Question, respHdr dnsmessage.Header, respQues dnsmessage.Question) bool { … }
func dnsPacketRoundTrip(c Conn, id uint16, query dnsmessage.Question, b []byte) (dnsmessage.Parser, dnsmessage.Header, error) { … }
func dnsStreamRoundTrip(c Conn, id uint16, query dnsmessage.Question, b []byte) (dnsmessage.Parser, dnsmessage.Header, error) { … }
func (r *Resolver) exchange(ctx context.Context, server string, q dnsmessage.Question, timeout time.Duration, useTCP, ad bool) (dnsmessage.Parser, dnsmessage.Header, error) { … }
func checkHeader(p *dnsmessage.Parser, h dnsmessage.Header) error { … }
func skipToAnswer(p *dnsmessage.Parser, qtype dnsmessage.Type) error { … }
func extractExtendedRCode(p dnsmessage.Parser, hdr dnsmessage.Header) (dnsmessage.RCode, bool) { … }
func (r *Resolver) tryOneName(ctx context.Context, cfg *dnsConfig, name string, qtype dnsmessage.Type) (dnsmessage.Parser, string, error) { … }
type resolverConfig …
var resolvConf …
func getSystemDNSConfig() *dnsConfig { … }
func (conf *resolverConfig) init() { … }
func (conf *resolverConfig) tryUpdate(name string) { … }
func (conf *resolverConfig) tryAcquireSema() bool { … }
func (conf *resolverConfig) releaseSema() { … }
func (r *Resolver) lookup(ctx context.Context, name string, qtype dnsmessage.Type, conf *dnsConfig) (dnsmessage.Parser, string, error) { … }
func avoidDNS(name string) bool { … }
func (conf *dnsConfig) nameList(name string) []string { … }
type hostLookupOrder …
const hostLookupCgo …
const hostLookupFilesDNS …
const hostLookupDNSFiles …
const hostLookupFiles …
const hostLookupDNS …
var lookupOrderName …
func (o hostLookupOrder) String() string { … }
func (r *Resolver) goLookupHostOrder(ctx context.Context, name string, order hostLookupOrder, conf *dnsConfig) (addrs []string, err error) { … }
func goLookupIPFiles(name string) (addrs []IPAddr, canonical string) { … }
func (r *Resolver) goLookupIP(ctx context.Context, network, host string, order hostLookupOrder, conf *dnsConfig) (addrs []IPAddr, err error) { … }
func (r *Resolver) goLookupIPCNAMEOrder(ctx context.Context, network, name string, order hostLookupOrder, conf *dnsConfig) (addrs []IPAddr, cname dnsmessage.Name, err error) { … }
func (r *Resolver) goLookupCNAME(ctx context.Context, host string, order hostLookupOrder, conf *dnsConfig) (string, error) { … }
func (r *Resolver) goLookupPTR(ctx context.Context, addr string, order hostLookupOrder, conf *dnsConfig) ([]string, error) { … }