UdpAppExample

Package: inet.examples.inet.udpapp

UdpAppExample

network

(no description)

configurator : Ipv4NetworkConfigurator

Assigns IPv4 addresses and sets up static routing for an IPv4 network.

Source:
configurator: Ipv4NetworkConfigurator {
    parameters:
        @display("p=100,100;is=s");
} client : StandardHost

A comprehensive model of an IPv4/IPv6 host that provides a complete network stack with configurable...

Source:
client: StandardHost {
    parameters:
        @display("p=250,100;i=device/pc3");
} server : StandardHost

A comprehensive model of an IPv4/IPv6 host that provides a complete network stack with configurable...

Source:
server: StandardHost {
    parameters:
        @display("p=400,100;i=device/pc2");
}

Usage diagram

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

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

Name Type Default value Description
configurator.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

configurator.minLinkWeight double 1E-3
configurator.configureIsolatedNetworksSeparatly bool false
configurator.config xml xml("")

XML configuration parameters for IP address assignment and adding manual routes

configurator.assignAddresses bool true

Assign IP addresses to all interfaces in the network

configurator.assignUniqueAddresses bool true

Avoid using the same address and raise an error if not possible

configurator.assignDisjunctSubnetAddresses bool true

Avoid using the same address prefix and netmask on different links when assigning IP addresses to interfaces

configurator.addStaticRoutes bool true

Add static routes to the routing tables of all nodes to route to all destination interfaces (only where applicable; turn off when config file contains manual routes)

configurator.addDefaultRoutes bool true

Add default routes if all routes from a source node go through the same gateway (used only if addStaticRoutes is true)

configurator.addSubnetRoutes bool true

Add subnet routes instead of destination interface routes (only where applicable; used only if addStaticRoutes is true)

configurator.addDirectRoutes bool true

Add direct routes towards local network members (i.e. directly connected interfaces) to the routing table (used only if addStaticRoutes is true)

configurator.optimizeRoutes bool true

Optimize routing tables by merging routes, the resulting routing table might route more packets than the original (used only if addStaticRoutes is true)

configurator.updateRoutes bool false

Recalculate static routes if an interface goes down/up or a carrier is lost/back

configurator.dumpTopology bool false

Print extracted network topology to the module output

configurator.dumpLinks bool false

Print recognized network links to the module output

configurator.dumpAddresses bool false

Print assigned IP addresses for all interfaces to the module output

configurator.dumpRoutes bool false

Print configured and optimized routing tables for all nodes to the module output

configurator.dumpConfig string ""

Write configuration into the given config file that can be fed back to speed up subsequent runs (network configurations)

client.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.status.initialStatus string "UP"

TODO @signal, @statistic

client.environment.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.environment.initStage int 0

Initialization stage for the setup command

client.environment.globalNamespace bool false

Create new network namespaces under /var/run/netns/ (Linux only)

client.environment.namespace string ""

Name of the host OS network namespace (optional) (Linux only)

client.environment.setupCommand string ""

A host OS system command

client.environment.teardownCommand string ""

A host OS system command

client.pcapRecorder.displayStringTextFormat string "rec: %n pks"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.pcapRecorder.verbose bool true

Whether to log packets on the module output

client.pcapRecorder.recordEmptyPackets bool true

Specifies if zero length packets are recorded or not

client.pcapRecorder.enableConvertingPackets bool true

Specifies if converting packets to link type is allowed or not

client.pcapRecorder.pcapFile string ""

The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap"

client.pcapRecorder.fileFormat string "pcapng"
client.pcapRecorder.snaplen int 65535

Maximum number of bytes to record per packet

client.pcapRecorder.timePrecision int 6

Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format).

client.pcapRecorder.dumpBadFrames bool true

Enable dump of frames with hasBitError

client.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

Space-separated list of sibling module names to listen on

client.pcapRecorder.sendingSignalNames string "transmissionEnded"

Space-separated list of outbound packet signals to subscribe to

client.pcapRecorder.receivingSignalNames string "receptionEnded"

Space-separated list of inbound packet signals to subscribe to

client.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

Space-separated list of protocol names as defined in the Protocol class

client.pcapRecorder.packetFilter object "*"

Which packets are considered, matches all packets by default

client.pcapRecorder.helpers string ""

Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

client.pcapRecorder.alwaysFlush bool false

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

client.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

client.cb.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.cb.interfaceTableModule string

Module path to the ~InterfaceTable module

client.cb.forwardServiceRegistration bool true
client.cb.forwardProtocolRegistration bool true
client.cb.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.cb.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.cb.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

client.bl.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.bl.interfaceTableModule string

Module path to the ~InterfaceTable module

