use core::task::Waker;
use smoltcp::{storage::PacketBuffer, time::Instant, wire::IpAddress};
mod ethernet;
mod loopback;
#[cfg(feature = "vsock")]
mod vsock;
pub use ethernet::*;
pub use loopback::*;
#[cfg(feature = "vsock")]
pub use vsock::*;
pub trait Device: Send + Sync {
fn name(&self) -> &str;
fn recv(&mut self, buffer: &mut PacketBuffer<()>, timestamp: Instant) -> bool;
fn send(&mut self, next_hop: IpAddress, packet: &[u8], timestamp: Instant) -> bool;
fn register_waker(&self, waker: &Waker);
}