Network TwoHosts

Package: inet.examples.ethernet.lans
File: examples/ethernet/lans/Networks.ned

Sample Ethernet LAN: two hosts directly connected to each other via twisted pair.

EtherHost EtherHost

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.

Properties:

Name Value Description
isNetwork

Unassigned submodule parameters:

Name Type Default value Description
hostA.status.initialStatus string "UP"

TODO @signal, @statistic

hostA.cli.destAddress string ""

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

hostA.cli.startTime double this.sendInterval

time of sending the first request

hostA.cli.stopTime double -1s

time of finishing sending, negative values mean forever

hostA.cli.localSAP int 0xf0
hostA.cli.remoteSAP int 0xf1
hostA.cli.sendInterval double uniform(0s,1s)

interval between sending requests

hostA.cli.reqLength int 100B

length of request packets

hostA.cli.respLength int 1KiB

length of response packets

hostA.srv.localSAP int 0xf1
hostA.queue.pauseQueue.frameCapacity int 100
hostA.mac.promiscuous bool

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

hostA.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.

hostA.mac.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

hostA.mac.txQueueLimit int

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

hostA.mac.mtu int
hostB.status.initialStatus string "UP"

TODO @signal, @statistic

hostB.cli.destAddress string ""

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

hostB.cli.startTime double this.sendInterval

time of sending the first request

hostB.cli.stopTime double -1s

time of finishing sending, negative values mean forever

hostB.cli.localSAP int 0xf0
hostB.cli.remoteSAP int 0xf1
hostB.cli.sendInterval double uniform(0s,1s)

interval between sending requests

hostB.cli.reqLength int 100B

length of request packets

hostB.cli.respLength int 1KiB

length of response packets

hostB.srv.localSAP int 0xf1
hostB.queue.pauseQueue.frameCapacity int 100
hostB.mac.promiscuous bool

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

hostB.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.

hostB.mac.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

hostB.mac.txQueueLimit int

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

hostB.mac.mtu int

Source code:

//
// Sample Ethernet LAN: two hosts directly connected to each other
// via twisted pair.
//
network TwoHosts
{
    submodules:
        hostA: EtherHost {
            parameters:
                @display("p=60,160");
        }
        hostB: EtherHost {
            parameters:
                @display("p=200,140");
        }
    connections:
        hostA.ethg <--> {  delay = 0.5us; datarate = 100Mbps; } <--> hostB.ethg;
}