--- a/examples/wimax/wimax-multicast.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/examples/wimax/wimax-multicast.cc Thu Apr 15 10:54:17 2010 -0700
@@ -150,7 +150,7 @@
BSPosition = CreateObject<ConstantPositionMobilityModel> ();
BSPosition->SetPosition (Vector (1000, 0, 0));
- dev->GetPhy ()->SetMobility (BSPosition);
+ bsNodes.Get (0)->AggregateObject (BSPosition);
bsDevs.Add (dev);
if (verbose)
{
@@ -169,7 +169,7 @@
ss[i] = ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> ();
ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12);
- ss[i]->GetPhy ()->SetMobility (SSPosition[i]);
+ ssNodes.Get (i)->AggregateObject (SSPosition[i]);
}
--- a/src/applications/onoff/onoff-application.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/applications/onoff/onoff-application.cc Thu Apr 15 10:54:17 2010 -0700
@@ -133,6 +133,7 @@
m_socket = Socket::CreateSocket (GetNode(), m_tid);
m_socket->Bind ();
m_socket->Connect (m_peer);
+ m_socket->ShutdownRecv ();
}
// Insure no pending event
CancelEvents ();
--- a/src/applications/packet-sink/packet-sink.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/applications/packet-sink/packet-sink.cc Thu Apr 15 10:54:17 2010 -0700
@@ -96,6 +96,7 @@
m_socket = Socket::CreateSocket (GetNode(), m_tid);
m_socket->Bind (m_local);
m_socket->Listen ();
+ m_socket->ShutdownSend ();
if (addressUtils::IsMulticast (m_local))
{
Ptr<UdpSocket> udpSocket = DynamicCast<UdpSocket> (m_socket);
--- a/src/devices/wimax/bs-link-manager.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/devices/wimax/bs-link-manager.cc Thu Apr 15 10:54:17 2010 -0700
@@ -93,11 +93,12 @@
* m_bs->GetSymbolDuration ().GetSeconds ());
}
- NS_ASSERT_MSG (Simulator::Now () >= m_bs->GetUlSubframeStartTime () && Simulator::Now () < irIntervalBoundary,
- "Base station: Error while processing ranging request: out of time");
tries++;
- PerformRanging (cid, rngreq);
+ if (Simulator::Now () >= m_bs->GetUlSubframeStartTime () && Simulator::Now () < irIntervalBoundary)
+ {
+ PerformRanging (cid, rngreq);
+ }
}
void
--- a/src/devices/wimax/simple-ofdm-wimax-channel.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/devices/wimax/simple-ofdm-wimax-channel.cc Thu Apr 15 10:54:17 2010 -0700
@@ -145,23 +145,19 @@
double rxPowerDbm = 0;
Ptr<MobilityModel> senderMobility = 0;
Ptr<MobilityModel> receiverMobility = 0;
- if (phy->GetMobility ())
- {
- senderMobility = phy->GetMobility ()->GetObject<MobilityModel> ();
- }
+ senderMobility = phy->GetDevice ()->GetNode ()->GetObject<MobilityModel> ();
for (std::list<Ptr<SimpleOfdmWimaxPhy> >::iterator iter = m_phyList.begin (); iter != m_phyList.end (); ++iter)
{
- double delay = 0;
+ Time delay = Seconds(0);
if (phy != *iter)
{
- if ((*iter)->GetMobility ())
- {
- receiverMobility = (*iter)->GetMobility ()->GetObject<MobilityModel> ();
- }
+ double distance = 0;
+ receiverMobility = (*iter)->GetDevice ()->GetNode ()->GetObject<MobilityModel> ();
if (receiverMobility != 0 && senderMobility != 0 && m_loss != 0)
{
- delay = (senderMobility->GetDistanceFrom (receiverMobility)) / 300000000LL;
+ distance = senderMobility->GetDistanceFrom (receiverMobility);
+ delay = Seconds(distance/300000000.0);
rxPowerDbm = m_loss->CalcRxPower (rxPowerDbm, senderMobility, receiverMobility);
}
simpleOfdmSendParam * param = new simpleOfdmSendParam (fecBlock,
@@ -183,7 +179,7 @@
dstNode = dstNetDevice->GetObject<NetDevice> ()->GetNode ()->GetId ();
}
Simulator::ScheduleWithContext (dstNode,
- Seconds (delay) + BlockTime,
+ delay,
&SimpleOfdmWimaxChannel::EndSend,
this,
*iter,
@@ -196,7 +192,6 @@
void
SimpleOfdmWimaxChannel::EndSend (Ptr<SimpleOfdmWimaxPhy> rxphy, simpleOfdmSendParam * param)
{
- // std::cout << "END_SEND ";
rxphy->StartReceive (param->GetFecBlock (),
param->GetBurstSize (),
param->GetIsFirstBlock (),
--- a/src/devices/wimax/simple-ofdm-wimax-phy.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/devices/wimax/simple-ofdm-wimax-phy.cc Thu Apr 15 10:54:17 2010 -0700
@@ -311,12 +311,7 @@
}
else
{
- Simulator::Schedule (Seconds (0),
- &SimpleOfdmWimaxPhy::StartSendFecBlock,
- this,
- false,
- modulationType,
- direction);
+ StartSendFecBlock(false,modulationType,direction);
}
}
@@ -392,7 +387,7 @@
SetBlockParameters (burstSize, modulationType);
m_blockTime = GetBlockTransmissionTime (modulationType);
}
- Simulator::Schedule (Seconds (0),
+ Simulator::Schedule (m_blockTime,
&SimpleOfdmWimaxPhy::EndReceiveFecBlock,
this,
fecBlock,
--- a/src/internet-stack/tcp-socket-impl.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/internet-stack/tcp-socket-impl.cc Thu Apr 15 10:54:17 2010 -0700
@@ -674,10 +674,6 @@
Address fromAddress = InetSocketAddress (saddr, port);
Address toAddress = InetSocketAddress (daddr, m_endPoint->GetLocalPort());
- if (m_shutdownRecv)
- {
- return;
- }
TcpHeader tcpHeader;
packet->RemoveHeader (tcpHeader);
@@ -735,7 +731,10 @@
if (saveState < CLOSING && (m_state == CLOSING || m_state == TIMED_WAIT) )
{
NS_LOG_LOGIC ("TcpSocketImpl peer closing, send EOF to application");
- NotifyDataRecv ();
+ if (!m_shutdownRecv)
+ {
+ NotifyDataRecv ();
+ }
}
if (needCloseNotify && !m_closeNotified)
@@ -1296,7 +1295,10 @@
m_rxAvailable += p->GetSize ();
RxBufFinishInsert (tcpHeader.GetSequenceNumber ());
m_rxBufSize += p->GetSize ();
- NotifyDataRecv ();
+ if (!m_shutdownRecv)
+ {
+ NotifyDataRecv ();
+ }
if (m_closeNotified)
{
NS_LOG_LOGIC ("Tcp " << this << " HuH? Got data after closeNotif");
@@ -1392,7 +1394,10 @@
m_rxAvailable += p->GetSize ();
m_rxBufSize += p->GetSize();
RxBufFinishInsert(start);
- NotifyDataRecv ();
+ if (!m_shutdownRecv)
+ {
+ NotifyDataRecv ();
+ }
}
else
{ // debug
--- a/src/node/packet-socket.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/node/packet-socket.cc Thu Apr 15 10:54:17 2010 -0700
@@ -43,7 +43,7 @@
MakeTraceSourceAccessor (&PacketSocket::m_dropTrace))
.AddAttribute ("RcvBufSize",
"PacketSocket maximum receive buffer size (bytes)",
- UintegerValue (0xffffffffl),
+ UintegerValue (131072),
MakeUintegerAccessor (&PacketSocket::m_rcvBufSize),
MakeUintegerChecker<uint32_t> ())
;
--- a/src/node/tcp-socket.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/node/tcp-socket.cc Thu Apr 15 10:54:17 2010 -0700
@@ -45,7 +45,7 @@
MakeUintegerChecker<uint32_t> ())
.AddAttribute ("RcvBufSize",
"TcpSocket maximum receive buffer size (bytes)",
- UintegerValue (0xffffffffl),
+ UintegerValue (131072),
MakeUintegerAccessor (&TcpSocket::GetRcvBufSize,
&TcpSocket::SetRcvBufSize),
MakeUintegerChecker<uint32_t> ())
--- a/src/node/udp-socket.cc Thu Apr 15 10:53:40 2010 -0700
+++ b/src/node/udp-socket.cc Thu Apr 15 10:54:17 2010 -0700
@@ -39,7 +39,7 @@
.SetParent<Socket> ()
.AddAttribute ("RcvBufSize",
"UdpSocket maximum receive buffer size (bytes)",
- UintegerValue (0xffffffffl),
+ UintegerValue (131072),
MakeUintegerAccessor (&UdpSocket::GetRcvBufSize,
&UdpSocket::SetRcvBufSize),
MakeUintegerChecker<uint32_t> ())
--- a/test.py Thu Apr 15 10:53:40 2010 -0700
+++ b/test.py Thu Apr 15 10:54:17 2010 -0700
@@ -63,6 +63,7 @@
#
core_valgrind_skip_tests = [
"ns3-tcp-cwnd",
+ "nsc-tcp-loss",
"ns3-tcp-interoperability",
]