merge with HEAD
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 24 Nov 2008 06:36:05 +0100
changeset 3914 18ac5bec5c49
parent 3913 a9162f5e5e2e (current diff)
parent 3877 5091e3a14b26 (diff)
child 3915 c798f3d5cb2e
merge with HEAD
bindings/python/callbacks_list.py
bindings/python/ns3_module_contrib.py
bindings/python/ns3_module_core.py
bindings/python/ns3_module_helper.py
bindings/python/ns3_module_wifi.py
src/core/type-id.cc
src/devices/wifi/wifi-net-device.cc
src/devices/wifi/wifi-net-device.h
src/helper/packet-socket-helper.cc
src/helper/wifi-helper.cc
src/helper/wifi-helper.h
src/helper/wscript
src/routing/olsr/routing-table.cc
src/routing/olsr/routing-table.h
--- a/AUTHORS	Tue Nov 04 14:56:32 2008 +0100
+++ b/AUTHORS	Mon Nov 24 06:36:05 2008 +0100
@@ -9,4 +9,8 @@
 George F. Riley (riley@ece.gatech.edu)
 Guillaume Vu-Brugier (gvubrugier@gmail.com)
 Florian Westphal (fw@strlen.de)
+Sebastien Vincent (vincent@lsiit.u-strasbg.fr)
+David Gross (gdavid.devel@gmail.com)
+Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
+Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
 
--- a/CHANGES.html	Tue Nov 04 14:56:32 2008 +0100
+++ b/CHANGES.html	Mon Nov 24 06:36:05 2008 +0100
@@ -44,6 +44,69 @@
 us a note on ns-developers mailing list.  </p>
 
 <hr>
+<h1>changes from ns-3.2 to ns-3.3</h1>
+
+<h2>new API:</h2>
+<ul>
+
+<li>17-11-2008; changeset 
+<a href="http://code.nsnam.org/ns-3-dev/rev/4c1c3f6bcd03">4c1c3f6bcd03</a></li>
+<ul>
+<li>
+The PppHeader previously defined in the point-to-point-net-device code has been 
+made public.
+</li>
+</ul>
+
+<li>17-11-2008; changeset 
+<a href="http://code.nsnam.org/ns-3-dev/rev/16c2970a0344">16c2970a0344</a></li>
+<ul>
+<li>
+An emulated net device has been added as enabling technology for ns-3 emulation
+scenarios.  See src/devices/emu and examples/emu-udp-echo.cc for details.
+</li>
+</ul>
+
+</ul>
+<h2>new API in existing classes:</h2>
+<ul>
+
+<li>17-11-2008; changeset 
+<a href="http://code.nsnam.org/ns-3-dev/rev/4222173d1e6d">4222173d1e6d</a></li>
+<ul>
+<li>
+Added method InternetStackHelper::EnableAsciiChange to allow allow a user to 
+hook ascii trace to the drop trace events in Ipv4L3Protocol and ArpL3Protocol.
+</li>
+</ul>
+
+</ul>
+<h2>changes to existing API:</h2>
+<ul>
+
+<li>17-11-2008; changeset 
+<a href="http://code.nsnam.org/ns-3-dev/rev/dacfd1f07538">dacfd1f07538</a></li>
+<ul>
+<li>
+Change attribute "RxErrorModel" to "ReceiveErrorModel" in CsmaNetDevice for 
+consistency between devices.
+</li>
+</ul>
+
+</ul>
+<h2>changed behavior:</h2>
+<ul>
+
+<li>17-11-2008; changeset 
+<a href="http://code.nsnam.org/ns-3-dev/rev/ed0dfce40459">ed0dfce40459</a></li>
+<ul>
+<li>
+Relax reasonableness testing in Ipv4AddressHelper::SetBase to allow the 
+assignment of /32 addresses.
+</li>
+</ul>
+
+<hr>
 <h1>changes from ns-3.1 to ns-3.2</h1>
 
 <h2>new API:</h2>
@@ -171,7 +234,6 @@
 </li>
 </ul>
 
-
 <li>03-07-2008; changeset 
 <a href="http://code.nsnam.org/ns-3-dev/rev/d5f8e5fae1c6">d5f8e5fae1c6</a></li>
 <ul>
