Module netsim::node [] [src]

This module is for use with the spawn::network_v4 function. The functions herein provide a simple way to define a hierarchical network with routes automatically configured. If you need more flexibility in the configuration of a virtual network then you should use the device module types directly.

Traits

EtherNode

An EtherNode describes a recipe for constructing a network when given the subnets that the network should operate on.

Ipv4Node

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

RouterClientsV4

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

Functions

endpoint_v4

Create a node for an Ipv4 endpoint. This node will run the given function in a network namespace with a single interface.

hops_v4

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

latency_v4

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

nat_v4

Create a node for an Ipv4 NAT.

router_v4

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