--- a/src/internet-node/internet-stack.cc Tue May 20 12:16:55 2008 -0700
+++ b/src/internet-node/internet-stack.cc Tue May 20 12:27:30 2008 -0700
@@ -28,7 +28,7 @@
#include "ipv4-l3-protocol.h"
#include "arp-l3-protocol.h"
#include "udp-socket-factory-impl.h"
-#include "tcp-impl.h"
+#include "tcp-socket-factory-impl.h"
#include "ipv4-impl.h"
namespace ns3 {
@@ -59,18 +59,18 @@
ipv4L4Demux->Insert (tcp);
Ptr<UdpSocketFactoryImpl> udpFactory = CreateObject<UdpSocketFactoryImpl> ();
- Ptr<TcpImpl> tcpImpl = CreateObject<TcpImpl> ();
+ Ptr<TcpSocketFactoryImpl> tcpFactory = CreateObject<TcpSocketFactoryImpl> ();
Ptr<Ipv4Impl> ipv4Impl = CreateObject<Ipv4Impl> ();
udpFactory->SetUdp (udp);
- tcpImpl->SetTcp (tcp);
+ tcpFactory->SetTcp (tcp);
ipv4Impl->SetIpv4 (ipv4);
node->AggregateObject (ipv4);
node->AggregateObject (arp);
node->AggregateObject (ipv4Impl);
node->AggregateObject (udpFactory);
- node->AggregateObject (tcpImpl);
+ node->AggregateObject (tcpFactory);
node->AggregateObject (ipv4L4Demux);
}
--- a/src/internet-node/tcp-impl.cc Tue May 20 12:16:55 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 Georgia Tech Research Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Raj Bhattacharjea <raj.b@gatech.edu>
- */
-#include "tcp-impl.h"
-#include "tcp-l4-protocol.h"
-#include "ns3/socket.h"
-#include "ns3/assert.h"
-
-namespace ns3 {
-
-TcpImpl::TcpImpl ()
- : m_tcp (0)
-{}
-TcpImpl::~TcpImpl ()
-{
- NS_ASSERT (m_tcp == 0);
-}
-
-void
-TcpImpl::SetTcp (Ptr<TcpL4Protocol> tcp)
-{
- m_tcp = tcp;
-}
-
-Ptr<Socket>
-TcpImpl::CreateSocket (void)
-{
- return m_tcp->CreateSocket ();
-}
-
-void
-TcpImpl::DoDispose (void)
-{
- m_tcp = 0;
- TcpSocketFactory::DoDispose ();
-}
-
-} // namespace ns3
--- a/src/internet-node/tcp-impl.h Tue May 20 12:16:55 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 Georgia Tech Research Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Raj Bhattacharjea <raj.b@gatech.edu>
- */
-#ifndef TCP_IMPL_H
-#define TCP_IMPL_H
-
-#include "ns3/tcp-socket-factory.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-
-class TcpL4Protocol;
-
-/**
- * \ingroup internetNode
- * \defgroup Tcp Tcp
- *
- * \section Tcp Overview
- *
- * The TCP code in ns3::InternetNode is ported from the
- * <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/">
- * Georgia Tech Network Simulator (GTNetS)</a>.
- *
- * Most of the logic is in class ns3::TcpSocketImpl.
- */
-class TcpImpl : public TcpSocketFactory
-{
-public:
- TcpImpl ();
- virtual ~TcpImpl ();
-
- void SetTcp (Ptr<TcpL4Protocol> tcp);
-
- virtual Ptr<Socket> CreateSocket (void);
-
-protected:
- virtual void DoDispose (void);
-private:
- Ptr<TcpL4Protocol> m_tcp;
-};
-
-} // namespace ns3
-
-#endif /* TCP_IMPL_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/tcp-socket-factory-impl.cc Tue May 20 12:27:30 2008 -0700
@@ -0,0 +1,54 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 Georgia Tech Research Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Raj Bhattacharjea <raj.b@gatech.edu>
+ */
+#include "tcp-socket-factory-impl.h"
+#include "tcp-l4-protocol.h"
+#include "ns3/socket.h"
+#include "ns3/assert.h"
+
+namespace ns3 {
+
+TcpSocketFactoryImpl::TcpSocketFactoryImpl ()
+ : m_tcp (0)
+{}
+TcpSocketFactoryImpl::~TcpSocketFactoryImpl ()
+{
+ NS_ASSERT (m_tcp == 0);
+}
+
+void
+TcpSocketFactoryImpl::SetTcp (Ptr<TcpL4Protocol> tcp)
+{
+ m_tcp = tcp;
+}
+
+Ptr<Socket>
+TcpSocketFactoryImpl::CreateSocket (void)
+{
+ return m_tcp->CreateSocket ();
+}
+
+void
+TcpSocketFactoryImpl::DoDispose (void)
+{
+ m_tcp = 0;
+ TcpSocketFactory::DoDispose ();
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/tcp-socket-factory-impl.h Tue May 20 12:27:30 2008 -0700
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 Georgia Tech Research Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Raj Bhattacharjea <raj.b@gatech.edu>
+ */
+#ifndef TCP_SOCKET_FACTORY_IMPL_H
+#define TCP_SOCKET_FACTORY_IMPL_H
+
+#include "ns3/tcp-socket-factory.h"
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+class TcpL4Protocol;
+
+/**
+ * \ingroup internetNode
+ * \defgroup Tcp Tcp
+ *
+ * \section Tcp Overview
+ *
+ * The TCP code in ns3::InternetNode is ported from the
+ * <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/">
+ * Georgia Tech Network Simulator (GTNetS)</a>.
+ *
+ * Most of the logic is in class ns3::TcpSocketImpl.
+ */
+class TcpSocketFactoryImpl : public TcpSocketFactory
+{
+public:
+ TcpSocketFactoryImpl ();
+ virtual ~TcpSocketFactoryImpl ();
+
+ void SetTcp (Ptr<TcpL4Protocol> tcp);
+
+ virtual Ptr<Socket> CreateSocket (void);
+
+protected:
+ virtual void DoDispose (void);
+private:
+ Ptr<TcpL4Protocol> m_tcp;
+};
+
+} // namespace ns3
+
+#endif /* TCP_SOCKET_FACTORY_IMPL_H */
--- a/src/internet-node/wscript Tue May 20 12:16:55 2008 -0700
+++ b/src/internet-node/wscript Tue May 20 12:27:30 2008 -0700
@@ -29,7 +29,7 @@
'ascii-trace.cc',
'pcap-trace.cc',
'udp-socket-factory-impl.cc',
- 'tcp-impl.cc',
+ 'tcp-socket-factory-impl.cc',
'pending-data.cc',
'sequence-number.cc',
'rtt-estimator.cc',