code: func (e *Ethtool) Stats(intf string) (map[string]uint64, error) {
  	drvinfo := ethtoolDrvInfo{
  		cmd: ETHTOOL_GDRVINFO,
  	}
  
  	if err := e.ioctl(intf, uintptr(unsafe.Pointer(&drvinfo))); err != nil {
  		return nil, err
  	}
  
  	if drvinfo.n_stats*ETH_GSTRING_LEN > MAX_GSTRINGS*ETH_GSTRING_LEN {
  		return nil, fmt.Errorf("ethtool currently doesn't support more than %d entries, received %d", MAX_GSTRINGS, drvinfo.n_stats)
  	}
  
  	gstrings := ethtoolGStrings{
  		cmd:        ETHTOOL_GSTRINGS,
  		string_set: ETH_SS_STATS,
  		len:        drvinfo.n_stats,
  		data:       [MAX_GSTRINGS * ETH_GSTRING_LEN]byte{},
  	}
  
  	if err := e.ioctl(intf, uintptr(unsafe.Pointer(&gstrings))); err != nil {
  		return nil, err
  	}
  
  	stats := ethtoolStats{
  		cmd:     ETHTOOL_GSTATS,
  		n_stats: drvinfo.n_stats,
  		data:    [MAX_GSTRINGS]uint64{},
  	}
  
  	if err := e.ioctl(intf, uintptr(unsafe.Pointer(&stats))); err != nil {
  		return nil, err
  	}
  
  	var result = make(map[string]uint64)
  	for i := 0; i != int(drvinfo.n_stats); i++ {
  		b := gstrings.data[i*ETH_GSTRING_LEN : i*ETH_GSTRING_LEN+ETH_GSTRING_LEN]
  		key := string(b[:strings.Index(string(b), "\x00")])
  		if len(key) != 0 {
  			result[key] = stats.data[i]
  		}
  	}
  
  	return result, nil
  }
docs: // Stats retrieves stats of the given interface name.