|
Lines 1536-1553
TcpSocketBase::ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader)
|
Link Here
|
|---|
|
| 1536 |
* fast recovery procedure (i.e., if any duplicate ACKs subsequently |
1536 |
* fast recovery procedure (i.e., if any duplicate ACKs subsequently |
| 1537 |
* arrive, execute step 4 of Section 3.2 of [RFC5681]). |
1537 |
* arrive, execute step 4 of Section 3.2 of [RFC5681]). |
| 1538 |
*/ |
1538 |
*/ |
|
|
1539 |
m_tcb->m_cWnd = SafeSubtraction (m_tcb->m_cWnd, bytesAcked); |
| 1540 |
|
| 1539 |
if (segsAcked >= 1) |
1541 |
if (segsAcked >= 1) |
| 1540 |
{ |
1542 |
{ |
| 1541 |
m_tcb->m_cWnd += m_tcb->m_segmentSize - bytesAcked; |
1543 |
m_tcb->m_cWnd += m_tcb->m_segmentSize; |
| 1542 |
} |
|
|
| 1543 |
else |
| 1544 |
{ |
| 1545 |
m_tcb->m_cWnd -= bytesAcked; |
| 1546 |
} |
1544 |
} |
| 1547 |
|
1545 |
|
| 1548 |
callCongestionControl = false; // No congestion control on cWnd show be invoked |
1546 |
callCongestionControl = false; // No congestion control on cWnd show be invoked |
| 1549 |
m_dupAckCount -= segsAcked; // Update the dupAckCount |
1547 |
m_dupAckCount = SafeSubtraction (m_dupAckCount, segsAcked); // Update the dupAckCount |
| 1550 |
m_retransOut--; // at least one retransmission has reached the other side |
1548 |
m_retransOut = SafeSubtraction (m_retransOut, 1); // at least one retransmission |
|
|
1549 |
// has reached the other side |
| 1551 |
m_txBuffer->DiscardUpTo (ackNumber); //Bug 1850: retransmit before newack |
1550 |
m_txBuffer->DiscardUpTo (ackNumber); //Bug 1850: retransmit before newack |
| 1552 |
DoRetransmit (); // Assume the next seq is lost. Retransmit lost packet |
1551 |
DoRetransmit (); // Assume the next seq is lost. Retransmit lost packet |
| 1553 |
|
1552 |
|
|
Lines 3389-3394
TcpSocketBase::Fork (void)
|
Link Here
|
|---|
|
| 3389 |
return CopyObject<TcpSocketBase> (this); |
3388 |
return CopyObject<TcpSocketBase> (this); |
| 3390 |
} |
3389 |
} |
| 3391 |
|
3390 |
|
|
|
3391 |
uint32_t |
| 3392 |
TcpSocketBase::SafeSubtraction (uint32_t a, uint32_t b) |
| 3393 |
{ |
| 3394 |
if (a > b) |
| 3395 |
{ |
| 3396 |
return a-b; |
| 3397 |
} |
| 3398 |
|
| 3399 |
return 0; |
| 3400 |
} |
| 3401 |
|
| 3392 |
//RttHistory methods |
3402 |
//RttHistory methods |
| 3393 |
RttHistory::RttHistory (SequenceNumber32 s, uint32_t c, Time t) |
3403 |
RttHistory::RttHistory (SequenceNumber32 s, uint32_t c, Time t) |
| 3394 |
: seq (s), |
3404 |
: seq (s), |