Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Ethernet shim DIF for RINASim #26

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/Shim/BasicShim/BasicShim.anf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<scave:Analysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:scave="http://www.omnetpp.org/omnetpp/scave">
<inputs>
<inputs name="/rina/examples/Shim/BasicShim/results/*.vec"/>
<inputs name="/rina/examples/Shim/BasicShim/results/*.sca"/>
</inputs>
<datasets/>
<chartSheets/>
</scave:Analysis>
46 changes: 46 additions & 0 deletions examples/Shim/BasicShim/BasicShim.ned
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// The MIT License (MIT)
//
// Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package rina.examples.Shim.BasicShim;

import ned.DatarateChannel;
import rina.src.CS.EthShim.Host1APShim;


network BasicShim
{
types:
channel ethline extends DatarateChannel
{
delay = 50ns;
datarate = 100Mbps;
}
submodules:
host1: Host1APShim {
@display("p=82,92");
}
host2: Host1APShim {
@display("p=231,92");
}
connections allowunconnected:
host1.medium <--> ethline <--> host2.medium;
}
65 changes: 65 additions & 0 deletions examples/Shim/BasicShim/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<Configuration>
<Host id="host1">
<DA>
<Directory>
<APN apn="App1">
<DIF difName="Layer1" ipcAddress="11" />
</APN>
<APN apn="11_Layer1">
<DIF difName="50" ipcAddress="1" />
</APN>
<APN apn="App2">
<DIF difName="Layer1" ipcAddress="22" />
</APN>
<APN apn="22_Layer1">
<DIF difName="50" ipcAddress="2" />
</APN>
</Directory>
</DA>
</Host>
<Host id="host2">
<DA>
<Directory>
<APN apn="App1">
<DIF difName="Layer1" ipcAddress="11" />
</APN>
<APN apn="11_Layer1">
<DIF difName="50" ipcAddress="1" />
</APN>
<APN apn="App2">
<DIF difName="Layer1" ipcAddress="22" />
</APN>
<APN apn="22_Layer1">
<DIF difName="50" ipcAddress="2" />
</APN>
</Directory>
</DA>
</Host>

<QoSCubesSet>
<QoSCube id="unreliable">
<AverageBandwidth>12000000</AverageBandwidth>
<AverageSDUBandwidth>1000</AverageSDUBandwidth>
<PeakBandwidthDuration>24000000</PeakBandwidthDuration>
<PeakSDUBandwidthDuration>2000</PeakSDUBandwidthDuration>
<BurstPeriod>10000000</BurstPeriod>
<BurstDuration>1000000</BurstDuration>
<UndetectedBitError>0.01</UndetectedBitError>
<PDUDroppingProbability>0</PDUDroppingProbability>
<MaxSDUSize>1489</MaxSDUSize>
<PartialDelivery>1</PartialDelivery>
<IncompleteDelivery>1</IncompleteDelivery>
<ForceOrder>0</ForceOrder>
<MaxAllowableGap>0</MaxAllowableGap>
<Delay>1000000</Delay>
<Jitter>500000</Jitter>
<CostTime>0</CostTime>
<CostBits>0</CostBits>
<ATime>0</ATime>
<RxOn>0</RxOn>
<WinOn>0</WinOn>
<RateOn>0</RateOn>
</QoSCube>
</QoSCubesSet>
</Configuration>
68 changes: 68 additions & 0 deletions examples/Shim/BasicShim/omnetpp.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[General]
network = BasicShim
debug-on-errors = true
repeat = 5
seed-set = ${runnumber}
sim-time-limit = 5min

**.host1.applicationProcess1.apName = "App1"
**.host2.applicationProcess1.apName = "App2"
**.apType = "APPing"

#Static addressing
**.host1.ipcProcessShim.ipcAddress = "1"
**.host2.ipcProcessShim.ipcAddress = "2"

**.host1.ipcProcess1.ipcAddress = "11"
**.host2.ipcProcess1.ipcAddress = "22"

**.ipcProcessShim.difName = "50"
**.ipcProcess1.difName = "Layer1"

#DIF Allocator settings
**.host1.difAllocator.configData = xmldoc("config.xml", "Configuration/Host[@id='host1']/DA")
**.host2.difAllocator.configData = xmldoc("config.xml", "Configuration/Host[@id='host2']/DA")

