i-ipv4-impl.h -> ipv4-impl.h
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 04 Jun 2007 16:59:51 +0200
changeset 737 98eeb9273ed2
parent 736 a27d6bd2c291
child 738 2c105723d191
i-ipv4-impl.h -> ipv4-impl.h
SConstruct
src/internet-node/i-ipv4-impl.cc
src/internet-node/i-ipv4-impl.h
src/internet-node/internet-node.cc
src/internet-node/ipv4-impl.cc
src/internet-node/ipv4-impl.h
--- a/SConstruct	Mon Jun 04 16:57:24 2007 +0200
+++ b/SConstruct	Mon Jun 04 16:59:51 2007 +0200
@@ -275,7 +275,7 @@
     'udp-socket.cc',
     'ipv4-end-point-demux.cc',
     'i-arp-private.cc',
-    'i-ipv4-impl.cc',
+    'ipv4-impl.cc',
     'i-ipv4-private.cc',
     'ascii-trace.cc',
     'pcap-trace.cc',
@@ -295,7 +295,7 @@
     'udp-socket.h',
     'udp.h',
     'i-arp-private.h',
-    'i-ipv4-impl.h',
+    'ipv4-impl.h',
     'i-ipv4-private.h',
     'ipv4-l3-protocol.h',
     'l3-protocol.h',
--- a/src/internet-node/i-ipv4-impl.cc	Mon Jun 04 16:57:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 INRIA
- * All rights reserved.
- *
- * 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 "i-ipv4-impl.h"
-#include "ipv4-l3-protocol.h"
-#include "ipv4-interface.h"
-#include "ns3/assert.h"
-#include "ns3/net-device.h"
-
-namespace ns3 {
-
-IIpv4Impl::IIpv4Impl (Ptr<Ipv4L3Protocol> ipv4)
-  : m_ipv4 (ipv4)
-{}
-IIpv4Impl::~IIpv4Impl ()
-{
-  NS_ASSERT (m_ipv4 == 0);
-}
-void 
-IIpv4Impl::DoDispose (void)
-{
-  m_ipv4 = 0;
-}
-
-void 
-IIpv4Impl::AddHostRouteTo (Ipv4Address dest, 
-			   Ipv4Address nextHop, 
-			   uint32_t interface)
-{
-  m_ipv4->AddHostRouteTo (dest, nextHop, interface);
-}
-void 
-IIpv4Impl::AddHostRouteTo (Ipv4Address dest, 
-			   uint32_t interface)
-{
-  m_ipv4->AddHostRouteTo (dest, interface);
-}
-void 
-IIpv4Impl::AddNetworkRouteTo (Ipv4Address network, 
-			      Ipv4Mask networkMask, 
-			      Ipv4Address nextHop, 
-			      uint32_t interface)
-{
-  m_ipv4->AddNetworkRouteTo (network, networkMask, nextHop, interface);
-}
-void 
-IIpv4Impl::AddNetworkRouteTo (Ipv4Address network, 
-			      Ipv4Mask networkMask, 
-			      uint32_t interface)
-{
-  m_ipv4->AddNetworkRouteTo (network, networkMask, interface);
-}
-void 
-IIpv4Impl::SetDefaultRoute (Ipv4Address nextHop, 
-			    uint32_t interface)
-{
-  m_ipv4->SetDefaultRoute (nextHop, interface);
-}
-uint32_t 
-IIpv4Impl::GetNRoutes (void)
-{
-  return m_ipv4->GetNRoutes ();
-}
-Ipv4Route *
-IIpv4Impl::GetRoute (uint32_t i)
-{
-  return m_ipv4->GetRoute (i);
-}
-void 
-IIpv4Impl::RemoveRoute (uint32_t i)
-{
-  return m_ipv4->RemoveRoute (i);
-}
-uint32_t 
-IIpv4Impl::AddInterface (Ptr<NetDevice> device)
-{
-  return m_ipv4->AddInterface (device);
-}
-uint32_t 
-IIpv4Impl::GetNInterfaces (void)
-{
-  return m_ipv4->GetNInterfaces ();
-}
-Ptr<NetDevice>
-IIpv4Impl::GetNetDevice (uint32_t i)
-{
-  return m_ipv4->GetInterface (i)-> GetDevice ();
-}
-
-void 
-IIpv4Impl::SetAddress (uint32_t i, Ipv4Address address)
-{
-  m_ipv4->SetAddress (i, address);
-}
-void 
-IIpv4Impl::SetNetworkMask (uint32_t i, Ipv4Mask mask)
-{
-  m_ipv4->SetNetworkMask (i, mask);
-}
-Ipv4Mask 
-IIpv4Impl::GetNetworkMask (uint32_t i) const
-{
-  return m_ipv4->GetNetworkMask (i);
-}
-Ipv4Address 
-IIpv4Impl::GetAddress (uint32_t i) const
-{
-  return m_ipv4->GetAddress (i);
-}
-uint16_t 
-IIpv4Impl::GetMtu (uint32_t i) const
-{
-  return m_ipv4->GetMtu (i);
-}
-bool 
-IIpv4Impl::IsUp (uint32_t i) const
-{
-  return m_ipv4->IsUp (i);
-}
-void 
-IIpv4Impl::SetUp (uint32_t i)
-{
-  m_ipv4->SetUp (i);
-}
-void 
-IIpv4Impl::SetDown (uint32_t i)
-{
-  m_ipv4->SetDown (i);
-}
-
-}//namespace ns3
--- a/src/internet-node/i-ipv4-impl.h	Mon Jun 04 16:57:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 INRIA
- * All rights reserved.
- *
- * 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 I_IPV4_IMPL_H
-#define I_IPV4_IMPL_H
-
-#include "ns3/i-ipv4.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-
-class Ipv4L3Protocol;
-
-class IIpv4Impl : public IIpv4
-{
-public:
-  IIpv4Impl (Ptr<Ipv4L3Protocol> ipv4);
-
-  virtual ~IIpv4Impl ();
-
-  virtual void AddHostRouteTo (Ipv4Address dest, 
-			       Ipv4Address nextHop, 
-			       uint32_t interface);
-  virtual void AddHostRouteTo (Ipv4Address dest, 
-			       uint32_t interface);
-  virtual void AddNetworkRouteTo (Ipv4Address network, 
-				  Ipv4Mask networkMask, 
-				  Ipv4Address nextHop, 
-				  uint32_t interface);
-  virtual void AddNetworkRouteTo (Ipv4Address network, 
-				  Ipv4Mask networkMask, 
-				  uint32_t interface);
-  virtual void SetDefaultRoute (Ipv4Address nextHop, 
-				uint32_t interface);
-  virtual uint32_t GetNRoutes (void);
-  virtual Ipv4Route *GetRoute (uint32_t i);
-  virtual void RemoveRoute (uint32_t i);
-  virtual uint32_t AddInterface (Ptr<NetDevice> device);
-  virtual uint32_t GetNInterfaces (void);  
-  virtual Ptr<NetDevice> GetNetDevice(uint32_t i);
-
-  virtual void SetAddress (uint32_t i, Ipv4Address address);
-  virtual void SetNetworkMask (uint32_t i, Ipv4Mask mask);
-  virtual Ipv4Mask GetNetworkMask (uint32_t t) const;
-  virtual Ipv4Address GetAddress (uint32_t i) const;
-  virtual uint16_t GetMtu (uint32_t i) const;
-  virtual bool IsUp (uint32_t i) const;
-  virtual void SetUp (uint32_t i);
-  virtual void SetDown (uint32_t i);
-protected:
-  virtual void DoDispose (void);
-private:
-  Ptr<Ipv4L3Protocol> m_ipv4;
-};
-
-} // namespace ns3
-
-#endif /* I_IPV4_IMPL_H */
--- a/src/internet-node/internet-node.cc	Mon Jun 04 16:57:24 2007 +0200
+++ b/src/internet-node/internet-node.cc	Mon Jun 04 16:59:51 2007 +0200
@@ -32,7 +32,7 @@
 #include "arp-l3-protocol.h"
 #include "i-udp-impl.h"
 #include "i-arp-private.h"
