Categorygithub.com/wobcom/go-ethtool
modulepackage
1.0.1
Repository: https://github.com/wobcom/go-ethtool.git
Documentation: pkg.go.dev

# README

golang-ethtool

Provides packages for interacting with the Linux kernel's ethtool ioctls. Supports parsing transceiver's EEPROM data according to the standards:

Overview

  • eeprom/eeprom.go provides a unified interface for different EEPROM types.
  • eeprom/sff8472/eeprom.go provides the SFF-8472 implementation
  • eeprom/sff8636/eeprom.go provides the SFF-8636 implementation, which is also used for decoding SFF8463 eeproms.

Usage

Included basic example

A minimal example is included:

go get ./...
cd example
go build

It allows for parsing the EEPROM contents of a given and dumps them to STDOUT: ./example --interface swp42

Transceiver exporter

Prometheus exporter based on this package.

Authors

  • @fluepke
  • @vidister

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewEthtool initializes internal data structure (i.e.

# Constants

GetDriverInfoIoctl ioctl command number for "Get driver info".
IFNAMSIZ is the maximum length of an interface name.
StringSetFeatures Device feature names.
StringSetLinkModes link mode names.
StringSetMsgClasses debug message class names.
StringSetPhyStats PHY Statistic names.
StringSetPhyTunables PPHY tunables names.
StringSetPrivFlag Driver private flag names.
StringSetRssHashFuncs RSS hash function names.
StringSetSofTimestamping SOF_TIMESTAMPING_* flags.
StringSetStats Statistic names.
StringSetTest Self-test result names.
StringSetTimestampRxFilters timestamping Rx filters.
StringSetTimestampTxTypes timestamping Tx types.
StringSetTunables Not documented in the kernel's source code.
StringSetTupleFilters Depracted.
StringSetWolModes wake-on-lan modes.

# Structs

DriverInfo network interface driver information.
Ethtool provides a wrapper around the Kernel's ethtool ioctls.
FeatureStatus describes the status of network interface feature.
Interface representation of a network interface.
TestResult the return type for the PerformSelftest function.

# Type aliases

FeatureList maps the name of a network interfaces feature to a FeatureStatus.
StringSet a set of strings used by some ethtool ioctls.