I'm looking at the NetworkInterface class and a few things stand out.
It's missing the attributes MTU, Running, Broadcast, Multicast, Loopback, PointToPoint. I've a patch for this which I will post, and it's trivial enough.
The second observation is that the index() function is misleading. It doesn't return the OS's index as known by SIOCGIFINDEX, for instance. It's overloaded instead to indicate the presence of IPv4 and/or IPv6 addresses. Frankly, I'd rather have it just return the index, and have a different mechanism for testing for IPv4 and IPv6 state.
On the subject of IPv4 and IPv6 state, an interface can have multiple addresses (including having both IPv6 and IPv4, or multiple instances of each).
Why not have a list of address/netmask/broadcast address triples for IPv4 and IPv6, and have functions like supportsIPv4() just test for a non-empty list of IPv4 addresses?





