Compound Module SingleHost

File: Underlay/SingleHostUnderlay/SingleHost.ned

simulates a single host to connect it to a real network

notificationBoard: NotificationBoard interfaceTable: InterfaceTable routingTable: RoutingTable packetParser: parser like PacketParser applicationParser: appParser like PacketParser tier3: tier3Type like Tier tier2: tier2Type like Tier tier1: tier1Type like Tier overlay: overlayType like Overlay udp: UDP networkLayer: NetworkLayer outDev: outDeviceType like RealworldDevice neighborCache: NeighborCache bootstrapList: BootstrapList

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Contains the following modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

BootstrapList

The BootstrapList module maintains a list of bootstrap node candidates received from various sources (BootstrapOracle for simulations and Zeroconf for SingleHostUnderlay). This list is also used to detect overlay partitions and triggers the merging process.

NeighborCache (no description)
Overlay (no description)
PacketParser

Module that performs parsing of the payload of packets that are send to or received by the tun device

RealworldDevice

RealworldDevice is a pseudo interface that allows communication with the real world through the TunOutScheduler WARNING: This does ONLY work with the combination IPv4|UDP|OverlayMessage

Tier

A template for Tier1-3 modules

NotificationBoard (unknown -- not in documented files)
InterfaceTable (unknown -- not in documented files)
RoutingTable (unknown -- not in documented files)
UDP (unknown -- not in documented files)
NetworkLayer (unknown -- not in documented files)

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

SingleHostUnderlay

The SingleHostUnderlay ned-file

See also: SingleHostConfigurator

Parameters:

Name Type Description
IPForward bool

true if ip packets should be forwarded

outDeviceType string

outDevice to use

overlayType string

overlay protocol compound module to use

tier1Type string

tier 1 module to use

tier2Type string

tier 2 module to use

tier3Type string

tier 3 module to use

numTiers numeric const

number of tiers

parser string

name of the PacketParser to use

appParser string

name of the PacketParser to use

routingFile string

use predefined routing file if given

Gates:

Name Direction Description
overlayNeighborArrowIn [ ] input

incoming gate for direct connections from overlay neighbors

overlayNeighborArrowOut [ ] output

outgoing gate for direct connections to overlay neighbors

Unassigned submodule parameters:

Name Type Description
outDev.mtu numeric

maximum transmission unit of the underlaying network

neighborCache.enableNeighborCache bool
neighborCache.rttExpirationTime numeric
neighborCache.maxSize numeric
bootstrapList.debugOutput bool

enable debug output

bootstrapList.mergeOverlayPartitions bool

if true, detect and merge overlay partitions

bootstrapList.maintainList bool

maintain a list of bootstrap candidates and check them periodically

Source code:

module SingleHost
    parameters:
        IPForward: bool, // true if ip packets should be forwarded
        outDeviceType: string, // outDevice to use
        overlayType: string, // overlay protocol compound module to use
        tier1Type: string, // tier 1 module to use
        tier2Type: string, // tier 2 module to use
        tier3Type: string, // tier 3 module to use
        numTiers: numeric const, // number of tiers
        parser: string, // name of the PacketParser to use
        appParser: string, // name of the PacketParser to use
        routingFile: string; // use predefined routing file if given

    gates:
        in: overlayNeighborArrowIn[]; // incoming gate for direct connections from overlay neighbors
        out: overlayNeighborArrowOut[]; // outgoing gate for direct connections to overlay neighbors

    submodules:
        notificationBoard: NotificationBoard;
            display: "p=68,136;i=block/control";
        interfaceTable: InterfaceTable;
            display: "p=68,206;i=block/table";
        routingTable: RoutingTable;
            parameters:
                IPForward = IPForward, // true if ip packets should be forwarded
                routerId = "", // id of the router
                routingFile = routingFile; // use predefined routing file if given
            display: "p=68,276;i=block/table";
        packetParser: parser like PacketParser;
            display: "p=171,278;i=block/wheelbarrow";
        applicationParser: appParser like PacketParser;
            display: "p=171,348;i=block/wheelbarrow";
        tier3: tier3Type like Tier;
            display: "p=64,56;i=block/segm";
        tier2: tier2Type like Tier;
            display: "p=131,56;i=block/segm";
        tier1: tier1Type like Tier;
            display: "p=202,58;i=block/segm";
        overlay: overlayType like Overlay;
            display: "p=266,128;i=block/network2";
        udp: UDP;
            display: "p=266,198;i=block/transport";
        networkLayer: NetworkLayer;
            parameters:
                proxyARP = false; // sets proxy \ARP mode (replying to \ARP requests for the addresses for which a routing table entry exists)
            gatesizes:
                ifIn[1],
                ifOut[1];
            display: "p=266,268;i=block/fork;q=queue";
        outDev: outDeviceType like RealworldDevice;
            display: "p=266,358,row,90;q=txQueue;i=block/ifcard";
        neighborCache: NeighborCache;
            display: "p=68,352;i=block/table";
        bootstrapList: BootstrapList;
            display: "p=176,208;i=block/table";
    connections nocheck:
        tier1.to_lowerTier --> overlay.from_app if numTiers > 0;
        tier1.from_lowerTier <-- overlay.to_app if numTiers > 0;
        tier1.to_udp --> udp.from_app++ if numTiers > 0;
        udp.to_app++ --> tier1.from_udp if numTiers > 0;

        tier2.to_lowerTier --> tier1.from_upperTier if numTiers > 1;
        tier2.from_lowerTier <-- tier1.to_upperTier if numTiers > 1;
        tier2.to_udp --> udp.from_app++ if numTiers > 1;
        udp.to_app++ --> tier2.from_udp if numTiers > 1;

        tier3.to_lowerTier --> tier2.from_upperTier if numTiers > 2;
        tier3.from_lowerTier <-- tier2.to_upperTier if numTiers > 2;
        tier3.to_udp --> udp.from_app++ if numTiers > 2;
        udp.to_app++ --> tier3.from_udp if numTiers > 2;

        overlay.to_udp --> udp.from_app++;
        overlay.from_udp <-- udp.to_app++;
        
        bootstrapList.to_udp --> udp.from_app++;
        bootstrapList.from_udp <-- udp.to_app++;
        
        udp.to_ip --> networkLayer.UDPIn;
        udp.from_ip <-- networkLayer.UDPOut;

        // connections to network outside
        outDev.netwOut --> networkLayer.ifIn[0];
        outDev.netwIn <-- networkLayer.ifOut[0];

    display: "b=330,410";
endmodule