#QoS settings
**.ra.qoscubesData = xmldoc("config.xml", "Configuration/QoSCubesSet")

**.host2.**.enrollment.isSelfEnrolled = true

[Config PingFC]
fingerprint = "24c6-353c"
#PingApp setup
**.host1.applicationProcess1.apInst.dstApName = "App2"
**.host1.applicationProcess1.apInst.startAt = 10s
**.host1.applicationProcess1.apInst.stopAt = 200s
**.defaultMaxQLength = 150
**.defaultThreshQLength = 100
**.host*.ipcProcess1.efcp.efcp.rtt = 8s

[Config PingRX]
fingerprint = "24c6-353c"
#PingApp setup
**.host1.applicationProcess1.apInst.dstApName = "App2"
**.host1.applicationProcess1.apInst.startAt = 10s
**.host1.applicationProcess1.apInst.rate = 100
**.host1.applicationProcess1.apInst.stopAt = 200s
**.host1.ipcProcess1.efcp.efcp.pduDroppingEnabled = true

[Config Ping]
fingerprint = "24c6-353c"
#PingApp setup
**.host1.applicationProcess1.apInst.dstApName = "App2"
**.host1.applicationProcess1.apInst.startAt = 10s
**.host1.applicationProcess1.apInst.rate = 10
**.host1.applicationProcess1.apInst.stopAt = 200s
**.host1.ipcProcess1.efcp.efcp.ecnPolicy = "DTCPECNPolicyDefault"

[Config Ping-AppQos]
fingerprint = "24c6-353c"
**.host1.applicationProcess1.apInst.dstApName = "App2"
**.host1.applicationProcess1.apInst.startAt = 10s
**.host1.applicationProcess1.apInst.rate = 10
**.host1.applicationProcess1.apInst.stopAt = 200s
**.applicationEntity.AEMonitor.**.iae.averageBandwidth = 1000000bps
**.applicationEntity.AEMonitor.**.iae.maxAllowGap = 10
**.applicationEntity.AEMonitor.**.iae.delay = 10000 us
**.applicationEntity.AEMonitor.**.iae.undetectedBitErr = 0.01
9 changes: 9 additions & 0 deletions examples/Shim/SimpleNetworkShim/SimpleNetworkShim.anf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<scave:Analysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:scave="http://www.omnetpp.org/omnetpp/scave">
<inputs>
<inputs name="/rina/examples/Shim/SimpleRelayShim/results/*.vec"/>
<inputs name="/rina/examples/Shim/SimpleRelayShim/results/*.sca"/>
</inputs>
<datasets/>
<chartSheets/>
</scave:Analysis>
72 changes: 72 additions & 0 deletions examples/Shim/SimpleNetworkShim/SimpleNetworkShim.ned
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// The MIT License (MIT)
//
// Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package rina.examples.Shim.SimpleNetworkShim;

import rina.src.CS.EthShim.Host1APShim;
import rina.src.CS.EthShim.InteriorRouter2IntShim;

import inet.node.ethernet.Eth100M;
import inet.node.ethernet.EtherSwitch;


network SimpleNetworkShim
{
@display("bgb=492,282");
submodules:
host11: Host1APShim {
@display("p=64,62");
}
host12: Host1APShim {
@display("p=64,123");
}
host13: Host1APShim {
@display("p=64,187");
}
switch1: EtherSwitch {
@display("p=151,122");
}
interiorRouter: InteriorRouter2IntShim {
@display("p=250,123");
}
switch2: EtherSwitch {
@display("p=349,122");
}
host21: Host1APShim {
@display("p=441,62");
}
host22: Host1APShim {
@display("p=441,123");
}
host23: Host1APShim {
@display("p=441,187");
}
connections allowunconnected:
host11.medium <--> Eth100M <--> switch1.ethg++;
host12.medium <--> Eth100M <--> switch1.ethg++;
host13.medium <--> Eth100M <--> switch1.ethg++;
interiorRouter.medium++ <--> Eth100M <--> switch1.ethg++;
interiorRouter.medium++ <--> Eth100M <--> switch2.ethg++;
host21.medium <--> Eth100M <--> switch2.ethg++;
host22.medium <--> Eth100M <--> switch2.ethg++;
host23.medium <--> Eth100M <--> switch2.ethg++;
}
Loading