#[allow(unused_imports)]
use crate::error::Result;
#[allow(unused_imports)]
use crate::IntoAddress;
#[allow(unused_imports)]
use std::net::IpAddr;
#[allow(dead_code)]
pub(crate) const ETHER_ADDR_LEN: u8 = 6;
pub trait AbstractDevice {
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd"
))]
fn name(&self) -> Result<String>;
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "freebsd"))]
fn set_name(&self, name: &str) -> Result<()>;
#[cfg(any(
target_os = "linux",
target_os = "macos",
target_os = "freebsd",
target_os = "windows"
))]
fn enabled(&self, value: bool) -> Result<()>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd"
))]
fn address(&self) -> Result<IpAddr>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd"
))]
fn destination(&self) -> Result<IpAddr>;
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))]
fn broadcast(&self) -> Result<IpAddr>;
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))]
fn set_broadcast<A: IntoAddress>(&self, value: A) -> Result<()>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd"
))]
fn netmask(&self) -> Result<IpAddr>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd"
))]
fn set_network_address<A: IntoAddress>(
&self,
address: A,
netmask: A,
destination: Option<A>,
) -> Result<()>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd",
))]
fn mtu(&self) -> Result<u16>;
#[cfg(any(
target_os = "windows",
target_os = "linux",
target_os = "macos",
target_os = "freebsd",
))]
fn set_mtu(&self, value: u16) -> Result<()>;
#[cfg(any(target_os = "macos", target_os = "ios"))]
fn ignore_packet_info(&self) -> bool;
#[cfg(any(target_os = "macos", target_os = "ios"))]
fn set_ignore_packet_info(&self, ign: bool);
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "freebsd",))]
fn set_mac_address(&self, eth_addr: [u8; ETHER_ADDR_LEN as usize]) -> Result<()>;
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "freebsd",))]
fn get_mac_address(&self) -> Result<[u8; ETHER_ADDR_LEN as usize]>;
}