Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.
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
8 changes: 4 additions & 4 deletions examples/ethernet/arptest/omnetpp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
network = ARPTest
sim-time-limit = 500s
cpu-time-limit = 600s
total-stack = 2MB
total-stack = 2MiB
tkenv-plugin-path = ../../../etc/plugins
#record-eventlog = true
#debug-on-errors = true
Expand All @@ -18,7 +18,7 @@ tkenv-plugin-path = ../../../etc/plugins
**.client.tcpApp[*].connectPort = 1000
**.client.tcpApp[*].tOpen = 1.0s
**.client.tcpApp[*].tSend = 1.1s
**.client.tcpApp[*].sendBytes = 1MB
**.client.tcpApp[*].sendBytes = 1MiB
**.client.tcpApp[*].sendScript = ""
**.client.tcpApp[*].tClose = 0

Expand Down Expand Up @@ -48,8 +48,8 @@ tkenv-plugin-path = ../../../etc/plugins
**.switch*.relayUnitType = "MACRelayUnitNP"
**.relayUnit.addressTableSize = 100
**.relayUnit.agingTime = 120s
**.relayUnit.bufferSize = 1MB
**.relayUnit.highWatermark = 512KB
**.relayUnit.bufferSize = 1MiB
**.relayUnit.highWatermark = 512KiB
**.relayUnit.pauseUnits = 300 # pause for 300*512 bit (19200 byte) time
**.relayUnit.addressTableFile = ""
**.relayUnit.numCPUs = 2
Expand Down
4 changes: 2 additions & 2 deletions examples/ethernet/arptest2/omnetpp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
network = ARPTest
sim-time-limit = 500s
cpu-time-limit = 600s
total-stack = 2MB
total-stack = 2MiB
tkenv-plugin-path = ../../../etc/plugins

[Config ARPTest]
Expand All @@ -16,7 +16,7 @@ tkenv-plugin-path = ../../../etc/plugins
**.client*.tcpApp[0].connectPort = 1000
**.client*.tcpApp[0].tOpen = 1s
**.client*.tcpApp[0].tSend = 1.1s
**.client*.tcpApp[0].sendBytes = 1MB
**.client*.tcpApp[0].sendBytes = 1MiB
**.client*.tcpApp[0].sendScript = ""
**.client*.tcpApp[0].tClose = 0

Expand Down
12 changes: 6 additions & 6 deletions src/networklayer/autorouting/HostAutoConfigurator2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -324,16 +324,16 @@ void HostAutoConfigurator2::setupRoutingTable()
if (!ie)
continue;
IPAddress add(ie->ipv4Data()->getIPAddress().getInt() & ie->ipv4Data()->getNetmask().getInt());
int i=0;
while (i<routingTable->getNumRoutes())
int j=0;
while (j<routingTable->getNumRoutes())
{
if (routingTable->getRoute(i)->getInterface()==ie)
if (routingTable->getRoute(j)->getInterface()==ie)
{
routingTable->deleteRoute(routingTable->getRoute(i));
i=0;
routingTable->deleteRoute(routingTable->getRoute(j));
j=0;
}
else
i++;
j++;
}
addRoute(ie,routingTable,add,ie->ipv4Data()->getNetmask());
}
Expand Down