#[cfg(feature = "tunnel-kernel")]
pub mod kernel;
#[cfg(feature = "tunnel-userspace")]
pub mod userspace;
use crate::tunnel::TunnelError;
pub trait TunDevice: Send + 'static {
fn read_packet(
&mut self,
) -> impl std::future::Future<Output = Result<Vec<u8>, TunnelError>> + Send;
fn write_packet(
&mut self,
packet: &[u8],
) -> impl std::future::Future<Output = Result<(), TunnelError>> + Send;
}