Compound Module StandardVlanHost

Package: Vlans.nodes
File: src/nodes/StandardVlanHost.ned

IP host with TCP, UDP layers and applications.

NAMTraceWriter NotificationBoard InterfaceTable RoutingTable TCPApp TCP UDPApp UDP SCTPApp SCTP PingApp NetworkLayerVlans PPPInterface EtherVlanInterface ExtInterface TCPDump

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters:

Name Type Default value Description
numTcpApps int 0
numUdpApps int 0
numSctpApps int 0

I.R.

tcpAppType string "n/a"
udpAppType string "n/a"
sctpAppType string "n/a"

I.R.

IPForward bool false
namid int -1
routingFile string ""

Properties:

Name Value Description
node
display i=device/pc2

Gates:

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

Unassigned submodule parameters:

Name Type Default value Description
tcp.advertisedWindow int 14*this.mss

in bytes, corresponds with the maximal receiver buffer capacity (Note: normally, NIC queues should be at least this size)

tcp.delayedAcksEnabled bool false

delayed ACKs enabled/disabled

tcp.nagleEnabled bool true

Nagle's algorithm (RFC 896) enabled/disabled

tcp.limitedTransmitEnabled bool false

Limited Transmit algorithm (RFC 3042) enabled/disabled (can be used for TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl)

tcp.increasedIWEnabled bool false

Increased Initial Window (RFC 3390) enabled/disabled

tcp.sackSupport bool false

Selective Acknowledgment (RFC 2018, 2883, 3517) support (header option) (SACK will be enabled for a connection if both endpoints support it)

tcp.mss int 536

maximum segment size (header option)

tcp.tcpAlgorithmClass string "TCPReno"

TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl/DumbTCP

tcp.sendQueueClass string "TCPVirtualDataSendQueue"

TCPVirtualDataSendQueue/TCPMsgBasedSendQueue

tcp.receiveQueueClass string "TCPVirtualDataRcvQueue"

TCPVirtualDataRcvQueue/TCPMsgBasedRcvQueue

tcp.recordStats bool true

recording of seqNum etc. into output vectors enabled/disabled

sctp.numGapReports int 3

====== SCTP Association Parameters =================================

sctp.rtoInitial double 3s
sctp.rtoMin double 1s
sctp.rtoMax double 60s
sctp.rtoAlpha double 0.125
sctp.rtoBeta double 0.250
sctp.maxBurst int 4
sctp.assocMaxRetrans int 10
sctp.pathMaxRetrans int 5
sctp.maxInitRetrans int 8
sctp.sackPeriod double 200ms
sctp.sackFrequency int 2
sctp.reactivatePrimaryPath bool false
sctp.sendQueueLimit int 0
sctp.validCookieLifetime double 10s

====== Testing =====================================================

sctp.enableHeartbeats bool true

====== Heartbeats ==================================================

sctp.hbInterval double 30s
sctp.nagleEnabled bool true

====== Nagle Algorithm =============================================

sctp.naglePoint int 1468
sctp.fastRecoverySupported bool true

====== Congestion Control ==========================================

sctp.sctpAlgorithmClass string "SCTPAlg"
sctp.ccModule int 0

RFC4960=0

sctp.ssModule int 0

ROUND_ROBIN=0

sctp.arwnd int 65535
sctp.swsLimit int 3000

Limit for SWS

sctp.udpEncapsEnabled bool false
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_vlans.ip.procDelay double 0s
networkLayer_vlans.arp_vlans.retryTimeout double 1s

number seconds ARP waits between retries to resolve an IP address

networkLayer_vlans.arp_vlans.retryCount int 3

number of times ARP will attempt to resolve an IP address

networkLayer_vlans.arp_vlans.cacheTimeout double 120s

number seconds unused entries in the cache will time out

networkLayer_vlans.arp_vlans.globalARP bool false
ppp.ppp.mtu int 4470
eth.mac.promiscuous bool true

ALWAYS TRUE... LLC Will take care...

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.txQueueLimit int 1000

maximum number of frames queued up for transmission; additional frames are dropped. Only used if queueModule==""

eth.mac.queueModule string ""

name of optional external queue module

eth.mac.mtu int 1500
eth.encap_vlans.vlans string ""
eth.encap_vlans.vlan_txrate double 100Mbps
ext.filterString string
ext.device string
ext.mtu int 1500
tcpdump.dumpFile string ""
tcpdump.threadEnable bool false
tcpdump.snaplen int 65535
tcpdump.verbosity int 0

Source code:

