aboutsummaryrefslogtreecommitdiff
path: root/src/net/interface.go
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2016-09-27 19:54:05 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2016-10-04 03:04:50 +0000
commit2f184c65a5bdd422f88d841bb3a37fa60b3e1d52 (patch)
treee9f9a2583065910e9cb7f50cee76e1e1e2f4d861 /src/net/interface.go
parentcb6bb4062f6a36d0e76f6fe15f78e0bbcd4b71c0 (diff)
downloadgo-2f184c65a5bdd422f88d841bb3a37fa60b3e1d52.tar.xz
net: implement network interface API for Solaris
Fixes #7177. Change-Id: Iba6063905f4f9c6acef8aba76b55d996f186d835 Reviewed-on: https://go-review.googlesource.com/29892 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Diffstat (limited to 'src/net/interface.go')
-rw-r--r--src/net/interface.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/net/interface.go b/src/net/interface.go
index 295ab2dc92..61ee0ce7c3 100644
--- a/src/net/interface.go
+++ b/src/net/interface.go
@@ -10,10 +10,10 @@ import (
"time"
)
-// BUG(mikio): On NaCl, Plan9 and Solaris, methods and functions
-// related to Interface are not implemented.
+// BUG(mikio): On NaCl and Plan9, methods and functions related to
+// Interface are not implemented.
-// BUG(mikio): On DragonFly BSD, NetBSD and OpenBSD, the
+// BUG(mikio): On DragonFly BSD, NetBSD, OpenBSD and Solaris, the
// MulticastAddrs method of Interface is not implemented.
var (
@@ -117,6 +117,10 @@ func InterfaceAddrs() ([]Addr, error) {
}
// InterfaceByIndex returns the interface specified by index.
+//
+// On Solaris, it returns one of the logical network interfaces
+// sharing the logical data link; for more precision use
+// InterfaceByName.
func InterfaceByIndex(index int) (*Interface, error) {
if index <= 0 {
return nil, &OpError{Op: "route", Net: "ip+net", Source: nil, Addr: nil, Err: errInvalidInterfaceIndex}