From 3eabaa645b98f294e1ff69c0c3d63a2b5f48fd3f Mon Sep 17 00:00:00 2001 From: Abhilash Date: Wed, 11 Dec 2024 19:04:14 +0100 Subject: [PATCH 1/4] Create Ieee80211tsnInterface.ned --- .../ieee80211/Ieee80211tsnInterface.ned | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 src/inet/linklayer/ieee80211/Ieee80211tsnInterface.ned diff --git a/src/inet/linklayer/ieee80211/Ieee80211tsnInterface.ned b/src/inet/linklayer/ieee80211/Ieee80211tsnInterface.ned new file mode 100644 index 00000000000..82c2f8fca0b --- /dev/null +++ b/src/inet/linklayer/ieee80211/Ieee80211tsnInterface.ned @@ -0,0 +1,157 @@ +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +package inet.linklayer.ieee80211; + + +// +// Copyright (C) 2006 OpenSim Ltd. +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// + + +import inet.linklayer.common.IIeee8021dQosClassifier; +import inet.linklayer.contract.IWirelessInterface; +import inet.linklayer.ieee80211.llc.IIeee80211Llc; +import inet.linklayer.ieee80211.mgmt.IIeee80211Agent; +import inet.linklayer.ieee80211.mgmt.IIeee80211Mgmt; +import inet.linklayer.ieee80211.mib.Ieee80211Mib; +import inet.linklayer.ieee8021q.PcpClassifier; +import inet.linklayer.ieee8021q.PcpTrafficClassClassifier; +import inet.networklayer.common.InterfaceTable; +import inet.networklayer.common.NetworkInterface; +import inet.physicallayer.wireless.common.contract.packetlevel.IRadio; +import ned.IdealChannel; + + +// +// This module implements an IEEE 802.11 network interface. It implements +// a large subset of the IEEE 802.11 standard, and may use radio models +// and wireless signal representations of varying levels of detail. +// It is also extremely configurable, and its component structure makes +// it easy to experiment with various details of the protocol. +// +// The main components of the interface are the MAC and the radio submodules. +// Most configuration parameters are in the MAC (~Ieee80211Mac) and its +// numerous subcomponents. Most subcomponents are replaceable to facilitate +// experimentation by using typename assignments in the configuration. +// +// The default radio is ~Ieee80211ScalarRadio, but it can be replaced +// with any of several compatible radio types using typename assignments +// in the configuration. Several radio models of varying levels of detail +// are available, from simple unit disk radio models to layered radio models +// that explicitly model forward error correction, scrambling, symbol +// encoding/decoding, etc, and may represent radio signals with a +// multi-dimensional power density function over time and frequency. +// The INET User Guide elaborates on the possibilities. +// +// The type of the management submodule is also configurable. The type of this +// submodule decides whether the interfaces acts an AP, a STA, or is in ad hoc mode. +// Use ~Ieee80211MgmtSta or ~Ieee80211MgmtStaSimplified for STA, +// ~Ieee80211MgmtAp or ~Ieee80211MgmtApSimplified for AP, and +// ~Ieee80211MgmtAdhoc for ad hoc mode. +// +// The agent submodule is responsible for initiating the process of connecting +// to an AP and similar tasks normally done from "user space". +// +// The LLC submodule is responsible for adding/removing the LLC header on packets. +// +// A classifier is responsible for assigning a 802.1d User Priority (UP) to +// packets, and is only needed if QoS is involved. +// +// The clock submodule would allow clock skew modeling -- this is currently not used. +// +// Note about the implementation: +// +// Despite its appearance, Ieee80211Interface is not a plain compound module. +// It has an underlying custom C++ class that inherits from cModule. +// +module Ieee80211tsnInterface extends NetworkInterface like IWirelessInterface +{ + parameters: + string interfaceTableModule; + string energySourceModule = default(""); + string opMode @enum("a","b","g(erp)","g(mixed)","n(mixed-2.4Ghz)","p","ac") = default("g(mixed)"); + string address @mutable = default("auto"); // MAC address as hex string (12 hex digits), or + // "auto". "auto" values will be replaced by + // a generated MAC address in init stage 0. + string protocol = default(""); + double bitrate @unit(bps) = default(-1bps); + **.opMode = this.opMode; + **.bitrate = this.bitrate; + mac.modeSet = default(this.opMode); + mac.*.rateSelection.dataFrameBitrate = default(this.bitrate); + *.macModule = default(absPath(".mac")); + *.mibModule = default(absPath(".mib")); + *.interfaceTableModule = default(absPath(this.interfaceTableModule)); + *.energySourceModule = default(absPath(this.energySourceModule)); + gates: + input upperLayerIn; + output upperLayerOut; + input radioIn @labels(IWirelessSignal); + submodules: + mib: Ieee80211Mib { + parameters: + @display("p=100,300;is=s"); + } + llc: like IIeee80211Llc { + parameters: + @display("p=300,200"); + } + agent: like IIeee80211Agent if typename != "" { + parameters: + @display("p=700,300"); + } + mgmt: like IIeee80211Mgmt { + parameters: + @display("p=500,300"); + } + mac: like IIeee80211Mac { + parameters: + @display("p=300,300"); + } + radio: like IRadio { + parameters: + @display("p=300,400"); + } + tsnLayer: tsnLayer { + @display("p=421,66"); + } + interfaceTable: InterfaceTable { + @display("p=105,401"); + } + pcpClassifier: PcpClassifier { + @display("p=488,161"); + } + connections: + radioIn --> { @display("m=s"); } --> radio.radioIn; + radio.upperLayerIn <-- mac.lowerLayerOut; + radio.upperLayerOut --> mac.lowerLayerIn; + + mac.mgmtOut --> mgmt.macIn; + mac.mgmtIn <-- mgmt.macOut; + + mgmt.agentOut --> agent.mgmtIn if exists(agent); + mgmt.agentIn <-- agent.mgmtOut if exists(agent); + + llc.upperLayerOut --> { @display("m=n"); } --> upperLayerOut; + llc.lowerLayerOut --> mac.upperLayerIn; + llc.lowerLayerIn <-- mac.upperLayerOut; + + upperLayerIn --> { @display("m=n"); } --> tsnLayer.upperLayerIn; + tsnLayer.lowerLayerOut --> IdealChannel --> pcpClassifier.in; + pcpClassifier.out++ --> IdealChannel --> llc.upperLayerIn; +} From 6bac3fce494153c0b744033a3127918b74bf20c5 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Wed, 11 Dec 2024 19:04:55 +0100 Subject: [PATCH 2/4] Create tsnLayer.ned --- src/inet/linklayer/ieee80211/tsnLayer.ned | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/inet/linklayer/ieee80211/tsnLayer.ned diff --git a/src/inet/linklayer/ieee80211/tsnLayer.ned b/src/inet/linklayer/ieee80211/tsnLayer.ned new file mode 100644 index 00000000000..5a4ddb58cc9 --- /dev/null +++ b/src/inet/linklayer/ieee80211/tsnLayer.ned @@ -0,0 +1,77 @@ +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +package inet.linklayer.ieee80211; + +import inet.linklayer.common.IIeee8021dQosClassifier; +import inet.linklayer.contract.IWirelessInterface; +import inet.linklayer.ieee80211.llc.IIeee80211Llc; +import inet.linklayer.ieee80211.mgmt.IIeee80211Agent; +import inet.linklayer.ieee80211.mgmt.IIeee80211Mgmt; +import inet.linklayer.ieee80211.mib.Ieee80211Mib; +import inet.linklayer.ieee8021q.Ieee8021qTimeAwareShaper; +import inet.networklayer.common.NetworkInterface; +import inet.physicallayer.wireless.common.contract.packetlevel.IRadio; +import inet.protocolelement.common.PacketEmitter; +import inet.protocolelement.redundancy.StreamCoderLayer; +import inet.protocolelement.redundancy.StreamIdentifier; +import inet.protocolelement.redundancy.StreamIdentifierLayer; +import inet.queueing.common.PacketDelayer; +import inet.queueing.queue.PacketQueue; +import inet.queueing.server.PacketServer; +import ned.IdealChannel; + + +module tsnLayer +{ + @display("bgb=437,530"); + gates: + input upperLayerIn; + output upperLayerOut @loose; + output lowerLayerOut; + input lowerLayerIn @loose; + submodules: + packetDelayer: PacketDelayer { + @display("p=87,75"); + } + streamIdentifierLayer: StreamIdentifierLayer { + @display("p=293,75"); + } + streamCoderLayer: StreamCoderLayer { + @display("p=291,172"); + } + packetServer: PacketServer { + @display("p=291,353"); + } + packetEmitter: PacketEmitter { + @display("p=291,448"); + } + ieee8021qTimeAwareShaper: Ieee8021qTimeAwareShaper { + @display("p=290.496,262.728"); + } + connections allowunconnected: + upperLayerIn --> IdealChannel --> packetDelayer.in; + packetDelayer.out --> IdealChannel --> streamIdentifierLayer.upperLayerIn; + streamIdentifierLayer.lowerLayerOut --> IdealChannel --> streamCoderLayer.upperLayerIn; + streamCoderLayer.upperLayerOut --> IdealChannel --> streamIdentifierLayer.lowerLayerIn; + + + + packetServer.out --> IdealChannel --> packetEmitter.in; + packetEmitter.out --> IdealChannel --> lowerLayerOut; + streamIdentifierLayer.upperLayerOut --> IdealChannel --> upperLayerOut; + streamCoderLayer.lowerLayerOut --> IdealChannel --> ieee8021qTimeAwareShaper.in; + ieee8021qTimeAwareShaper.out --> IdealChannel --> packetServer.in; +} From aea958ec6d74fe1fce4d337fe903732af0da78dc Mon Sep 17 00:00:00 2001 From: Abhilash Date: Wed, 11 Dec 2024 19:11:21 +0100 Subject: [PATCH 3/4] Create TsnWifiDevice.ned --- src/inet/node/tsn/TsnWifiDevice.ned | 349 ++++++++++++++++++++++++++++ 1 file changed, 349 insertions(+) create mode 100644 src/inet/node/tsn/TsnWifiDevice.ned diff --git a/src/inet/node/tsn/TsnWifiDevice.ned b/src/inet/node/tsn/TsnWifiDevice.ned new file mode 100644 index 00000000000..e4bba4ded86 --- /dev/null +++ b/src/inet/node/tsn/TsnWifiDevice.ned @@ -0,0 +1,349 @@ +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +package inet.node.tsn; +import inet.node.base.NodeBase; +import inet.common.MessageDispatcher; + +//App Laayer +import inet.applications.contract.IApp; + +import inet.transportlayer.contract.ISctp; +import inet.transportlayer.contract.ITcp; +import inet.transportlayer.contract.IUdp; + + +import inet.networklayer.contract.INetworkLayer; + +import inet.common.packet.recorder.PcapRecorder; +import inet.linklayer.contract.IEthernetInterface; +import inet.linklayer.contract.ILoopbackInterface; +import inet.linklayer.contract.IPppInterface; +import inet.linklayer.contract.ITunnelInterface; +import inet.linklayer.contract.IVirtualInterface; +import inet.linklayer.contract.IWirelessInterface; +import inet.linklayer.ethernet.contract.IEthernetLayer; +import inet.linklayer.ieee8021q.IIeee8021qLayer; +import inet.linklayer.ieee8021r.IIeee8021rLayer; +import inet.linklayer.ieee8022.IIeee8022Llc; +import inet.networklayer.common.InterfaceTable; +import inet.node.contract.IEthernetNetworkNode; +import inet.protocolelement.contract.IProtocolLayer; +// +// TODO documentation +// +module TsnWifiDevice extends NodeBase +{ + parameters: + + @display("i=device/wifilaptop;bgb=1700.79,1323.608"); + @figure[submodules]; + + ipv4.arp.proxyArpInterfaces = default(""); // proxy arp is disabled on hosts by default + + *.routingTableModule = default("^.ipv4.routingTable"); + + //Appln Layer + int numApps = default(0); + @figure[applicationLayer](type=rectangle; pos=250,5; size=1000,137; lineColor=#808080; cornerRadius=5; fillColor=#ffff00; fillOpacity=0.1); + @figure[applicationLayer.title](type=text; pos=1245,10; anchor=ne; text="application layer"); + + //Transport layer + bool hasUdp = default(firstAvailableOrEmpty("Udp") != ""); + bool hasTcp = default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""); + bool hasSctp = default(false); + @figure[transportLayer](type=rectangle; pos=250,158; size=1000,134; fillColor=#ff0000; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); + @figure[transportLayer.title](type=text; pos=1245,163; anchor=ne; text="transport layer"); + + bool hasIpv4 = default(true); + bool hasIpv6 = default(false); + bool hasGn = default(false); + bool forwarding = default(false); + bool multicastForwarding = default(false); + *.forwarding = this.forwarding; + *.multicastForwarding = this.multicastForwarding; + //Linklayer + bool recordPcap = default(false); + int numPcapRecorders = default(recordPcap ? 1 : 0); + int numLoInterfaces = default(1); + int numWlanInterfaces = default(1); + int numEthInterfaces = default(0); // minimum number of ethernet interfaces + int numPppInterfaces = default(0); // minimum number of PPP interfaces + int numTunInterfaces = default(0); + int numVirtInterfaces = default(0); + string fcsMode @enum("declared","computed") = default("declared"); + pcapRecorder[*].pcapFile = default("results/" + expand("${configname}-") + fullPath() + ".pcap"); + mobility.typename = default(numWlanInterfaces > 0 ? "StationaryMobility" : ""); + *.interfaceTableModule = default(absPath(".interfaceTable")); + *.fcsMode = this.fcsMode; + wlan[*].radio.antenna.mobilityModule = default("^.^.^.mobility"); + // ethernet.registerProtocol = default(true); + @figure[linkLayer](type=rectangle; pos=250,458; size=1000,284; fillColor=#0000ff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); + @figure[linkLayer.title](type=text; pos=1245,463; anchor=ne; text="link layer"); + @figure[interfaceLayer](type=rectangle; pos=250,758; size=1000,360; fillColor=#00ffff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); + @figure[interfaceLayer.title](type=text; pos=1245,763; anchor=ne; text="interface layer"); + @display("bgb=1596.406,1119.968"); + + @figure[networkLayer](type=rectangle; pos=250,308; size=1000,134; fillColor=#00ff00; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); + @figure[networkLayer.title](type=text; pos=1245,313; anchor=ne; text="network layer"); + + bool hasTimeSynchronization = default(false); // enable IEEE 802.1 AS time synchronization + bool hasIngressTrafficFiltering = default(false); // enable IEEE 802.1 Qci ingress per-stream filtering + bool hasEgressTrafficFiltering = default(false); // enable IEEE 802.1 Qci egress per-stream filtering + bool hasEgressTrafficShaping = default(false); // enable IEEE 802.1 egress traffic shaping (credit based shaping, time aware shaping, asynchronous shaping) + bool hasStreamRedundancy = default(false); // enable IEEE 802.1 CB frame replication and elimination + bool hasIncomingStreams = default(false); // enable IEEE 802.1 stream decoding + bool hasOutgoingStreams = default(false); // enable IEEE 802.1 stream identification and stream encoding + bool hasFramePreemption = default(false); // enable IEEE 802.1 Qbu frame preemption + bool hasCutthroughSwitching = default(false); // enable cut-through switching support + clock.typename = default(hasTimeSynchronization ? "SettableClock" : ""); // enable explicit local clock model + ethernet.typename = default("EthernetLayer"); // use Ethernet protocol layer outside of network interfaces + eth[*].typename = default("LayeredEthernetInterface"); // switch to modular Ethernet interface + eth[*].macLayer.typename = default(hasFramePreemption ? "EthernetPreemptingMacLayer" : "EthernetMacLayer"); + eth[*].macLayer.queue.typename = default(hasEgressTrafficShaping ? "Ieee8021qTimeAwareShaper" : (hasFramePreemption ? "" : "PacketQueue")); // use priority queue having multiple subqueues controlled by separate gates + eth[*].phyLayer.typename = default(hasCutthroughSwitching ? "EthernetStreamingPhyLayer" : (hasFramePreemption ? "EthernetPreemptingPhyLayer" : "EthernetPhyLayer")); // use packet streaming when cut-through switching is enabled +// bridging.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy || hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "BridgingLayer" : ""); // switch to modular bridging +// bridging.interfaceRelay.typename = default(""); // disable frame relaying +// bridging.streamIdentifier.typename = default(hasOutgoingStreams || hasStreamRedundancy ? "StreamIdentifierLayer" : ""); // enable stream identification when stream redundancy is enabled +// bridging.streamIdentifier.identifier.hasSequenceNumbering = default(hasStreamRedundancy); // enable sequence numberinf if stream redundancy is enabled +// bridging.streamRelay.typename = default(hasStreamRedundancy ? "StreamRelayLayer" : ""); // enable stream merging and stream splitting when stream redundancy is enabled +// bridging.streamFilter.typename = default(hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "StreamFilterLayer" : ""); // enable stream filtering when ingress or egress per-stream filtering is enabled +// bridging.streamFilter.ingress.typename = default(hasIngressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // use IEEE 802.1 Qci ingress filter when ingress per-stream filtering is enabled +// bridging.streamFilter.egress.typename = default(hasEgressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // use IEEE 802.1 Qci egress filter when egress per-stream filtering is enabled +// bridging.streamCoder.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "StreamCoderLayer" : ""); // enable stream endocing/decoding when stream redundancy is enabled + ieee8021r.typename = default(hasStreamRedundancy ? "Ieee8021rProtocol" : ""); + ieee8021q.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "Ieee8021qProtocol" : ""); + // + //ieee8021r.typename = default(hasStreamRedundancy ? "Ieee8021rProtocol" : ""); + //ieee8021q.typename = default("Ieee8021qProtocol"); + llc.typename = default(""); + gates: + input radioIn[numWlanInterfaces] @directIn @allowUnconnected; + inout pppg[numPppInterfaces] @labels(PppFrame-conn) @allowUnconnected; + inout ethg[numEthInterfaces] @labels(EtherFrame-conn) @allowUnconnected; + //Custom + inout virtual[numWlanInterfaces] @labels(HostWireless-conn) @allowUnconnected; + submodules: + //App Layer + app[numApps]: <> like IApp { + @display("p=375,75,row,150"); + } + at: MessageDispatcher { + @display("p=750,150;b=1000,5,,,,1"); + } + //Transport Layer + udp: like IUdp if hasUdp { + @display("p=375,225"); + } + tcp: like ITcp if hasTcp { + @display("p=525,225"); + } + sctp: like ISctp if hasSctp { + @display("p=675,225"); + } + tn: MessageDispatcher { + @display("p=750,300;b=1000,5,,,,1"); + } + //Link Layer + ipv4: like INetworkLayer if hasIpv4 { + @display("p=375,375;q=queue"); + } + ipv6: like INetworkLayer if hasIpv6 { + @display("p=525,375;q=queue"); + } + generic: like INetworkLayer if hasGn { + @display("p=675,375;q=queue"); + } + nl: MessageDispatcher { + @display("p=750,450;b=1000,5,,,,1"); + } + //LinkLayer + pcapRecorder[numPcapRecorders]: PcapRecorder { + @display("p=125,640;is=s"); + } + interfaceTable: InterfaceTable { + @display("p=125,240;is=s"); + } + llc: like IIeee8022Llc if typename != "" { + @display("p=375,525"); + } + cb: MessageDispatcher { + @display("p=750,600;b=1000,5"); + } + bridging: like IProtocolLayer if typename != "" { + @display("p=750,675"); + } + bl: MessageDispatcher { + @display("p=750,750;b=1000,5"); + } + ethernet: 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" { + @display("p=194.188,824.17004"); + } + ieee8021q: like IIeee8021qLayer if typename != "" { + @display("p=525,825"); + } + ieee8021r: like IIeee8021rLayer if typename != "" { + @display("p=1088.3561,824.17004"); + } + li: MessageDispatcher { + @display("p=750,900;b=1000,5,,,,1"); + } + lo[numLoInterfaces]: like ILoopbackInterface { + @display("p=749.73596,1207.908,row,150"); + } + // TODO move wlan interfaces after eth interfaces, but it changes IP address assignment and breaks examples/inet/configurator/complex.ini + wlan[numWlanInterfaces]: like IWirelessInterface { + @display("p=462.89,1016.10004,row,150;q=queue"); + } + ppp[sizeof(pppg)]: like IPppInterface { + @display("p=178.382,973.19806,row,150;q=txQueue"); + } + eth[sizeof(ethg)]: like IEthernetInterface { + @display("p=900,975,row,150;q=txQueue"); + } + tun[numTunInterfaces]: like ITunnelInterface { + @display("p=1110.936,1029.6481,row,150;q=txQueue"); + } + virt[numVirtInterfaces]: like IVirtualInterface { + @display("p=1393.186,1000.294,row,150;q=txQueue"); + } + + connections allowunconnected: + //App Layer + for i=0..numApps-1 { + app[i].socketOut --> at.in++; + app[i].socketIn <-- at.out++; + } + + at.out++ --> udp.appIn if hasUdp; + at.in++ <-- udp.appOut if hasUdp; + + at.out++ --> tcp.appIn if hasTcp; + at.in++ <-- tcp.appOut if hasTcp; + + at.out++ --> sctp.appIn if hasSctp; + at.in++ <-- sctp.appOut if hasSctp; + + at.out++ --> tn.in++; + at.in++ <-- tn.out++; + //Transport layer + udp.ipOut --> tn.in++ if hasUdp; + udp.ipIn <-- tn.out++ if hasUdp; + + tcp.ipOut --> tn.in++ if hasTcp; + tcp.ipIn <-- tn.out++ if hasTcp; + + sctp.ipOut --> tn.in++ if hasSctp; + tn.out++ --> sctp.ipIn if hasSctp; + + tn.out++ --> ipv4.transportIn if hasIpv4; + tn.in++ <-- ipv4.transportOut if hasIpv4; + + tn.out++ --> ipv6.transportIn if hasIpv6; + tn.in++ <-- ipv6.transportOut if hasIpv6; + + tn.out++ --> generic.transportIn if hasGn; + tn.in++ <-- generic.transportOut if hasGn; + + tn.out++ --> nl.in++; + tn.in++ <-- nl.out++; + //Link layer + ipv4.ifIn <-- nl.out++ if hasIpv4; + ipv4.ifOut --> nl.in++ if hasIpv4; + + ipv6.ifIn <-- nl.out++ if hasIpv6; + ipv6.ifOut --> nl.in++ if hasIpv6; + + generic.ifIn <-- nl.out++ if exists(generic); + generic.ifOut --> nl.in++ if exists(generic); + + cb.out++ --> nl.in++; + cb.in++ <-- nl.out++; + + llc.lowerLayerOut --> cb.in++ if exists(llc); + llc.lowerLayerIn <-- cb.out++ if exists(llc); + + cb.out++ --> bridging.upperLayerIn if exists(bridging); + bridging.upperLayerOut --> cb.in++ if exists(bridging); + + bridging.lowerLayerOut --> bl.in++ if exists(bridging); + bl.out++ --> bridging.lowerLayerIn if exists(bridging); + + cb.out++ --> bl.in++ if !exists(bridging); + bl.out++ --> cb.in++ if !exists(bridging); + + bl.out++ --> li.in++; + li.out++ --> bl.in++; + + bl.out++ --> ieee8021q.upperLayerIn if exists(ieee8021q); + ieee8021q.upperLayerOut --> bl.in++ if exists(ieee8021q); + + bl.out++ --> ieee8021r.upperLayerIn if exists(ieee8021r); + ieee8021r.upperLayerOut --> bl.in++ if exists(ieee8021r); + + bl.out++ --> ethernet.upperLayerIn if exists(ethernet); + ethernet.upperLayerOut --> bl.in++ if exists(ethernet); + + ieee8021q.lowerLayerOut --> li.in++ if exists(ieee8021q); + li.out++ --> ieee8021q.lowerLayerIn if exists(ieee8021q); + + ieee8021r.lowerLayerOut --> li.in++ if exists(ieee8021r); + li.out++ --> ieee8021r.lowerLayerIn if exists(ieee8021r); + + ethernet.lowerLayerOut --> li.in++ if exists(ethernet); + li.out++ --> ethernet.lowerLayerIn if exists(ethernet); + + for i=0..sizeof(radioIn)-1 { + radioIn[i] --> { @display("m=s"); } --> wlan[i].radioIn; + } + + for i=0..sizeof(ethg)-1 { + ethg[i] <--> { @display("m=s"); } <--> eth[i].phys; + } + + for i=0..sizeof(pppg)-1 { + pppg[i] <--> { @display("m=s"); } <--> ppp[i].phys; + } + + for i=0..numLoInterfaces-1 { + li.out++ --> lo[i].upperLayerIn; + lo[i].upperLayerOut --> li.in++; + } + + for i=0..sizeof(radioIn)-1 { + wlan[i].upperLayerOut --> li.in++; + wlan[i].upperLayerIn <-- li.out++; + } + + for i=0..sizeof(ethg)-1 { + eth[i].upperLayerOut --> li.in++; + eth[i].upperLayerIn <-- li.out++; + } + + for i=0..sizeof(pppg)-1 { + ppp[i].upperLayerOut --> li.in++; + ppp[i].upperLayerIn <-- li.out++; + } + + for i=0..numTunInterfaces-1 { + tun[i].upperLayerOut --> li.in++; + tun[i].upperLayerIn <-- li.out++; + } + + for i=0..numVirtInterfaces-1 { + virt[i].upperLayerOut --> li.in++; + virt[i].upperLayerIn <-- li.out++; + } +} From c944674a98baaf7ae3aaed1e8708d8867c7baea0 Mon Sep 17 00:00:00 2001 From: Abh4git Date: Thu, 12 Dec 2024 01:51:39 +0530 Subject: [PATCH 4/4] TsnAccessPoint added --- src/inet/node/tsn/TsnAccessPoint.ned | 58 +++++ src/inet/node/tsn/TsnWifiDevice.ned | 349 --------------------------- 2 files changed, 58 insertions(+), 349 deletions(-) create mode 100644 src/inet/node/tsn/TsnAccessPoint.ned delete mode 100644 src/inet/node/tsn/TsnWifiDevice.ned diff --git a/src/inet/node/tsn/TsnAccessPoint.ned b/src/inet/node/tsn/TsnAccessPoint.ned new file mode 100644 index 00000000000..086e45bbb3d --- /dev/null +++ b/src/inet/node/tsn/TsnAccessPoint.ned @@ -0,0 +1,58 @@ +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +package inet.node.tsn; + +import inet.linklayer.contract.IIeee8021qLayer; +import inet.node.wireless.AccessPoint; +import ned.IdealChannel; + +module TsnAccessPoint extends AccessPoint +{ + parameters: + @defaultStatistic("gateState:vector"; module="wlan[0].macLayer.queue.transmissionGate[0]"); + // bool hasTimeSynchronization = default(false); // enable IEEE 802.1 AS time synchronization + // bool hasIngressTrafficFiltering = default(false); // enable IEEE 802.1 Qci ingress per-stream filtering + // bool hasEgressTrafficShaping = default(false); // enable IEEE 802.1 egress traffic shaping (credit based shaping, time aware shaping, asynchronous shaping) + // bool hasStreamRedundancy = default(false); // enable IEEE 802.1 CB frame replication and elimination + // bool hasIncomingStreams = default(false); // enable IEEE 802.1 stream decoding + // bool hasOutgoingStreams = default(false); // enable IEEE 802.1 stream identification and stream encoding + // bool hasFramePreemption = default(false); // enable IEEE 802.1 Qbu frame preemption + // //hasGptp = default(hasTimeSynchronization); // enable gPTP protocol + // //gptp.gptpNodeType = default("BRIDGE_NODE"); // configure gPTP bridge node type + // //gptp.slavePort = default("eth0"); // configure default gPTP bridge slave port + // clock.typename = default(hasTimeSynchronization ? "SettableClock" : ""); // e + // wiFiBridgingLayer.streamIdentifier.typename = default(hasOutgoingStreams || hasStreamRedundancy ? "StreamIdentifierLayer" : ""); + // bridging.typename = default("BridgingLayer"); // switch to modular bridging + // bridging.directionReverser.cutthroughBarrier.typename = default(hasCutthroughSwitching ? "EthernetCutthroughBarrier" : ""); // enable cut-through barrier when cut-through switching is enabled + // bridging.streamIdentifier.typename = default(hasOutgoingStreams || hasStreamRedundancy ? "StreamIdentifierLayer" : ""); // enable stream identification when stream redundancy is enabled + // bridging.streamRelay.typename = default(hasStreamRedundancy ? "StreamRelayLayer" : ""); // enable stream merging and stream splitting when stream redundancy is enabled + // bridging.streamFilter.typename = default(hasIngressTrafficFiltering ? "StreamFilterLayer" : ""); // enable stream filtering when ingress per-stream filtering is enabled + // bridging.streamFilter.ingress.typename = default(hasIngressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // use 802.1 Qci ingress filtering when ingress per-stream filtering is enabled + // bridging.streamCoder.typename = default(hasIncomingStreams || hasOutgoingStreams || hasIngressTrafficFiltering || hasStreamRedundancy ? "StreamCoderLayer" : ""); // enable stream endocing/decoding when stream redundancy is enabled + // + gates: + inout virtual[numWlanInterfaces] @labels(Wireless-conn); + submodules: + iIeee8021q: like IIeee8021qLayer { + @display("p=882,283"); + } + connections: + //bl.out++ --> IdealChannel --> iIeee8021q.upperLayerIn; + li.out++ --> IdealChannel --> iIeee8021q.lowerLayerIn; + iIeee8021q.upperLayerOut --> IdealChannel --> bl.in++; + iIeee8021q.lowerLayerOut --> IdealChannel --> li.in++; + bl.out++ --> IdealChannel --> iIeee8021q.upperLayerIn; +} diff --git a/src/inet/node/tsn/TsnWifiDevice.ned b/src/inet/node/tsn/TsnWifiDevice.ned deleted file mode 100644 index e4bba4ded86..00000000000 --- a/src/inet/node/tsn/TsnWifiDevice.ned +++ /dev/null @@ -1,349 +0,0 @@ -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program. If not, see http://www.gnu.org/licenses/. -// - -package inet.node.tsn; -import inet.node.base.NodeBase; -import inet.common.MessageDispatcher; - -//App Laayer -import inet.applications.contract.IApp; - -import inet.transportlayer.contract.ISctp; -import inet.transportlayer.contract.ITcp; -import inet.transportlayer.contract.IUdp; - - -import inet.networklayer.contract.INetworkLayer; - -import inet.common.packet.recorder.PcapRecorder; -import inet.linklayer.contract.IEthernetInterface; -import inet.linklayer.contract.ILoopbackInterface; -import inet.linklayer.contract.IPppInterface; -import inet.linklayer.contract.ITunnelInterface; -import inet.linklayer.contract.IVirtualInterface; -import inet.linklayer.contract.IWirelessInterface; -import inet.linklayer.ethernet.contract.IEthernetLayer; -import inet.linklayer.ieee8021q.IIeee8021qLayer; -import inet.linklayer.ieee8021r.IIeee8021rLayer; -import inet.linklayer.ieee8022.IIeee8022Llc; -import inet.networklayer.common.InterfaceTable; -import inet.node.contract.IEthernetNetworkNode; -import inet.protocolelement.contract.IProtocolLayer; -// -// TODO documentation -// -module TsnWifiDevice extends NodeBase -{ - parameters: - - @display("i=device/wifilaptop;bgb=1700.79,1323.608"); - @figure[submodules]; - - ipv4.arp.proxyArpInterfaces = default(""); // proxy arp is disabled on hosts by default - - *.routingTableModule = default("^.ipv4.routingTable"); - - //Appln Layer - int numApps = default(0); - @figure[applicationLayer](type=rectangle; pos=250,5; size=1000,137; lineColor=#808080; cornerRadius=5; fillColor=#ffff00; fillOpacity=0.1); - @figure[applicationLayer.title](type=text; pos=1245,10; anchor=ne; text="application layer"); - - //Transport layer - bool hasUdp = default(firstAvailableOrEmpty("Udp") != ""); - bool hasTcp = default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""); - bool hasSctp = default(false); - @figure[transportLayer](type=rectangle; pos=250,158; size=1000,134; fillColor=#ff0000; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); - @figure[transportLayer.title](type=text; pos=1245,163; anchor=ne; text="transport layer"); - - bool hasIpv4 = default(true); - bool hasIpv6 = default(false); - bool hasGn = default(false); - bool forwarding = default(false); - bool multicastForwarding = default(false); - *.forwarding = this.forwarding; - *.multicastForwarding = this.multicastForwarding; - //Linklayer - bool recordPcap = default(false); - int numPcapRecorders = default(recordPcap ? 1 : 0); - int numLoInterfaces = default(1); - int numWlanInterfaces = default(1); - int numEthInterfaces = default(0); // minimum number of ethernet interfaces - int numPppInterfaces = default(0); // minimum number of PPP interfaces - int numTunInterfaces = default(0); - int numVirtInterfaces = default(0); - string fcsMode @enum("declared","computed") = default("declared"); - pcapRecorder[*].pcapFile = default("results/" + expand("${configname}-") + fullPath() + ".pcap"); - mobility.typename = default(numWlanInterfaces > 0 ? "StationaryMobility" : ""); - *.interfaceTableModule = default(absPath(".interfaceTable")); - *.fcsMode = this.fcsMode; - wlan[*].radio.antenna.mobilityModule = default("^.^.^.mobility"); - // ethernet.registerProtocol = default(true); - @figure[linkLayer](type=rectangle; pos=250,458; size=1000,284; fillColor=#0000ff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); - @figure[linkLayer.title](type=text; pos=1245,463; anchor=ne; text="link layer"); - @figure[interfaceLayer](type=rectangle; pos=250,758; size=1000,360; fillColor=#00ffff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); - @figure[interfaceLayer.title](type=text; pos=1245,763; anchor=ne; text="interface layer"); - @display("bgb=1596.406,1119.968"); - - @figure[networkLayer](type=rectangle; pos=250,308; size=1000,134; fillColor=#00ff00; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); - @figure[networkLayer.title](type=text; pos=1245,313; anchor=ne; text="network layer"); - - bool hasTimeSynchronization = default(false); // enable IEEE 802.1 AS time synchronization - bool hasIngressTrafficFiltering = default(false); // enable IEEE 802.1 Qci ingress per-stream filtering - bool hasEgressTrafficFiltering = default(false); // enable IEEE 802.1 Qci egress per-stream filtering - bool hasEgressTrafficShaping = default(false); // enable IEEE 802.1 egress traffic shaping (credit based shaping, time aware shaping, asynchronous shaping) - bool hasStreamRedundancy = default(false); // enable IEEE 802.1 CB frame replication and elimination - bool hasIncomingStreams = default(false); // enable IEEE 802.1 stream decoding - bool hasOutgoingStreams = default(false); // enable IEEE 802.1 stream identification and stream encoding - bool hasFramePreemption = default(false); // enable IEEE 802.1 Qbu frame preemption - bool hasCutthroughSwitching = default(false); // enable cut-through switching support - clock.typename = default(hasTimeSynchronization ? "SettableClock" : ""); // enable explicit local clock model - ethernet.typename = default("EthernetLayer"); // use Ethernet protocol layer outside of network interfaces - eth[*].typename = default("LayeredEthernetInterface"); // switch to modular Ethernet interface - eth[*].macLayer.typename = default(hasFramePreemption ? "EthernetPreemptingMacLayer" : "EthernetMacLayer"); - eth[*].macLayer.queue.typename = default(hasEgressTrafficShaping ? "Ieee8021qTimeAwareShaper" : (hasFramePreemption ? "" : "PacketQueue")); // use priority queue having multiple subqueues controlled by separate gates - eth[*].phyLayer.typename = default(hasCutthroughSwitching ? "EthernetStreamingPhyLayer" : (hasFramePreemption ? "EthernetPreemptingPhyLayer" : "EthernetPhyLayer")); // use packet streaming when cut-through switching is enabled -// bridging.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy || hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "BridgingLayer" : ""); // switch to modular bridging -// bridging.interfaceRelay.typename = default(""); // disable frame relaying -// bridging.streamIdentifier.typename = default(hasOutgoingStreams || hasStreamRedundancy ? "StreamIdentifierLayer" : ""); // enable stream identification when stream redundancy is enabled -// bridging.streamIdentifier.identifier.hasSequenceNumbering = default(hasStreamRedundancy); // enable sequence numberinf if stream redundancy is enabled -// bridging.streamRelay.typename = default(hasStreamRedundancy ? "StreamRelayLayer" : ""); // enable stream merging and stream splitting when stream redundancy is enabled -// bridging.streamFilter.typename = default(hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "StreamFilterLayer" : ""); // enable stream filtering when ingress or egress per-stream filtering is enabled -// bridging.streamFilter.ingress.typename = default(hasIngressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // use IEEE 802.1 Qci ingress filter when ingress per-stream filtering is enabled -// bridging.streamFilter.egress.typename = default(hasEgressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // use IEEE 802.1 Qci egress filter when egress per-stream filtering is enabled -// bridging.streamCoder.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "StreamCoderLayer" : ""); // enable stream endocing/decoding when stream redundancy is enabled - ieee8021r.typename = default(hasStreamRedundancy ? "Ieee8021rProtocol" : ""); - ieee8021q.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "Ieee8021qProtocol" : ""); - // - //ieee8021r.typename = default(hasStreamRedundancy ? "Ieee8021rProtocol" : ""); - //ieee8021q.typename = default("Ieee8021qProtocol"); - llc.typename = default(""); - gates: - input radioIn[numWlanInterfaces] @directIn @allowUnconnected; - inout pppg[numPppInterfaces] @labels(PppFrame-conn) @allowUnconnected; - inout ethg[numEthInterfaces] @labels(EtherFrame-conn) @allowUnconnected; - //Custom - inout virtual[numWlanInterfaces] @labels(HostWireless-conn) @allowUnconnected; - submodules: - //App Layer - app[numApps]: <> like IApp { - @display("p=375,75,row,150"); - } - at: MessageDispatcher { - @display("p=750,150;b=1000,5,,,,1"); - } - //Transport Layer - udp: like IUdp if hasUdp { - @display("p=375,225"); - } - tcp: like ITcp if hasTcp { - @display("p=525,225"); - } - sctp: like ISctp if hasSctp { - @display("p=675,225"); - } - tn: MessageDispatcher { - @display("p=750,300;b=1000,5,,,,1"); - } - //Link Layer - ipv4: like INetworkLayer if hasIpv4 { - @display("p=375,375;q=queue"); - } - ipv6: like INetworkLayer if hasIpv6 { - @display("p=525,375;q=queue"); - } - generic: like INetworkLayer if hasGn { - @display("p=675,375;q=queue"); - } - nl: MessageDispatcher { - @display("p=750,450;b=1000,5,,,,1"); - } - //LinkLayer - pcapRecorder[numPcapRecorders]: PcapRecorder { - @display("p=125,640;is=s"); - } - interfaceTable: InterfaceTable { - @display("p=125,240;is=s"); - } - llc: like IIeee8022Llc if typename != "" { - @display("p=375,525"); - } - cb: MessageDispatcher { - @display("p=750,600;b=1000,5"); - } - bridging: like IProtocolLayer if typename != "" { - @display("p=750,675"); - } - bl: MessageDispatcher { - @display("p=750,750;b=1000,5"); - } - ethernet: 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" { - @display("p=194.188,824.17004"); - } - ieee8021q: like IIeee8021qLayer if typename != "" { - @display("p=525,825"); - } - ieee8021r: like IIeee8021rLayer if typename != "" { - @display("p=1088.3561,824.17004"); - } - li: MessageDispatcher { - @display("p=750,900;b=1000,5,,,,1"); - } - lo[numLoInterfaces]: like ILoopbackInterface { - @display("p=749.73596,1207.908,row,150"); - } - // TODO move wlan interfaces after eth interfaces, but it changes IP address assignment and breaks examples/inet/configurator/complex.ini - wlan[numWlanInterfaces]: like IWirelessInterface { - @display("p=462.89,1016.10004,row,150;q=queue"); - } - ppp[sizeof(pppg)]: like IPppInterface { - @display("p=178.382,973.19806,row,150;q=txQueue"); - } - eth[sizeof(ethg)]: like IEthernetInterface { - @display("p=900,975,row,150;q=txQueue"); - } - tun[numTunInterfaces]: like ITunnelInterface { - @display("p=1110.936,1029.6481,row,150;q=txQueue"); - } - virt[numVirtInterfaces]: like IVirtualInterface { - @display("p=1393.186,1000.294,row,150;q=txQueue"); - } - - connections allowunconnected: - //App Layer - for i=0..numApps-1 { - app[i].socketOut --> at.in++; - app[i].socketIn <-- at.out++; - } - - at.out++ --> udp.appIn if hasUdp; - at.in++ <-- udp.appOut if hasUdp; - - at.out++ --> tcp.appIn if hasTcp; - at.in++ <-- tcp.appOut if hasTcp; - - at.out++ --> sctp.appIn if hasSctp; - at.in++ <-- sctp.appOut if hasSctp; - - at.out++ --> tn.in++; - at.in++ <-- tn.out++; - //Transport layer - udp.ipOut --> tn.in++ if hasUdp; - udp.ipIn <-- tn.out++ if hasUdp; - - tcp.ipOut --> tn.in++ if hasTcp; - tcp.ipIn <-- tn.out++ if hasTcp; - - sctp.ipOut --> tn.in++ if hasSctp; - tn.out++ --> sctp.ipIn if hasSctp; - - tn.out++ --> ipv4.transportIn if hasIpv4; - tn.in++ <-- ipv4.transportOut if hasIpv4; - - tn.out++ --> ipv6.transportIn if hasIpv6; - tn.in++ <-- ipv6.transportOut if hasIpv6; - - tn.out++ --> generic.transportIn if hasGn; - tn.in++ <-- generic.transportOut if hasGn; - - tn.out++ --> nl.in++; - tn.in++ <-- nl.out++; - //Link layer - ipv4.ifIn <-- nl.out++ if hasIpv4; - ipv4.ifOut --> nl.in++ if hasIpv4; - - ipv6.ifIn <-- nl.out++ if hasIpv6; - ipv6.ifOut --> nl.in++ if hasIpv6; - - generic.ifIn <-- nl.out++ if exists(generic); - generic.ifOut --> nl.in++ if exists(generic); - - cb.out++ --> nl.in++; - cb.in++ <-- nl.out++; - - llc.lowerLayerOut --> cb.in++ if exists(llc); - llc.lowerLayerIn <-- cb.out++ if exists(llc); - - cb.out++ --> bridging.upperLayerIn if exists(bridging); - bridging.upperLayerOut --> cb.in++ if exists(bridging); - - bridging.lowerLayerOut --> bl.in++ if exists(bridging); - bl.out++ --> bridging.lowerLayerIn if exists(bridging); - - cb.out++ --> bl.in++ if !exists(bridging); - bl.out++ --> cb.in++ if !exists(bridging); - - bl.out++ --> li.in++; - li.out++ --> bl.in++; - - bl.out++ --> ieee8021q.upperLayerIn if exists(ieee8021q); - ieee8021q.upperLayerOut --> bl.in++ if exists(ieee8021q); - - bl.out++ --> ieee8021r.upperLayerIn if exists(ieee8021r); - ieee8021r.upperLayerOut --> bl.in++ if exists(ieee8021r); - - bl.out++ --> ethernet.upperLayerIn if exists(ethernet); - ethernet.upperLayerOut --> bl.in++ if exists(ethernet); - - ieee8021q.lowerLayerOut --> li.in++ if exists(ieee8021q); - li.out++ --> ieee8021q.lowerLayerIn if exists(ieee8021q); - - ieee8021r.lowerLayerOut --> li.in++ if exists(ieee8021r); - li.out++ --> ieee8021r.lowerLayerIn if exists(ieee8021r); - - ethernet.lowerLayerOut --> li.in++ if exists(ethernet); - li.out++ --> ethernet.lowerLayerIn if exists(ethernet); - - for i=0..sizeof(radioIn)-1 { - radioIn[i] --> { @display("m=s"); } --> wlan[i].radioIn; - } - - for i=0..sizeof(ethg)-1 { - ethg[i] <--> { @display("m=s"); } <--> eth[i].phys; - } - - for i=0..sizeof(pppg)-1 { - pppg[i] <--> { @display("m=s"); } <--> ppp[i].phys; - } - - for i=0..numLoInterfaces-1 { - li.out++ --> lo[i].upperLayerIn; - lo[i].upperLayerOut --> li.in++; - } - - for i=0..sizeof(radioIn)-1 { - wlan[i].upperLayerOut --> li.in++; - wlan[i].upperLayerIn <-- li.out++; - } - - for i=0..sizeof(ethg)-1 { - eth[i].upperLayerOut --> li.in++; - eth[i].upperLayerIn <-- li.out++; - } - - for i=0..sizeof(pppg)-1 { - ppp[i].upperLayerOut --> li.in++; - ppp[i].upperLayerIn <-- li.out++; - } - - for i=0..numTunInterfaces-1 { - tun[i].upperLayerOut --> li.in++; - tun[i].upperLayerIn <-- li.out++; - } - - for i=0..numVirtInterfaces-1 { - virt[i].upperLayerOut --> li.in++; - virt[i].upperLayerIn <-- li.out++; - } -}