client.bl.forwardServiceRegistration bool true
client.bl.forwardProtocolRegistration bool true
client.bl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.bl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.bl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

client.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.li.interfaceTableModule string

Module path to the ~InterfaceTable module

client.li.forwardServiceRegistration bool true
client.li.forwardProtocolRegistration bool true
client.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

client.eth.bitrate double
client.nl.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.nl.interfaceTableModule string

Module path to the ~InterfaceTable module

client.nl.forwardServiceRegistration bool true
client.nl.forwardProtocolRegistration bool true
client.nl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.nl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.nl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

client.tn.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.tn.interfaceTableModule string

Module path to the ~InterfaceTable module

client.tn.forwardServiceRegistration bool true
client.tn.forwardProtocolRegistration bool true
client.tn.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.tn.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.tn.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

client.at.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

client.at.interfaceTableModule string

Module path to the ~InterfaceTable module

client.at.forwardServiceRegistration bool true
client.at.forwardProtocolRegistration bool true
client.at.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

client.at.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

client.at.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.status.initialStatus string "UP"

TODO @signal, @statistic

server.environment.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.environment.initStage int 0

Initialization stage for the setup command

server.environment.globalNamespace bool false

Create new network namespaces under /var/run/netns/ (Linux only)

server.environment.namespace string ""

Name of the host OS network namespace (optional) (Linux only)

server.environment.setupCommand string ""

A host OS system command

server.environment.teardownCommand string ""

A host OS system command

server.pcapRecorder.displayStringTextFormat string "rec: %n pks"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.pcapRecorder.verbose bool true

Whether to log packets on the module output

server.pcapRecorder.recordEmptyPackets bool true

Specifies if zero length packets are recorded or not

server.pcapRecorder.enableConvertingPackets bool true

Specifies if converting packets to link type is allowed or not

server.pcapRecorder.pcapFile string ""

The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap"

server.pcapRecorder.fileFormat string "pcapng"
server.pcapRecorder.snaplen int 65535

Maximum number of bytes to record per packet

server.pcapRecorder.timePrecision int 6

Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format).

server.pcapRecorder.dumpBadFrames bool true

Enable dump of frames with hasBitError

server.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

Space-separated list of sibling module names to listen on

server.pcapRecorder.sendingSignalNames string "transmissionEnded"

Space-separated list of outbound packet signals to subscribe to

server.pcapRecorder.receivingSignalNames string "receptionEnded"

Space-separated list of inbound packet signals to subscribe to

server.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

Space-separated list of protocol names as defined in the Protocol class

server.pcapRecorder.packetFilter object "*"

Which packets are considered, matches all packets by default

server.pcapRecorder.helpers string ""

Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

server.pcapRecorder.alwaysFlush bool false

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

server.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

server.cb.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.cb.interfaceTableModule string

Module path to the ~InterfaceTable module

server.cb.forwardServiceRegistration bool true
server.cb.forwardProtocolRegistration bool true
server.cb.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.cb.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.cb.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.bl.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.bl.interfaceTableModule string

Module path to the ~InterfaceTable module

server.bl.forwardServiceRegistration bool true
server.bl.forwardProtocolRegistration bool true
server.bl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.bl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.bl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.li.interfaceTableModule string

Module path to the ~InterfaceTable module

server.li.forwardServiceRegistration bool true
server.li.forwardProtocolRegistration bool true
server.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.eth.bitrate double
server.nl.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.nl.interfaceTableModule string

Module path to the ~InterfaceTable module

server.nl.forwardServiceRegistration bool true
server.nl.forwardProtocolRegistration bool true
server.nl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.nl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.nl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.tn.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.tn.interfaceTableModule string

Module path to the ~InterfaceTable module

server.tn.forwardServiceRegistration bool true
server.tn.forwardProtocolRegistration bool true
server.tn.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.tn.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.tn.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

server.at.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

server.at.interfaceTableModule string

Module path to the ~InterfaceTable module

server.at.forwardServiceRegistration bool true
server.at.forwardProtocolRegistration bool true
server.at.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

server.at.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

server.at.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

Source code

network UdpAppExample
{
    types:
        channel C extends DatarateChannel
        {
            datarate = 10Mbps;
            delay = 0.1us;
        }
    submodules:
        configurator: Ipv4NetworkConfigurator {
            parameters:
                @display("p=100,100;is=s");
        }
        client: StandardHost {
            parameters:
                @display("p=250,100;i=device/pc3");
        }
        server: StandardHost {
            parameters:
                @display("p=400,100;i=device/pc2");
        }
    connections allowunconnected:
        client.pppg++ <--> C <--> server.pppg++;
}

File: examples/inet/udpapp/UdpAppExample.ned