new_simple_fake_network

Function new_simple_fake_network 

Source
pub fn new_simple_fake_network<CtxId: Copy + Debug + Hash + Eq>(
    a_id: CtxId,
    a: FakeCtx,
    a_device_id: EthernetWeakDeviceId<FakeBindingsCtx>,
    b_id: CtxId,
    b: FakeCtx,
    b_device_id: EthernetWeakDeviceId<FakeBindingsCtx>,
) -> FakeNetwork<FakeCtxNetworkSpec, CtxId, impl FakeNetworkLinks<DispatchedFrame, EthernetDeviceId<FakeBindingsCtx>, CtxId>>
Expand description

Creates a new FakeNetwork of Ctxs in a simple two-host configuration.

Two hosts are created with the given names. Packets emitted by one arrive at the other and vice-versa.