Module netsim::node::ipv4[][src]

Nodes for creating IPv4 networks

Structs

EtherAdaptorNode

Adapts an EtherNode to an Ipv4Node

HopsNode

A node representing hops between Ipv4 nodes.

LatencyNode

A node representing latency on an Ipv4 connection.

MachineNode

A node representing an Ipv4 machine.

NatNode

A node representing an Ipv4 NAT.

PacketLossNode

A Node which adds packet loss to an underlying node.

RouterNode

A node representing an Ipv4 router

Traits

Ipv4Node

An Ipv4Node describes a recipe for constructing a network when given the IP range that the network should operate on. The functions in the node::ipv4 module return Ipv4Nodes that you can run as a network with the spawn::ipv4_tree function.

Ipv4RouterClients

A set of clients that can be attached to a router node.

Functions

ether_adaptor

Adapt a EtherNode into an Ipv4Node

hops

Add hops between nodes. The will cause the TTL of packets travelling on this connection to decrease by the given amount.

latency

Add latency between nodes. Packets entering the connection from either end will be delayed before arriving at the other end.

machine

Create a node for an Ipv4 machine. This node will run the given function in a network namespace with a single interface in a separate thread of it's own.

nat

Create a node for an Ipv4 NAT.

packet_loss

Create a node which adds packet loss to the underlying node.

router

Spawns a bunch of sub-nodes and routes packets between them.