netstack3_device/
blackhole.rsuse core::convert::Infallible as Never;
use netstack3_base::Device;
use crate::internal::base::{BlackholeDeviceCounters, DeviceReceiveFrameSpec};
use crate::internal::id::{BasePrimaryDeviceId, BaseWeakDeviceId};
use crate::{BaseDeviceId, DeviceStateSpec};
pub type BlackholeWeakDeviceId<BT> = BaseWeakDeviceId<BlackholeDevice, BT>;
pub type BlackholeDeviceId<BT> = BaseDeviceId<BlackholeDevice, BT>;
pub type BlackholePrimaryDeviceId<BT> = BasePrimaryDeviceId<BlackholeDevice, BT>;
pub struct BlackholeDeviceState {}
#[derive(Copy, Clone)]
pub enum BlackholeDevice {}
impl Device for BlackholeDevice {}
impl DeviceStateSpec for BlackholeDevice {
type State<BT: crate::DeviceLayerTypes> = BlackholeDeviceState;
type External<BT: crate::DeviceLayerTypes> = BT::BlackholeDeviceState;
type CreationProperties = ();
type Counters = BlackholeDeviceCounters;
type TimerId<D: netstack3_base::WeakDeviceIdentifier> = Never;
fn new_device_state<
CC: netstack3_base::CoreTimerContext<Self::TimerId<CC::WeakDeviceId>, BC>
+ netstack3_base::DeviceIdContext<Self>,
BC: crate::DeviceLayerTypes + netstack3_base::TimerContext,
>(
_bindings_ctx: &mut BC,
_self_id: CC::WeakDeviceId,
_properties: Self::CreationProperties,
) -> Self::State<BC> {
BlackholeDeviceState {}
}
const IS_LOOPBACK: bool = false;
const DEBUG_TYPE: &'static str = "Blackhole";
}
impl DeviceReceiveFrameSpec for BlackholeDevice {
type FrameMetadata<D> = Never;
}