mod bitset;
mod connection;
mod types;
pub use bitset::EthtoolBitset;
pub use types::*;
pub const ETHTOOL_GENL_NAME: &str = "ethtool";
pub const ETHTOOL_GENL_VERSION: u8 = 1;
pub const ETHTOOL_MCGRP_MONITOR: &str = "monitor";
#[repr(u8)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolCmd {
StrsetGet = 1,
LinkinfoGet = 2,
LinkinfoSet = 3,
LinkmodesGet = 4,
LinkmodesSet = 5,
LinkstateGet = 6,
DebugGet = 7,
DebugSet = 8,
WolGet = 9,
WolSet = 10,
FeaturesGet = 11,
FeaturesSet = 12,
PrivflagsGet = 13,
PrivflagsSet = 14,
RingsGet = 15,
RingsSet = 16,
ChannelsGet = 17,
ChannelsSet = 18,
CoalesceGet = 19,
CoalesceSet = 20,
PauseGet = 21,
PauseSet = 22,
EeeGet = 23,
EeeSet = 24,
TsinfoGet = 25,
CableTestAct = 26,
CableTestTdrAct = 27,
TunnelInfoGet = 28,
FecGet = 29,
FecSet = 30,
ModuleEepromGet = 31,
StatsGet = 32,
PhcVclocksGet = 33,
ModuleGet = 34,
ModuleSet = 35,
PseGet = 36,
PseSet = 37,
RssGet = 38,
PlcaGetCfg = 39,
PlcaSetCfg = 40,
PlcaGetStatus = 41,
MmGet = 42,
MmSet = 43,
PhyGet = 44,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolHeaderAttr {
Unspec = 0,
DevIndex = 1,
DevName = 2,
Flags = 3,
PhyIndex = 4,
}
#[repr(u32)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolFlag {
CompactBitsets = 1 << 0,
OmitReply = 1 << 1,
Stats = 1 << 2,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolBitsetAttr {
Unspec = 0,
Nomask = 1,
Size = 2,
Bits = 3,
Value = 4,
Mask = 5,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolBitsetBitAttr {
Unspec = 0,
Index = 1,
Name = 2,
Value = 3,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolStrsetAttr {
Unspec = 0,
Header = 1,
Stringsets = 2,
CountsOnly = 3,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolStringsetAttr {
Unspec = 0,
Id = 1,
Count = 2,
Strings = 3,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolStringAttr {
Unspec = 0,
Index = 1,
Value = 2,
}
#[repr(u32)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolStringSet {
Test = 0,
Stats = 1,
PrivFlags = 2,
NtupleFltrs = 3,
RssHashFuncs = 4,
Tunables = 5,
PhyStats = 6,
PhyTunables = 7,
LinkModes = 8,
MsgClasses = 9,
WolModes = 10,
SofTimestamping = 11,
TsTypes = 12,
RxFilters = 13,
RssContexts = 14,
StatsStd = 15,
StatsEth = 16,
StatsEthPhy = 17,
StatsEthMac = 18,
StatsEthCtrl = 19,
StatsRmon = 20,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolLinkinfoAttr {
Unspec = 0,
Header = 1,
Port = 2,
Phyaddr = 3,
TpMdiCtrl = 4,
TpMdix = 5,
Transceiver = 6,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolLinkmodesAttr {
Unspec = 0,
Header = 1,
Autoneg = 2,
Supported = 3,
Advertised = 4,
Peer = 5,
Speed = 6,
Duplex = 7,
MasterSlaveCfg = 8,
MasterSlaveState = 9,
Lanes = 10,
RateMatching = 11,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolLinkstateAttr {
Unspec = 0,
Header = 1,
Link = 2,
Sqi = 3,
SqiMax = 4,
ExtState = 5,
ExtSubstate = 6,
ExtDownCnt = 7,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolFeaturesAttr {
Unspec = 0,
Header = 1,
Hw = 2,
Wanted = 3,
Active = 4,
NoChange = 5,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolRingsAttr {
Unspec = 0,
Header = 1,
RxMax = 2,
RxMiniMax = 3,
RxJumboMax = 4,
TxMax = 5,
Rx = 6,
RxMini = 7,
RxJumbo = 8,
Tx = 9,
RxBufLen = 10,
TcpDataSplit = 11,
CqeSize = 12,
TxPush = 13,
RxPush = 14,
TxPushBufLen = 15,
TxPushBufLenMax = 16,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolChannelsAttr {
Unspec = 0,
Header = 1,
RxMax = 2,
TxMax = 3,
OtherMax = 4,
CombinedMax = 5,
RxCount = 6,
TxCount = 7,
OtherCount = 8,
CombinedCount = 9,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolCoalesceAttr {
Unspec = 0,
Header = 1,
RxUsecs = 2,
RxMaxFrames = 3,
RxUsecsIrq = 4,
RxMaxFramesIrq = 5,
TxUsecs = 6,
TxMaxFrames = 7,
TxUsecsIrq = 8,
TxMaxFramesIrq = 9,
StatsBlockUsecs = 10,
UseAdaptiveRx = 11,
UseAdaptiveTx = 12,
PktRateLow = 13,
RxUsecsLow = 14,
RxMaxFramesLow = 15,
TxUsecsLow = 16,
TxMaxFramesLow = 17,
PktRateHigh = 18,
RxUsecsHigh = 19,
RxMaxFramesHigh = 20,
TxUsecsHigh = 21,
TxMaxFramesHigh = 22,
RateSampleInterval = 23,
UseCqeRx = 24,
UseCqeTx = 25,
TxAggrMaxBytes = 26,
TxAggrMaxFrames = 27,
TxAggrTimeUsecs = 28,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolPauseAttr {
Unspec = 0,
Header = 1,
Autoneg = 2,
Rx = 3,
Tx = 4,
Stats = 5,
StatsRxSrc = 6,
}
#[repr(u16)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum EthtoolStatsAttr {
Unspec = 0,
Header = 1,
Groups = 2,
Grp = 3,
Src = 4,
}