internet: tcp tx trace should not include header
This commit is contained in:
@@ -2164,6 +2164,9 @@ TcpSocketBase::SendEmptyPacket (uint8_t flags)
|
||||
UpdateRttHistory (s, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
m_txTrace (p, header, this);
|
||||
|
||||
if (m_endPoint != 0)
|
||||
{
|
||||
m_tcp->SendPacket (p, header, m_endPoint->GetLocalAddress (),
|
||||
@@ -2175,8 +2178,6 @@ TcpSocketBase::SendEmptyPacket (uint8_t flags)
|
||||
m_endPoint6->GetPeerAddress (), m_boundnetdevice);
|
||||
}
|
||||
|
||||
m_txTrace (p, header, this);
|
||||
|
||||
if (flags & TcpHeader::ACK)
|
||||
{ // If sending an ACK, cancel the delay ACK as well
|
||||
m_delAckEvent.Cancel ();
|
||||
@@ -2447,6 +2448,8 @@ TcpSocketBase::SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool with
|
||||
m_retxEvent = Simulator::Schedule (m_rto, &TcpSocketBase::ReTxTimeout, this);
|
||||
}
|
||||
|
||||
m_txTrace (p, header, this);
|
||||
|
||||
if (m_endPoint)
|
||||
{
|
||||
m_tcp->SendPacket (p, header, m_endPoint->GetLocalAddress (),
|
||||
@@ -2464,8 +2467,6 @@ TcpSocketBase::SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool with
|
||||
". Header " << header);
|
||||
}
|
||||
|
||||
m_txTrace (p, header, this);
|
||||
|
||||
UpdateRttHistory (seq, sz, isRetransmission);
|
||||
|
||||
// Notify the application of the data being sent unless this is a retransmit
|
||||
@@ -2834,6 +2835,8 @@ TcpSocketBase::PersistTimeout ()
|
||||
}
|
||||
AddOptions (tcpHeader);
|
||||
|
||||
m_txTrace (p, tcpHeader, this);
|
||||
|
||||
if (m_endPoint != 0)
|
||||
{
|
||||
m_tcp->SendPacket (p, tcpHeader, m_endPoint->GetLocalAddress (),
|
||||
@@ -2845,8 +2848,6 @@ TcpSocketBase::PersistTimeout ()
|
||||
m_endPoint6->GetPeerAddress (), m_boundnetdevice);
|
||||
}
|
||||
|
||||
m_txTrace (p, tcpHeader, this);
|
||||
|
||||
NS_LOG_LOGIC ("Schedule persist timeout at time "
|
||||
<< Simulator::Now ().GetSeconds () << " to expire at time "
|
||||
<< (Simulator::Now () + m_persistTimeout).GetSeconds ());
|
||||
|
||||
@@ -89,7 +89,7 @@ TcpZeroWindowTest::Tx (const Ptr<const Packet> p, const TcpHeader &h, SocketWho
|
||||
|
||||
if (Simulator::Now ().GetSeconds () <= 6.0)
|
||||
{
|
||||
NS_TEST_ASSERT_MSG_EQ (p->GetSize () - h.GetSerializedSize (), 0,
|
||||
NS_TEST_ASSERT_MSG_EQ (p->GetSize (), 0,
|
||||
"Data packet sent anyway");
|
||||
}
|
||||
else if (Simulator::Now ().GetSeconds () > 6.0
|
||||
@@ -99,7 +99,7 @@ TcpZeroWindowTest::Tx (const Ptr<const Packet> p, const TcpHeader &h, SocketWho
|
||||
|
||||
if (!m_zeroWindowProbe)
|
||||
{
|
||||
NS_TEST_ASSERT_MSG_EQ (p->GetSize () - h.GetSerializedSize (), 1,
|
||||
NS_TEST_ASSERT_MSG_EQ (p->GetSize (), 1,
|
||||
"Data packet sent instead of window probe");
|
||||
NS_TEST_ASSERT_MSG_EQ (h.GetSequenceNumber (), SequenceNumber32 (1),
|
||||
"Data packet sent instead of window probe");
|
||||
|
||||
Reference in New Issue
Block a user