Compound Module TestArea

Package: inet.examples.ospfv2.areatests
File: examples/ospfv2/areatests/TestArea.ned

(no description)

StandardHost EtherHub OSPFRouter OSPFRouter

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.

Networks:

Name Type Description
OSPF_BackboneAndOneStubTest network (no description)
OSPF_BackboneAndTwoStubsTest network (no description)
OSPF_BackboneTest network (no description)

Parameters:

Name Type Default value Description
numHosts int 3
extGates int 0

Properties:

Name Value Description
display p=10,10;b=412,316

Gates:

Name Direction Size Description
ethg [ ] inout extGates

Unassigned submodule parameters:

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

TODO @signal, @statistic

H.routingTable.forwarding bool
H.routingTable.multicastForwarding bool
H.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

H.pcapRecorder.verbose bool false

whether to log packets on the module output

H.pcapRecorder.pcapFile string ""

the PCAP file to be written

H.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

H.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

H.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

H.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

H.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

H.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

H.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

H.lo0.lo.mtu int 4470B
R.status.initialStatus string "UP"

TODO @signal, @statistic

R.routingTable.forwarding bool
R.routingTable.multicastForwarding bool
R.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

R.pcapRecorder.verbose bool false

whether to log packets on the module output

R.pcapRecorder.pcapFile string ""

the PCAP file to be written

R.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

R.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

R.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

R.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

R.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

R.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

R.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

R.lo0.lo.mtu int 4470B
R.bgp.interfaceTableModule string

The path to the InterfaceTable module

R.bgp.routingTableModule string
R.bgp.ospfRoutingModule string hasOSPF ? "^.ospf" : ""
R.bgp.dataTransferMode string
B.status.initialStatus string "UP"

TODO @signal, @statistic

B.routingTable.forwarding bool
B.routingTable.multicastForwarding bool
B.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

B.pcapRecorder.verbose bool false

whether to log packets on the module output

B.pcapRecorder.pcapFile string ""

the PCAP file to be written

B.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

B.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

B.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

B.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

B.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

B.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

B.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

B.lo0.lo.mtu int 4470B
B.bgp.interfaceTableModule string

The path to the InterfaceTable module

B.bgp.routingTableModule string
B.bgp.ospfRoutingModule string hasOSPF ? "^.ospf" : ""
B.bgp.dataTransferMode string

Source code:

module TestArea
{
    parameters:
        @display("p=10,10;b=412,316");
        int numHosts = default(3);
        int extGates = default(0);
    gates:
        inout ethg[extGates];
    types:
        channel C extends ThruputMeteringChannel
        {
            delay = 0.1us;
            datarate = 100Mbps;
            thruputDisplayFormat = "#N";
        }
    submodules:
        H[numHosts]: StandardHost {
            @display("i=device/laptop");
        }
        N[numHosts]: EtherHub;
        R[numHosts]: OSPFRouter;
        B[extGates]: OSPFRouter;
    connections:
        // host to router links
        for i=0..numHosts-1 {
            H[i].ethg++ <--> C <--> N[i].ethg++;
            R[i].ethg++ <--> C <--> N[i].ethg++;
        }

        // towards other areas
        for i=0..extGates-1 {
            ethg[i] <--> B[i].ethg++;
        }

        // ring of routers
        for i=1..numHosts-1 {
            R[i].ethg++ <--> C <--> R[i-1].ethg++;
        }
        for i=1..extGates-1 {
            B[i].ethg++ <--> C <--> B[i-1].ethg++;
        }
        R[0].ethg++ <--> C <--> R[numHosts-1].ethg++ if numHosts > 2 && extGates == 0;
        B[0].ethg++ <--> C <--> B[extGates-1].ethg++ if numHosts == 0 && extGates > 2;
        R[0].ethg++ <--> C <--> B[extGates-1].ethg++ if numHosts > 0 && extGates > 0;
        B[0].ethg++ <--> C <--> R[numHosts-1].ethg++ if numHosts > 0 && extGates > 0 && (numHosts+extGates > 2);
}