net, syscall: implement network interface API on Solaris #7177
One issue with the code is that it fails the net.TestInterfaces
It would seem that the go code assumes that an ifindex on an interface uniquely refers to a set of properties on the interface. On Solaris... ifindex+family uniquely describe this.
So, on my box there are two interfaces with ifindex: 1... one is IPv4 and the other is IPv6... the test fails because these two interfaces have different MTUs.
I see two solution... fake an ifindex, or unbreak this uniqueness assumption.
Actually fudging the ifindex isn't useful. That test does a check by name as well. There are certainly two lo0's on my box... and they definitely have different MTUs. So, back to square one... almost need to simply annotate that the test assumptions aren't valid on Illumos/Solaris.
This change introduces a package that provides basic functions for the manipulation of logical network interfaces, interface addresses and data links on Solaris. As BSD variants implement routing socket and routing messages, Linux implements netlink socket and netlink messages, Solaris implements STREAMS-like interface for reading, writing network facility information inside the kernel. The package wraps various I/O control calls which involve message exchanges between kernel protocol modules in exposed APIs. At present, the package supports Solaris 11 or above. Updates golang/go#7177. Change-Id: I192d85e53b0bee942dfefca0f73a3eb94ab8bfe9 Reviewed-on: https://go-review.googlesource.com/29893 Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org>