Expand description
Cross-platform link-quality sensing: the radio / interface stats the adaptive controller reads to anticipate loss before the in-band loss estimate sees it.
Each OS exposes a different best signal, normalized behind one trait:
- Linux:
/sys/class/net/<iface>/statisticsdrop and error counters (delta-based drop rate). Works on any interface, wired or wireless - the relevant signal on a wired / virtual link where no RSSI exists. - Windows: both
WlanQueryInterfaceconnection signal quality (0..100, the RSSI-equivalent) on a Wi-Fi interface AND theGetIfTable2discard / error counters on ANY adapter (the Ethernet path, and a fallback where there is no Wi-Fi). The worse of the two wins, so wired and wireless links are both covered. - macOS / other: a stub returning “unknown” until a CoreWLAN backend lands.
The controller fuses LinkSnapshot::link_stress (0..1) with the
loss / burstiness / delay sensors: a degrading link raises protection
pre-emptively.
Structs§
- Link
Snapshot - A normalized link-quality reading. Every field is optional because no single platform / interface exposes them all.
- Stub
Sensor - A sensor that knows nothing (macOS until CoreWLAN lands, and any other target). Always returns an empty snapshot.
Enums§
- Link
Class - The kind of link the local interface presents. A class change (Wi-Fi to cellular, a wired uplink dropping to Wi-Fi) is a path event in its own right.
Traits§
- Link
Sensor - A pollable link-quality sensor.
sampleis called on the controller’s slow cadence (not per packet).
Functions§
- platform_
sensor - Construct the best link sensor for this platform.
ifacenames the interface to watch (Linux);Noneauto-detects the first non-loopback up interface.