Function netstack3_core::device::add_loopback_device_with_state
source · pub fn add_loopback_device_with_state<NonSyncCtx: NonSyncContext, F: FnOnce() -> (NonSyncCtx::LoopbackDeviceState, NonSyncCtx::DeviceIdentifier)>(
sync_ctx: &SyncCtx<NonSyncCtx>,
mtu: Mtu,
metric: RawMetric,
bindings_state: F
) -> Result<LoopbackDeviceId<NonSyncCtx>, ExistsError>
Expand description
Adds a new loopback device to the stack.
Adds a new loopback device to the stack. Only one loopback device may be installed at any point in time, so if there is one already, an error is returned.