From 2f184c65a5bdd422f88d841bb3a37fa60b3e1d52 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Tue, 27 Sep 2016 19:54:05 +0900 Subject: 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 Run-TryBot: Mikio Hara --- src/net/interface.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/net/interface.go') 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} -- cgit v1.3-5-g45d5