1
0
mirror of https://github.com/golang/go synced 2024-10-02 22:31:22 -06:00
go/src/net/lookup_stub.go
Andrew Pilloud f00362b9ec net: LookupHost and Resolve{TCP,UDP,IP}Addr should use zone from getaddrinfo
The unix and windows getaddrinfo calls return a zone with IPv6
addresses. IPv6 link-local addresses returned are only valid on the
given zone. When the zone is dropped, connections to the address
will fail. This patch replaces IP with IPAddr in several internal
resolver functions, and plumbs through the zone.

Change-Id: Ifea891654f586f15b76988464f82e04a42ccff6d
Reviewed-on: https://go-review.googlesource.com/5851
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2015-03-08 09:58:11 +00:00

50 lines
1.1 KiB
Go

// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl
package net
import "syscall"
func lookupProtocol(name string) (proto int, err error) {
return 0, syscall.ENOPROTOOPT
}
func lookupHost(host string) (addrs []string, err error) {
return nil, syscall.ENOPROTOOPT
}
func lookupIP(host string) (addrs []IPAddr, err error) {
return nil, syscall.ENOPROTOOPT
}
func lookupPort(network, service string) (port int, err error) {
return 0, syscall.ENOPROTOOPT
}
func lookupCNAME(name string) (cname string, err error) {
return "", syscall.ENOPROTOOPT
}
func lookupSRV(service, proto, name string) (cname string, srvs []*SRV, err error) {
return "", nil, syscall.ENOPROTOOPT
}
func lookupMX(name string) (mxs []*MX, err error) {
return nil, syscall.ENOPROTOOPT
}
func lookupNS(name string) (nss []*NS, err error) {
return nil, syscall.ENOPROTOOPT
}
func lookupTXT(name string) (txts []string, err error) {
return nil, syscall.ENOPROTOOPT
}
func lookupAddr(addr string) (ptrs []string, err error) {
return nil, syscall.ENOPROTOOPT
}