move Tcp to TcpSocketFactory
authorTom Henderson <tomh@tomh.org>
Tue, 20 May 2008 12:16:55 -0700
changeset 3132b0b0abb911cd
parent 3131 d82336dfd269
child 3133 295e061719fc
move Tcp to TcpSocketFactory
examples/tcp-large-transfer.cc
src/helper/packet-sink-helper.cc
src/internet-node/tcp-header.h
src/internet-node/tcp-impl.cc
src/internet-node/tcp-impl.h
src/internet-node/tcp-socket-impl.cc
src/node/tcp-socket-factory.cc
src/node/tcp-socket-factory.h
src/node/tcp.cc
src/node/tcp.h
src/node/wscript
utils/print-introspected-doxygen.cc
     1.1 --- a/examples/tcp-large-transfer.cc	Tue May 20 11:52:25 2008 -0700
     1.2 +++ b/examples/tcp-large-transfer.cc	Tue May 20 12:16:55 2008 -0700
     1.3 @@ -169,15 +169,15 @@
     1.4    uint16_t servPort = 50000;
     1.5  
     1.6    // Create a packet sink to receive these packets
     1.7 -  PacketSinkHelper sink ("ns3::Tcp",
     1.8 +  PacketSinkHelper sink ("ns3::TcpSocketFactory",
     1.9                           InetSocketAddress (Ipv4Address::GetAny (), servPort));
    1.10  
    1.11    ApplicationContainer apps = sink.Install (c1.Get (1));
    1.12    apps.Start (Seconds (0.0));
    1.13  
    1.14    // and generate traffic to remote sink.
    1.15 -  //TypeId tid = TypeId::LookupByName ("ns3::Tcp");
    1.16 -  Ptr<Socket> localSocket = Socket::CreateSocket (c0.Get (0), Tcp::GetTypeId ());
    1.17 +  //TypeId tid = TypeId::LookupByName ("ns3::TcpSocketFactory");
    1.18 +  Ptr<Socket> localSocket = Socket::CreateSocket (c0.Get (0), TcpSocketFactory::GetTypeId ());
    1.19    localSocket->Bind ();
    1.20    Simulator::ScheduleNow (&StartFlow, localSocket, nBytes,
    1.21                            ipInterfs.GetAddress (1), servPort);
     2.1 --- a/src/helper/packet-sink-helper.cc	Tue May 20 11:52:25 2008 -0700
     2.2 +++ b/src/helper/packet-sink-helper.cc	Tue May 20 12:16:55 2008 -0700
     2.3 @@ -47,7 +47,7 @@
     2.4  void 
     2.5  PacketSinkHelper::SetTcpLocal (Ipv4Address ip, uint16_t port)
     2.6  {
     2.7 -  m_factory.Set ("Protocol", String ("ns3::Tcp"));
     2.8 +  m_factory.Set ("Protocol", String ("ns3::TcpSocketFactory"));
     2.9    m_factory.Set ("Local", Address (InetSocketAddress (ip, port)));
    2.10  }
    2.11  #endif
     3.1 --- a/src/internet-node/tcp-header.h	Tue May 20 11:52:25 2008 -0700
     3.2 +++ b/src/internet-node/tcp-header.h	Tue May 20 12:16:55 2008 -0700
     3.3 @@ -24,7 +24,7 @@
     3.4  #include <stdint.h>
     3.5  #include "ns3/header.h"
     3.6  #include "ns3/buffer.h"
     3.7 -#include "ns3/tcp.h"
     3.8 +#include "ns3/tcp-socket-factory.h"
     3.9  #include "ns3/ipv4-address.h"
    3.10  #include "ns3/sequence-number.h"
    3.11  
     4.1 --- a/src/internet-node/tcp-impl.cc	Tue May 20 11:52:25 2008 -0700
     4.2 +++ b/src/internet-node/tcp-impl.cc	Tue May 20 12:16:55 2008 -0700
     4.3 @@ -48,7 +48,7 @@
     4.4  TcpImpl::DoDispose (void)
     4.5  {
     4.6    m_tcp = 0;
     4.7 -  Tcp::DoDispose ();
     4.8 +  TcpSocketFactory::DoDispose ();
     4.9  }
    4.10  
    4.11  } // namespace ns3
     5.1 --- a/src/internet-node/tcp-impl.h	Tue May 20 11:52:25 2008 -0700
     5.2 +++ b/src/internet-node/tcp-impl.h	Tue May 20 12:16:55 2008 -0700
     5.3 @@ -20,7 +20,7 @@
     5.4  #ifndef TCP_IMPL_H
     5.5  #define TCP_IMPL_H
     5.6  
     5.7 -#include "ns3/tcp.h"
     5.8 +#include "ns3/tcp-socket-factory.h"
     5.9  #include "ns3/ptr.h"
    5.10  
    5.11  namespace ns3 {
    5.12 @@ -39,7 +39,7 @@
    5.13   * 
    5.14   * Most of the logic is in class ns3::TcpSocketImpl.
    5.15   */
    5.16 -class TcpImpl : public Tcp
    5.17 +class TcpImpl : public TcpSocketFactory
    5.18  {
    5.19  public:
    5.20    TcpImpl ();
     6.1 --- a/src/internet-node/tcp-socket-impl.cc	Tue May 20 11:52:25 2008 -0700
     6.2 +++ b/src/internet-node/tcp-socket-impl.cc	Tue May 20 12:16:55 2008 -0700
     6.3 @@ -176,7 +176,7 @@
     6.4  TcpSocketImpl::SetNode (Ptr<Node> node)
     6.5  {
     6.6    m_node = node;
     6.7 -  Ptr<Tcp> t = node->GetObject<Tcp> ();
     6.8 +  Ptr<TcpSocketFactory> t = node->GetObject<TcpSocketFactory> ();
     6.9    m_segmentSize = t->GetDefaultSegSize ();
    6.10    m_rxWindowSize = t->GetDefaultAdvWin ();
    6.11    m_advertisedWindowSize = t->GetDefaultAdvWin ();
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/src/node/tcp-socket-factory.cc	Tue May 20 12:16:55 2008 -0700
     7.3 @@ -0,0 +1,140 @@
     7.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     7.5 +/*
     7.6 + * Copyright (c) 2007 Georgia Tech Research Corporation
     7.7 + *
     7.8 + * This program is free software; you can redistribute it and/or modify
     7.9 + * it under the terms of the GNU General Public License version 2 as
    7.10 + * published by the Free Software Foundation;
    7.11 + *
    7.12 + * This program is distributed in the hope that it will be useful,
    7.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    7.15 + * GNU General Public License for more details.
    7.16 + *
    7.17 + * You should have received a copy of the GNU General Public License
    7.18 + * along with this program; if not, write to the Free Software
    7.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    7.20 + *
    7.21 + * Author: Raj Bhattacharjea <raj.b@gatech.edu>
    7.22 + */
    7.23 +#include "tcp-socket-factory.h"
    7.24 +#include "ns3/uinteger.h"
    7.25 +#include "ns3/double.h"
    7.26 +
    7.27 +namespace ns3 {
    7.28 +
    7.29 +NS_OBJECT_ENSURE_REGISTERED (TcpSocketFactory);
    7.30 +
    7.31 +TypeId
    7.32 +TcpSocketFactory::GetTypeId (void)
    7.33 +{
    7.34 +  static TypeId tid = TypeId ("ns3::TcpSocketFactory")
    7.35 +    .SetParent<SocketFactory> ()
    7.36 +    .AddAttribute ("DefaultSegmentSize",
    7.37 +                   "Default TCP maximum segment size in bytes (may be adjusted based on MTU discovery)",
    7.38 +                   UintegerValue (536),
    7.39 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultSegSize),
    7.40 +                   MakeUintegerChecker<uint32_t> ())
    7.41 +    .AddAttribute ("DefaultAdvertisedWindowSize",
    7.42 +                   "Default TCP advertised window size (bytes)",
    7.43 +                   UintegerValue (0xffff),
    7.44 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultAdvWin),
    7.45 +                   MakeUintegerChecker<uint32_t> ())
    7.46 +    .AddAttribute ("DefaultSlowStartThreshold",
    7.47 +                   "Default TCP slow start threshold (bytes)",
    7.48 +                   UintegerValue (0xffff),
    7.49 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultSsThresh),
    7.50 +                   MakeUintegerChecker<uint32_t> ())
    7.51 +    .AddAttribute ("DefaultTxBufferSize",
    7.52 +                   "Default TCP maximum transmit buffer size (bytes)",
    7.53 +                   UintegerValue (0xffffffffl),
    7.54 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultTxBuffer),
    7.55 +                   MakeUintegerChecker<uint32_t> ())
    7.56 +    .AddAttribute ("DefaultRxBufferSize",
    7.57 +                   "Default TCP maximum receive buffer size (bytes)",
    7.58 +                   UintegerValue (0xffffffffl),
    7.59 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultRxBuffer),
    7.60 +                   MakeUintegerChecker<uint32_t> ())
    7.61 +    .AddAttribute ("DefaultInitialCongestionWindowSize",
    7.62 +                   "Default TCP initial congestion window size (segments)",
    7.63 +                   UintegerValue (1),
    7.64 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultInitialCwnd),
    7.65 +                   MakeUintegerChecker<uint32_t> ())
    7.66 +    .AddAttribute ("DefaultConnTimeout",
    7.67 +                   "Default TCP retransmission timeout when opening connection (seconds)",
    7.68 +                   UintegerValue (3),
    7.69 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultConnTimeout),
    7.70 +                   MakeUintegerChecker<uint32_t> ())
    7.71 +    .AddAttribute ("DefaultConnCount",
    7.72 +                   "Default number of connection attempts (SYN retransmissions) before returning failure",
    7.73 +                   UintegerValue (6),
    7.74 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultConnCount),
    7.75 +                   MakeUintegerChecker<uint32_t> ())
    7.76 +    .AddAttribute ("DefaultDelAckTimeout",
    7.77 +                   "Default timeout value for TCP delayed acks, in seconds",
    7.78 +                   DoubleValue (0.2),
    7.79 +                   MakeDoubleAccessor (&TcpSocketFactory::m_defaultDelAckTimeout),
    7.80 +                   MakeDoubleChecker<double> ())
    7.81 +    .AddAttribute ("DefaultDelAckCount",
    7.82 +                   "Default number of packets to wait before sending a TCP ack",
    7.83 +                   UintegerValue (2),
    7.84 +                   MakeUintegerAccessor (&TcpSocketFactory::m_defaultDelAckCount),
    7.85 +                   MakeUintegerChecker<uint32_t> ())
    7.86 +     ;
    7.87 +  return tid;
    7.88 +}
    7.89 +
    7.90 +uint32_t 
    7.91 +TcpSocketFactory::GetDefaultSegSize (void) const
    7.92 +{
    7.93 +  return m_defaultSegSize;
    7.94 +}
    7.95 +uint32_t 
    7.96 +TcpSocketFactory::GetDefaultAdvWin (void) const
    7.97 +{
    7.98 +  return m_defaultAdvWin;
    7.99 +}
   7.100 +uint32_t 
   7.101 +TcpSocketFactory::GetDefaultSsThresh (void) const
   7.102 +{
   7.103 +  return m_defaultSsThresh;
   7.104 +}
   7.105 +uint32_t 
   7.106 +TcpSocketFactory::GetDefaultTxBuffer (void) const
   7.107 +{
   7.108 +  return m_defaultTxBuffer;
   7.109 +}
   7.110 +uint32_t 
   7.111 +TcpSocketFactory::GetDefaultRxBuffer (void) const
   7.112 +{
   7.113 +  return m_defaultRxBuffer;
   7.114 +}
   7.115 +uint32_t 
   7.116 +TcpSocketFactory::GetDefaultInitialCwnd (void) const
   7.117 +{
   7.118 +  return m_defaultInitialCwnd;
   7.119 +}
   7.120 +uint32_t 
   7.121 +TcpSocketFactory::GetDefaultConnTimeout (void) const
   7.122 +{
   7.123 +  return m_defaultConnTimeout;
   7.124 +}
   7.125 +uint32_t 
   7.126 +TcpSocketFactory::GetDefaultConnCount (void) const
   7.127 +{
   7.128 +  return m_defaultConnCount;
   7.129 +}
   7.130 +
   7.131 +double
   7.132 +TcpSocketFactory::GetDefaultDelAckTimeout (void) const
   7.133 +{
   7.134 +  return m_defaultDelAckTimeout;
   7.135 +}
   7.136 +
   7.137 +uint32_t
   7.138 +TcpSocketFactory::GetDefaultDelAckCount (void) const
   7.139 +{
   7.140 +  return m_defaultDelAckCount;
   7.141 +}
   7.142 +
   7.143 +} // namespace ns3
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/src/node/tcp-socket-factory.h	Tue May 20 12:16:55 2008 -0700
     8.3 @@ -0,0 +1,78 @@
     8.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     8.5 +/*
     8.6 + * Copyright (c) 2007 Georgia Tech Research Corporation
     8.7 + *
     8.8 + * This program is free software; you can redistribute it and/or modify
     8.9 + * it under the terms of the GNU General Public License version 2 as
    8.10 + * published by the Free Software Foundation;
    8.11 + *
    8.12 + * This program is distributed in the hope that it will be useful,
    8.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    8.15 + * GNU General Public License for more details.
    8.16 + *
    8.17 + * You should have received a copy of the GNU General Public License
    8.18 + * along with this program; if not, write to the Free Software
    8.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    8.20 + *
    8.21 + * Author: Raj Bhattacharjea <raj.b@gatech.edu>
    8.22 + */
    8.23 +#ifndef TCP_SOCKET_FACTORY_H
    8.24 +#define TCP_SOCKET_FACTORY_H
    8.25 +
    8.26 +#include "socket-factory.h"
    8.27 +
    8.28 +namespace ns3 {
    8.29 +
    8.30 +class Socket;
    8.31 +
    8.32 +/**
    8.33 + * \brief API to create TCP socket instances 
    8.34 + *
    8.35 + * This abstract class defines the API for TCP sockets.
    8.36 + * This class also holds the global default variables used to
    8.37 + * initialize newly created sockets, such as values that are
    8.38 + * set through the sysctl or proc interfaces in Linux.
    8.39 +
    8.40 + * All TCP socket factory implementations must provide an implementation 
    8.41 + * of CreateSocket
    8.42 + * below, and should make use of the default values configured below.
    8.43 + * 
    8.44 + * \see TcpSocketFactoryImpl
    8.45 + *
    8.46 + */
    8.47 +class TcpSocketFactory : public SocketFactory
    8.48 +{
    8.49 +public:
    8.50 +  static TypeId GetTypeId (void);
    8.51 +
    8.52 +  virtual Ptr<Socket> CreateSocket (void) = 0;
    8.53 +
    8.54 +  uint32_t GetDefaultSegSize (void) const;
    8.55 +  uint32_t GetDefaultAdvWin (void) const;
    8.56 +  uint32_t GetDefaultSsThresh (void) const;
    8.57 +  uint32_t GetDefaultTxBuffer (void) const;
    8.58 +  uint32_t GetDefaultRxBuffer (void) const;
    8.59 +  uint32_t GetDefaultInitialCwnd (void) const;
    8.60 +  uint32_t GetDefaultConnTimeout (void) const;
    8.61 +  uint32_t GetDefaultConnCount (void) const;
    8.62 +  double   GetDefaultDelAckTimeout (void) const;
    8.63 +  uint32_t GetDefaultDelAckCount (void) const;
    8.64 +
    8.65 +private:
    8.66 +  uint32_t  m_defaultSegSize;
    8.67 +  uint32_t  m_defaultAdvWin; 
    8.68 +  uint32_t  m_defaultSsThresh;
    8.69 +  uint32_t  m_defaultTxBuffer;
    8.70 +  uint32_t  m_defaultRxBuffer;
    8.71 +  uint32_t  m_defaultInitialCwnd;
    8.72 +  uint32_t  m_defaultConnTimeout;
    8.73 +  uint32_t  m_defaultConnCount;
    8.74 +  double    m_defaultDelAckTimeout;
    8.75 +  uint32_t  m_defaultDelAckCount;
    8.76 +
    8.77 +};
    8.78 +
    8.79 +} // namespace ns3
    8.80 +
    8.81 +#endif /* TCP_SOCKET_FACTORY_H */
     9.1 --- a/src/node/tcp.cc	Tue May 20 11:52:25 2008 -0700
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,140 +0,0 @@
     9.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     9.5 -/*
     9.6 - * Copyright (c) 2007 Georgia Tech Research Corporation
     9.7 - *
     9.8 - * This program is free software; you can redistribute it and/or modify
     9.9 - * it under the terms of the GNU General Public License version 2 as
    9.10 - * published by the Free Software Foundation;
    9.11 - *
    9.12 - * This program is distributed in the hope that it will be useful,
    9.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    9.15 - * GNU General Public License for more details.
    9.16 - *
    9.17 - * You should have received a copy of the GNU General Public License
    9.18 - * along with this program; if not, write to the Free Software
    9.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    9.20 - *
    9.21 - * Author: Raj Bhattacharjea <raj.b@gatech.edu>
    9.22 - */
    9.23 -#include "tcp.h"
    9.24 -#include "ns3/uinteger.h"
    9.25 -#include "ns3/double.h"
    9.26 -
    9.27 -namespace ns3 {
    9.28 -
    9.29 -NS_OBJECT_ENSURE_REGISTERED (Tcp);
    9.30 -
    9.31 -TypeId
    9.32 -Tcp::GetTypeId (void)
    9.33 -{
    9.34 -  static TypeId tid = TypeId ("ns3::Tcp")
    9.35 -    .SetParent<SocketFactory> ()
    9.36 -    .AddAttribute ("DefaultSegmentSize",
    9.37 -                   "Default TCP maximum segment size in bytes (may be adjusted based on MTU discovery)",
    9.38 -                   UintegerValue (536),
    9.39 -                   MakeUintegerAccessor (&Tcp::m_defaultSegSize),
    9.40 -                   MakeUintegerChecker<uint32_t> ())
    9.41 -    .AddAttribute ("DefaultAdvertisedWindowSize",
    9.42 -                   "Default TCP advertised window size (bytes)",
    9.43 -                   UintegerValue (0xffff),
    9.44 -                   MakeUintegerAccessor (&Tcp::m_defaultAdvWin),
    9.45 -                   MakeUintegerChecker<uint32_t> ())
    9.46 -    .AddAttribute ("DefaultSlowStartThreshold",
    9.47 -                   "Default TCP slow start threshold (bytes)",
    9.48 -                   UintegerValue (0xffff),
    9.49 -                   MakeUintegerAccessor (&Tcp::m_defaultSsThresh),
    9.50 -                   MakeUintegerChecker<uint32_t> ())
    9.51 -    .AddAttribute ("DefaultTxBufferSize",
    9.52 -                   "Default TCP maximum transmit buffer size (bytes)",
    9.53 -                   UintegerValue (0xffffffffl),
    9.54 -                   MakeUintegerAccessor (&Tcp::m_defaultTxBuffer),
    9.55 -                   MakeUintegerChecker<uint32_t> ())
    9.56 -    .AddAttribute ("DefaultRxBufferSize",
    9.57 -                   "Default TCP maximum receive buffer size (bytes)",
    9.58 -                   UintegerValue (0xffffffffl),
    9.59 -                   MakeUintegerAccessor (&Tcp::m_defaultRxBuffer),
    9.60 -                   MakeUintegerChecker<uint32_t> ())
    9.61 -    .AddAttribute ("DefaultInitialCongestionWindowSize",
    9.62 -                   "Default TCP initial congestion window size (segments)",
    9.63 -                   UintegerValue (1),
    9.64 -                   MakeUintegerAccessor (&Tcp::m_defaultInitialCwnd),
    9.65 -                   MakeUintegerChecker<uint32_t> ())
    9.66 -    .AddAttribute ("DefaultConnTimeout",
    9.67 -                   "Default TCP retransmission timeout when opening connection (seconds)",
    9.68 -                   UintegerValue (3),
    9.69 -                   MakeUintegerAccessor (&Tcp::m_defaultConnTimeout),
    9.70 -                   MakeUintegerChecker<uint32_t> ())
    9.71 -    .AddAttribute ("DefaultConnCount",
    9.72 -                   "Default number of connection attempts (SYN retransmissions) before returning failure",
    9.73 -                   UintegerValue (6),
    9.74 -                   MakeUintegerAccessor (&Tcp::m_defaultConnCount),
    9.75 -                   MakeUintegerChecker<uint32_t> ())
    9.76 -    .AddAttribute ("DefaultDelAckTimeout",
    9.77 -                   "Default timeout value for TCP delayed acks, in seconds",
    9.78 -                   DoubleValue (0.2),
    9.79 -                   MakeDoubleAccessor (&Tcp::m_defaultDelAckTimeout),
    9.80 -                   MakeDoubleChecker<double> ())
    9.81 -    .AddAttribute ("DefaultDelAckCount",
    9.82 -                   "Default number of packets to wait before sending a TCP ack",
    9.83 -                   UintegerValue (2),
    9.84 -                   MakeUintegerAccessor (&Tcp::m_defaultDelAckCount),
    9.85 -                   MakeUintegerChecker<uint32_t> ())
    9.86 -     ;
    9.87 -  return tid;
    9.88 -}
    9.89 -
    9.90 -uint32_t 
    9.91 -Tcp::GetDefaultSegSize (void) const
    9.92 -{
    9.93 -  return m_defaultSegSize;
    9.94 -}
    9.95 -uint32_t 
    9.96 -Tcp::GetDefaultAdvWin (void) const
    9.97 -{
    9.98 -  return m_defaultAdvWin;
    9.99 -}
   9.100 -uint32_t 
   9.101 -Tcp::GetDefaultSsThresh (void) const
   9.102 -{
   9.103 -  return m_defaultSsThresh;
   9.104 -}
   9.105 -uint32_t 
   9.106 -Tcp::GetDefaultTxBuffer (void) const
   9.107 -{
   9.108 -  return m_defaultTxBuffer;
   9.109 -}
   9.110 -uint32_t 
   9.111 -Tcp::GetDefaultRxBuffer (void) const
   9.112 -{
   9.113 -  return m_defaultRxBuffer;
   9.114 -}
   9.115 -uint32_t 
   9.116 -Tcp::GetDefaultInitialCwnd (void) const
   9.117 -{
   9.118 -  return m_defaultInitialCwnd;
   9.119 -}
   9.120 -uint32_t 
   9.121 -Tcp::GetDefaultConnTimeout (void) const
   9.122 -{
   9.123 -  return m_defaultConnTimeout;
   9.124 -}
   9.125 -uint32_t 
   9.126 -Tcp::GetDefaultConnCount (void) const
   9.127 -{
   9.128 -  return m_defaultConnCount;
   9.129 -}
   9.130 -
   9.131 -double
   9.132 -Tcp::GetDefaultDelAckTimeout (void) const
   9.133 -{
   9.134 -  return m_defaultDelAckTimeout;
   9.135 -}
   9.136 -
   9.137 -uint32_t
   9.138 -Tcp::GetDefaultDelAckCount (void) const
   9.139 -{
   9.140 -  return m_defaultDelAckCount;
   9.141 -}
   9.142 -
   9.143 -} // namespace ns3
    10.1 --- a/src/node/tcp.h	Tue May 20 11:52:25 2008 -0700
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,77 +0,0 @@
    10.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
    10.5 -/*
    10.6 - * Copyright (c) 2007 Georgia Tech Research Corporation
    10.7 - *
    10.8 - * This program is free software; you can redistribute it and/or modify
    10.9 - * it under the terms of the GNU General Public License version 2 as
   10.10 - * published by the Free Software Foundation;
   10.11 - *
   10.12 - * This program is distributed in the hope that it will be useful,
   10.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10.15 - * GNU General Public License for more details.
   10.16 - *
   10.17 - * You should have received a copy of the GNU General Public License
   10.18 - * along with this program; if not, write to the Free Software
   10.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   10.20 - *
   10.21 - * Author: Raj Bhattacharjea <raj.b@gatech.edu>
   10.22 - */
   10.23 -#ifndef TCP_H
   10.24 -#define TCP_H
   10.25 -
   10.26 -#include "socket-factory.h"
   10.27 -
   10.28 -namespace ns3 {
   10.29 -
   10.30 -class Socket;
   10.31 -
   10.32 -/**
   10.33 - * \brief API to create TCP socket instances 
   10.34 - *
   10.35 - * This abstract class defines the API for TCP sockets.
   10.36 - * This class also holds the global default variables used to
   10.37 - * initialize newly created sockets, such as values that are
   10.38 - * set through the sysctl or proc interfaces in Linux.
   10.39 -
   10.40 - * All TCP implementations must provide an implementation of CreateSocket
   10.41 - * below, and should make use of the default values configured below.
   10.42 - * 
   10.43 - * \see TcpImpl
   10.44 - *
   10.45 - */
   10.46 -class Tcp : public SocketFactory
   10.47 -{
   10.48 -public:
   10.49 -  static TypeId GetTypeId (void);
   10.50 -
   10.51 -  virtual Ptr<Socket> CreateSocket (void) = 0;
   10.52 -
   10.53 -  uint32_t GetDefaultSegSize (void) const;
   10.54 -  uint32_t GetDefaultAdvWin (void) const;
   10.55 -  uint32_t GetDefaultSsThresh (void) const;
   10.56 -  uint32_t GetDefaultTxBuffer (void) const;
   10.57 -  uint32_t GetDefaultRxBuffer (void) const;
   10.58 -  uint32_t GetDefaultInitialCwnd (void) const;
   10.59 -  uint32_t GetDefaultConnTimeout (void) const;
   10.60 -  uint32_t GetDefaultConnCount (void) const;
   10.61 -  double   GetDefaultDelAckTimeout (void) const;
   10.62 -  uint32_t GetDefaultDelAckCount (void) const;
   10.63 -
   10.64 -private:
   10.65 -  uint32_t  m_defaultSegSize;
   10.66 -  uint32_t  m_defaultAdvWin; 
   10.67 -  uint32_t  m_defaultSsThresh;
   10.68 -  uint32_t  m_defaultTxBuffer;
   10.69 -  uint32_t  m_defaultRxBuffer;
   10.70 -  uint32_t  m_defaultInitialCwnd;
   10.71 -  uint32_t  m_defaultConnTimeout;
   10.72 -  uint32_t  m_defaultConnCount;
   10.73 -  double    m_defaultDelAckTimeout;
   10.74 -  uint32_t  m_defaultDelAckCount;
   10.75 -
   10.76 -};
   10.77 -
   10.78 -} // namespace ns3
   10.79 -
   10.80 -#endif /* TCP_H */
    11.1 --- a/src/node/wscript	Tue May 20 11:52:25 2008 -0700
    11.2 +++ b/src/node/wscript	Tue May 20 12:16:55 2008 -0700
    11.3 @@ -27,7 +27,7 @@
    11.4          'packet-socket.cc',
    11.5          'udp-socket.cc',
    11.6          'udp-socket-factory.cc',
    11.7 -        'tcp.cc',
    11.8 +        'tcp-socket-factory.cc',
    11.9          'ipv4.cc',
   11.10          'application.cc',
   11.11          'simple-channel.cc',
   11.12 @@ -60,7 +60,7 @@
   11.13          'packet-socket-factory.h',
   11.14          'udp-socket.h',
   11.15          'udp-socket-factory.h',
   11.16 -        'tcp.h',
   11.17 +        'tcp-socket-factory.h',
   11.18          'ipv4.h',
   11.19          'application.h',
   11.20          'simple-channel.h',
    12.1 --- a/utils/print-introspected-doxygen.cc	Tue May 20 11:52:25 2008 -0700
    12.2 +++ b/utils/print-introspected-doxygen.cc	Tue May 20 12:16:55 2008 -0700
    12.3 @@ -236,7 +236,7 @@
    12.4    NodeContainer c; c.Create (1);
    12.5  
    12.6    StaticInformation info;
    12.7 -  info.RecordAggregationInfo ("ns3::Node", "ns3::Tcp");
    12.8 +  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpSocketFactory");
    12.9    info.RecordAggregationInfo ("ns3::Node", "ns3::UdpSocketFactory");
   12.10    info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
   12.11    info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::Agent");