--- a/examples/csma-broadcast.cc Sat May 17 12:08:20 2008 -0700
+++ b/examples/csma-broadcast.cc Sat May 17 22:02:09 2008 -0700
@@ -49,6 +49,7 @@
#if 0
LogComponentEnable ("CsmaBroadcastExample", LOG_LEVEL_INFO);
#endif
+ LogComponentEnable ("CsmaBroadcastExample", LOG_PREFIX_TIME);
//
// Make the random number generators generate reproducible results.
--- a/src/internet-node/internet-stack.cc Sat May 17 12:08:20 2008 -0700
+++ b/src/internet-node/internet-stack.cc Sat May 17 22:02:09 2008 -0700
@@ -27,7 +27,7 @@
#include "tcp-l4-protocol.h"
#include "ipv4-l3-protocol.h"
#include "arp-l3-protocol.h"
-#include "udp-impl.h"
+#include "udp-socket-factory-impl.h"
#include "tcp-impl.h"
#include "ipv4-impl.h"
@@ -58,18 +58,18 @@
ipv4L4Demux->Insert (udp);
ipv4L4Demux->Insert (tcp);
- Ptr<UdpImpl> udpImpl = CreateObject<UdpImpl> ();
+ Ptr<UdpSocketFactoryImpl> udpFactory = CreateObject<UdpSocketFactoryImpl> ();
Ptr<TcpImpl> tcpImpl = CreateObject<TcpImpl> ();
Ptr<Ipv4Impl> ipv4Impl = CreateObject<Ipv4Impl> ();
- udpImpl->SetUdp (udp);
+ udpFactory->SetUdp (udp);
tcpImpl->SetTcp (tcp);
ipv4Impl->SetIpv4 (ipv4);
node->AggregateObject (ipv4);
node->AggregateObject (arp);
node->AggregateObject (ipv4Impl);
- node->AggregateObject (udpImpl);
+ node->AggregateObject (udpFactory);
node->AggregateObject (tcpImpl);
node->AggregateObject (ipv4L4Demux);
}
--- a/src/internet-node/udp-impl.cc Sat May 17 12:08:20 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 INRIA
- *
- * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
- */
-#include "udp-impl.h"
-#include "udp-l4-protocol.h"
-#include "ns3/socket.h"
-#include "ns3/assert.h"
-
-namespace ns3 {
-
-UdpImpl::UdpImpl ()
- : m_udp (0)
-{}
-UdpImpl::~UdpImpl ()
-{
- NS_ASSERT (m_udp == 0);
-}
-
-void
-UdpImpl::SetUdp (Ptr<UdpL4Protocol> udp)
-{
- m_udp = udp;
-}
-
-Ptr<Socket>
-UdpImpl::CreateSocket (void)
-{
- return m_udp->CreateSocket ();
-}
-
-void
-UdpImpl::DoDispose (void)
-{
- m_udp = 0;
- UdpSocketFactory::DoDispose ();
-}
-
-} // namespace ns3
--- a/src/internet-node/udp-impl.h Sat May 17 12:08:20 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 INRIA
- *
- * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
- */
-#ifndef UDP_IMPL_H
-#define UDP_IMPL_H
-
-#include "ns3/udp-socket-factory.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-
-class UdpL4Protocol;
-
-/**
- * \brief Object to create UDP socket instances
- * \internal
- *
- * This class implements the API for UDP sockets.
- * It is a socket factory (deriving from class SocketFactory) and can
- * also hold global variables used to initialize newly created sockets,
- * such as values that are set through the sysctl or proc interfaces in Linux.
- */
-class UdpImpl : public UdpSocketFactory
-{
-public:
- UdpImpl ();
- virtual ~UdpImpl ();
-
- void SetUdp (Ptr<UdpL4Protocol> udp);
-
- /**
- * \brief Implements a method to create a UdpImpl-based socket and return
- * a base class smart pointer to the socket.
- * \internal
- *
- * \return smart pointer to Socket
- */
- virtual Ptr<Socket> CreateSocket (void);
-
-protected:
- virtual void DoDispose (void);
-private:
- Ptr<UdpL4Protocol> m_udp;
-};
-
-} // namespace ns3
-
-#endif /* UDP_IMPL_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/udp-socket-factory-impl.cc Sat May 17 22:02:09 2008 -0700
@@ -0,0 +1,54 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ *
+ * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+#include "udp-socket-factory-impl.h"
+#include "udp-l4-protocol.h"
+#include "ns3/socket.h"
+#include "ns3/assert.h"
+
+namespace ns3 {
+
+UdpSocketFactoryImpl::UdpSocketFactoryImpl ()
+ : m_udp (0)
+{}
+UdpSocketFactoryImpl::~UdpSocketFactoryImpl ()
+{
+ NS_ASSERT (m_udp == 0);
+}
+
+void
+UdpSocketFactoryImpl::SetUdp (Ptr<UdpL4Protocol> udp)
+{
+ m_udp = udp;
+}
+
+Ptr<Socket>
+UdpSocketFactoryImpl::CreateSocket (void)
+{
+ return m_udp->CreateSocket ();
+}
+
+void
+UdpSocketFactoryImpl::DoDispose (void)
+{
+ m_udp = 0;
+ UdpSocketFactory::DoDispose ();
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/udp-socket-factory-impl.h Sat May 17 22:02:09 2008 -0700
@@ -0,0 +1,62 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ *
+ * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+#ifndef UDP_SOCKET_FACTORY_IMPL_H
+#define UDP_SOCKET_FACTORY_IMPL_H
+
+#include "ns3/udp-socket-factory.h"
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+class UdpL4Protocol;
+
+/**
+ * \brief Object to create UDP socket instances
+ * \internal
+ *
+ * This class implements the API for creating UDP sockets.
+ * It is a socket factory (deriving from class SocketFactory).
+ */
+class UdpSocketFactoryImpl : public UdpSocketFactory
+{
+public:
+ UdpSocketFactoryImpl ();
+ virtual ~UdpSocketFactoryImpl ();
+
+ void SetUdp (Ptr<UdpL4Protocol> udp);
+
+ /**
+ * \brief Implements a method to create a Udp-based socket and return
+ * a base class smart pointer to the socket.
+ * \internal
+ *
+ * \return smart pointer to Socket
+ */
+ virtual Ptr<Socket> CreateSocket (void);
+
+protected:
+ virtual void DoDispose (void);
+private:
+ Ptr<UdpL4Protocol> m_udp;
+};
+
+} // namespace ns3
+
+#endif /* UDP_SOCKET_FACTORY_IMPL_H */
--- a/src/internet-node/wscript Sat May 17 12:08:20 2008 -0700
+++ b/src/internet-node/wscript Sat May 17 22:02:09 2008 -0700
@@ -28,7 +28,7 @@
'ipv4-impl.cc',
'ascii-trace.cc',
'pcap-trace.cc',
- 'udp-impl.cc',
+ 'udp-socket-factory-impl.cc',
'tcp-impl.cc',
'pending-data.cc',
'sequence-number.cc',