//
// \IP host with TCP, UDP layers and applications.
//
module StandardVlanHost
{
    parameters:
        @node();
        int numTcpApps = default(0);
        int numUdpApps = default(0);
        int numSctpApps = default(0);   //I.R.
        string tcpAppType = default("n/a");
        string udpAppType = default("n/a");
        string sctpAppType = default("n/a");    //I.R.
        bool IPForward = default(false);
        int namid = default(-1);
        string routingFile = default("");
        @display("i=device/pc2");
    gates:
        inout pppg[];
        inout ethg[];
        inout extg[];
    submodules:
        namTrace: NAMTraceWriter {
            parameters:
                namid = namid;
                @display("p=60,310");
        }
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,70");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=60,150");
        }
        routingTable: RoutingTable {
            parameters:
                IPForward = IPForward;
                routerId = "";
                routingFile = routingFile;
                @display("p=60,230");
        }
        tcpApp[numTcpApps]: <tcpAppType> like TCPApp {
            parameters:
                @display("p=163,53");
        }
        tcp: TCP {
            parameters:
                @display("p=163,154");
        }
        udpApp[numUdpApps]: <udpAppType> like UDPApp {
            parameters:
                @display("p=272,67");
        }
        udp: UDP {
            parameters:
                @display("p=272,154");
        }
        sctpApp[numSctpApps]: <sctpAppType> like SCTPApp {  //I.R.
            parameters:
                @display("p=385,85");
        }
        sctp: SCTP {    //I.R.
            @display("p=382,170;i=block/wheelbarrow");
        }
        pingApp: PingApp {
            parameters:
                @display("p=376,241");
        }
        networkLayer_vlans: NetworkLayerVlans {
            parameters:
                proxyARP = false;
                @display("p=248,247;q=queue");
            gates:
                ifIn[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];   //I.R.
                ifOut[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];
        }
        ppp[sizeof(pppg)]: PPPInterface {
            parameters:
                @display("p=124,390,row,90;q=txQueue");
        }
        eth[sizeof(ethg)]: EtherVlanInterface {
            parameters:
                @display("p=254,390,row,90;q=txQueue");
        }
        ext[sizeof(extg)]: ExtInterface {   //I.R.
            parameters:
                @display("p=399,390,row,90;q=txQueue;i=block/ifcard");
        }
        tcpdump: TCPDump {  //I.R.
            parameters:
                @display("p=254,310;i=abstract/cache_s");
            gates:
                ifIn[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];
                in2[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];
                ifOut[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];
                out2[sizeof(pppg)+sizeof(ethg)+sizeof(extg)];
        }
    connections allowunconnected:
        for i=0..numTcpApps-1 {
            tcpApp[i].tcpOut --> tcp.appIn++;
            tcpApp[i].tcpIn <-- tcp.appOut++;
        }

        tcp.ipOut --> networkLayer_vlans.tcpIn;
        tcp.ipIn <-- networkLayer_vlans.TCPOut;

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

        udp.ipOut --> networkLayer_vlans.udpIn;
        udp.ipIn <-- networkLayer_vlans.udpOut;

        for i=0..numSctpApps-1 {
            sctpApp[i].sctpOut --> sctp.from_appl++;
            sctp.to_appl++ --> sctpApp[i].sctpIn;
        }
        sctp.to_ip --> networkLayer_vlans.sctpIn;
        networkLayer_vlans.sctpOut --> sctp.from_ip;

        networkLayer_vlans.pingOut --> pingApp.pingIn;
        networkLayer_vlans.pingIn <-- pingApp.pingOut;

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

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;
            eth[i].netwOut --> tcpdump.ifIn[sizeof(pppg)+i];  //I.R.
            tcpdump.out2[sizeof(pppg)+i] --> networkLayer_vlans.ifIn[sizeof(pppg)+i];
            eth[i].netwIn <-- tcpdump.ifOut[sizeof(pppg)+i];
            tcpdump.in2[sizeof(pppg)+i] <-- networkLayer_vlans.ifOut[sizeof(pppg)+i];
        }

        for i=0..sizeof(extg)-1 {
            ext[i].netwOut --> tcpdump.ifIn[sizeof(pppg)+sizeof(ethg)+i];
            tcpdump.out2[sizeof(pppg)+sizeof(ethg)+i] --> networkLayer_vlans.ifIn[sizeof(pppg)+sizeof(ethg)+i];
            ext[i].netwIn <-- tcpdump.ifOut[sizeof(pppg)+sizeof(ethg)+i];
            tcpdump.in2[sizeof(pppg)+sizeof(ethg)+i] <-- networkLayer_vlans.ifOut[sizeof(pppg)+sizeof(ethg)+i];
        }
}