Lines Matching full:resolver
21 // The cgo resolver uses C functions like getaddrinfo.
22 // The go resolver reads system files directly and
25 // The netgo build tag prefers the go resolver.
26 // The netcgo build tag prefers the cgo resolver.
29 // However, on Darwin, Plan 9, and Windows the cgo resolver is still available.
30 // On those systems the cgo resolver does not require the cgo tool.
31 // (The term "cgo resolver" was locked in by GODEBUG settings
32 // at a time when the cgo resolver did require the cgo tool.)
34 // Adding netdns=go to GODEBUG will prefer the go resolver.
35 // Adding netdns=cgo to GODEBUG will prefer the cgo resolver.
37 // The Resolver struct has a PreferGo field that user code
38 // may set to prefer the go resolver. It is documented as being
41 // When deciding which resolver to use, we first check the PreferGo field.
44 // If none of those are set, we normally prefer the go resolver by default.
45 // However, if the cgo resolver is available,
46 // there is a complex set of conditions for which we prefer the cgo resolver.
100 println("go package net: built with netgo build tag; using Go's DNS resolver")
102 println("go package net: GODEBUG setting forcing use of Go's resolver")
105 println("go package net: cgo resolver not supported; using Go's DNS resolver")
107 println("go package net: using cgo DNS resolver")
109 println("go package net: dynamic selection of DNS resolver")
117 // By default, prefer the go resolver.
120 // If the cgo resolver is not available, we can't prefer it.
125 // Some operating systems always prefer the cgo resolver.
137 // If any environment-specified resolver options are specified,
138 // prefer the cgo resolver.
156 // the cgo resolver.
160 // cgo resolver (which doesn't use the cgo tool) rather than
161 // the go resolver. This is because originally these
162 // systems did not support the go resolver.
173 // DNS requests don't work on Android, so prefer the cgo resolver.
184 // required to use the go resolver. The provided Resolver is optional.
185 // This will report true if the cgo resolver is not available.
186 func (c *conf) mustUseGoResolver(r *Resolver) bool {
193 // implementation when there's a non-nil Resolver with a
208 // The provided Resolver is optional. nil means to not consider its options.
210 func (c *conf) addrLookupOrder(r *Resolver, addr string) (ret hostLookupOrder, dnsConf *dnsConfig) {
220 // The provided Resolver is optional. nil means to not consider its options.
222 func (c *conf) hostLookupOrder(r *Resolver, hostname string) (ret hostLookupOrder, dnsConf *dnsConf…
231 func (c *conf) lookupOrder(r *Resolver, hostname string) (ret hostLookupOrder, dnsConf *dnsConfig) {
237 // Go resolver was explicitly requested
238 // or cgo resolver is not available.
243 // Cgo resolver was explicitly requested.
246 // Given a choice, we prefer the cgo resolver.
249 // Neither resolver was explicitly requested
271 // That will use cgo unless the Go resolver was explicitly requested.
273 // than fallbackOrder to use the Go resolver with that order.
349 // which the go resolver doesn't support.
388 // Let the cgo resolver handle myhostname
401 // because Go's native resolver doesn't do mDNS or
445 // happen if we can't use the cgo resolver, treat it as DNS,
456 // or where the Go resolver has been forced.