go/src/net/dnsclient.go

// provided by runtime
//
//go:linkname runtime_rand runtime.rand
func runtime_rand() uint64

func randInt() int {}

func randIntn(n int) int {}

// reverseaddr returns the in-addr.arpa. or ip6.arpa. hostname of the IP
// address addr suitable for rDNS (PTR) record lookup or an error if it fails
// to parse the IP address.
func reverseaddr(addr string) (arpa string, err error) {}

func equalASCIIName(x, y dnsmessage.Name) bool {}

// isDomainName checks if a string is a presentation-format domain name
// (currently restricted to hostname-compatible "preferred name" LDH labels and
// SRV-like "underscore labels"; see golang.org/issue/12421).
//
// isDomainName should be an internal detail,
// but widely used packages access it using linkname.
// Notable members of the hall of shame include:
//   - github.com/sagernet/sing
//
// Do not remove or change the type signature.
// See go.dev/issue/67401.
//
//go:linkname isDomainName
func isDomainName(s string) bool {}

// absDomainName returns an absolute domain name which ends with a
// trailing dot to match pure Go reverse resolver and all other lookup
// routines.
// See golang.org/issue/12189.
// But we don't want to add dots for local names from /etc/hosts.
// It's hard to tell so we settle on the heuristic that names without dots
// (like "localhost" or "myhost") do not get trailing dots, but any other
// names do.
func absDomainName(s string) string {}

type SRV

type byPriorityWeight

// shuffleByWeight shuffles SRV records by weight using the algorithm
// described in RFC 2782.
func (addrs byPriorityWeight) shuffleByWeight() {}

// sort reorders SRV records as specified in RFC 2782.
func (addrs byPriorityWeight) sort() {}

type MX

type byPref

// sort reorders MX records as specified in RFC 5321.
func (s byPref) sort() {}

type NS