use crate::{Error, InterfaceOperationalState, IpNetwork, MacAddr, NetworkData};
use std::collections::HashMap;
use std::ffi::OsString;
pub(crate) struct NetworksInner {
pub(crate) interfaces: HashMap<OsString, NetworkData>,
}
impl NetworksInner {
pub(crate) fn new() -> Result<Self, Error> {
Err(Error::Unsupported)
}
pub(crate) fn list(&self) -> &HashMap<OsString, NetworkData> {
&self.interfaces
}
pub(crate) fn refresh(&mut self, _remove_not_listed_interfaces: bool) {}
}
pub(crate) struct NetworkDataInner;
impl NetworkDataInner {
pub(crate) fn received(&self) -> u64 {
0
}
pub(crate) fn total_received(&self) -> u64 {
0
}
pub(crate) fn transmitted(&self) -> u64 {
0
}
pub(crate) fn total_transmitted(&self) -> u64 {
0
}
pub(crate) fn packets_received(&self) -> u64 {
0
}
pub(crate) fn total_packets_received(&self) -> u64 {
0
}
pub(crate) fn packets_transmitted(&self) -> u64 {
0
}
pub(crate) fn total_packets_transmitted(&self) -> u64 {
0
}
pub(crate) fn errors_on_received(&self) -> u64 {
0
}
pub(crate) fn total_errors_on_received(&self) -> u64 {
0
}
pub(crate) fn errors_on_transmitted(&self) -> u64 {
0
}
pub(crate) fn total_errors_on_transmitted(&self) -> u64 {
0
}
pub(crate) fn mac_address(&self) -> MacAddr {
MacAddr::UNSPECIFIED
}
pub(crate) fn ip_networks(&self) -> &[IpNetwork] {
&[]
}
pub(crate) fn mtu(&self) -> u64 {
0
}
pub(crate) fn transmit_link_speed(&self) -> Option<u64> {
None
}
pub(crate) fn receive_link_speed(&self) -> Option<u64> {
None
}
pub(crate) fn operational_state(&self) -> InterfaceOperationalState {
InterfaceOperationalState::Other
}
}