Package: inet.examples.inet.ipv4largenet
IPv4MediumLAN
compound moduleSeveral hosts and a router on an Ethernet hub and a switch
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Used in
| Name | Type | Description |
|---|---|---|
| IPv4LargeNet | network |
A large Ethernet LAN -- see model description |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| n | int |
number of hosts on the switch |
|
| h | int |
number of hosts on the hub |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=old/cloud |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| ethg | inout |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| router.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| router.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| router.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| router.pcapRecorder.fileFormat | string | "pcapng" | |
| router.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| router.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| router.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| router.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| router.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| router.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| router.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| router.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| router.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| router.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| router.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| router.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.cb.forwardServiceRegistration | bool | true | |
| router.cb.forwardProtocolRegistration | bool | true | |
| router.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.bl.forwardServiceRegistration | bool | true | |
| router.bl.forwardProtocolRegistration | bool | true | |
| router.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.li.forwardServiceRegistration | bool | true | |
| router.li.forwardProtocolRegistration | bool | true | |
| router.eth.bitrate | double | ||
| router.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.nl.forwardServiceRegistration | bool | true | |
| router.nl.forwardProtocolRegistration | bool | true | |
| router.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.tn.forwardServiceRegistration | bool | true | |
| router.tn.forwardProtocolRegistration | bool | true | |
| router.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.at.forwardServiceRegistration | bool | true | |
| router.at.forwardProtocolRegistration | bool | true | |
| router.bgp.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| router.bgp.routingTableModule | string | ||
| router.bgp.ospfRoutingModule | string | parent.hasOspf ? "^.ospf" : "" | |
| switch.macTable.agingTime | double | ||
| switch.macTable.forwardingTableFile | string | ||
| switch.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| switch.l2NodeConfigurator.interfaceTableModule | string | ||
| switch.l2NodeConfigurator.l2ConfiguratorModule | string | "l2NetworkConfigurator" |
the absolute path to the ~L2NetworkConfigurator; use "" if there is no configurator |
| switch.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| switch.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| switch.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| switch.pcapRecorder.fileFormat | string | "pcapng" | |
| switch.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| switch.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| switch.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| switch.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| switch.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| switch.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| switch.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| switch.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| switch.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| switch.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| switch.stp.helloTime | double | ||
| switch.stp.forwardDelay | double | ||
| switch.stp.maxAge | double | ||
| switch.stp.bridgePriority | int | ||
| switch.stp.visualize | bool | ||
| switch.sc.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.sc.forwardServiceRegistration | bool | true | |
| switch.sc.forwardProtocolRegistration | bool | true | |
| switch.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.cb.forwardServiceRegistration | bool | true | |
| switch.cb.forwardProtocolRegistration | bool | true | |
| switch.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.bl.forwardServiceRegistration | bool | true | |
| switch.bl.forwardProtocolRegistration | bool | true | |
| switch.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.li.forwardServiceRegistration | bool | true | |
| switch.li.forwardProtocolRegistration | bool | true | |
| switch.cutthrough.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.cutthrough.forwardServiceRegistration | bool | true | |
| switch.cutthrough.forwardProtocolRegistration | bool | true | |
| switch.eth.bitrate | double | ||
| host.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| host.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| host.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| host.pcapRecorder.fileFormat | string | "pcapng" | |
| host.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| host.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| host.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| host.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| host.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| host.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| host.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| host.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| host.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| host.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| host.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| host.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.cb.forwardServiceRegistration | bool | true | |
| host.cb.forwardProtocolRegistration | bool | true | |
| host.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.bl.forwardServiceRegistration | bool | true | |
| host.bl.forwardProtocolRegistration | bool | true | |
| host.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.li.forwardServiceRegistration | bool | true | |
| host.li.forwardProtocolRegistration | bool | true | |
| host.eth.bitrate | double | ||
| host.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.nl.forwardServiceRegistration | bool | true | |
| host.nl.forwardProtocolRegistration | bool | true | |
| host.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.tn.forwardServiceRegistration | bool | true | |
| host.tn.forwardProtocolRegistration | bool | true | |
| host.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.at.forwardServiceRegistration | bool | true | |
| host.at.forwardProtocolRegistration | bool | true | |
| hhost.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| hhost.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| hhost.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| hhost.pcapRecorder.fileFormat | string | "pcapng" | |
| hhost.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| hhost.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| hhost.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| hhost.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| hhost.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| hhost.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| hhost.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| hhost.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| hhost.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| hhost.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| hhost.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| hhost.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.cb.forwardServiceRegistration | bool | true | |
| hhost.cb.forwardProtocolRegistration | bool | true | |
| hhost.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.bl.forwardServiceRegistration | bool | true | |
| hhost.bl.forwardProtocolRegistration | bool | true | |
| hhost.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.li.forwardServiceRegistration | bool | true | |
| hhost.li.forwardProtocolRegistration | bool | true | |
| hhost.eth.bitrate | double | ||
| hhost.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.nl.forwardServiceRegistration | bool | true | |
| hhost.nl.forwardProtocolRegistration | bool | true | |
| hhost.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.tn.forwardServiceRegistration | bool | true | |
| hhost.tn.forwardProtocolRegistration | bool | true | |
| hhost.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.at.forwardServiceRegistration | bool | true | |
| hhost.at.forwardProtocolRegistration | bool | true |
Source code
// // Several hosts and a router on an Ethernet hub and a switch // module IPv4MediumLAN { parameters: int n; // number of hosts on the switch int h; // number of hosts on the hub @display("i=old/cloud"); gates: inout ethg; submodules: router: Router; switch: EthernetSwitch; host[n]: StandardHost; hub: EthernetHub; hhost[h]: StandardHost; connections: for i=0..n-1 { switch.ethg++ <--> cable <--> host[i].ethg++; } switch.ethg++ <--> cable <--> router.ethg++; router.ethg++ <--> ethg; for i=0..h-1 { hub.ethg++ <--> cable <--> hhost[i].ethg++; } router.ethg++ <--> cable <--> hub.ethg++; }File: examples/inet/ipv4largenet/IPv4LargeNet.ned