internet: added last acked seq in tcp

This commit is contained in:
Anh Nguyen
2016-04-18 17:14:01 +02:00
parent 786dc1793e
commit e546aeb562
2 changed files with 5 additions and 0 deletions

View File

@@ -234,6 +234,7 @@ TcpSocketState::TcpSocketState (void)
m_initialCWnd (0),
m_initialSsThresh (0),
m_segmentSize (0),
m_lastAckedSeq (0),
m_congState (CA_OPEN),
m_highTxMark (0),
// Change m_nextTxSequence for non-zero initial sequence number
@@ -248,6 +249,7 @@ TcpSocketState::TcpSocketState (const TcpSocketState &other)
m_initialCWnd (other.m_initialCWnd),
m_initialSsThresh (other.m_initialSsThresh),
m_segmentSize (other.m_segmentSize),
m_lastAckedSeq (other.m_lastAckedSeq),
m_congState (other.m_congState),
m_highTxMark (other.m_highTxMark),
m_nextTxSequence (other.m_nextTxSequence)
@@ -1464,6 +1466,8 @@ TcpSocketBase::ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader)
" SND.UNA=" << m_txBuffer->HeadSequence () <<
" SND.NXT=" << m_tcb->m_nextTxSequence);
m_tcb->m_lastAckedSeq = ackNumber;
if (ackNumber == m_txBuffer->HeadSequence ()
&& ackNumber < m_tcb->m_nextTxSequence
&& packet->GetSize () == 0)

View File

@@ -158,6 +158,7 @@ public:
// Segment
uint32_t m_segmentSize; //!< Segment size
SequenceNumber32 m_lastAckedSeq; //!< Last sequence ACKed
TracedValue<TcpCongState_t> m_congState; //!< State in the Congestion state machine
TracedValue<SequenceNumber32> m_highTxMark; //!< Highest seqno ever sent, regardless of ReTx