View | Details | Raw Unified | Return to bug 499
Collapse All | Expand All

(-)a/src/internet-stack/tcp-socket-impl.cc (-9 / +19 lines)
 Lines 759-765    Link Here 
759
      break;
759
      break;
760
    case TX_DATA:
760
    case TX_DATA:
761
      NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action TX_DATA");
761
      NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action TX_DATA");
762
      SendPendingData ();
762
      SendPendingData (m_connected);
763
      break;
763
      break;
764
    case PEER_CLOSE:
764
    case PEER_CLOSE:
765
      NS_ASSERT (false); // This should be processed in ProcessPacketAction
765
      NS_ASSERT (false); // This should be processed in ProcessPacketAction
 Lines 855-864    Link Here 
855
            NotifySend (GetTxAvailable ());
855
            NotifySend (GetTxAvailable ());
856
          }
856
          }
857
      }
857
      }
858
      SendPendingData ();
858
      SendPendingData (m_connected); //send acks if we are connected
859
      break;
859
      break;
860
    case NEW_ACK:
860
    case NEW_ACK:
861
      NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action NEW_ACK_TX");
861
      NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action NEW_ACK_TX");
862
      //check to see of the ACK had data with it; if so, pass it along
863
      //to NEW_SEQ_RX
864
      if(p->GetSize () > 0)
865
        {
866
          Simulator::ScheduleNow(&TcpSocketImpl::ProcessPacketAction,
867
                                 this,
868
                                 NEW_SEQ_RX,
869
                                 p,
870
                                 tcpHeader,
871
                                 fromAddress);
872
        }
862
      if (tcpHeader.GetAckNumber () < m_highestRxAck) //old ack, do nothing
873
      if (tcpHeader.GetAckNumber () < m_highestRxAck) //old ack, do nothing
863
      {
874
      {
864
        break;
875
        break;
 Lines 1001-1010    Link Here 
1001
                   << " s " << s 
1012
                   << " s " << s 
1002
                   << " datasize " << p->GetSize() );
1013
                   << " datasize " << p->GetSize() );
1003
      uint8_t flags = 0;
1014
      uint8_t flags = 0;
1004
      if (withAck)
1005
        {
1006
          flags |= TcpHeader::ACK;
1007
        }
1008
      uint32_t sz = p->GetSize (); // Size of packet
1015
      uint32_t sz = p->GetSize (); // Size of packet
1009
      uint32_t remainingData = m_pendingData->SizeFromSeq(
1016
      uint32_t remainingData = m_pendingData->SizeFromSeq(
1010
          m_firstPendingSequence,
1017
          m_firstPendingSequence,
 Lines 1014-1020    Link Here 
1014
          flags = TcpHeader::FIN;
1021
          flags = TcpHeader::FIN;
1015
          m_state = FIN_WAIT_1;
1022
          m_state = FIN_WAIT_1;
1016
        }
1023
        }
1017
1024
      if (withAck)
1025
        {
1026
          flags |= TcpHeader::ACK;
1027
        }
1018
      TcpHeader header;
1028
      TcpHeader header;
1019
      header.SetFlags (flags);
1029
      header.SetFlags (flags);
1020
      header.SetSequenceNumber (m_nextTxSequence);
1030
      header.SetSequenceNumber (m_nextTxSequence);
 Lines 1386-1392    Link Here 
1386
        }
1396
        }
1387
    }
1397
    }
1388
  // Try to send more data
1398
  // Try to send more data
1389
  SendPendingData();
1399
  SendPendingData (m_connected);
1390
}
1400
}
1391
1401
1392
Ptr<TcpSocketImpl> TcpSocketImpl::Copy ()
1402
Ptr<TcpSocketImpl> TcpSocketImpl::Copy ()
 Lines 1440-1446    Link Here 
1440
    m_cWnd = m_segmentSize; // Collapse cwnd (re-enter slowstart)
1450
    m_cWnd = m_segmentSize; // Collapse cwnd (re-enter slowstart)
1441
    // For Tahoe, we also reset nextTxSeq
1451
    // For Tahoe, we also reset nextTxSeq
1442
    m_nextTxSequence = m_highestRxAck;
1452
    m_nextTxSequence = m_highestRxAck;
1443
    SendPendingData ();
1453
    SendPendingData (m_connected);
1444
  }
1454
  }
1445
}
1455
}
1446
1456

Return to bug 499