-#include "i-ipv4-impl.h"
+#include "ipv4-impl.h"
 #include "i-ipv4-private.h"
 
 namespace ns3 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/ipv4-impl.cc	Mon Jun 04 16:59:51 2007 +0200
@@ -0,0 +1,148 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ * All rights reserved.
+ *
+ * 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 "ipv4-impl.h"
+#include "ipv4-l3-protocol.h"
+#include "ipv4-interface.h"
+#include "ns3/assert.h"
+#include "ns3/net-device.h"
+
+namespace ns3 {
+
+IIpv4Impl::IIpv4Impl (Ptr<Ipv4L3Protocol> ipv4)
+  : m_ipv4 (ipv4)
+{}
+IIpv4Impl::~IIpv4Impl ()
+{
+  NS_ASSERT (m_ipv4 == 0);
+}
+void 
+IIpv4Impl::DoDispose (void)
+{
+  m_ipv4 = 0;
+}
+
+void 
+IIpv4Impl::AddHostRouteTo (Ipv4Address dest, 
+			   Ipv4Address nextHop, 
+			   uint32_t interface)
+{
+  m_ipv4->AddHostRouteTo (dest, nextHop, interface);
+}
+void 
+IIpv4Impl::AddHostRouteTo (Ipv4Address dest, 
+			   uint32_t interface)
+{
+  m_ipv4->AddHostRouteTo (dest, interface);
+}
+void 
+IIpv4Impl::AddNetworkRouteTo (Ipv4Address network, 
+			      Ipv4Mask networkMask, 
+			      Ipv4Address nextHop, 
+			      uint32_t interface)
+{
+  m_ipv4->AddNetworkRouteTo (network, networkMask, nextHop, interface);
+}
+void 
+IIpv4Impl::AddNetworkRouteTo (Ipv4Address network, 
+			      Ipv4Mask networkMask, 
+			      uint32_t interface)
+{
+  m_ipv4->AddNetworkRouteTo (network, networkMask, interface);
+}
+void 
+IIpv4Impl::SetDefaultRoute (Ipv4Address nextHop, 
+			    uint32_t interface)
+{
+  m_ipv4->SetDefaultRoute (nextHop, interface);
+}
+uint32_t 
+IIpv4Impl::GetNRoutes (void)
+{
+  return m_ipv4->GetNRoutes ();
+}
+Ipv4Route *
+IIpv4Impl::GetRoute (uint32_t i)
+{
+  return m_ipv4->GetRoute (i);
+}
+void 
+IIpv4Impl::RemoveRoute (uint32_t i)
+{
+  return m_ipv4->RemoveRoute (i);
+}
+uint32_t 
+IIpv4Impl::AddInterface (Ptr<NetDevice> device)
+{
+  return m_ipv4->AddInterface (device);
+}
+uint32_t 
+IIpv4Impl::GetNInterfaces (void)
+{
+  return m_ipv4->GetNInterfaces ();
+}
+Ptr<NetDevice>
+IIpv4Impl::GetNetDevice (uint32_t i)
+{
+  return m_ipv4->GetInterface (i)-> GetDevice ();
+}
+
+void 
+IIpv4Impl::SetAddress (uint32_t i, Ipv4Address address)
+{
+  m_ipv4->SetAddress (i, address);
+}
+void 
+IIpv4Impl::SetNetworkMask (uint32_t i, Ipv4Mask mask)
+{
+  m_ipv4->SetNetworkMask (i, mask);
+}
+Ipv4Mask 
+IIpv4Impl::GetNetworkMask (uint32_t i) const
+{
+  return m_ipv4->GetNetworkMask (i);
+}
+Ipv4Address 
+IIpv4Impl::GetAddress (uint32_t i) const
+{
+  return m_ipv4->GetAddress (i);
+}
+uint16_t 
+IIpv4Impl::GetMtu (uint32_t i) const
+{
+  return m_ipv4->GetMtu (i);
+}
+bool 
+IIpv4Impl::IsUp (uint32_t i) const
+{
+  return m_ipv4->IsUp (i);
+}
+void 
+IIpv4Impl::SetUp (uint32_t i)
+{
+  m_ipv4->SetUp (i);
+}
+void 
+IIpv4Impl::SetDown (uint32_t i)
+{
+  m_ipv4->SetDown (i);
+}
+
+}//namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-node/ipv4-impl.h	Mon Jun 04 16:59:51 2007 +0200
@@ -0,0 +1,75 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ * All rights reserved.
+ *
+ * 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 I_IPV4_IMPL_H
+#define I_IPV4_IMPL_H
+
+#include "ns3/i-ipv4.h"
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+class Ipv4L3Protocol;
+
+class IIpv4Impl : public IIpv4
+{
+public:
+  IIpv4Impl (Ptr<Ipv4L3Protocol> ipv4);
+
+  virtual ~IIpv4Impl ();
+
+  virtual void AddHostRouteTo (Ipv4Address dest, 
+			       Ipv4Address nextHop, 
+			       uint32_t interface);
+  virtual void AddHostRouteTo (Ipv4Address dest, 
+			       uint32_t interface);
+  virtual void AddNetworkRouteTo (Ipv4Address network, 
+				  Ipv4Mask networkMask, 
+				  Ipv4Address nextHop, 
+				  uint32_t interface);
+  virtual void AddNetworkRouteTo (Ipv4Address network, 
+				  Ipv4Mask networkMask, 
+				  uint32_t interface);
+  virtual void SetDefaultRoute (Ipv4Address nextHop, 
+				uint32_t interface);
+  virtual uint32_t GetNRoutes (void);
+  virtual Ipv4Route *GetRoute (uint32_t i);
+  virtual void RemoveRoute (uint32_t i);
+  virtual uint32_t AddInterface (Ptr<NetDevice> device);
+  virtual uint32_t GetNInterfaces (void);  
+  virtual Ptr<NetDevice> GetNetDevice(uint32_t i);
+
+  virtual void SetAddress (uint32_t i, Ipv4Address address);
+  virtual void SetNetworkMask (uint32_t i, Ipv4Mask mask);
+  virtual Ipv4Mask GetNetworkMask (uint32_t t) const;
+  virtual Ipv4Address GetAddress (uint32_t i) const;
+  virtual uint16_t GetMtu (uint32_t i) const;
+  virtual bool IsUp (uint32_t i) const;
+  virtual void SetUp (uint32_t i);
+  virtual void SetDown (uint32_t i);
+protected:
+  virtual void DoDispose (void);
+private:
+  Ptr<Ipv4L3Protocol> m_ipv4;
+};
+
+} // namespace ns3
+
+#endif /* I_IPV4_IMPL_H */