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

(-)a/src/internet-stack/tcp-socket-impl.cc (-5 / +7 lines)
 Lines 655-660   Actions_t TcpSocketImpl::ProcessEvent (E Link Here 
655
  // simulation singleton is a way to get a single global static instance of a
655
  // simulation singleton is a way to get a single global static instance of a
656
  // class intended to be a singleton; see simulation-singleton.h
656
  // class intended to be a singleton; see simulation-singleton.h
657
  SA stateAction = SimulationSingleton<TcpStateMachine>::Get ()->Lookup (m_state,e);
657
  SA stateAction = SimulationSingleton<TcpStateMachine>::Get ()->Lookup (m_state,e);
658
  NS_LOG_LOGIC ("TcpSocketImpl::ProcessEvent stateAction " << stateAction.action);
658
  // debug
659
  // debug
659
  if (stateAction.action == RST_TX)
660
  if (stateAction.action == RST_TX)
660
    {
661
    {
 Lines 679-684   Actions_t TcpSocketImpl::ProcessEvent (E Link Here 
679
      m_connected = true;
680
      m_connected = true;
680
      m_endPoint->SetPeer (m_remoteAddress, m_remotePort);
681
      m_endPoint->SetPeer (m_remoteAddress, m_remotePort);
681
      NS_LOG_LOGIC ("TcpSocketImpl " << this << " Connected!");
682
      NS_LOG_LOGIC ("TcpSocketImpl " << this << " Connected!");
683
    }
684
  if (saveState < CLOSING && (m_state == CLOSING || m_state == TIMED_WAIT) )
685
    {
686
      NS_LOG_LOGIC ("TcpSocketImpl peer closing, send EOF to application");
687
      NotifyDataRecv ();
682
    }
688
    }
683
689
684
  if (needCloseNotify && !m_closeNotified)
690
  if (needCloseNotify && !m_closeNotified)
 Lines 822-827   bool TcpSocketImpl::ProcessPacketAction Link Here 
822
  switch (a)
828
  switch (a)
823
  {
829
  {
824
    case ACK_TX:
830
    case ACK_TX:
831
      NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action ACK_TX");
825
      if(tcpHeader.GetFlags() & TcpHeader::FIN)
832
      if(tcpHeader.GetFlags() & TcpHeader::FIN)
826
      {
833
      {
827
        ++m_nextRxSequence; //bump this to account for the FIN
834
        ++m_nextRxSequence; //bump this to account for the FIN
 Lines 1154-1164   void TcpSocketImpl::NewRx (Ptr<Packet> p Link Here 
1154
                << " seq " << tcpHeader.GetSequenceNumber()
1161
                << " seq " << tcpHeader.GetSequenceNumber()
1155
                << " ack " << tcpHeader.GetAckNumber()
1162
                << " ack " << tcpHeader.GetAckNumber()
1156
                << " p.size is " << p->GetSize () );
1163
                << " p.size is " << p->GetSize () );
1157
  NS_LOG_DEBUG ("TcpSocketImpl " << this <<
1158
                " NewRx," <<
1159
                " seq " << tcpHeader.GetSequenceNumber() <<
1160
                " ack " << tcpHeader.GetAckNumber() <<
1161
                " p.size is " << p->GetSize());
1162
  States_t origState = m_state;
1164
  States_t origState = m_state;
1163
  if (RxBufferFreeSpace() < p->GetSize()) 
1165
  if (RxBufferFreeSpace() < p->GetSize()) 
1164
    { //if not enough room, fragment
1166
    { //if not enough room, fragment

Return to bug 613