EthInterfaceStatsProvider class final
Renders generic Ethernet-like interface status and counters for control API.
This provider is protocol-agnostic and can be used for both us0 and et1 when they are backed by the same EthNetifRuntime contract.
Public static variables
- static size_t kCountersFieldCount constexpr
- static size_t kStatusFieldCount constexpr
Constructors, destructors, conversion operators
- EthInterfaceStatsProvider(const IEthNetifStatsSource& source, std::string_view iface_name, std::string_view module_name)
- Builds provider bound to one interface identity and one snapshot source.
Public functions
-
auto append_target_wire_values(std::string_view target,
prf::
control:: ResponseWriter* out) const -> bool - Encodes one target as wire
valuesmap entries. - auto connected() const -> bool
- Returns true when runtime reports both ready state and link-up.
- auto iface_name() const -> std::string_view
- Returns interface name used in control payloads (for example
us0). - auto module_name() const -> std::string_view
- Returns module identity used in control payloads (for example
usb/eth). - auto target_field_count(std::string_view target) const -> size_t
- auto targets() const -> std::span<const char*const>
- Returns supported read-only control targets.