Trait netsim::node::ip::IpNode[][src]

pub trait IpNode: Sized {
    type Output: Send + 'static;
    fn build(
        self,
        handle: &NetworkHandle,
        ipv4_range: Option<Ipv4Range>,
        ipv6_range: Option<Ipv6Range>
    ) -> (SpawnComplete<Self::Output>, IpPlug); }

An IpNode describes a recipe for constructing a network when given the IP range that the network should operate on. The functions in the node::ip module return IpNodes that you can run as a network with the spawn::network_ip function.

Associated Types

The type returned by the thread spawned by this node.

Required Methods

Consume the IpNode and build the network it describes. Returns a SpawnComplete that can be used to join the spawned thread and an IpPlug that can be used to read-write packets to the head node of the network.

Implementors