Struct netsim::wire::Ipv4Plug [] [src]

pub struct Ipv4Plug {
    pub tx: UnboundedSender<Ipv4Packet>,
    pub rx: UnboundedReceiver<Ipv4Packet>,
}

One end of an Ipv4 connection that can be used to read/write packets to/from the other end.

Fields

The sender

The receiver.

Methods

impl Ipv4Plug
[src]

[src]

Create a new Ipv4 connection, connecting the two returned plugs.

[src]

Add latency to the end of this connection.

min_latency is the baseline for the amount of delay added to a packet travelling on this connection. mean_additional_latency controls the amount of extra, random latency added to any given packet on this connection. A non-zero mean_additional_latency can cause packets to be re-ordered.

[src]

Add extra hops to the end of this connection. Packets travelling through this plug will have their TTL decremented by the amount of hops given.

Trait Implementations

impl Debug for Ipv4Plug
[src]

[src]

Formats the value using the given formatter.