merge with HEAD
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 03 Sep 2008 10:42:18 -0700
changeset 3610 ab843919beb1
parent 3609 475d6e5d6794 (current diff)
parent 3592 967bf4132c6f (diff)
child 3611 5950066a1592
merge with HEAD
bindings/python/ns3_module_internet_stack.py
bindings/python/ns3_module_wifi.py
src/internet-stack/ipv4-l4-demux.cc
src/internet-stack/ipv4-l4-demux.h
--- a/bindings/python/ns3_module_internet_stack.py	Wed Sep 03 10:37:22 2008 -0700
+++ b/bindings/python/ns3_module_internet_stack.py	Wed Sep 03 10:42:18 2008 -0700
@@ -343,8 +343,6 @@
 def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
     ## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::PROT_NUMBER [variable]
     cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True)
-    ## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::Ipv4L3Protocol(ns3::Ipv4L3Protocol const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::Ipv4L3Protocol const &', 'arg0')])
     ## ipv4-l3-protocol.h: static ns3::TypeId ns3::Ipv4L3Protocol::GetTypeId() [member function]
     cls.add_method('GetTypeId', 
                    'ns3::TypeId', 
@@ -356,6 +354,18 @@
     cls.add_method('SetNode', 
                    'void', 
                    [param('ns3::Ptr< ns3::Node >', 'node')])
+    ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Insert(ns3::Ptr<ns3::Ipv4L4Protocol> protocol) [member function]
+    cls.add_method('Insert', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')])
+    ## ipv4-l3-protocol.h: ns3::Ptr<ns3::Ipv4L4Protocol> ns3::Ipv4L3Protocol::GetProtocol(int protocolNumber) [member function]
+    cls.add_method('GetProtocol', 
+                   'ns3::Ptr< ns3::Ipv4L4Protocol >', 
+                   [param('int', 'protocolNumber')])
+    ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Remove(ns3::Ptr<ns3::Ipv4L4Protocol> protocol) [member function]
+    cls.add_method('Remove', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')])
     ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetDefaultTtl(uint8_t ttl) [member function]
     cls.add_method('SetDefaultTtl', 
                    'void', 
--- a/bindings/python/ns3_module_wifi.py	Wed Sep 03 10:37:22 2008 -0700
+++ b/bindings/python/ns3_module_wifi.py	Wed Sep 03 10:42:18 2008 -0700
@@ -675,8 +675,8 @@
     cls.add_constructor([param('ns3::Ssid const &', 'arg0')])
     ## ssid.h: ns3::Ssid::Ssid() [constructor]
     cls.add_constructor([])
-    ## ssid.h: ns3::Ssid::Ssid(char const * ssid) [constructor]
-    cls.add_constructor([param('char const *', 'ssid')])
+    ## ssid.h: ns3::Ssid::Ssid(std::string s) [constructor]
+    cls.add_constructor([param('std::string', 's')])
     ## ssid.h: ns3::Ssid::Ssid(char const * ssid, uint8_t length) [constructor]
     cls.add_constructor([param('char const *', 'ssid'), param('uint8_t', 'length')])
     ## ssid.h: ns3::Buffer::Iterator ns3::Ssid::Deserialize(ns3::Buffer::Iterator i) [member function]
--- a/bindings/python/wscript	Wed Sep 03 10:37:22 2008 -0700
+++ b/bindings/python/wscript	Wed Sep 03 10:42:18 2008 -0700
@@ -326,6 +326,8 @@
         return
 
     env = bld.env_of_name('default')
+    curdir = bld.m_curdirnode.abspath()
+
     #Object.register('all-ns3-headers', AllNs3Headers)
     Action.Action('gen-ns3-metaheader', func=gen_ns3_metaheader, color='BLUE')
 
@@ -341,11 +343,14 @@
     ## may be smaller than the set of all modules, in case a new
     ## ns3 module is being developed which wasn't scanned yet.
     scanned_modules = []
-    for filename in os.listdir(bld.m_curdirnode.abspath()):
+    for filename in os.listdir(curdir):
         m = re.match(r"^ns3_module_(.+)\.py$", filename)
         if m is None:
             continue
-        scanned_modules.append(m.group(1))
+        name = m.group(1)
+        if name.endswith("__local"):
+            continue
+        scanned_modules.append(name)
 
     if env['ENABLE_PYTHON_BINDINGS']:
         bindgen = bld.create_obj('command-output')
@@ -364,6 +369,9 @@
 
         for module in scanned_modules:
             bindgen.hidden_inputs.append("ns3_module_%s.py" % module)
+            local = "ns3_module_%s__local.py" % module
+            if os.path.exists(os.path.join(curdir, local)):
+                bindgen.hidden_inputs.append(local)
 
         bindgen.hidden_outputs = ['ns3module.h']
         for module in scanned_modules:
--- a/src/devices/wifi/ssid.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/devices/wifi/ssid.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -32,8 +32,10 @@
       m_ssid[i] = 0;
     }
 }
-Ssid::Ssid (char const *ssid)
+Ssid::Ssid (std::string s)
 {
+  NS_ASSERT (s.size () < 32);
+  const char *ssid = s.c_str ();
   uint8_t len = 0;
   while (*ssid != 0 && len < 32) 
     {
--- a/src/devices/wifi/ssid.h	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/devices/wifi/ssid.h	Wed Sep 03 10:42:18 2008 -0700
@@ -35,8 +35,7 @@
 public:
   // broadcast ssid
   Ssid ();
-  /* 0-terminated string */
-  Ssid (char const *ssid);
+  Ssid (std::string s);
   Ssid (char const ssid[32], uint8_t length);
 
   bool IsEqual (Ssid const &o) const;
--- a/src/devices/wifi/wifi-phy.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/devices/wifi/wifi-phy.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -487,7 +487,7 @@
 void 
 WifiPhy::SendPacket (Ptr<const Packet> packet, WifiMode txMode, WifiPreamble preamble, uint8_t txPower)
 {
-  NS_LOG_FUNCTION (this << packet << txMode << preamble << txPower);
+  NS_LOG_FUNCTION (this << packet << txMode << preamble << (uint32_t)txPower);
   /* Transmission can happen if:
    *  - we are syncing on a packet. It is the responsability of the
    *    MAC layer to avoid doing this but the PHY does nothing to 
--- a/src/internet-stack/internet-stack.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/internet-stack.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -23,7 +23,6 @@
 #include "ns3/node.h"
 #include "ns3/core-config.h"
 
-#include "ipv4-l4-demux.h"
 #include "udp-l4-protocol.h"
 #include "tcp-l4-protocol.h"
 #include "ipv4-l3-protocol.h"
@@ -48,22 +47,22 @@
 }
 
 static void
-AddUdpStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux)
+AddUdpStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4)
 {
   Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol> ();
   udp->SetNode (node);
-  ipv4L4Demux->Insert (udp);
+  ipv4->Insert (udp);
   Ptr<UdpSocketFactoryImpl> udpFactory = CreateObject<UdpSocketFactoryImpl> ();
   udpFactory->SetUdp (udp);
   node->AggregateObject (udpFactory);
 }
 
 static void
-AddTcpStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux)
+AddTcpStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4)
 {
   Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol> ();
   tcp->SetNode (node);
-  ipv4L4Demux->Insert (tcp);
+  ipv4->Insert (tcp);
   Ptr<TcpSocketFactoryImpl> tcpFactory = CreateObject<TcpSocketFactoryImpl> ();
   tcpFactory->SetTcp (tcp);
   node->AggregateObject (tcpFactory);
@@ -74,7 +73,6 @@
 {
   Ptr<Ipv4Impl> ipv4Impl = CreateObject<Ipv4Impl> ();
   ipv4Impl->SetIpv4 (ipv4);
-  node->AggregateObject (ipv4);
   node->AggregateObject (ipv4Impl);
 }
 
@@ -85,25 +83,22 @@
   Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol> ();
   ipv4->SetNode (node);
 
-  Ptr<Ipv4L4Demux> ipv4L4Demux = CreateObject<Ipv4L4Demux> ();
-  ipv4L4Demux->SetNode (node);
-
-  AddUdpStack (node, ipv4L4Demux);
-  AddTcpStack (node, ipv4L4Demux);
+  AddUdpStack (node, ipv4);
+  AddTcpStack (node, ipv4);
 
   AddIpv4Impl (node, ipv4);
-  node->AggregateObject (ipv4L4Demux);
+  node->AggregateObject (ipv4);
 }
 
 
 #ifdef NETWORK_SIMULATION_CRADLE
 static void
-AddNscStack(Ptr<Node> node, Ptr<Ipv4L4Demux> ipv4L4Demux, const std::string &soname)
+AddNscStack(Ptr<Node> node, Ptr<Ipv4L3Protocol> ipv4, const std::string &soname)
 {
   Ptr<NscTcpL4Protocol> tcp = CreateObject<NscTcpL4Protocol> ();
   tcp->SetNscLibrary(soname);
   tcp->SetNode (node);
-  ipv4L4Demux->Insert (tcp);
+  ipv4->Insert (tcp);
   Ptr<NscTcpSocketFactoryImpl> tcpFactory = CreateObject<NscTcpSocketFactoryImpl> ();
   tcpFactory->SetTcp (tcp);
   node->AggregateObject (tcpFactory);
@@ -117,14 +112,11 @@
   Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol> ();
   ipv4->SetNode (node);
 
-  Ptr<Ipv4L4Demux> ipv4L4Demux = CreateObject<Ipv4L4Demux> ();
-  ipv4L4Demux->SetNode (node);
-
-  AddUdpStack (node, ipv4L4Demux);
-  AddNscStack (node, ipv4L4Demux, soname);
+  AddUdpStack (node, ipv4);
+  AddNscStack (node, ipv4, soname);
 
   AddIpv4Impl (node, ipv4);
-  node->AggregateObject (ipv4L4Demux);
+  node->AggregateObject (ipv4);
 }
 #else
 void
--- a/src/internet-stack/ipv4-l3-protocol.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/ipv4-l3-protocol.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -38,7 +38,6 @@
 #include "ipv4-interface.h"
 #include "ipv4-loopback-interface.h"
 #include "arp-ipv4-interface.h"
-#include "ipv4-l4-demux.h"
 
 NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
 
@@ -92,6 +91,29 @@
 }
 
 void
+Ipv4L3Protocol::Insert(Ptr<Ipv4L4Protocol> protocol)
+{
+  m_protocols.push_back (protocol);
+}
+Ptr<Ipv4L4Protocol>
+Ipv4L3Protocol::GetProtocol(int protocolNumber)
+{
+  for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
+    {
+      if ((*i)->GetProtocolNumber () == protocolNumber)
+	{
+	  return *i;
+	}
+    }
+  return 0;
+}
+void
+Ipv4L3Protocol::Remove (Ptr<Ipv4L4Protocol> protocol)
+{
+  m_protocols.remove (protocol);
+}
+
+void
 Ipv4L3Protocol::SetNode (Ptr<Node> node)
 {
   m_node = node;
@@ -102,6 +124,13 @@
 Ipv4L3Protocol::DoDispose (void)
 {
   NS_LOG_FUNCTION (this);
+  for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
+    {
+      (*i)->Dispose ();
+      *i = 0;
+    }
+  m_protocols.clear ();
+
   for (Ipv4InterfaceList::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); ++i)
     {
       Ptr<Ipv4Interface> interface = *i;
@@ -699,8 +728,7 @@
 {
   NS_LOG_FUNCTION (this << p << &ip);
 
-  Ptr<Ipv4L4Demux> demux = m_node->GetObject<Ipv4L4Demux> ();
-  Ptr<Ipv4L4Protocol> protocol = demux->GetProtocol (ip.GetProtocol ());
+  Ptr<Ipv4L4Protocol> protocol = GetProtocol (ip.GetProtocol ());
   protocol->Receive (p, ip.GetSource (), ip.GetDestination (), incomingInterface);
 }
 
--- a/src/internet-stack/ipv4-l3-protocol.h	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/ipv4-l3-protocol.h	Wed Sep 03 10:42:18 2008 -0700
@@ -40,6 +40,7 @@
 class Ipv4Header;
 class Ipv4Route;
 class Node;
+class Ipv4L4Protocol;
 
 
 /**
@@ -60,6 +61,35 @@
   void SetNode (Ptr<Node> node);
 
   /**
+   * \param protocol a template for the protocol to add to this L4 Demux.
+   * \returns the L4Protocol effectively added.
+   *
+   * Invoke Copy on the input template to get a copy of the input
+   * protocol which can be used on the Node on which this L4 Demux 
+   * is running. The new L4Protocol is registered internally as
+   * a working L4 Protocol and returned from this method.
+   * The caller does not get ownership of the returned pointer.
+   */
+  void Insert(Ptr<Ipv4L4Protocol> protocol);
+  /**
+   * \param protocolNumber number of protocol to lookup
+   *        in this L4 Demux
+   * \returns a matching L4 Protocol
+   *
+   * This method is typically called by lower layers
+   * to forward packets up the stack to the right protocol.
+   * It is also called from NodeImpl::GetUdp for example.
+   */
+  Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
+  /**
+   * \param protocol protocol to remove from this demux.
+   *
+   * The input value to this method should be the value
+   * returned from the Ipv4L4Protocol::Insert method.
+   */
+  void Remove (Ptr<Ipv4L4Protocol> protocol);
+
+  /**
    * \param ttl default ttl to use
    *
    * When we need to send an ipv4 packet, we use this default
@@ -187,12 +217,16 @@
   void ForwardUp (Ptr<Packet> p, Ipv4Header const&ip, Ptr<Ipv4Interface> incomingInterface);
   uint32_t AddIpv4Interface (Ptr<Ipv4Interface> interface);
   void SetupLoopback (void);
+  Ipv4L3Protocol(const Ipv4L3Protocol &);
+  Ipv4L3Protocol &operator = (const Ipv4L3Protocol &);
 
   typedef std::list<Ptr<Ipv4Interface> > Ipv4InterfaceList;
   typedef std::list<std::pair<Ipv4Address, Ipv4Address> > 
     Ipv4MulticastGroupList;
   typedef std::list< std::pair< int, Ptr<Ipv4RoutingProtocol> > > Ipv4RoutingProtocolList;
 
+  typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t;
+  L4List_t m_protocols;
   Ipv4InterfaceList m_interfaces;
   uint32_t m_nInterfaces;
   uint8_t m_defaultTtl;
--- a/src/internet-stack/ipv4-l4-demux.cc	Wed Sep 03 10:37:22 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
-//
-// Copyright (c) 2006 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: George F. Riley<riley@ece.gatech.edu>
-//
-
-// Define the layer 4 demultiplexer object for ns3.
-// George F. Riley, Georgia Tech, Fall 2006
-
-#include <sstream>
-#include "ns3/node.h"
-#include "ns3/object-vector.h"
-#include "ipv4-l4-demux.h"
-#include "ipv4-l4-protocol.h"
-
-namespace ns3 {
-
-NS_OBJECT_ENSURE_REGISTERED (Ipv4L4Demux);
-
-TypeId 
-Ipv4L4Demux::GetTypeId (void)
-{
-  static TypeId tid = TypeId ("ns3::Ipv4L4Demux")
-    .SetParent<Object> ()
-    .AddAttribute ("Protocols", "The set of protocols registered with this demux.",
-                   ObjectVectorValue (),
-                   MakeObjectVectorAccessor (&Ipv4L4Demux::m_protocols),
-                   MakeObjectVectorChecker<Ipv4L4Protocol> ())
-    ;
-  return tid;
-}
-
-Ipv4L4Demux::Ipv4L4Demux ()
-{}
-
-Ipv4L4Demux::~Ipv4L4Demux()
-{}
-
-void 
-Ipv4L4Demux::SetNode (Ptr<Node> node)
-{
-  m_node = node;
-}
-
-void
-Ipv4L4Demux::DoDispose (void)
-{
-  for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
-    {
-      (*i)->Dispose ();
-      *i = 0;
-    }
-  m_protocols.clear ();
-  m_node = 0;
-  Object::DoDispose ();
-}
-
-void
-Ipv4L4Demux::Insert(Ptr<Ipv4L4Protocol> protocol)
-{
-  m_protocols.push_back (protocol);
-}
-Ptr<Ipv4L4Protocol>
-Ipv4L4Demux::GetProtocol(int protocolNumber)
-{
-  for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
-    {
-      if ((*i)->GetProtocolNumber () == protocolNumber)
-	{
-	  return *i;
-	}
-    }
-  return 0;
-}
-void
-Ipv4L4Demux::Remove (Ptr<Ipv4L4Protocol> protocol)
-{
-  m_protocols.remove (protocol);
-}
-
-
-
-}//namespace ns3
--- a/src/internet-stack/ipv4-l4-demux.h	Wed Sep 03 10:37:22 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
-//
-// Copyright (c) 2006 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: George F. Riley<riley@ece.gatech.edu>
-//
-
-// Define the layer 4 demultiplexer object for ns3.
-// George F. Riley, Georgia Tech, Fall 2006
-
-#ifndef IPV4_L4_DEMUX_H
-#define IPV4_L4_DEMUX_H
-
-#include <list>
-#include "ns3/object.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-
-class Ipv4L4Protocol;
-class Node;
-
-/**
- * \brief L4 Ipv4 Demux
- * 
- * This class demultiplexes IP datagrams to the correct layer four protocol
- * object.  This demux sits between IP and layer 4.
- */
-class Ipv4L4Demux : public Object
-{
-public:
-  static TypeId GetTypeId (void);
-  Ipv4L4Demux ();
-  virtual ~Ipv4L4Demux();
-
-  void SetNode (Ptr<Node> node);
-
-  /**
-   * \param protocol a template for the protocol to add to this L4 Demux.
-   * \returns the L4Protocol effectively added.
-   *
-   * Invoke Copy on the input template to get a copy of the input
-   * protocol which can be used on the Node on which this L4 Demux 
-   * is running. The new L4Protocol is registered internally as
-   * a working L4 Protocol and returned from this method.
-   * The caller does not get ownership of the returned pointer.
-   */
-  void Insert(Ptr<Ipv4L4Protocol> protocol);
-  /**
-   * \param protocolNumber number of protocol to lookup
-   *        in this L4 Demux
-   * \returns a matching L4 Protocol
-   *
-   * This method is typically called by lower layers
-   * to forward packets up the stack to the right protocol.
-   * It is also called from NodeImpl::GetUdp for example.
-   */
-  Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
-  /**
-   * \param protocol protocol to remove from this demux.
-   *
-   * The input value to this method should be the value
-   * returned from the Ipv4L4Protocol::Insert method.
-   */
-  void Remove (Ptr<Ipv4L4Protocol> protocol);
-protected:
-  virtual void DoDispose (void);
-private:
-  typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t;
-  L4List_t m_protocols;
-  Ptr<Node> m_node;
-};
-
-} //namespace ns3
-#endif
--- a/src/internet-stack/ipv4-l4-protocol.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/ipv4-l4-protocol.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -37,10 +37,6 @@
                    UintegerValue (0),
                    MakeUintegerAccessor (&Ipv4L4Protocol::GetProtocolNumber),
                    MakeUintegerChecker<int> ())
-    .AddAttribute ("Version", "The version of the protocol.",
-                   UintegerValue (0),
-                   MakeUintegerAccessor (&Ipv4L4Protocol::GetVersion),
-                   MakeUintegerChecker<int> ())
     ;
   return tid;
 }
--- a/src/internet-stack/ipv4-l4-protocol.h	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/ipv4-l4-protocol.h	Wed Sep 03 10:42:18 2008 -0700
@@ -49,10 +49,6 @@
    * \returns the protocol number of this protocol.
    */
   virtual int GetProtocolNumber (void) const = 0;
-  /**
-   * \returns the version number of this protocol.
-   */
-  virtual int GetVersion (void) const = 0;
 
   /**
    * \param p packet to forward up
--- a/src/internet-stack/nsc-tcp-socket-impl.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/nsc-tcp-socket-impl.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -22,7 +22,6 @@
 #include "ns3/log.h"
 #include "ns3/ipv4.h"
 #include "ipv4-end-point.h"
-#include "ipv4-l4-demux.h"
 #include "nsc-tcp-l4-protocol.h"
 #include "nsc-tcp-socket-impl.h"
 #include "ns3/simulation-singleton.h"
--- a/src/internet-stack/tcp-l4-protocol.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/tcp-l4-protocol.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -361,11 +361,6 @@
 {
   return PROT_NUMBER;
 }
-int 
-TcpL4Protocol::GetVersion (void) const
-{
-  return 2;
-}
 
 void
 TcpL4Protocol::DoDispose (void)
--- a/src/internet-stack/tcp-l4-protocol.h	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/tcp-l4-protocol.h	Wed Sep 03 10:42:18 2008 -0700
@@ -62,7 +62,6 @@
   void SetNode (Ptr<Node> node);
 
   virtual int GetProtocolNumber (void) const;
-  virtual int GetVersion (void) const;
 
   /**
    * \return A smart Socket pointer to a TcpSocketImpl, allocated by this instance
--- a/src/internet-stack/tcp-socket-impl.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/tcp-socket-impl.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -26,7 +26,6 @@
 #include "tcp-socket-impl.h"
 #include "tcp-l4-protocol.h"
 #include "ipv4-end-point.h"
-#include "ipv4-l4-demux.h"
 #include "ns3/simulation-singleton.h"
 #include "tcp-typedefs.h"
 #include "ns3/simulator.h"
--- a/src/internet-stack/udp-l4-protocol.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/udp-l4-protocol.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -77,11 +77,6 @@
 {
   return PROT_NUMBER;
 }
-int 
-UdpL4Protocol::GetVersion (void) const
-{
-  return 2;
-}
 
 
 void
--- a/src/internet-stack/udp-l4-protocol.h	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/udp-l4-protocol.h	Wed Sep 03 10:42:18 2008 -0700
@@ -47,7 +47,6 @@
   void SetNode (Ptr<Node> node);
 
   virtual int GetProtocolNumber (void) const;
-  virtual int GetVersion (void) const;
 
   /**
    * \return A smart Socket pointer to a UdpSocket, allocated by this instance
--- a/src/internet-stack/udp-socket-impl.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/udp-socket-impl.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -30,7 +30,6 @@
 #include "udp-socket-impl.h"
 #include "udp-l4-protocol.h"
 #include "ipv4-end-point.h"
-#include "ipv4-l4-demux.h"
 
 NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl");
 
--- a/src/internet-stack/wscript	Wed Sep 03 10:37:22 2008 -0700
+++ b/src/internet-stack/wscript	Wed Sep 03 10:42:18 2008 -0700
@@ -62,7 +62,6 @@
     obj = bld.create_ns3_module('internet-stack', ['node'])
     obj.source = [
         'internet-stack.cc',
-        'ipv4-l4-demux.cc',
         'ipv4-l4-protocol.cc',
         'udp-header.cc',
         'tcp-header.cc',
--- a/utils/print-introspected-doxygen.cc	Wed Sep 03 10:37:22 2008 -0700
+++ b/utils/print-introspected-doxygen.cc	Wed Sep 03 10:42:18 2008 -0700
@@ -241,7 +241,6 @@
   info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
   info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::Agent");
   info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel");
-  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L4Demux");
   info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol");
   info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol");