For invoking ioctl with the SIOCETHTOOL request, only EthtoolDrvinfo is supported by x/sys/unix at the moment. This is a proposal to implement support for ethtool_cmd and ethtool_value structs as follows:
- Add new structs
type EthtoolCmd struct {
// struct ethtool_cmd from ethtool.h
}
type EthtoolValue struct {
// struct ethtool_value from ethtool.h
}
- Add new ioctl wrapper functions
func IoctlEthtoolCmd(fd int, ifname string, eCmd *EthtoolCmd) error
func IoctlEthtoolValue(fd int, ifname string, eValue *EthtoolValue) error