EtherHost2

Package: inet.node.ethernet

EtherHost2

compound module

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to it. This host model does not contain higher layer protocols (IP, TCP). By default is configured to use half-duplex MAC (CSMA/CD).

EtherTrafGen InterfaceTable IEthernetInterface

Usage diagram

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

Parameters

Name Type Default value Description
csmacdSupport bool true

by default use CSMA/CD

fcsMode string "declared"

Properties

Name Value Description
networkNode
labels node
display i=device/pc2

Gates

Name Direction Size Description
ethg inout

Unassigned submodule parameters

Name Type Default value Description
app.destAddress string ""

destination MAC address, or module path name of destination station; empty means off

app.ssap int -1

llc ssap to set on outgoing packets

app.dsap int -1

llc dsap to set on outgoing packets

app.startTime double this.sendInterval

time of sending the first packet

app.stopTime double -1s

time of finishing sending, negative values mean forever

app.sendInterval double

interval between sending bursts

app.numPacketsPerBurst int 1

number of packets to send per burst (packets within a burst are sent at the same simulation time)

app.packetLength int

length of packets to send

app.stopOperationExtraTime double -1s

extra time after lifecycle stop operation finished

app.stopOperationTimeout double 2s

timeout value for lifecycle stop operation

interfaceTable.displayAddresses bool false

whether to display IP addresses on links

Source code

//
// An example host with one Ethernet interface and an Ethernet traffic
// generator directly connected to it. This host model does not contain
// higher layer protocols (IP, TCP). By default is configured to use
// half-duplex MAC (CSMA/CD).
//
module EtherHost2
{
    parameters:
        bool csmacdSupport = default(true);  // by default use CSMA/CD
        string fcsMode @enum("declared","computed") = default("declared");
        *.interfaceTableModule = default(absPath(".interfaceTable"));
        *.fcsMode = fcsMode;
        eth.csmacdSupport = csmacdSupport;
        @networkNode();
        @labels(node,ethernet-node);
        @display("i=device/pc2");
    gates:
        inout ethg @labels(EtherFrame-conn);
    submodules:
        app: EtherTrafGen {
            @display("p=200,100");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=125,240;is=s");
        }
        eth: <default("EthernetInterface")> like IEthernetInterface {
            parameters:
                @display("p=200,239,row,150;q=txQueue");
        }
    connections:
        app.out --> eth.upperLayerIn;
        app.in <-- eth.upperLayerOut;
        eth.phys <--> { @display("m=s"); } <--> ethg;
}

File: src/inet/node/ethernet/EtherHost2.ned