--- a/bindings/python/callbacks_list.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/callbacks_list.py	Mon Nov 24 06:36:05 2008 +0100
@@ -1,10 +1,10 @@
 callback_classes = [
     ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+    ['void', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
     ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
     ['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
     ['void', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
     ['bool', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
-    ['void', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
     ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType'],
     ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty'],
     ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType'],
--- a/bindings/python/ns3_module_bridge.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_bridge.py	Mon Nov 24 06:36:05 2008 +0100
@@ -8,10 +8,10 @@
     ## bridge-net-device.h: ns3::BridgeNetDevice [class]
     module.add_class('BridgeNetDevice', parent=root_module['ns3::NetDevice'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +20,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -32,7 +32,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -40,7 +40,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -158,14 +158,9 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
-    ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast() const [member function]
+    ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
-                   is_const=True, is_virtual=True)
-    ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
-                   'ns3::Address', 
                    [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_const=True, is_virtual=True)
     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsPointToPoint() const [member function]
@@ -213,6 +208,11 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
+    ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
     ## bridge-net-device.h: void ns3::BridgeNetDevice::DoDispose() [member function]
     cls.add_method('DoDispose', 
                    'void', 
@@ -247,21 +247,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_common.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_common.py	Mon Nov 24 06:36:05 2008 +0100
@@ -54,10 +54,10 @@
     ## error-model.h: ns3::RateErrorModel [class]
     module.add_class('RateErrorModel', parent=root_module['ns3::ErrorModel'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -66,10 +66,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -78,7 +78,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -86,7 +86,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -1118,21 +1118,21 @@
     module.add_function('MakeDataRateChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_contrib.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_contrib.py	Mon Nov 24 06:36:05 2008 +0100
@@ -22,10 +22,10 @@
     ## flow-id-tag.h: ns3::FlowIdTag [class]
     module.add_class('FlowIdTag', parent=root_module['ns3::Tag'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -34,10 +34,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -46,7 +46,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -54,7 +54,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -240,21 +240,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_core.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_core.py	Mon Nov 24 06:36:05 2008 +0100
@@ -166,10 +166,10 @@
     ## traced-value.h: ns3::TracedValue<unsigned int> [class]
     root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::EnumValue'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -178,10 +178,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -190,14 +190,6 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
-    root_module = module.get_root()
-    
-
-def register_types_ns3_TimeStepPrecision(module):
-    root_module = module.get_root()
-    
-
 def register_types_ns3_Config(module):
     root_module = module.get_root()
     
@@ -205,6 +197,14 @@
     module.add_class('MatchContainer')
     module.add_container('std::vector< ns3::Ptr< ns3::Object > >', 'ns3::Ptr< ns3::Object >', container_type='vector')
 
+def register_types_ns3_TimeStepPrecision(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_internal(module):
+    root_module = module.get_root()
+    
+
 def register_types_ns3_olsr(module):
     root_module = module.get_root()
     
@@ -828,12 +828,12 @@
     cls.add_binary_comparison_operator('<')
     cls.add_output_stream_operator()
     cls.add_binary_comparison_operator('==')
-    ## type-id.h: ns3::TypeId::TypeId(ns3::TypeId const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::TypeId const &', 'arg0')])
     ## type-id.h: ns3::TypeId::TypeId(char const * name) [constructor]
     cls.add_constructor([param('char const *', 'name')])
     ## type-id.h: ns3::TypeId::TypeId() [constructor]
     cls.add_constructor([])
+    ## type-id.h: ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor]
+    cls.add_constructor([param('ns3::TypeId const &', 'o')])
     ## type-id.h: ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
     cls.add_method('AddAttribute', 
                    'ns3::TypeId', 
@@ -1986,10 +1986,64 @@
 
 def register_functions(root_module):
     module = root_module
+    ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
+    module.add_function('BreakpointFallback', 
+                        'void', 
+                        [])
+    ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
+    module.add_function('Create', 
+                        'ns3::Ptr< ns3::ObjectVectorValue >', 
+                        [], 
+                        template_parameters=['ns3::ObjectVectorValue'])
+    ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
+    module.add_function('Create', 
+                        'ns3::Ptr< ns3::PointerValue >', 
+                        [], 
+                        template_parameters=['ns3::PointerValue'])
+    ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
+    module.add_function('LogComponentDisable', 
+                        'void', 
+                        [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
+    ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
+    module.add_function('LogComponentDisableAll', 
+                        'void', 
+                        [param('ns3::LogLevel', 'level')])
+    ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
+    module.add_function('LogComponentEnable', 
+                        'void', 
+                        [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
+    ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
+    module.add_function('LogComponentEnableAll', 
+                        'void', 
+                        [param('ns3::LogLevel', 'level')])
     ## boolean.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeBooleanChecker() [free function]
     module.add_function('MakeBooleanChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
+    ## callback.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeCallbackChecker() [free function]
+    module.add_function('MakeCallbackChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
+    module.add_function('MakeEnumChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
+    ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
+    module.add_function('MakeObjectFactoryChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
+    module.add_function('MakeRandomVariableChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
+    module.add_function('MakeStringChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
+    module.add_function('MakeTypeIdChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
     module.add_function('TypeNameGet', 
                         'std::string', 
@@ -2040,143 +2094,89 @@
                         'std::string', 
                         [], 
                         template_parameters=['unsigned char'])
-    ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
-    module.add_function('LogComponentDisable', 
-                        'void', 
-                        [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
-    ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
-    module.add_function('MakeStringChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
-    module.add_function('Create', 
-                        'ns3::Ptr< ns3::PointerValue >', 
-                        [], 
-                        template_parameters=['ns3::PointerValue'])
-    ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
-    module.add_function('Create', 
-                        'ns3::Ptr< ns3::ObjectVectorValue >', 
-                        [], 
-                        template_parameters=['ns3::ObjectVectorValue'])
-    ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
-    module.add_function('LogComponentEnableAll', 
-                        'void', 
-                        [param('ns3::LogLevel', 'level')])
-    ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
-    module.add_function('MakeTypeIdChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
-    module.add_function('MakeObjectFactoryChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
-    module.add_function('LogComponentDisableAll', 
-                        'void', 
-                        [param('ns3::LogLevel', 'level')])
-    ## callback.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeCallbackChecker() [free function]
-    module.add_function('MakeCallbackChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
-    module.add_function('BreakpointFallback', 
-                        'void', 
-                        [])
-    ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
-    module.add_function('MakeRandomVariableChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
-    module.add_function('LogComponentEnable', 
-                        'void', 
-                        [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
-    ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
-    module.add_function('MakeEnumChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
-    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
-def register_functions_ns3_internal(module, root_module):
-    ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
-    module.add_function('MakeUintegerChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
-    ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
-    module.add_function('MakeIntegerChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
-    ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
-    module.add_function('MakeDoubleChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
-    return
-
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
 def register_functions_ns3_Config(module, root_module):
-    ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
-    module.add_function('SetDefaultFailSafe', 
-                        'bool', 
-                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+    ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
+    module.add_function('Connect', 
+                        'void', 
+                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
+    ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
+    module.add_function('ConnectWithoutContext', 
+                        'void', 
+                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
+    ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
+    module.add_function('Disconnect', 
+                        'void', 
+                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
     ## config.h: extern void ns3::Config::DisconnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
     module.add_function('DisconnectWithoutContext', 
                         'void', 
                         [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
-    ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
-    module.add_function('SetDefault', 
-                        'void', 
-                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## config.h: extern ns3::Config::MatchContainer ns3::Config::LookupMatches(std::string path) [free function]
-    module.add_function('LookupMatches', 
-                        'ns3::Config::MatchContainer', 
-                        [param('std::string', 'path')])
-    ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
-    module.add_function('Connect', 
-                        'void', 
-                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
     ## config.h: extern ns3::Ptr<ns3::Object> ns3::Config::GetRootNamespaceObject(uint32_t i) [free function]
     module.add_function('GetRootNamespaceObject', 
                         'ns3::Ptr< ns3::Object >', 
                         [param('uint32_t', 'i')])
-    ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
-    module.add_function('ConnectWithoutContext', 
-                        'void', 
-                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
-    ## config.h: extern void ns3::Config::UnregisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
-    module.add_function('UnregisterRootNamespaceObject', 
+    ## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
+    module.add_function('GetRootNamespaceObjectN', 
+                        'uint32_t', 
+                        [])
+    ## config.h: extern ns3::Config::MatchContainer ns3::Config::LookupMatches(std::string path) [free function]
+    module.add_function('LookupMatches', 
+                        'ns3::Config::MatchContainer', 
+                        [param('std::string', 'path')])
+    ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
+    module.add_function('RegisterRootNamespaceObject', 
                         'void', 
                         [param('ns3::Ptr< ns3::Object >', 'obj')])
+    ## config.h: extern void ns3::Config::Set(std::string path, ns3::AttributeValue const & value) [free function]
+    module.add_function('Set', 
+                        'void', 
+                        [param('std::string', 'path'), param('ns3::AttributeValue const &', 'value')])
+    ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
+    module.add_function('SetDefault', 
+                        'void', 
+                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+    ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
+    module.add_function('SetDefaultFailSafe', 
+                        'bool', 
+                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+    ## config.h: extern void ns3::Config::SetGlobal(std::string name, ns3::AttributeValue const & value) [free function]
+    module.add_function('SetGlobal', 
+                        'void', 
+                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
     ## config.h: extern bool ns3::Config::SetGlobalFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
     module.add_function('SetGlobalFailSafe', 
                         'bool', 
                         [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
-    module.add_function('Disconnect', 
-                        'void', 
-                        [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
-    ## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
-    module.add_function('GetRootNamespaceObjectN', 
-                        'uint32_t', 
-                        [])
-    ## config.h: extern void ns3::Config::Set(std::string path, ns3::AttributeValue const & value) [free function]
-    module.add_function('Set', 
-                        'void', 
-                        [param('std::string', 'path'), param('ns3::AttributeValue const &', 'value')])
-    ## config.h: extern void ns3::Config::SetGlobal(std::string name, ns3::AttributeValue const & value) [free function]
-    module.add_function('SetGlobal', 
-                        'void', 
-                        [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
-    module.add_function('RegisterRootNamespaceObject', 
+    ## config.h: extern void ns3::Config::UnregisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
+    module.add_function('UnregisterRootNamespaceObject', 
                         'void', 
                         [param('ns3::Ptr< ns3::Object >', 'obj')])
     return
 
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
+def register_functions_ns3_internal(module, root_module):
+    ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
+    module.add_function('MakeDoubleChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
+    ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
+    module.add_function('MakeIntegerChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
+    ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
+    module.add_function('MakeUintegerChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
+    return
+
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_csma.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_csma.py	Mon Nov 24 06:36:05 2008 +0100
@@ -16,10 +16,10 @@
     ## csma-net-device.h: ns3::CsmaNetDevice::EncapsulationMode [enumeration]
     module.add_enum('EncapsulationMode', ['ILLEGAL', 'DIX', 'LLC'], outer_class=root_module['ns3::CsmaNetDevice'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -28,10 +28,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -40,7 +40,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -48,7 +48,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -338,14 +338,9 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
-    ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetMulticast() const [member function]
+    ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
-                   is_const=True, is_virtual=True)
-    ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
-                   'ns3::Address', 
                    [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_const=True, is_virtual=True)
     ## csma-net-device.h: bool ns3::CsmaNetDevice::IsPointToPoint() const [member function]
@@ -383,6 +378,11 @@
                    'void', 
                    [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
                    is_virtual=True)
+    ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
     ## csma-net-device.h: void ns3::CsmaNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
     cls.add_method('SetPromiscReceiveCallback', 
                    'void', 
@@ -417,21 +417,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_emu.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,229 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass
+
+def register_types(module):
+    root_module = module.get_root()
+    
+    ## emu-net-device.h: ns3::EmuNetDevice [class]
+    module.add_class('EmuNetDevice', parent=root_module['ns3::NetDevice'])
+    
+    ## Register a nested module for the namespace Config
+    
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
+    
+    
+    ## Register a nested module for the namespace TimeStepPrecision
+    
+    nested_module = module.add_cpp_namespace('TimeStepPrecision')
+    register_types_ns3_TimeStepPrecision(nested_module)
+    
+    
+    ## Register a nested module for the namespace internal
+    
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
+    
+    
+    ## Register a nested module for the namespace olsr
+    
+    nested_module = module.add_cpp_namespace('olsr')
+    register_types_ns3_olsr(nested_module)
+    
+
+def register_types_ns3_Config(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_TimeStepPrecision(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_internal(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_olsr(module):
+    root_module = module.get_root()
+    
+
+def register_methods(root_module):
+    register_Ns3EmuNetDevice_methods(root_module, root_module['ns3::EmuNetDevice'])
+    return
+
+def register_Ns3EmuNetDevice_methods(root_module, cls):
+    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice(ns3::EmuNetDevice const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::EmuNetDevice const &', 'arg0')])
+    ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice() [constructor]
+    cls.add_constructor([])
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function]
+    cls.add_method('SetDataRate', 
+                   'void', 
+                   [param('ns3::DataRate', 'bps')])
+    ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function]
+    cls.add_method('Start', 
+                   'void', 
+                   [param('ns3::Time', 'tStart')])
+    ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function]
+    cls.add_method('Stop', 
+                   'void', 
+                   [param('ns3::Time', 'tStop')])
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Queue >', 'queue')])
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Mac48Address addr) [member function]
+    cls.add_method('SetAddress', 
+                   'void', 
+                   [param('ns3::Mac48Address', 'addr')])
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetName(std::string const name) [member function]
+    cls.add_method('SetName', 
+                   'void', 
+                   [param('std::string const', 'name')], 
+                   is_virtual=True)
+    ## emu-net-device.h: std::string ns3::EmuNetDevice::GetName() const [member function]
+    cls.add_method('GetName', 
+                   'std::string', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function]
+    cls.add_method('SetIfIndex', 
+                   'void', 
+                   [param('uint32_t const', 'index')], 
+                   is_virtual=True)
+    ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function]
+    cls.add_method('GetIfIndex', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: ns3::Ptr<ns3::Channel> ns3::EmuNetDevice::GetChannel() const [member function]
+    cls.add_method('GetChannel', 
+                   'ns3::Ptr< ns3::Channel >', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function]
+    cls.add_method('GetAddress', 
+                   'ns3::Address', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function]
+    cls.add_method('SetMtu', 
+                   'bool', 
+                   [param('uint16_t const', 'mtu')], 
+                   is_virtual=True)
+    ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function]
+    cls.add_method('GetMtu', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function]
+    cls.add_method('IsLinkUp', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
+    cls.add_method('SetLinkChangeCallback', 
+                   'void', 
+                   [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
+                   is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function]
+    cls.add_method('IsBroadcast', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetBroadcast() const [member function]
+    cls.add_method('GetBroadcast', 
+                   'ns3::Address', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function]
+    cls.add_method('IsMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv4Address', 'multicastGroup')], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::IsPointToPoint() const [member function]
+    cls.add_method('IsPointToPoint', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+    cls.add_method('Send', 
+                   'bool', 
+                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
+                   is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+    cls.add_method('SendFrom', 
+                   'bool', 
+                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
+                   is_virtual=True)
+    ## emu-net-device.h: ns3::Ptr<ns3::Node> ns3::EmuNetDevice::GetNode() const [member function]
+    cls.add_method('GetNode', 
+                   'ns3::Ptr< ns3::Node >', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
+    cls.add_method('SetNode', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function]
+    cls.add_method('NeedsArp', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
+    cls.add_method('SetReceiveCallback', 
+                   'void', 
+                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
+                   is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
+    cls.add_method('SetPromiscReceiveCallback', 
+                   'void', 
+                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType >', 'cb')], 
+                   is_virtual=True)
+    ## emu-net-device.h: bool ns3::EmuNetDevice::SupportsSendFrom() const [member function]
+    cls.add_method('SupportsSendFrom', 
+                   'bool', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## emu-net-device.h: void ns3::EmuNetDevice::DoDispose() [member function]
+    cls.add_method('DoDispose', 
+                   'void', 
+                   [], 
+                   visibility='private', is_virtual=True)
+    return
+
+def register_functions(root_module):
+    module = root_module
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+    return
+
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
+def register_functions_ns3_internal(module, root_module):
+    return
+
+def register_functions_ns3_olsr(module, root_module):
+    return
+
--- a/bindings/python/ns3_module_global_routing.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_global_routing.py	Mon Nov 24 06:36:05 2008 +0100
@@ -18,10 +18,10 @@
     ## global-router-interface.h: ns3::GlobalRouter [class]
     module.add_class('GlobalRouter', is_singleton=True, parent=root_module['ns3::Object'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -30,10 +30,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -42,7 +42,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -50,7 +50,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -260,21 +260,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_helper.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_helper.py	Mon Nov 24 06:36:05 2008 +0100
@@ -9,6 +9,8 @@
     module.add_class('BridgeHelper', allow_subclassing=False)
     ## csma-helper.h: ns3::CsmaHelper [class]
     module.add_class('CsmaHelper', allow_subclassing=False)
+    ## emu-helper.h: ns3::EmuHelper [class]
+    module.add_class('EmuHelper', allow_subclassing=False)
     ## internet-stack-helper.h: ns3::InternetStackHelper [class]
     module.add_class('InternetStackHelper', allow_subclassing=False)
     ## ipv4-address-helper.h: ns3::Ipv4AddressHelper [class]
@@ -39,6 +41,8 @@
     module.add_class('UdpEchoClientHelper', allow_subclassing=False)
     ## udp-echo-helper.h: ns3::UdpEchoServerHelper [class]
     module.add_class('UdpEchoServerHelper', allow_subclassing=False)
+    ## v4ping-helper.h: ns3::V4PingHelper [class]
+    module.add_class('V4PingHelper', allow_subclassing=False)
     ## wifi-helper.h: ns3::WifiHelper [class]
     module.add_class('WifiHelper', allow_subclassing=False)
     ## wifi-helper.h: ns3::WifiPhyHelper [class]
@@ -48,10 +52,10 @@
     ## yans-wifi-phy-helper.h: ns3::YansWifiPhyHelper [class]
     module.add_class('YansWifiPhyHelper', allow_subclassing=False, parent=root_module['ns3::WifiPhyHelper'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -60,10 +64,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -72,7 +76,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -80,7 +84,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -92,6 +96,7 @@
     register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
     register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
     register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
+    register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
     register_Ns3InternetStackHelper_methods(root_module, root_module['ns3::InternetStackHelper'])
     register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
     register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer'])
@@ -107,6 +112,7 @@
     register_Ns3StaticMulticastRouteHelper_methods(root_module, root_module['ns3::StaticMulticastRouteHelper'])
     register_Ns3UdpEchoClientHelper_methods(root_module, root_module['ns3::UdpEchoClientHelper'])
     register_Ns3UdpEchoServerHelper_methods(root_module, root_module['ns3::UdpEchoServerHelper'])
+    register_Ns3V4PingHelper_methods(root_module, root_module['ns3::V4PingHelper'])
     register_Ns3WifiHelper_methods(root_module, root_module['ns3::WifiHelper'])
     register_Ns3WifiPhyHelper_methods(root_module, root_module['ns3::WifiPhyHelper'])
     register_Ns3YansWifiChannelHelper_methods(root_module, root_module['ns3::YansWifiChannelHelper'])
@@ -118,6 +124,8 @@
     cls.add_constructor([param('ns3::ApplicationContainer const &', 'arg0')])
     ## application-container.h: ns3::ApplicationContainer::ApplicationContainer() [constructor]
     cls.add_constructor([])
+    ## application-container.h: ns3::ApplicationContainer::ApplicationContainer(ns3::Ptr<ns3::Application> application) [constructor]
+    cls.add_constructor([param('ns3::Ptr< ns3::Application >', 'application')])
     ## application-container.h: __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::Application>*,std::vector<ns3::Ptr<ns3::Application>, std::allocator<ns3::Ptr<ns3::Application> > > > ns3::ApplicationContainer::Begin() const [member function]
     cls.add_method('Begin', 
                    '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Application > const, std::vector< ns3::Ptr< ns3::Application > > >', 
@@ -238,33 +246,126 @@
                    'void', 
                    [param('std::ostream &', 'os')], 
                    is_static=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) [member function]
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
     cls.add_method('Install', 
                    'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c')])
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) [member function]
+                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) const [member function]
     cls.add_method('Install', 
                    'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')])
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
     ## csma-helper.h: void ns3::CsmaHelper::InstallStar(ns3::Ptr<ns3::Node> hub, ns3::NodeContainer spokes, ns3::NetDeviceContainer & hubDevices, ns3::NetDeviceContainer & spokeDevices) [member function]
     cls.add_method('InstallStar', 
                    'void', 
                    [param('ns3::Ptr< ns3::Node >', 'hub'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')])
     return
 
+def register_Ns3EmuHelper_methods(root_module, cls):
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper(ns3::EmuHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')])
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor]
+    cls.add_constructor([])
+    ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NodeContainer n) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnablePcapAll(std::string filename) [member function]
+    cls.add_method('EnablePcapAll', 
+                   'void', 
+                   [param('std::string', 'filename')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::NodeContainer const & c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    return
+
 def register_Ns3InternetStackHelper_methods(root_module, cls):
     ## internet-stack-helper.h: ns3::InternetStackHelper::InternetStackHelper(ns3::InternetStackHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::InternetStackHelper const &', 'arg0')])
     ## internet-stack-helper.h: ns3::InternetStackHelper::InternetStackHelper() [constructor]
     cls.add_constructor([])
-    ## internet-stack-helper.h: void ns3::InternetStackHelper::Install(ns3::NodeContainer c) [member function]
+    ## internet-stack-helper.h: void ns3::InternetStackHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
     cls.add_method('Install', 
                    'void', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## internet-stack-helper.h: void ns3::InternetStackHelper::Install(ns3::NodeContainer c) const [member function]
+    cls.add_method('Install', 
+                   'void', 
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
     ## internet-stack-helper.h: void ns3::InternetStackHelper::SetNscStack(std::string soname) [member function]
     cls.add_method('SetNscStack', 
                    'void', 
                    [param('std::string', 'soname')])
+    ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
     ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnablePcapAll(std::string filename) [member function]
     cls.add_method('EnablePcapAll', 
                    'void', 
@@ -354,10 +455,16 @@
                    'std::string', 
                    [], 
                    is_const=True)
-    ## mobility-helper.h: void ns3::MobilityHelper::Install(ns3::NodeContainer container) [member function]
+    ## mobility-helper.h: void ns3::MobilityHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
     cls.add_method('Install', 
                    'void', 
-                   [param('ns3::NodeContainer', 'container')])
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## mobility-helper.h: void ns3::MobilityHelper::Install(ns3::NodeContainer container) const [member function]
+    cls.add_method('Install', 
+                   'void', 
+                   [param('ns3::NodeContainer', 'container')], 
+                   is_const=True)
     ## mobility-helper.h: void ns3::MobilityHelper::InstallAll() [member function]
     cls.add_method('InstallAll', 
                    'void', 
@@ -514,10 +621,16 @@
     cls.add_method('SetAttribute', 
                    'void', 
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## on-off-helper.h: ns3::ApplicationContainer ns3::OnOffHelper::Install(ns3::NodeContainer c) [member function]
+    ## on-off-helper.h: ns3::ApplicationContainer ns3::OnOffHelper::Install(ns3::NodeContainer c) const [member function]
     cls.add_method('Install', 
                    'ns3::ApplicationContainer', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
+    ## on-off-helper.h: ns3::ApplicationContainer ns3::OnOffHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
     return
 
 def register_Ns3PacketSinkHelper_methods(root_module, cls):
@@ -529,10 +642,16 @@
     cls.add_method('SetAttribute', 
                    'void', 
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## packet-sink-helper.h: ns3::ApplicationContainer ns3::PacketSinkHelper::Install(ns3::NodeContainer c) [member function]
+    ## packet-sink-helper.h: ns3::ApplicationContainer ns3::PacketSinkHelper::Install(ns3::NodeContainer c) const [member function]
     cls.add_method('Install', 
                    'ns3::ApplicationContainer', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
+    ## packet-sink-helper.h: ns3::ApplicationContainer ns3::PacketSinkHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
     return
 
 def register_Ns3PacketSocketHelper_methods(root_module, cls):
@@ -540,10 +659,16 @@
     cls.add_constructor([param('ns3::PacketSocketHelper const &', 'arg0')])
     ## packet-socket-helper.h: ns3::PacketSocketHelper::PacketSocketHelper() [constructor]
     cls.add_constructor([])
-    ## packet-socket-helper.h: void ns3::PacketSocketHelper::Install(ns3::NodeContainer c) [member function]
+    ## packet-socket-helper.h: void ns3::PacketSocketHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
     cls.add_method('Install', 
                    'void', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## packet-socket-helper.h: void ns3::PacketSocketHelper::Install(ns3::NodeContainer c) const [member function]
+    cls.add_method('Install', 
+                   'void', 
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
     return
 
 def register_Ns3PointToPointHelper_methods(root_module, cls):
@@ -655,10 +780,16 @@
     cls.add_method('SetAttribute', 
                    'void', 
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::NodeContainer c) [member function]
+    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
     cls.add_method('Install', 
                    'ns3::ApplicationContainer', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::NodeContainer c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
     return
 
 def register_Ns3UdpEchoServerHelper_methods(root_module, cls):
@@ -670,10 +801,37 @@
     cls.add_method('SetAttribute', 
                    'void', 
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
-    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoServerHelper::Install(ns3::NodeContainer c) [member function]
+    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoServerHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoServerHelper::Install(ns3::NodeContainer c) const [member function]
     cls.add_method('Install', 
                    'ns3::ApplicationContainer', 
-                   [param('ns3::NodeContainer', 'c')])
+                   [param('ns3::NodeContainer', 'c')], 
+                   is_const=True)
+    return
+
+def register_Ns3V4PingHelper_methods(root_module, cls):
+    ## v4ping-helper.h: ns3::V4PingHelper::V4PingHelper(ns3::V4PingHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::V4PingHelper const &', 'arg0')])
+    ## v4ping-helper.h: ns3::V4PingHelper::V4PingHelper(ns3::Ipv4Address remote) [constructor]
+    cls.add_constructor([param('ns3::Ipv4Address', 'remote')])
+    ## v4ping-helper.h: void ns3::V4PingHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function]
+    cls.add_method('SetAttribute', 
+                   'void', 
+                   [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+    ## v4ping-helper.h: ns3::ApplicationContainer ns3::V4PingHelper::Install(ns3::NodeContainer nodes) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::NodeContainer', 'nodes')], 
+                   is_const=True)
+    ## v4ping-helper.h: ns3::ApplicationContainer ns3::V4PingHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::ApplicationContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
     return
 
 def register_Ns3WifiHelper_methods(root_module, cls):
@@ -809,21 +967,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_internet_stack.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_internet_stack.py	Mon Nov 24 06:36:05 2008 +0100
@@ -3,6 +3,20 @@
 def register_types(module):
     root_module = module.get_root()
     
+    ## icmpv4.h: ns3::Icmpv4DestinationUnreachable [class]
+    module.add_class('Icmpv4DestinationUnreachable', parent=root_module['ns3::Header'])
+    ## icmpv4.h: ns3::Icmpv4DestinationUnreachable [enumeration]
+    module.add_enum('', ['NET_UNREACHABLE', 'HOST_UNREACHABLE', 'PROTOCOL_UNREACHABLE', 'PORT_UNREACHABLE', 'FRAG_NEEDED', 'SOURCE_ROUTE_FAILED'], outer_class=root_module['ns3::Icmpv4DestinationUnreachable'])
+    ## icmpv4.h: ns3::Icmpv4Echo [class]
+    module.add_class('Icmpv4Echo', parent=root_module['ns3::Header'])
+    ## icmpv4.h: ns3::Icmpv4Header [class]
+    module.add_class('Icmpv4Header', parent=root_module['ns3::Header'])
+    ## icmpv4.h: ns3::Icmpv4Header [enumeration]
+    module.add_enum('', ['ECHO_REPLY', 'DEST_UNREACH', 'ECHO', 'TIME_EXCEEDED'], outer_class=root_module['ns3::Icmpv4Header'])
+    ## icmpv4.h: ns3::Icmpv4TimeExceeded [class]
+    module.add_class('Icmpv4TimeExceeded', parent=root_module['ns3::Header'])
+    ## icmpv4.h: ns3::Icmpv4TimeExceeded [enumeration]
+    module.add_enum('', ['TIME_TO_LIVE', 'FRAGMENT_REASSEMBLY'], outer_class=root_module['ns3::Icmpv4TimeExceeded'])
     ## tcp-header.h: ns3::TcpHeader [class]
     module.add_class('TcpHeader', parent=root_module['ns3::Header'])
     ## tcp-header.h: ns3::TcpHeader::Flags_t [enumeration]
@@ -16,10 +30,10 @@
     ## ipv4-static-routing.h: ns3::Ipv4StaticRouting [class]
     module.add_class('Ipv4StaticRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -28,10 +42,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -40,7 +54,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -48,7 +62,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -57,6 +71,10 @@
     
 
 def register_methods(root_module):
+    register_Ns3Icmpv4DestinationUnreachable_methods(root_module, root_module['ns3::Icmpv4DestinationUnreachable'])
+    register_Ns3Icmpv4Echo_methods(root_module, root_module['ns3::Icmpv4Echo'])
+    register_Ns3Icmpv4Header_methods(root_module, root_module['ns3::Icmpv4Header'])
+    register_Ns3Icmpv4TimeExceeded_methods(root_module, root_module['ns3::Icmpv4TimeExceeded'])
     register_Ns3TcpHeader_methods(root_module, root_module['ns3::TcpHeader'])
     register_Ns3UdpHeader_methods(root_module, root_module['ns3::UdpHeader'])
     register_Ns3Ipv4Interface_methods(root_module, root_module['ns3::Ipv4Interface'])
@@ -64,6 +82,248 @@
     register_Ns3Ipv4StaticRouting_methods(root_module, root_module['ns3::Ipv4StaticRouting'])
     return
 
+def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls):
+    ## icmpv4.h: ns3::Icmpv4DestinationUnreachable::Icmpv4DestinationUnreachable(ns3::Icmpv4DestinationUnreachable const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Icmpv4DestinationUnreachable const &', 'arg0')])
+    ## icmpv4.h: static ns3::TypeId ns3::Icmpv4DestinationUnreachable::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## icmpv4.h: ns3::Icmpv4DestinationUnreachable::Icmpv4DestinationUnreachable() [constructor]
+    cls.add_constructor([])
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetNextHopMtu(uint16_t mtu) [member function]
+    cls.add_method('SetNextHopMtu', 
+                   'void', 
+                   [param('uint16_t', 'mtu')])
+    ## icmpv4.h: uint16_t ns3::Icmpv4DestinationUnreachable::GetNextHopMtu() const [member function]
+    cls.add_method('GetNextHopMtu', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetData(ns3::Ptr<const ns3::Packet> data) [member function]
+    cls.add_method('SetData', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Packet const >', 'data')])
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetHeader(ns3::Ipv4Header header) [member function]
+    cls.add_method('SetHeader', 
+                   'void', 
+                   [param('ns3::Ipv4Header', 'header')])
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::GetData(uint8_t * payload) const [member function]
+    cls.add_method('GetData', 
+                   'void', 
+                   [param('uint8_t *', 'payload')], 
+                   is_const=True)
+    ## icmpv4.h: ns3::Ipv4Header ns3::Icmpv4DestinationUnreachable::GetHeader() const [member function]
+    cls.add_method('GetHeader', 
+                   'ns3::Ipv4Header', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: ns3::TypeId ns3::Icmpv4DestinationUnreachable::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, visibility='private', is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4DestinationUnreachable::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, visibility='private', is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, visibility='private', is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4DestinationUnreachable::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   visibility='private', is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, visibility='private', is_virtual=True)
+    return
+
+def register_Ns3Icmpv4Echo_methods(root_module, cls):
+    ## icmpv4.h: ns3::Icmpv4Echo::Icmpv4Echo(ns3::Icmpv4Echo const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Icmpv4Echo const &', 'arg0')])
+    ## icmpv4.h: void ns3::Icmpv4Echo::SetIdentifier(uint16_t id) [member function]
+    cls.add_method('SetIdentifier', 
+                   'void', 
+                   [param('uint16_t', 'id')])
+    ## icmpv4.h: void ns3::Icmpv4Echo::SetSequenceNumber(uint16_t seq) [member function]
+    cls.add_method('SetSequenceNumber', 
+                   'void', 
+                   [param('uint16_t', 'seq')])
+    ## icmpv4.h: void ns3::Icmpv4Echo::SetData(ns3::Ptr<const ns3::Packet> data) [member function]
+    cls.add_method('SetData', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Packet const >', 'data')])
+    ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetIdentifier() const [member function]
+    cls.add_method('GetIdentifier', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetSequenceNumber() const [member function]
+    cls.add_method('GetSequenceNumber', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: ns3::Ptr<const ns3::Packet> ns3::Icmpv4Echo::GetData() const [member function]
+    cls.add_method('GetData', 
+                   'ns3::Ptr< ns3::Packet const >', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Echo::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## icmpv4.h: ns3::Icmpv4Echo::Icmpv4Echo() [constructor]
+    cls.add_constructor([])
+    ## icmpv4.h: ns3::TypeId ns3::Icmpv4Echo::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4Echo::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4Echo::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4Echo::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    return
+
+def register_Ns3Icmpv4Header_methods(root_module, cls):
+    ## icmpv4.h: ns3::Icmpv4Header::Icmpv4Header(ns3::Icmpv4Header const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Icmpv4Header const &', 'arg0')])
+    ## icmpv4.h: void ns3::Icmpv4Header::EnableChecksum() [member function]
+    cls.add_method('EnableChecksum', 
+                   'void', 
+                   [])
+    ## icmpv4.h: void ns3::Icmpv4Header::SetType(uint8_t type) [member function]
+    cls.add_method('SetType', 
+                   'void', 
+                   [param('uint8_t', 'type')])
+    ## icmpv4.h: void ns3::Icmpv4Header::SetCode(uint8_t code) [member function]
+    cls.add_method('SetCode', 
+                   'void', 
+                   [param('uint8_t', 'code')])
+    ## icmpv4.h: uint8_t ns3::Icmpv4Header::GetType() const [member function]
+    cls.add_method('GetType', 
+                   'uint8_t', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: uint8_t ns3::Icmpv4Header::GetCode() const [member function]
+    cls.add_method('GetCode', 
+                   'uint8_t', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Header::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## icmpv4.h: ns3::Icmpv4Header::Icmpv4Header() [constructor]
+    cls.add_constructor([])
+    ## icmpv4.h: ns3::TypeId ns3::Icmpv4Header::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4Header::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4Header::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4Header::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4Header::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    return
+
+def register_Ns3Icmpv4TimeExceeded_methods(root_module, cls):
+    ## icmpv4.h: ns3::Icmpv4TimeExceeded::Icmpv4TimeExceeded(ns3::Icmpv4TimeExceeded const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Icmpv4TimeExceeded const &', 'arg0')])
+    ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetData(ns3::Ptr<const ns3::Packet> data) [member function]
+    cls.add_method('SetData', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Packet const >', 'data')])
+    ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetHeader(ns3::Ipv4Header header) [member function]
+    cls.add_method('SetHeader', 
+                   'void', 
+                   [param('ns3::Ipv4Header', 'header')])
+    ## icmpv4.h: void ns3::Icmpv4TimeExceeded::GetData(uint8_t * payload) const [member function]
+    cls.add_method('GetData', 
+                   'void', 
+                   [param('uint8_t *', 'payload')], 
+                   is_const=True)
+    ## icmpv4.h: ns3::Ipv4Header ns3::Icmpv4TimeExceeded::GetHeader() const [member function]
+    cls.add_method('GetHeader', 
+                   'ns3::Ipv4Header', 
+                   [], 
+                   is_const=True)
+    ## icmpv4.h: static ns3::TypeId ns3::Icmpv4TimeExceeded::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## icmpv4.h: ns3::Icmpv4TimeExceeded::Icmpv4TimeExceeded() [constructor]
+    cls.add_constructor([])
+    ## icmpv4.h: ns3::TypeId ns3::Icmpv4TimeExceeded::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4TimeExceeded::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4TimeExceeded::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, is_virtual=True)
+    ## icmpv4.h: uint32_t ns3::Icmpv4TimeExceeded::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_virtual=True)
+    ## icmpv4.h: void ns3::Icmpv4TimeExceeded::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    return
+
 def register_Ns3TcpHeader_methods(root_module, cls):
     ## tcp-header.h: ns3::TcpHeader::TcpHeader(ns3::TcpHeader const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::TcpHeader const &', 'arg0')])
@@ -354,6 +614,14 @@
     cls.add_method('SetNode', 
                    'void', 
                    [param('ns3::Ptr< ns3::Node >', 'node')])
+    ## ipv4-l3-protocol.h: ns3::Ptr<ns3::Socket> ns3::Ipv4L3Protocol::CreateRawSocket() [member function]
+    cls.add_method('CreateRawSocket', 
+                   'ns3::Ptr< ns3::Socket >', 
+                   [])
+    ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::DeleteRawSocket(ns3::Ptr<ns3::Socket> socket) [member function]
+    cls.add_method('DeleteRawSocket', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Socket >', 'socket')])
     ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Insert(ns3::Ptr<ns3::Ipv4L4Protocol> protocol) [member function]
     cls.add_method('Insert', 
                    'void', 
@@ -642,21 +910,21 @@
     module.add_function('AddNscInternetStack', 
                         'void', 
                         [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string const &', 'soname')])
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_mobility.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_mobility.py	Mon Nov 24 06:36:05 2008 +0100
@@ -48,10 +48,10 @@
     ## hierarchical-mobility-model.h: ns3::HierarchicalMobilityModel [class]
     module.add_class('HierarchicalMobilityModel', parent=root_module['ns3::MobilityModel'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -60,10 +60,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -72,7 +72,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -80,7 +80,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -692,33 +692,33 @@
 
 def register_functions(root_module):
     module = root_module
-    ## rectangle.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRectangleChecker() [free function]
-    module.add_function('MakeRectangleChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
     ## vector.h: extern double ns3::CalculateDistance(ns3::Vector const & a, ns3::Vector const & b) [free function]
     module.add_function('CalculateDistance', 
                         'double', 
                         [param('ns3::Vector const &', 'a'), param('ns3::Vector const &', 'b')])
+    ## rectangle.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRectangleChecker() [free function]
+    module.add_function('MakeRectangleChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
     ## vector.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeVectorChecker() [free function]
     module.add_function('MakeVectorChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_node.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_node.py	Mon Nov 24 06:36:05 2008 +0100
@@ -9,6 +9,10 @@
     module.add_class('Address')
     ## address.h: ns3::Address::MaxSize_e [enumeration]
     module.add_enum('MaxSize_e', ['MAX_SIZE'], outer_class=root_module['ns3::Address'])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress [class]
+    module.add_class('Inet6SocketAddress')
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress [class]
+    root_module['ns3::Inet6SocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
     ## inet-socket-address.h: ns3::InetSocketAddress [class]
     module.add_class('InetSocketAddress')
     ## inet-socket-address.h: ns3::InetSocketAddress [class]
@@ -25,6 +29,12 @@
     module.add_class('Ipv4MulticastRoute')
     ## ipv4-route.h: ns3::Ipv4Route [class]
     module.add_class('Ipv4Route')
+    ## ipv6-address.h: ns3::Ipv6Address [class]
+    module.add_class('Ipv6Address')
+    ## ipv6-address.h: ns3::Ipv6Address [class]
+    root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address'])
+    ## ipv6-address.h: ns3::Ipv6Prefix [class]
+    module.add_class('Ipv6Prefix')
     ## mac48-address.h: ns3::Mac48Address [class]
     module.add_class('Mac48Address')
     ## mac48-address.h: ns3::Mac48Address [class]
@@ -49,6 +59,18 @@
     module.add_class('Ipv4MaskChecker', parent=root_module['ns3::AttributeChecker'])
     ## ipv4-address.h: ns3::Ipv4MaskValue [class]
     module.add_class('Ipv4MaskValue', parent=root_module['ns3::AttributeValue'])
+    ## ipv6-address.h: ns3::Ipv6AddressChecker [class]
+    module.add_class('Ipv6AddressChecker', parent=root_module['ns3::AttributeChecker'])
+    ## ipv6-address.h: ns3::Ipv6AddressValue [class]
+    module.add_class('Ipv6AddressValue', parent=root_module['ns3::AttributeValue'])
+    ## ipv6-header.h: ns3::Ipv6Header [class]
+    module.add_class('Ipv6Header', parent=root_module['ns3::Header'])
+    ## ipv6-header.h: ns3::Ipv6Header::NextHeader_e [enumeration]
+    module.add_enum('NextHeader_e', ['IPV6_EXT_HOP_BY_HOP', 'IPV6_IPV4', 'IPV6_TCP', 'IPV6_UDP', 'IPV6_IPV6', 'IPV6_EXT_ROUTING', 'IPV6_EXT_FRAGMENTATION', 'IPV6_EXT_CONFIDENTIALITY', 'IPV6_EXT_AUTHENTIFICATION', 'IPV6_ICMPV6', 'IPV6_EXT_END', 'IPV6_EXT_DESTINATION', 'IPV6_SCTP', 'IPV6_EXT_MOBILITY', 'IPV6_UDP_LITE'], outer_class=root_module['ns3::Ipv6Header'])
+    ## ipv6-address.h: ns3::Ipv6PrefixChecker [class]
+    module.add_class('Ipv6PrefixChecker', parent=root_module['ns3::AttributeChecker'])
+    ## ipv6-address.h: ns3::Ipv6PrefixValue [class]
+    module.add_class('Ipv6PrefixValue', parent=root_module['ns3::AttributeValue'])
     ## llc-snap-header.h: ns3::LlcSnapHeader [class]
     module.add_class('LlcSnapHeader', parent=root_module['ns3::Header'])
     ## mac48-address.h: ns3::Mac48AddressChecker [class]
@@ -67,6 +89,8 @@
     module.add_class('SocketFactory', parent=root_module['ns3::Object'])
     ## socket.h: ns3::SocketIpTtlTag [class]
     module.add_class('SocketIpTtlTag', parent=root_module['ns3::Tag'])
+    ## socket.h: ns3::SocketSetDontFragmentTag [class]
+    module.add_class('SocketSetDontFragmentTag', parent=root_module['ns3::Tag'])
     ## tcp-socket.h: ns3::TcpSocket [class]
     module.add_class('TcpSocket', parent=root_module['ns3::Socket'])
     ## tcp-socket-factory.h: ns3::TcpSocketFactory [class]
@@ -89,14 +113,18 @@
     module.add_class('EthernetHeader', parent=root_module['ns3::Header'])
     ## ethernet-trailer.h: ns3::EthernetTrailer [class]
     module.add_class('EthernetTrailer', parent=root_module['ns3::Trailer'])
+    ## icmp-socket.h: ns3::IcmpSocket [class]
+    module.add_class('IcmpSocket', parent=root_module['ns3::Socket'])
     ## ipv4.h: ns3::Ipv4 [class]
     module.add_class('Ipv4', parent=root_module['ns3::Object'])
+    ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory [class]
+    module.add_class('Ipv4RawSocketFactory', parent=root_module['ns3::SocketFactory'])
     ## ipv4.h: ns3::Ipv4RoutingProtocol [class]
     module.add_class('Ipv4RoutingProtocol', parent=root_module['ns3::Object'])
     ## net-device.h: ns3::NetDevice [class]
     module.add_class('NetDevice', parent=root_module['ns3::Object'])
     ## net-device.h: ns3::NetDevice::PacketType [enumeration]
-    module.add_enum('PacketType', ['PACKET_HOST', 'PACKET_BROADCAST', 'PACKET_MULTICAST', 'PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
+    module.add_enum('PacketType', ['PACKET_HOST', 'NS3_PACKET_HOST', 'PACKET_BROADCAST', 'NS3_PACKET_BROADCAST', 'PACKET_MULTICAST', 'NS3_PACKET_MULTICAST', 'PACKET_OTHERHOST', 'NS3_PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
     ## node.h: ns3::Node [class]
     module.add_class('Node', parent=root_module['ns3::Object'])
     ## packet-socket-factory.h: ns3::PacketSocketFactory [class]
@@ -106,10 +134,10 @@
     ## simple-net-device.h: ns3::SimpleNetDevice [class]
     module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -118,10 +146,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -130,7 +158,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -138,7 +166,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -149,12 +177,15 @@
 
 def register_methods(root_module):
     register_Ns3Address_methods(root_module, root_module['ns3::Address'])
+    register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress'])
     register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress'])
     register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address'])
     register_Ns3Ipv4AddressGenerator_methods(root_module, root_module['ns3::Ipv4AddressGenerator'])
     register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask'])
     register_Ns3Ipv4MulticastRoute_methods(root_module, root_module['ns3::Ipv4MulticastRoute'])
     register_Ns3Ipv4Route_methods(root_module, root_module['ns3::Ipv4Route'])
+    register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address'])
+    register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix'])
     register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address'])
     register_Ns3Mac64Address_methods(root_module, root_module['ns3::Mac64Address'])
     register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
@@ -164,6 +195,11 @@
     register_Ns3Ipv4Header_methods(root_module, root_module['ns3::Ipv4Header'])
     register_Ns3Ipv4MaskChecker_methods(root_module, root_module['ns3::Ipv4MaskChecker'])
     register_Ns3Ipv4MaskValue_methods(root_module, root_module['ns3::Ipv4MaskValue'])
+    register_Ns3Ipv6AddressChecker_methods(root_module, root_module['ns3::Ipv6AddressChecker'])
+    register_Ns3Ipv6AddressValue_methods(root_module, root_module['ns3::Ipv6AddressValue'])
+    register_Ns3Ipv6Header_methods(root_module, root_module['ns3::Ipv6Header'])
+    register_Ns3Ipv6PrefixChecker_methods(root_module, root_module['ns3::Ipv6PrefixChecker'])
+    register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue'])
     register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
     register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker'])
     register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue'])
@@ -172,6 +208,7 @@
     register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
     register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
     register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
+    register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag'])
     register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
     register_Ns3TcpSocketFactory_methods(root_module, root_module['ns3::TcpSocketFactory'])
     register_Ns3UdpSocket_methods(root_module, root_module['ns3::UdpSocket'])
@@ -183,7 +220,9 @@
     register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue'])
     register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
     register_Ns3EthernetTrailer_methods(root_module, root_module['ns3::EthernetTrailer'])
+    register_Ns3IcmpSocket_methods(root_module, root_module['ns3::IcmpSocket'])
     register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
+    register_Ns3Ipv4RawSocketFactory_methods(root_module, root_module['ns3::Ipv4RawSocketFactory'])
     register_Ns3Ipv4RoutingProtocol_methods(root_module, root_module['ns3::Ipv4RoutingProtocol'])
     register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice'])
     register_Ns3Node_methods(root_module, root_module['ns3::Node'])
@@ -262,6 +301,49 @@
                    is_const=True)
     return
 
+def register_Ns3Inet6SocketAddress_methods(root_module, cls):
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6, uint16_t port) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Address', 'ipv6'), param('uint16_t', 'port')])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Address', 'ipv6')])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(uint16_t port) [constructor]
+    cls.add_constructor([param('uint16_t', 'port')])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6, uint16_t port) [constructor]
+    cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')])
+    ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor]
+    cls.add_constructor([param('char const *', 'ipv6')])
+    ## inet6-socket-address.h: uint16_t ns3::Inet6SocketAddress::GetPort() const [member function]
+    cls.add_method('GetPort', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True)
+    ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function]
+    cls.add_method('SetPort', 
+                   'void', 
+                   [param('uint16_t', 'port')])
+    ## inet6-socket-address.h: ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function]
+    cls.add_method('GetIpv6', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_const=True)
+    ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function]
+    cls.add_method('SetIpv6', 
+                   'void', 
+                   [param('ns3::Ipv6Address', 'ipv6')])
+    ## inet6-socket-address.h: static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function]
+    cls.add_method('IsMatchingType', 
+                   'bool', 
+                   [param('ns3::Address const &', 'addr')], 
+                   is_static=True)
+    ## inet6-socket-address.h: static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function]
+    cls.add_method('ConvertFrom', 
+                   'ns3::Inet6SocketAddress', 
+                   [param('ns3::Address const &', 'addr')], 
+                   is_static=True)
+    return
+
 def register_Ns3InetSocketAddress_methods(root_module, cls):
     ## inet-socket-address.h: ns3::InetSocketAddress::InetSocketAddress(ns3::InetSocketAddress const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::InetSocketAddress const &', 'arg0')])
@@ -638,6 +720,203 @@
                    is_const=True)
     return
 
+def register_Ns3Ipv6Address_methods(root_module, cls):
+    cls.add_binary_comparison_operator('!=')
+    cls.add_binary_comparison_operator('<')
+    cls.add_output_stream_operator()
+    cls.add_binary_comparison_operator('==')
+    ## ipv6-address.h: ns3::Ipv6Address::Ipv6Address() [constructor]
+    cls.add_constructor([])
+    ## ipv6-address.h: ns3::Ipv6Address::Ipv6Address(char const * address) [constructor]
+    cls.add_constructor([param('char const *', 'address')])
+    ## ipv6-address.h: ns3::Ipv6Address::Ipv6Address(uint8_t * address) [constructor]
+    cls.add_constructor([param('uint8_t *', 'address')])
+    ## ipv6-address.h: ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const & addr) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6Address const &', 'addr')])
+    ## ipv6-address.h: ns3::Ipv6Address::Ipv6Address(ns3::Ipv6Address const * addr) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Address const *', 'addr')])
+    ## ipv6-address.h: ns3::Ipv6Address ns3::Ipv6Address::CombinePrefix(ns3::Ipv6Prefix const & prefix) [member function]
+    cls.add_method('CombinePrefix', 
+                   'ns3::Ipv6Address', 
+                   [param('ns3::Ipv6Prefix const &', 'prefix')])
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::ConvertFrom(ns3::Address const & address) [member function]
+    cls.add_method('ConvertFrom', 
+                   'ns3::Ipv6Address', 
+                   [param('ns3::Address const &', 'address')], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::Deserialize(uint8_t const * buf) [member function]
+    cls.add_method('Deserialize', 
+                   'ns3::Ipv6Address', 
+                   [param('uint8_t const *', 'buf')], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetAllHostsMulticast() [member function]
+    cls.add_method('GetAllHostsMulticast', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetAllNodesMulticast() [member function]
+    cls.add_method('GetAllNodesMulticast', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetAllRoutersMulticast() [member function]
+    cls.add_method('GetAllRoutersMulticast', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetAny() [member function]
+    cls.add_method('GetAny', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: void ns3::Ipv6Address::GetBytes(uint8_t * buf) const [member function]
+    cls.add_method('GetBytes', 
+                   'void', 
+                   [param('uint8_t *', 'buf')], 
+                   is_const=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetLoopback() [member function]
+    cls.add_method('GetLoopback', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::GetZero() [member function]
+    cls.add_method('GetZero', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsAllHostsMulticast() const [member function]
+    cls.add_method('IsAllHostsMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsAllNodesMulticast() const [member function]
+    cls.add_method('IsAllNodesMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsAllRoutersMulticast() const [member function]
+    cls.add_method('IsAllRoutersMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsAny() const [member function]
+    cls.add_method('IsAny', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function]
+    cls.add_method('IsEqual', 
+                   'bool', 
+                   [param('ns3::Ipv6Address const &', 'other')], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsLinkLocal() const [member function]
+    cls.add_method('IsLinkLocal', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsLocalhost() const [member function]
+    cls.add_method('IsLocalhost', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: static bool ns3::Ipv6Address::IsMatchingType(ns3::Address const & address) [member function]
+    cls.add_method('IsMatchingType', 
+                   'bool', 
+                   [param('ns3::Address const &', 'address')], 
+                   is_static=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsMulticast() const [member function]
+    cls.add_method('IsMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Address::IsSolicitedMulticast() const [member function]
+    cls.add_method('IsSolicitedMulticast', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function]
+    cls.add_method('MakeAutoconfiguredAddress', 
+                   'ns3::Ipv6Address', 
+                   [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function]
+    cls.add_method('MakeAutoconfiguredLinkLocalAddress', 
+                   'ns3::Ipv6Address', 
+                   [param('ns3::Mac48Address', 'mac')], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Address ns3::Ipv6Address::MakeSolicitedAddress(ns3::Ipv6Address addr) [member function]
+    cls.add_method('MakeSolicitedAddress', 
+                   'ns3::Ipv6Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_static=True)
+    ## ipv6-address.h: void ns3::Ipv6Address::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True)
+    ## ipv6-address.h: void ns3::Ipv6Address::Serialize(uint8_t * buf) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('uint8_t *', 'buf')], 
+                   is_const=True)
+    ## ipv6-address.h: void ns3::Ipv6Address::Set(char const * address) [member function]
+    cls.add_method('Set', 
+                   'void', 
+                   [param('char const *', 'address')])
+    ## ipv6-address.h: void ns3::Ipv6Address::Set(uint8_t * address) [member function]
+    cls.add_method('Set', 
+                   'void', 
+                   [param('uint8_t *', 'address')])
+    return
+
+def register_Ns3Ipv6Prefix_methods(root_module, cls):
+    cls.add_binary_comparison_operator('!=')
+    cls.add_output_stream_operator()
+    cls.add_binary_comparison_operator('==')
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix() [constructor]
+    cls.add_constructor([])
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix(uint8_t * prefix) [constructor]
+    cls.add_constructor([param('uint8_t *', 'prefix')])
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix(char const * prefix) [constructor]
+    cls.add_constructor([param('char const *', 'prefix')])
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix(uint8_t prefix) [constructor]
+    cls.add_constructor([param('uint8_t', 'prefix')])
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const & prefix) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6Prefix const &', 'prefix')])
+    ## ipv6-address.h: ns3::Ipv6Prefix::Ipv6Prefix(ns3::Ipv6Prefix const * prefix) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Prefix const *', 'prefix')])
+    ## ipv6-address.h: void ns3::Ipv6Prefix::GetBytes(uint8_t * buf) const [member function]
+    cls.add_method('GetBytes', 
+                   'void', 
+                   [param('uint8_t *', 'buf')], 
+                   is_const=True)
+    ## ipv6-address.h: static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetLoopback() [member function]
+    cls.add_method('GetLoopback', 
+                   'ns3::Ipv6Prefix', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetZero() [member function]
+    cls.add_method('GetZero', 
+                   'ns3::Ipv6Prefix', 
+                   [], 
+                   is_static=True)
+    ## ipv6-address.h: bool ns3::Ipv6Prefix::IsEqual(ns3::Ipv6Prefix const & other) const [member function]
+    cls.add_method('IsEqual', 
+                   'bool', 
+                   [param('ns3::Ipv6Prefix const &', 'other')], 
+                   is_const=True)
+    ## ipv6-address.h: bool ns3::Ipv6Prefix::IsMatch(ns3::Ipv6Address a, ns3::Ipv6Address b) const [member function]
+    cls.add_method('IsMatch', 
+                   'bool', 
+                   [param('ns3::Ipv6Address', 'a'), param('ns3::Ipv6Address', 'b')], 
+                   is_const=True)
+    ## ipv6-address.h: void ns3::Ipv6Prefix::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True)
+    return
+
 def register_Ns3Mac48Address_methods(root_module, cls):
     cls.add_binary_comparison_operator('!=')
     cls.add_binary_comparison_operator('<')
@@ -678,6 +957,16 @@
                    'ns3::Mac48Address', 
                    [param('ns3::Ipv4Address', 'address')], 
                    is_static=True)
+    ## mac48-address.h: static ns3::Mac48Address ns3::Mac48Address::GetMulticast(ns3::Ipv6Address address) [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Mac48Address', 
+                   [param('ns3::Ipv6Address', 'address')], 
+                   is_static=True)
+    ## mac48-address.h: static ns3::Mac48Address ns3::Mac48Address::GetMulticast6Prefix() [member function]
+    cls.add_method('GetMulticast6Prefix', 
+                   'ns3::Mac48Address', 
+                   [], 
+                   is_static=True)
     ## mac48-address.h: static ns3::Mac48Address ns3::Mac48Address::GetMulticastPrefix() [member function]
     cls.add_method('GetMulticastPrefix', 
                    'ns3::Mac48Address', 
@@ -1050,6 +1339,186 @@
                    is_virtual=True)
     return
 
+def register_Ns3Ipv6AddressChecker_methods(root_module, cls):
+    ## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')])
+    ## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker() [constructor]
+    cls.add_constructor([])
+    return
+
+def register_Ns3Ipv6AddressValue_methods(root_module, cls):
+    ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6AddressValue const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6AddressValue const &', 'arg0')])
+    ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue() [constructor]
+    cls.add_constructor([])
+    ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6Address const & value) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Address const &', 'value')])
+    ## ipv6-address.h: void ns3::Ipv6AddressValue::Set(ns3::Ipv6Address const & value) [member function]
+    cls.add_method('Set', 
+                   'void', 
+                   [param('ns3::Ipv6Address const &', 'value')])
+    ## ipv6-address.h: ns3::Ipv6Address ns3::Ipv6AddressValue::Get() const [member function]
+    cls.add_method('Get', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: ns3::Ptr<ns3::AttributeValue> ns3::Ipv6AddressValue::Copy() const [member function]
+    cls.add_method('Copy', 
+                   'ns3::Ptr< ns3::AttributeValue >', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-address.h: std::string ns3::Ipv6AddressValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
+    cls.add_method('SerializeToString', 
+                   'std::string', 
+                   [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-address.h: bool ns3::Ipv6AddressValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
+    cls.add_method('DeserializeFromString', 
+                   'bool', 
+                   [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
+                   is_virtual=True)
+    return
+
+def register_Ns3Ipv6Header_methods(root_module, cls):
+    ## ipv6-header.h: ns3::Ipv6Header::Ipv6Header(ns3::Ipv6Header const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6Header const &', 'arg0')])
+    ## ipv6-header.h: static ns3::TypeId ns3::Ipv6Header::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## ipv6-header.h: ns3::TypeId ns3::Ipv6Header::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-header.h: ns3::Ipv6Header::Ipv6Header() [constructor]
+    cls.add_constructor([])
+    ## ipv6-header.h: void ns3::Ipv6Header::SetTrafficClass(uint8_t traffic) [member function]
+    cls.add_method('SetTrafficClass', 
+                   'void', 
+                   [param('uint8_t', 'traffic')])
+    ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetTrafficClass() const [member function]
+    cls.add_method('GetTrafficClass', 
+                   'uint8_t', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetFlowLabel(uint32_t flow) [member function]
+    cls.add_method('SetFlowLabel', 
+                   'void', 
+                   [param('uint32_t', 'flow')])
+    ## ipv6-header.h: uint32_t ns3::Ipv6Header::GetFlowLabel() const [member function]
+    cls.add_method('GetFlowLabel', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetPayloadLength(uint16_t len) [member function]
+    cls.add_method('SetPayloadLength', 
+                   'void', 
+                   [param('uint16_t', 'len')])
+    ## ipv6-header.h: uint16_t ns3::Ipv6Header::GetPayloadLength() const [member function]
+    cls.add_method('GetPayloadLength', 
+                   'uint16_t', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetNextHeader(uint8_t next) [member function]
+    cls.add_method('SetNextHeader', 
+                   'void', 
+                   [param('uint8_t', 'next')])
+    ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetNextHeader() const [member function]
+    cls.add_method('GetNextHeader', 
+                   'uint8_t', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetHopLimit(uint8_t limit) [member function]
+    cls.add_method('SetHopLimit', 
+                   'void', 
+                   [param('uint8_t', 'limit')])
+    ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetHopLimit() const [member function]
+    cls.add_method('GetHopLimit', 
+                   'uint8_t', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetSourceAddress(ns3::Ipv6Address src) [member function]
+    cls.add_method('SetSourceAddress', 
+                   'void', 
+                   [param('ns3::Ipv6Address', 'src')])
+    ## ipv6-header.h: ns3::Ipv6Address ns3::Ipv6Header::GetSourceAddress() const [member function]
+    cls.add_method('GetSourceAddress', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::SetDestinationAddress(ns3::Ipv6Address dst) [member function]
+    cls.add_method('SetDestinationAddress', 
+                   'void', 
+                   [param('ns3::Ipv6Address', 'dst')])
+    ## ipv6-header.h: ns3::Ipv6Address ns3::Ipv6Header::GetDestinationAddress() const [member function]
+    cls.add_method('GetDestinationAddress', 
+                   'ns3::Ipv6Address', 
+                   [], 
+                   is_const=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-header.h: uint32_t ns3::Ipv6Header::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-header.h: void ns3::Ipv6Header::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-header.h: uint32_t ns3::Ipv6Header::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_virtual=True)
+    return
+
+def register_Ns3Ipv6PrefixChecker_methods(root_module, cls):
+    ## ipv6-address.h: ns3::Ipv6PrefixChecker::Ipv6PrefixChecker(ns3::Ipv6PrefixChecker const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6PrefixChecker const &', 'arg0')])
+    ## ipv6-address.h: ns3::Ipv6PrefixChecker::Ipv6PrefixChecker() [constructor]
+    cls.add_constructor([])
+    return
+
+def register_Ns3Ipv6PrefixValue_methods(root_module, cls):
+    ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6PrefixValue const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv6PrefixValue const &', 'arg0')])
+    ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue() [constructor]
+    cls.add_constructor([])
+    ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6Prefix const & value) [constructor]
+    cls.add_constructor([param('ns3::Ipv6Prefix const &', 'value')])
+    ## ipv6-address.h: void ns3::Ipv6PrefixValue::Set(ns3::Ipv6Prefix const & value) [member function]
+    cls.add_method('Set', 
+                   'void', 
+                   [param('ns3::Ipv6Prefix const &', 'value')])
+    ## ipv6-address.h: ns3::Ipv6Prefix ns3::Ipv6PrefixValue::Get() const [member function]
+    cls.add_method('Get', 
+                   'ns3::Ipv6Prefix', 
+                   [], 
+                   is_const=True)
+    ## ipv6-address.h: ns3::Ptr<ns3::AttributeValue> ns3::Ipv6PrefixValue::Copy() const [member function]
+    cls.add_method('Copy', 
+                   'ns3::Ptr< ns3::AttributeValue >', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-address.h: std::string ns3::Ipv6PrefixValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
+    cls.add_method('SerializeToString', 
+                   'std::string', 
+                   [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
+                   is_const=True, is_virtual=True)
+    ## ipv6-address.h: bool ns3::Ipv6PrefixValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
+    cls.add_method('DeserializeFromString', 
+                   'bool', 
+                   [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
+                   is_virtual=True)
+    return
+
 def register_Ns3LlcSnapHeader_methods(root_module, cls):
     ## llc-snap-header.h: ns3::LlcSnapHeader::LlcSnapHeader(ns3::LlcSnapHeader const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::LlcSnapHeader const &', 'arg0')])
@@ -1507,6 +1976,56 @@
                    is_const=True, is_virtual=True)
     return
 
+def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls):
+    ## socket.h: ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')])
+    ## socket.h: ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor]
+    cls.add_constructor([])
+    ## socket.h: void ns3::SocketSetDontFragmentTag::Enable() [member function]
+    cls.add_method('Enable', 
+                   'void', 
+                   [])
+    ## socket.h: void ns3::SocketSetDontFragmentTag::Disable() [member function]
+    cls.add_method('Disable', 
+                   'void', 
+                   [])
+    ## socket.h: bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function]
+    cls.add_method('IsEnabled', 
+                   'bool', 
+                   [], 
+                   is_const=True)
+    ## socket.h: static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## socket.h: ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## socket.h: uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## socket.h: void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::TagBuffer', 'i')], 
+                   is_const=True, is_virtual=True)
+    ## socket.h: void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function]
+    cls.add_method('Deserialize', 
+                   'void', 
+                   [param('ns3::TagBuffer', 'i')], 
+                   is_virtual=True)
+    ## socket.h: void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    return
+
 def register_Ns3TcpSocket_methods(root_module, cls):
     ## tcp-socket.h: ns3::TcpSocket::TcpSocket(ns3::TcpSocket const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::TcpSocket const &', 'arg0')])
@@ -1661,6 +2180,16 @@
                    'uint32_t', 
                    [], 
                    is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
+    ## udp-socket.h: void ns3::UdpSocket::SetMtuDiscover(bool discover) [member function]
+    cls.add_method('SetMtuDiscover', 
+                   'void', 
+                   [param('bool', 'discover')], 
+                   is_pure_virtual=True, visibility='private', is_virtual=True)
+    ## udp-socket.h: bool ns3::UdpSocket::GetMtuDiscover() const [member function]
+    cls.add_method('GetMtuDiscover', 
+                   'bool', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
     return
 
 def register_Ns3UdpSocketFactory_methods(root_module, cls):
@@ -1975,6 +2504,98 @@
                    is_virtual=True)
     return
 
+def register_Ns3IcmpSocket_methods(root_module, cls):
+    ## icmp-socket.h: ns3::IcmpSocket::IcmpSocket(ns3::IcmpSocket const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::IcmpSocket const &', 'arg0')])
+    ## icmp-socket.h: static ns3::TypeId ns3::IcmpSocket::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## icmp-socket.h: ns3::IcmpSocket::IcmpSocket() [constructor]
+    cls.add_constructor([])
+    ## icmp-socket.h: ns3::Socket::SocketErrno ns3::IcmpSocket::GetErrno() const [member function]
+    cls.add_method('GetErrno', 
+                   'ns3::Socket::SocketErrno', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, is_virtual=True)
+    ## icmp-socket.h: ns3::Ptr<ns3::Node> ns3::IcmpSocket::GetNode() const [member function]
+    cls.add_method('GetNode', 
+                   'ns3::Ptr< ns3::Node >', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::Bind() [member function]
+    cls.add_method('Bind', 
+                   'int', 
+                   [], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::Bind(ns3::Address const & addr) [member function]
+    cls.add_method('Bind', 
+                   'int', 
+                   [param('ns3::Address const &', 'addr')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::Close() [member function]
+    cls.add_method('Close', 
+                   'int', 
+                   [], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::ShutdownSend() [member function]
+    cls.add_method('ShutdownSend', 
+                   'int', 
+                   [], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::ShutdownRecv() [member function]
+    cls.add_method('ShutdownRecv', 
+                   'int', 
+                   [], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::Connect(ns3::Address const & addr) [member function]
+    cls.add_method('Connect', 
+                   'int', 
+                   [param('ns3::Address const &', 'addr')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::Send(ns3::Ptr<ns3::Packet> p, uint32_t flags) [member function]
+    cls.add_method('Send', 
+                   'int', 
+                   [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: uint32_t ns3::IcmpSocket::GetTxAvailable() const [member function]
+    cls.add_method('GetTxAvailable', 
+                   'uint32_t', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, is_virtual=True)
+    ## icmp-socket.h: int ns3::IcmpSocket::SendTo(ns3::Ptr<ns3::Packet> p, uint32_t flags, ns3::Address const & addr) [member function]
+    cls.add_method('SendTo', 
+                   'int', 
+                   [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags'), param('ns3::Address const &', 'addr')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: ns3::Ptr<ns3::Packet> ns3::IcmpSocket::Recv(uint32_t maxSize, uint32_t flags) [member function]
+    cls.add_method('Recv', 
+                   'ns3::Ptr< ns3::Packet >', 
+                   [param('uint32_t', 'maxSize'), param('uint32_t', 'flags')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: ns3::Ptr<ns3::Packet> ns3::IcmpSocket::RecvFrom(uint32_t maxSize, uint32_t flags, ns3::Address & fromAddress) [member function]
+    cls.add_method('RecvFrom', 
+                   'ns3::Ptr< ns3::Packet >', 
+                   [param('uint32_t', 'maxSize'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')], 
+                   is_pure_virtual=True, is_virtual=True)
+    ## icmp-socket.h: uint32_t ns3::IcmpSocket::GetRxAvailable() const [member function]
+    cls.add_method('GetRxAvailable', 
+                   'uint32_t', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, is_virtual=True)
+    ## icmp-socket.h: uint32_t ns3::IcmpSocket::GetRcvBufSize() const [member function]
+    cls.add_method('GetRcvBufSize', 
+                   'uint32_t', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
+    ## icmp-socket.h: void ns3::IcmpSocket::SetRcvBufSize(uint32_t rcvBufSize) [member function]
+    cls.add_method('SetRcvBufSize', 
+                   'void', 
+                   [param('uint32_t', 'rcvBufSize')], 
+                   is_pure_virtual=True, visibility='private', is_virtual=True)
+    return
+
 def register_Ns3Ipv4_methods(root_module, cls):
     ## ipv4.h: ns3::Ipv4::Ipv4(ns3::Ipv4 const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::Ipv4 const &', 'arg0')])
@@ -2167,6 +2788,18 @@
                    is_virtual=True)
     return
 
+def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls):
+    ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory::Ipv4RawSocketFactory(ns3::Ipv4RawSocketFactory const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::Ipv4RawSocketFactory const &', 'arg0')])
+    ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory::Ipv4RawSocketFactory() [constructor]
+    cls.add_constructor([])
+    ## ipv4-raw-socket-factory.h: static ns3::TypeId ns3::Ipv4RawSocketFactory::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    return
+
 def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls):
     ## ipv4.h: ns3::Ipv4RoutingProtocol::IF_INDEX_ANY [variable]
     cls.add_static_attribute('IF_INDEX_ANY', 'uint32_t const', is_const=True)
@@ -2261,15 +2894,15 @@
                    'bool', 
                    [], 
                    is_pure_virtual=True, is_const=True, is_virtual=True)
-    ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast() const [member function]
+    ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
+                   [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_pure_virtual=True, is_const=True, is_virtual=True)
-    ## net-device.h: ns3::Address ns3::NetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
+    ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [param('ns3::Ipv4Address', 'multicastGroup')], 
+                   [param('ns3::Ipv6Address', 'addr')], 
                    is_pure_virtual=True, is_const=True, is_virtual=True)
     ## net-device.h: bool ns3::NetDevice::IsPointToPoint() const [member function]
     cls.add_method('IsPointToPoint', 
@@ -2522,14 +3155,9 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
-    ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast() const [member function]
+    ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
-                   is_const=True, is_virtual=True)
-    ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
-                   'ns3::Address', 
                    [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_const=True, is_virtual=True)
     ## simple-net-device.h: bool ns3::SimpleNetDevice::IsPointToPoint() const [member function]
@@ -2567,6 +3195,11 @@
                    'void', 
                    [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
                    is_virtual=True)
+    ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
     ## simple-net-device.h: void ns3::SimpleNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
     cls.add_method('SetPromiscReceiveCallback', 
                    'void', 
@@ -2586,10 +3219,30 @@
 
 def register_functions(root_module):
     module = root_module
-    ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
-    module.add_function('ReadFrom', 
-                        'void', 
-                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
+    ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
+    module.add_function('MakeAddressChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
+    module.add_function('MakeIpv4AddressChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
+    module.add_function('MakeIpv4MaskChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## ipv6-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv6AddressChecker() [free function]
+    module.add_function('MakeIpv6AddressChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## ipv6-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv6PrefixChecker() [free function]
+    module.add_function('MakeIpv6PrefixChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
+    module.add_function('MakeMac48AddressChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
     ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
     module.add_function('ReadFrom', 
                         'void', 
@@ -2598,14 +3251,14 @@
     module.add_function('ReadFrom', 
                         'void', 
                         [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
-    ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
-    module.add_function('MakeIpv4AddressChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
-    module.add_function('WriteTo', 
+    ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv6Address & ad) [free function]
+    module.add_function('ReadFrom', 
                         'void', 
-                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address &', 'ad')])
+    ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
+    module.add_function('ReadFrom', 
+                        'void', 
+                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
     ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Address const & ad) [free function]
     module.add_function('WriteTo', 
                         'void', 
@@ -2614,33 +3267,29 @@
     module.add_function('WriteTo', 
                         'void', 
                         [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address', 'ad')])
-    ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
-    module.add_function('MakeAddressChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
-    module.add_function('MakeIpv4MaskChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
-    module.add_function('MakeMac48AddressChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
+    ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Ipv6Address ad) [free function]
+    module.add_function('WriteTo', 
+                        'void', 
+                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address', 'ad')])
+    ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
+    module.add_function('WriteTo', 
+                        'void', 
+                        [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
-    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_olsr.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_olsr.py	Mon Nov 24 06:36:05 2008 +0100
@@ -4,10 +4,10 @@
     root_module = module.get_root()
     
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -16,10 +16,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -28,7 +28,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -36,7 +36,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -63,8 +63,13 @@
     module.add_class('Tc', outer_class=root_module['ns3::olsr::MessageHeader'])
     ## olsr-header.h: ns3::olsr::PacketHeader [class]
     module.add_class('PacketHeader', parent=root_module['ns3::Header'])
+    ## olsr-routing-table.h: ns3::olsr::RoutingTable [class]
+    module.add_class('RoutingTable', parent=root_module['ns3::Ipv4RoutingProtocol'])
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry [struct]
+    module.add_class('RoutingTableEntry')
     module.add_container('std::vector< ns3::olsr::MessageHeader::Hello::LinkMessage >', 'ns3::olsr::MessageHeader::Hello::LinkMessage', container_type='vector')
     module.add_container('std::vector< ns3::olsr::MessageHeader::Hna::Association >', 'ns3::olsr::MessageHeader::Hna::Association', container_type='vector')
+    module.add_container('std::vector< ns3::olsr::RoutingTableEntry >', 'ns3::olsr::RoutingTableEntry', container_type='vector')
 
 def register_methods(root_module):
     register_Ns3OlsrAgent_methods(root_module, root_module['ns3::olsr::Agent'])
@@ -76,6 +81,8 @@
     register_Ns3OlsrMessageHeaderMid_methods(root_module, root_module['ns3::olsr::MessageHeader::Mid'])
     register_Ns3OlsrMessageHeaderTc_methods(root_module, root_module['ns3::olsr::MessageHeader::Tc'])
     register_Ns3OlsrPacketHeader_methods(root_module, root_module['ns3::olsr::PacketHeader'])
+    register_Ns3OlsrRoutingTable_methods(root_module, root_module['ns3::olsr::RoutingTable'])
+    register_Ns3OlsrRoutingTableEntry_methods(root_module, root_module['ns3::olsr::RoutingTableEntry'])
     return
 
 def register_Ns3OlsrAgent_methods(root_module, cls):
@@ -103,6 +110,11 @@
                    'void', 
                    [], 
                    is_pure_virtual=True, is_virtual=True)
+    ## olsr-agent.h: ns3::Ptr<const ns3::olsr::RoutingTable> ns3::olsr::Agent::GetRoutingTable() const [member function]
+    cls.add_method('GetRoutingTable', 
+                   'ns3::Ptr< ns3::olsr::RoutingTable const >', 
+                   [], 
+                   is_pure_virtual=True, is_const=True, is_virtual=True)
     return
 
 def register_Ns3OlsrMessageHeader_methods(root_module, cls):
@@ -438,21 +450,102 @@
                    [param('uint16_t', 'seqnum')])
     return
 
+def register_Ns3OlsrRoutingTable_methods(root_module, cls):
+    ## olsr-routing-table.h: ns3::olsr::RoutingTable::RoutingTable(ns3::olsr::RoutingTable const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::olsr::RoutingTable const &', 'arg0')])
+    ## olsr-routing-table.h: ns3::olsr::RoutingTable::RoutingTable() [constructor]
+    cls.add_constructor([])
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::SetIpv4(ns3::Ptr<ns3::Ipv4> ipv4) [member function]
+    cls.add_method('SetIpv4', 
+                   'void', 
+                   [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')])
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::SetMainAddress(ns3::Ipv4Address mainAddress) [member function]
+    cls.add_method('SetMainAddress', 
+                   'void', 
+                   [param('ns3::Ipv4Address', 'mainAddress')])
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::Clear() [member function]
+    cls.add_method('Clear', 
+                   'void', 
+                   [])
+    ## olsr-routing-table.h: uint32_t ns3::olsr::RoutingTable::GetSize() const [member function]
+    cls.add_method('GetSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True)
+    ## olsr-routing-table.h: std::vector<ns3::olsr::RoutingTableEntry,std::allocator<ns3::olsr::RoutingTableEntry> > ns3::olsr::RoutingTable::GetEntries() const [member function]
+    cls.add_method('GetEntries', 
+                   'std::vector< ns3::olsr::RoutingTableEntry >', 
+                   [], 
+                   is_const=True)
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::RemoveEntry(ns3::Ipv4Address const & dest) [member function]
+    cls.add_method('RemoveEntry', 
+                   'void', 
+                   [param('ns3::Ipv4Address const &', 'dest')])
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::AddEntry(ns3::Ipv4Address const & dest, ns3::Ipv4Address const & next, uint32_t interface, uint32_t distance) [member function]
+    cls.add_method('AddEntry', 
+                   'void', 
+                   [param('ns3::Ipv4Address const &', 'dest'), param('ns3::Ipv4Address const &', 'next'), param('uint32_t', 'interface'), param('uint32_t', 'distance')])
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::AddEntry(ns3::Ipv4Address const & dest, ns3::Ipv4Address const & next, ns3::Ipv4Address const & interfaceAddress, uint32_t distance) [member function]
+    cls.add_method('AddEntry', 
+                   'void', 
+                   [param('ns3::Ipv4Address const &', 'dest'), param('ns3::Ipv4Address const &', 'next'), param('ns3::Ipv4Address const &', 'interfaceAddress'), param('uint32_t', 'distance')])
+    ## olsr-routing-table.h: bool ns3::olsr::RoutingTable::Lookup(ns3::Ipv4Address const & dest, ns3::olsr::RoutingTableEntry & outEntry) const [member function]
+    cls.add_method('Lookup', 
+                   'bool', 
+                   [param('ns3::Ipv4Address const &', 'dest'), param('ns3::olsr::RoutingTableEntry &', 'outEntry')], 
+                   is_const=True)
+    ## olsr-routing-table.h: bool ns3::olsr::RoutingTable::FindSendEntry(ns3::olsr::RoutingTableEntry const & entry, ns3::olsr::RoutingTableEntry & outEntry) const [member function]
+    cls.add_method('FindSendEntry', 
+                   'bool', 
+                   [param('ns3::olsr::RoutingTableEntry const &', 'entry'), param('ns3::olsr::RoutingTableEntry &', 'outEntry')], 
+                   is_const=True)
+    ## olsr-routing-table.h: bool ns3::olsr::RoutingTable::RequestRoute(uint32_t ifIndex, ns3::Ipv4Header const & ipHeader, ns3::Ptr<ns3::Packet> packet, ns3::Callback<void,bool,const ns3::Ipv4Route&,ns3::Ptr<ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty> routeReply) [member function]
+    cls.add_method('RequestRoute', 
+                   'bool', 
+                   [param('uint32_t', 'ifIndex'), param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Callback< void, bool, ns3::Ipv4Route const &, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header const &, ns3::empty, ns3::empty >', 'routeReply')], 
+                   is_virtual=True)
+    ## olsr-routing-table.h: bool ns3::olsr::RoutingTable::RequestIfIndex(ns3::Ipv4Address destination, uint32_t & ifIndex) [member function]
+    cls.add_method('RequestIfIndex', 
+                   'bool', 
+                   [param('ns3::Ipv4Address', 'destination'), param('uint32_t &', 'ifIndex')], 
+                   is_virtual=True)
+    ## olsr-routing-table.h: void ns3::olsr::RoutingTable::DoDispose() [member function]
+    cls.add_method('DoDispose', 
+                   'void', 
+                   [], 
+                   visibility='private', is_virtual=True)
+    return
+
+def register_Ns3OlsrRoutingTableEntry_methods(root_module, cls):
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::destAddr [variable]
+    cls.add_instance_attribute('destAddr', 'ns3::Ipv4Address', is_const=False)
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::nextAddr [variable]
+    cls.add_instance_attribute('nextAddr', 'ns3::Ipv4Address', is_const=False)
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::interface [variable]
+    cls.add_instance_attribute('interface', 'uint32_t', is_const=False)
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::distance [variable]
+    cls.add_instance_attribute('distance', 'uint32_t', is_const=False)
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::RoutingTableEntry(ns3::olsr::RoutingTableEntry const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::olsr::RoutingTableEntry const &', 'arg0')])
+    ## olsr-routing-table.h: ns3::olsr::RoutingTableEntry::RoutingTableEntry() [constructor]
+    cls.add_constructor([])
+    return
+
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
-def register_functions_ns3_internal(module, root_module):
+def register_functions_ns3_Config(module, root_module):
     return
 
 def register_functions_ns3_TimeStepPrecision(module, root_module):
     return
 
-def register_functions_ns3_Config(module, root_module):
+def register_functions_ns3_internal(module, root_module):
     return
 
 def register_functions_ns3_olsr(module, root_module):
--- a/bindings/python/ns3_module_onoff.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_onoff.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,10 +6,10 @@
     ## onoff-application.h: ns3::OnOffApplication [class]
     module.add_class('OnOffApplication', parent=root_module['ns3::Application'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -18,10 +18,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -30,7 +30,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -38,7 +38,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -83,21 +83,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_packet_sink.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_packet_sink.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,10 +6,10 @@
     ## packet-sink.h: ns3::PacketSink [class]
     module.add_class('PacketSink', parent=root_module['ns3::Application'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -18,10 +18,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -30,7 +30,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -38,7 +38,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -79,21 +79,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_point_to_point.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_point_to_point.py	Mon Nov 24 06:36:05 2008 +0100
@@ -3,15 +3,17 @@
 def register_types(module):
     root_module = module.get_root()
     
+    ## ppp-header.h: ns3::PppHeader [class]
+    module.add_class('PppHeader', parent=root_module['ns3::Header'])
     ## point-to-point-channel.h: ns3::PointToPointChannel [class]
     module.add_class('PointToPointChannel', parent=root_module['ns3::Channel'])
     ## point-to-point-net-device.h: ns3::PointToPointNetDevice [class]
     module.add_class('PointToPointNetDevice', parent=root_module['ns3::NetDevice'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +22,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -32,7 +34,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -40,7 +42,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -49,10 +51,48 @@
     
 
 def register_methods(root_module):
+    register_Ns3PppHeader_methods(root_module, root_module['ns3::PppHeader'])
     register_Ns3PointToPointChannel_methods(root_module, root_module['ns3::PointToPointChannel'])
     register_Ns3PointToPointNetDevice_methods(root_module, root_module['ns3::PointToPointNetDevice'])
     return
 
+def register_Ns3PppHeader_methods(root_module, cls):
+    ## ppp-header.h: ns3::PppHeader::PppHeader(ns3::PppHeader const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PppHeader const &', 'arg0')])
+    ## ppp-header.h: ns3::PppHeader::PppHeader() [constructor]
+    cls.add_constructor([])
+    ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## ppp-header.h: ns3::TypeId ns3::PppHeader::GetInstanceTypeId() const [member function]
+    cls.add_method('GetInstanceTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    ## ppp-header.h: void ns3::PppHeader::Print(std::ostream & os) const [member function]
+    cls.add_method('Print', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_const=True, is_virtual=True)
+    ## ppp-header.h: void ns3::PppHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
+    cls.add_method('Serialize', 
+                   'void', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_const=True, is_virtual=True)
+    ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
+    cls.add_method('Deserialize', 
+                   'uint32_t', 
+                   [param('ns3::Buffer::Iterator', 'start')], 
+                   is_virtual=True)
+    ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function]
+    cls.add_method('GetSerializedSize', 
+                   'uint32_t', 
+                   [], 
+                   is_const=True, is_virtual=True)
+    return
+
 def register_Ns3PointToPointChannel_methods(root_module, cls):
     ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')])
@@ -200,14 +240,9 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
-    ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast() const [member function]
+    ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
-                   is_const=True, is_virtual=True)
-    ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
-                   'ns3::Address', 
                    [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_const=True, is_virtual=True)
     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function]
@@ -245,6 +280,11 @@
                    'void', 
                    [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
                    is_virtual=True)
+    ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
     cls.add_method('SetPromiscReceiveCallback', 
                    'void', 
@@ -264,21 +304,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_simulator.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_simulator.py	Mon Nov 24 06:36:05 2008 +0100
@@ -58,10 +58,10 @@
     ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration]
     module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -70,10 +70,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -82,7 +82,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -92,7 +92,7 @@
     ## nstime.h: ns3::TimeStepPrecision::precision_t [enumeration]
     module.add_enum('precision_t', ['S', 'MS', 'US', 'NS', 'PS', 'FS'])
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -1404,81 +1404,81 @@
 
 def register_functions(root_module):
     module = root_module
-    ## high-precision.h: extern ns3::HighPrecision ns3::Max(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
-    module.add_function('Max', 
-                        'ns3::HighPrecision', 
-                        [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
-    ## nstime.h: extern ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
-    module.add_function('FemtoSeconds', 
-                        'ns3::Time', 
-                        [param('uint64_t', 'fs')])
-    ## nstime.h: extern ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
-    module.add_function('MicroSeconds', 
-                        'ns3::Time', 
-                        [param('uint64_t', 'us')])
-    ## simulator.h: extern ns3::Time ns3::Now() [free function]
-    module.add_function('Now', 
-                        'ns3::Time', 
-                        [])
-    ## nstime.h: extern ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
-    module.add_function('MilliSeconds', 
-                        'ns3::Time', 
-                        [param('uint64_t', 'ms')])
-    ## nstime.h: extern ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
-    module.add_function('NanoSeconds', 
-                        'ns3::Time', 
-                        [param('uint64_t', 'ns')])
     ## high-precision.h: extern ns3::HighPrecision ns3::Abs(ns3::HighPrecision const & value) [free function]
     module.add_function('Abs', 
                         'ns3::HighPrecision', 
                         [param('ns3::HighPrecision const &', 'value')])
-    ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
-    module.add_function('MakeTimeChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
-    ## nstime.h: extern ns3::Time ns3::Seconds(double seconds) [free function]
-    module.add_function('Seconds', 
+    ## nstime.h: extern ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
+    module.add_function('FemtoSeconds', 
                         'ns3::Time', 
-                        [param('double', 'seconds')])
+                        [param('uint64_t', 'fs')])
     ## make-event.h: extern ns3::EventImpl * ns3::MakeEvent(void (*)(  ) * f) [free function]
     module.add_function('MakeEvent', 
                         'ns3::EventImpl *', 
                         [param('void ( * ) (  ) *', 'f')])
-    ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
-    module.add_function('PicoSeconds', 
+    ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
+    module.add_function('MakeTimeChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
+    ## high-precision.h: extern ns3::HighPrecision ns3::Max(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
+    module.add_function('Max', 
+                        'ns3::HighPrecision', 
+                        [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
+    ## nstime.h: extern ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
+    module.add_function('MicroSeconds', 
                         'ns3::Time', 
-                        [param('uint64_t', 'ps')])
+                        [param('uint64_t', 'us')])
+    ## nstime.h: extern ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
+    module.add_function('MilliSeconds', 
+                        'ns3::Time', 
+                        [param('uint64_t', 'ms')])
     ## high-precision.h: extern ns3::HighPrecision ns3::Min(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
     module.add_function('Min', 
                         'ns3::HighPrecision', 
                         [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
+    ## nstime.h: extern ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
+    module.add_function('NanoSeconds', 
+                        'ns3::Time', 
+                        [param('uint64_t', 'ns')])
+    ## simulator.h: extern ns3::Time ns3::Now() [free function]
+    module.add_function('Now', 
+                        'ns3::Time', 
+                        [])
+    ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
+    module.add_function('PicoSeconds', 
+                        'ns3::Time', 
+                        [param('uint64_t', 'ps')])
+    ## nstime.h: extern ns3::Time ns3::Seconds(double seconds) [free function]
+    module.add_function('Seconds', 
+                        'ns3::Time', 
+                        [param('double', 'seconds')])
     ## nstime.h: extern ns3::Time ns3::TimeStep(uint64_t ts) [free function]
     module.add_function('TimeStep', 
                         'ns3::Time', 
                         [param('uint64_t', 'ts')])
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
+    module.add_function('Get', 
+                        'ns3::TimeStepPrecision::precision_t', 
+                        [])
+    ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
+    module.add_function('Set', 
+                        'void', 
+                        [param('ns3::TimeStepPrecision::precision_t', 'precision')])
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
-    module.add_function('Set', 
-                        'void', 
-                        [param('ns3::TimeStepPrecision::precision_t', 'precision')])
-    ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
-    module.add_function('Get', 
-                        'ns3::TimeStepPrecision::precision_t', 
-                        [])
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_stats.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_stats.py	Mon Nov 24 06:36:05 2008 +0100
@@ -26,10 +26,10 @@
     ## packet-data-calculators.h: ns3::PacketCounterCalculator [class]
     module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -38,10 +38,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -50,7 +50,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -58,7 +58,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -417,21 +417,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3_module_udp_echo.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_udp_echo.py	Mon Nov 24 06:36:05 2008 +0100
@@ -8,10 +8,10 @@
     ## udp-echo-server.h: ns3::UdpEchoServer [class]
     module.add_class('UdpEchoServer', parent=root_module['ns3::Application'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +20,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -32,7 +32,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -40,7 +40,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -113,21 +113,21 @@
 
 def register_functions(root_module):
     module = root_module
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_v4ping.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,99 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass
+
+def register_types(module):
+    root_module = module.get_root()
+    
+    ## v4ping.h: ns3::V4Ping [class]
+    module.add_class('V4Ping', parent=root_module['ns3::Application'])
+    
+    ## Register a nested module for the namespace Config
+    
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
+    
+    
+    ## Register a nested module for the namespace TimeStepPrecision
+    
+    nested_module = module.add_cpp_namespace('TimeStepPrecision')
+    register_types_ns3_TimeStepPrecision(nested_module)
+    
+    
+    ## Register a nested module for the namespace internal
+    
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
+    
+    
+    ## Register a nested module for the namespace olsr
+    
+    nested_module = module.add_cpp_namespace('olsr')
+    register_types_ns3_olsr(nested_module)
+    
+
+def register_types_ns3_Config(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_TimeStepPrecision(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_internal(module):
+    root_module = module.get_root()
+    
+
+def register_types_ns3_olsr(module):
+    root_module = module.get_root()
+    
+
+def register_methods(root_module):
+    register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping'])
+    return
+
+def register_Ns3V4Ping_methods(root_module, cls):
+    ## v4ping.h: ns3::V4Ping::V4Ping(ns3::V4Ping const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::V4Ping const &', 'arg0')])
+    ## v4ping.h: static ns3::TypeId ns3::V4Ping::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## v4ping.h: ns3::V4Ping::V4Ping() [constructor]
+    cls.add_constructor([])
+    ## v4ping.h: void ns3::V4Ping::StartApplication() [member function]
+    cls.add_method('StartApplication', 
+                   'void', 
+                   [], 
+                   visibility='private', is_virtual=True)
+    ## v4ping.h: void ns3::V4Ping::StopApplication() [member function]
+    cls.add_method('StopApplication', 
+                   'void', 
+                   [], 
+                   visibility='private', is_virtual=True)
+    ## v4ping.h: void ns3::V4Ping::DoDispose() [member function]
+    cls.add_method('DoDispose', 
+                   'void', 
+                   [], 
+                   visibility='private', is_virtual=True)
+    return
+
+def register_functions(root_module):
+    module = root_module
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+    return
+
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
+def register_functions_ns3_internal(module, root_module):
+    return
+
+def register_functions_ns3_olsr(module, root_module):
+    return
+
--- a/bindings/python/ns3_module_wifi.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3_module_wifi.py	Mon Nov 24 06:36:05 2008 +0100
@@ -104,10 +104,10 @@
     ## aarf-wifi-manager.h: ns3::AarfWifiManager [class]
     module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager'])
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -116,10 +116,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -128,7 +128,7 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
 
@@ -136,7 +136,7 @@
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
 
@@ -2669,14 +2669,9 @@
                    'bool', 
                    [], 
                    is_const=True, is_virtual=True)
-    ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast() const [member function]
+    ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
     cls.add_method('GetMulticast', 
                    'ns3::Address', 
-                   [], 
-                   is_const=True, is_virtual=True)
-    ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
-    cls.add_method('MakeMulticastAddress', 
-                   'ns3::Address', 
                    [param('ns3::Ipv4Address', 'multicastGroup')], 
                    is_const=True, is_virtual=True)
     ## wifi-net-device.h: bool ns3::WifiNetDevice::IsPointToPoint() const [member function]
@@ -2709,6 +2704,11 @@
                    'void', 
                    [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
                    is_virtual=True)
+    ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+    cls.add_method('GetMulticast', 
+                   'ns3::Address', 
+                   [param('ns3::Ipv6Address', 'addr')], 
+                   is_const=True, is_virtual=True)
     ## wifi-net-device.h: bool ns3::WifiNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
     cls.add_method('SendFrom', 
                    'bool', 
@@ -2789,29 +2789,29 @@
 
 def register_functions(root_module):
     module = root_module
+    ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
+    module.add_function('MakeSsidChecker', 
+                        'ns3::Ptr< ns3::AttributeChecker const >', 
+                        [])
     ## wifi-mode.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeWifiModeChecker() [free function]
     module.add_function('MakeWifiModeChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
-    ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
-    module.add_function('MakeSsidChecker', 
-                        'ns3::Ptr< ns3::AttributeChecker const >', 
-                        [])
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
-    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
+def register_functions_ns3_Config(module, root_module):
+    return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+    return
+
 def register_functions_ns3_internal(module, root_module):
     return
 
-def register_functions_ns3_TimeStepPrecision(module, root_module):
-    return
-
-def register_functions_ns3_Config(module, root_module):
-    return
-
 def register_functions_ns3_olsr(module, root_module):
     return
 
--- a/bindings/python/ns3modulegen_generated.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/ns3modulegen_generated.py	Mon Nov 24 06:36:05 2008 +0100
@@ -23,8 +23,10 @@
 import ns3_module_internet_stack
 import ns3_module_wifi
 import ns3_module_csma
+import ns3_module_emu
 import ns3_module_bridge
 import ns3_module_packet_sink
+import ns3_module_v4ping
 import ns3_module_global_routing
 import ns3_module_onoff
 import ns3_module_olsr
@@ -159,6 +161,17 @@
         ns3_module_csma__local.register_types(module)
     
     root_module.end_section('ns3_module_csma')
+    root_module.begin_section('ns3_module_emu')
+    ns3_module_emu.register_types(module)
+    
+    try:
+        import ns3_module_emu__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_emu__local.register_types(module)
+    
+    root_module.end_section('ns3_module_emu')
     root_module.begin_section('ns3_module_bridge')
     ns3_module_bridge.register_types(module)
     
@@ -181,6 +194,17 @@
         ns3_module_packet_sink__local.register_types(module)
     
     root_module.end_section('ns3_module_packet_sink')
+    root_module.begin_section('ns3_module_v4ping')
+    ns3_module_v4ping.register_types(module)
+    
+    try:
+        import ns3_module_v4ping__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_v4ping__local.register_types(module)
+    
+    root_module.end_section('ns3_module_v4ping')
     root_module.begin_section('ns3_module_global_routing')
     ns3_module_global_routing.register_types(module)
     
@@ -239,10 +263,10 @@
     module.add_container('std::vector< unsigned int >', 'unsigned int', container_type='vector')
     module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
     
-    ## Register a nested module for the namespace internal
+    ## Register a nested module for the namespace Config
     
-    nested_module = module.add_cpp_namespace('internal')
-    register_types_ns3_internal(nested_module)
+    nested_module = module.add_cpp_namespace('Config')
+    register_types_ns3_Config(nested_module)
     
     
     ## Register a nested module for the namespace TimeStepPrecision
@@ -251,10 +275,10 @@
     register_types_ns3_TimeStepPrecision(nested_module)
     
     
-    ## Register a nested module for the namespace Config
+    ## Register a nested module for the namespace internal
     
-    nested_module = module.add_cpp_namespace('Config')
-    register_types_ns3_Config(nested_module)
+    nested_module = module.add_cpp_namespace('internal')
+    register_types_ns3_internal(nested_module)
     
     
     ## Register a nested module for the namespace olsr
@@ -263,18 +287,18 @@
     register_types_ns3_olsr(nested_module)
     
 
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
     root_module = module.get_root()
     
+    module.add_container('std::vector< std::string >', 'std::string', container_type='vector')
 
 def register_types_ns3_TimeStepPrecision(module):
     root_module = module.get_root()
     
 
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
     root_module = module.get_root()
     
-    module.add_container('std::vector< std::string >', 'std::string', container_type='vector')
 
 def register_types_ns3_olsr(module):
     root_module = module.get_root()
@@ -402,6 +426,17 @@
         ns3_module_csma__local.register_methods(root_module)
     
     root_module.end_section('ns3_module_csma')
+    root_module.begin_section('ns3_module_emu')
+    ns3_module_emu.register_methods(root_module)
+    
+    try:
+        import ns3_module_emu__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_emu__local.register_methods(root_module)
+    
+    root_module.end_section('ns3_module_emu')
     root_module.begin_section('ns3_module_bridge')
     ns3_module_bridge.register_methods(root_module)
     
@@ -424,6 +459,17 @@
         ns3_module_packet_sink__local.register_methods(root_module)
     
     root_module.end_section('ns3_module_packet_sink')
+    root_module.begin_section('ns3_module_v4ping')
+    ns3_module_v4ping.register_methods(root_module)
+    
+    try:
+        import ns3_module_v4ping__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_v4ping__local.register_methods(root_module)
+    
+    root_module.end_section('ns3_module_v4ping')
     root_module.begin_section('ns3_module_global_routing')
     ns3_module_global_routing.register_methods(root_module)
     
@@ -604,6 +650,17 @@
         ns3_module_csma__local.register_functions(root_module)
     
     root_module.end_section('ns3_module_csma')
+    root_module.begin_section('ns3_module_emu')
+    ns3_module_emu.register_functions(root_module)
+    
+    try:
+        import ns3_module_emu__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_emu__local.register_functions(root_module)
+    
+    root_module.end_section('ns3_module_emu')
     root_module.begin_section('ns3_module_bridge')
     ns3_module_bridge.register_functions(root_module)
     
@@ -626,6 +683,17 @@
         ns3_module_packet_sink__local.register_functions(root_module)
     
     root_module.end_section('ns3_module_packet_sink')
+    root_module.begin_section('ns3_module_v4ping')
+    ns3_module_v4ping.register_functions(root_module)
+    
+    try:
+        import ns3_module_v4ping__local
+    except ImportError:
+        pass
+    else:
+        ns3_module_v4ping__local.register_functions(root_module)
+    
+    root_module.end_section('ns3_module_v4ping')
     root_module.begin_section('ns3_module_global_routing')
     ns3_module_global_routing.register_functions(root_module)
     
@@ -681,19 +749,19 @@
         ns3_module_helper__local.register_functions(root_module)
     
     root_module.end_section('ns3_module_helper')
-    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
-    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
     return
 
-def register_functions_ns3_internal(module, root_module):
+def register_functions_ns3_Config(module, root_module):
     return
 
 def register_functions_ns3_TimeStepPrecision(module, root_module):
     return
 
-def register_functions_ns3_Config(module, root_module):
+def register_functions_ns3_internal(module, root_module):
     return
 
 def register_functions_ns3_olsr(module, root_module):
--- a/bindings/python/wscript	Tue Nov 04 14:56:32 2008 +0100
+++ b/bindings/python/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -16,16 +16,25 @@
 LOCAL_PYBINDGEN_PATH = os.path.join(os.getcwd(), "bindings", "python", "pybindgen")
 #PYBINDGEN_BRANCH = 'lp:pybindgen'
 PYBINDGEN_BRANCH = 'https://launchpad.net/pybindgen'
-if os.environ.get('PYTHONPATH', ''):
-    os.environ['PYTHONPATH'] = LOCAL_PYBINDGEN_PATH + os.pathsep + os.environ.get('PYTHONPATH')
-else:
-    os.environ['PYTHONPATH'] = LOCAL_PYBINDGEN_PATH
 
 ## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 600)
+REQUIRED_PYBINDGEN_VERSION = (0, 9, 0, 605)
 REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
 
 
+def add_to_python_path(path):
+    if os.environ.get('PYTHONPATH', ''):
+        os.environ['PYTHONPATH'] = path + os.pathsep + os.environ.get('PYTHONPATH')
+    else:
+        os.environ['PYTHONPATH'] = path
+
+def set_pybindgen_pythonpath(env):
+    if env['WITH_PYBINDGEN']:
+        add_to_python_path(env['WITH_PYBINDGEN'])
+    else:
+        add_to_python_path(LOCAL_PYBINDGEN_PATH)
+
+
 def set_options(opt):
     opt.tool_options('python')
     opt.add_option('--disable-python',
@@ -41,6 +50,10 @@
                          "instead of using the system installed version."),
                    action="store_true", default=False,
                    dest='pybindgen_checkout')
+    opt.add_option('--with-pybindgen',
+                   help=('Path to an existing pybindgen source tree to use.'),
+                   default=None,
+                   dest='with_pybindgen', type="string")
 
 def fetch_pybindgen(conf):
     """
@@ -118,15 +131,31 @@
         conf.report_optional_feature("python", "Python Bindings", False, str(ex))
         return
 
+    # Fix a bug with WAF and g++ 4.3.2 (it does not include "(GCC") in
+    # the output of g++ --version, so the WAF python detection fails
+    # to recognize it is gcc)
+    gcc_version = os.popen("%s --version" % conf.env['CXX']).readline()
+    if '(GCC)' in gcc_version or 'g++' in gcc_version:
+        conf.env.append_value('CXXFLAGS_PYEMBED','-fno-strict-aliasing')
+        conf.env.append_value('CXXFLAGS_PYEXT','-fno-strict-aliasing')
+
     ## Check for pybindgen
+
+    no_net = False
+    if Params.g_options.with_pybindgen:
+        conf.env['WITH_PYBINDGEN'] = os.path.abspath(Params.g_options.with_pybindgen)
+        no_net = True
+
     if Params.g_options.pybindgen_checkout:
         fetch_pybindgen(conf)
 
+    set_pybindgen_pythonpath(conf.env)
+
     try:
         conf.check_python_module('pybindgen')
     except Configure.ConfigurationError:
         warning("pybindgen missing")
-        if not fetch_pybindgen(conf):
+        if no_net or not fetch_pybindgen(conf):
             conf.report_optional_feature("python", "Python Bindings", False,
                                          "PyBindGen missing and could not be retrieved")
             return
@@ -144,7 +173,7 @@
             warning("pybindgen (found %s) is too old (need %s)" %
                     (pybindgen_version_str,
                      '.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])))
-            if not fetch_pybindgen(conf):
+            if no_net or not fetch_pybindgen(conf):
                 conf.report_optional_feature("python", "Python Bindings", False,
                                              "PyBindGen too old and newer version could not be retrieved")
                 return
@@ -383,6 +412,8 @@
     env = bld.env_of_name('default')
     curdir = bld.m_curdirnode.abspath()
 
+    set_pybindgen_pythonpath(env)
+
     #Object.register('all-ns3-headers', AllNs3Headers)
     Action.Action('gen-ns3-metaheader', func=gen_ns3_metaheader, color='BLUE')
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/csma-ping.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,140 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * 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
+ */
+
+// Port of ns-2/tcl/ex/simple.tcl to ns-3
+//
+// Network topology
+//
+//       n0    n1   n2   n3
+//       |     |    |    |
+//     =====================
+//
+// - CBR/UDP flows from n0 to n1, and from n3 to n0
+// - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec.
+//   (i.e., DataRate of 448,000 bps)
+// - DropTail queues 
+// - Tracing of queues and packet receptions to file "csma-one-subnet.tr"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <cassert>
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/global-route-manager.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("CsmaPingExample");
+
+static void SinkRx (Ptr<const Packet> p, const Address &ad)
+{
+  //std::cout << *p << std::endl;
+}
+
+static void PingRtt (std::string context, Time rtt)
+{
+  //std::cout << context << " " << rtt << std::endl;
+}
+
+int
+main (int argc, char *argv[])
+{
+  //
+  // Make the random number generators generate reproducible results.
+  //
+  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
+
+  CommandLine cmd;
+  cmd.Parse (argc, argv);
+
+  // Here, we will explicitly create four nodes.
+  NS_LOG_INFO ("Create nodes.");
+  NodeContainer c;
+  c.Create (4);
+
+  // connect all our nodes to a shared channel.
+  NS_LOG_INFO ("Build Topology.");
+  CsmaHelper csma;
+  csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
+  csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
+  csma.SetDeviceAttribute ("EncapsulationMode", StringValue ("Llc"));
+  NetDeviceContainer devs = csma.Install (c);
+
+  // add an ip stack to all nodes.
+  NS_LOG_INFO ("Add ip stack.");
+  InternetStackHelper ipStack;
+  ipStack.Install (c);
+
+  // assign ip addresses
+  NS_LOG_INFO ("Assign ip addresses.");
+  Ipv4AddressHelper ip;
+  ip.SetBase ("192.168.1.0", "255.255.255.0");
+  Ipv4InterfaceContainer addresses = ip.Assign (devs);
+
+  // setup global router
+  GlobalRouteManager::PopulateRoutingTables ();
+  NS_LOG_INFO ("Create Source");
+  Config::SetDefault ("ns3::Ipv4RawSocketImpl::Protocol", StringValue ("2"));
+  InetSocketAddress dst = InetSocketAddress (addresses.GetAddress (3));
+  OnOffHelper onoff = OnOffHelper ("ns3::Ipv4RawSocketFactory", dst);
+  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1.0)));
+  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0.0)));
+  onoff.SetAttribute ("DataRate", DataRateValue (DataRate (15000)));
+  onoff.SetAttribute ("PacketSize", UintegerValue (1200));
+
+
+  ApplicationContainer apps = onoff.Install (c.Get (0));
+  apps.Start (Seconds (1.0));
+  apps.Stop (Seconds (10.0));
+
+  NS_LOG_INFO ("Create Sink.");
+  PacketSinkHelper sink = PacketSinkHelper ("ns3::Ipv4RawSocketFactory", dst);
+  apps = sink.Install (c.Get (3));
+  apps.Start (Seconds (0.0));
+  apps.Stop (Seconds (11.0));
+
+  NS_LOG_INFO ("Create pinger");
+  V4PingHelper ping = V4PingHelper (addresses.GetAddress (2));
+  NodeContainer pingers;
+  pingers.Add (c.Get (0));
+  pingers.Add (c.Get (1));
+  pingers.Add (c.Get (3));
+  apps = ping.Install (pingers);
+  apps.Start (Seconds (2.0));
+  apps.Stop (Seconds (5.0));
+
+  NS_LOG_INFO ("Configure Tracing.");
+  // first, pcap tracing.
+  csma.EnablePcapAll ("csma-ping");
+  // then, print what the packet sink receives.
+  Config::ConnectWithoutContext ("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", 
+                                 MakeCallback (&SinkRx));
+  // finally, print the ping rtts.
+  Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::V4Ping/Rtt",
+                   MakeCallback (&PingRtt));
+
+  Packet::EnablePrinting ();
+  
+
+  NS_LOG_INFO ("Run Simulation.");
+  Simulator::Run ();
+  Simulator::Destroy ();
+  NS_LOG_INFO ("Done.");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/csma-raw-ip-socket.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,122 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * 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
+ */
+
+// Port of ns-2/tcl/ex/simple.tcl to ns-3
+//
+// Network topology
+//
+//       n0    n1   n2   n3
+//       |     |    |    |
+//     =====================
+//
+// - CBR/UDP flows from n0 to n1, and from n3 to n0
+// - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec.
+//   (i.e., DataRate of 448,000 bps)
+// - DropTail queues 
+// - Tracing of queues and packet receptions to file "csma-one-subnet.tr"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <cassert>
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("CsmaPacketSocketExample");
+
+static void SinkRx (Ptr<const Packet> p, const Address &ad)
+{
+  //std::cout << *p << std::endl;
+}
+
+int
+main (int argc, char *argv[])
+{
+#if 0 
+  LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
+#endif
+
+  //
+  // Make the random number generators generate reproducible results.
+  //
+  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
+
+  CommandLine cmd;
+  cmd.Parse (argc, argv);
+
+  // Here, we will explicitly create four nodes.
+  NS_LOG_INFO ("Create nodes.");
+  NodeContainer c;
+  c.Create (4);
+
+  // connect all our nodes to a shared channel.
+  NS_LOG_INFO ("Build Topology.");
+  CsmaHelper csma;
+  csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
+  csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
+  csma.SetDeviceAttribute ("EncapsulationMode", StringValue ("Llc"));
+  NetDeviceContainer devs = csma.Install (c);
+
+  // add an ip stack to all nodes.
+  NS_LOG_INFO ("Add ip stack.");
+  InternetStackHelper ipStack;
+  ipStack.Install (c);
+
+  // assign ip addresses
+  NS_LOG_INFO ("Assign ip addresses.");
+  Ipv4AddressHelper ip;
+  ip.SetBase ("192.168.1.0", "255.255.255.0");
+  Ipv4InterfaceContainer addresses = ip.Assign (devs);
+
+  NS_LOG_INFO ("Create Source");
+  Config::SetDefault ("ns3::Ipv4RawSocketImpl::Protocol", StringValue ("2"));
+  InetSocketAddress dst = InetSocketAddress (addresses.GetAddress (3));
+  OnOffHelper onoff = OnOffHelper ("ns3::Ipv4RawSocketFactory", dst);
+  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1.0)));
+  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0.0)));
+  onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
+  onoff.SetAttribute ("PacketSize", UintegerValue (1200));
+
+  ApplicationContainer apps = onoff.Install (c.Get (0));
+  apps.Start (Seconds (1.0));
+  apps.Stop (Seconds (10.0));
+
+  NS_LOG_INFO ("Create Sink.");
+  PacketSinkHelper sink = PacketSinkHelper ("ns3::Ipv4RawSocketFactory", dst);
+  apps = sink.Install (c.Get (3));
+  apps.Start (Seconds (0.0));
+  apps.Stop (Seconds (11.0));
+
+  NS_LOG_INFO ("Configure Tracing.");
+  // first, pcap tracing.
+  csma.EnablePcapAll ("csma-raw-ip-socket");
+  // then, print what the packet sink receives.
+  Config::ConnectWithoutContext ("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", 
+                                 MakeCallback (&SinkRx));
+
+  Packet::EnablePrinting ();
+  
+
+  NS_LOG_INFO ("Run Simulation.");
+  Simulator::Run ();
+  Simulator::Destroy ();
+  NS_LOG_INFO ("Done.");
+}
--- a/examples/csma-star.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/examples/csma-star.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -115,7 +115,8 @@
   // Assign IPv4 interfaces and IP addresses to the devices we previously
   // created.  Keep track of the resulting addresses, one for the addresses
   // of the hub node, and one for addresses on the spoke nodes.  Despite the
-  // name of the class, what is visible to clients is really the address.
+  // name of the class (Ipv4InterfaceContainer), what is visible to clients 
+  // is really the address not the interface.
   //
   Ipv4InterfaceContainer hubAddresses;
   Ipv4InterfaceContainer spokeAddresses;
@@ -128,6 +129,20 @@
     address.SetBase (subnet.str ().c_str (), "255.255.255.0");
     hubAddresses.Add (address.Assign (hubDevices.Get (i)));
     spokeAddresses.Add (address.Assign (spokeDevices.Get (i)));
+    //
+    // We assigned addresses to the logical hub and the first "drop" of the 
+    // CSMA network that acts as the spoke, but we also have a number of fill
+    // devices (nFill) also hanging off the CSMA network.  We have got to 
+    // assign addresses to them as well.  We put all of the fill devices into
+    // a single device container, so the first nFill devices are associated
+    // with the channel connected to spokeDevices.Get (0), the second nFill
+    // devices afe associated with the channel connected to spokeDevices.Get (1)
+    // etc.
+    //
+    for (uint32_t j = 0; j < nFill; ++j)
+      {
+        address.Assign (fillDevices.Get (i * nFill + j));
+      }
   }
 
   NS_LOG_INFO ("Create applications.");
@@ -190,7 +205,7 @@
   //
   // Do pcap tracing on all devices on all nodes.
   //
-  PointToPointHelper::EnablePcapAll ("csma-star");
+  CsmaHelper::EnablePcapAll ("csma-star");
 
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/emu-udp-echo.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,156 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * 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
+ */
+
+// Network topology
+//
+// Normally, the use case for emulated net devices is in collections of
+// small simulations that connect to the outside world through specific 
+// interfaces.  For example, one could construct a number of virtual
+// machines and connect them via a host-only network.  To use the emulated
+// net device, you would need to set all of the host-only interfaces in
+// promiscuous mode and provide an appropriate device name (search for "eth1"
+// below).  One could also use the emulated net device in a testbed situation
+// where the host on which the simulation is running has a specific interface
+// of interested.  You would also need to set this specific interface into
+// promiscuous mode and provide an appropriate device name.
+//
+// This philosophy carries over to this simple example.
+//
+// We don't assume any special configuration and all of the ns-3 emulated net
+// devices will actually talk to the same underlying OS device.  We rely on 
+// the fact that the OS will deliver copies of our packets to the other ns-3
+// net devices since we operate in promiscuous mode.  
+//
+// Packets will be sent out over the device, but we use MAC spoofing.  The
+// MAC addresses will be generated using the Organizationally Unique Identifier
+// (OUI) 00:00:00 as a base.  This vendor code is not assigned to any 
+// organization and so should not conflict with any real hardware.  We'll use 
+// the first n of these addresses, where n is the number of nodes, in this
+// simualtion.  It is up to you to determine that using these MAC addresses is
+// okay on your network and won't conflict with anything else (including another
+// simulation using emu devices) on your network.  Once you have made this 
+// determination, you need to put the interface you chose into promiscuous mode.
+// We don't do it for you since you need to think about it first.
+//
+// This simulation uses the real-time simulator and so will consume ten seconds
+// of real time.
+//
+// By default, we create the following topology
+//
+//       n0    n1   n2   n3
+//       |     |    |    |
+//       -----------------
+//             "eth1"
+//
+// - UDP flows from n0 to n1 and back
+// - DropTail queues 
+// - Tracing of queues and packet receptions to file "udp-echo.tr"
+// - pcap tracing on all devices
+//
+
+#include <fstream>
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/helper-module.h"
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("EmulatedUdpEchoExample");
+
+int 
+main (int argc, char *argv[])
+{
+  std::string deviceName ("eth1");
+  uint32_t nNodes = 4;
+
+  //
+  // Allow the user to override any of the defaults at run-time, via command-line
+  // arguments
+  //
+  CommandLine cmd;
+  cmd.AddValue("deviceName", "device name", deviceName);
+  cmd.AddValue("nNodes", "number of nodes to create (>= 2)", nNodes);
+  cmd.Parse (argc, argv);
+
+  GlobalValue::Bind ("SimulatorImplementationType", 
+    StringValue ("ns3::RealtimeSimulatorImpl"));
+
+  //
+  // need at least two nodes
+  //
+  nNodes = nNodes < 2 ? 2 : nNodes;
+
+  //
+  // Explicitly create the nodes required by the topology (shown above).
+  //
+  NS_LOG_INFO ("Create nodes.");
+  NodeContainer n;
+  n.Create (nNodes);
+
+  InternetStackHelper internet;
+  internet.Install (n);
+
+  //
+  // Explicitly create the channels required by the topology (shown above).
+  //
+  NS_LOG_INFO ("Create channels.");
+  EmuHelper emu;
+  emu.SetAttribute ("DeviceName", StringValue (deviceName));
+  NetDeviceContainer d = emu.Install (n);
+
+  //
+  // We've got the "hardware" in place.  Now we need to add IP addresses.
+  //
+  Ipv4AddressHelper ipv4;
+  NS_LOG_INFO ("Assign IP Addresses.");
+  ipv4.SetBase ("10.1.1.0", "255.255.255.0");
+  Ipv4InterfaceContainer i = ipv4.Assign (d);
+
+  //
+  // Create a UdpEchoServer application on node one.
+  //
+  NS_LOG_INFO ("Create Applications.");
+  UdpEchoServerHelper server (9);
+  ApplicationContainer apps = server.Install (n.Get(1));
+  apps.Start (Seconds (1.0));
+  apps.Stop (Seconds (10.0));
+
+  //
+  // Create a UdpEchoClient application to send UDP datagrams from node zero to node one.
+  //
+  uint32_t packetSize = 1024;
+  uint32_t maxPacketCount = 1;
+  Time interPacketInterval = Seconds (1.);
+  UdpEchoClientHelper client (i.GetAddress (1), 9);
+  client.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
+  client.SetAttribute ("Interval", TimeValue (interPacketInterval));
+  client.SetAttribute ("PacketSize", UintegerValue (packetSize));
+  apps = client.Install (n.Get (0));
+  apps.Start (Seconds (2.0));
+  apps.Stop (Seconds (10.0));
+
+  std::ofstream ascii;
+  ascii.open ("emu-udp-echo.tr");
+  EmuHelper::EnablePcapAll ("emu-udp-echo");
+
+  //
+  // Now, do the actual simulation.
+  //
+  NS_LOG_INFO ("Run Simulation.");
+  Simulator::Run ();
+  Simulator::Destroy ();
+  NS_LOG_INFO ("Done.");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/test-ipv6.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,70 @@
+/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 Louis Pasteur University / Telecom Bretagne
+ *
+ * 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: Angelos Chatzipapas <Angelos.CHATZIPAPAS@enst-bretagne.fr> /
+ * <chatzipa@ceid.upatras.gr>
+ */
+
+#include "ns3/log.h"
+//#include "ns3/ipv6.h"
+#include "ns3/ipv6-address.h"
+#include "ns3/node.h"
+#include "ns3/mac48-address.h"
+
+NS_LOG_COMPONENT_DEFINE ("TestIpv6");
+
+using namespace ns3;
+
+int 
+main (int argc, char *argv[])
+{
+  LogComponentEnable ("TestIpv6", LOG_LEVEL_ALL);
+
+  NS_LOG_INFO ("Test Ipv6");
+
+  Mac48Address m_addresses[10];
+
+  m_addresses[0]=("00:00:00:00:00:01");
+  m_addresses[1]=("00:00:00:00:00:02");
+  m_addresses[2]=("00:00:00:00:00:03");
+  m_addresses[3]=("00:00:00:00:00:04");
+  m_addresses[4]=("00:00:00:00:00:05");
+  m_addresses[5]=("00:00:00:00:00:06");
+  m_addresses[6]=("00:00:00:00:00:07");
+  m_addresses[7]=("00:00:00:00:00:08");
+  m_addresses[8]=("00:00:00:00:00:09");
+  m_addresses[9]=("00:00:00:00:00:10");
+
+  Ipv6Address prefix1 ("2001:1::");
+  NS_LOG_INFO ("prefix = " << prefix1);
+  for (uint32_t i = 0; i < 10 ; ++i)
+    {
+      NS_LOG_INFO ("address = " <<m_addresses[i]);
+      Ipv6Address ipv6address=Ipv6Address::MakeAutoconfiguredAddress(m_addresses[i], prefix1);
+      NS_LOG_INFO ("address = " <<ipv6address);
+    }
+
+  Ipv6Address prefix2 ("2002:1:1::");
+
+  NS_LOG_INFO ("prefix = " << prefix2);
+  for (uint32_t i = 0; i < 10 ; ++i)
+    {
+      Ipv6Address ipv6address=Ipv6Address::MakeAutoconfiguredAddress(m_addresses[i], prefix2);
+      NS_LOG_INFO ("address = " <<ipv6address);
+    }
+}
+
--- a/examples/wscript	Tue Nov 04 14:56:32 2008 +0100
+++ b/examples/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -94,3 +94,22 @@
                                  ['core', 'simulator', 'mobility', 'wifi', 
                                   'csma', 'helper', 'bridge'])
     obj.source = 'wifi-wired-bridging.cc'
+
+    obj = bld.create_ns3_program('csma-raw-ip-socket',
+        ['csma', 'internet-stack'])
+    obj.source = 'csma-raw-ip-socket.cc'
+
+    obj = bld.create_ns3_program('csma-ping',
+        ['csma', 'internet-stack', 'v4ping'])
+    obj.source = 'csma-ping.cc'
+
+    obj = bld.create_ns3_program('test-ipv6',
+      ['point-to-point', 'internet-stack'])
+    obj.source = 'test-ipv6.cc'
+
+    env = bld.env_of_name('default')
+    if env['ENABLE_EMU']:
+        obj = bld.create_ns3_program('emu-udp-echo',
+                                     ['emu', 'internet-stack'])
+        obj.source = 'emu-udp-echo.cc'
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regression.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,270 @@
+import os
+import sys
+import Params
+import shutil
+import pproc as subprocess
+import urllib
+
+import wutils
+
+#
+# The directory in which the tarball of the reference traces lives.  This is
+# used if Mercurial is not on the system.
+#
+REGRESSION_TRACES_URL = "http://www.nsnam.org/releases/"
+
+#
+# The path to the Mercurial repository used to find the reference traces if
+# we find "hg" on the system.  We expect that the repository will be named
+# identically to refDirName below
+#
+REGRESSION_TRACES_REPO = "http://code.nsnam.org/"
+
+#
+# Name of the local directory where the regression code lives.
+#
+REGRESSION_DIR = "regression"
+
+#
+# The last part of the path name to use to find the regression traces.  The
+# path will be APPNAME + '-' + VERSION + REGRESSION_SUFFIX, e.g.,
+# ns-3-dev-ref-traces
+#
+REGRESSION_SUFFIX = "-ref-traces"
+
+
+def dev_null():
+    if sys.platform == 'win32':
+        return open("NUL:", "w")
+    else:
+        return open("/dev/null", "w")
+
+
+### Regression testing
+class Regression(object):
+    def __init__(self, testdir, reference_traces):
+        self.testdir = testdir
+        self.reference_traces = reference_traces
+        self.env = Params.g_build.env_of_name('default')
+
+    def run_test(self, verbose, generate, testName, arguments=[], pyscript=None, refTestName=None):
+        """
+        @param verbose: enable verbose execution
+
+        @param generate: generate new traces instead of comparing with the reference
+
+        @param testName: name of the test
+
+        @arguments: list of extra parameters to pass to the program to be tested
+
+        @pyscript: if not None, the test is written in Python and this
+        parameter contains the path to the python script, relative to
+        the project root dir
+
+        @param refTestName: if not None, this is the name of the directory under refDirName
+        that contains the reference traces. Otherwise "refDirname/testName + .ref" is used.
+
+        """
+        if not isinstance(arguments, list):
+            raise TypeError
+        
+        if refTestName is None:
+            refTestDirName = os.path.join(self.reference_traces, (testName + ".ref"))
+        else:
+            refTestDirName = os.path.join(self.reference_traces, refTestName)
+
+        if not os.path.exists(self.reference_traces):
+            print"No reference trace repository"
+            return 1
+
+        if generate:
+            if not os.path.exists(refTestDirName):
+                print "creating new " + refTestDirName
+                os.mkdir(refTestDirName)
+
+            if pyscript is None:
+                Params.g_options.cwd_launch = refTestDirName
+                tmpl = "%s"
+                for arg in arguments:
+                    tmpl = tmpl + " " + arg
+                wutils.run_program(testName, tmpl)
+            else:
+                argv = [self.env['PYTHON'], os.path.join(Params.g_cwd_launch, *os.path.split(pyscript))] + arguments
+                before = os.getcwd()
+                os.chdir(refTestDirName)
+                try:
+                    wutils.run_argv(argv)
+                finally:
+                    os.chdir(before)
+            print "Remember to commit " + refTestDirName
+            return 0
+        else:
+            if not os.path.exists(refTestDirName):
+                print "Cannot locate reference traces in " + refTestDirName
+                return 1
+
+            
+            if refTestName is None:
+                traceDirName = testName + ".ref"
+            else:
+                traceDirName = refTestName
+            traceDirName = os.path.join ('traces', traceDirName)
+
+            try:
+                shutil.rmtree(traceDirName)
+            except OSError:
+                pass
+            os.mkdir(traceDirName)
+
+            #os.system("./waf --cwd regression/traces --run " +
+            #  testName + " > /dev/null 2>&1")
+
+            if pyscript is None:
+                Params.g_options.cwd_launch = traceDirName
+                wutils.run_program(testName, command_template=wutils.get_command_template(*arguments))
+            else:
+                argv = [self.env['PYTHON'], os.path.join('..', '..', '..', *os.path.split(pyscript))] + arguments
+                before = os.getcwd()
+                os.chdir(traceDirName)
+                try:
+                    wutils.run_argv(argv)
+                finally:
+                    os.chdir(before)
+
+            if verbose:
+                #diffCmd = "diff traces " + refTestDirName + " | head"
+                diffCmd = subprocess.Popen([self.env['DIFF'], traceDirName, refTestDirName],
+                                           stdout=subprocess.PIPE)
+                headCmd = subprocess.Popen("head", stdin=diffCmd.stdout)
+                rc2 = headCmd.wait()
+                diffCmd.stdout.close()
+                rc1 = diffCmd.wait()
+                rc = rc1 or rc2
+            else:
+                rc = subprocess.Popen([self.env['DIFF'], traceDirName, refTestDirName], stdout=dev_null()).wait()
+            if rc:
+                print "----------"
+                print "Traces differ in test: test-" + testName
+                print "Reference traces in directory: regression/" + refTestDirName
+                print "Traces in directory: traces"
+                print "Rerun regression test as: " + \
+                    "\"./waf --regression --regression-tests=test-" + testName + "\""
+                print "Then do \"diff -u regression/" + refTestDirName + " regression/" + traceDirName +\
+                    "\" for details"
+                print "----------"
+            return rc
+
+def _find_tests(testdir):
+    """Return a list of test modules in the test directory
+
+    Arguments:
+    testdir -- the directory to look in for tests
+    """
+    names = os.listdir(testdir)
+    tests = []
+    for name in names:
+        if name[:5] == "test-" and name[-3:] == ".py":
+            testname = name[:-3]
+            tests.append(testname)
+    tests.sort()
+    return tests
+
+def run_regression(reference_traces):
+    """Execute regression tests.  Called with cwd set to the 'regression' subdir of ns-3.
+
+    @param reference_traces: reference traces directory, or None for default.
+
+    """
+
+    testdir = "tests"
+    if not os.path.exists(testdir):
+        print "Tests directory does not exist"
+        sys.exit(3)
+
+    dir_name = (wutils.APPNAME + '-' + wutils.VERSION + REGRESSION_SUFFIX)
+    if reference_traces is None:
+        reference_traces = dir_name
+        no_net = False
+    else:
+        no_net = True
+    
+    sys.path.append(testdir)
+    sys.modules['tracediff'] = Regression(testdir, reference_traces)
+
+    if Params.g_options.regression_tests:
+        tests = Params.g_options.regression_tests.split(',')
+    else:
+        tests = _find_tests(testdir)
+
+    print "========== Running Regression Tests =========="
+    env = Params.g_build.env_of_name('default')
+    if not no_net:
+        if env['MERCURIAL']:
+            print "Synchronizing reference traces using Mercurial."
+            if not os.path.exists(reference_traces):
+                print "Cloning " + REGRESSION_TRACES_REPO + dir_name + " from repo."
+                argv = ["hg", "clone", REGRESSION_TRACES_REPO + dir_name, reference_traces]
+                rv = subprocess.Popen(argv).wait()
+            else:
+                _dir = os.getcwd()
+                os.chdir(reference_traces)
+                try:
+                    print "Pulling " + REGRESSION_TRACES_REPO + dir_name + " from repo."
+                    result = subprocess.Popen(["hg", "-q", "pull", REGRESSION_TRACES_REPO + dir_name]).wait()
+                    if not result:
+                        result = subprocess.Popen(["hg", "-q", "update"]).wait()
+                finally:
+                    os.chdir("..")
+                if result:
+                    Params.fatal("Synchronizing reference traces using Mercurial failed.")
+        else:
+            if not os.path.exists(reference_traces):
+                traceball = dir_name + wutils.TRACEBALL_SUFFIX
+                print "Retrieving " + traceball + " from web."
+                urllib.urlretrieve(REGRESSION_TRACES_URL + traceball, traceball)
+                os.system("tar -xjf %s -C .." % (traceball))
+                print "Done."
+
+    if not os.path.exists(reference_traces):
+        print "Reference traces directory (%s) does not exist" % reference_traces
+        return 3
+    
+    bad = []
+
+    for test in tests:
+        try:
+            result = _run_regression_test(test)
+            if result == 0:
+                if Params.g_options.regression_generate:
+                    print "GENERATE " + test
+                else:
+                    print "PASS " + test
+            else:
+                bad.append(test)
+                print "FAIL " + test
+        except NotImplementedError:
+                print "SKIP " + test            
+
+    return len(bad) > 0
+
+
+def _run_regression_test(test):
+    """Run a single test.
+
+    Arguments:
+    test -- the name of the test
+    """
+
+    if os.path.exists("traces"):
+        files = os.listdir("traces")
+        for file in files:
+            if file == '.' or file == '..':
+                continue
+            shutil.rmtree(os.path.join("traces", file), ignore_errors=True)
+    else:
+        os.mkdir("traces")
+    
+    mod = __import__(test, globals(), locals(), [])
+    return mod.run(verbose=(Params.g_options.verbose > 0),
+                   generate=Params.g_options.regression_generate)
+
--- a/regression/tests/test-csma-bridge.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-csma-bridge.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,10 +6,10 @@
 import sys
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
     if tracediff.env['ENABLE_PYTHON_BINDINGS']:
-        return tracediff.run_test(verbose, generate, refDirName,
+        return tracediff.run_test(verbose, generate,
                                   "csma-bridge", pyscript=os.path.join('examples', 'csma-bridge.py'))
     else:
         print >> sys.stderr, "Skipping csma-bridge: Python bindings not available."
--- a/regression/tests/test-csma-broadcast.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-csma-broadcast.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName, "csma-broadcast")
+    return tracediff.run_test(verbose, generate, "csma-broadcast")
--- a/regression/tests/test-csma-multicast.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-csma-multicast.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName, "csma-multicast")
+    return tracediff.run_test(verbose, generate, "csma-multicast")
--- a/regression/tests/test-csma-one-subnet.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-csma-one-subnet.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName, "csma-one-subnet")
+    return tracediff.run_test(verbose, generate, "csma-one-subnet")
--- a/regression/tests/test-csma-packet-socket.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-csma-packet-socket.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,8 +6,8 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         "csma-packet-socket")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regression/tests/test-csma-ping.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+
+"""Generic trace-comparison-type regression test."""
+
+import os
+import shutil
+import tracediff
+
+def run(verbose, generate):
+    """Execute a test."""
+
+    return tracediff.run_test(verbose, generate, "csma-ping")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regression/tests/test-csma-raw-ip-socket.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+
+"""Generic trace-comparison-type regression test."""
+
+import os
+import shutil
+import tracediff
+
+def run(verbose, generate):
+    """Execute a test."""
+
+    return tracediff.run_test(verbose, generate, "csma-raw-ip-socket")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regression/tests/test-csma-star.py	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+
+"""Generic trace-comparison-type regression test."""
+
+import os
+import shutil
+import tracediff
+
+def run(verbose, generate):
+    """Execute a test."""
+
+    return tracediff.run_test(verbose, generate, "csma-star")
--- a/regression/tests/test-realtime-udp-echo.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-realtime-udp-echo.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName, "realtime-udp-echo")
+    return tracediff.run_test(verbose, generate, "realtime-udp-echo")
--- a/regression/tests/test-simple-error-model.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-simple-error-model.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,8 +6,8 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         "simple-error-model")
--- a/regression/tests/test-simple-global-routing.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-simple-global-routing.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,8 +6,8 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         "simple-global-routing")
--- a/regression/tests/test-simple-point-to-point-olsr.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-simple-point-to-point-olsr.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,8 +6,8 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         "simple-point-to-point-olsr")
--- a/regression/tests/test-tcp-large-transfer.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-tcp-large-transfer.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,8 +6,8 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         "tcp-large-transfer")
--- a/regression/tests/test-tcp-nsc-lfn.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-tcp-nsc-lfn.py	Mon Nov 24 06:36:05 2008 +0100
@@ -9,7 +9,7 @@
 import platform
 
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Run a Network Simulation Cradle test involving two TCP streams."""
 
     if not tracediff.env['ENABLE_NSC']:
@@ -29,5 +29,5 @@
         # string might not be the best idea?
         raise "Unknown architecture, not 64 or 32 bit?"
 
-    return tracediff.run_test(verbose, generate, refDirName,
+    return tracediff.run_test(verbose, generate,
         testName, arguments=arguments, refTestName=traceDirName)
--- a/regression/tests/test-udp-echo.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-udp-echo.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
     #print tracediff.env
-    return tracediff.run_test(verbose, generate, refDirName, "udp-echo")
+    return tracediff.run_test(verbose, generate, "udp-echo")
--- a/regression/tests/test-wifi-wired-bridging.py	Tue Nov 04 14:56:32 2008 +0100
+++ b/regression/tests/test-wifi-wired-bridging.py	Mon Nov 24 06:36:05 2008 +0100
@@ -6,7 +6,7 @@
 import shutil
 import tracediff
 
-def run(verbose, generate, refDirName):
+def run(verbose, generate):
     """Execute a test."""
 
-    return tracediff.run_test(verbose, generate, refDirName, "wifi-wired-bridging", ["--SendIp=0"])
+    return tracediff.run_test(verbose, generate, "wifi-wired-bridging", ["--SendIp=0"])
--- a/samples/main-test-sync.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/samples/main-test-sync.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -61,7 +61,7 @@
 {
   NS_LOG_FUNCTION_NOARGS ();
   sleep (1);
-  for (uint32_t i = 0.001; i < 10000; ++i)
+  for (uint32_t i = 0; i < 10000; ++i)
     {
       //
       // Exercise the realtime relative now path
@@ -76,7 +76,7 @@
 {
   NS_LOG_FUNCTION_NOARGS ();
   sleep (1);
-  for (uint32_t i = 0.001; i < 10000; ++i)
+  for (uint32_t i = 0; i < 10000; ++i)
     {
       //
       // Exercise the realtime relative schedule path
@@ -100,7 +100,7 @@
   DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtimeNow(MakeEvent (&first_function));
 
   // 
-  // drive the progression of m_currentTs at a ten millisecond rate
+  // drive the progression of m_currentTs at a ten millisecond rate from the main thread
   //
   for (double d = 0.; d < 14.999; d += 0.01)
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/applications/v4ping/v4ping.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,155 @@
+#include "v4ping.h"
+#include "ns3/icmpv4.h"
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/ipv4-address.h"
+#include "ns3/socket.h"
+#include "ns3/uinteger.h"
+#include "ns3/inet-socket-address.h"
+#include "ns3/packet.h"
+#include "ns3/trace-source-accessor.h"
+#include "ns3/simulator.h"
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("V4Ping");
+NS_OBJECT_ENSURE_REGISTERED (V4Ping);
+
+TypeId 
+V4Ping::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::V4Ping")
+    .SetParent<Application> ()
+    .AddConstructor<V4Ping> ()
+    .AddAttribute ("Remote", 
+		   "The address of the machine we want to ping.",
+		   Ipv4AddressValue (),
+		   MakeIpv4AddressAccessor (&V4Ping::m_remote),
+		   MakeIpv4AddressChecker ())
+    .AddTraceSource ("Rtt",
+		     "The rtt calculated by the ping.",
+		     MakeTraceSourceAccessor (&V4Ping::m_traceRtt));
+    ;
+  return tid;
+}
+
+V4Ping::V4Ping ()
+  : m_socket (0),
+    m_seq (0)
+{}
+V4Ping::~V4Ping ()
+{}
+
+void
+V4Ping::DoDispose (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_socket = 0;
+  Application::DoDispose ();
+}
+
+uint32_t
+V4Ping::GetApplicationId (void) const
+{
+  Ptr<Node> node = GetNode ();
+  for (uint32_t i = 0; i < node->GetNApplications (); ++i)
+    {
+      if (node->GetApplication (i) == this)
+	{
+	  return i;
+	}
+    }
+  NS_ASSERT_MSG (false, "forgot to add application to node");
+  return 0; // quiet compiler
+}
+
+void
+V4Ping::Receive (Ptr<Socket> socket)
+{
+  NS_LOG_FUNCTION (this << socket);
+  while (m_socket->GetRxAvailable () > 0)
+    {
+      Address from;
+      Ptr<Packet> p = m_socket->RecvFrom (0xffffffff, 0, from);
+      NS_LOG_DEBUG ("recv " << p->GetSize () << " bytes");
+      NS_ASSERT (InetSocketAddress::IsMatchingType (from));
+      InetSocketAddress realFrom = InetSocketAddress::ConvertFrom (from);
+      NS_ASSERT (realFrom.GetPort () == 1); // protocol should be icmp.
+      Ipv4Header ipv4;
+      p->RemoveHeader (ipv4);
+      NS_ASSERT (ipv4.GetProtocol () == 1); // protocol should be icmp.
+      Icmpv4Header icmp;
+      p->RemoveHeader (icmp);
+      if (icmp.GetType () == Icmpv4Header::ECHO_REPLY)
+	{
+	  Icmpv4Echo echo;
+	  p->RemoveHeader (echo);
+	  if (echo.GetSequenceNumber () == (m_seq - 1) &&
+	      echo.GetIdentifier () == 0)
+	    {
+	      Ptr<const Packet> data = echo.GetData ();
+	      if (data->GetSize () == 16)
+		{
+		  uint32_t *buf = (uint32_t *)data->PeekData ();
+		  if (buf[0] == GetNode ()->GetId () &&
+		      buf[1] == GetApplicationId ())
+		    {
+		      int64_t ts = buf[3];
+		      ts <<= 32;
+		      ts |= buf[2];
+		      Time sendTime = TimeStep (ts);
+		      NS_ASSERT (Simulator::Now () > sendTime);
+		      Time delta = Simulator::Now () - sendTime;
+		      m_traceRtt (delta);
+		    }
+		}
+	    }
+	}
+    }
+}
+
+void 
+V4Ping::StartApplication (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_socket = Socket::CreateSocket (GetNode (), TypeId::LookupByName ("ns3::Ipv4RawSocketFactory"));
+  NS_ASSERT (m_socket != 0);
+  m_socket->SetAttribute ("Protocol", UintegerValue (1)); // icmp
+  m_socket->SetRecvCallback (MakeCallback (&V4Ping::Receive, this));
+  InetSocketAddress src = InetSocketAddress (Ipv4Address::GetAny (), 0);
+  int status;
+  status = m_socket->Bind (src);
+  NS_ASSERT (status != -1);
+  InetSocketAddress dst = InetSocketAddress (m_remote, 0);
+  status = m_socket->Connect (dst);
+  NS_ASSERT (status != -1);
+  Ptr<Packet> p = Create<Packet> ();
+  Icmpv4Echo echo;
+  echo.SetSequenceNumber (m_seq);
+  m_seq++;
+  echo.SetIdentifier (0);
+  uint32_t data[4];
+  data[0] = GetNode ()->GetId ();
+  data[1] = GetApplicationId ();
+  int64_t now = Simulator::Now ().GetTimeStep ();
+  data[2] = now & 0xffffffff;
+  now >>= 32;
+  data[3] = now & 0xffffffff;
+  Ptr<Packet> dataPacket = Create<Packet> ((uint8_t *) &data, 16);
+  echo.SetData (dataPacket);
+  p->AddHeader (echo);
+  Icmpv4Header header;
+  header.SetType (Icmpv4Header::ECHO);
+  header.SetCode (0);
+  p->AddHeader (header);
+  m_socket->Send (p, 0);
+  
+}
+void 
+V4Ping::StopApplication (void)
+{
+  NS_LOG_FUNCTION (this);
+}
+
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/applications/v4ping/v4ping.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,36 @@
+#ifndef V4PING_H
+#define V4PING_H
+
+#include "ns3/application.h"
+#include "ns3/traced-callback.h"
+#include "ns3/nstime.h"
+
+namespace ns3 {
+
+class Socket;
+
+class V4Ping : public Application
+{
+public:
+  static TypeId GetTypeId (void);
+
+  V4Ping ();
+  virtual ~V4Ping ();
+
+private:
+  // inherited from Application base class.
+  virtual void StartApplication (void);
+  virtual void StopApplication (void);
+  virtual void DoDispose (void);
+  uint32_t GetApplicationId (void) const;
+  void Receive (Ptr<Socket> socket);
+
+  Ipv4Address m_remote;
+  Ptr<Socket> m_socket;
+  uint16_t m_seq;
+  TracedCallback<Time> m_traceRtt;
+};
+
+} // namespace ns3
+
+#endif /* V4PING_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/applications/v4ping/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,13 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+    module = bld.create_ns3_module('v4ping', ['node'])
+    module.source = [
+        'v4ping.cc',
+        ]
+    headers = bld.create_obj('ns3header')
+    headers.module = 'v4ping'
+    headers.source = [
+        'v4ping.h',
+        ]
+
--- a/src/contrib/stats/sqlite-data-output.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/contrib/stats/sqlite-data-output.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -33,7 +33,6 @@
 
 NS_LOG_COMPONENT_DEFINE("SqliteDataOutput");
 
-
 //--------------------------------------------------------------
 //----------------------------------------------
 SqliteDataOutput::SqliteDataOutput() :
@@ -232,7 +231,7 @@
     m_runLabel << "', '" <<
     key << "', '" <<
     variable << "', " <<
-    val << ")";
+    val.GetTimeStep() << ")";
   m_owner->Exec(sstr.str());
   // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton
 }
--- a/src/core/object.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/core/object.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -111,10 +111,11 @@
 {
   NS_ASSERT (CheckLoose ());
   const Object *currentObject = this;
+  TypeId objectTid = Object::GetTypeId ();
   do {
     NS_ASSERT (currentObject != 0);
     TypeId cur = currentObject->GetInstanceTypeId ();
-    while (cur != tid && cur != Object::GetTypeId ())
+    while (cur != tid && cur != objectTid)
       {
         cur = cur.GetParent ();
       }
--- a/src/core/type-id.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/core/type-id.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -365,10 +365,6 @@
  *         The TypeId class
  *********************************************************************/
 
-TypeId::TypeId ()
-  : m_tid (0)
-{}
-
 TypeId::TypeId (const char *name)
 {
   uint16_t uid = Singleton<IidManager>::Get ()->AllocateUid (name);
@@ -380,8 +376,6 @@
 TypeId::TypeId (uint16_t tid)
   : m_tid (tid)
 {}
-TypeId::~TypeId ()
-{}
 TypeId 
 TypeId::LookupByName (std::string name)
 {
@@ -692,16 +686,6 @@
 
 ATTRIBUTE_HELPER_CPP (TypeId);
 
-bool operator == (TypeId a, TypeId b)
-{
-  return a.m_tid == b.m_tid;
-}
-
-bool operator != (TypeId a, TypeId b)
-{
-  return a.m_tid != b.m_tid;
-}
-
 bool operator < (TypeId a, TypeId b)
 {
   return a.m_tid < b.m_tid;
--- a/src/core/type-id.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/core/type-id.h	Mon Nov 24 06:36:05 2008 +0100
@@ -351,8 +351,10 @@
   void SetUid (uint16_t tid);
 
   // construct an invalid TypeId.
-  TypeId ();
-  ~TypeId ();
+  inline TypeId ();
+  inline TypeId (const TypeId &o);
+  inline TypeId &operator = (const TypeId &o);
+  inline ~TypeId ();
 
 private:
   friend class AttributeList;
@@ -377,8 +379,8 @@
 
 std::ostream & operator << (std::ostream &os, TypeId tid);
 std::istream & operator >> (std::istream &is, TypeId &tid);
-bool operator == (TypeId a, TypeId b);
-bool operator != (TypeId a, TypeId b);
+inline bool operator == (TypeId a, TypeId b);
+inline bool operator != (TypeId a, TypeId b);
 bool operator <  (TypeId a, TypeId b);
 
 /**
@@ -393,6 +395,28 @@
 
 namespace ns3 {
 
+TypeId::TypeId ()
+  : m_tid (0) {}
+TypeId::TypeId (const TypeId &o)
+  : m_tid (o.m_tid) {}
+TypeId &TypeId::operator = (const TypeId &o)
+{
+  m_tid = o.m_tid;
+  return *this;
+}
+TypeId::~TypeId ()
+{}
+inline bool operator == (TypeId a, TypeId b)
+{
+  return a.m_tid == b.m_tid;
+}
+
+inline bool operator != (TypeId a, TypeId b)
+{
+  return a.m_tid != b.m_tid;
+}
+
+
 /*************************************************************************
  *   The TypeId implementation which depends on templates
  *************************************************************************/
--- a/src/devices/bridge/bridge-net-device.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/bridge/bridge-net-device.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -290,16 +290,8 @@
   return true;
 }
 
-
 Address
-BridgeNetDevice::GetMulticast (void) const
-{
-  return Mac48Address ("01:00:5e:00:00:00");
-}
-
-
-Address
-BridgeNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
+BridgeNetDevice::GetMulticast (Ipv4Address multicastGroup) const
 {
  NS_LOG_FUNCTION (this << multicastGroup);
  Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup);
@@ -388,6 +380,10 @@
   NetDevice::DoDispose ();
 }
 
-
+Address BridgeNetDevice::GetMulticast (Ipv6Address addr) const
+{
+  NS_LOG_FUNCTION (this << addr);
+  return Mac48Address::GetMulticast (addr);
+}
 
 } // namespace ns3
--- a/src/devices/bridge/bridge-net-device.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/bridge/bridge-net-device.h	Mon Nov 24 06:36:05 2008 +0100
@@ -96,8 +96,7 @@
   virtual bool IsBroadcast (void) const;
   virtual Address GetBroadcast (void) const;
   virtual bool IsMulticast (void) const;
-  virtual Address GetMulticast (void) const;
-  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
   virtual bool IsPointToPoint (void) const;
   virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
   virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
@@ -107,6 +106,7 @@
   virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
   virtual void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb);
   virtual bool SupportsSendFrom () const;
+  virtual Address GetMulticast (Ipv6Address addr) const;
 
 protected:
   virtual void DoDispose (void);
--- a/src/devices/csma/csma-net-device.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/csma/csma-net-device.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -72,7 +72,7 @@
                    BooleanValue (true),
                    MakeBooleanAccessor (&CsmaNetDevice::m_receiveEnable),
                    MakeBooleanChecker ())
-    .AddAttribute ("RxErrorModel", 
+    .AddAttribute ("ReceiveErrorModel", 
                    "The receiver error model used to simulate packet loss",
                    PointerValue (),
                    MakePointerAccessor (&CsmaNetDevice::m_receiveErrorModel),
@@ -600,6 +600,20 @@
   NS_LOG_FUNCTION (packet << senderDevice);
   NS_LOG_LOGIC ("UID is " << packet->GetUid ());
 
+  /* IPv6 support*/
+  uint8_t mac[6];
+  Mac48Address multicast6AllNodes("33:33:00:00:00:01");
+  Mac48Address multicast6AllRouters("33:33:00:00:00:02");
+  Mac48Address multicast6AllHosts("33:33:00:00:00:03");
+  Mac48Address multicast6Node; /* multicast address addressed to our MAC address */
+
+  /* generate IPv6 multicast ethernet destination that nodes will accept */
+  GetAddress().CopyTo(mac);
+  mac[0]=0x33;
+  mac[1]=0x33;
+  /* mac[2]=0xff; */
+  multicast6Node.CopyFrom(mac);
+
   //
   // We never forward up packets that we sent. Real devices don't do this since
   // their receivers are disabled during send, so we don't. Drop the packet
@@ -672,7 +686,11 @@
           packetType = PACKET_BROADCAST;
           m_rxTrace (originalPacket);
         }
-      else if (header.GetDestination ().IsMulticast ())
+      else if (header.GetDestination ().IsMulticast () ||
+          header.GetDestination() == multicast6Node ||
+          header.GetDestination() == multicast6AllNodes ||
+          header.GetDestination() == multicast6AllRouters ||
+          header.GetDestination() == multicast6AllHosts)
         {
           packetType = PACKET_MULTICAST;          
           m_rxTrace (originalPacket);
@@ -796,14 +814,7 @@
 }
 
   Address 
-CsmaNetDevice::GetMulticast (void) const
-{
-  NS_LOG_FUNCTION_NOARGS ();
-  return Mac48Address::GetMulticastPrefix ();
-}
-
-  Address 
-CsmaNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
+CsmaNetDevice::GetMulticast (Ipv4Address multicastGroup) const
 {
   NS_LOG_FUNCTION (multicastGroup);
 
@@ -929,6 +940,14 @@
   m_rxCallback = cb;
 }
 
+Address CsmaNetDevice::GetMulticast (Ipv6Address addr) const
+{
+  Mac48Address ad = Mac48Address::GetMulticast (addr);
+
+  NS_LOG_LOGIC("MAC IPv6 multicast address is " << ad);
+  return ad;
+}
+
   void 
 CsmaNetDevice::SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb)
 {
--- a/src/devices/csma/csma-net-device.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/csma/csma-net-device.h	Mon Nov 24 06:36:05 2008 +0100
@@ -319,7 +319,6 @@
   virtual bool IsBroadcast (void) const;
   virtual Address GetBroadcast (void) const;
   virtual bool IsMulticast (void) const;
-  virtual Address GetMulticast (void) const;
 
   /**
    * \brief Make and return a MAC multicast address using the provided
@@ -343,7 +342,7 @@
    * \see Mac48Address
    * \see Address
    */
-  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
 
   /**
    * Is this a point to point link?
@@ -393,6 +392,15 @@
    */
   virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
 
+  /**
+   * \brief Get the MAC multicast address corresponding
+   * to the IPv6 address provided.
+   * \param addr IPv6 address
+   * \return the MAC multicast address
+   * \warning Calling this method is invalid if IsMulticast returns not true.
+   */
+  virtual Address GetMulticast (Ipv6Address addr) const;
+
 
   virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
   virtual bool SupportsSendFrom (void) const;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu-encode-decode.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,110 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) University of Washington
+ *
+ * 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
+ */
+
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
+namespace ns3 {
+
+/**
+ * \brief Convert a byte buffer to a string containing a hex representation
+ * of the buffer.  Make the string pretty by adding a colon (':') between
+ * the hex.
+ *
+ * \param buffer The input buffer to be converted.
+ * \param len The length of the input buffer.
+ * \returns A string containing a hex representation of the data in buffer.
+ */
+  std::string
+EmuBufferToString (uint8_t *buffer, uint32_t len)
+{
+  std::ostringstream oss;
+  //
+  // Tell the stream to make hex characters, zero-filled
+  //
+  oss.setf (std::ios::hex, std::ios::basefield);
+  oss.fill('0');
+
+  //
+  // Loop through the buffer, separating the two-digit-wide hex bytes
+  // with a colon.
+  //
+  for (uint8_t i = 0; i < len; i++)
+    {
+      oss << ":" << std::setw (2) << (uint32_t)buffer[i];
+    }
+  return oss.str ();
+}
+
+/**
+ * \brief Convert string encoded by the inverse function (EmuBufferToString)
+ * back into a byte buffer.
+ *
+ * \param s The input string.
+ * \param buffer The buffer to initialize with the converted bits.
+ * \param len The length of the data that is valid in the buffer.
+ * \returns True indicates a successful conversion.
+ */
+  bool
+EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len)
+{
+  //
+  // If the string was made by our inverse function, the string length must
+  // be a multiple of three characters in length.  Use this fact to do a
+  // quick reasonableness test.
+  //
+  if ((s.length () % 3) != 0)
+    {
+      return false;
+    }
+
+  std::istringstream iss;
+  iss.str (s);
+
+  uint8_t n = 0;
+
+  while (iss.good ())
+    {
+      //
+      // The first character in the "triplet" we're working on is always the
+      // the ':' separator.  Read that into a char and make sure we're skipping
+      // what we think we're skipping.
+      //
+      char c;
+      iss.read (&c, 1);
+      if (c != ':')
+        {
+          return false;
+        }
+      
+      //
+      // And then read in the real bits and convert them.
+      //
+      uint32_t tmp;
+      iss >> std::hex >> tmp;
+      buffer[n] = tmp;
+      n++;
+    }
+
+  *len = n;
+  return true;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu-encode-decode.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,33 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 University of Washington
+ *
+ * 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
+ */
+
+#ifndef EMU_ENCODE_DECODE_H
+#define EMU_ENCODE_DECODE_H
+
+#include <string>
+
+namespace ns3 {
+
+  std::string EmuBufferToString (uint8_t *buffer, uint32_t len);
+  bool EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len);
+
+
+} // namespace ns3
+
+#endif // EMU_ENCODE_DECODE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu-net-device.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,923 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 University of Washington
+ *
+ * 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
+ */
+
+#include "emu-net-device.h"
+#include "emu-encode-decode.h"
+
+#include "ns3/log.h"
+#include "ns3/queue.h"
+#include "ns3/simulator.h"
+#include "ns3/realtime-simulator-impl.h"
+#include "ns3/mac48-address.h"
+#include "ns3/ethernet-header.h"
+#include "ns3/ethernet-trailer.h"
+#include "ns3/llc-snap-header.h"
+#include "ns3/trace-source-accessor.h"
+#include "ns3/pointer.h"
+#include "ns3/channel.h"
+#include "ns3/system-thread.h"
+#include "ns3/string.h"
+#include "ns3/boolean.h"
+
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/ioctl.h>
+#include <net/ethernet.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netpacket/packet.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <limits>
+#include <stdlib.h>
+
+NS_LOG_COMPONENT_DEFINE ("EmuNetDevice");
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (EmuNetDevice);
+
+#define EMU_MAGIC 65867
+
+TypeId 
+EmuNetDevice::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::EmuNetDevice")
+    .SetParent<NetDevice> ()
+    .AddConstructor<EmuNetDevice> ()
+    .AddAttribute ("Address", 
+                   "The ns-3 MAC address of this (virtual) device.",
+                   Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")),
+                   MakeMac48AddressAccessor (&EmuNetDevice::m_address),
+                   MakeMac48AddressChecker ())
+    .AddAttribute ("DeviceName", 
+                   "The name of the underlying real device (e.g. eth1).",
+                   StringValue ("eth1"),
+                   MakeStringAccessor (&EmuNetDevice::m_deviceName),
+                   MakeStringChecker ())
+    .AddAttribute ("Start", 
+                   "The simulation time at which to spin up the device thread.",
+                   TimeValue (Seconds (0.)),
+                   MakeTimeAccessor (&EmuNetDevice::m_tStart),
+                   MakeTimeChecker ())
+    .AddAttribute ("Stop", 
+                   "The simulation time at which to tear down the device thread.",
+                   TimeValue (Seconds (0.)),
+                   MakeTimeAccessor (&EmuNetDevice::m_tStop),
+                   MakeTimeChecker ())
+    .AddAttribute ("TxQueue", 
+                   "A queue to use as the transmit queue in the device.",
+                   PointerValue (),
+                   MakePointerAccessor (&EmuNetDevice::m_queue),
+                   MakePointerChecker<Queue> ())
+    .AddTraceSource ("Rx", 
+                     "Trace source to fire on reception of a MAC packet.",
+                     MakeTraceSourceAccessor (&EmuNetDevice::m_rxTrace))
+    .AddTraceSource ("Drop", 
+                     "Trace source to fire on when a MAC packet is dropped.",
+                     MakeTraceSourceAccessor (&EmuNetDevice::m_dropTrace))
+    ;
+  return tid;
+}
+
+
+EmuNetDevice::EmuNetDevice () 
+: 
+  m_startEvent (),
+  m_stopEvent (),
+  m_sock (-1),
+  m_readThread (0),
+  m_ifIndex (std::numeric_limits<uint32_t>::max ()),  // absurdly large value
+  m_sll_ifindex (-1),
+  m_name ("Emu NetDevice")
+{
+  NS_LOG_FUNCTION (this);
+  Start (m_tStart);
+}
+
+EmuNetDevice::~EmuNetDevice ()
+{
+}
+
+void 
+EmuNetDevice::DoDispose()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  m_node = 0;
+  NetDevice::DoDispose ();
+}
+
+void
+EmuNetDevice::Start (Time tStart)
+{
+  NS_LOG_FUNCTION (tStart);
+
+  //
+  // Cancel any pending start event and schedule a new one at some relative time in the future.
+  //
+  Simulator::Cancel (m_startEvent);
+  m_startEvent = Simulator::Schedule (tStart, &EmuNetDevice::StartDevice, this);
+}
+
+  void
+EmuNetDevice::Stop (Time tStop)
+{
+  NS_LOG_FUNCTION (tStop);
+  //
+  // Cancel any pending stop event and schedule a new one at some relative time in the future.
+  //
+  Simulator::Cancel (m_stopEvent);
+  m_startEvent = Simulator::Schedule (tStop, &EmuNetDevice::StopDevice, this);
+}
+
+  void
+EmuNetDevice::StartDevice (void)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  //
+  // Spin up the emu net device and start receiving packets.
+  //
+  if (m_sock != -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Device is already started");
+    }
+
+  NS_LOG_LOGIC ("Creating socket");
+  //
+  // Call out to a separate process running as suid root in order to get a raw 
+  // socket.  We do this to avoid having the entire simulation running as root.
+  // If this method returns, we'll have a raw socket waiting for us in m_sock.
+  //
+  CreateSocket ();
+
+  //
+  // Figure out which interface index corresponds to the device name in the corresponding attribute.
+  //
+  struct ifreq ifr;
+  bzero (&ifr, sizeof(ifr));
+  strncpy ((char *)ifr.ifr_name, m_deviceName.c_str (), IFNAMSIZ);
+
+  NS_LOG_LOGIC ("Getting interface index");
+  int32_t rc = ioctl (m_sock, SIOCGIFINDEX, &ifr);
+  if (rc == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Can't get interface index");
+    }
+
+  //
+  // Save the real interface index for later calls to sendto
+  //
+  m_sll_ifindex = ifr.ifr_ifindex;
+
+  //
+  // Bind the socket to the interface we just found.
+  //
+  struct sockaddr_ll ll;
+  bzero (&ll, sizeof(ll));
+
+  ll.sll_family = AF_PACKET;
+  ll.sll_ifindex = m_sll_ifindex;
+  ll.sll_protocol = htons(ETH_P_ALL); 
+
+  NS_LOG_LOGIC ("Binding socket to interface");
+
+  rc = bind (m_sock, (struct sockaddr *)&ll, sizeof (ll));
+  if (rc == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Can't bind to specified interface");
+    }
+
+  rc = ioctl(m_sock, SIOCGIFFLAGS, &ifr);
+  if (rc == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Can't get interface flags");
+    }
+  
+  //
+  // This device only works if the underlying interface is up in promiscuous 
+  // mode.  We could have turned it on in the socket creator, but the situation
+  // is that we expect these devices to be used in conjunction with virtual 
+  // machines with connected host-only (simulated) networks, or in a testbed.
+  // There is a lot of setup and configuration happening outside of this one 
+  // issue, and we expect that configuration to include choosing a valid
+  // interface (e.g, "ath1"), ensuring that the device supports promiscuous 
+  // mode, and placing it in promiscuous mode.  We just make sure of the
+  // end result.
+  //
+  if ((ifr.ifr_flags & IFF_PROMISC) == 0)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode");
+    }
+
+  //
+  // Now spin up a read thread to read packets.
+  //
+  if (m_readThread != 0)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Receive thread is already running");
+    }
+
+  NS_LOG_LOGIC ("Spinning up read thread");
+
+  m_readThread = Create<SystemThread> (MakeCallback (&EmuNetDevice::ReadThread, this));
+  m_readThread->Start ();
+
+  NotifyLinkUp ();
+}
+
+void
+EmuNetDevice::CreateSocket (void)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  //
+  // We want to create a raw socket for our net device.  Unfortunately for us
+  // you have to have root privileges to do that.  Instead of running the 
+  // entire simulation as root, we decided to make a small program who's whole
+  // reason for being is to run as suid root and create a raw socket.  We're
+  // going to fork and exec that program soon, but we need to have a socket
+  // to talk to it with.  So we create a local interprocess (Unix) socket 
+  // for that purpose.
+  //
+  int sock = socket (PF_UNIX, SOCK_DGRAM, 0);
+  if (sock == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): Unix socket creation error, errno = " << strerror (errno));
+    }
+
+  //
+  // Bind to that socket and let the kernel allocate an endpoint
+  //
+  struct sockaddr_un un;
+  memset (&un, 0, sizeof (un));
+  un.sun_family = AF_UNIX;
+  int status = bind (sock, (struct sockaddr*)&un, sizeof (sa_family_t));
+  if (status == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): Could not bind(): errno = " << strerror (errno));
+    }
+
+  NS_LOG_INFO ("Created Unix socket");
+  NS_LOG_INFO ("sun_family = " << un.sun_family);
+  NS_LOG_INFO ("sun_path = " << un.sun_path);
+
+  //
+  // We have a socket here, but we want to get it there -- to the program we're
+  // going to exec.  What we'll do is to do a getsockname and then encode the
+  // resulting address information as a string, and then send the string to the
+  // program as an argument.  So we need to get the sock name.
+  //
+  socklen_t len = sizeof (un);
+  status = getsockname (sock, (struct sockaddr*)&un, &len);
+  if (status == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): Could not getsockname(): errno = " << strerror (errno));
+    }
+
+  //
+  // Now encode that socket name (family and path) as a string of hex digits
+  //
+  std::string path = EmuBufferToString((uint8_t *)&un, len);
+  NS_LOG_INFO ("Encoded Unix socket as \"" << path << "\"");
+  //
+  // Fork and exec the process to create our socket.  If we're us (the parent)
+  // we wait for the child (the socket creator) to complete and read the 
+  // socket it created using the ancillary data mechanism.
+  //
+  pid_t pid = ::fork ();
+  if (pid == 0)
+    {
+      NS_LOG_DEBUG ("Child process");
+
+      //
+      // build a command line argument from the encoded endpoint string that 
+      // the socket creation process will use to figure out how to respond to
+      // the (now) parent process.
+      //
+      std::ostringstream oss;
+      oss << "-p" << path;
+      NS_LOG_INFO ("Parameters set to \"" << oss.str () << "\"");
+
+      //
+      // Execute the socket creation process image.
+      //
+      status = ::execl (FindCreator ().c_str (), "emu-sock-creator", oss.str ().c_str (), (char *)NULL);
+
+      //
+      // If the execl successfully completes, it never returns.  If it returns it failed or the OS is
+      // broken.  In either case, we bail.
+      //
+      NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): Back from execl(), errno = " << ::strerror (errno));
+    }
+  else
+    {
+      NS_LOG_DEBUG ("Parent process");
+      //
+      // We're the process running the emu net device.  We need to wait for the
+      // socket creator process to finish its job.
+      //
+      int st;
+      pid_t waited = waitpid (pid, &st, 0);
+      if (waited == -1)
+	{
+	  NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): waitpid() fails, errno = " << strerror (errno));
+	}
+      NS_ASSERT_MSG (pid == waited, "EmuNetDevice::CreateSocket(): pid mismatch");
+
+      //
+      // Check to see if the socket creator exited normally and then take a 
+      // look at the exit code.  If it bailed, so should we.  If it didn't
+      // even exit normally, we bail too.
+      //
+      if (WIFEXITED (st))
+	{
+          int exitStatus = WEXITSTATUS (st);
+          if (exitStatus != 0)
+            {
+              NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): socket creator exited normally with status " << exitStatus);
+            }
+	}
+      else 
+	{
+          NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): socket creator exited abnormally");
+	}
+
+      //
+      // At this point, the socket creator has run successfully and should 
+      // have created our raw socket and sent it back to the socket address
+      // we provided.  Our socket should be waiting on the Unix socket.  We've
+      // got to do a bunch of grunto work to get at it, though.
+      //
+      // The struct iovec below is part of a scatter-gather list.  It describes a
+      // buffer.  In this case, it describes a buffer (an integer) that will
+      // get the data that comes back from the socket creator process.  It will
+      // be a magic number that we use as a consistency/sanity check.
+      // 
+      struct iovec iov;
+      uint32_t magic;
+      iov.iov_base = &magic;
+      iov.iov_len = sizeof(magic);
+
+      //
+      // The CMSG macros you'll see below are used to create and access control 
+      // messages (which is another name for ancillary data).  The ancillary 
+      // data is made up of pairs of struct cmsghdr structures and associated
+      // data arrays.
+      //
+      // First, we're going to allocate a buffer on the stack to receive our 
+      // data array (that contains the socket).  Sometimes you'll see this called
+      // an "ancillary element" but the msghdr uses the control message termimology
+      // so we call it "control."
+      //
+      size_t msg_size = sizeof(int);
+      char control[CMSG_SPACE(msg_size)];
+
+      //
+      // There is a msghdr that is used to minimize the number of parameters
+      // passed to recvmsg (which we will use to receive our ancillary data).  
+      // This structure uses terminology corresponding to control messages, so
+      // you'll see msg_control, which is the pointer to the ancillary data and 
+      // controllen which is the size of the ancillary data array.
+      //
+      // So, initialize the message header that describes the ancillary/control
+      // data we expect to receive and point it to buffer.
+      //
+      struct msghdr msg;
+      msg.msg_name = 0;
+      msg.msg_namelen = 0;
+      msg.msg_iov = &iov;
+      msg.msg_iovlen = 1;
+      msg.msg_control = control;
+      msg.msg_controllen = sizeof (control);
+      msg.msg_flags = 0;
+
+      //
+      // Now we can actually receive the interesting bits from the socket
+      // creator process.
+      //
+      ssize_t bytesRead = recvmsg (sock, &msg, 0);
+      if (bytesRead != sizeof(int))
+	{
+          NS_FATAL_ERROR ("EmuNetDevice::CreateSocket(): Wrong byte count from socket creator");
+	}
+
+      //
+      // There may be a number of message headers/ancillary data arrays coming in.
+      // Let's look for the one with a type SCM_RIGHTS which indicates it' the
+      // one we're interested in.
+      //
+      struct cmsghdr *cmsg;
+      for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) 
+	{
+	  if (cmsg->cmsg_level == SOL_SOCKET &&
+	      cmsg->cmsg_type == SCM_RIGHTS)
+	    {
+              //
+              // This is the type of message we want.  Check to see if the magic 
+              // number is correct and then pull out the socket we care about if
+              // it matches
+              //
+              if (magic == EMU_MAGIC)
+                {
+                  NS_LOG_INFO ("Got SCM_RIGHTS with correct magic " << magic);
+                  int *rawSocket = (int*)CMSG_DATA (cmsg);
+                  NS_LOG_INFO ("Got the socket from the socket creator = " << *rawSocket);
+                  m_sock = *rawSocket;
+                  return;
+                }
+              else
+                {
+                  NS_LOG_INFO ("Got SCM_RIGHTS, but with bad magic " << magic);                  
+                }
+	    }
+	}
+      NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
+    }
+}
+
+std::string
+EmuNetDevice::FindCreator (void)
+{
+  struct stat st;
+  std::string debug = "./build/debug/src/devices/emu/emu-sock-creator";
+  std::string optimized = "./build/optimized/src/devices/emu/emu-sock-creator";
+
+  if (::stat (debug.c_str (), &st) == 0)
+    {
+      return debug;
+    }
+
+  if (::stat (optimized.c_str (), &st) == 0)
+    {
+      return optimized;
+    }
+
+  NS_FATAL_ERROR ("EmuNetDevice::FindCreator(): Couldn't find creator");
+  return ""; // quiet compiler
+}
+
+void
+EmuNetDevice::StopDevice (void)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  close (m_sock);
+  m_sock = -1;
+
+  NS_ASSERT_MSG (m_readThread != 0, "EmuNetDevice::StopDevice(): Receive thread is not running");
+
+  NS_LOG_LOGIC ("Joining read thread");
+  m_readThread->Join ();
+  m_readThread = 0;
+}
+
+void
+EmuNetDevice::ForwardUp (uint8_t *buf, uint32_t len)
+{
+  NS_LOG_FUNCTION (buf << len);
+
+  //
+  // Create a packet out of the buffer we received and free that buffer.
+  //
+  Ptr<Packet> packet = Create<Packet> (reinterpret_cast<const uint8_t *> (buf), len);
+  free (buf);
+  buf = 0;
+
+  //
+  // Trace sinks will expect complete packets, not packets without some of the
+  // headers.
+  //
+  Ptr<Packet> originalPacket = packet->Copy ();
+
+  //
+  // Checksum the packet
+  //
+  EthernetTrailer trailer;
+  packet->RemoveTrailer (trailer);
+  trailer.CheckFcs (packet);
+
+  EthernetHeader header (false);
+  packet->RemoveHeader (header);
+
+  NS_LOG_LOGIC ("Pkt source is " << header.GetSource ());
+  NS_LOG_LOGIC ("Pkt destination is " << header.GetDestination ());
+
+  LlcSnapHeader llc;
+  packet->RemoveHeader (llc);
+  uint16_t protocol = llc.GetType ();
+
+  PacketType packetType;
+      
+  if (header.GetDestination ().IsBroadcast ())
+    {
+      NS_LOG_LOGIC ("Pkt destination is PACKET_BROADCAST");
+      packetType = NS3_PACKET_BROADCAST;
+    }
+  else if (header.GetDestination ().IsMulticast ())
+    {
+      NS_LOG_LOGIC ("Pkt destination is PACKET_MULTICAST");
+      packetType = NS3_PACKET_MULTICAST;
+    }
+  else if (header.GetDestination () == m_address)
+    {
+      NS_LOG_LOGIC ("Pkt destination is PACKET_HOST");
+      packetType = NS3_PACKET_HOST;
+    }
+  else
+    {
+      NS_LOG_LOGIC ("Pkt destination is PACKET_OTHERHOST");
+      packetType = NS3_PACKET_OTHERHOST;
+    }
+
+  if (!m_promiscRxCallback.IsNull ())
+    {
+      NS_LOG_LOGIC ("calling m_promiscRxCallback");
+      m_promiscRxCallback (this, packet->Copy (), protocol, header.GetSource (), header.GetDestination (), packetType);
+    }
+
+  if (packetType != NS3_PACKET_OTHERHOST)
+    {
+      m_rxTrace (originalPacket);
+      NS_LOG_LOGIC ("calling m_rxCallback");
+      m_rxCallback (this, packet, protocol, header.GetSource ());
+    }
+}
+
+void
+EmuNetDevice::ReadThread (void)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  //
+  // It's important to remember that we're in a completely different thread than the simulator is running in.  We
+  // need to synchronize with that other thread to get the packet up into ns-3.  What we will need to do is to schedule 
+  // a method to forward up the packet using the multithreaded simulator we are most certainly running.  However, I just 
+  // said it -- we are talking about two threads here, so it is very, very dangerous to do any kind of reference couning
+  // on a shared object.  Just don't do it.  So what we're going to do is to allocate a buffer on the heap and pass that
+  // buffer into the ns-3 context thread where it will create the packet.
+  //
+
+  int32_t len = -1;
+  struct sockaddr_ll addr;
+  socklen_t addrSize = sizeof (addr);
+
+  for (;;) 
+    {
+      uint32_t bufferSize = 65536;
+      uint8_t *buf = (uint8_t *)malloc (bufferSize);
+      if (buf == 0)
+        {
+          NS_FATAL_ERROR ("EmuNetDevice::ReadThread(): malloc packet buffer failed");
+        }
+
+      NS_LOG_LOGIC ("Calling recvfrom");
+      len = recvfrom (m_sock, buf, bufferSize, 0, (struct sockaddr *)&addr, &addrSize);
+
+      if (len == -1)
+        {
+          free (buf);
+          buf = 0;
+          return;
+        }
+
+      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Received packet");
+      NS_LOG_INFO ("EmuNetDevice::ReadThread(): Scheduling handler");
+      DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtimeNow (
+        MakeEvent (&EmuNetDevice::ForwardUp, this, buf, len));
+      buf = 0;
+    }
+}
+
+bool 
+EmuNetDevice::Send (Ptr<Packet> packet, const Address &dest, uint16_t protocolNumber)
+{
+  NS_LOG_FUNCTION (packet << dest << protocolNumber);
+  //
+  // The immediate questions here are how are we going to encapsulate packets and what do we use as the MAC source and 
+  // destination (hardware) addresses?
+  //
+  // If we return false from EmuNetDevice::NeedsArp, the ArpIpv4Interface will pass the broadcast address as the 
+  // hardware (Ethernet) destination by default.  If we return true from EmuNetDevice::NeedsArp, then the hardware
+  // destination is actually meaningful, but we'll have an ns-3 ARP running on this device.  There can also be an ARP
+  // running on the underlying OS so we have to be very careful, both about multiple ARPs and also about TCP, UDP, etc.
+  //
+  // We are operating in promiscuous mode on the receive side (all ns-3 net devices are required to implement the 
+  // promiscuous callback in a meaningful way), so we have an option regarding the hardware addresses.  We don't actually have
+  // to use the real hardware addresses and IP addresses of the underlying system.  We can completely use MAC-spoofing to
+  // fake out the OS by using the ns-3 assigned MAC address (and also the ns-3 assigned IP addresses).  Ns-3 starts its 
+  // MAC address allocation using the OUI (vendor-code) 00:00:00 which is unassigned to any organization and is a globally
+  // administered address, so there shouldn't be any collisions with real hardware.
+  //
+  // So what we do is we return true from EmuNetDevice::NeedsArp which tells ns-3 to use its own ARP.  We spoof the 
+  // MAC address of the device and use promiscuous mode to receive traffic destined to that address.
+  //
+  return SendFrom (packet, m_address, dest, protocolNumber);
+}
+
+bool 
+EmuNetDevice::SendFrom (Ptr<Packet> packet, const Address &src, const Address &dest, uint16_t protocolNumber)
+{
+  NS_LOG_FUNCTION (packet << src << dest << protocolNumber);
+
+  if (IsLinkUp () == false)
+    {
+      NS_LOG_LOGIC ("Link is down, returning");
+      return false;
+    }
+
+  Mac48Address destination = Mac48Address::ConvertFrom (dest);
+  Mac48Address source = Mac48Address::ConvertFrom (src);
+
+  NS_LOG_LOGIC ("Transmit packet with UID " << packet->GetUid ());
+  NS_LOG_LOGIC ("Transmit packet from " << source);
+  NS_LOG_LOGIC ("Transmit packet to " << destination);
+
+#if 0
+  {
+    struct ifreq ifr;
+    bzero (&ifr, sizeof(ifr));
+    strncpy ((char *)ifr.ifr_name, m_deviceName.c_str (), IFNAMSIZ);
+
+    NS_LOG_LOGIC ("Getting MAC address");
+    int32_t rc = ioctl (m_sock, SIOCGIFHWADDR, &ifr);
+    if (rc == -1)
+      {
+        NS_FATAL_ERROR ("EmuNetDevice::SendFrom(): Can't get MAC address");
+      }
+
+    std::ostringstream oss;
+    oss << std::hex <<
+      (ifr.ifr_hwaddr.sa_data[0] & 0xff) << ":" <<
+      (ifr.ifr_hwaddr.sa_data[1] & 0xff) << ":" <<
+      (ifr.ifr_hwaddr.sa_data[2] & 0xff) << ":" <<
+      (ifr.ifr_hwaddr.sa_data[3] & 0xff) << ":" <<
+      (ifr.ifr_hwaddr.sa_data[4] & 0xff) << ":" <<
+      (ifr.ifr_hwaddr.sa_data[5] & 0xff) << std::dec;
+
+    NS_LOG_LOGIC ("Fixup source to HW MAC " << oss.str ());
+    source = Mac48Address (oss.str ().c_str ());
+    NS_LOG_LOGIC ("source now " << source);
+  }
+#endif
+
+  LlcSnapHeader llc;
+  llc.SetType (protocolNumber);
+  packet->AddHeader (llc);
+
+  EthernetHeader header (false);
+  header.SetSource (source);
+  header.SetDestination (destination);
+  header.SetLengthType (packet->GetSize ());
+  packet->AddHeader (header);
+
+  EthernetTrailer trailer;
+  trailer.CalcFcs (packet);
+  packet->AddTrailer (trailer);
+
+  // 
+  // Enqueue and dequeue the packet to hit the tracing hooks.
+  //
+  m_queue->Enqueue (packet);
+  packet = m_queue->Dequeue ();
+
+  struct sockaddr_ll ll;
+  bzero (&ll, sizeof (ll));
+
+  ll.sll_family = AF_PACKET;
+  ll.sll_ifindex = m_sll_ifindex;
+  ll.sll_protocol = htons(ETH_P_ALL); 
+
+  NS_LOG_LOGIC ("calling sendto");
+
+  int32_t rc;
+  rc = sendto (m_sock, packet->PeekData (), packet->GetSize (), 0, reinterpret_cast<struct sockaddr *> (&ll), sizeof (ll));
+
+  NS_LOG_LOGIC ("sendto returns " << rc);
+
+  return rc == -1 ? false : true;
+}
+
+void 
+EmuNetDevice::SetDataRate(DataRate bps)
+{
+  NS_LOG_FUNCTION (this << bps);
+  NS_FATAL_ERROR ("EmuNetDevice::SetDataRate():  Unable."); 
+}
+
+void
+EmuNetDevice::SetQueue (Ptr<Queue> q)
+{
+  NS_LOG_FUNCTION (this << q);
+  m_queue = q;
+}
+
+Ptr<Queue> 
+EmuNetDevice::GetQueue(void) const 
+{ 
+  NS_LOG_FUNCTION_NOARGS ();
+  return m_queue;
+}
+
+void
+EmuNetDevice::NotifyLinkUp (void)
+{
+  m_linkUp = true;
+  if (!m_linkChangeCallback.IsNull ())
+    {
+      m_linkChangeCallback ();
+    }
+}
+
+void 
+EmuNetDevice::SetName(const std::string name)
+{
+  m_name = name;
+}
+
+std::string 
+EmuNetDevice::GetName(void) const
+{
+  return m_name;
+}
+
+void 
+EmuNetDevice::SetIfIndex(const uint32_t index)
+{
+  m_ifIndex = index;
+}
+
+uint32_t 
+EmuNetDevice::GetIfIndex(void) const
+{
+  return m_ifIndex;
+}
+
+Ptr<Channel> 
+EmuNetDevice::GetChannel (void) const
+{
+  NS_FATAL_ERROR ("EmuNetDevice::GetChannel():  Unable."); 
+  return 0;
+}
+
+void 
+EmuNetDevice::SetAddress (Mac48Address addr)
+{
+  NS_LOG_FUNCTION (addr);
+  m_address = addr;
+}
+
+Address 
+EmuNetDevice::GetAddress (void) const
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  return m_address;
+}
+
+bool 
+EmuNetDevice::SetMtu (const uint16_t mtu)
+{
+  NS_FATAL_ERROR ("EmuNetDevice::SetMtu():  Unable."); 
+  return false;
+}
+
+uint16_t 
+EmuNetDevice::GetMtu (void) const
+{
+  struct ifreq ifr;
+  bzero (&ifr, sizeof (ifr));
+  strcpy(ifr.ifr_name, m_deviceName.c_str ());
+
+  int32_t fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
+
+
+  int32_t rc = ioctl(fd, SIOCGIFMTU, &ifr);
+  if (rc == -1)
+    {
+      NS_FATAL_ERROR ("EmuNetDevice::GetMtu(): Can't ioctl SIOCGIFMTU");
+    }
+
+  close (fd);
+
+  return ifr.ifr_mtu;
+}
+
+bool 
+EmuNetDevice::IsLinkUp (void) const
+{
+  return m_linkUp;
+}
+
+void 
+EmuNetDevice::SetLinkChangeCallback (Callback<void> callback)
+{
+  m_linkChangeCallback = callback;
+}
+
+bool 
+EmuNetDevice::IsBroadcast (void) const
+{
+  return true;
+}
+
+Address
+EmuNetDevice::GetBroadcast (void) const
+{
+  return Mac48Address ("ff:ff:ff:ff:ff:ff");
+}
+
+bool 
+EmuNetDevice::IsMulticast (void) const
+{
+  return false;
+}
+
+  Address 
+EmuNetDevice::GetMulticast (Ipv4Address multicastGroup) const
+{
+  NS_LOG_FUNCTION (multicastGroup);
+
+  Mac48Address ad = Mac48Address::GetMulticast (multicastGroup);
+
+  //
+  // Implicit conversion (operator Address ()) is defined for Mac48Address, so
+  // use it by just returning the EUI-48 address which is automagically converted
+  // to an Address.
+  //
+  NS_LOG_LOGIC ("multicast address is " << ad);
+
+  return ad;
+}
+
+Address
+EmuNetDevice::GetMulticast (Ipv6Address addr) const
+{
+  NS_LOG_FUNCTION(this << addr);
+
+  Mac48Address ad = Mac48Address::GetMulticast (addr);
+  NS_LOG_LOGIC("MAC IPv6 multicast address is " << ad);
+
+  return ad;
+}
+
+bool 
+EmuNetDevice::IsPointToPoint (void) const
+{
+  return false;
+}
+
+void
+EmuNetDevice::SetPromiscReceiveCallback (PromiscReceiveCallback cb)
+{
+  NS_FATAL_ERROR ("EmuNetDevice::SetPromiscReceiveCallback(): Not implemented");
+}
+
+  bool 
+EmuNetDevice::SupportsSendFrom () const
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  return true;
+}
+
+
+Ptr<Node> 
+EmuNetDevice::GetNode (void) const
+{
+  return m_node;
+}
+
+void 
+EmuNetDevice::SetNode (Ptr<Node> node)
+{
+  m_node = node;
+}
+
+bool 
+EmuNetDevice::NeedsArp (void) const
+{
+  return true;
+}
+
+void 
+EmuNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb)
+{
+  m_rxCallback = cb;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu-net-device.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,349 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 University of Washington
+ *
+ * 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
+ */
+
+#ifndef EMU_NET_DEVICE_H
+#define EMU_NET_DEVICE_H
+
+#include <string.h>
+#include "ns3/address.h"
+#include "ns3/net-device.h"
+#include "ns3/node.h"
+#include "ns3/callback.h"
+#include "ns3/packet.h"
+#include "ns3/traced-callback.h"
+#include "ns3/event-id.h"
+#include "ns3/nstime.h"
+#include "ns3/data-rate.h"
+#include "ns3/ptr.h"
+#include "ns3/mac48-address.h"
+#include "ns3/system-thread.h"
+
+namespace ns3 {
+
+class Queue;
+
+/**
+ * \class EmuNetDevice
+ * \brief A Device for an Emu Network Link.
+ */
+class EmuNetDevice : public NetDevice 
+{
+public:
+  static TypeId GetTypeId (void);
+
+  /**
+   * Construct a EmuNetDevice
+   *
+   * This is the constructor for the EmuNetDevice.  It takes as a
+   */
+  EmuNetDevice ();
+
+  /**
+   * Destroy a EmuNetDevice
+   *
+   * This is the destructor for the EmuNetDevice.
+   */
+  virtual ~EmuNetDevice ();
+
+  /**
+   * Set the Data Rate used for transmission of packets.  
+   *
+   * @see Attach ()
+   * @param bps the data rate at which this object operates
+   */
+  void SetDataRate (DataRate bps);
+
+  /**
+   * Set a start time for the device.
+   *
+   * @param tStart the start time
+   */
+  void Start (Time tStart);
+
+  /**
+   * Set a stop time for the device.
+   *
+   * @param tStop the stop time
+   */
+  void Stop (Time tStop);
+
+  /**
+   * Attach a queue to the EmuNetDevice.
+   *
+   * The EmuNetDevice "owns" a queue that implements a queueing 
+   * method such as DropTail or RED.  
+   *
+   * @see Queue
+   * @see DropTailQueue
+   * @param queue Ptr to the new queue.
+   */
+  void SetQueue (Ptr<Queue> queue);
+
+  /**
+   * Assign a MAC address to this device.
+   *
+   * @see Mac48Address
+   * @param addr The new address.
+   */
+  void SetAddress (Mac48Address addr);
+
+//
+// Pure virtual methods inherited from NetDevice we must implement.
+//
+  virtual void SetName(const std::string name);
+  virtual std::string GetName(void) const;
+
+  virtual void SetIfIndex(const uint32_t index);
+  virtual uint32_t GetIfIndex(void) const;
+
+  virtual Ptr<Channel> GetChannel (void) const;
+  virtual Address GetAddress (void) const;
+
+  virtual bool SetMtu (const uint16_t mtu);
+  virtual uint16_t GetMtu (void) const;
+
+  virtual bool IsLinkUp (void) const;
+
+  virtual void SetLinkChangeCallback (Callback<void> callback);
+
+  virtual bool IsBroadcast (void) const;
+  virtual Address GetBroadcast (void) const;
+
+  virtual bool IsMulticast (void) const;
+
+  /**
+   * \brief Make and return a MAC multicast address using the provided
+   *        multicast group
+   *
+   * RFC 1112 says that an Ipv4 host group address is mapped to an Ethernet 
+   * multicast address by placing the low-order 23-bits of the IP address into 
+   * the low-order 23 bits of the Ethernet multicast address 
+   * 01-00-5E-00-00-00 (hex).
+   *
+   * This method performs the multicast address creation function appropriate
+   * to an EUI-48-based CSMA device.  This MAC address is encapsulated in an
+   *  abstract Address to avoid dependencies on the exact address format.
+   *
+   * \param multicastGroup The IP address for the multicast group destination
+   * of the packet.
+   * \return The MAC multicast Address used to send packets to the provided
+   * multicast group.
+   *
+   * \see Ipv4Address
+   * \see Mac48Address
+   * \see Address
+   */
+  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
+
+  /**
+   * \brief Get the MAC multicast address corresponding
+   * to the IPv6 address provided.
+   * \param addr IPv6 address
+   * \return the MAC multicast address
+   * \warning Calling this method is invalid if IsMulticast returns not true.
+   */
+  virtual Address GetMulticast (Ipv6Address addr) const;
+
+  /**
+   * Is this a point to point link?
+   * \returns false.
+   */
+  virtual bool IsPointToPoint (void) const;
+
+  virtual bool Send(Ptr<Packet> packet, const Address &dest, uint16_t protocolNumber);
+
+  virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
+
+  virtual Ptr<Node> GetNode (void) const;
+  virtual void SetNode (Ptr<Node> node);
+
+  virtual bool NeedsArp (void) const;
+
+  virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
+  virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
+
+  virtual bool SupportsSendFrom (void) const;
+
+private:
+
+  virtual void DoDispose (void);
+
+  /**
+   * Call out to a separate process running as suid root in order to get a raw 
+   * socket.  We do this to avoid having the entire simulation running as root.
+   * If this method returns, we'll have a raw socket waiting for us in m_sock.
+   */
+  void CreateSocket (void);
+
+  /**
+   * Figure out where the raw socket creation process lives on the system.
+   */
+  std::string FindCreator (void);
+
+  /**
+   * Get a copy of the attached Queue.
+   *
+   * This method is provided for any derived class that may need to get
+   * direct access to the underlying queue.
+   *
+   * @returns Ptr to the queue.
+   */
+  Ptr<Queue> GetQueue(void) const; 
+
+  /**
+   * Spin up the device
+   */
+  void StartDevice (void);
+
+  /**
+   * Tear down the device
+   */
+  void StopDevice (void);
+
+  /**
+   * Loop to read and process packets
+   */
+  void ReadThread (void);
+
+  /**
+   * Method to handle received packets.  Synchronized with simulator via ScheduleNow from ReadThread.
+   */
+  void ForwardUp (uint8_t *buf, uint32_t len);
+
+  /**
+   * Adds the necessary headers and trailers to a packet of data in order to
+   * respect the protocol implemented by the agent.
+   */
+  void AddHeader(Ptr<Packet> p, uint16_t protocolNumber);
+
+  /**
+   * Removes, from a packet of data, all headers and trailers that
+   * relate to the protocol implemented by the agent
+   * \return Returns true if the packet should be forwarded up the
+   * protocol stack.
+   */
+  bool ProcessHeader(Ptr<Packet> p, uint16_t& param);
+
+  /**
+   * Start Sending a Packet Down the Wire.
+   *
+   * @returns true if success, false on failure
+   */
+  bool TransmitStart (Ptr<Packet> p);
+
+  void NotifyLinkUp (void);
+
+  /**
+   * The Queue which this EmuNetDevice uses as a packet source.
+   * Management of this Queue has been delegated to the EmuNetDevice
+   * and it has the responsibility for deletion.
+   * @see class Queue
+   * @see class DropTailQueue
+   */
+  Ptr<Queue> m_queue;
+
+  /**
+   * The trace source for the packet reception events that the device can
+   * fire.
+   *
+   * @see class CallBackTraceSource
+   */
+  TracedCallback<Ptr<const Packet> > m_rxTrace;
+
+  /**
+   * The trace source for the packet drop events that the device can
+   * fire.
+   *
+   * @see class CallBackTraceSource
+   */
+  TracedCallback<Ptr<const Packet> > m_dropTrace;
+
+  /**
+   * Time to start spinning up the device
+   */
+  Time m_tStart;
+
+  /**
+   * Time to start tearing down the device
+   */
+  Time m_tStop;
+
+  EventId m_startEvent;
+  EventId m_stopEvent;
+
+  int32_t m_sock;
+
+  Ptr<SystemThread> m_readThread;
+
+  /**
+   * The Node to which this device is attached.
+   */
+  Ptr<Node> m_node;
+
+  /**
+   * The MAC address which has been assigned to this device.
+   */
+  Mac48Address m_address;
+
+  /**
+   * The callback used to notify higher layers that a packet has been received.
+   */
+  NetDevice::ReceiveCallback m_rxCallback;
+
+  /**
+   * The callback used to notify higher layers that a packet has been received in promiscuous mode.
+   */
+  NetDevice::PromiscReceiveCallback m_promiscRxCallback;
+
+  /**
+   * The ns-3 interface index (in the sense of net device index) that has been assigned to this network device.
+   */
+  uint32_t m_ifIndex;
+
+  /**
+   * The Unix interface index that we got from the system and which corresponds to the interface (e.g., "eth1")
+   * we are using to talk to the network.  Valid when m_sock is valid.
+   */
+  int32_t m_sll_ifindex;
+
+  /**
+   * The human readable name of this device.
+   */
+  std::string m_name;
+
+  /**
+   * Flag indicating whether or not the link is up.  In this case,
+   * whether or not the device is connected to a channel.
+   */
+  bool m_linkUp;
+
+  /**
+   * Callback to fire if the link changes state (up or down).
+   */
+  Callback<void> m_linkChangeCallback;
+
+  /**
+   * The unix/linux name of the underlying device (e.g., eth0)
+   */
+  std::string m_deviceName;
+};
+
+} // namespace ns3
+
+#endif // EMU_NET_DEVICE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu-sock-creator.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,246 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) University of Washington
+ *
+ * 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
+ */
+
+#include <unistd.h>
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <stdlib.h>
+#include <errno.h>
+
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/ioctl.h>
+#include <net/ethernet.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netpacket/packet.h>
+#include <arpa/inet.h>
+
+#include "emu-encode-decode.h"
+
+#define EMU_MAGIC 65867
+
+static int gVerbose = 0;
+
+#define LOG(msg) \
+  if (gVerbose) \
+    { \
+      std::cout << __FUNCTION__ << "(): " << msg << std::endl;   \
+    }
+
+#define ABORT(msg, printErrno) \
+  std::cout << __FILE__ << ": fatal error at line " << __LINE__ << ": " << __FUNCTION__ << "(): " << msg << std::endl; \
+  if (printErrno) \
+    { \
+      std::cout << "    errno = " << errno << " (" << strerror (errno) << ")" << std::endl; \
+    } \
+  exit (-1); 
+
+#define ABORT_IF(cond, msg, printErrno) \
+  if (cond) \
+    { \
+      ABORT(msg, printErrno); \
+    }
+
+/**
+ * \brief Send the socket file descriptor we created back to the emu device, 
+ * which will read it as soon as we're done.
+ *
+ * \param path The socket address information from the Unix socket we use
+ * to send the created socket back to.
+ * \param fd The socket we're going to send. 
+ */
+  static void
+SendSocket (const char *path, int fd)
+{
+  //
+  // Open a Unix (local interprocess) socket to call back to the emu net
+  // device.
+  //
+  LOG ("Create Unix socket");
+  int sock = socket (PF_UNIX, SOCK_DGRAM, 0);
+  ABORT_IF (sock == -1, "Unable to open socket", 1);
+  
+  //
+  // We have this string called path, which is really a hex representation
+  // of the endpoint that the net device created.  It used a forward encoding
+  // method (EmuBufferToString) to take the sockaddr_un it made and passed 
+  // the resulting string to us.  So we need to take the inverse method
+  // (EmuStringToBuffer) and build the same sockaddr_un over here.
+  //
+  socklen_t clientAddrLen;
+  struct sockaddr_un clientAddr;
+
+  LOG ("Decode address " << path);
+  bool rc = ns3::EmuStringToBuffer (path, (uint8_t *)&clientAddr, &clientAddrLen);
+  ABORT_IF (rc == false, "Unable to decode path", 0);
+
+  LOG ("Connect");
+  int status = connect (sock, (struct sockaddr*)&clientAddr, clientAddrLen);
+  ABORT_IF (status == -1, "Unable to connect to emu device", 1);
+
+  LOG ("Connected");
+
+  //
+  // This is arcane enough that a few words are worthwhile to explain what's 
+  // going on here.
+  //
+  // The interesting information (the socket FD) is going to go back to the
+  // emu net device as an integer of ancillary data.  Ancillary data is bits 
+  // that are not a part a socket payload (out-of-band data).  We're also 
+  // going to send one integer back.  It's just initialized to a magic number
+  // we use to make sure that the emu device is talking to the emu socket 
+  // creator and not some other creator process.
+  //
+  // The struct iovec below is part of a scatter-gather list.  It describes a
+  // buffer.  In this case, it describes a buffer (an integer) containing the
+  // data that we're going to send back to the emu net device (that magic 
+  // number).
+  // 
+  struct iovec iov;
+  uint32_t magic = EMU_MAGIC;
+  iov.iov_base = &magic;
+  iov.iov_len = sizeof(magic);
+
+  //
+  // The CMSG macros you'll see below are used to create and access control 
+  // messages (which is another name for ancillary data).  The ancillary 
+  // data is made up of pairs of struct cmsghdr structures and associated
+  // data arrays.
+  // 
+  // First, we're going to allocate a buffer on the stack to contain our 
+  // data array (that contains the socket).  Sometimes you'll see this called
+  // an "ancillary element" but the msghdr uses the control message termimology
+  // so we call it "control."
+  //
+  size_t msg_size = sizeof(int);
+  char control[CMSG_SPACE(msg_size)];
+
+  //
+  // There is a msghdr that is used to minimize the number of parameters
+  // passed to sendmsg (which we will use to send our ancillary data).  This
+  // structure uses terminology corresponding to control messages, so you'll
+  // see msg_control, which is the pointer to the ancillary data and controllen
+  // which is the size of the ancillary data array.
+  //
+  // So, initialize the message header that describes our ancillary/control data
+  // and point it to the control message/ancillary data we just allocated space
+  // for.
+  //
+  struct msghdr msg;
+  msg.msg_name = 0;
+  msg.msg_namelen = 0;
+  msg.msg_iov = &iov;
+  msg.msg_iovlen = 1;
+  msg.msg_control = control;
+  msg.msg_controllen = sizeof (control);
+  msg.msg_flags = 0;
+
+  //
+  // A cmsghdr contains a length field that is the length of the header and
+  // the data.  It has a cmsg_level field corresponding to the originating 
+  // protocol.  This takes values which are legal levels for getsockopt and
+  // setsockopt (here SOL_SOCKET).  We're going to use the SCM_RIGHTS type of 
+  // cmsg, that indicates that the ancillary data array contains access rights 
+  // that we are sending back to the emu net device.
+  //
+  // We have to put together the first (and only) cmsghdr that will describe
+  // the whole package we're sending.
+  //
+  struct cmsghdr *cmsg;
+  cmsg = CMSG_FIRSTHDR(&msg);
+  cmsg->cmsg_level = SOL_SOCKET;
+  cmsg->cmsg_type = SCM_RIGHTS;
+  cmsg->cmsg_len = CMSG_LEN(msg_size);
+  //
+  // We also have to update the controllen in case other stuff is actually
+  // in there we may not be aware of (due to macros).
+  //
+  msg.msg_controllen = cmsg->cmsg_len;
+
+  //
+  // Finally, we get a pointer to the start of the ancillary data array and
+  // put our file descriptor in.
+  //
+  int *fdptr = (int*) (CMSG_DATA(cmsg));
+  *fdptr = fd; // 
+
+  //
+  // Actually send the file descriptor back to the emulated net device.
+  //
+  ssize_t len = sendmsg(sock, &msg, 0);
+  ABORT_IF (len == -1, "Could not send socket back to emu net device", 1);
+
+  LOG ("sendmsg complete");
+}
+
+  int 
+main (int argc, char *argv[])
+{
+  int c;
+  char *path = NULL;
+
+  opterr = 0;
+
+  while ((c = getopt (argc, argv, "vp:")) != -1)
+    {
+      switch (c)
+        {
+        case 'v':
+          gVerbose = true;
+          break;
+        case 'p':
+          path = optarg;
+          break;
+        }
+    }
+
+  //
+  // This program is spawned by an emu net device running in a simulation.  It
+  // wants to create a raw socket as described below.  We are going to do the
+  // work here since we're running suid root.  Once we create the raw socket,
+  // we have to send it back to the emu net device.  We do that over a Unix
+  // (local interprocess) socket.  The emu net device created a socket to 
+  // listen for our response on, and it is expected to have encoded the address
+  // information as a string and to have passed that string as an argument to
+  // us.  We see it here as the "path" string.  We can't do anything useful 
+  // unless we have that string.
+  //
+  ABORT_IF (path == NULL, "path is a required argument", 0);
+  LOG ("Provided path is \"" << path << "\"");
+  //
+  // The whole reason for all of the hoops we went through to call out to this
+  // program will pay off here.  We created this program to run as suid root
+  // in order to keep the main simulation program from having to be run with
+  // root privileges.  We need root privileges to be able to open a raw socket
+  // though.  So all of these hoops are to allow us to exeucte the following
+  // single line of code:
+  //
+  LOG ("Creating raw socket");
+  int sock = socket (PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+  ABORT_IF (sock == -1, "CreateSocket(): Unable to open raw socket", 1);
+
+  //
+  // Send the socket back to the emu net device so it can go about its business
+  //
+  SendSocket (path, sock);
+
+  return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/emu.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,60 @@
+/**
+ * \ingroup devices
+ * \defgroup Emulated Emulated Net Device Model
+ *
+ * \section Emulated Net Device Model
+ *
+ * The emulated net device allows a simulation node to send and receive packets
+ * a real network.
+ *
+ * The emulated net device relies on a specified interface being in promiscuous
+ * mode.  It opens a raw socket and binds to that interface.  We perform MAC
+ * spoofing to separate simulation network traffic from other network traffic
+ * that may be flowing to and from the host.
+ *
+ * Normally, the use case for emulated net devices is in collections of
+ * small simulations that connect to the outside world through specific 
+ * interfaces.  For example, one could construct a number of virtual
+ * machines and connect them via a host-only network.  To use the emulated
+ * net device, you would need to set all of the host-only interfaces in
+ * promiscuous mode and provide an appropriate device name, "eth1" for example.
+ *
+ * One could also use the emulated net device in a testbed situation
+ * where the host on which the simulation is running has a specific interface
+ * of interest which drives the testbed hardware.  You would also need to set 
+ * this specific interface into promiscuous mode and provide an appropriate 
+ * device name to the ns-3 emulated net device.
+ *
+ * The emulated net device only works if the underlying interface is up in 
+ * promiscuous mode.  We could just turn it on, but the situation is that we 
+ * expect the other considerations listed above to have been dealt with.
+ * To verify that these issues are dealt with, we just make sure that the end 
+ * result of that process has taken place and that the specified interface is
+ * in promiscuous mode.
+ *
+ * Packets will be sent out over the device, but we use MAC spoofing.  The
+ * MAC addresses will be generated using the Organizationally Unique Identifier
+ * (OUI) 00:00:00 as a base.  This vendor code is not assigned to any 
+ * organization and so should not conflict with any real hardware.  
+ *
+ * It is always up to you to determine that using these MAC addresses is
+ * okay on your network and won't conflict with anything else (including another
+ * simulation using emu devices) on your network.  If you are using the 
+ * emulated net device in separate simulations you must consider global MAC 
+ * address assignment issues and ensure that MAC addresses are unique across
+ * all simulations.  The emulated net device respects the MAC address provided
+ * in the SetAddress method so you can do this manually.  For larger simulations,
+ * you may want to set the OUI in the MAC address allocation function.
+ *
+ * IP addresses corresponding to the emulated net devices are the addresses 
+ * generated in the simulation, which are generated in the usual way via helper
+ * functions.
+ *
+ * The emulated net device comes with a helper function as all ns-3 devices do.
+ * One unique aspect is that there is no channel associated with the underlying
+ * medium.  We really have no idea what this medium is, and so have not made an
+ * effort to model it abstractly.  The primary thing to be aware of is the 
+ * implication this has for static global routing.  The global router module
+ * attempts to walk the channels looking for adjacent networks.  Since there 
+ * is no channel, the global router will be unable to do this.
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/waf	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,1 @@
+exec "`dirname "$0"`"/../../../waf "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/emu/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,39 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def configure(conf):
+    e = conf.create_header_configurator()
+    e.mandatory = False
+    e.name = 'linux/if_ether.h'
+    e.define = 'HAVE_IF_ETHER_H'
+    conf.env['ENABLE_EMU'] = e.run()
+    conf.report_optional_feature("Low Level Ethernet Defintions", "Emulated Net Device",
+                                 conf.env['ENABLE_EMU'],
+                                 "<linux/if_ether.h> include not detected")
+
+def build(bld):
+    module = bld.create_ns3_module('emu', ['node'])
+    module.source = [
+        ]
+    headers = bld.create_obj('ns3header')
+    headers.module = 'emu'
+    headers.source = [
+        'emu.h',
+        ]
+
+    env = bld.env_of_name('default')
+    if env['ENABLE_EMU']:
+        module.source.extend([
+                'emu-net-device.cc',
+                'emu-encode-decode.cc',
+                ])
+        headers.source.extend([
+                'emu-net-device.h',
+                ])
+
+        obj = bld.create_suid_program('emu-sock-creator')
+        obj.source = [
+            'emu-sock-creator.cc',
+            'emu-encode-decode.cc',
+            ]
+
+
--- a/src/devices/point-to-point/point-to-point-net-device.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/point-to-point/point-to-point-net-device.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -372,22 +372,17 @@
   return false;
 }
 
-//
-// Since we return false in the IsMulticast call, calls to other multicast
-// related methods returns are undefined according to the base class.  So we
-// can freely make something up, which is the base of the MAC multicast
-// address space.
-//
   Address 
-PointToPointNetDevice::GetMulticast (void) const
+PointToPointNetDevice::GetMulticast (Ipv4Address multicastGroup) const
 {
   return Mac48Address ("01:00:5e:00:00:00");
 }
 
-  Address 
-PointToPointNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
+Address
+PointToPointNetDevice::GetMulticast (Ipv6Address addr) const
 {
-  return Mac48Address ("01:00:5e:00:00:00");
+  NS_LOG_FUNCTION(this << addr);
+  return Mac48Address ("33:33:00:00:00:00");
 }
 
   bool 
--- a/src/devices/point-to-point/point-to-point-net-device.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/point-to-point/point-to-point-net-device.h	Mon Nov 24 06:36:05 2008 +0100
@@ -249,8 +249,7 @@
   virtual Address GetBroadcast (void) const;
 
   virtual bool IsMulticast (void) const;
-  virtual Address GetMulticast (void) const;
-  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
 
   virtual bool IsPointToPoint (void) const;
 
@@ -264,6 +263,8 @@
 
   virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
 
+  virtual Address GetMulticast (Ipv6Address addr) const;
+
   virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
   virtual bool SupportsSendFrom (void) const;
 
--- a/src/devices/point-to-point/wscript	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/point-to-point/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -14,5 +14,6 @@
     headers.source = [
         'point-to-point-net-device.h',
         'point-to-point-channel.h',
+        'ppp-header.h',
         ]
 
--- a/src/devices/wifi/wifi-net-device.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/wifi/wifi-net-device.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -224,15 +224,14 @@
   return false;
 }
 Address 
-WifiNetDevice::GetMulticast (void) const
-{
-  return Mac48Address::GetMulticastPrefix ();
-}
-Address 
-WifiNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
+WifiNetDevice::GetMulticast (Ipv4Address multicastGroup) const
 {
   return Mac48Address::GetMulticast (multicastGroup);
 }
+Address WifiNetDevice::GetMulticast (Ipv6Address addr) const
+{
+  return Mac48Address::GetMulticast (addr);
+}
 bool 
 WifiNetDevice::IsPointToPoint (void) const
 {
--- a/src/devices/wifi/wifi-net-device.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/devices/wifi/wifi-net-device.h	Mon Nov 24 06:36:05 2008 +0100
@@ -88,8 +88,7 @@
   virtual bool IsBroadcast (void) const;
   virtual Address GetBroadcast (void) const;
   virtual bool IsMulticast (void) const;
-  virtual Address GetMulticast (void) const;
-  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
   virtual bool IsPointToPoint (void) const;
   virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
   virtual Ptr<Node> GetNode (void) const;
@@ -97,6 +96,8 @@
   virtual bool NeedsArp (void) const;
   virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
 
+  virtual Address GetMulticast (Ipv6Address addr) const;
+
   virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
   virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
   virtual bool SupportsSendFrom (void) const;
--- a/src/helper/application-container.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/application-container.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -21,6 +21,14 @@
 
 namespace ns3 {
 
+ApplicationContainer::ApplicationContainer ()
+{}
+
+ApplicationContainer::ApplicationContainer (Ptr<Application> app)
+{
+  m_applications.push_back (app);
+}
+
 ApplicationContainer::Iterator 
 ApplicationContainer::Begin (void) const
 {
--- a/src/helper/application-container.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/application-container.h	Mon Nov 24 06:36:05 2008 +0100
@@ -33,6 +33,18 @@
 class ApplicationContainer
 {
 public:
+  /**
+   * Create an empty ApplicationContainer.
+   */
+  ApplicationContainer ();
+
+  /**
+   * Create an ApplicationContainer with exactly one application
+   *
+   * \param node a node to add to the container
+   */
+  ApplicationContainer (Ptr<Application> application);
+
   typedef std::vector<Ptr<Application> >::const_iterator Iterator;
 
   /**
--- a/src/helper/csma-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/csma-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -173,30 +173,51 @@
   EnableAscii (os, NodeContainer::GetGlobal ());
 }
 
+NetDeviceContainer
+CsmaHelper::Install (Ptr<Node> node) const
+{
+  Ptr<CsmaChannel> channel = m_channelFactory.Create ()->GetObject<CsmaChannel> ();
+  return Install (node, channel);
+}
+
+NetDeviceContainer
+CsmaHelper::Install (Ptr<Node> node, Ptr<CsmaChannel> channel) const
+{
+  return NetDeviceContainer (InstallPriv (node, channel));
+}
 
 NetDeviceContainer 
-CsmaHelper::Install (const NodeContainer &c)
+CsmaHelper::Install (const NodeContainer &c) const
 {
   Ptr<CsmaChannel> channel = m_channelFactory.Create ()->GetObject<CsmaChannel> ();
+
   return Install (c, channel);
 }
 
 NetDeviceContainer 
-CsmaHelper::Install (const NodeContainer &c, Ptr<CsmaChannel> channel)
+CsmaHelper::Install (const NodeContainer &c, Ptr<CsmaChannel> channel) const
 {
-  NetDeviceContainer container;
+  NetDeviceContainer devs;
+
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); i++)
     {
-      Ptr<Node> node = *i;
-      Ptr<CsmaNetDevice> device = m_deviceFactory.Create<CsmaNetDevice> ();
-      device->SetAddress (Mac48Address::Allocate ());
-      node->AddDevice (device);
-      Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
-      device->SetQueue (queue);
-      device->Attach (channel);
-      container.Add (device);
+      devs.Add (InstallPriv (*i, channel));
     }
-  return container;
+
+  return devs;
+}
+
+Ptr<NetDevice>
+CsmaHelper::InstallPriv (Ptr<Node> node, Ptr<CsmaChannel> channel) const
+{
+  Ptr<CsmaNetDevice> device = m_deviceFactory.Create<CsmaNetDevice> ();
+  device->SetAddress (Mac48Address::Allocate ());
+  node->AddDevice (device);
+  Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
+  device->SetQueue (queue);
+  device->Attach (channel);
+
+  return device;
 }
 
 void 
--- a/src/helper/csma-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/csma-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -161,23 +161,50 @@
   static void EnableAsciiAll (std::ostream &os);
 
   /**
-   * \param c a set of nodes
+   * This method creates an ns3::CsmaChannel with the attributes configured by
+   * CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes
+   * configured by CsmaHelper::SetDeviceAttribute and then adds the device
+   * to the node and attaches the channel to the device.
    *
-   * This method creates a simple ns3::CsmaChannel with the
-   * attributes configured by CsmaHelper::SetChannelAttribute and
-   * then calls CsmaHelper::Install.
+   * \param node The node to install the device in
+   * \returns A containter holding the added net device.
    */
-  NetDeviceContainer Install (const NodeContainer &c);
+  NetDeviceContainer Install (Ptr<Node> node) const;
+
+  /**
+   * This method creates an ns3::CsmaNetDevice with the attributes configured by
+   * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
+   * attaches the provided channel to the device.
+   *
+   * \param node The node to install the device in
+   * \param channel The chanel to attach to the device.
+   * \returns A containter holding the added net device.
+   */
+  NetDeviceContainer Install (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
 
   /**
-   * \param c a set of nodes
-   * \param channel the channel to use as a backbone.
+   * This method creates an ns3::CsmaChannel with the attributes configured by
+   * CsmaHelper::SetChannelAttribute.  For each Ptr<node> in the provided
+   * container: it creates an ns3::CsmaNetDevice (with the attributes 
+   * configured by CsmaHelper::SetDeviceAttribute); adds the device to the 
+   * node; and attaches the channel to the device.
    *
-   * For each node in the input container, we create a ns3::CsmaNetDevice with
-   * the requested attributes, a queue for this NetDevice, and associate
-   * the resulting ns3::NetDevice with the ns3::Node and ns3::CsmaChannel.
+   * \param c The NodeContainer holding the nodes to be changed.
+   * \returns A containter holding the added net devices.
    */
-  NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel);
+  NetDeviceContainer Install (const NodeContainer &c) const;
+
+  /**
+   * For each Ptr<node> in the provided container, this method creates an 
+   * ns3::CsmaNetDevice (with the attributes configured by 
+   * CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches 
+   * the provided channel to the device.
+   *
+   * \param c The NodeContainer holding the nodes to be changed.
+   * \param channel The channel to attach to the devices.
+   * \returns A containter holding the added net devices.
+   */
+  NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel) const;
 
   /**
    * \brief Make a star network topology.
@@ -213,6 +240,8 @@
                     NetDeviceContainer& hubDevices, NetDeviceContainer& spokeDevices);
 
 private:
+  Ptr<NetDevice> InstallPriv (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
+
   static void RxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
   static void EnqueueEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
   static void AsciiEnqueueEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/emu-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,280 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 University of Washington
+ *
+ * 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
+ */
+
+#include <string>
+
+#include "ns3/log.h"
+#include "ns3/simulator.h"
+#include "ns3/object-factory.h"
+#include "ns3/queue.h"
+#include "ns3/emu-net-device.h"
+#include "ns3/pcap-writer.h"
+#include "ns3/config.h"
+#include "ns3/packet.h"
+
+#include "emu-helper.h"
+
+NS_LOG_COMPONENT_DEFINE ("EmuHelper");
+
+namespace ns3 {
+
+EmuHelper::EmuHelper ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  m_queueFactory.SetTypeId ("ns3::DropTailQueue");
+  m_deviceFactory.SetTypeId ("ns3::EmuNetDevice");
+}
+
+  void 
+EmuHelper::SetQueue (
+  std::string type,
+  std::string n1, const AttributeValue &v1,
+  std::string n2, const AttributeValue &v2,
+  std::string n3, const AttributeValue &v3,
+  std::string n4, const AttributeValue &v4)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  m_queueFactory.SetTypeId (type);
+  m_queueFactory.Set (n1, v1);
+  m_queueFactory.Set (n2, v2);
+  m_queueFactory.Set (n3, v3);
+  m_queueFactory.Set (n4, v4);
+}
+
+  void 
+EmuHelper::SetAttribute (std::string n1, const AttributeValue &v1)
+{
+  NS_LOG_FUNCTION_NOARGS ();
+  m_deviceFactory.Set (n1, v1);
+}
+
+  void 
+EmuHelper::EnablePcap (
+  std::string filename, 
+  uint32_t nodeid, 
+  uint32_t deviceid)
+{
+  NS_LOG_FUNCTION (filename << nodeid << deviceid);
+  std::ostringstream oss;
+  oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
+  Ptr<PcapWriter> pcap = Create<PcapWriter> ();
+  pcap->Open (oss.str ());
+  pcap->WriteEthernetHeader ();
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/Rx";
+  Config::ConnectWithoutContext (oss.str (), 
+    MakeBoundCallback (&EmuHelper::RxEvent, pcap));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/TxQueue/Enqueue";
+  Config::ConnectWithoutContext (oss.str (), 
+    MakeBoundCallback (&EmuHelper::EnqueueEvent, pcap));
+}
+
+  void 
+EmuHelper::EnablePcap (std::string filename, NetDeviceContainer d)
+{
+  NS_LOG_FUNCTION (filename << &d);
+  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
+    {
+      Ptr<NetDevice> dev = *i;
+      EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
+    }
+}
+
+  void
+EmuHelper::EnablePcap (std::string filename, NodeContainer n)
+{
+  NS_LOG_FUNCTION (filename << &n);
+  NetDeviceContainer devs;
+  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+    {
+      Ptr<Node> node = *i;
+      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
+	{
+	  devs.Add (node->GetDevice (j));
+	}
+    }
+  EnablePcap (filename, devs);
+}
+
+  void
+EmuHelper::EnablePcapAll (std::string filename)
+{
+  NS_LOG_FUNCTION (filename);
+  EnablePcap (filename, NodeContainer::GetGlobal ());
+}
+
+  void 
+EmuHelper::EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid)
+{
+  NS_LOG_FUNCTION (&os << nodeid << deviceid);
+  Packet::EnablePrinting ();
+  std::ostringstream oss;
+
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/Rx";
+  Config::Connect (oss.str (), 
+    MakeBoundCallback (&EmuHelper::AsciiRxEvent, &os));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/TxQueue/Enqueue";
+  Config::Connect (oss.str (), 
+    MakeBoundCallback (&EmuHelper::AsciiEnqueueEvent, &os));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/TxQueue/Dequeue";
+  Config::Connect (oss.str (), 
+    MakeBoundCallback (&EmuHelper::AsciiDequeueEvent, &os));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << 
+    "/$ns3::EmuNetDevice/TxQueue/Drop";
+  Config::Connect (oss.str (), 
+    MakeBoundCallback (&EmuHelper::AsciiDropEvent, &os));
+}
+
+  void 
+EmuHelper::EnableAscii (std::ostream &os, NetDeviceContainer d)
+{
+  NS_LOG_FUNCTION (&os << &d);
+  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
+    {
+      Ptr<NetDevice> dev = *i;
+      EnableAscii (os, dev->GetNode ()->GetId (), dev->GetIfIndex ());
+    }
+}
+
+void
+EmuHelper::EnableAscii (std::ostream &os, NodeContainer n)
+{
+  NS_LOG_FUNCTION (&os << &n);
+  NetDeviceContainer devs;
+  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+    {
+      Ptr<Node> node = *i;
+      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
+	{
+	  devs.Add (node->GetDevice (j));
+	}
+    }
+  EnableAscii (os, devs);
+}
+
+  void
+EmuHelper::EnableAsciiAll (std::ostream &os)
+{
+  NS_LOG_FUNCTION (&os);
+  EnableAscii (os, NodeContainer::GetGlobal ());
+}
+
+NetDeviceContainer
+EmuHelper::Install (Ptr<Node> node) const
+{
+  return NetDeviceContainer (InstallPriv (node));
+}
+
+NetDeviceContainer 
+EmuHelper::Install (const NodeContainer &c) const
+{
+  NetDeviceContainer devs;
+
+  for (NodeContainer::Iterator i = c.Begin (); i != c.End (); i++)
+    {
+      devs.Add (InstallPriv (*i));
+    }
+
+  return devs;
+}
+
+  Ptr<NetDevice>
+EmuHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<EmuNetDevice> device = m_deviceFactory.Create<EmuNetDevice> ();
+  device->SetAddress (Mac48Address::Allocate ());
+  node->AddDevice (device);
+  Ptr<Queue> queue = m_queueFactory.Create<Queue> ();
+  device->SetQueue (queue);
+
+  return device;
+}
+
+  void 
+EmuHelper::EnqueueEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (writer << packet);
+  writer->WritePacket (packet);
+}
+
+  void 
+EmuHelper::RxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (writer << packet);
+  writer->WritePacket (packet);
+}
+
+  void 
+EmuHelper::AsciiEnqueueEvent (
+  std::ostream *os, 
+  std::string path, 
+  Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (&os << path << packet);
+  *os << "+ " << Simulator::Now ().GetSeconds () << " ";
+  *os << path << " " << *packet << std::endl;
+}
+
+  void 
+EmuHelper::AsciiDequeueEvent (
+  std::ostream *os, 
+  std::string path, 
+  Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (&os << path << packet);
+  *os << "- " << Simulator::Now ().GetSeconds () << " ";
+  *os << path << " " << *packet << std::endl;
+}
+
+  void 
+EmuHelper::AsciiDropEvent (
+  std::ostream *os, 
+  std::string path, 
+  Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (&os << path << packet);
+  *os << "d " << Simulator::Now ().GetSeconds () << " ";
+  *os << path << " " << *packet << std::endl;
+}
+
+  void 
+EmuHelper::AsciiRxEvent (
+  std::ostream *os, 
+  std::string path, 
+  Ptr<const Packet> packet)
+{
+  NS_LOG_FUNCTION (&os << path << packet);
+  *os << "r " << Simulator::Now ().GetSeconds () << " ";
+  *os << path << " " << *packet << std::endl;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/emu-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,196 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 University of Washington
+ *
+ * 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
+ */
+
+#ifndef EMU_HELPER_H
+#define EMU_HELPER_H
+
+#include <string>
+#include <ostream>
+#include "ns3/attribute.h"
+#include "ns3/object-factory.h"
+#include "ns3/net-device-container.h"
+#include "ns3/node-container.h"
+#include "ns3/emu-net-device.h"
+
+namespace ns3 {
+
+class Packet;
+class PcapWriter;
+
+/**
+ * \brief build a set of EmuNetDevice objects
+ */
+class EmuHelper
+{
+public:
+  EmuHelper ();
+
+  /**
+   * \param type the type of queue
+   * \param n1 the name of the attribute to set on the queue
+   * \param v1 the value of the attribute to set on the queue
+   * \param n2 the name of the attribute to set on the queue
+   * \param v2 the value of the attribute to set on the queue
+   * \param n3 the name of the attribute to set on the queue
+   * \param v3 the value of the attribute to set on the queue
+   * \param n4 the name of the attribute to set on the queue
+   * \param v4 the value of the attribute to set on the queue
+   *
+   * Set the type of queue to create and associated to each
+   * EmuNetDevice created through EmuHelper::Install.
+   */
+  void SetQueue (std::string type,
+    std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
+    std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
+    std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
+    std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ());
+
+  /**
+   * \param n1 the name of the attribute to set
+   * \param v1 the value of the attribute to set
+   *
+   * Set these attributes on each ns3::EmuNetDevice created
+   * by EmuHelper::Install
+   */
+  void SetAttribute (std::string n1, const AttributeValue &v1);
+
+  /**
+   * \param filename filename prefix to use for pcap files.
+   * \param nodeid the id of the node to generate pcap output for.
+   * \param deviceid the id of the device to generate pcap output for.
+   *
+   * Generate a pcap file which contains the link-level data observed
+   * by the specified deviceid within the specified nodeid. The pcap
+   * data is stored in the file prefix-nodeid-deviceid.pcap.
+   *
+   * This method should be invoked after the network topology has 
+   * been fully constructed.
+   */
+  static void EnablePcap (std::string filename, uint32_t nodeid, 
+    uint32_t deviceid);
+
+  /**
+   * \param filename filename prefix to use for pcap files.
+   * \param d container of devices of type ns3::EmuNetDevice
+   *
+   * Enable pcap output on each input device which is of the
+   * ns3::EmuNetDevice type.
+   */
+  static void EnablePcap (std::string filename, NetDeviceContainer d);
+
+  /**
+   * \param filename filename prefix to use for pcap files.
+   * \param n container of nodes.
+   *
+   * Enable pcap output on each device which is of the
+   * ns3::EmuNetDevice type and which is located in one of the 
+   * input nodes.
+   */
+  static void EnablePcap (std::string filename, NodeContainer n);
+
+  /**
+   * \param filename filename prefix to use for pcap files.
+   *
+   * Enable pcap output on each device which is of the
+   * ns3::EmuNetDevice type
+   */
+  static void EnablePcapAll (std::string filename);
+
+  /**
+   * \param os output stream
+   * \param nodeid the id of the node to generate ascii output for.
+   * \param deviceid the id of the device to generate ascii output for.
+   *
+   * Enable ascii output on the specified deviceid within the
+   * specified nodeid if it is of type ns3::EmuNetDevice and dump 
+   * that to the specified stdc++ output stream.
+   */
+  static void EnableAscii (std::ostream &os, uint32_t nodeid, 
+    uint32_t deviceid);
+
+  /**
+   * \param os output stream
+   * \param d device container
+   *
+   * Enable ascii output on each device which is of the
+   * ns3::EmuNetDevice type and which is located in the input
+   * device container and dump that to the specified
+   * stdc++ output stream.
+   */
+  static void EnableAscii (std::ostream &os, NetDeviceContainer d);
+
+  /**
+   * \param os output stream
+   * \param n node container
+   *
+   * Enable ascii output on each device which is of the
+   * ns3::EmuNetDevice type and which is located in one
+   * of the input node and dump that to the specified
+   * stdc++ output stream.
+   */
+  static void EnableAscii (std::ostream &os, NodeContainer n);
+
+  /**
+   * \param os output stream
+   *
+   * Enable ascii output on each device which is of the
+   * ns3::EmuNetDevice type and dump that to the specified
+   * stdc++ output stream.
+   */
+  static void EnableAsciiAll (std::ostream &os);
+
+  /**
+   * This method creates an ns3::EmuNetDevice with the attributes configured by 
+   * EmuHelper::SetDeviceAttribute and then adds the device to the node.
+   *
+   * \param node The node to install the device in
+   * \returns A containter holding the added net device.
+   */
+  NetDeviceContainer Install (Ptr<Node> node) const;
+
+  /**
+   * For each Ptr<node> in the provided container this method creates an 
+   * ns3::EmuNetDevice (with the attributes configured by 
+   * EmuHelper::SetDeviceAttribute); adds the device to the node.
+   *
+   * \param c The NodeContainer holding the nodes to be changed.
+   * \returns A containter holding the added net devices.
+   */
+  NetDeviceContainer Install (const NodeContainer &c) const;
+
+private:
+  Ptr<NetDevice> InstallPriv (Ptr<Node> node) const;
+  static void RxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
+  static void EnqueueEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
+  static void AsciiEnqueueEvent (std::ostream *os, std::string path, 
+    Ptr<const Packet> packet);
+  static void AsciiDequeueEvent (std::ostream *os, std::string path, 
+    Ptr<const Packet> packet);
+  static void AsciiDropEvent (std::ostream *os, std::string path, 
+    Ptr<const Packet> packet);
+  static void AsciiRxEvent (std::ostream *os, std::string path, 
+    Ptr<const Packet> packet);
+
+  ObjectFactory m_queueFactory;
+  ObjectFactory m_deviceFactory;
+};
+
+
+} // namespace ns3
+
+#endif /* EMU_HELPER_H */
--- a/src/helper/internet-stack-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/internet-stack-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -17,6 +17,7 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
+
 #include "ns3/assert.h"
 #include "ns3/log.h"
 #include "ns3/object.h"
@@ -59,25 +60,58 @@
 }
 
 void 
-InternetStackHelper::Install (NodeContainer c)
+InternetStackHelper::Install (NodeContainer c) const
 {
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
+      Install (*i);
+    }
+}
+
+void
+InternetStackHelper::Install (Ptr<Node> node) const
+{
+  if (node->GetObject<Ipv4> () != 0)
+    {
+      NS_FATAL_ERROR ("InternetStackHelper::Install(): Aggregating " 
+                      "an InternetStack to a node with an existing Ipv4 object");
+      return;
+    }
+
+  if (m_nscLibrary != "")
+    {
+      AddNscInternetStack (node, m_nscLibrary);
+    }
+  else
+    {
+      AddInternetStack (node);
+    }
+
+  Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
+  node->AggregateObject (factory);
+}
+
+void
+InternetStackHelper::EnableAscii (std::ostream &os, NodeContainer n)
+{
+  Packet::EnablePrinting ();
+  std::ostringstream oss;
+  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+    {
       Ptr<Node> node = *i;
-      if (node->GetObject<Ipv4> () != 0)
-        {
-          NS_FATAL_ERROR ("InternetStackHelper::Install(): Aggregating " 
-             "an InternetStack to a node with an existing Ipv4 object");
-          return;
-        }
-      if (m_nscLibrary != "")
-        AddNscInternetStack (node, m_nscLibrary);
-      else
-        AddInternetStack (node);
+      oss << "/NodeList/" << node->GetId () << "/$ns3::Ipv4L3Protocol/Drop";
+      Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, &os));
+      oss.str ("");
+      oss << "/NodeList/" << node->GetId () << "/$ns3::ArpL3Protocol/Drop";
+      Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, &os));
+      oss.str ("");
+    }
+}
 
-      Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
-      node->AggregateObject (factory);
-    }
+void
+InternetStackHelper::EnableAsciiAll (std::ostream &os)
+{
+  EnableAscii (os, NodeContainer::GetGlobal ());
 }
 
 void
@@ -87,9 +121,9 @@
 
   InternetStackHelper::m_pcapBaseFilename = filename;
   Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Tx",
-                              MakeCallback (&InternetStackHelper::LogTxIp));
+                   MakeCallback (&InternetStackHelper::LogTxIp));
   Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx",
-                              MakeCallback (&InternetStackHelper::LogRxIp));
+                   MakeCallback (&InternetStackHelper::LogRxIp));
 }
 
 uint32_t
@@ -146,4 +180,11 @@
   return trace.writer;
 }
 
+void
+InternetStackHelper::AsciiDropEvent (std::ostream *os, std::string path, Ptr<const Packet> packet)
+{
+  *os << "d " << Simulator::Now ().GetSeconds () << " ";
+  *os << path << " " << *packet << std::endl;
+}
+
 } // namespace ns3
--- a/src/helper/internet-stack-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/internet-stack-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -17,6 +17,7 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
+
 #ifndef INTERNET_STACK_HELPER_H
 #define INTERNET_STACK_HELPER_H
 
@@ -28,7 +29,7 @@
 namespace ns3 {
 
 /**
- * \brief aggregate ip/tcp/udp functionality to existing Nodes.
+ * \brief aggregate IP/TCP/UDP functionality to existing Nodes.
  */
 class InternetStackHelper
 {
@@ -36,29 +37,63 @@
   InternetStackHelper(void);
 
   /**
-   * \param c the set of nodes
-   *
-   * For each node in the input container, aggregate implementations
-   * of the ns3::Ipv4, ns3::Udp, and, ns3::Tcp classes.  The program
-   * will assert if this method is called on a container with a node
-   * that already has an Ipv4 object aggregated to it.
+   * Aggregate implementations of the ns3::Ipv4, ns3::Udp, and ns3::Tcp classes
+   * onto the provided node.  This method will assert if called on a node that 
+   * already has an Ipv4 object aggregated to it.
    * 
+   * \param node The node on which to install the stack.
    */
-  void Install (NodeContainer c);
+  void Install (Ptr<Node> node) const;
 
   /**
+   * For each node in the input container, aggregate implementations of the 
+   * ns3::Ipv4, ns3::Udp, and, ns3::Tcp classes.  The program will assert 
+   * if this method is called on a container with a node that already has
+   * an Ipv4 object aggregated to it.
+   * 
+   * \param c NodeContainer that holds the set of nodes on which to install the
+   * new stacks.
+   */
+  void Install (NodeContainer c) const;
+
+  /**
+   * \brief Enable or disable use of the Network Simulation Cradle stack.  
+   *
+   * Give the NSC stack a shared library file name to use when creating the 
+   * statck implementation.  By providing a non-empty string as a parameter, you
+   * select the NSC version of the stack.  By providing an empty string, you 
+   * select the ns-3 default version.
+   *
    * \param soname name of the shared library with the nsc tcp stack
-   * to use, e.g. 'liblinux2.6.26.so'. The empty string resets
-   * the InternetStackHelper to use the ns-3 models again.
+   * to use, e.g. 'liblinux2.6.26.so'.
    */
   void SetNscStack(std::string soname);
 
   /**
-   * \param filename filename prefix to use for pcap files.
+   * \param os output stream
+   * \param n node container
    *
+   * Enable ascii output on these drop traces, for each node in the NodeContainer..
+   * /NodeList/[i]/$ns3ArpL3Protocol/Drop 
+   * /NodeList/[i]/$ns3Ipv4L3Protocol/Drop 
+   */
+  static void EnableAscii (std::ostream &os, NodeContainer n);
+
+  /**
+   * \param os output stream
+   *
+   * Enable ascii output on these drop traces, for all nodes.
+   * /NodeList/[i]/$ns3ArpL3Protocol/Drop 
+   * /NodeList/[i]/$ns3Ipv4L3Protocol/Drop 
+   */
+  static void EnableAsciiAll (std::ostream &os);
+
+  /**
    * Enable pcap output on each protocol instance which is of the
    * ns3::Ipv4L3Protocol type.  Both Tx and Rx events will be logged.
    *
+   * \param filename filename prefix to use for pcap files.
+   *
    * \warning If you perform multiple simulations in a single script,
    * each iteration of the simulation will result in the trace files
    * being overwritten.  We don't attempt to anticipate what a user
@@ -79,6 +114,7 @@
     uint32_t interfaceId;
     Ptr<PcapWriter> writer;
   };
+  static void AsciiDropEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
   static std::string m_pcapBaseFilename;
   static uint32_t GetNodeIndex (std::string context);
   static std::vector<Trace> m_traces;
--- a/src/helper/ipv4-address-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/ipv4-address-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -64,9 +64,6 @@
   NS_ASSERT_MSG((m_network & ~m_mask) == 0,
     "Ipv4AddressHelper::SetBase(): Inconsistent network and mask");
 
-  NS_ASSERT_MSG((m_address & m_mask) == 0,
-    "Ipv4AddressHelper::SetBase(): Inconsistent address and mask");
-
 //
 // Figure out how much to shift network numbers to get them aligned, and what
 // the maximum allowed address is with respect to the current mask.
--- a/src/helper/mobility-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/mobility-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -114,39 +114,45 @@
   return m_mobility.GetTypeId ().GetName ();
 }
 
+void
+MobilityHelper::Install (Ptr<Node> node) const
+{
+  Ptr<Object> object = node;
+  Ptr<MobilityModel> model = object->GetObject<MobilityModel> ();
+  if (model == 0)
+    {
+      model = m_mobility.Create ()->GetObject<MobilityModel> ();
+      if (model == 0)
+        {
+          NS_FATAL_ERROR ("The requested mobility model is not a mobility model: \""<< 
+                          m_mobility.GetTypeId ().GetName ()<<"\"");
+        }
+      if (m_mobilityStack.empty ())
+        {
+          NS_LOG_DEBUG ("node="<<object<<", mob="<<model);
+          object->AggregateObject (model);
+        }
+      else
+        {
+          // we need to setup a hierarchical mobility model
+          Ptr<MobilityModel> parent = m_mobilityStack.back ();
+          Ptr<MobilityModel> hierarchical = 
+            CreateObject<HierarchicalMobilityModel> ("Child", PointerValue (model),
+                                                     "Parent", PointerValue (parent));
+          object->AggregateObject (hierarchical);
+          NS_LOG_DEBUG ("node="<<object<<", mob="<<hierarchical);
+        }
+    }
+  Vector position = m_position->GetNext ();
+  model->SetPosition (position);
+}
+
 void 
-MobilityHelper::Install (NodeContainer c)
+MobilityHelper::Install (NodeContainer c) const
 {
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Object> object = *i;
-      Ptr<MobilityModel> model = object->GetObject<MobilityModel> ();
-      if (model == 0)
-        {
-          model = m_mobility.Create ()->GetObject<MobilityModel> ();
-          if (model == 0)
-            {
-              NS_FATAL_ERROR ("The requested mobility model is not a mobility model: \""<< 
-                              m_mobility.GetTypeId ().GetName ()<<"\"");
-            }
-          if (m_mobilityStack.empty ())
-            {
-              NS_LOG_DEBUG ("node="<<object<<", mob="<<model);
-              object->AggregateObject (model);
-            }
-          else
-            {
-              // we need to setup a hierarchical mobility model
-              Ptr<MobilityModel> parent = m_mobilityStack.back ();
-              Ptr<MobilityModel> hierarchical = 
-                CreateObject<HierarchicalMobilityModel> ("Child", PointerValue (model),
-                                                         "Parent", PointerValue (parent));
-              object->AggregateObject (hierarchical);
-              NS_LOG_DEBUG ("node="<<object<<", mob="<<hierarchical);
-            }
-        }
-      Vector position = m_position->GetNext ();
-      model->SetPosition (position);
+      Install (*i);
     }
 }
 
--- a/src/helper/mobility-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/mobility-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -17,6 +17,7 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
+
 #ifndef MOBILITY_HELPER_H
 #define MOBILITY_HELPER_H
 
@@ -43,10 +44,10 @@
   ~MobilityHelper ();
 
   /**
-   * \param allocator allocate initial node positions
+   * Set the position allocator which will be used to allocate the initial 
+   * position of every node initialized during MobilityModel::Install.
    *
-   * Set the position allocator which will be used to allocate
-   * the initial position of every node in MobilityModel::Install.
+   * \param allocator allocate initial node positions
    */
   void SetPositionAllocator (Ptr<PositionAllocator> allocator);
 
@@ -149,14 +150,31 @@
   std::string GetMobilityModelType (void) const;
 
   /**
-   * \param container the set of nodes to layout.
+   * \brief "Layout" a single node according to the current position allocator
+   * type.
+   *
+   * This method creates an instance of a ns3::MobilityModel subclass (the 
+   * type of which was set with MobilityHelper::SetMobilityModel), aggregates
+   * it to the provided node, and sets an initial position based on the current
+   * position allocator (set through MobilityHelper::SetPositionAllocator). 
    *
-   * For each input node, this method creates an instance of a ns3::MobilityModel
-   * subclass (the type of which was set with MobilityHelper::SetMobilityModel), 
-   * aggregates it to the mode, and sets an initial position based on the current 
-   * position allocator (set through MobilityHelper::SetPositionAllocator). 
+   * \param node The node to "layout."
    */
-  void Install (NodeContainer container);
+  void Install (Ptr<Node> node) const;
+
+  /**
+   * \brief Layout a collection of nodes according to the current position allocator
+   * type.
+   *
+   * For each node in the provided NodeContainer, this method creates an instance 
+   * of a ns3::MobilityModel subclass (the type of which was set with 
+   * MobilityHelper::SetMobilityModel), aggregates it to the node, and sets an 
+   * initial position based on the current position allocator (set through 
+   * MobilityHelper::SetPositionAllocator). 
+   *
+   * \param container The set of nodes to layout.
+   */
+  void Install (NodeContainer container) const;
 
   /**
    * Perform the work of MobilityHelper::Install on _all_ nodes which
--- a/src/helper/on-off-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/on-off-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -38,18 +38,30 @@
 }
 
 ApplicationContainer
-OnOffHelper::Install (NodeContainer c)
+OnOffHelper::Install (Ptr<Node> node) const
+{
+  return ApplicationContainer (InstallPriv (node));
+}
+
+ApplicationContainer
+OnOffHelper::Install (NodeContainer c) const
 {
   ApplicationContainer apps;
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Node> node = *i;
-      Ptr<Application> app = m_factory.Create<Application> ();
-      node->AddApplication (app);
-      apps.Add (app);
+      apps.Add (InstallPriv (*i));
     }
+
   return apps;
 }
 
+Ptr<Application>
+OnOffHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<Application> app = m_factory.Create<Application> ();
+  node->AddApplication (app);
+
+  return app;
+}
 
 } // namespace ns3
--- a/src/helper/on-off-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/on-off-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -54,14 +54,24 @@
   void SetAttribute (std::string name, const AttributeValue &value);
 
   /**
-   * \param c the set of nodes on which an OnOffApplication will be installed.
-   *
    * Install an ns3::OnOffApplication on each node of the input container
    * configured with all the attributes set with SetAttribute.
+   *
+   * \param c NodeContainer of the set of nodes on which an OnOffApplication 
+   * will be installed.
    */
-  ApplicationContainer Install (NodeContainer c);
+  ApplicationContainer Install (NodeContainer c) const;
+
+  /**
+   * Install an ns3::OnOffApplication on each node of the input container
+   * configured with all the attributes set with SetAttribute.
+   *
+   * \param c The node on which an OnOffApplication will be installed.
+   */
+  ApplicationContainer Install (Ptr<Node> node) const;
 
 private:
+  Ptr<Application> InstallPriv (Ptr<Node> node) const;
   std::string m_protocol;
   Address m_remote;
   ObjectFactory m_factory;
--- a/src/helper/packet-sink-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/packet-sink-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -17,6 +17,7 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
+
 #include "packet-sink-helper.h"
 #include "ns3/string.h"
 #include "ns3/inet-socket-address.h"
@@ -52,19 +53,31 @@
 }
 #endif
 
-ApplicationContainer 
-PacketSinkHelper::Install (NodeContainer c)
+ApplicationContainer
+PacketSinkHelper::Install (Ptr<Node> node) const
+{
+  return ApplicationContainer (InstallPriv (node));
+}
+
+ApplicationContainer
+PacketSinkHelper::Install (NodeContainer c) const
 {
   ApplicationContainer apps;
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Node> node = *i;
-      Ptr<Application> app = m_factory.Create<Application> ();
-      node->AddApplication (app);
-      apps.Add (app);
+      apps.Add (InstallPriv (*i));
     }
+
   return apps;
 }
 
+Ptr<Application>
+PacketSinkHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<Application> app = m_factory.Create<Application> ();
+  node->AddApplication (app);
+
+  return app;
+}
 
 } // namespace ns3
--- a/src/helper/packet-sink-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/packet-sink-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -34,8 +34,25 @@
 
   void SetAttribute (std::string name, const AttributeValue &value);
 
-  ApplicationContainer Install (NodeContainer c);
+  /**
+   * Install an ns3::PacketSinkApplication on each node of the input container
+   * configured with all the attributes set with SetAttribute.
+   *
+   * \param c NodeContainer of the set of nodes on which a PacketSinkApplication 
+   * will be installed.
+   */
+  ApplicationContainer Install (NodeContainer c) const;
+
+  /**
+   * Install an ns3::PacketSinkApplication on each node of the input container
+   * configured with all the attributes set with SetAttribute.
+   *
+   * \param c The node on which a PacketSinkApplication will be installed.
+   */
+  ApplicationContainer Install (Ptr<Node> node) const;
+
 private:
+  Ptr<Application> InstallPriv (Ptr<Node> node) const;
   ObjectFactory m_factory;
 };
 
--- a/src/helper/packet-socket-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/packet-socket-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -1,17 +1,42 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 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 "packet-socket-helper.h"
 #include "ns3/packet-socket-factory.h"
 
 namespace ns3 {
 
-void 
-PacketSocketHelper::Install (NodeContainer c)
+void
+PacketSocketHelper::Install (NodeContainer c) const
 {
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Node> node = *i;
-      Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
-      node->AggregateObject (factory);
+	Install (*i);
     }
 }
 
+void
+PacketSocketHelper::Install (Ptr<Node> node) const
+{
+    Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
+    node->AggregateObject (factory);
+}
+
 } // namespace ns3
--- a/src/helper/packet-socket-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/packet-socket-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -1,3 +1,23 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 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 PACKET_SOCKET_HELPER_H
 #define PACKET_SOCKET_HELPER_H
 
@@ -12,12 +32,21 @@
 {
 public:
   /**
-   * \param c container of node pointers
+   * Aggregate an instance of a ns3::PacketSocketFactory onto the provided
+   * node.
    *
-   * For each node in the input container, aggregate a ns3::PacketSocketFactory
-   * object instance.
+   * \param node Node on which to aggregate the ns3::PacketSocketFactory.
    */
-  void Install (NodeContainer c);
+  void Install (Ptr<Node> node) const;
+
+  /**
+   * For each node in the provided container, aggregate an instance of a
+   * ns3::PacketSocketFactory.
+   *
+   * \param c NodeContainer of the set of nodes to aggregate the 
+   * ns3::PacketSocketFactory on.
+   */
+  void Install (NodeContainer c) const;
 };
 
 } // namespace ns3
--- a/src/helper/udp-echo-helper.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/udp-echo-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -38,21 +38,33 @@
   m_factory.Set (name, value);
 }
 
+ApplicationContainer
+UdpEchoServerHelper::Install (Ptr<Node> node) const
+{
+  return ApplicationContainer (InstallPriv (node));
+}
 
-ApplicationContainer 
-UdpEchoServerHelper::Install (NodeContainer c)
+ApplicationContainer
+UdpEchoServerHelper::Install (NodeContainer c) const
 {
   ApplicationContainer apps;
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Node> node = *i;
-      Ptr<UdpEchoServer> server = m_factory.Create<UdpEchoServer> ();
-      node->AddApplication (server);
-      apps.Add (server);
+      apps.Add (InstallPriv (*i));
     }
+
   return apps;
 }
 
+Ptr<Application>
+UdpEchoServerHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<Application> app = m_factory.Create<UdpEchoServer> ();
+  node->AddApplication (app);
+  
+  return app;
+}
+
 UdpEchoClientHelper::UdpEchoClientHelper (Ipv4Address address, uint16_t port)
 {
   m_factory.SetTypeId (UdpEchoClient::GetTypeId ());
@@ -68,18 +80,31 @@
   m_factory.Set (name, value);
 }
 
-ApplicationContainer 
-UdpEchoClientHelper::Install (NodeContainer c)
+ApplicationContainer
+UdpEchoClientHelper::Install (Ptr<Node> node) const
+{
+  return ApplicationContainer (InstallPriv (node));
+}
+
+ApplicationContainer
+UdpEchoClientHelper::Install (NodeContainer c) const
 {
   ApplicationContainer apps;
   for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
     {
-      Ptr<Node> node = *i;
-      Ptr<UdpEchoClient> client = m_factory.Create<UdpEchoClient> ();
-      node->AddApplication (client);
-      apps.Add (client);
+      apps.Add (InstallPriv (*i));
     }
-  return apps;  
+
+  return apps;
+}
+
+Ptr<Application>
+UdpEchoClientHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<Application> app = m_factory.Create<UdpEchoClient> ();
+  node->AddApplication (app);
+  
+  return app;
 }
 
 } // namespace ns3
--- a/src/helper/udp-echo-helper.h	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/udp-echo-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -34,9 +34,13 @@
   UdpEchoServerHelper (uint16_t port);
 
   void SetAttribute (std::string name, const AttributeValue &value);
-  ApplicationContainer Install (NodeContainer c);
+
+  ApplicationContainer Install (Ptr<Node> node) const;
+  ApplicationContainer Install (NodeContainer c) const;
 
- private:
+private:
+  Ptr<Application> InstallPriv (Ptr<Node> node) const;
+
   ObjectFactory m_factory;
 };
 
@@ -46,13 +50,15 @@
   UdpEchoClientHelper (Ipv4Address ip, uint16_t port);
 
   void SetAttribute (std::string name, const AttributeValue &value);
-  ApplicationContainer Install (NodeContainer c);
 
- private:
+  ApplicationContainer Install (Ptr<Node> node) const;
+  ApplicationContainer Install (NodeContainer c) const;
+
+private:
+  Ptr<Application> InstallPriv (Ptr<Node> node) const;
   ObjectFactory m_factory;
 };
 
-
 } // namespace ns3
 
 #endif /* UDP_ECHO_HELPER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/v4ping-helper.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,45 @@
+#include "v4ping-helper.h"
+#include "ns3/v4ping.h"
+
+namespace ns3 {
+
+V4PingHelper::V4PingHelper (Ipv4Address remote)
+{
+  m_factory.SetTypeId ("ns3::V4Ping");
+  m_factory.Set ("Remote", Ipv4AddressValue (remote));
+}
+
+void 
+V4PingHelper::SetAttribute (std::string name, const AttributeValue &value)
+{
+  m_factory.Set (name, value);
+}
+
+ApplicationContainer
+V4PingHelper::Install (Ptr<Node> node) const
+{
+  return ApplicationContainer (InstallPriv (node));
+}
+
+ApplicationContainer
+V4PingHelper::Install (NodeContainer c) const
+{
+  ApplicationContainer apps;
+  for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
+    {
+      apps.Add (InstallPriv (*i));
+    }
+
+  return apps;
+}
+
+Ptr<Application>
+V4PingHelper::InstallPriv (Ptr<Node> node) const
+{
+  Ptr<V4Ping> app = m_factory.Create<V4Ping> ();
+  node->AddApplication (app);
+
+  return app;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/v4ping-helper.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,27 @@
+#ifndef V4PING_HELPER_H
+#define V4PING_HELPER_H
+
+#include "node-container.h"
+#include "application-container.h"
+#include "ns3/object-factory.h"
+
+namespace ns3 {
+
+class V4PingHelper
+{
+public:
+  V4PingHelper (Ipv4Address remote);
+
+  void SetAttribute (std::string name, const AttributeValue &value);
+
+  ApplicationContainer Install (NodeContainer nodes) const;
+  ApplicationContainer Install (Ptr<Node> node) const;
+
+private:
+  Ptr<Application> InstallPriv (Ptr<Node> node) const;
+  ObjectFactory m_factory;
+};
+
+} // namespace ns3
+
+#endif /* V4PING_HELPER_H */
--- a/src/helper/wscript	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/helper/wscript	Mon Nov 24 06:36:05 2008 +0100
@@ -22,6 +22,7 @@
         'udp-echo-helper.cc',
         'bridge-helper.cc',
         'yans-wifi-phy-helper.cc',
+        'v4ping-helper.cc',
         ]
 
     headers = bld.create_obj('ns3header')
@@ -46,4 +47,15 @@
         'udp-echo-helper.h',
         'bridge-helper.h',
         'yans-wifi-phy-helper.h',
+        'v4ping-helper.h',
         ]
+
+    env = bld.env_of_name('default')
+    if env['ENABLE_EMU']:
+        helper.source.extend([
+                'emu-helper.cc',
+                ])
+        headers.source.extend([
+                'emu-helper.h',
+                ])
+
--- a/src/internet-stack/arp-cache.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/internet-stack/arp-cache.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -232,6 +232,11 @@
       delete (*i).second;
     }
   m_arpCache.erase (m_arpCache.begin (), m_arpCache.end ());
+  if (m_waitReplyTimer.IsRunning ())
+    {
+      NS_LOG_LOGIC ("Stopping WaitReplyTimer at " << Simulator::Now ().GetSeconds () << " due to ArpCache flush");
+      m_waitReplyTimer.Cancel ();
+    }
 }
 
 ArpCache::Entry *
--- a/src/internet-stack/arp-ipv4-interface.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/internet-stack/arp-ipv4-interface.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -65,7 +65,6 @@
 ArpIpv4Interface::DoDispose (void)
 {
   NS_LOG_FUNCTION (this);
-  m_node = 0;
   m_device = 0;
   m_cache = 0;
   Ipv4Interface::DoDispose ();
@@ -107,6 +106,17 @@
   NS_LOG_FUNCTION (this << p << dest);
 
   NS_ASSERT (GetDevice () != 0);
+  if (dest == GetAddress ())
+    {
+      Ptr<Ipv4L3Protocol> ipv4 = m_node->GetObject<Ipv4L3Protocol> ();
+        
+      ipv4->Receive (0, p, Ipv4L3Protocol::PROT_NUMBER, 
+                     GetDevice ()->GetBroadcast (),
+                     GetDevice ()->GetBroadcast (),
+                     NetDevice::PACKET_HOST // note: linux uses PACKET_LOOPBACK here
+                     );
+      return;
+    }
   if (m_device->NeedsArp ())
     {
       NS_LOG_LOGIC ("Needs ARP");
@@ -129,7 +139,7 @@
             "ArpIpv4Interface::SendTo (): Sending multicast packet over "
             "non-multicast device");
 
-          hardwareDestination = GetDevice ()->MakeMulticastAddress(dest);
+          hardwareDestination = GetDevice ()->GetMulticast(dest);
           found = true;
         }
       else
--- a/src/internet-stack/arp-l3-protocol.cc	Tue Nov 04 14:56:32 2008 +0100
+++ b/src/internet-stack/arp-l3-protocol.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -221,7 +221,7 @@
             } 
           else if (entry->IsWaitReply ()) 
             {
-              NS_FATAL_ERROR ("Test for possibly unreachable code-- please file a bug report if this is ever hit");
+              NS_FATAL_ERROR ("Test for possibly unreachable code-- please file a bug report, with a test case, if this is ever hit");
             }
         } 
       else 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-stack/icmpv4-l4-protocol.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,223 @@
+#include "icmpv4-l4-protocol.h"
+#include "ipv4-interface.h"
+#include "ipv4-l3-protocol.h"
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/node.h"
+#include "ns3/packet.h"
+#include "ns3/boolean.h"
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Icmpv4L4Protocol");
+
+NS_OBJECT_ENSURE_REGISTERED (Icmpv4L4Protocol);
+
+  // see rfc 792
+enum {
+ ICMP_PROTOCOL = 1
+};
+
+TypeId 
+Icmpv4L4Protocol::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::Icmpv4L4Protocol")
+    .SetParent<Ipv4L4Protocol> ()
+    .AddConstructor<Icmpv4L4Protocol> ()
+    .AddAttribute ("CalcChecksum", 
+		   "Control whether the icmp header checksum is calculated and stored in outgoing icmpv4 headers",
+		   BooleanValue (false),
+		   MakeBooleanAccessor (&Icmpv4L4Protocol::m_calcChecksum),
+		   MakeBooleanChecker ())
+    ;
+  return tid;
+}
+
+Icmpv4L4Protocol::Icmpv4L4Protocol ()
+  : m_node (0)
+{}
+Icmpv4L4Protocol::~Icmpv4L4Protocol ()
+{
+  NS_ASSERT (m_node == 0);
+}
+
+void 
+Icmpv4L4Protocol::SetNode (Ptr<Node> node)
+{
+  m_node = node;
+}
+
+uint16_t 
+Icmpv4L4Protocol::GetStaticProtocolNumber (void)
+{
+  return ICMP_PROTOCOL;
+}
+
+int 
+Icmpv4L4Protocol::GetProtocolNumber (void) const
+{
+  return ICMP_PROTOCOL;
+}
+void
+Icmpv4L4Protocol::SendMessage (Ptr<Packet> packet, Ipv4Address dest, uint8_t type, uint8_t code)
+{
+  Ptr<Ipv4L3Protocol> ipv4 = m_node->GetObject<Ipv4L3Protocol> ();
+  uint32_t i;
+  if (!ipv4->GetIfIndexForDestination (dest, i))
+    {
+      NS_LOG_WARN ("drop icmp message");
+      return;
+    }
+  Ipv4Address source = ipv4->GetAddress (i);
+  SendMessage (packet, source, dest, type, code);
+}
+
+void
+Icmpv4L4Protocol::SendMessage (Ptr<Packet> packet, Ipv4Address source, Ipv4Address dest, uint8_t type, uint8_t code)
+{
+  Ptr<Ipv4L3Protocol> ipv4 = m_node->GetObject<Ipv4L3Protocol> ();
+  Icmpv4Header icmp;
+  icmp.SetType (type);
+  icmp.SetCode (code);
+  if (m_calcChecksum)
+    {
+      icmp.EnableChecksum ();
+    }
+  packet->AddHeader (icmp);
+  ipv4->Send (packet, source, dest, ICMP_PROTOCOL);
+}
+void 
+Icmpv4L4Protocol::SendDestUnreachFragNeeded (Ipv4Header header, 
+					     Ptr<const Packet> orgData, 
+					     uint16_t nextHopMtu)
+{
+  NS_LOG_FUNCTION (this << header << *orgData << nextHopMtu);
+  SendDestUnreach (header, orgData, Icmpv4DestinationUnreachable::FRAG_NEEDED, nextHopMtu);
+}
+void 
+Icmpv4L4Protocol::SendDestUnreachPort (Ipv4Header header, 
+				       Ptr<const Packet> orgData)
+{
+  NS_LOG_FUNCTION (this << header << *orgData);
+  SendDestUnreach (header, orgData, Icmpv4DestinationUnreachable::PORT_UNREACHABLE, 0);
+}
+void 
+Icmpv4L4Protocol::SendDestUnreach (Ipv4Header header, Ptr<const Packet> orgData, 
+				   uint8_t code, uint16_t nextHopMtu)
+{
+  NS_LOG_FUNCTION (this << header << *orgData << (uint32_t) code << nextHopMtu);
+  Ptr<Packet> p = Create<Packet> ();
+  Icmpv4DestinationUnreachable unreach;
+  unreach.SetNextHopMtu (nextHopMtu);
+  unreach.SetHeader (header);
+  unreach.SetData (orgData);
+  p->AddHeader (unreach);
+  SendMessage (p, header.GetSource (), Icmpv4Header::DEST_UNREACH, code);
+}
+
+void 
+Icmpv4L4Protocol::SendTimeExceededTtl (Ipv4Header header, Ptr<const Packet> orgData)
+{
+  NS_LOG_FUNCTION (this << header << *orgData);
+  Ptr<Packet> p = Create<Packet> ();
+  Icmpv4TimeExceeded time;
+  time.SetHeader (header);
+  time.SetData (orgData);
+  p->AddHeader (time);
+  SendMessage (p, header.GetSource (), Icmpv4Header::TIME_EXCEEDED, Icmpv4TimeExceeded::TIME_TO_LIVE);
+}
+
+void
+Icmpv4L4Protocol::HandleEcho (Ptr<Packet> p,
+			      Icmpv4Header header, 
+			      Ipv4Address source,
+			      Ipv4Address destination)
+{
+  NS_LOG_FUNCTION (this << p << header << source << destination);
+
+  Ptr<Packet> reply = Create<Packet> ();
+  Icmpv4Echo echo;
+  p->RemoveHeader (echo);
+  reply->AddHeader (echo);
+  SendMessage (reply, destination, source, Icmpv4Header::ECHO_REPLY, 0);
+}
+void
+Icmpv4L4Protocol::Forward (Ipv4Address source, Icmpv4Header icmp,
+			   uint32_t info, Ipv4Header ipHeader,
+			   const uint8_t payload[8])
+{
+  Ptr<Ipv4L3Protocol> ipv4 = m_node->GetObject<Ipv4L3Protocol> ();
+  Ptr<Ipv4L4Protocol> l4 = ipv4->GetProtocol (ipHeader.GetProtocol ());
+  if (l4 != 0)
+    {
+      l4->ReceiveIcmp (source, ipHeader.GetTtl (), icmp.GetType (), icmp.GetCode (),
+		       info, ipHeader.GetSource (), ipHeader.GetDestination (), payload);
+    }
+}
+void
+Icmpv4L4Protocol::HandleDestUnreach (Ptr<Packet> p,
+				     Icmpv4Header icmp, 
+				     Ipv4Address source,
+				     Ipv4Address destination)
+{
+  NS_LOG_FUNCTION (this << p << icmp << source << destination);
+
+  Icmpv4DestinationUnreachable unreach;
+  p->PeekHeader (unreach);
+  uint8_t payload[8];
+  unreach.GetData (payload);
+  Ipv4Header ipHeader = unreach.GetHeader ();
+  Forward (source, icmp, unreach.GetNextHopMtu (), ipHeader, payload);
+}
+void
+Icmpv4L4Protocol::HandleTimeExceeded (Ptr<Packet> p,
+				      Icmpv4Header icmp, 
+				      Ipv4Address source,
+				      Ipv4Address destination)
+{
+  NS_LOG_FUNCTION (this << p << icmp << source << destination);
+
+  Icmpv4TimeExceeded time;
+  p->PeekHeader (time);
+  uint8_t payload[8];
+  time.GetData (payload);
+  Ipv4Header ipHeader = time.GetHeader ();
+  // info field is zero for TimeExceeded on linux
+  Forward (source, icmp, 0, ipHeader, payload);
+}
+
+enum Ipv4L4Protocol::RxStatus
+Icmpv4L4Protocol::Receive(Ptr<Packet> p, 
+			  Ipv4Address const &source,
+			  Ipv4Address const &destination,
+			  Ptr<Ipv4Interface> incomingInterface)
+{
+  NS_LOG_FUNCTION (this << p << source << destination << incomingInterface);
+
+  Icmpv4Header icmp;
+  p->RemoveHeader (icmp);
+  switch (icmp.GetType ()) {
+  case Icmpv4Header::ECHO:
+    HandleEcho (p, icmp, source, destination);
+    break;
+  case Icmpv4Header::DEST_UNREACH:
+    HandleDestUnreach (p, icmp, source, destination);
+    break;
+  case Icmpv4Header::TIME_EXCEEDED:
+    HandleTimeExceeded (p, icmp, source, destination);
+    break;
+  default:
+    NS_LOG_DEBUG (icmp << " " << *p);
+    break;
+  }
+  return Ipv4L4Protocol::RX_OK;
+}
+void 
+Icmpv4L4Protocol::DoDispose (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_node = 0;
+  Ipv4L4Protocol::DoDispose ();
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-stack/icmpv4-l4-protocol.h	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,62 @@
+#ifndef ICMPV4_L4_PROTOCOL_H
+#define ICMPV4_L4_PROTOCOL_H
+
+#include "ipv4-l4-protocol.h"
+#include "icmpv4.h"
+#include "ns3/ipv4-address.h"
+
+namespace ns3 {
+
+class Node;
+class Ipv4Interface;
+
+class Icmpv4L4Protocol : public Ipv4L4Protocol
+{
+public:
+  static TypeId GetTypeId (void);
+  Icmpv4L4Protocol ();
+  virtual ~Icmpv4L4Protocol ();
+
+  void SetNode (Ptr<Node> node);
+
+  static uint16_t GetStaticProtocolNumber (void);
+  virtual int GetProtocolNumber (void) const;
+  virtual enum Ipv4L4Protocol::RxStatus Receive(Ptr<Packet> p, 
+						const Ipv4Address &source,
+						const Ipv4Address &destination,
+						Ptr<Ipv4Interface> incomingInterface);
+
+  void SendDestUnreachFragNeeded (Ipv4Header header, Ptr<const Packet> orgData, uint16_t nextHopMtu);
+  void SendTimeExceededTtl (Ipv4Header header, Ptr<const Packet> orgData);
+  void SendDestUnreachPort (Ipv4Header header, Ptr<const Packet> orgData);
+
+private:
+  void HandleEcho (Ptr<Packet> p,
+		   Icmpv4Header header, 
+		   Ipv4Address source,
+		   Ipv4Address destination);
+  void HandleDestUnreach (Ptr<Packet> p,
+			  Icmpv4Header header, 
+			  Ipv4Address source,
+			  Ipv4Address destination);
+  void HandleTimeExceeded (Ptr<Packet> p,
+			   Icmpv4Header icmp, 
+			   Ipv4Address source,
+			   Ipv4Address destination);
+  void SendDestUnreach (Ipv4Header header, Ptr<const Packet> orgData, 
+			uint8_t code, uint16_t nextHopMtu);
+  void SendMessage (Ptr<Packet> packet, Ipv4Address dest, uint8_t type, uint8_t code);
+  void SendMessage (Ptr<Packet> packet, Ipv4Address source, Ipv4Address dest, uint8_t type, uint8_t code);
+  void Forward (Ipv4Address source, Icmpv4Header icmp,
+		uint32_t info, Ipv4Header ipHeader,
+		const uint8_t payload[8]);
+
+  virtual void DoDispose (void);
+
+  Ptr<Node> m_node;
+  bool m_calcChecksum;
+};
+
+} // namespace ns3
+
+#endif /* ICMPV4_L4_PROTOCOL_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet-stack/icmpv4.cc	Mon Nov 24 06:36:05 2008 +0100
@@ -0,0 +1,387 @@
+#include "icmpv4.h"
+#include "ns3/packet.h"
+
+namespace ns3 {
+
+/********************************************************
+ *        Icmpv4Header
+ ********************************************************/
+
+TypeId 
+Icmpv4Header::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::Icmpv4Header")
+    .SetParent<Header> ()
+    .AddConstructor<Icmpv4Header> ()
+    ;
+  return tid;
+}
+Icmpv4Header::Icmpv4Header ()
+  : m_type (0),
+    m_code (0),
+    m_calcChecksum (false)
+{}
+Icmpv4Header::~Icmpv4Header ()
+{}
+void 
+Icmpv4Header::EnableChecksum (void)
+{
+  m_calcChecksum = true;
+}
+TypeId 
+Icmpv4Header::GetInstanceTypeId (void) const
+{
+  return GetTypeId ();
+}
+uint32_t 
+Icmpv4Header::GetSerializedSize (void) const
+{
+  return 4;
+}
+void 
+Icmpv4Header::Serialize (Buffer::Iterator start) const
+{
+  Buffer::Iterator i = start;
+  i.WriteU8 (m_type);
+  i.WriteU8 (m_code);
+  i.WriteHtonU16 (0);
+  if (m_calcChecksum)
+    {
+      i = start;
+      uint16_t checksum = i.CalculateIpChecksum (i.GetSize ());
+      i = start;
+      i.Next (2);
+      i.WriteU16 (checksum);
+    }
+  
+}
+uint32_t 
+Icmpv4Header::Deserialize (Buffer::Iterator start)
+{
+  m_type = start.ReadU8 ();
+  m_code = start.ReadU8 ();
+  uint16_t checksum;
+  checksum = start.ReadNtohU16 ();
+  return 4;
+}
+void 
+Icmpv4Header::Print (std::ostream &os) const
+{
+  os << "type=" << (uint32_t)m_type << ", code=" << (uint32_t)m_code;
+}
+
+void 
+Icmpv4Header::SetType (uint8_t type)
+{
+  m_type = type;
+}
+void 
+Icmpv4Header::SetCode (uint8_t code)
+{
+  m_code = code;
+}
+uint8_t 
+Icmpv4Header::GetType (void) const
+{
+  return m_type;
+}
+uint8_t 
+Icmpv4Header::GetCode (void) const
+{
+  return m_code;
+}
+
+/********************************************************
+ *        Icmpv4Echo
+ ********************************************************/
+
+void 
+Icmpv4Echo::SetIdentifier (uint16_t id)
+{
+  m_identifier = id;
+}
+void 
+Icmpv4Echo::SetSequenceNumber (uint16_t seq)
+{
+  m_sequence = seq;
+}
+void 
+Icmpv4Echo::SetData (Ptr<const Packet> data)
+{
+  m_data = data->Copy ();
+}
+uint16_t 
+Icmpv4Echo::GetIdentifier (void) const
+{
+  return m_identifier;
+}
+uint16_t 
+Icmpv4Echo::GetSequenceNumber (void) const
+{
+  return m_sequence;
+}
+Ptr<const Packet> 
+Icmpv4Echo::GetData (void) const
+{
+  return m_data->Copy ();
+}
+
+
+TypeId 
+Icmpv4Echo::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::Icmpv4Echo")
+    .SetParent<Header> ()
+    .AddConstructor<Icmpv4Echo> ()
+    ;
+  return tid;
+}
+Icmpv4Echo::Icmpv4Echo ()
+  : m_identifier (0),
+    m_sequence (0),
+    m_data (0)
+{}
+Icmpv4Echo::~Icmpv4Echo ()
+{}
+TypeId 
+Icmpv4Echo::GetInstanceTypeId (void) const
+{
+  return GetTypeId ();
+}
+uint32_t 
+Icmpv4Echo::GetSerializedSize (void) const
+{
+  return 4 + m_data->GetSize ();
+}
+void 
+Icmpv4Echo::Serialize (Buffer::Iterator start) const