Package: inet.node.ethernet
EtherHost2
compound moduleAn 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).
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 |
macType | string | csmacdSupport ? "EtherMAC" : "EtherMACFullDuplex" | |
queueType | string | "" |
DropTailQueue, DiffServQueue, or "" to use the internal queue |
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.etherType | int | 0 |
etherType 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 |
|
queue.pauseQueue.frameCapacity | int | 100 | |
mac.promiscuous | bool |
if true, all packets are received, otherwise only the ones with matching destination MAC address |
|
mac.address | string |
MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0. |
|
mac.duplexMode | bool |
selects full-duplex (true) or half-duplex (false) operation |
|
mac.txQueueLimit | int |
maximum number of frames queued up for transmission; additional frames are dropped. Only used if queueModule=="" |
|
mac.mtu | int |
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 macType = default(csmacdSupport ? "EtherMAC" : "EtherMACFullDuplex"); // ~EtherMAC or ~EtherMACFullDuplex string queueType = default(""); // DropTailQueue, DiffServQueue, or "" to use the internal queue *.interfaceTableModule = default(""); @networkNode(); @labels(node,ethernet-node); @display("i=device/pc2"); gates: inout ethg @labels(EtherFrame-conn); submodules: app: EtherTrafGen { @display("p=155,59"); } encap: <default("EtherEncap")> like IEtherEncap { @display("p=155,146"); } queue: EtherQoSQueue if queueType != "" { parameters: dataQueueType = parent.queueType; @display("p=87,207;q=l2queue"); } mac: <macType> like IEtherMAC { queueModule = (parent.queueType == "" ? "" : "^.queue"); @display("p=155,272;q=txQueue"); } connections: app.out --> encap.upperLayerIn; app.in <-- encap.upperLayerOut; encap.lowerLayerOut --> queue.in if queueType != ""; queue.out --> mac.upperLayerIn if queueType != ""; encap.lowerLayerOut --> mac.upperLayerIn if queueType == ""; mac.upperLayerOut --> encap.lowerLayerIn; mac.phys <--> ethg; }File: src/inet/node/ethernet/EtherHost2.ned