Compound Module StandardHost6

Package: inet.nodes.ipv6
File: src/nodes/ipv6/StandardHost6.ned

IPv6 host with TCP, UDP layers and applications.

NotificationBoard InterfaceTable RoutingTable6 TCPApp ITCP UDPApp UDP PingApp NetworkLayer6 PPPInterface EthernetInterface

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Networks:

BulkTransfer6 (network) (no description)
DemoNetworkEth (network) (no description)
NClientsEth (network) (no description)
NClientsEth (network) (no description)
NClientsPPP (network) (no description)
NClientsPPP (network) (no description)

Parameters:

Name Type Default value Description
numTcpApps int 0
numUdpApps int 0
tcpAppType string ""
udpAppType string ""
tcpType string "TCP"

tcp implementation (e.g. TCP, TCP_old, TCP_NSC)

Properties:

Name Value Description
node
labels node
display i=device/laptop

Gates:

Name Direction Size Description
pppg [ ] inout
ethg [ ] inout

Unassigned submodule parameters:

Name Type Default value Description
routingTable6.routingTableFile xml
pingApp.destAddr string ""

destination IP or IPv6 address

pingApp.srcAddr string ""

source IP or IPv6 address (useful with multi-homing)

pingApp.packetSize double 56B

of ping payload, in bytes

pingApp.interval double 1s

time to wait between pings (can be random)

pingApp.hopLimit double 32

TTL or hopLimit for IP packets

pingApp.count double 0

stop after count ping requests, 0 means continuously

pingApp.startTime double uniform(0s,this.interval)

send first ping at startTime

pingApp.stopTime double 0s

send no pings after stopTime, 0 means forever

pingApp.printPing bool true

dump on stdout

networkLayer.ipv6.procDelay double 0s
ppp.ppp.mtu int 4470
eth.mac.promiscuous bool false

if true, all packets are received, otherwise only the ones with matching destination MAC address

eth.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

eth.mac.txrate double 100Mbps

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

eth.mac.duplexEnabled bool true

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

eth.mac.mtu int 1500

Source code:

//
// \IPv6 host with TCP, UDP layers and applications.
//
module StandardHost6
{
    parameters:
        @node();
        @labels(node,ethernet-node);
        int numTcpApps = default(0);
        int numUdpApps = default(0);
        string tcpAppType = default("");
        string udpAppType = default("");
        string tcpType = default("TCP");  // tcp implementation (e.g. TCP, TCP_old, TCP_NSC)
        @display("i=device/laptop");
    gates:
        inout pppg[] @labels(PPPFrame-conn);
        inout ethg[] @labels(EtherFrame-conn);
    submodules:
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,70");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=60,150");
        }
        routingTable6: RoutingTable6 {
            parameters:
                isRouter = false;
                @display("p=60,230");
        }
        tcpApp[numTcpApps]: <tcpAppType> like TCPApp {
            parameters:
                @display("p=163,67");
        }
        tcp: <tcpType> like ITCP {
            parameters:
                @display("p=163,154");
        }
        udpApp[numUdpApps]: <udpAppType> like UDPApp {
            parameters:
                @display("p=272,67");
        }
        udp: UDP {
            parameters:
                @display("p=272,154");
        }
        pingApp: PingApp {
            parameters:
                @display("p=343,200");
        }
        networkLayer: NetworkLayer6 {
            parameters:
                @display("p=248,247;q=queue");
            gates:
                ifIn[sizeof(pppg)+sizeof(ethg)];
                ifOut[sizeof(pppg)+sizeof(ethg)];
        }
        ppp[sizeof(pppg)]: PPPInterface {
            parameters:
                @display("p=205,350,row,90;q=txQueue");
        }
        eth[sizeof(ethg)]: EthernetInterface {
            parameters:
                @display("p=240,350,row,90;q=txQueue");
        }
    connections allowunconnected:
        for i=0..numTcpApps-1 {
            tcpApp[i].tcpOut --> tcp.appIn++;
            tcpApp[i].tcpIn <-- tcp.appOut++;
        }

        tcp.ipv6Out --> networkLayer.tcpIn;
        tcp.ipv6In <-- networkLayer.tcpOut;

        for i=0..numUdpApps-1 {
            udpApp[i].udpOut --> udp.appIn++;
            udpApp[i].udpIn <-- udp.appOut++;
        }

        udp.ipv6Out --> networkLayer.udpIn;
        udp.ipv6In <-- networkLayer.udpOut;

        networkLayer.pingOut --> pingApp.pingv6In;
        networkLayer.pingIn <-- pingApp.pingv6Out;

        // connections to network outside
        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> ppp[i].phys;
            ppp[i].netwOut --> networkLayer.ifIn[i];
            ppp[i].netwIn <-- networkLayer.ifOut[i];
        }

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;
            eth[i].netwOut --> networkLayer.ifIn[sizeof(pppg)+i];
            eth[i].netwIn <-- networkLayer.ifOut[sizeof(pppg)+i];
        }
}