merge
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat Aug 23 21:52:44 2008 +0100 (17 months ago)
changeset 3562e1ed56c3cb4a
parent 3531 fd31a6709d4b
parent 3561 9358e0be63d2
child 3564 353c72fc49aa
merge
bindings/python/ns3_module_bridge.py
bindings/python/ns3_module_common.py
bindings/python/ns3_module_contrib.py
bindings/python/ns3_module_core.py
bindings/python/ns3_module_csma.py
bindings/python/ns3_module_global_routing.py
bindings/python/ns3_module_helper.py
bindings/python/ns3_module_internet_stack.py
bindings/python/ns3_module_mobility.py
bindings/python/ns3_module_node.py
bindings/python/ns3_module_olsr.py
bindings/python/ns3_module_onoff.py
bindings/python/ns3_module_packet_sink.py
bindings/python/ns3_module_point_to_point.py
bindings/python/ns3_module_simulator.py
bindings/python/ns3_module_udp_echo.py
bindings/python/ns3_module_wifi.py
bindings/python/ns3modulegen_generated.py
bindings/python/ns3modulescan.py
bindings/python/wscript
examples/mixed-wireless.py
examples/tcp-2way.cc
     1.1 --- a/bindings/python/ns3_module_bridge.py	Tue Aug 12 14:54:46 2008 +0100
     1.2 +++ b/bindings/python/ns3_module_bridge.py	Sat Aug 23 21:52:44 2008 +0100
     1.3 @@ -215,6 +215,7 @@
     1.4                     'ns3::Ptr< ns3::NetDevice >', 
     1.5                     [param('ns3::Mac48Address', 'source')], 
     1.6                     visibility='protected')
     1.7 +    cls.add_copy_constructor()
     1.8      return
     1.9  
    1.10  def register_Ns3BridgeChannel_methods(root_module, cls):
    1.11 @@ -239,6 +240,7 @@
    1.12                     'ns3::Ptr< ns3::NetDevice >', 
    1.13                     [param('uint32_t', 'i')], 
    1.14                     is_const=True, is_virtual=True)
    1.15 +    cls.add_copy_constructor()
    1.16      return
    1.17  
    1.18  def register_functions(root_module):
     2.1 --- a/bindings/python/ns3_module_common.py	Tue Aug 12 14:54:46 2008 +0100
     2.2 +++ b/bindings/python/ns3_module_common.py	Sat Aug 23 21:52:44 2008 +0100
     2.3 @@ -267,6 +267,7 @@
     2.4                     'void', 
     2.5                     [param('ns3::Tag&', 'tag')], 
     2.6                     is_const=True)
     2.7 +    cls.add_copy_constructor()
     2.8      return
     2.9  
    2.10  def register_Ns3TagList_methods(root_module, cls):
    2.11 @@ -316,6 +317,7 @@
    2.12                     'uint32_t', 
    2.13                     [], 
    2.14                     is_const=True)
    2.15 +    cls.add_copy_constructor()
    2.16      return
    2.17  
    2.18  def register_Ns3TagListIteratorItem_methods(root_module, cls):
    2.19 @@ -331,6 +333,7 @@
    2.20      cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False)
    2.21      ## tag-list.h: ns3::TagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor]
    2.22      cls.add_constructor([param('ns3::TagBuffer', 'buf')])
    2.23 +    cls.add_copy_constructor()
    2.24      return
    2.25  
    2.26  def register_Ns3TagBuffer_methods(root_module, cls):
    2.27 @@ -392,6 +395,7 @@
    2.28      cls.add_method('Read', 
    2.29                     'void', 
    2.30                     [param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
    2.31 +    cls.add_copy_constructor()
    2.32      return
    2.33  
    2.34  def register_Ns3Buffer_methods(root_module, cls):
    2.35 @@ -606,6 +610,7 @@
    2.36                     'uint32_t', 
    2.37                     [], 
    2.38                     is_const=True)
    2.39 +    cls.add_copy_constructor()
    2.40      return
    2.41  
    2.42  def register_Ns3Chunk_methods(root_module, cls):
    2.43 @@ -679,6 +684,7 @@
    2.44                     [param('std::ostream&', 'os')], 
    2.45                     is_pure_virtual=True, is_const=True, is_virtual=True)
    2.46      cls.add_constructor([])
    2.47 +    cls.add_copy_constructor()
    2.48      return
    2.49  
    2.50  def register_Ns3PcapWriter_methods(root_module, cls):
    2.51 @@ -708,10 +714,12 @@
    2.52      cls.add_method('WritePacket', 
    2.53                     'void', 
    2.54                     [param('ns3::Ptr< const ns3::Packet >', 'packet')])
    2.55 +    cls.add_copy_constructor()
    2.56      return
    2.57  
    2.58  def register_Ns3DataRateChecker_methods(root_module, cls):
    2.59      cls.add_constructor([])
    2.60 +    cls.add_copy_constructor()
    2.61      return
    2.62  
    2.63  def register_Ns3ErrorModel_methods(root_module, cls):
    2.64 @@ -753,6 +761,7 @@
    2.65                     'void', 
    2.66                     [], 
    2.67                     is_pure_virtual=True, visibility='private', is_virtual=True)
    2.68 +    cls.add_copy_constructor()
    2.69      return
    2.70  
    2.71  def register_Ns3Header_methods(root_module, cls):
    2.72 @@ -848,6 +857,7 @@
    2.73                     'void', 
    2.74                     [], 
    2.75                     visibility='private', is_virtual=True)
    2.76 +    cls.add_copy_constructor()
    2.77      return
    2.78  
    2.79  def register_Ns3DataRateValue_methods(root_module, cls):
    2.80 @@ -879,6 +889,7 @@
    2.81                     'bool', 
    2.82                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
    2.83                     is_virtual=True)
    2.84 +    cls.add_copy_constructor()
    2.85      return
    2.86  
    2.87  def register_Ns3RateErrorModel_methods(root_module, cls):
    2.88 @@ -936,6 +947,7 @@
    2.89                     'void', 
    2.90                     [], 
    2.91                     visibility='private', is_virtual=True)
    2.92 +    cls.add_copy_constructor()
    2.93      return
    2.94  
    2.95  def register_functions(root_module):
     3.1 --- a/bindings/python/ns3_module_contrib.py	Tue Aug 12 14:54:46 2008 +0100
     3.2 +++ b/bindings/python/ns3_module_contrib.py	Sat Aug 23 21:52:44 2008 +0100
     3.3 @@ -87,6 +87,7 @@
     3.4      cls.add_method('GenerateOutput', 
     3.5                     'void', 
     3.6                     [param('std::ostream&', 'os')])
     3.7 +    cls.add_copy_constructor()
     3.8      return
     3.9  
    3.10  def register_Ns3EventGarbageCollector_methods(root_module, cls):
    3.11 @@ -96,6 +97,7 @@
    3.12      cls.add_method('Track', 
    3.13                     'void', 
    3.14                     [param('ns3::EventId', 'event')])
    3.15 +    cls.add_copy_constructor()
    3.16      return
    3.17  
    3.18  def register_Ns3GnuplotDataset_methods(root_module, cls):
    3.19 @@ -119,6 +121,7 @@
    3.20      cls.add_method('Add', 
    3.21                     'void', 
    3.22                     [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')])
    3.23 +    cls.add_copy_constructor()
    3.24      return
    3.25  
    3.26  def register_Ns3GtkConfigStore_methods(root_module, cls):
    3.27 @@ -128,6 +131,7 @@
    3.28      cls.add_method('Configure', 
    3.29                     'void', 
    3.30                     [])
    3.31 +    cls.add_copy_constructor()
    3.32      return
    3.33  
    3.34  def register_Ns3ConfigStore_methods(root_module, cls):
    3.35 @@ -147,6 +151,7 @@
    3.36      cls.add_method('Configure', 
    3.37                     'void', 
    3.38                     [])
    3.39 +    cls.add_copy_constructor()
    3.40      return
    3.41  
    3.42  def register_Ns3DelayJitterEstimation_methods(root_module, cls):
    3.43 @@ -171,6 +176,7 @@
    3.44                     'ns3::Time', 
    3.45                     [], 
    3.46                     is_const=True)
    3.47 +    cls.add_copy_constructor()
    3.48      return
    3.49  
    3.50  def register_Ns3PyViz_methods(root_module, cls):
     4.1 --- a/bindings/python/ns3_module_core.py	Tue Aug 12 14:54:46 2008 +0100
     4.2 +++ b/bindings/python/ns3_module_core.py	Sat Aug 23 21:52:44 2008 +0100
     4.3 @@ -97,26 +97,6 @@
     4.4      module.add_class('CallbackBase')
     4.5      ## random-variable.h: ns3::ExponentialVariable [class]
     4.6      module.add_class('ExponentialVariable', parent=root_module['ns3::RandomVariable'])
     4.7 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty> [class]
     4.8 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'ns3::Mac48Address', 'ns3::empty', 'ns3::empty'])
     4.9 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty> [class]
    4.10 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'ns3::empty', 'ns3::empty', 'ns3::empty'])
    4.11 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty> [class]
    4.12 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty'])
    4.13 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty> [class]
    4.14 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'unsigned int', 'ns3::empty', 'ns3::empty'])
    4.15 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty> [class]
    4.16 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::MobilityModel const>', 'ns3::empty', 'ns3::empty', 'ns3::empty'])
    4.17 -    ## traced-callback.h: ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty> [class]
    4.18 -    module.add_class('TracedCallback', template_parameters=['ns3::TimeUnit<1>', 'ns3::TimeUnit<1>', 'ns3::WifiPhy::State', 'ns3::empty'])
    4.19 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char> [class]
    4.20 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'ns3::WifiMode', 'ns3::WifiPreamble', 'unsigned char'])
    4.21 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty> [class]
    4.22 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'double', 'ns3::empty', 'ns3::empty'])
    4.23 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble> [class]
    4.24 -    module.add_class('TracedCallback', template_parameters=['ns3::Ptr<ns3::Packet const>', 'double', 'ns3::WifiMode', 'ns3::WifiPreamble'])
    4.25 -    ## traced-callback.h: ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty> [class]
    4.26 -    module.add_class('TracedCallback', template_parameters=['unsigned int', 'unsigned int', 'ns3::empty', 'ns3::empty'])
    4.27      ## random-variable.h: ns3::DeterministicVariable [class]
    4.28      module.add_class('DeterministicVariable', parent=root_module['ns3::RandomVariable'])
    4.29      ## attribute-list.h: ns3::AttributeList [class]
    4.30 @@ -259,16 +239,6 @@
    4.31      register_Ns3WeibullVariable_methods(root_module, root_module['ns3::WeibullVariable'])
    4.32      register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
    4.33      register_Ns3ExponentialVariable_methods(root_module, root_module['ns3::ExponentialVariable'])
    4.34 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Mac48Address_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty >'])
    4.35 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Empty_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty >'])
    4.36 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Address_const__amp___Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty >'])
    4.37 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Unsigned_int_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty >'])
    4.38 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3MobilityModel_const__gt___Ns3Empty_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty >'])
    4.39 -    register_Ns3TracedCallback__Ns3TimeUnit__lt__1__gt___Ns3TimeUnit__lt__1__gt___Ns3WifiPhyState_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty >'])
    4.40 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3WifiMode_Ns3WifiPreamble_Unsigned_char_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char >'])
    4.41 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Double_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty >'])
    4.42 -    register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Double_Ns3WifiMode_Ns3WifiPreamble_methods(root_module, root_module['ns3::TracedCallback< ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble >'])
    4.43 -    register_Ns3TracedCallback__Unsigned_int_Unsigned_int_Ns3Empty_Ns3Empty_methods(root_module, root_module['ns3::TracedCallback< unsigned int, unsigned int, ns3::empty, ns3::empty >'])
    4.44      register_Ns3DeterministicVariable_methods(root_module, root_module['ns3::DeterministicVariable'])
    4.45      register_Ns3AttributeList_methods(root_module, root_module['ns3::AttributeList'])
    4.46      register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue'])
    4.47 @@ -346,6 +316,7 @@
    4.48                     'double', 
    4.49                     [param('double', 's'), param('double', 'l'), param('double', 'mean')], 
    4.50                     is_static=True)
    4.51 +    cls.add_copy_constructor()
    4.52      return
    4.53  
    4.54  def register_Ns3GlobalValue_methods(root_module, cls):
    4.55 @@ -395,6 +366,7 @@
    4.56                     '__gnu_cxx::__normal_iterator< ns3::GlobalValue* const*, std::vector< ns3::GlobalValue*, std::allocator< ns3::GlobalValue* > > >', 
    4.57                     [], 
    4.58                     is_static=True)
    4.59 +    cls.add_copy_constructor()
    4.60      return
    4.61  
    4.62  def register_Ns3RefCountBase_methods(root_module, cls):
    4.63 @@ -587,6 +559,7 @@
    4.64      ## type-id.h: ns3::TypeId::AttributeInfo::checker [variable]
    4.65      cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False)
    4.66      cls.add_constructor([])
    4.67 +    cls.add_copy_constructor()
    4.68      return
    4.69  
    4.70  def register_Ns3SystemWallClockMs_methods(root_module, cls):
    4.71 @@ -600,6 +573,7 @@
    4.72      cls.add_method('End', 
    4.73                     'long long unsigned int', 
    4.74                     [])
    4.75 +    cls.add_copy_constructor()
    4.76      return
    4.77  
    4.78  def register_Ns3CallbackImplBase_methods(root_module, cls):
    4.79 @@ -610,11 +584,13 @@
    4.80                     'bool', 
    4.81                     [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], 
    4.82                     is_pure_virtual=True, is_const=True, is_virtual=True)
    4.83 +    cls.add_copy_constructor()
    4.84      return
    4.85  
    4.86  def register_Ns3CriticalSection_methods(root_module, cls):
    4.87      ## system-mutex.h: ns3::CriticalSection::CriticalSection(ns3::SystemMutex & mutex) [constructor]
    4.88      cls.add_constructor([param('ns3::SystemMutex&', 'mutex')])
    4.89 +    cls.add_copy_constructor()
    4.90      return
    4.91  
    4.92  def register_Ns3TraceSourceAccessor_methods(root_module, cls):
    4.93 @@ -650,6 +626,7 @@
    4.94                     'bool', 
    4.95                     [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase&', 'cb', is_const=True)], 
    4.96                     is_pure_virtual=True, is_const=True, is_virtual=True)
    4.97 +    cls.add_copy_constructor()
    4.98      return
    4.99  
   4.100  def register_Ns3AttributeChecker_methods(root_module, cls):
   4.101 @@ -685,10 +662,12 @@
   4.102                     'bool', 
   4.103                     [param('ns3::AttributeValue&', 'source', is_const=True), param('ns3::AttributeValue&', 'destination')], 
   4.104                     is_pure_virtual=True, is_const=True, is_virtual=True)
   4.105 +    cls.add_copy_constructor()
   4.106      return
   4.107  
   4.108  def register_Ns3RandomVariableChecker_methods(root_module, cls):
   4.109      cls.add_constructor([])
   4.110 +    cls.add_copy_constructor()
   4.111      return
   4.112  
   4.113  def register_Ns3SystemMutex_methods(root_module, cls):
   4.114 @@ -702,6 +681,7 @@
   4.115      cls.add_method('Unlock', 
   4.116                     'void', 
   4.117                     [])
   4.118 +    cls.add_copy_constructor()
   4.119      return
   4.120  
   4.121  def register_Ns3NormalVariable_methods(root_module, cls):
   4.122 @@ -721,6 +701,7 @@
   4.123                     'double', 
   4.124                     [param('double', 'm'), param('double', 'v'), param('double', 'b')], 
   4.125                     is_static=True)
   4.126 +    cls.add_copy_constructor()
   4.127      return
   4.128  
   4.129  def register_Ns3ObjectFactory_methods(root_module, cls):
   4.130 @@ -780,6 +761,7 @@
   4.131                     'bool', 
   4.132                     [], 
   4.133                     is_pure_virtual=True, is_const=True, is_virtual=True)
   4.134 +    cls.add_copy_constructor()
   4.135      return
   4.136  
   4.137  def register_Ns3ParetoVariable_methods(root_module, cls):
   4.138 @@ -796,6 +778,7 @@
   4.139                     'double', 
   4.140                     [param('double', 'm'), param('double', 's'), param('double', 'b', default_value='0')], 
   4.141                     is_static=True)
   4.142 +    cls.add_copy_constructor()
   4.143      return
   4.144  
   4.145  def register_Ns3ConstantVariable_methods(root_module, cls):
   4.146 @@ -807,6 +790,7 @@
   4.147      cls.add_method('SetConstant', 
   4.148                     'void', 
   4.149                     [param('double', 'c')])
   4.150 +    cls.add_copy_constructor()
   4.151      return
   4.152  
   4.153  def register_Ns3SystemThread_methods(root_module, cls):
   4.154 @@ -830,6 +814,7 @@
   4.155      cls.add_method('Join', 
   4.156                     'void', 
   4.157                     [])
   4.158 +    cls.add_copy_constructor()
   4.159      return
   4.160  
   4.161  def register_Ns3EmpiricalVariable_methods(root_module, cls):
   4.162 @@ -839,6 +824,7 @@
   4.163      cls.add_method('CDF', 
   4.164                     'void', 
   4.165                     [param('double', 'v'), param('double', 'c')])
   4.166 +    cls.add_copy_constructor()
   4.167      return
   4.168  
   4.169  def register_Ns3EnumChecker_methods(root_module, cls):
   4.170 @@ -882,10 +868,12 @@
   4.171                     'bool', 
   4.172                     [param('ns3::AttributeValue&', 'src', is_const=True), param('ns3::AttributeValue&', 'dst')], 
   4.173                     is_const=True, is_virtual=True)
   4.174 +    cls.add_copy_constructor()
   4.175      return
   4.176  
   4.177  def register_Ns3Empty_methods(root_module, cls):
   4.178      cls.add_constructor([])
   4.179 +    cls.add_copy_constructor()
   4.180      return
   4.181  
   4.182  def register_Ns3ObjectBase_methods(root_module, cls):
   4.183 @@ -951,34 +939,42 @@
   4.184  
   4.185  def register_Ns3CommandLine_methods(root_module, cls):
   4.186      cls.add_constructor([])
   4.187 +    cls.add_copy_constructor()
   4.188      return
   4.189  
   4.190  def register_Ns3IntToType__6_methods(root_module, cls):
   4.191      cls.add_constructor([])
   4.192 +    cls.add_copy_constructor()
   4.193      return
   4.194  
   4.195  def register_Ns3IntToType__5_methods(root_module, cls):
   4.196      cls.add_constructor([])
   4.197 +    cls.add_copy_constructor()
   4.198      return
   4.199  
   4.200  def register_Ns3IntToType__4_methods(root_module, cls):
   4.201      cls.add_constructor([])
   4.202 +    cls.add_copy_constructor()
   4.203      return
   4.204  
   4.205  def register_Ns3IntToType__3_methods(root_module, cls):
   4.206      cls.add_constructor([])
   4.207 +    cls.add_copy_constructor()
   4.208      return
   4.209  
   4.210  def register_Ns3IntToType__2_methods(root_module, cls):
   4.211      cls.add_constructor([])
   4.212 +    cls.add_copy_constructor()
   4.213      return
   4.214  
   4.215  def register_Ns3IntToType__1_methods(root_module, cls):
   4.216      cls.add_constructor([])
   4.217 +    cls.add_copy_constructor()
   4.218      return
   4.219  
   4.220  def register_Ns3IntToType__0_methods(root_module, cls):
   4.221      cls.add_constructor([])
   4.222 +    cls.add_copy_constructor()
   4.223      return
   4.224  
   4.225  def register_Ns3RngStream_methods(root_module, cls):
   4.226 @@ -1055,11 +1051,13 @@
   4.227                     'double', 
   4.228                     [param('double', 'mu'), param('double', 'sigma')], 
   4.229                     is_static=True)
   4.230 +    cls.add_copy_constructor()
   4.231      return
   4.232  
   4.233  def register_Ns3IntEmpiricalVariable_methods(root_module, cls):
   4.234      ## random-variable.h: ns3::IntEmpiricalVariable::IntEmpiricalVariable() [constructor]
   4.235      cls.add_constructor([])
   4.236 +    cls.add_copy_constructor()
   4.237      return
   4.238  
   4.239  def register_Ns3PointerChecker_methods(root_module, cls):
   4.240 @@ -1069,6 +1067,7 @@
   4.241                     [], 
   4.242                     is_pure_virtual=True, is_const=True, is_virtual=True)
   4.243      cls.add_constructor([])
   4.244 +    cls.add_copy_constructor()
   4.245      return
   4.246  
   4.247  def register_Ns3WeibullVariable_methods(root_module, cls):
   4.248 @@ -1085,6 +1084,7 @@
   4.249                     'double', 
   4.250                     [param('double', 'm'), param('double', 's'), param('double', 'b', default_value='0')], 
   4.251                     is_static=True)
   4.252 +    cls.add_copy_constructor()
   4.253      return
   4.254  
   4.255  def register_Ns3CallbackBase_methods(root_module, cls):
   4.256 @@ -1098,6 +1098,7 @@
   4.257      ## callback.h: ns3::CallbackBase::CallbackBase(ns3::Ptr<ns3::CallbackImplBase> impl) [constructor]
   4.258      cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')], 
   4.259                          visibility='protected')
   4.260 +    cls.add_copy_constructor()
   4.261      return
   4.262  
   4.263  def register_Ns3ExponentialVariable_methods(root_module, cls):
   4.264 @@ -1112,221 +1113,13 @@
   4.265                     'double', 
   4.266                     [param('double', 'm'), param('double', 'b', default_value='0')], 
   4.267                     is_static=True)
   4.268 -    return
   4.269 -
   4.270 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Mac48Address_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.271 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.272 -    cls.add_constructor([])
   4.273 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.274 -    cls.add_method('ConnectWithoutContext', 
   4.275 -                   'void', 
   4.276 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.277 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.278 -    cls.add_method('Connect', 
   4.279 -                   'void', 
   4.280 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.281 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.282 -    cls.add_method('DisconnectWithoutContext', 
   4.283 -                   'void', 
   4.284 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.285 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Mac48Address, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.286 -    cls.add_method('Disconnect', 
   4.287 -                   'void', 
   4.288 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.289 -    return
   4.290 -
   4.291 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Empty_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.292 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.293 -    cls.add_constructor([])
   4.294 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.295 -    cls.add_method('ConnectWithoutContext', 
   4.296 -                   'void', 
   4.297 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.298 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.299 -    cls.add_method('Connect', 
   4.300 -                   'void', 
   4.301 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.302 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.303 -    cls.add_method('DisconnectWithoutContext', 
   4.304 -                   'void', 
   4.305 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.306 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::empty, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.307 -    cls.add_method('Disconnect', 
   4.308 -                   'void', 
   4.309 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.310 -    return
   4.311 -
   4.312 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3Address_const__amp___Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.313 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.314 -    cls.add_constructor([])
   4.315 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.316 -    cls.add_method('ConnectWithoutContext', 
   4.317 -                   'void', 
   4.318 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.319 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.320 -    cls.add_method('Connect', 
   4.321 -                   'void', 
   4.322 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.323 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.324 -    cls.add_method('DisconnectWithoutContext', 
   4.325 -                   'void', 
   4.326 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.327 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::Address const&, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.328 -    cls.add_method('Disconnect', 
   4.329 -                   'void', 
   4.330 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.331 -    return
   4.332 -
   4.333 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Unsigned_int_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.334 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.335 -    cls.add_constructor([])
   4.336 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.337 -    cls.add_method('ConnectWithoutContext', 
   4.338 -                   'void', 
   4.339 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.340 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.341 -    cls.add_method('Connect', 
   4.342 -                   'void', 
   4.343 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.344 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.345 -    cls.add_method('DisconnectWithoutContext', 
   4.346 -                   'void', 
   4.347 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.348 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, unsigned int, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.349 -    cls.add_method('Disconnect', 
   4.350 -                   'void', 
   4.351 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.352 -    return
   4.353 -
   4.354 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3MobilityModel_const__gt___Ns3Empty_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.355 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.356 -    cls.add_constructor([])
   4.357 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.358 -    cls.add_method('ConnectWithoutContext', 
   4.359 -                   'void', 
   4.360 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.361 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.362 -    cls.add_method('Connect', 
   4.363 -                   'void', 
   4.364 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.365 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.366 -    cls.add_method('DisconnectWithoutContext', 
   4.367 -                   'void', 
   4.368 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.369 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::MobilityModel const>, ns3::empty, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.370 -    cls.add_method('Disconnect', 
   4.371 -                   'void', 
   4.372 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.373 -    return
   4.374 -
   4.375 -def register_Ns3TracedCallback__Ns3TimeUnit__lt__1__gt___Ns3TimeUnit__lt__1__gt___Ns3WifiPhyState_Ns3Empty_methods(root_module, cls):
   4.376 -    ## traced-callback.h: ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty>::TracedCallback() [constructor]
   4.377 -    cls.add_constructor([])
   4.378 -    ## traced-callback.h: void ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.379 -    cls.add_method('ConnectWithoutContext', 
   4.380 -                   'void', 
   4.381 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.382 -    ## traced-callback.h: void ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.383 -    cls.add_method('Connect', 
   4.384 -                   'void', 
   4.385 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.386 -    ## traced-callback.h: void ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.387 -    cls.add_method('DisconnectWithoutContext', 
   4.388 -                   'void', 
   4.389 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.390 -    ## traced-callback.h: void ns3::TracedCallback<ns3::TimeUnit<1>, ns3::TimeUnit<1>, ns3::WifiPhy::State, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.391 -    cls.add_method('Disconnect', 
   4.392 -                   'void', 
   4.393 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.394 -    return
   4.395 -
   4.396 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Ns3WifiMode_Ns3WifiPreamble_Unsigned_char_methods(root_module, cls):
   4.397 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char>::TracedCallback() [constructor]
   4.398 -    cls.add_constructor([])
   4.399 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.400 -    cls.add_method('ConnectWithoutContext', 
   4.401 -                   'void', 
   4.402 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.403 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.404 -    cls.add_method('Connect', 
   4.405 -                   'void', 
   4.406 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.407 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.408 -    cls.add_method('DisconnectWithoutContext', 
   4.409 -                   'void', 
   4.410 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.411 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, ns3::WifiMode, ns3::WifiPreamble, unsigned char>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.412 -    cls.add_method('Disconnect', 
   4.413 -                   'void', 
   4.414 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.415 -    return
   4.416 -
   4.417 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Double_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.418 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.419 -    cls.add_constructor([])
   4.420 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.421 -    cls.add_method('ConnectWithoutContext', 
   4.422 -                   'void', 
   4.423 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.424 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.425 -    cls.add_method('Connect', 
   4.426 -                   'void', 
   4.427 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.428 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.429 -    cls.add_method('DisconnectWithoutContext', 
   4.430 -                   'void', 
   4.431 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.432 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.433 -    cls.add_method('Disconnect', 
   4.434 -                   'void', 
   4.435 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.436 -    return
   4.437 -
   4.438 -def register_Ns3TracedCallback__Ns3Ptr__lt__ns3Packet_const__gt___Double_Ns3WifiMode_Ns3WifiPreamble_methods(root_module, cls):
   4.439 -    ## traced-callback.h: ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble>::TracedCallback() [constructor]
   4.440 -    cls.add_constructor([])
   4.441 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.442 -    cls.add_method('ConnectWithoutContext', 
   4.443 -                   'void', 
   4.444 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.445 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.446 -    cls.add_method('Connect', 
   4.447 -                   'void', 
   4.448 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.449 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.450 -    cls.add_method('DisconnectWithoutContext', 
   4.451 -                   'void', 
   4.452 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.453 -    ## traced-callback.h: void ns3::TracedCallback<ns3::Ptr<ns3::Packet const>, double, ns3::WifiMode, ns3::WifiPreamble>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.454 -    cls.add_method('Disconnect', 
   4.455 -                   'void', 
   4.456 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.457 -    return
   4.458 -
   4.459 -def register_Ns3TracedCallback__Unsigned_int_Unsigned_int_Ns3Empty_Ns3Empty_methods(root_module, cls):
   4.460 -    ## traced-callback.h: ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty>::TracedCallback() [constructor]
   4.461 -    cls.add_constructor([])
   4.462 -    ## traced-callback.h: void ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty>::ConnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.463 -    cls.add_method('ConnectWithoutContext', 
   4.464 -                   'void', 
   4.465 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.466 -    ## traced-callback.h: void ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty>::Connect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.467 -    cls.add_method('Connect', 
   4.468 -                   'void', 
   4.469 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.470 -    ## traced-callback.h: void ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty>::DisconnectWithoutContext(ns3::CallbackBase const & callback) [member function]
   4.471 -    cls.add_method('DisconnectWithoutContext', 
   4.472 -                   'void', 
   4.473 -                   [param('ns3::CallbackBase&', 'callback', is_const=True)])
   4.474 -    ## traced-callback.h: void ns3::TracedCallback<unsigned int, unsigned int, ns3::empty, ns3::empty>::Disconnect(ns3::CallbackBase const & callback, std::string path) [member function]
   4.475 -    cls.add_method('Disconnect', 
   4.476 -                   'void', 
   4.477 -                   [param('ns3::CallbackBase&', 'callback', is_const=True), param('std::string', 'path')])
   4.478 +    cls.add_copy_constructor()
   4.479      return
   4.480  
   4.481  def register_Ns3DeterministicVariable_methods(root_module, cls):
   4.482      ## random-variable.h: ns3::DeterministicVariable::DeterministicVariable(double * d, uint32_t c) [constructor]
   4.483      cls.add_constructor([param('double *', 'd'), param('uint32_t', 'c')])
   4.484 +    cls.add_copy_constructor()
   4.485      return
   4.486  
   4.487  def register_Ns3AttributeList_methods(root_module, cls):
   4.488 @@ -1398,6 +1191,7 @@
   4.489                     'double', 
   4.490                     [param('double', 's'), param('double', 'l')], 
   4.491                     is_static=True)
   4.492 +    cls.add_copy_constructor()
   4.493      return
   4.494  
   4.495  def register_Ns3Object_methods(root_module, cls):
   4.496 @@ -1453,6 +1247,7 @@
   4.497      cls.add_method('Next', 
   4.498                     'ns3::Ptr< ns3::Object const >', 
   4.499                     [])
   4.500 +    cls.add_copy_constructor()
   4.501      return
   4.502  
   4.503  def register_Ns3SystemCondition_methods(root_module, cls):
   4.504 @@ -1482,6 +1277,7 @@
   4.505      cls.add_method('TimedWait', 
   4.506                     'bool', 
   4.507                     [param('uint64_t', 'ns')])
   4.508 +    cls.add_copy_constructor()
   4.509      return
   4.510  
   4.511  def register_Ns3SequentialVariable_methods(root_module, cls):
   4.512 @@ -1489,6 +1285,7 @@
   4.513      cls.add_constructor([param('double', 'f'), param('double', 'l'), param('double', 'i', default_value='1'), param('uint32_t', 'c', default_value='1')])
   4.514      ## random-variable.h: ns3::SequentialVariable::SequentialVariable(double f, double l, ns3::RandomVariable const & i, uint32_t c=1) [constructor]
   4.515      cls.add_constructor([param('double', 'f'), param('double', 'l'), param('ns3::RandomVariable&', 'i', is_const=True), param('uint32_t', 'c', default_value='1')])
   4.516 +    cls.add_copy_constructor()
   4.517      return
   4.518  
   4.519  def register_Ns3ObjectVectorChecker_methods(root_module, cls):
   4.520 @@ -1498,10 +1295,12 @@
   4.521                     [], 
   4.522                     is_pure_virtual=True, is_const=True, is_virtual=True)
   4.523      cls.add_constructor([])
   4.524 +    cls.add_copy_constructor()
   4.525      return
   4.526  
   4.527  def register_Ns3StringChecker_methods(root_module, cls):
   4.528      cls.add_constructor([])
   4.529 +    cls.add_copy_constructor()
   4.530      return
   4.531  
   4.532  def register_Ns3ObjectVectorValue_methods(root_module, cls):
   4.533 @@ -1542,10 +1341,12 @@
   4.534                     'bool', 
   4.535                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.536                     is_virtual=True)
   4.537 +    cls.add_copy_constructor()
   4.538      return
   4.539  
   4.540  def register_Ns3BooleanChecker_methods(root_module, cls):
   4.541      cls.add_constructor([])
   4.542 +    cls.add_copy_constructor()
   4.543      return
   4.544  
   4.545  def register_Ns3UintegerValue_methods(root_module, cls):
   4.546 @@ -1577,6 +1378,7 @@
   4.547                     'bool', 
   4.548                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.549                     is_virtual=True)
   4.550 +    cls.add_copy_constructor()
   4.551      return
   4.552  
   4.553  def register_Ns3ObjectVectorAccessor_methods(root_module, cls):
   4.554 @@ -1611,6 +1413,7 @@
   4.555                     [param('ns3::ObjectBase *', 'object', transfer_ownership=False, is_const=True), param('uint32_t', 'i')], 
   4.556                     is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
   4.557      cls.add_constructor([])
   4.558 +    cls.add_copy_constructor()
   4.559      return
   4.560  
   4.561  def register_Ns3PointerValue_methods(root_module, cls):
   4.562 @@ -1648,10 +1451,12 @@
   4.563  
   4.564  def register_Ns3ObjectFactoryChecker_methods(root_module, cls):
   4.565      cls.add_constructor([])
   4.566 +    cls.add_copy_constructor()
   4.567      return
   4.568  
   4.569  def register_Ns3TypeIdChecker_methods(root_module, cls):
   4.570      cls.add_constructor([])
   4.571 +    cls.add_copy_constructor()
   4.572      return
   4.573  
   4.574  def register_Ns3DoubleValue_methods(root_module, cls):
   4.575 @@ -1683,6 +1488,7 @@
   4.576                     'bool', 
   4.577                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.578                     is_virtual=True)
   4.579 +    cls.add_copy_constructor()
   4.580      return
   4.581  
   4.582  def register_Ns3TypeIdValue_methods(root_module, cls):
   4.583 @@ -1714,6 +1520,7 @@
   4.584                     'bool', 
   4.585                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.586                     is_virtual=True)
   4.587 +    cls.add_copy_constructor()
   4.588      return
   4.589  
   4.590  def register_Ns3EnumValue_methods(root_module, cls):
   4.591 @@ -1745,6 +1552,7 @@
   4.592                     'bool', 
   4.593                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.594                     is_virtual=True)
   4.595 +    cls.add_copy_constructor()
   4.596      return
   4.597  
   4.598  def register_Ns3RandomVariableValue_methods(root_module, cls):
   4.599 @@ -1776,6 +1584,7 @@
   4.600                     'bool', 
   4.601                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.602                     is_virtual=True)
   4.603 +    cls.add_copy_constructor()
   4.604      return
   4.605  
   4.606  def register_Ns3ObjectFactoryValue_methods(root_module, cls):
   4.607 @@ -1807,6 +1616,7 @@
   4.608                     'bool', 
   4.609                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.610                     is_virtual=True)
   4.611 +    cls.add_copy_constructor()
   4.612      return
   4.613  
   4.614  def register_Ns3IntegerValue_methods(root_module, cls):
   4.615 @@ -1838,6 +1648,7 @@
   4.616                     'bool', 
   4.617                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.618                     is_virtual=True)
   4.619 +    cls.add_copy_constructor()
   4.620      return
   4.621  
   4.622  def register_Ns3BooleanValue_methods(root_module, cls):
   4.623 @@ -1903,6 +1714,7 @@
   4.624                     'bool', 
   4.625                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   4.626                     is_virtual=True)
   4.627 +    cls.add_copy_constructor()
   4.628      return
   4.629  
   4.630  def register_Ns3EmptyAttributeValue_methods(root_module, cls):
     5.1 --- a/bindings/python/ns3_module_csma.py	Tue Aug 12 14:54:46 2008 +0100
     5.2 +++ b/bindings/python/ns3_module_csma.py	Sat Aug 23 21:52:44 2008 +0100
     5.3 @@ -76,6 +76,7 @@
     5.4      cls.add_method('IsActive', 
     5.5                     'bool', 
     5.6                     [])
     5.7 +    cls.add_copy_constructor()
     5.8      return
     5.9  
    5.10  def register_Ns3Backoff_methods(root_module, cls):
    5.11 @@ -109,6 +110,7 @@
    5.12      cls.add_method('IncrNumRetries', 
    5.13                     'void', 
    5.14                     [])
    5.15 +    cls.add_copy_constructor()
    5.16      return
    5.17  
    5.18  def register_Ns3CsmaChannel_methods(root_module, cls):
    5.19 @@ -196,6 +198,7 @@
    5.20                     'ns3::Time', 
    5.21                     [], 
    5.22                     is_virtual=True)
    5.23 +    cls.add_copy_constructor()
    5.24      return
    5.25  
    5.26  def register_Ns3CsmaNetDevice_methods(root_module, cls):
     6.1 --- a/bindings/python/ns3_module_global_routing.py	Tue Aug 12 14:54:46 2008 +0100
     6.2 +++ b/bindings/python/ns3_module_global_routing.py	Sat Aug 23 21:52:44 2008 +0100
     6.3 @@ -220,6 +220,7 @@
     6.4      cls.add_method('SetMetric', 
     6.5                     'void', 
     6.6                     [param('uint16_t', 'metric')])
     6.7 +    cls.add_copy_constructor()
     6.8      return
     6.9  
    6.10  def register_Ns3GlobalRouter_methods(root_module, cls):
     7.1 --- a/bindings/python/ns3_module_helper.py	Tue Aug 12 14:54:46 2008 +0100
     7.2 +++ b/bindings/python/ns3_module_helper.py	Sat Aug 23 21:52:44 2008 +0100
     7.3 @@ -35,6 +35,8 @@
     7.4      module.add_class('WifiHelper', allow_subclassing=False)
     7.5      ## ipv4-address-helper.h: ns3::Ipv4AddressHelper [class]
     7.6      module.add_class('Ipv4AddressHelper', allow_subclassing=False)
     7.7 +    ## bridge-helper.h: ns3::BridgeHelper [class]
     7.8 +    module.add_class('BridgeHelper', allow_subclassing=False)
     7.9      ## packet-sink-helper.h: ns3::PacketSinkHelper [class]
    7.10      module.add_class('PacketSinkHelper', allow_subclassing=False)
    7.11      ## ns2-mobility-helper.h: ns3::Ns2MobilityHelper [class]
    7.12 @@ -97,6 +99,7 @@
    7.13      register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
    7.14      register_Ns3WifiHelper_methods(root_module, root_module['ns3::WifiHelper'])
    7.15      register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
    7.16 +    register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
    7.17      register_Ns3PacketSinkHelper_methods(root_module, root_module['ns3::PacketSinkHelper'])
    7.18      register_Ns3Ns2MobilityHelper_methods(root_module, root_module['ns3::Ns2MobilityHelper'])
    7.19      return
    7.20 @@ -152,6 +155,7 @@
    7.21                     'void', 
    7.22                     [param('std::ostream&', 'os')], 
    7.23                     is_static=True)
    7.24 +    cls.add_copy_constructor()
    7.25      return
    7.26  
    7.27  def register_Ns3InternetStackHelper_methods(root_module, cls):
    7.28 @@ -165,6 +169,7 @@
    7.29                     [param('std::string', 'filename')], 
    7.30                     is_static=True)
    7.31      cls.add_constructor([])
    7.32 +    cls.add_copy_constructor()
    7.33      return
    7.34  
    7.35  def register_Ns3NodeContainer_methods(root_module, cls):
    7.36 @@ -215,6 +220,7 @@
    7.37                     'ns3::NodeContainer', 
    7.38                     [], 
    7.39                     is_static=True)
    7.40 +    cls.add_copy_constructor()
    7.41      return
    7.42  
    7.43  def register_Ns3PointToPointHelper_methods(root_module, cls):
    7.44 @@ -290,6 +296,7 @@
    7.45      cls.add_method('Install', 
    7.46                     'ns3::NetDeviceContainer', 
    7.47                     [param('ns3::Ptr< ns3::Node >', 'a'), param('ns3::Ptr< ns3::Node >', 'b')])
    7.48 +    cls.add_copy_constructor()
    7.49      return
    7.50  
    7.51  def register_Ns3NetDeviceContainer_methods(root_module, cls):
    7.52 @@ -322,6 +329,7 @@
    7.53                     'void', 
    7.54                     [param('ns3::Ptr< ns3::NetDevice >', 'device')])
    7.55      cls.add_constructor([])
    7.56 +    cls.add_copy_constructor()
    7.57      return
    7.58  
    7.59  def register_Ns3CsmaHelper_methods(root_module, cls):
    7.60 @@ -397,6 +405,7 @@
    7.61      cls.add_method('Install', 
    7.62                     'ns3::NetDeviceContainer', 
    7.63                     [param('ns3::NodeContainer&', 'c', is_const=True), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')])
    7.64 +    cls.add_copy_constructor()
    7.65      return
    7.66  
    7.67  def register_Ns3UdpEchoServerHelper_methods(root_module, cls):
    7.68 @@ -410,6 +419,7 @@
    7.69      cls.add_method('Install', 
    7.70                     'ns3::ApplicationContainer', 
    7.71                     [param('ns3::NodeContainer', 'c')])
    7.72 +    cls.add_copy_constructor()
    7.73      return
    7.74  
    7.75  def register_Ns3OlsrHelper_methods(root_module, cls):
    7.76 @@ -431,6 +441,7 @@
    7.77      cls.add_method('InstallAll', 
    7.78                     'void', 
    7.79                     [])
    7.80 +    cls.add_copy_constructor()
    7.81      return
    7.82  
    7.83  def register_Ns3PacketSocketHelper_methods(root_module, cls):
    7.84 @@ -439,6 +450,7 @@
    7.85                     'void', 
    7.86                     [param('ns3::NodeContainer', 'c')])
    7.87      cls.add_constructor([])
    7.88 +    cls.add_copy_constructor()
    7.89      return
    7.90  
    7.91  def register_Ns3OnOffHelper_methods(root_module, cls):
    7.92 @@ -452,6 +464,7 @@
    7.93      cls.add_method('Install', 
    7.94                     'ns3::ApplicationContainer', 
    7.95                     [param('ns3::NodeContainer', 'c')])
    7.96 +    cls.add_copy_constructor()
    7.97      return
    7.98  
    7.99  def register_Ns3UdpEchoClientHelper_methods(root_module, cls):
   7.100 @@ -465,6 +478,7 @@
   7.101      cls.add_method('Install', 
   7.102                     'ns3::ApplicationContainer', 
   7.103                     [param('ns3::NodeContainer', 'c')])
   7.104 +    cls.add_copy_constructor()
   7.105      return
   7.106  
   7.107  def register_Ns3StaticMulticastRouteHelper_methods(root_module, cls):
   7.108 @@ -482,6 +496,7 @@
   7.109      cls.add_method('JoinMulticastGroup', 
   7.110                     'void', 
   7.111                     [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group')])
   7.112 +    cls.add_copy_constructor()
   7.113      return
   7.114  
   7.115  def register_Ns3Ipv4InterfaceContainer_methods(root_module, cls):
   7.116 @@ -505,6 +520,7 @@
   7.117      cls.add_method('Add', 
   7.118                     'void', 
   7.119                     [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4'), param('uint32_t', 'interface')])
   7.120 +    cls.add_copy_constructor()
   7.121      return
   7.122  
   7.123  def register_Ns3ApplicationContainer_methods(root_module, cls):
   7.124 @@ -545,6 +561,7 @@
   7.125                     'void', 
   7.126                     [param('ns3::Time', 'stop')])
   7.127      cls.add_constructor([])
   7.128 +    cls.add_copy_constructor()
   7.129      return
   7.130  
   7.131  def register_Ns3WifiHelper_methods(root_module, cls):
   7.132 @@ -612,6 +629,7 @@
   7.133                     'ns3::NetDeviceContainer', 
   7.134                     [param('ns3::NodeContainer', 'c'), param('ns3::Ptr< ns3::WifiChannel >', 'channel')], 
   7.135                     is_const=True)
   7.136 +    cls.add_copy_constructor()
   7.137      return
   7.138  
   7.139  def register_Ns3Ipv4AddressHelper_methods(root_module, cls):
   7.140 @@ -633,6 +651,21 @@
   7.141      cls.add_method('Assign', 
   7.142                     'ns3::Ipv4InterfaceContainer', 
   7.143                     [param('ns3::NetDeviceContainer&', 'c', is_const=True)])
   7.144 +    cls.add_copy_constructor()
   7.145 +    return
   7.146 +
   7.147 +def register_Ns3BridgeHelper_methods(root_module, cls):
   7.148 +    ## bridge-helper.h: ns3::BridgeHelper::BridgeHelper() [constructor]
   7.149 +    cls.add_constructor([])
   7.150 +    ## bridge-helper.h: void ns3::BridgeHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
   7.151 +    cls.add_method('SetDeviceAttribute', 
   7.152 +                   'void', 
   7.153 +                   [param('std::string', 'n1'), param('ns3::AttributeValue&', 'v1', is_const=True)])
   7.154 +    ## bridge-helper.h: ns3::NetDeviceContainer ns3::BridgeHelper::Install(ns3::Ptr<ns3::Node> node, ns3::NetDeviceContainer c) [member function]
   7.155 +    cls.add_method('Install', 
   7.156 +                   'ns3::NetDeviceContainer', 
   7.157 +                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::NetDeviceContainer', 'c')])
   7.158 +    cls.add_copy_constructor()
   7.159      return
   7.160  
   7.161  def register_Ns3PacketSinkHelper_methods(root_module, cls):
   7.162 @@ -646,6 +679,7 @@
   7.163      cls.add_method('Install', 
   7.164                     'ns3::ApplicationContainer', 
   7.165                     [param('ns3::NodeContainer', 'c')])
   7.166 +    cls.add_copy_constructor()
   7.167      return
   7.168  
   7.169  def register_Ns3Ns2MobilityHelper_methods(root_module, cls):
   7.170 @@ -656,6 +690,7 @@
   7.171                     'void', 
   7.172                     [], 
   7.173                     is_const=True)
   7.174 +    cls.add_copy_constructor()
   7.175      return
   7.176  
   7.177  def register_functions(root_module):
     8.1 --- a/bindings/python/ns3_module_internet_stack.py	Tue Aug 12 14:54:46 2008 +0100
     8.2 +++ b/bindings/python/ns3_module_internet_stack.py	Sat Aug 23 21:52:44 2008 +0100
     8.3 @@ -146,6 +146,7 @@
     8.4                     'void', 
     8.5                     [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address', 'dest')], 
     8.6                     is_pure_virtual=True, visibility='private', is_virtual=True)
     8.7 +    cls.add_copy_constructor()
     8.8      return
     8.9  
    8.10  def register_Ns3UdpHeader_methods(root_module, cls):
    8.11 @@ -212,6 +213,7 @@
    8.12                     'bool', 
    8.13                     [], 
    8.14                     is_const=True)
    8.15 +    cls.add_copy_constructor()
    8.16      return
    8.17  
    8.18  def register_Ns3TcpHeader_methods(root_module, cls):
    8.19 @@ -332,6 +334,7 @@
    8.20                     'bool', 
    8.21                     [], 
    8.22                     is_const=True)
    8.23 +    cls.add_copy_constructor()
    8.24      return
    8.25  
    8.26  def register_Ns3Ipv4StaticRouting_methods(root_module, cls):
    8.27 @@ -419,6 +422,7 @@
    8.28                     'void', 
    8.29                     [], 
    8.30                     visibility='protected', is_virtual=True)
    8.31 +    cls.add_copy_constructor()
    8.32      return
    8.33  
    8.34  def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
    8.35 @@ -609,6 +613,7 @@
    8.36                     'void', 
    8.37                     [], 
    8.38                     visibility='protected', is_virtual=True)
    8.39 +    cls.add_copy_constructor()
    8.40      return
    8.41  
    8.42  def register_functions(root_module):
     9.1 --- a/bindings/python/ns3_module_mobility.py	Tue Aug 12 14:54:46 2008 +0100
     9.2 +++ b/bindings/python/ns3_module_mobility.py	Sat Aug 23 21:52:44 2008 +0100
     9.3 @@ -152,6 +152,7 @@
     9.4      cls.add_method('Unpause', 
     9.5                     'void', 
     9.6                     [])
     9.7 +    cls.add_copy_constructor()
     9.8      return
     9.9  
    9.10  def register_Ns3Vector_methods(root_module, cls):
    9.11 @@ -172,10 +173,12 @@
    9.12  
    9.13  def register_Ns3VectorChecker_methods(root_module, cls):
    9.14      cls.add_constructor([])
    9.15 +    cls.add_copy_constructor()
    9.16      return
    9.17  
    9.18  def register_Ns3RectangleChecker_methods(root_module, cls):
    9.19      cls.add_constructor([])
    9.20 +    cls.add_copy_constructor()
    9.21      return
    9.22  
    9.23  def register_Ns3Rectangle_methods(root_module, cls):
    9.24 @@ -224,6 +227,7 @@
    9.25                     'ns3::Vector', 
    9.26                     [], 
    9.27                     is_pure_virtual=True, is_const=True, is_virtual=True)
    9.28 +    cls.add_copy_constructor()
    9.29      return
    9.30  
    9.31  def register_Ns3ListPositionAllocator_methods(root_module, cls):
    9.32 @@ -243,6 +247,7 @@
    9.33                     'ns3::Vector', 
    9.34                     [], 
    9.35                     is_const=True, is_virtual=True)
    9.36 +    cls.add_copy_constructor()
    9.37      return
    9.38  
    9.39  def register_Ns3RectangleValue_methods(root_module, cls):
    9.40 @@ -274,6 +279,7 @@
    9.41                     'bool', 
    9.42                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
    9.43                     is_virtual=True)
    9.44 +    cls.add_copy_constructor()
    9.45      return
    9.46  
    9.47  def register_Ns3RandomRectanglePositionAllocator_methods(root_module, cls):
    9.48 @@ -297,6 +303,7 @@
    9.49                     'ns3::Vector', 
    9.50                     [], 
    9.51                     is_const=True, is_virtual=True)
    9.52 +    cls.add_copy_constructor()
    9.53      return
    9.54  
    9.55  def register_Ns3VectorValue_methods(root_module, cls):
    9.56 @@ -328,6 +335,7 @@
    9.57                     'bool', 
    9.58                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
    9.59                     is_virtual=True)
    9.60 +    cls.add_copy_constructor()
    9.61      return
    9.62  
    9.63  def register_Ns3RandomDiscPositionAllocator_methods(root_module, cls):
    9.64 @@ -359,6 +367,7 @@
    9.65                     'ns3::Vector', 
    9.66                     [], 
    9.67                     is_const=True, is_virtual=True)
    9.68 +    cls.add_copy_constructor()
    9.69      return
    9.70  
    9.71  def register_Ns3MobilityModel_methods(root_module, cls):
    9.72 @@ -408,6 +417,7 @@
    9.73                     'ns3::Vector', 
    9.74                     [], 
    9.75                     is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
    9.76 +    cls.add_copy_constructor()
    9.77      return
    9.78  
    9.79  def register_Ns3RandomDirection2dMobilityModel_methods(root_module, cls):
    9.80 @@ -438,6 +448,7 @@
    9.81                     'ns3::Vector', 
    9.82                     [], 
    9.83                     is_const=True, visibility='private', is_virtual=True)
    9.84 +    cls.add_copy_constructor()
    9.85      return
    9.86  
    9.87  def register_Ns3GridPositionAllocator_methods(root_module, cls):
    9.88 @@ -507,6 +518,7 @@
    9.89                     'ns3::Vector', 
    9.90                     [], 
    9.91                     is_const=True, is_virtual=True)
    9.92 +    cls.add_copy_constructor()
    9.93      return
    9.94  
    9.95  def register_Ns3RandomWaypointMobilityModel_methods(root_module, cls):
    9.96 @@ -532,6 +544,7 @@
    9.97                     'ns3::Vector', 
    9.98                     [], 
    9.99                     is_const=True, visibility='private', is_virtual=True)
   9.100 +    cls.add_copy_constructor()
   9.101      return
   9.102  
   9.103  def register_Ns3RandomWalk2dMobilityModel_methods(root_module, cls):
   9.104 @@ -562,6 +575,7 @@
   9.105                     'ns3::Vector', 
   9.106                     [], 
   9.107                     is_const=True, visibility='private', is_virtual=True)
   9.108 +    cls.add_copy_constructor()
   9.109      return
   9.110  
   9.111  def register_Ns3StaticSpeedMobilityModel_methods(root_module, cls):
   9.112 @@ -591,6 +605,7 @@
   9.113                     'ns3::Vector', 
   9.114                     [], 
   9.115                     is_const=True, visibility='private', is_virtual=True)
   9.116 +    cls.add_copy_constructor()
   9.117      return
   9.118  
   9.119  def register_Ns3HierarchicalMobilityModel_methods(root_module, cls):
   9.120 @@ -626,6 +641,7 @@
   9.121                     'ns3::Vector', 
   9.122                     [], 
   9.123                     is_const=True, visibility='private', is_virtual=True)
   9.124 +    cls.add_copy_constructor()
   9.125      return
   9.126  
   9.127  def register_Ns3StaticMobilityModel_methods(root_module, cls):
   9.128 @@ -651,6 +667,7 @@
   9.129                     'ns3::Vector', 
   9.130                     [], 
   9.131                     is_const=True, visibility='private', is_virtual=True)
   9.132 +    cls.add_copy_constructor()
   9.133      return
   9.134  
   9.135  def register_functions(root_module):
    10.1 --- a/bindings/python/ns3_module_node.py	Tue Aug 12 14:54:46 2008 +0100
    10.2 +++ b/bindings/python/ns3_module_node.py	Sat Aug 23 21:52:44 2008 +0100
    10.3 @@ -218,6 +218,7 @@
    10.4                     [], 
    10.5                     is_static=True)
    10.6      cls.add_constructor([])
    10.7 +    cls.add_copy_constructor()
    10.8      return
    10.9  
   10.10  def register_Ns3Address_methods(root_module, cls):
   10.11 @@ -289,6 +290,7 @@
   10.12  
   10.13  def register_Ns3Ipv4AddressChecker_methods(root_module, cls):
   10.14      cls.add_constructor([])
   10.15 +    cls.add_copy_constructor()
   10.16      return
   10.17  
   10.18  def register_Ns3Mac48Address_methods(root_module, cls):
   10.19 @@ -421,14 +423,17 @@
   10.20                     [], 
   10.21                     is_static=True)
   10.22      cls.add_constructor([])
   10.23 +    cls.add_copy_constructor()
   10.24      return
   10.25  
   10.26  def register_Ns3Mac48AddressChecker_methods(root_module, cls):
   10.27      cls.add_constructor([])
   10.28 +    cls.add_copy_constructor()
   10.29      return
   10.30  
   10.31  def register_Ns3Ipv4MaskChecker_methods(root_module, cls):
   10.32      cls.add_constructor([])
   10.33 +    cls.add_copy_constructor()
   10.34      return
   10.35  
   10.36  def register_Ns3Ipv4Route_methods(root_module, cls):
   10.37 @@ -558,6 +563,7 @@
   10.38  
   10.39  def register_Ns3AddressChecker_methods(root_module, cls):
   10.40      cls.add_constructor([])
   10.41 +    cls.add_copy_constructor()
   10.42      return
   10.43  
   10.44  def register_Ns3PacketSocketAddress_methods(root_module, cls):
   10.45 @@ -609,6 +615,7 @@
   10.46                     'bool', 
   10.47                     [param('ns3::Address&', 'address', is_const=True)], 
   10.48                     is_static=True)
   10.49 +    cls.add_copy_constructor()
   10.50      return
   10.51  
   10.52  def register_Ns3Ipv4Mask_methods(root_module, cls):
   10.53 @@ -691,6 +698,7 @@
   10.54                     'bool', 
   10.55                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   10.56                     is_virtual=True)
   10.57 +    cls.add_copy_constructor()
   10.58      return
   10.59  
   10.60  def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls):
   10.61 @@ -707,6 +715,7 @@
   10.62                     [param('ns3::Ipv4Address', 'destination'), param('uint32_t&', 'ifIndex')], 
   10.63                     is_pure_virtual=True, is_virtual=True)
   10.64      cls.add_constructor([])
   10.65 +    cls.add_copy_constructor()
   10.66      return
   10.67  
   10.68  def register_Ns3Mac48AddressValue_methods(root_module, cls):
   10.69 @@ -738,6 +747,7 @@
   10.70                     'bool', 
   10.71                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   10.72                     is_virtual=True)
   10.73 +    cls.add_copy_constructor()
   10.74      return
   10.75  
   10.76  def register_Ns3Ipv4MaskValue_methods(root_module, cls):
   10.77 @@ -769,6 +779,7 @@
   10.78                     'bool', 
   10.79                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   10.80                     is_virtual=True)
   10.81 +    cls.add_copy_constructor()
   10.82      return
   10.83  
   10.84  def register_Ns3SocketAddressTag_methods(root_module, cls):
   10.85 @@ -813,6 +824,7 @@
   10.86                     'void', 
   10.87                     [param('std::ostream&', 'os')], 
   10.88                     is_const=True, is_virtual=True)
   10.89 +    cls.add_copy_constructor()
   10.90      return
   10.91  
   10.92  def register_Ns3InetSocketAddress_methods(root_module, cls):
   10.93 @@ -854,6 +866,7 @@
   10.94                     'ns3::InetSocketAddress', 
   10.95                     [param('ns3::Address&', 'address', is_const=True)], 
   10.96                     is_static=True)
   10.97 +    cls.add_copy_constructor()
   10.98      return
   10.99  
  10.100  def register_Ns3Ipv4Address_methods(root_module, cls):
  10.101 @@ -1004,6 +1017,7 @@
  10.102                     'void', 
  10.103                     [], 
  10.104                     visibility='private', is_virtual=True)
  10.105 +    cls.add_copy_constructor()
  10.106      return
  10.107  
  10.108  def register_Ns3Queue_methods(root_module, cls):
  10.109 @@ -1027,9 +1041,9 @@
  10.110      cls.add_method('Dequeue', 
  10.111                     'ns3::Ptr< ns3::Packet >', 
  10.112                     [])
  10.113 -    ## queue.h: ns3::Ptr<ns3::Packet> ns3::Queue::Peek() const [member function]
  10.114 +    ## queue.h: ns3::Ptr<const ns3::Packet> ns3::Queue::Peek() const [member function]
  10.115      cls.add_method('Peek', 
  10.116 -                   'ns3::Ptr< ns3::Packet >', 
  10.117 +                   'ns3::Ptr< const ns3::Packet >', 
  10.118                     [], 
  10.119                     is_const=True)
  10.120      ## queue.h: void ns3::Queue::DequeueAll() [member function]
  10.121 @@ -1085,11 +1099,12 @@
  10.122                     'ns3::Ptr< ns3::Packet >', 
  10.123                     [], 
  10.124                     is_pure_virtual=True, visibility='private', is_virtual=True)
  10.125 -    ## queue.h: ns3::Ptr<ns3::Packet> ns3::Queue::DoPeek() const [member function]
  10.126 +    ## queue.h: ns3::Ptr<const ns3::Packet> ns3::Queue::DoPeek() const [member function]
  10.127      cls.add_method('DoPeek', 
  10.128 -                   'ns3::Ptr< ns3::Packet >', 
  10.129 +                   'ns3::Ptr< const ns3::Packet >', 
  10.130                     [], 
  10.131                     is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
  10.132 +    cls.add_copy_constructor()
  10.133      return
  10.134  
  10.135  def register_Ns3Socket_methods(root_module, cls):
  10.136 @@ -1121,8 +1136,7 @@
  10.137      ## socket.h: bool ns3::Socket::SetDataSentCallback(ns3::Callback<void, ns3::Ptr<ns3::Socket>, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty> dataSent) [member function]
  10.138      cls.add_method('SetDataSentCallback', 
  10.139                     'bool', 
  10.140 -                   [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')], 
  10.141 -                   is_virtual=True)
  10.142 +                   [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')])
  10.143      ## socket.h: void ns3::Socket::SetSendCallback(ns3::Callback<void, ns3::Ptr<ns3::Socket>, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty> sendCb) [member function]
  10.144      cls.add_method('SetSendCallback', 
  10.145                     'void', 
  10.146 @@ -1259,6 +1273,7 @@
  10.147                     'void', 
  10.148                     [], 
  10.149                     visibility='protected')
  10.150 +    cls.add_copy_constructor()
  10.151      return
  10.152  
  10.153  def register_Ns3Ipv4Header_methods(root_module, cls):
  10.154 @@ -1401,6 +1416,7 @@
  10.155                     'uint32_t', 
  10.156                     [param('ns3::Buffer::Iterator', 'start')], 
  10.157                     is_virtual=True)
  10.158 +    cls.add_copy_constructor()
  10.159      return
  10.160  
  10.161  def register_Ns3UdpSocket_methods(root_module, cls):
  10.162 @@ -1441,6 +1457,7 @@
  10.163                     'uint32_t', 
  10.164                     [], 
  10.165                     is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
  10.166 +    cls.add_copy_constructor()
  10.167      return
  10.168  
  10.169  def register_Ns3NetDevice_methods(root_module, cls):
  10.170 @@ -1570,6 +1587,7 @@
  10.171                     [], 
  10.172                     is_pure_virtual=True, is_const=True, is_virtual=True)
  10.173      cls.add_constructor([])
  10.174 +    cls.add_copy_constructor()
  10.175      return
  10.176  
  10.177  def register_Ns3DropTailQueue_methods(root_module, cls):
  10.178 @@ -1590,11 +1608,12 @@
  10.179                     'ns3::Ptr< ns3::Packet >', 
  10.180                     [], 
  10.181                     visibility='private', is_virtual=True)
  10.182 -    ## drop-tail-queue.h: ns3::Ptr<ns3::Packet> ns3::DropTailQueue::DoPeek() const [member function]
  10.183 +    ## drop-tail-queue.h: ns3::Ptr<const ns3::Packet> ns3::DropTailQueue::DoPeek() const [member function]
  10.184      cls.add_method('DoPeek', 
  10.185 -                   'ns3::Ptr< ns3::Packet >', 
  10.186 +                   'ns3::Ptr< const ns3::Packet >', 
  10.187                     [], 
  10.188                     is_const=True, visibility='private', is_virtual=True)
  10.189 +    cls.add_copy_constructor()
  10.190      return
  10.191  
  10.192  def register_Ns3AddressValue_methods(root_module, cls):
  10.193 @@ -1626,6 +1645,7 @@
  10.194                     'bool', 
  10.195                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
  10.196                     is_virtual=True)
  10.197 +    cls.add_copy_constructor()
  10.198      return
  10.199  
  10.200  def register_Ns3Node_methods(root_module, cls):
  10.201 @@ -1671,10 +1691,6 @@
  10.202                     'ns3::Ptr< ns3::Application >', 
  10.203                     [param('uint32_t', 'index')], 
  10.204                     is_const=True)
  10.205 -    ## node.h: ns3::Ptr<ns3::Application> ns3::Node::GetFirstApplication(ns3::TypeId tid) [member function]
  10.206 -    cls.add_method('GetFirstApplication', 
  10.207 -                   'ns3::Ptr< ns3::Application >', 
  10.208 -                   [param('ns3::TypeId', 'tid')])
  10.209      ## node.h: uint32_t ns3::Node::GetNApplications() const [member function]
  10.210      cls.add_method('GetNApplications', 
  10.211                     'uint32_t', 
  10.212 @@ -1698,6 +1714,7 @@
  10.213                     'void', 
  10.214                     [param('ns3::Ptr< ns3::NetDevice >', 'device')], 
  10.215                     visibility='private', is_virtual=True)
  10.216 +    cls.add_copy_constructor()
  10.217      return
  10.218  
  10.219  def register_Ns3Channel_methods(root_module, cls):
  10.220 @@ -1728,6 +1745,7 @@
  10.221                     'ns3::Ptr< ns3::NetDevice >', 
  10.222                     [param('uint32_t', 'i')], 
  10.223                     is_pure_virtual=True, is_const=True, is_virtual=True)
  10.224 +    cls.add_copy_constructor()
  10.225      return
  10.226  
  10.227  def register_Ns3TcpSocket_methods(root_module, cls):
  10.228 @@ -1838,6 +1856,7 @@
  10.229                     'uint32_t', 
  10.230                     [], 
  10.231                     is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
  10.232 +    cls.add_copy_constructor()
  10.233      return
  10.234  
  10.235  def register_Ns3EthernetHeader_methods(root_module, cls):
  10.236 @@ -1921,6 +1940,7 @@
  10.237                     'uint32_t', 
  10.238                     [param('ns3::Buffer::Iterator', 'start')], 
  10.239                     is_virtual=True)
  10.240 +    cls.add_copy_constructor()
  10.241      return
  10.242  
  10.243  def register_Ns3SocketIpTtlTag_methods(root_module, cls):
  10.244 @@ -1965,6 +1985,7 @@
  10.245                     'void', 
  10.246                     [param('std::ostream&', 'os')], 
  10.247                     is_const=True, is_virtual=True)
  10.248 +    cls.add_copy_constructor()
  10.249      return
  10.250  
  10.251  def register_Ns3Ipv4_methods(root_module, cls):
  10.252 @@ -2155,6 +2176,7 @@
  10.253                     'uint32_t', 
  10.254                     [param('ns3::Ipv4Address', 'addr'), param('ns3::Ipv4Mask', 'mask', default_value='ns3::Ipv4Mask(((const char*)"255.255.255.255"))')], 
  10.255                     is_virtual=True)
  10.256 +    cls.add_copy_constructor()
  10.257      return
  10.258  
  10.259  def register_Ns3SocketFactory_methods(root_module, cls):
  10.260 @@ -2170,6 +2192,7 @@
  10.261                     'ns3::Ptr< ns3::Socket >', 
  10.262                     [], 
  10.263                     is_pure_virtual=True, is_virtual=True)
  10.264 +    cls.add_copy_constructor()
  10.265      return
  10.266  
  10.267  def register_Ns3EthernetTrailer_methods(root_module, cls):
  10.268 @@ -2232,6 +2255,7 @@
  10.269                     'uint32_t', 
  10.270                     [param('ns3::Buffer::Iterator', 'end')], 
  10.271                     is_virtual=True)
  10.272 +    cls.add_copy_constructor()
  10.273      return
  10.274  
  10.275  def register_Ns3SimpleChannel_methods(root_module, cls):
  10.276 @@ -2260,6 +2284,7 @@
  10.277                     'ns3::Ptr< ns3::NetDevice >', 
  10.278                     [param('uint32_t', 'i')], 
  10.279                     is_const=True, is_virtual=True)
  10.280 +    cls.add_copy_constructor()
  10.281      return
  10.282  
  10.283  def register_Ns3LlcSnapHeader_methods(root_module, cls):
  10.284 @@ -2303,6 +2328,7 @@
  10.285                     'uint32_t', 
  10.286                     [param('ns3::Buffer::Iterator', 'start')], 
  10.287                     is_virtual=True)
  10.288 +    cls.add_copy_constructor()
  10.289      return
  10.290  
  10.291  def register_Ns3UdpSocketFactory_methods(root_module, cls):
  10.292 @@ -2312,6 +2338,7 @@
  10.293                     [], 
  10.294                     is_static=True)
  10.295      cls.add_constructor([])
  10.296 +    cls.add_copy_constructor()
  10.297      return
  10.298  
  10.299  def register_Ns3SimpleNetDevice_methods(root_module, cls):
  10.300 @@ -2459,6 +2486,7 @@
  10.301                     'void', 
  10.302                     [], 
  10.303                     visibility='protected', is_virtual=True)
  10.304 +    cls.add_copy_constructor()
  10.305      return
  10.306  
  10.307  def register_Ns3TcpSocketFactory_methods(root_module, cls):
  10.308 @@ -2468,6 +2496,7 @@
  10.309                     [], 
  10.310                     is_static=True)
  10.311      cls.add_constructor([])
  10.312 +    cls.add_copy_constructor()
  10.313      return
  10.314  
  10.315  def register_Ns3PacketSocketFactory_methods(root_module, cls):
  10.316 @@ -2483,6 +2512,7 @@
  10.317                     'ns3::Ptr< ns3::Socket >', 
  10.318                     [], 
  10.319                     is_virtual=True)
  10.320 +    cls.add_copy_constructor()
  10.321      return
  10.322  
  10.323  def register_functions(root_module):
    11.1 --- a/bindings/python/ns3_module_olsr.py	Tue Aug 12 14:54:46 2008 +0100
    11.2 +++ b/bindings/python/ns3_module_olsr.py	Sat Aug 23 21:52:44 2008 +0100
    11.3 @@ -275,6 +275,7 @@
    11.4      ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::neighborInterfaceAddresses [variable]
    11.5      cls.add_instance_attribute('neighborInterfaceAddresses', 'std::vector< ns3::Ipv4Address, std::allocator< ns3::Ipv4Address > >', is_const=False)
    11.6      cls.add_constructor([])
    11.7 +    cls.add_copy_constructor()
    11.8      return
    11.9  
   11.10  def register_Ns3OlsrMessageHeaderTc_methods(root_module, cls):
   11.11 @@ -337,6 +338,7 @@
   11.12      ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::mask [variable]
   11.13      cls.add_instance_attribute('mask', 'ns3::Ipv4Mask', is_const=False)
   11.14      cls.add_constructor([])
   11.15 +    cls.add_copy_constructor()
   11.16      return
   11.17  
   11.18  def register_Ns3OlsrAgent_methods(root_module, cls):
   11.19 @@ -361,6 +363,7 @@
   11.20                     [], 
   11.21                     is_pure_virtual=True, is_virtual=True)
   11.22      cls.add_constructor([])
   11.23 +    cls.add_copy_constructor()
   11.24      return
   11.25  
   11.26  def register_Ns3OlsrPacketHeader_methods(root_module, cls):
    12.1 --- a/bindings/python/ns3_module_onoff.py	Tue Aug 12 14:54:46 2008 +0100
    12.2 +++ b/bindings/python/ns3_module_onoff.py	Sat Aug 23 21:52:44 2008 +0100
    12.3 @@ -77,6 +77,7 @@
    12.4                     'void', 
    12.5                     [], 
    12.6                     visibility='private', is_virtual=True)
    12.7 +    cls.add_copy_constructor()
    12.8      return
    12.9  
   12.10  def register_functions(root_module):
    13.1 --- a/bindings/python/ns3_module_packet_sink.py	Tue Aug 12 14:54:46 2008 +0100
    13.2 +++ b/bindings/python/ns3_module_packet_sink.py	Sat Aug 23 21:52:44 2008 +0100
    13.3 @@ -73,6 +73,7 @@
    13.4                     'void', 
    13.5                     [], 
    13.6                     visibility='private', is_virtual=True)
    13.7 +    cls.add_copy_constructor()
    13.8      return
    13.9  
   13.10  def register_functions(root_module):
    14.1 --- a/bindings/python/ns3_module_point_to_point.py	Tue Aug 12 14:54:46 2008 +0100
    14.2 +++ b/bindings/python/ns3_module_point_to_point.py	Sat Aug 23 21:52:44 2008 +0100
    14.3 @@ -84,6 +84,7 @@
    14.4                     'ns3::Ptr< ns3::NetDevice >', 
    14.5                     [param('uint32_t', 'i')], 
    14.6                     is_const=True, is_virtual=True)
    14.7 +    cls.add_copy_constructor()
    14.8      return
    14.9  
   14.10  def register_Ns3PointToPointNetDevice_methods(root_module, cls):
   14.11 @@ -247,6 +248,7 @@
   14.12                     'void', 
   14.13                     [], 
   14.14                     visibility='private', is_virtual=True)
   14.15 +    cls.add_copy_constructor()
   14.16      return
   14.17  
   14.18  def register_functions(root_module):
    15.1 --- a/bindings/python/ns3_module_simulator.py	Tue Aug 12 14:54:46 2008 +0100
    15.2 +++ b/bindings/python/ns3_module_simulator.py	Sat Aug 23 21:52:44 2008 +0100
    15.3 @@ -170,6 +170,7 @@
    15.4      cls.add_method('Resume', 
    15.5                     'void', 
    15.6                     [])
    15.7 +    cls.add_copy_constructor()
    15.8      return
    15.9  
   15.10  def register_Ns3TimerImpl_methods(root_module, cls):
   15.11 @@ -184,6 +185,7 @@
   15.12                     [], 
   15.13                     is_pure_virtual=True, is_virtual=True)
   15.14      cls.add_constructor([])
   15.15 +    cls.add_copy_constructor()
   15.16      return
   15.17  
   15.18  def register_Ns3Time_methods(root_module, cls):
   15.19 @@ -329,6 +331,7 @@
   15.20      cls.add_method('Ping', 
   15.21                     'void', 
   15.22                     [param('ns3::Time', 'delay')])
   15.23 +    cls.add_copy_constructor()
   15.24      return
   15.25  
   15.26  def register_Ns3Simulator_methods(root_module, cls):
   15.27 @@ -412,6 +415,7 @@
   15.28                     'ns3::Time', 
   15.29                     [], 
   15.30                     is_static=True)
   15.31 +    cls.add_copy_constructor()
   15.32      return
   15.33  
   15.34  def register_Ns3EventId_methods(root_module, cls):
   15.35 @@ -482,6 +486,7 @@
   15.36                     'void', 
   15.37                     [], 
   15.38                     is_pure_virtual=True, visibility='protected', is_virtual=True)
   15.39 +    cls.add_copy_constructor()
   15.40      return
   15.41  
   15.42  def register_Ns3HighPrecision_methods(root_module, cls):
   15.43 @@ -538,6 +543,7 @@
   15.44  
   15.45  def register_Ns3TimeChecker_methods(root_module, cls):
   15.46      cls.add_constructor([])
   15.47 +    cls.add_copy_constructor()
   15.48      return
   15.49  
   15.50  def register_Ns3Scheduler_methods(root_module, cls):
   15.51 @@ -572,6 +578,7 @@
   15.52                     [param('ns3::EventId&', 'id', is_const=True)], 
   15.53                     is_pure_virtual=True, is_virtual=True)
   15.54      cls.add_constructor([])
   15.55 +    cls.add_copy_constructor()
   15.56      return
   15.57  
   15.58  def register_Ns3SchedulerEventKey_methods(root_module, cls):
   15.59 @@ -580,6 +587,7 @@
   15.60      ## scheduler.h: ns3::Scheduler::EventKey::m_uid [variable]
   15.61      cls.add_instance_attribute('m_uid', 'uint32_t', is_const=False)
   15.62      cls.add_constructor([])
   15.63 +    cls.add_copy_constructor()
   15.64      return
   15.65  
   15.66  def register_Ns3TimeValue_methods(root_module, cls):
   15.67 @@ -611,6 +619,7 @@
   15.68                     'bool', 
   15.69                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   15.70                     is_virtual=True)
   15.71 +    cls.add_copy_constructor()
   15.72      return
   15.73  
   15.74  def register_Ns3SimulatorImpl_methods(root_module, cls):
   15.75 @@ -705,6 +714,7 @@
   15.76                     [], 
   15.77                     is_pure_virtual=True, is_const=True, is_virtual=True)
   15.78      cls.add_constructor([])
   15.79 +    cls.add_copy_constructor()
   15.80      return
   15.81  
   15.82  def register_Ns3DefaultSimulatorImpl_methods(root_module, cls):
   15.83 @@ -805,6 +815,7 @@
   15.84                     'ns3::Ptr< ns3::Scheduler >', 
   15.85                     [], 
   15.86                     is_const=True, is_virtual=True)
   15.87 +    cls.add_copy_constructor()
   15.88      return
   15.89  
   15.90  def register_Ns3HeapScheduler_methods(root_module, cls):
   15.91 @@ -835,6 +846,7 @@
   15.92                     'bool', 
   15.93                     [param('ns3::EventId&', 'ev', is_const=True)], 
   15.94                     is_virtual=True)
   15.95 +    cls.add_copy_constructor()
   15.96      return
   15.97  
   15.98  def register_Ns3ListScheduler_methods(root_module, cls):
   15.99 @@ -865,6 +877,7 @@
  15.100                     'bool', 
  15.101                     [param('ns3::EventId&', 'ev', is_const=True)], 
  15.102                     is_virtual=True)
  15.103 +    cls.add_copy_constructor()
  15.104      return
  15.105  
  15.106  def register_Ns3MapScheduler_methods(root_module, cls):
  15.107 @@ -895,6 +908,7 @@
  15.108                     'bool', 
  15.109                     [param('ns3::EventId&', 'ev', is_const=True)], 
  15.110                     is_virtual=True)
  15.111 +    cls.add_copy_constructor()
  15.112      return
  15.113  
  15.114  def register_functions(root_module):
    16.1 --- a/bindings/python/ns3_module_udp_echo.py	Tue Aug 12 14:54:46 2008 +0100
    16.2 +++ b/bindings/python/ns3_module_udp_echo.py	Sat Aug 23 21:52:44 2008 +0100
    16.3 @@ -80,6 +80,7 @@
    16.4                     'void', 
    16.5                     [], 
    16.6                     visibility='private', is_virtual=True)
    16.7 +    cls.add_copy_constructor()
    16.8      return
    16.9  
   16.10  def register_Ns3UdpEchoServer_methods(root_module, cls):
   16.11 @@ -105,6 +106,7 @@
   16.12                     'void', 
   16.13                     [], 
   16.14                     visibility='private', is_virtual=True)
   16.15 +    cls.add_copy_constructor()
   16.16      return
   16.17  
   16.18  def register_functions(root_module):
    17.1 --- a/bindings/python/ns3_module_wifi.py	Tue Aug 12 14:54:46 2008 +0100
    17.2 +++ b/bindings/python/ns3_module_wifi.py	Sat Aug 23 21:52:44 2008 +0100
    17.3 @@ -371,6 +371,7 @@
    17.4                     'ns3::WifiMode', 
    17.5                     [], 
    17.6                     is_pure_virtual=True, visibility='private', is_virtual=True)
    17.7 +    cls.add_copy_constructor()
    17.8      return
    17.9  
   17.10  def register_Ns3WifiPhyListener_methods(root_module, cls):
   17.11 @@ -400,6 +401,7 @@
   17.12                     [param('ns3::Time', 'duration')], 
   17.13                     is_pure_virtual=True, is_virtual=True)
   17.14      cls.add_constructor([])
   17.15 +    cls.add_copy_constructor()
   17.16      return
   17.17  
   17.18  def register_Ns3ThresholdsItem_methods(root_module, cls):
   17.19 @@ -412,6 +414,7 @@
   17.20      ## rraa-wifi-manager.h: ns3::ThresholdsItem::ewnd [variable]
   17.21      cls.add_instance_attribute('ewnd', 'uint32_t', is_const=False)
   17.22      cls.add_constructor([])
   17.23 +    cls.add_copy_constructor()
   17.24      return
   17.25  
   17.26  def register_Ns3SupportedRates_methods(root_module, cls):
   17.27 @@ -517,10 +520,12 @@
   17.28                     'ns3::WifiMode', 
   17.29                     [], 
   17.30                     visibility='private', is_virtual=True)
   17.31 +    cls.add_copy_constructor()
   17.32      return
   17.33  
   17.34  def register_Ns3WifiModeChecker_methods(root_module, cls):
   17.35      cls.add_constructor([])
   17.36 +    cls.add_copy_constructor()
   17.37      return
   17.38  
   17.39  def register_Ns3WifiModeFactory_methods(root_module, cls):
   17.40 @@ -534,6 +539,7 @@
   17.41                     'ns3::WifiMode', 
   17.42                     [param('std::string', 'uniqueName'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('uint32_t', 'phyRate'), param('uint8_t', 'constellationSize')], 
   17.43                     is_static=True)
   17.44 +    cls.add_copy_constructor()
   17.45      return
   17.46  
   17.47  def register_Ns3OnoeWifiRemoteStation_methods(root_module, cls):
   17.48 @@ -589,6 +595,7 @@
   17.49                     'ns3::WifiMode', 
   17.50                     [], 
   17.51                     visibility='private', is_virtual=True)
   17.52 +    cls.add_copy_constructor()
   17.53      return
   17.54  
   17.55  def register_Ns3RraaWifiRemoteStation_methods(root_module, cls):
   17.56 @@ -649,6 +656,7 @@
   17.57                     'ns3::WifiMode', 
   17.58                     [], 
   17.59                     visibility='private', is_virtual=True)
   17.60 +    cls.add_copy_constructor()
   17.61      return
   17.62  
   17.63  def register_Ns3Ssid_methods(root_module, cls):
   17.64 @@ -784,10 +792,12 @@
   17.65                     'bool', 
   17.66                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
   17.67                     is_virtual=True)
   17.68 +    cls.add_copy_constructor()
   17.69      return
   17.70  
   17.71  def register_Ns3SsidChecker_methods(root_module, cls):
   17.72      cls.add_constructor([])
   17.73 +    cls.add_copy_constructor()
   17.74      return
   17.75  
   17.76  def register_Ns3ConstantRateWifiRemoteStation_methods(root_module, cls):
   17.77 @@ -843,6 +853,7 @@
   17.78                     'ns3::WifiMode', 
   17.79                     [], 
   17.80                     visibility='private', is_virtual=True)
   17.81 +    cls.add_copy_constructor()
   17.82      return
   17.83  
   17.84  def register_Ns3PropagationLossModel_methods(root_module, cls):
   17.85 @@ -857,6 +868,7 @@
   17.86                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
   17.87                     is_pure_virtual=True, is_const=True, is_virtual=True)
   17.88      cls.add_constructor([])
   17.89 +    cls.add_copy_constructor()
   17.90      return
   17.91  
   17.92  def register_Ns3ArfWifiRemoteStation_methods(root_module, cls):
   17.93 @@ -952,6 +964,7 @@
   17.94                     'void', 
   17.95                     [], 
   17.96                     visibility='private', is_virtual=True)
   17.97 +    cls.add_copy_constructor()
   17.98      return
   17.99  
  17.100  def register_Ns3WifiMac_methods(root_module, cls):
  17.101 @@ -1061,10 +1074,10 @@
  17.102                     'void', 
  17.103                     [param('ns3::Ssid', 'ssid')], 
  17.104                     is_pure_virtual=True, is_virtual=True)
  17.105 -    ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to) [member function]
  17.106 +    ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function]
  17.107      cls.add_method('Enqueue', 
  17.108                     'void', 
  17.109 -                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to')], 
  17.110 +                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], 
  17.111                     is_pure_virtual=True, visibility='private', is_virtual=True)
  17.112      ## wifi-mac.h: void ns3::WifiMac::SetWifiPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function]
  17.113      cls.add_method('SetWifiPhy', 
  17.114 @@ -1092,6 +1105,7 @@
  17.115                     [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkDown')], 
  17.116                     is_pure_virtual=True, visibility='private', is_virtual=True)
  17.117      cls.add_constructor([])
  17.118 +    cls.add_copy_constructor()
  17.119      return
  17.120  
  17.121  def register_Ns3NqapWifiMac_methods(root_module, cls):
  17.122 @@ -1142,10 +1156,10 @@
  17.123                     'void', 
  17.124                     [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], 
  17.125                     is_virtual=True)
  17.126 -    ## nqap-wifi-mac.h: void ns3::NqapWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to) [member function]
  17.127 +    ## nqap-wifi-mac.h: void ns3::NqapWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function]
  17.128      cls.add_method('Enqueue', 
  17.129                     'void', 
  17.130 -                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to')], 
  17.131 +                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], 
  17.132                     is_virtual=True)
  17.133      ## nqap-wifi-mac.h: void ns3::NqapWifiMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function]
  17.134      cls.add_method('SetForwardUpCallback', 
  17.135 @@ -1229,6 +1243,7 @@
  17.136                     'void', 
  17.137                     [], 
  17.138                     visibility='protected', is_virtual=True)
  17.139 +    cls.add_copy_constructor()
  17.140      return
  17.141  
  17.142  def register_Ns3AmrrWifiRemoteStation_methods(root_module, cls):
  17.143 @@ -1284,6 +1299,7 @@
  17.144                     'ns3::WifiMode', 
  17.145                     [], 
  17.146                     visibility='private', is_virtual=True)
  17.147 +    cls.add_copy_constructor()
  17.148      return
  17.149  
  17.150  def register_Ns3FriisPropagationLossModel_methods(root_module, cls):
  17.151 @@ -1330,6 +1346,7 @@
  17.152                     'double', 
  17.153                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
  17.154                     is_const=True, is_virtual=True)
  17.155 +    cls.add_copy_constructor()
  17.156      return
  17.157  
  17.158  def register_Ns3NqstaWifiMac_methods(root_module, cls):
  17.159 @@ -1380,10 +1397,10 @@
  17.160                     'void', 
  17.161                     [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], 
  17.162                     is_virtual=True)
  17.163 -    ## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to) [member function]
  17.164 +    ## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function]
  17.165      cls.add_method('Enqueue', 
  17.166                     'void', 
  17.167 -                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to')], 
  17.168 +                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], 
  17.169                     is_virtual=True)
  17.170      ## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function]
  17.171      cls.add_method('SetForwardUpCallback', 
  17.172 @@ -1553,6 +1570,7 @@
  17.173                     'ns3::WifiRemoteStation *', 
  17.174                     [], 
  17.175                     is_pure_virtual=True, visibility='private', is_virtual=True)
  17.176 +    cls.add_copy_constructor()
  17.177      return
  17.178  
  17.179  def register_Ns3WifiModeValue_methods(root_module, cls):
  17.180 @@ -1584,6 +1602,7 @@
  17.181                     'bool', 
  17.182                     [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
  17.183                     is_virtual=True)
  17.184 +    cls.add_copy_constructor()
  17.185      return
  17.186  
  17.187  def register_Ns3OnoeWifiManager_methods(root_module, cls):
  17.188 @@ -1599,6 +1618,7 @@
  17.189                     'ns3::WifiRemoteStation *', 
  17.190                     [], 
  17.191                     visibility='private', is_virtual=True)
  17.192 +    cls.add_copy_constructor()
  17.193      return
  17.194  
  17.195  def register_Ns3WifiPhy_methods(root_module, cls):
  17.196 @@ -1800,6 +1820,7 @@
  17.197                     'void', 
  17.198                     [param('ns3::Ptr< ns3::WifiPhy >', 'sender'), param('ns3::Ptr< const ns3::Packet >', 'packet'), param('double', 'txPowerDbm'), param('ns3::WifiMode', 'wifiMode'), param('ns3::WifiPreamble', 'preamble')], 
  17.199                     is_const=True)
  17.200 +    cls.add_copy_constructor()
  17.201      return
  17.202  
  17.203  def register_Ns3LogDistancePropagationLossModel_methods(root_module, cls):
  17.204 @@ -1832,6 +1853,7 @@
  17.205                     'double', 
  17.206                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
  17.207                     is_const=True, is_virtual=True)
  17.208 +    cls.add_copy_constructor()
  17.209      return
  17.210  
  17.211  def register_Ns3ConstantRateWifiManager_methods(root_module, cls):
  17.212 @@ -1857,6 +1879,7 @@
  17.213                     'ns3::WifiRemoteStation *', 
  17.214                     [], 
  17.215                     visibility='private', is_virtual=True)
  17.216 +    cls.add_copy_constructor()
  17.217      return
  17.218  
  17.219  def register_Ns3AarfWifiRemoteStation_methods(root_module, cls):
  17.220 @@ -1872,6 +1895,7 @@
  17.221                     'void', 
  17.222                     [], 
  17.223                     visibility='private', is_virtual=True)
  17.224 +    cls.add_copy_constructor()
  17.225      return
  17.226  
  17.227  def register_Ns3PropagationDelayModel_methods(root_module, cls):
  17.228 @@ -1886,6 +1910,7 @@
  17.229                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
  17.230                     is_pure_virtual=True, is_const=True, is_virtual=True)
  17.231      cls.add_constructor([])
  17.232 +    cls.add_copy_constructor()
  17.233      return
  17.234  
  17.235  def register_Ns3AdhocWifiMac_methods(root_module, cls):
  17.236 @@ -1936,10 +1961,10 @@
  17.237                     'void', 
  17.238                     [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], 
  17.239                     is_virtual=True)
  17.240 -    ## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to) [member function]
  17.241 +    ## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::Enqueue(ns3::Ptr<const ns3::Packet> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function]
  17.242      cls.add_method('Enqueue', 
  17.243                     'void', 
  17.244 -                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to')], 
  17.245 +                   [param('ns3::Ptr< const ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')], 
  17.246                     is_virtual=True)
  17.247      ## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function]
  17.248      cls.add_method('SetForwardUpCallback', 
  17.249 @@ -2009,6 +2034,7 @@
  17.250      cls.add_method('SetNOscillators', 
  17.251                     'void', 
  17.252                     [param('uint8_t', 'nOscillators')])
  17.253 +    cls.add_copy_constructor()
  17.254      return
  17.255  
  17.256  def register_Ns3WifiNetDevice_methods(root_module, cls):
  17.257 @@ -2175,6 +2201,7 @@
  17.258                     'void', 
  17.259                     [], 
  17.260                     visibility='private', is_virtual=True)
  17.261 +    cls.add_copy_constructor()
  17.262      return
  17.263  
  17.264  def register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, cls):
  17.265 @@ -2199,6 +2226,7 @@
  17.266                     'double', 
  17.267                     [], 
  17.268                     is_const=True)
  17.269 +    cls.add_copy_constructor()
  17.270      return
  17.271  
  17.272  def register_Ns3RandomPropagationLossModel_methods(root_module, cls):
  17.273 @@ -2214,6 +2242,7 @@
  17.274                     'double', 
  17.275                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
  17.276                     is_const=True, is_virtual=True)
  17.277 +    cls.add_copy_constructor()
  17.278      return
  17.279  
  17.280  def register_Ns3RandomPropagationDelayModel_methods(root_module, cls):
  17.281 @@ -2229,6 +2258,7 @@
  17.282                     'ns3::Time', 
  17.283                     [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], 
  17.284                     is_const=True, is_virtual=True)
  17.285 +    cls.add_copy_constructor()
  17.286      return
  17.287  
  17.288  def register_Ns3AmrrWifiManager_methods(root_module, cls):
  17.289 @@ -2244,6 +2274,7 @@
  17.290                     'ns3::WifiRemoteStation *', 
  17.291                     [], 
  17.292                     visibility='private', is_virtual=True)
  17.293 +    cls.add_copy_constructor()
  17.294      return
  17.295  
  17.296  def register_Ns3RraaWifiManager_methods(root_module, cls):
  17.297 @@ -2273,6 +2304,7 @@
  17.298                     'ns3::WifiRemoteStation *', 
  17.299                     [], 
  17.300                     visibility='private', is_virtual=True)
  17.301 +    cls.add_copy_constructor()
  17.302      return
  17.303  
  17.304  def register_Ns3IdealWifiManager_methods(root_module, cls):
  17.305 @@ -2302,6 +2334,7 @@
  17.306                     'ns3::WifiRemoteStation *', 
  17.307                     [], 
  17.308                     visibility='private', is_virtual=True)
  17.309 +    cls.add_copy_constructor()
  17.310      return
  17.311  
  17.312  def register_Ns3ArfWifiManager_methods(root_module, cls):
  17.313 @@ -2317,6 +2350,7 @@
  17.314                     'ns3::WifiRemoteStation *', 
  17.315                     [], 
  17.316                     visibility='private', is_virtual=True)
  17.317 +    cls.add_copy_constructor()
  17.318      return
  17.319  
  17.320  def register_Ns3AarfWifiManager_methods(root_module, cls):
  17.321 @@ -2332,6 +2366,7 @@
  17.322                     'ns3::WifiRemoteStation *', 
  17.323                     [], 
  17.324                     visibility='private', is_virtual=True)
  17.325 +    cls.add_copy_constructor()
  17.326      return
  17.327  
  17.328  def register_functions(root_module):
    18.1 --- a/bindings/python/ns3modulegen.py	Tue Aug 12 14:54:46 2008 +0100
    18.2 +++ b/bindings/python/ns3modulegen.py	Sat Aug 23 21:52:44 2008 +0100
    18.3 @@ -46,7 +46,7 @@
    18.4          self.header_name = "ns3module.h"
    18.5          header_file_name = os.path.join(os.path.dirname(self.main_file_name), self.header_name)
    18.6          self.header_sink = FileCodeSink(open(header_file_name, "wt"))
    18.7 -        self.section_sinks = {}
    18.8 +        self.section_sinks = {'__main__': self.main_sink}
    18.9  
   18.10          for module in modules:
   18.11              section_name = 'ns3_module_%s' % module.replace('-', '_')
    19.1 --- a/bindings/python/ns3modulegen_generated.py	Tue Aug 12 14:54:46 2008 +0100
    19.2 +++ b/bindings/python/ns3modulegen_generated.py	Sat Aug 23 21:52:44 2008 +0100
    19.3 @@ -224,6 +224,8 @@
    19.4          ns3_module_helper__local.register_types(module)
    19.5      
    19.6      root_module.end_section('ns3_module_helper')
    19.7 +    module.add_container('std::vector< unsigned int, std::allocator< unsigned int > >', 'unsigned int')
    19.8 +    module.add_container('std::list< unsigned int, std::allocator< unsigned int > >', 'unsigned int')
    19.9      
   19.10      ## Register a nested module for the namespace internal
   19.11      
    20.1 --- a/bindings/python/ns3modulescan.py	Tue Aug 12 14:54:46 2008 +0100
    20.2 +++ b/bindings/python/ns3modulescan.py	Sat Aug 23 21:52:44 2008 +0100
    20.3 @@ -171,6 +171,10 @@
    20.4              global_annotations['ignore'] = None
    20.5              return
    20.6  
    20.7 +        if pygccxml_definition.decl_string.startswith('::ns3::TracedCallback<'):
    20.8 +            global_annotations['ignore'] = None
    20.9 +            return
   20.10 +
   20.11          if pygccxml_definition.decl_string.startswith('::ns3::Ptr<'):
   20.12              # handled by pybindgen "type transformation"
   20.13              global_annotations['ignore'] = None
    21.1 --- a/examples/csma-bridge.cc	Tue Aug 12 14:54:46 2008 +0100
    21.2 +++ b/examples/csma-bridge.cc	Sat Aug 23 21:52:44 2008 +0100
    21.3 @@ -94,14 +94,8 @@
    21.4  
    21.5    // Create the bridge netdevice, which will do the packet switching
    21.6    Ptr<Node> switchNode = csmaSwitch.Get (0);
    21.7 -  Ptr<BridgeNetDevice> bridgeDevice = CreateObject<BridgeNetDevice> ();
    21.8 -  switchNode->AddDevice (bridgeDevice);
    21.9 -
   21.10 -  for (NetDeviceContainer::Iterator portIter = switchDevices.Begin ();
   21.11 -       portIter != switchDevices.End (); portIter++)
   21.12 -    {
   21.13 -      bridgeDevice->AddBridgePort (*portIter);
   21.14 -    }
   21.15 +  BridgeHelper bridge;
   21.16 +  bridge.Install (switchNode, switchDevices);
   21.17  
   21.18    // Add internet stack to the terminals
   21.19    InternetStackHelper internet;
    22.1 --- a/examples/mixed-wireless.cc	Tue Aug 12 14:54:46 2008 +0100
    22.2 +++ b/examples/mixed-wireless.cc	Sat Aug 23 21:52:44 2008 +0100
    22.3 @@ -116,9 +116,6 @@
    22.4    //
    22.5    cmd.Parse (argc, argv);
    22.6  
    22.7 -  // The metadata system (off by default) is used by ascii tracing below
    22.8 -  Packet::EnableMetadata ();
    22.9 -
   22.10    /////////////////////////////////////////////////////////////////////////// 
   22.11    //                                                                       //
   22.12    // Construct the backbone                                                //
    23.1 --- a/examples/mixed-wireless.py	Tue Aug 12 14:54:46 2008 +0100
    23.2 +++ b/examples/mixed-wireless.py	Sat Aug 23 21:52:44 2008 +0100
    23.3 @@ -98,9 +98,6 @@
    23.4      # 
    23.5      cmd.Parse(argv)
    23.6  
    23.7 -    #  The metadata system(off by default) is used by ascii tracing below
    23.8 -    ns3.Packet.EnableMetadata()
    23.9 -
   23.10      # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # / 
   23.11      #                                                                        # 
   23.12      #  Construct the backbone                                                # 
    24.1 --- a/examples/tcp-2way.cc	Tue Aug 12 14:54:46 2008 +0100
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,785 +0,0 @@
    24.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
    24.5 -/*
    24.6 - * Copyright 2007 University of Washington
    24.7 - * Copyright 2007 Georgia Tech Research Corporation
    24.8 - * Copyright 2008 Sandia Corporation
    24.9 - *
   24.10 - * This program is free software; you can redistribute it and/or modify
   24.11 - * it under the terms of the GNU General Public License version 2 as
   24.12 - * published by the Free Software Foundation;
   24.13 - *
   24.14 - * This program is distributed in the hope that it will be useful,
   24.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   24.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   24.17 - * GNU General Public License for more details.
   24.18 - *
   24.19 - * You should have received a copy of the GNU General Public License
   24.20 - * along with this program; if not, write to the Free Software
   24.21 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   24.22 - *
   24.23 - *
   24.24 - * Sandia is a multiprogram laboratory operated by Sandia
   24.25 - * Corporation, a Lockheed Martin Company, for the United States
   24.26 - * Department of Energy's National Nuclear Security Administration
   24.27 - * under Contract DE-AC04-94AL85000.
   24.28 - *
   24.29 - * Author: David Evensky, Sandia National Labs
   24.30 - *
   24.31 - * includes GPL'ed ns-3-dev code from:
   24.32 - *   udp-echo,          // ??, (c) U. Wash. 2007
   24.33 - *   tcp-large-transfer // ??
   24.34 - *   packet-sink        // Tom Henderson, (c) U. Wash. 2007
   24.35 - *   onoff              // George F. Riley, (c) GT Res Corp. 2007
   24.36 - */
   24.37 -
   24.38 -
   24.39 -/* NOTE
   24.40 -This isn't really an example file, so don't look to closely at it as a starting
   24.41 -script.  It is here for validation of the TCP model.
   24.42 -*/
   24.43 -
   24.44 -#include <iostream>
   24.45 -#include <fstream>
   24.46 -#include <sstream>
   24.47 -#include <string>
   24.48 -#include <iomanip>
   24.49 -#include <map>
   24.50 -
   24.51 -#include "ns3/core-module.h"
   24.52 -#include "ns3/helper-module.h"
   24.53 -#include "ns3/node-module.h"
   24.54 -#include "ns3/global-route-manager.h"
   24.55 -#include "ns3/simulator-module.h"
   24.56 -#include "ns3/log.h"
   24.57 -
   24.58 -using namespace ns3;
   24.59 -
   24.60 -NS_LOG_COMPONENT_DEFINE ("tcp-2way");
   24.61 -
   24.62 -//----------defines-------------------------------------------------------------
   24.63 -//define to print more debugging info.
   24.64 -#define VERBOSE_TESTING
   24.65 -
   24.66 -/* define to die because Socket::Recv() is told to
   24.67 - * only read an "undesired" number of bytes
   24.68 - * fails NS_ASSERT in HandleRead because rx_addr_tag
   24.69 - * tag isn't there.
   24.70 - */
   24.71 -//#define TOO_SMALL_BUG
   24.72 -
   24.73 -//define to print this pointer in NS_LOG_FUNCTION
   24.74 -//#define PRINT_THIS
   24.75 -
   24.76 -/*define to print packet info in HandleRead
   24.77 - *expected output is of the form:
   24.78 - *536:P{536} *bytes from 10.1.0.2 [02-06-0a:01:00:02:20:00] <0|536|884018>
   24.79 - * ^  ^      ^              ^             ^                  ^   ^ ^
   24.80 - * |  |      |              |             |                  |   | |
   24.81 - * |  |      |              |             |                  |   | +bytes left
   24.82 - * |  |      |              |             |                  |   |  to read in
   24.83 - * |  |      |              |             |                  |   |  sent buffer
   24.84 - * |  |      |              |             |                  |   +bytes read in
   24.85 - * |  |      |              |             |                  |    this packet if
   24.86 - * |  |      |              |             |                  |    header read,
   24.87 - * |  |      |              |             |                  |    prints size
   24.88 - * |  |      |              |             |                  |    in ()
   24.89 - * |  |      |              |             |                  +bytes cur. packet
   24.90 - * |  |      |              |             |                   left to process
   24.91 - * |  |      |              |             +mac addr of sender
   24.92 - * |  |      |              +IP addr of sender
   24.93 - * |  |      +print '*' while processing first chunk in a received packet.
   24.94 - * |  |       if there are multiple small sent packets, these can appear in
   24.95 - * |  |       a single packet, and are processed by a do {} while() loop.
   24.96 - * |  +rle output of packet::PeekData(), in this case filled with 536 bytes
   24.97 - * |   filled with the letter 'P' (brought to you by the letter 'Q' and the
   24.98 - * |   number '9' :-))
   24.99 - * + packet::GetSize()
  24.100 - *
  24.101 - * If there is a header it will look more like:
  24.102 - * 536:N{317}@B.{6}HELLOP{206} *bytes from 10.1.0.2 [02-06-0a:01:00:02:20:00]\
  24.103 - *                                                                   <219|317|0>
  24.104 - * 536:N{317}@B.{6}HELLOP{206}  bytes from 10.1.0.2 [02-06-0a:01:00:02:20:00]\
  24.105 - *                               <0|206(13)|999794> (ArchHeader=HELLO:1000000)
  24.106 - * where you can see that this first packet includes 317 bytes from the
  24.107 - * previous send packet (filled with N) and 13 bytes of header before the 206
  24.108 - * bytes of payload (filled with P).
  24.109 - */
  24.110 -
  24.111 -#define RECV_PRINT
  24.112 -
  24.113 -// dcl non-method functions....
  24.114 -std::string rle(const uint8_t *, int );
  24.115 -std::ofstream fileOut("tcp-2way.out");
  24.116 -
  24.117 -//----------class ArchHeader dcl and definition---------------------------------
  24.118 -/*
  24.119 - * ArchHeader: A toy header that holds a string
  24.120 - * and a uint32_t. The string is an abitrary label
  24.121 - * and the int is used as the length of the payload.
  24.122 - */
  24.123 -
  24.124 -class ArchHeader : public Header {
  24.125 -public:
  24.126 -  virtual uint32_t  GetSerializedSize (void) const;
  24.127 -  virtual void      Serialize (Buffer::Iterator) const;
  24.128 -  virtual uint32_t  Deserialize (Buffer::Iterator);
  24.129 -  virtual void      Print (std::ostream &) const;
  24.130 -  static  TypeId    GetTypeId (void);
  24.131 -  virtual TypeId    GetInstanceTypeId (void) const;
  24.132 -
  24.133 -  // accessor functions.....
  24.134 -  void        SetIntValue (uint32_t);
  24.135 -  uint32_t    GetIntValue (void) const;
  24.136 -  void        SetStrValue (const std::string &s);
  24.137 -  std::string GetStrValue (void) const;
  24.138 -private:
  24.139 -  uint32_t          int_value;
  24.140 -  std::string       str_value;
  24.141 -};
  24.142 -
  24.143 -
  24.144 -TypeId
  24.145 -ArchHeader::GetTypeId (void)
  24.146 -{
  24.147 -  static TypeId tid = TypeId ("ns3::ArchHeader")
  24.148 -    .AddConstructor<ArchHeader> () // NOTE: Required for ????
  24.149 -    .SetParent<Header> ()          // ditto
  24.150 -    ;
  24.151 -  return tid;
  24.152 -}
  24.153 -
  24.154 -TypeId
  24.155 -ArchHeader::GetInstanceTypeId (void) const
  24.156 -{
  24.157 -  return GetTypeId ();
  24.158 -}
  24.159 -
  24.160 -uint32_t
  24.161 -ArchHeader::GetSerializedSize (void) const
  24.162 -{
  24.163 -  return 2*sizeof (uint32_t) + str_value.size (); // int, str len & bytes
  24.164 -}
  24.165 -
  24.166 -void
  24.167 -ArchHeader::Serialize (Buffer::Iterator i) const
  24.168 -{
  24.169 -  i.WriteU32 (int_value);
  24.170 -  uint32_t str_len = str_value.size ();
  24.171 -  i.WriteU32 (str_len);
  24.172 -  for (uint32_t j = 0; j < str_value.size (); j++)
  24.173 -    i.WriteU8 (str_value[j]);
  24.174 -}
  24.175 -  
  24.176 -uint32_t
  24.177 -ArchHeader::Deserialize (Buffer::Iterator i)
  24.178 -{
  24.179 -  int_value = i.ReadU32 ();
  24.180 -  uint32_t str_len = i.ReadU32 ();
  24.181 -  str_value.reserve (str_len);
  24.182 -  for (uint32_t j = 0; j < str_len; j++) {
  24.183 -    char v = i.ReadU8 ();
  24.184 -    str_value.push_back (v);
  24.185 -  }
  24.186 -  return 2*sizeof (uint32_t) + str_value.size ();
  24.187 -}
  24.188 -
  24.189 -
  24.190 -void
  24.191 -ArchHeader::SetIntValue (uint32_t v_)
  24.192 -{
  24.193 -  int_value = v_;
  24.194 -}
  24.195 -
  24.196 -uint32_t
  24.197 -ArchHeader::GetIntValue (void) const
  24.198 -{
  24.199 -  return int_value;
  24.200 -}
  24.201 -
  24.202 -void
  24.203 -ArchHeader::SetStrValue (const std::string &s)
  24.204 -{
  24.205 -  str_value = s;
  24.206 -}
  24.207 -
  24.208 -std::string
  24.209 -ArchHeader::GetStrValue (void) const
  24.210 -{
  24.211 -  return str_value;
  24.212 -}
  24.213 -   
  24.214 -void
  24.215 -ArchHeader::Print (std::ostream &os) const
  24.216 -{
  24.217 -  os << "(ArchHeader=" << str_value << ":" << int_value << ")";
  24.218 -}
  24.219 -
  24.220 -//----------class TalkerApp dcl and definition----------------------------------
  24.221 -/*
  24.222 - * TalkerApp:
  24.223 - * An an Application that can serve as both Rx and Tx side.
  24.224 - * and is configured by ConfRecv/ConfSend and driven by
  24.225 - * ScheduleSendPacket. Becareful not to try to send a packet
  24.226 - * from the Rx side to the Tx side (back channel) before the
  24.227 - * connection is setup, which has to be from the Tx to the Rx
  24.228 - * (the forward channel).
  24.229 - */
  24.230 -
  24.231 -class TalkerApp : public Application {
  24.232 -public:
  24.233 -  TalkerApp ();
  24.234 -  virtual ~TalkerApp ();
  24.235 -  void ConfRecv (Ptr<Node>,const Address &);
  24.236 -  void ConfSend (Ptr<Node>,const Address &);
  24.237 -  void ScheduleSendPacket(const Time ,const char , const uint32_t size );
  24.238 -
  24.239 -protected:
  24.240 -  virtual void DoDispose (void);
  24.241 -private:
  24.242 -  virtual void StartApplication (void);
  24.243 -  virtual void StopApplication (void);
  24.244 -
  24.245 -  void StartApplicationRecv (void);
  24.246 -  void StartApplicationSend (void);
  24.247 -
  24.248 -  void HandleRead (Ptr<Socket>);
  24.249 -  void SendPacket (std::string,char,uint32_t);
  24.250 -
  24.251 -  void CloseConnection (Ptr<Socket> socket);
  24.252 -  void ConnectionSucceeded (Ptr<Socket>);
  24.253 -  void ConnectionFailed (Ptr<Socket>);
  24.254 -  bool ConnectionRequested (Ptr<Socket>, const Address &);
  24.255 -  void ConnectionCreated (Ptr<Socket>, const Address &);
  24.256 -
  24.257 -
  24.258 -  bool            verbose;
  24.259 -  Ptr<Socket>     m_socket;
  24.260 -  Ptr<Socket>     m_servsocket;
  24.261 -  Address         m_local;
  24.262 -  Address         m_remote;
  24.263 -  int             i_am_listener;
  24.264 -  typedef std::map<Ptr<Socket>, uint32_t>::iterator left_to_read_iterator_type;
  24.265 -  std::map<Ptr<Socket>, uint32_t> m_left_to_read;
  24.266 -};
  24.267 -
  24.268 -class TalkerApp_sub : public TalkerApp {
  24.269 -public:
  24.270 -  int foo(void);
  24.271 -};
  24.272 -
  24.273 -int
  24.274 -TalkerApp_sub::foo(void) {return 0;}
  24.275 -
  24.276 -TalkerApp::TalkerApp () :
  24.277 -  verbose (false),
  24.278 -  m_socket (0),
  24.279 -  m_servsocket (0),
  24.280 -  i_am_listener (0)
  24.281 -{}
  24.282 -
  24.283 -TalkerApp::~TalkerApp ()
  24.284 -{}
  24.285 -
  24.286 -void
  24.287 -TalkerApp::DoDispose (void)
  24.288 -{
  24.289 -  m_socket = 0;
  24.290 -  m_servsocket = 0;
  24.291 -  Application::DoDispose ();
  24.292 -}
  24.293 -
  24.294 -
  24.295 -void
  24.296 -TalkerApp::CloseConnection (Ptr<Socket> sock)
  24.297 -{
  24.298 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.299 -#ifdef PRINT_THIS                  
  24.300 -                  << this
  24.301 -#endif
  24.302 -                  << sock
  24.303 -                  );
  24.304 -  sock->Close ();
  24.305 -}
  24.306 -
  24.307 -void
  24.308 -TalkerApp::ConnectionSucceeded (Ptr<Socket> sock)
  24.309 -{
  24.310 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.311 -#ifdef PRINT_THIS                  
  24.312 -                  << this
  24.313 -#endif
  24.314 -                  << sock
  24.315 -	
  24.316 -		   );
  24.317 -}
  24.318 -
  24.319 -void
  24.320 -TalkerApp::ConnectionFailed (Ptr<Socket> sock)
  24.321 -{
  24.322 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.323 -#ifdef PRINT_THIS                  
  24.324 -                  << this
  24.325 -#endif
  24.326 -                  << sock
  24.327 -                  );
  24.328 -}
  24.329 -
  24.330 -bool
  24.331 -TalkerApp::ConnectionRequested (Ptr<Socket> sock, const Address &addr)
  24.332 -{
  24.333 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.334 -#ifdef PRINT_THIS                  
  24.335 -                  << this
  24.336 -#endif
  24.337 -                  << sock
  24.338 -                  << addr
  24.339 -                  );
  24.340 -  return true;
  24.341 -}
  24.342 -
  24.343 -void
  24.344 -TalkerApp::ConnectionCreated (Ptr<Socket> sock, const Address &addr)
  24.345 -{
  24.346 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.347 -#ifdef PRINT_THIS                  
  24.348 -                  << this
  24.349 -#endif
  24.350 -                  << sock
  24.351 -                  << addr
  24.352 -                  );
  24.353 -  m_socket = sock;
  24.354 -  m_socket->SetRecvCallback(MakeCallback (&TalkerApp::HandleRead, this));
  24.355 -}
  24.356 -
  24.357 -void 
  24.358 -TalkerApp::ScheduleSendPacket (const Time dt,const char fill,
  24.359 -                               const uint32_t size)
  24.360 -{
  24.361 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.362 -#ifdef PRINT_THIS                  
  24.363 -                  << this
  24.364 -#endif
  24.365 -                   << dt
  24.366 -                   << fill
  24.367 -                   << size
  24.368 -                   );
  24.369 -  Simulator::Schedule(dt,&TalkerApp::SendPacket, this,
  24.370 -                      std::string("HELLO"),fill,size);
  24.371 -}
  24.372 -
  24.373 -
  24.374 -void
  24.375 -TalkerApp::StartApplication ()
  24.376 -{
  24.377 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.378 -#ifdef PRINT_THIS                  
  24.379 -                  << this
  24.380 -#endif
  24.381 -                  );
  24.382 -  if (i_am_listener)
  24.383 -    StartApplicationRecv ();
  24.384 -  else
  24.385 -    StartApplicationSend ();
  24.386 -}
  24.387 -
  24.388 -void
  24.389 -TalkerApp::StartApplicationSend ()
  24.390 -{
  24.391 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.392 -#ifdef PRINT_THIS                  
  24.393 -                  << this
  24.394 -#endif
  24.395 -                  );
  24.396 -
  24.397 -  if (!m_socket) {
  24.398 -    m_socket = Socket::CreateSocket (GetNode (),
  24.399 -				    TcpSocketFactory::GetTypeId ());
  24.400 -    m_socket->Bind ();
  24.401 -  }
  24.402 -
  24.403 -  m_socket->Connect (m_remote);
  24.404 -  m_socket->SetConnectCallback
  24.405 -    (
  24.406 -     MakeCallback (&TalkerApp::ConnectionSucceeded,this),
  24.407 -     MakeCallback (&TalkerApp::ConnectionFailed,this)
  24.408 -     );
  24.409 -  m_socket->SetRecvCallback (MakeCallback (&TalkerApp::HandleRead, this));
  24.410 -}
  24.411 -
  24.412 -void
  24.413 -TalkerApp::StartApplicationRecv ()
  24.414 -{
  24.415 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.416 -#ifdef PRINT_THIS                  
  24.417 -                  << this
  24.418 -#endif
  24.419 -                  );
  24.420 -  if (!m_servsocket) {
  24.421 -    m_servsocket = Socket::CreateSocket (GetNode (),
  24.422 -					TcpSocketFactory::GetTypeId ());
  24.423 -    m_servsocket->Bind (m_local);
  24.424 -    m_servsocket->Listen (0);
  24.425 -  }
  24.426 -
  24.427 -  m_servsocket->SetAcceptCallback
  24.428 -    (
  24.429 -     MakeCallback (&TalkerApp::ConnectionRequested,this),
  24.430 -     MakeCallback (&TalkerApp::ConnectionCreated,this)
  24.431 -     );
  24.432 -}
  24.433 - 
  24.434 -void
  24.435 -TalkerApp::ConfRecv (Ptr<Node> node, const Address &addr)
  24.436 -{
  24.437 -  i_am_listener = 1;
  24.438 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.439 -#ifdef PRINT_THIS                  
  24.440 -                  << this
  24.441 -#endif
  24.442 -                  << node
  24.443 -                  << addr
  24.444 -                  );
  24.445 -  m_local = addr;
  24.446 -  node->AddApplication (this);
  24.447 -}
  24.448 -
  24.449 -void
  24.450 -TalkerApp::ConfSend (Ptr<Node> node, const Address &addr)
  24.451 -{
  24.452 -  i_am_listener = 0;
  24.453 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.454 -#ifdef PRINT_THIS                  
  24.455 -                  << this
  24.456 -#endif
  24.457 -                  << node
  24.458 -                  << addr
  24.459 -                  );
  24.460 -  m_remote = addr;
  24.461 -  node->AddApplication (this);
  24.462 -}
  24.463 -
  24.464 -
  24.465 -void
  24.466 -TalkerApp::SendPacket (std::string label,char fill,uint32_t payloadsize)
  24.467 -{
  24.468 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.469 -#ifdef PRINT_THIS                  
  24.470 -                  << this
  24.471 -#endif
  24.472 -                  << label
  24.473 -                  << fill
  24.474 -                  << payloadsize
  24.475 -                  );
  24.476 -
  24.477 -#if 0
  24.478 -  Ptr<Packet> p = Create<Packet> (payloadsize); // zero byte filled packet.
  24.479 -#else
  24.480 -  uint8_t *buf = (uint8_t *) malloc(payloadsize*sizeof(uint8_t));
  24.481 -  memset(buf,fill,payloadsize);
  24.482 -  Ptr<Packet> p = Create<Packet> (buf,payloadsize); // filled packet.
  24.483 -  free(buf);
  24.484 -#endif
  24.485 -  if (verbose) {
  24.486 -    p->Print (fileOut << "Before Marking|");
  24.487 -    fileOut << std::endl;
  24.488 -  }
  24.489 -
  24.490 -  ArchHeader hdr;
  24.491 -  hdr.SetStrValue (label);
  24.492 -  hdr.SetIntValue (p->GetSize());
  24.493 -  p->AddHeader (hdr);
  24.494 -  if (verbose) {
  24.495 -    p->Print(fileOut << "After Header Marking|");
  24.496 -    fileOut << std::endl;
  24.497 -  }
  24.498 -
  24.499 -  m_socket->Send (p);
  24.500 -}
  24.501 -
  24.502 -void
  24.503 -TalkerApp::StopApplication ()
  24.504 -{
  24.505 -  NS_LOG_FUNCTION ((i_am_listener ? "Server|" : "Client|")
  24.506 -#ifdef PRINT_THIS                  
  24.507 -                  << this
  24.508 -#endif
  24.509 -                  );
  24.510 -  if (m_socket)
  24.511 -    m_socket->SetRecvCallback (MakeNullCallback<void, Ptr<Socket> > ());
  24.512 -}
  24.513 -
  24.514 -void
  24.515 -TalkerApp::HandleRead (Ptr<Socket> socket)
  24.516 -{
  24.517 -  left_to_read_iterator_type iter = m_left_to_read.find (socket);
  24.518 -  if (iter == m_left_to_read.end ())
  24.519 -    m_left_to_read[socket] = 0;
  24.520 -
  24.521 -  std::ostringstream  pretty;
  24.522 -  pretty << (i_am_listener ? "Server" : "Client")
  24.523 -         << (iter == m_left_to_read.end () ? 
  24.524 -             "(new)" : "(old)")
  24.525 -         << "|";
  24.526 -
  24.527 -  NS_LOG_FUNCTION ( pretty.str ()
  24.528 -#ifdef PRINT_THIS                  
  24.529 -                  << this
  24.530 -#endif
  24.531 -                  << socket
  24.532 -                  );
  24.533 -  /*
  24.534 -   * NOTE: I can crash with the # bytes == 500 rather than 536
  24.535 -   * which seems to be the default MTU
  24.536 -   */
  24.537 -
  24.538 -#ifdef TOO_SMALL_BUG
  24.539 -  const uint32_t number_of_bytes_willing_to_read = 500;
  24.540 -#else
  24.541 -  const uint32_t number_of_bytes_willing_to_read = 536;
  24.542 -#endif
  24.543 -  const uint32_t unused_flags = 0;
  24.544 -
  24.545 -  Ptr<Packet> packet;
  24.546 -  while (packet = socket->Recv (number_of_bytes_willing_to_read,
  24.547 -                                unused_flags) ){
  24.548 -    std::string raw_rle = rle(packet->PeekData(),
  24.549 -                              packet->GetSize());
  24.550 -    SocketAddressTag rx_addr_tag;
  24.551 -    bool found;
  24.552 -    found = packet->FindFirstMatchingTag (rx_addr_tag);
  24.553 -    NS_ASSERT (found);
  24.554 -    Address from = rx_addr_tag.GetAddress ();
  24.555 -    // XXX packet->RemoveTag (tag);
  24.556 -    if (InetSocketAddress::IsMatchingType (from)) {
  24.557 -      InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
  24.558 -
  24.559 -#ifdef VERBOSE_TESTING
  24.560 -      packet->Print (fileOut << "Packet Dump: ");
  24.561 -      fileOut << std::endl;
  24.562 -#endif
  24.563 -
  24.564 -
  24.565 -      bool freshly_in_the_loop = true;
  24.566 -      do {
  24.567 -#if defined(RECV_PRINT)
  24.568 -        fileOut
  24.569 -          << raw_rle // <length>:<rle of packet->PeekBuffer>
  24.570 -          << (freshly_in_the_loop ? " *" : "  ") /* used to see if the do while
  24.571 -                                                  * does anything */
  24.572 -          << "bytes from "
  24.573 -          << address.GetIpv4 () << " [" << address << "] ";
  24.574 -#endif
  24.575 -        freshly_in_the_loop = false;
  24.576 -        int header_bytes = 0;
  24.577 -        ArchHeader* hdr =  0; // sadly, can't be a Ptr<>
  24.578 -        if (
  24.579 -            (m_left_to_read[socket] == 0)
  24.580 -            ) {
  24.581 -          hdr =  new ArchHeader;
  24.582 -          if (packet->RemoveHeader (*hdr)) {
  24.583 -            m_left_to_read[socket] = hdr->GetIntValue ();
  24.584 -            header_bytes = hdr->GetSerializedSize ();
  24.585 -          } else {
  24.586 -            ; // never get here, ns3 dumps if no header is there.
  24.587 -          }
  24.588 -        }
  24.589 -        uint32_t num_bytes_processed = 0;
  24.590 -        if (m_left_to_read[socket] <= packet->GetSize ()) {
  24.591 -          packet->RemoveAtStart (m_left_to_read[socket]);
  24.592 -          num_bytes_processed = m_left_to_read[socket];
  24.593 -          m_left_to_read[socket] = 0;
  24.594 -
  24.595 -        } else {
  24.596 -          m_left_to_read[socket] -= packet->GetSize ();
  24.597 -          num_bytes_processed = packet->GetSize ();
  24.598 -          packet->RemoveAtStart (packet->GetSize ());
  24.599 -        }
  24.600 -
  24.601 -#if defined(RECV_PRINT)
  24.602 -        fileOut
  24.603 -          << "<"
  24.604 -          << packet->GetSize ()
  24.605 -          << "|"
  24.606 -          <<  num_bytes_processed
  24.607 -          ;
  24.608 -        if (header_bytes)
  24.609 -          fileOut
  24.610 -            << "("
  24.611 -            << header_bytes
  24.612 -            << ")"
  24.613 -            ;
  24.614 -        fileOut
  24.615 -          << "|"
  24.616 -          << m_left_to_read[socket]
  24.617 -          << ">";
  24.618 -#ifdef VERBOSE_TESTING
  24.619 -        if (hdr)
  24.620 -          hdr->Print(fileOut << " ");
  24.621 -#endif
  24.622 -        fileOut << std::endl;
  24.623 -#endif
  24.624 -        if (hdr)
  24.625 -          delete hdr; // free what we new....
  24.626 -      } while (
  24.627 -               packet->GetSize ()
  24.628 -               );
  24.629 -    } else {
  24.630 -      fileOut << "not a match in HandleRead" << std::endl;
  24.631 -    }
  24.632 -
  24.633 -  }
  24.634 -}
  24.635 -
  24.636 -//---------------Non-member functions-------------------------------------------
  24.637 -/*
  24.638 - * returns a string containing the length of the buffer,
  24.639 - * followed by an run length encoded version of the buffer
  24.640 - * un-printables are represented by '.' (i.e. special_marker
  24.641 - * const).
  24.642 - */
  24.643 -std::string rle(const uint8_t *buf, int buflen) {
  24.644 -
  24.645 -  int justify = 5;
  24.646 -  std::ostringstream o;
  24.647 -  const uint8_t min_rep = 3;
  24.648 -  uint8_t cur_char = 0;
  24.649 -  const uint8_t special_marker = '.';
  24.650 -  int cur_cnt = 0;
  24.651 -  if (justify) {
  24.652 -    o << std::setw(justify) << std::right << buflen << ":";
  24.653 -  } else {
  24.654 -    o << buflen << ":";
  24.655 -  }
  24.656 -
  24.657 -  for (int i = 0; i < buflen; i++) {
  24.658 -    if (
  24.659 -        (!isprint(buf[i]) && cur_char == special_marker) ||
  24.660 -        (buf[i] == cur_char)
  24.661 -        )
  24.662 -      cur_cnt++;
  24.663 -    else {
  24.664 -      if (cur_cnt >= min_rep)
  24.665 -        o << (isprint(cur_char) ? static_cast<char>(cur_char) : '.') << "{"
  24.666 -          << cur_cnt << "}";
  24.667 -      else
  24.668 -        for (int irep=0; irep < cur_cnt; irep++)
  24.669 -          o << (isprint(cur_char) ? static_cast<char>(cur_char) : '.');
  24.670 -      if (isprint(buf[i]))
  24.671 -        cur_char = buf[i];
  24.672 -      else
  24.673 -        cur_char = special_marker;
  24.674 -      cur_cnt = 1;
  24.675 -    }
  24.676 -  }
  24.677 -  if (cur_cnt >= min_rep)
  24.678 -    o << (isprint(cur_char) ? static_cast<char>(cur_char) : '.') << "{"
  24.679 -      << cur_cnt << "}";
  24.680 -  else
  24.681 -    for (int irep=0; irep < cur_cnt; irep++)
  24.682 -      o << (isprint(cur_char) ? static_cast<char>(cur_char) : '.');
  24.683 -  return o.str();
  24.684 -}
  24.685 -
  24.686 -//---------------Main-----------------------------------------------------------
  24.687 -int
  24.688 -main (int argc, char *argv[]) {
  24.689 -
  24.690 -  std::clog.rdbuf (fileOut.rdbuf ()); /* till we can do this in ns3::log
  24.691 -                                         * without this ns3 logging messages
  24.692 -                                         * are far away from normal output
  24.693 -                                         */
  24.694 -
  24.695 -#ifdef VERBOSE_TESTING  
  24.696 -  LogComponentEnable ("tcp-2way",LOG_LEVEL_ALL);
  24.697 -#endif
  24.698 -
  24.699 -  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
  24.700 -  Packet::EnableMetadata ();
  24.701 -
  24.702 -  // boilerplate:  "c0[0]" is Tx, "c0[1]" is Rx.
  24.703 -  NodeContainer c0;
  24.704 -  c0.Create (2);
  24.705 -
  24.706 -  // We create the channels first without any IP addressing information
  24.707 -  PointToPointHelper p2p;
  24.708 -  p2p.SetDeviceAttribute ("DataRate",DataRateValue (DataRate (10000000)));
  24.709 -  p2p.SetChannelAttribute ("Delay",TimeValue (MilliSeconds (10)));
  24.710 -  NetDeviceContainer dev0 = p2p.Install (c0);
  24.711 -
  24.712 -  // add ip/tcp stack to nodes.
  24.713 -  InternetStackHelper internet;
  24.714 -  internet.Install (c0);
  24.715 -
  24.716 -  // Later, we add IP addresses.  
  24.717 -  Ipv4AddressHelper ipv4;
  24.718 -  ipv4.SetBase ("10.1.0.0", "255.255.255.0");
  24.719 -  Ipv4InterfaceContainer ifaces = ipv4.Assign (dev0);
  24.720 -
  24.721 -  // Configure the apps.
  24.722 -  uint16_t servPort = 32;
  24.723 -
  24.724 -
  24.725 -  // setup Rx side using ns3::Node "c0[1]" to listen for ANY:servPort
  24.726 -  Ptr<TalkerApp> sink = CreateObject<TalkerApp_sub>();
  24.727 -  sink->ConfRecv (c0.Get (1),
  24.728 -		InetSocketAddress (Ipv4Address::GetAny (), servPort));
  24.729 -  sink->Start (Seconds (0.0)); // somehow we get by without a Stop. bad form?
  24.730 -
  24.731 -  // setup Tx side using ns3::Node "c0[0]" to talk to "c0[1]":servPort
  24.732 -  Ptr<TalkerApp>  source = CreateObject<TalkerApp_sub>();
  24.733 -  source->ConfSend (c0.Get (0),
  24.734 -                  InetSocketAddress (ifaces.GetAddress (1),
  24.735 -                                     servPort));
  24.736 -  source->Start (Seconds (0.0));
  24.737 -
  24.738 -  // 10 sec is an eternity for this case, we should be done by then.
  24.739 -  Simulator::Stop (Seconds (10));
  24.740 -
  24.741 -
  24.742 -  // For regression use only output ascii and pcap traces.
  24.743 -#ifdef REGRESSION_MODE
  24.744 -  std::ofstream ascii;
  24.745 -  ascii.open ("tcp-2way.tr");
  24.746 -  PointToPointHelper::EnableAsciiAll (ascii);
  24.747 -  PointToPointHelper::EnablePcapAll ("tcp-2way");
  24.748 -#endif
  24.749 -
  24.750 -  /*
  24.751 -   * Now lets schedule some packets and go. For scheduling packets
  24.752 -   * we have to be careful not to do the backchannel too early or
  24.753 -   * we try to use a socket that doesn't yet exist since on the Rx
  24.754 -   * side the socket is created as part of the normal Tx->Rx connection
  24.755 -   * setup.
  24.756 -   *
  24.757 -   * The delay of 40ms was by trial and error and seems good enough. It
  24.758 -   * would be nice to know what the bounds are and why....
  24.759 -   */
  24.760 -
  24.761 -  char tagchar = 'A'; // the fill character in case we fill in SendPacket.
  24.762 -
  24.763 -  Time d2t = MilliSeconds(40); /* rate to change time offset (dt) so packets
  24.764 -                                * are sent in order (Tx->Rx, Rx->Tx for a given
  24.765 -                                * size over a range of sizes).*/
  24.766 -
  24.767 -  Time dt = MilliSeconds(0); /* ns3 doesn't take absolute times, but times
  24.768 -                              * relative to Simulator::Now() */
  24.769 -
  24.770 -  uint32_t size = 0;
  24.771 -  source->ScheduleSendPacket (dt, tagchar, size);
  24.772 -  dt += d2t;
  24.773 -  ++tagchar;
  24.774 -  sink->ScheduleSendPacket (dt, tagchar, size);
  24.775 -  for (size = 1; size <= 1000000; size *= 10) {
  24.776 -    dt += d2t;
  24.777 -    ++tagchar;
  24.778 -    source->ScheduleSendPacket (dt, tagchar, size);
  24.779 -    dt += d2t;
  24.780 -    ++tagchar;
  24.781 -    sink->ScheduleSendPacket (dt, tagchar, size);
  24.782 -  }
  24.783 -
  24.784 -  // Release the Hounds!!
  24.785 -  Simulator::Run ();
  24.786 -  Simulator::Destroy ();
  24.787 -  fileOut.close();
  24.788 -}
    25.1 --- a/examples/wscript	Tue Aug 12 14:54:46 2008 +0100
    25.2 +++ b/examples/wscript	Sat Aug 23 21:52:44 2008 +0100
    25.3 @@ -60,10 +60,6 @@
    25.4          ['point-to-point', 'internet-stack'])
    25.5      obj.source = 'tcp-errors.cc'
    25.6  
    25.7 -    obj = bld.create_ns3_program('tcp-2way',
    25.8 -      ['point-to-point', 'internet-stack'])
    25.9 -    obj.source = 'tcp-2way.cc'
   25.10 -
   25.11      obj = bld.create_ns3_program('tcp-star-server',
   25.12          ['point-to-point', 'internet-stack'])
   25.13      obj.source = 'tcp-star-server.cc'
    26.1 --- a/src/applications/onoff/onoff-application.cc	Tue Aug 12 14:54:46 2008 +0100
    26.2 +++ b/src/applications/onoff/onoff-application.cc	Sat Aug 23 21:52:44 2008 +0100
    26.3 @@ -135,7 +135,7 @@
    26.4        m_socket->Connect (m_peer);
    26.5      }
    26.6    // Insure no pending event
    26.7 -  StopApplication();
    26.8 +  CancelEvents ();
    26.9    // If we are not yet connected, there is nothing to do here
   26.10    // The ConnectionComplete upcall will start timers at that time
   26.11    //if (!m_connected) return;
   26.12 @@ -146,6 +146,14 @@
   26.13  {
   26.14    NS_LOG_FUNCTION_NOARGS ();
   26.15  
   26.16 +  CancelEvents ();
   26.17 +  m_socket->Close ();
   26.18 +}
   26.19 +
   26.20 +void OnOffApplication::CancelEvents ()
   26.21 +{
   26.22 +  NS_LOG_FUNCTION_NOARGS ();
   26.23 +
   26.24    if (m_sendEvent.IsRunning ())
   26.25      { // Cancel the pending send packet event
   26.26        // Calculate residual bits since last packet sent
    27.1 --- a/src/applications/onoff/onoff-application.h	Tue Aug 12 14:54:46 2008 +0100
    27.2 +++ b/src/applications/onoff/onoff-application.h	Sat Aug 23 21:52:44 2008 +0100
    27.3 @@ -83,6 +83,9 @@
    27.4    virtual void StartApplication (void);    // Called at time specified by Start
    27.5    virtual void StopApplication (void);     // Called at time specified by Stop
    27.6  
    27.7 +  //helpers
    27.8 +  void CancelEvents ();
    27.9 +
   27.10    void Construct (Ptr<Node> n,
   27.11                    const Address &remote,
   27.12                    std::string tid,
    28.1 --- a/src/applications/packet-sink/packet-sink.cc	Tue Aug 12 14:54:46 2008 +0100
    28.2 +++ b/src/applications/packet-sink/packet-sink.cc	Sat Aug 23 21:52:44 2008 +0100
    28.3 @@ -33,7 +33,7 @@
    28.4  
    28.5  namespace ns3 {
    28.6  
    28.7 -NS_LOG_COMPONENT_DEFINE ("PacketSinkApplication");
    28.8 +NS_LOG_COMPONENT_DEFINE ("PacketSink");
    28.9  NS_OBJECT_ENSURE_REGISTERED (PacketSink);
   28.10  
   28.11  TypeId 
   28.12 @@ -58,15 +58,19 @@
   28.13  
   28.14  PacketSink::PacketSink ()
   28.15  {
   28.16 +  NS_LOG_FUNCTION (this);
   28.17    m_socket = 0;
   28.18  }
   28.19  
   28.20  PacketSink::~PacketSink()
   28.21 -{}
   28.22 +{
   28.23 +  NS_LOG_FUNCTION (this);
   28.24 +}
   28.25  
   28.26  void
   28.27  PacketSink::DoDispose (void)
   28.28  {
   28.29 +  NS_LOG_FUNCTION (this);
   28.30    m_socket = 0;
   28.31  
   28.32    // chain up
   28.33 @@ -77,6 +81,7 @@
   28.34  // Application Methods
   28.35  void PacketSink::StartApplication()    // Called at time specified by Start
   28.36  {
   28.37 +  NS_LOG_FUNCTION (this);
   28.38    // Create the socket if not already
   28.39    if (!m_socket)
   28.40      {
   28.41 @@ -93,6 +98,7 @@
   28.42  
   28.43  void PacketSink::StopApplication()     // Called at time specified by Stop
   28.44  {
   28.45 +  NS_LOG_FUNCTION (this);
   28.46    while(!m_socketList.empty()) //these are accepted sockets, close them
   28.47    {
   28.48      Ptr<Socket> acceptedSocket = m_socketList.front();
   28.49 @@ -108,6 +114,7 @@
   28.50  
   28.51  void PacketSink::HandleRead (Ptr<Socket> socket)
   28.52  {
   28.53 +  NS_LOG_FUNCTION (this << socket);
   28.54    Ptr<Packet> packet;
   28.55    Address from;
   28.56    while (packet = socket->RecvFrom (from))
   28.57 @@ -125,6 +132,7 @@
   28.58  
   28.59  void PacketSink::HandleAccept (Ptr<Socket> s, const Address& from)
   28.60  {
   28.61 +  NS_LOG_FUNCTION (this << s << from);
   28.62    s->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this));
   28.63    m_socketList.push_back (s);
   28.64  }
    29.1 --- a/src/common/packet-metadata.cc	Tue Aug 12 14:54:46 2008 +0100
    29.2 +++ b/src/common/packet-metadata.cc	Sat Aug 23 21:52:44 2008 +0100
    29.3 @@ -1001,9 +1001,10 @@
    29.4        item.type = PacketMetadata::Item::HEADER;
    29.5        if (!item.isFragment)
    29.6          {
    29.7 -          ns3::Buffer::Iterator j = m_buffer.Begin ();
    29.8 -          j.Next (m_offset);
    29.9 -          item.current = j;
   29.10 +          ns3::Buffer tmp = m_buffer;
   29.11 +          tmp.RemoveAtStart (m_offset);
   29.12 +          tmp.RemoveAtEnd (tmp.GetSize () - item.currentSize);
   29.13 +          item.current = tmp.Begin ();
   29.14          }
   29.15      }
   29.16    else if (tid.IsChildOf (Trailer::GetTypeId ()))
   29.17 @@ -1011,9 +1012,10 @@
   29.18        item.type = PacketMetadata::Item::TRAILER;
   29.19        if (!item.isFragment)
   29.20          {
   29.21 -          ns3::Buffer::Iterator j = m_buffer.End ();
   29.22 -          j.Prev (m_buffer.GetSize () - (m_offset + smallItem.size));
   29.23 -          item.current = j;
   29.24 +          ns3::Buffer tmp = m_buffer;
   29.25 +          tmp.RemoveAtEnd (tmp.GetSize () - (m_offset + smallItem.size));
   29.26 +          tmp.RemoveAtStart (tmp.GetSize () - item.currentSize);
   29.27 +          item.current = tmp.End ();
   29.28          }
   29.29      }
   29.30    else 
    30.1 --- a/src/core/attribute-accessor-helper.h	Tue Aug 12 14:54:46 2008 +0100
    30.2 +++ b/src/core/attribute-accessor-helper.h	Sat Aug 23 21:52:44 2008 +0100
    30.3 @@ -223,6 +223,49 @@
    30.4    return DoMakeAccessorHelperTwo<W> (setter, getter);
    30.5  }
    30.6  
    30.7 +template <typename W, typename T, typename U, typename V>
    30.8 +Ptr<const AttributeAccessor>
    30.9 +DoMakeAccessorHelperTwo (bool (T::*setter) (U), 
   30.10 +                         V (T::*getter) (void) const)
   30.11 +{
   30.12 +  class MemberMethod : public AccessorHelper<T,W>
   30.13 +    {
   30.14 +    public:
   30.15 +      MemberMethod (bool (T::*setter) (U), 
   30.16 +		    V (T::*getter) (void) const)
   30.17 +	: AccessorHelper<T,W> (),
   30.18 +	m_setter (setter),
   30.19 +	m_getter (getter)
   30.20 +	{}
   30.21 +    private:
   30.22 +      virtual bool DoSet (T *object, const W *v) const {
   30.23 +	bool ok = (object->*m_setter) (v->Get ());
   30.24 +        return ok;
   30.25 +      }
   30.26 +      virtual bool DoGet (const T *object, W *v) const {
   30.27 +	v->Set ((object->*m_getter) ());
   30.28 +	return true;
   30.29 +      }
   30.30 +      virtual bool HasGetter (void) const {
   30.31 +        return true;
   30.32 +      }
   30.33 +      virtual bool HasSetter (void) const {
   30.34 +        return true;
   30.35 +      }
   30.36 +      bool (T::*m_setter) (U);
   30.37 +      V (T::*m_getter) (void) const;
   30.38 +    };
   30.39 +  return Ptr<const AttributeAccessor> (new MemberMethod (setter, getter), false);
   30.40 +}
   30.41 +
   30.42 +template <typename W, typename T, typename U, typename V>
   30.43 +Ptr<const AttributeAccessor>
   30.44 +DoMakeAccessorHelperTwo (bool (T::*getter) (void) const, 
   30.45 +                         void (T::*setter) (U))
   30.46 +{
   30.47 +  return DoMakeAccessorHelperTwo<W> (setter, getter);
   30.48 +}
   30.49 +
   30.50  template <typename V, typename T1>
   30.51  Ptr<const AttributeAccessor>
   30.52  MakeAccessorHelper (T1 a1)
    31.1 --- a/src/core/attribute-test.cc	Tue Aug 12 14:54:46 2008 +0100
    31.2 +++ b/src/core/attribute-test.cc	Sat Aug 23 21:52:44 2008 +0100
    31.3 @@ -206,8 +206,9 @@
    31.4    Ptr<Derived> DoGetVector (uint32_t i) const {
    31.5      return m_vector2[i];
    31.6    }
    31.7 -  void DoSetIntSrc (int8_t v) {
    31.8 +  bool DoSetIntSrc (int8_t v) {
    31.9      m_intSrc2 = v;
   31.10 +    return true;
   31.11    }
   31.12    int8_t DoGetIntSrc (void) const {
   31.13      return m_intSrc2;
    32.1 --- a/src/core/log.h	Tue Aug 12 14:54:46 2008 +0100
    32.2 +++ b/src/core/log.h	Sat Aug 23 21:52:44 2008 +0100
    32.3 @@ -269,19 +269,19 @@
    32.4   * Component:Function (aNumber, anotherNumber)
    32.5   * \endcode
    32.6   */
    32.7 -#define NS_LOG_FUNCTION(parameters)                     \
    32.8 -  do                                                    \
    32.9 -    {                                                   \
   32.10 -      if (g_log.IsEnabled (ns3::LOG_FUNCTION))          \
   32.11 -        {                                               \
   32.12 -          NS_LOG_APPEND_TIME_PREFIX;                    \
   32.13 -          NS_LOG_APPEND_CONTEXT;                        \
   32.14 -          std::clog << g_log.Name () << ":"             \
   32.15 -                    << __FUNCTION__ << "(";             \
   32.16 -          ParameterLogger (std::clog)  << parameters;   \
   32.17 -          std::clog << ")" << std::endl;                \
   32.18 -        }                                               \
   32.19 -    }                                                   \
   32.20 +#define NS_LOG_FUNCTION(parameters)                             \
   32.21 +  do                                                            \
   32.22 +    {                                                           \
   32.23 +      if (g_log.IsEnabled (ns3::LOG_FUNCTION))                  \
   32.24 +        {                                                       \
   32.25 +          NS_LOG_APPEND_TIME_PREFIX;                            \
   32.26 +          NS_LOG_APPEND_CONTEXT;                                \
   32.27 +          std::clog << g_log.Name () << ":"                     \
   32.28 +                    << __FUNCTION__ << "(";                     \
   32.29 +          ns3::ParameterLogger (std::clog)  << parameters;      \
   32.30 +          std::clog << ")" << std::endl;                        \
   32.31 +        }                                                       \
   32.32 +    }                                                           \
   32.33    while (false)
   32.34  
   32.35  
    33.1 --- a/src/core/type-id.h	Tue Aug 12 14:54:46 2008 +0100
    33.2 +++ b/src/core/type-id.h	Sat Aug 23 21:52:44 2008 +0100
    33.3 @@ -96,7 +96,7 @@
    33.4     * No two instances can share the same name. The name is expected to be
    33.5     * the full c++ typename of associated c++ object.
    33.6     */
    33.7 -  TypeId (const char * name);
    33.8 +  explicit TypeId (const char * name);
    33.9  
   33.10    /**
   33.11     * \returns the parent of this TypeId
    34.1 --- a/src/devices/bridge/bridge-net-device.cc	Tue Aug 12 14:54:46 2008 +0100
    34.2 +++ b/src/devices/bridge/bridge-net-device.cc	Sat Aug 23 21:52:44 2008 +0100
    34.3 @@ -27,6 +27,8 @@
    34.4  
    34.5  namespace ns3 {
    34.6  
    34.7 +NS_OBJECT_ENSURE_REGISTERED (BridgeNetDevice);
    34.8 +
    34.9  
   34.10  TypeId
   34.11  BridgeNetDevice::GetTypeId (void)
    35.1 --- a/src/devices/wifi/adhoc-wifi-mac.cc	Tue Aug 12 14:54:46 2008 +0100
    35.2 +++ b/src/devices/wifi/adhoc-wifi-mac.cc	Sat Aug 23 21:52:44 2008 +0100
    35.3 @@ -168,13 +168,13 @@
    35.4  }
    35.5  
    35.6  void 
    35.7 -AdhocWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to)
    35.8 +AdhocWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from)
    35.9  {
   35.10 -  NS_LOG_DEBUG ("enqueue size="<<packet->GetSize ()<<", to="<<to);
   35.11 +  NS_LOG_FUNCTION (packet->GetSize () << to << from);
   35.12    WifiMacHeader hdr;
   35.13    hdr.SetType (WIFI_MAC_DATA);
   35.14    hdr.SetAddr1 (to);
   35.15 -  hdr.SetAddr2 (GetAddress ());
   35.16 +  hdr.SetAddr2 (from);
   35.17    hdr.SetAddr3 (GetBssid ());
   35.18    hdr.SetDsNotFrom ();
   35.19    hdr.SetDsNotTo ();
    36.1 --- a/src/devices/wifi/adhoc-wifi-mac.h	Tue Aug 12 14:54:46 2008 +0100
    36.2 +++ b/src/devices/wifi/adhoc-wifi-mac.h	Sat Aug 23 21:52:44 2008 +0100
    36.3 @@ -61,7 +61,7 @@
    36.4    virtual Time GetEifsNoDifs (void) const;
    36.5    virtual void SetWifiPhy (Ptr<WifiPhy> phy);
    36.6    virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
    36.7 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to);
    36.8 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
    36.9    virtual void SetForwardUpCallback (Callback<void,Ptr<Packet>, const Mac48Address &> upCallback);
   36.10    virtual void SetLinkUpCallback (Callback<void> linkUp);
   36.11    virtual void SetLinkDownCallback (Callback<void> linkDown);
   36.12 @@ -77,6 +77,7 @@
   36.13    virtual void DoDispose (void);
   36.14    /* invoked by the MacLows. */
   36.15    void ForwardUp (Ptr<Packet> packet, WifiMacHeader const*hdr);
   36.16 +  AdhocWifiMac (const AdhocWifiMac & ctor_arg);
   36.17  
   36.18    Ptr<DcaTxop> m_dca;
   36.19    Callback<void,Ptr<Packet>,const Mac48Address &> m_upCallback;
    37.1 --- a/src/devices/wifi/nqap-wifi-mac.cc	Tue Aug 12 14:54:46 2008 +0100
    37.2 +++ b/src/devices/wifi/nqap-wifi-mac.cc	Sat Aug 23 21:52:44 2008 +0100
    37.3 @@ -262,10 +262,10 @@
    37.4    m_dca->Queue (packet, hdr);  
    37.5  }
    37.6  void 
    37.7 -NqapWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to)
    37.8 +NqapWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from)
    37.9  {
   37.10 -  NS_LOG_FUNCTION (this << packet << to);
   37.11 -  ForwardDown (packet, GetAddress (), to);
   37.12 +  NS_LOG_FUNCTION (this << packet << to << from);
   37.13 +  ForwardDown (packet, from, to);
   37.14  }
   37.15  SupportedRates
   37.16  NqapWifiMac::GetSupportedRates (void) const
    38.1 --- a/src/devices/wifi/nqap-wifi-mac.h	Tue Aug 12 14:54:46 2008 +0100
    38.2 +++ b/src/devices/wifi/nqap-wifi-mac.h	Sat Aug 23 21:52:44 2008 +0100
    38.3 @@ -67,7 +67,7 @@
    38.4    virtual Time GetEifsNoDifs (void) const;
    38.5    virtual void SetWifiPhy (Ptr<WifiPhy> phy);
    38.6    virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
    38.7 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to);
    38.8 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
    38.9    virtual void SetForwardUpCallback (Callback<void,Ptr<Packet>, const Mac48Address &> upCallback);
   38.10    virtual void SetLinkUpCallback (Callback<void> linkUp);
   38.11    virtual void SetLinkDownCallback (Callback<void> linkDown);
   38.12 @@ -104,6 +104,7 @@
   38.13    void SetBeaconGeneration (bool enable);
   38.14    bool GetBeaconGeneration (void) const;
   38.15    virtual void DoDispose (void);
   38.16 +  NqapWifiMac (const NqapWifiMac & ctor_arg);
   38.17  
   38.18    Ptr<DcaTxop> m_dca;
   38.19    Ptr<DcaTxop> m_beaconDca;
    39.1 --- a/src/devices/wifi/nqsta-wifi-mac.cc	Tue Aug 12 14:54:46 2008 +0100
    39.2 +++ b/src/devices/wifi/nqsta-wifi-mac.cc	Sat Aug 23 21:52:44 2008 +0100
    39.3 @@ -409,7 +409,7 @@
    39.4  }
    39.5  
    39.6  void 
    39.7 -NqstaWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to)
    39.8 +NqstaWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from)
    39.9  {
   39.10    NS_LOG_FUNCTION (this << packet << to);
   39.11    if (!IsAssociated ()) 
   39.12 @@ -421,7 +421,7 @@
   39.13    WifiMacHeader hdr;
   39.14    hdr.SetTypeData ();
   39.15    hdr.SetAddr1 (GetBssid ());
   39.16 -  hdr.SetAddr2 (GetAddress ());
   39.17 +  hdr.SetAddr2 (from);
   39.18    hdr.SetAddr3 (to);
   39.19    hdr.SetDsNotFrom ();
   39.20    hdr.SetDsTo ();
    40.1 --- a/src/devices/wifi/nqsta-wifi-mac.h	Tue Aug 12 14:54:46 2008 +0100
    40.2 +++ b/src/devices/wifi/nqsta-wifi-mac.h	Sat Aug 23 21:52:44 2008 +0100
    40.3 @@ -67,7 +67,7 @@
    40.4    virtual Time GetEifsNoDifs (void) const;
    40.5    virtual void SetWifiPhy (Ptr<WifiPhy> phy);
    40.6    virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
    40.7 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to);
    40.8 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
    40.9    virtual void SetForwardUpCallback (Callback<void,Ptr<Packet>, const Mac48Address &> upCallback);
   40.10    virtual void SetLinkUpCallback (Callback<void> linkUp);
   40.11    virtual void SetLinkDownCallback (Callback<void> linkDown);
   40.12 @@ -120,6 +120,7 @@
   40.13    void RestartBeaconWatchdog (Time delay);
   40.14    SupportedRates GetSupportedRates (void) const;
   40.15    virtual void DoDispose (void);
   40.16 +  NqstaWifiMac (const NqstaWifiMac & ctor_arg);
   40.17  
   40.18    enum {
   40.19      ASSOCIATED,
    41.1 --- a/src/devices/wifi/wifi-mac.h	Tue Aug 12 14:54:46 2008 +0100
    41.2 +++ b/src/devices/wifi/wifi-mac.h	Sat Aug 23 21:52:44 2008 +0100
    41.3 @@ -148,7 +148,7 @@
    41.4     * dequeued as soon as the DCF function determines that
    41.5     * access it granted to this MAC.
    41.6     */
    41.7 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to) = 0;
    41.8 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from) = 0;
    41.9    /**
   41.10     * \param phy the physical layer attached to this MAC.
   41.11     */
    42.1 --- a/src/devices/wifi/wifi-net-device.cc	Tue Aug 12 14:54:46 2008 +0100
    42.2 +++ b/src/devices/wifi/wifi-net-device.cc	Sat Aug 23 21:52:44 2008 +0100
    42.3 @@ -280,7 +280,7 @@
    42.4  
    42.5    m_txLogger (packet, realTo);
    42.6  
    42.7 -  m_mac->Enqueue (packet, realTo);
    42.8 +  m_mac->Enqueue (packet, realTo, m_mac->GetAddress ());
    42.9    return true;
   42.10  }
   42.11  Ptr<Node> 
   42.12 @@ -335,8 +335,21 @@
   42.13  bool
   42.14  WifiNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber)
   42.15  {
   42.16 -  NS_FATAL_ERROR ("TODO");
   42.17 -  return false;
   42.18 +  NS_ASSERT (Mac48Address::IsMatchingType (dest));
   42.19 +  NS_ASSERT (Mac48Address::IsMatchingType (source));
   42.20 +
   42.21 +  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
   42.22 +  Mac48Address realFrom = Mac48Address::ConvertFrom (source);
   42.23 +
   42.24 +  LlcSnapHeader llc;
   42.25 +  llc.SetType (protocolNumber);
   42.26 +  packet->AddHeader (llc);
   42.27 +
   42.28 +  m_txLogger (packet, realTo);
   42.29 +
   42.30 +  m_mac->Enqueue (packet, realTo, realFrom);
   42.31 +
   42.32 +  return true;
   42.33  }
   42.34  
   42.35  void
    43.1 --- a/src/devices/wifi/wifi-phy.h	Tue Aug 12 14:54:46 2008 +0100
    43.2 +++ b/src/devices/wifi/wifi-phy.h	Sat Aug 23 21:52:44 2008 +0100
    43.3 @@ -335,6 +335,8 @@
    43.4                         uint32_t m, uint32_t dfree,
    43.5                         uint32_t adFree, uint32_t adFreePlusOne) const;
    43.6    double GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const;
    43.7 +  WifiPhy (const WifiPhy & ctor_arg);
    43.8 +
    43.9  private:
   43.10    uint64_t m_txPrepareDelayUs;
   43.11    uint64_t m_plcpLongPreambleDelayUs;
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/src/helper/bridge-helper.cc	Sat Aug 23 21:52:44 2008 +0100
    44.3 @@ -0,0 +1,34 @@
    44.4 +#include "bridge-helper.h"
    44.5 +
    44.6 +#include "ns3/bridge-net-device.h"
    44.7 +#include "ns3/node.h"
    44.8 +
    44.9 +namespace ns3 {
   44.10 +
   44.11 +BridgeHelper::BridgeHelper ()
   44.12 +{
   44.13 +  m_deviceFactory.SetTypeId ("ns3::BridgeNetDevice");
   44.14 +}
   44.15 +
   44.16 +void 
   44.17 +BridgeHelper::SetDeviceAttribute (std::string n1, const AttributeValue &v1)
   44.18 +{
   44.19 +  m_deviceFactory.Set (n1, v1);
   44.20 +}
   44.21 +
   44.22 +NetDeviceContainer
   44.23 +BridgeHelper::Install (Ptr<Node> node, NetDeviceContainer c)
   44.24 +{
   44.25 +  NetDeviceContainer devs;
   44.26 +  Ptr<BridgeNetDevice> dev = m_deviceFactory.Create<BridgeNetDevice> ();
   44.27 +  devs.Add (dev);
   44.28 +  node->AddDevice (dev);
   44.29 +
   44.30 +  for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i)
   44.31 +    {
   44.32 +      dev->AddBridgePort (*i);
   44.33 +    }
   44.34 +  return devs;
   44.35 +}
   44.36 +
   44.37 +} // namespace ns3
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/src/helper/bridge-helper.h	Sat Aug 23 21:52:44 2008 +0100
    45.3 @@ -0,0 +1,26 @@
    45.4 +#ifndef BRIDGE_HELPER_H
    45.5 +#define BRIDGE_HELPER_H
    45.6 +
    45.7 +#include "net-device-container.h"
    45.8 +#include "ns3/object-factory.h"
    45.9 +#include <string>
   45.10 +
   45.11 +namespace ns3 {
   45.12 +
   45.13 +class Node;
   45.14 +class AttributeValue;
   45.15 +
   45.16 +class BridgeHelper
   45.17 +{
   45.18 +public:
   45.19 +  BridgeHelper ();
   45.20 +  void SetDeviceAttribute (std::string n1, const AttributeValue &v1);
   45.21 +  NetDeviceContainer Install (Ptr<Node> node, NetDeviceContainer c);
   45.22 +private:
   45.23 +  ObjectFactory m_deviceFactory;
   45.24 +};
   45.25 +
   45.26 +} // namespace ns3
   45.27 +
   45.28 +
   45.29 +#endif /* BRIDGE_HELPER_H */
    46.1 --- a/src/helper/wscript	Tue Aug 12 14:54:46 2008 +0100
    46.2 +++ b/src/helper/wscript	Sat Aug 23 21:52:44 2008 +0100
    46.3 @@ -20,6 +20,7 @@
    46.4          'packet-socket-helper.cc',
    46.5          'ipv4-interface-container.cc',
    46.6          'udp-echo-helper.cc',
    46.7 +        'bridge-helper.cc',
    46.8          ]
    46.9  
   46.10      headers = bld.create_obj('ns3header')
   46.11 @@ -42,4 +43,5 @@
   46.12          'packet-socket-helper.h',
   46.13          'ipv4-interface-container.h',
   46.14          'udp-echo-helper.h',
   46.15 +        'bridge-helper.h',
   46.16          ]
    47.1 --- a/src/internet-stack/tcp-socket-impl.cc	Tue Aug 12 14:54:46 2008 +0100
    47.2 +++ b/src/internet-stack/tcp-socket-impl.cc	Sat Aug 23 21:52:44 2008 +0100
    47.3 @@ -872,11 +872,11 @@
    47.4      case SERV_NOTIFY:
    47.5        NS_LOG_LOGIC ("TcpSocketImpl " << this <<" Action SERV_NOTIFY");
    47.6        NS_LOG_LOGIC ("TcpSocketImpl " << this << " Connected!");
    47.7 -      NotifyNewConnectionCreated (this, fromAddress);
    47.8        m_connected = true; // ! This is bogus; fix when we clone the tcp
    47.9        m_endPoint->SetPeer (m_remoteAddress, m_remotePort);
   47.10        //treat the connection orientation final ack as a newack
   47.11        CommonNewAck (tcpHeader.GetAckNumber (), true);
   47.12 +      NotifyNewConnectionCreated (this, fromAddress);
   47.13        break;
   47.14      default:
   47.15        break;
   47.16 @@ -1547,3 +1547,260 @@
   47.17  }
   47.18  
   47.19  }//namespace ns3
   47.20 +
   47.21 +#ifdef RUN_SELF_TESTS
   47.22 +
   47.23 +#include "ns3/test.h"
   47.24 +#include "ns3/socket-factory.h"
   47.25 +#include "ns3/tcp-socket-factory.h"
   47.26 +#include "ns3/simulator.h"
   47.27 +#include "ns3/simple-channel.h"
   47.28 +#include "ns3/simple-net-device.h"
   47.29 +#include "ns3/drop-tail-queue.h"
   47.30 +#include "internet-stack.h"
   47.31 +#include <string>
   47.32 +
   47.33 +namespace ns3 {
   47.34 +	
   47.35 +class TcpSocketImplTest: public Test
   47.36 +{
   47.37 +  public:
   47.38 +  TcpSocketImplTest ();
   47.39 +  virtual bool RunTests (void);
   47.40 +  private:
   47.41 +  void Test1 (void); //send string "Hello world" server->client
   47.42 +  void Test2 (uint32_t payloadSize);
   47.43 +  Ptr<Node> CreateInternetNode ();
   47.44 +  Ptr<SimpleNetDevice> AddSimpleNetDevice (Ptr<Node>,const char*,const char*);
   47.45 +  
   47.46 +  void Test1_HandleConnectionCreated (Ptr<Socket>, const Address &);
   47.47 +  void Test1_HandleRecv (Ptr<Socket> sock);
   47.48 +
   47.49 +  void Test2_HandleConnectionCreated (Ptr<Socket>, const Address &);
   47.50 +  void Test2_HandleRecv (Ptr<Socket> sock);
   47.51 +  uint32_t test2_payloadSize;
   47.52 +
   47.53 +  void Reset ();
   47.54 +  
   47.55 +  Ptr<Node> node0;
   47.56 +  Ptr<Node> node1;
   47.57 +  Ptr<SimpleNetDevice> dev0;
   47.58 +  Ptr<SimpleNetDevice> dev1;
   47.59 +  Ptr<SimpleChannel> channel;
   47.60 +  Ptr<Socket> listeningSock;
   47.61 +  Ptr<Socket> sock0;
   47.62 +  Ptr<Socket> sock1;
   47.63 +  uint32_t rxBytes0;
   47.64 +  uint32_t rxBytes1;
   47.65 +  
   47.66 +  uint8_t* rxPayload;
   47.67 +  
   47.68 +  bool result;
   47.69 +};
   47.70 +
   47.71 +TcpSocketImplTest::TcpSocketImplTest ()
   47.72 +  : Test ("TcpSocketImpl"), 
   47.73 +    rxBytes0 (0),
   47.74 +    rxBytes1 (0),
   47.75 +    rxPayload (0),
   47.76 +    result (true)
   47.77 +{
   47.78 +}
   47.79 +
   47.80 +bool
   47.81 +TcpSocketImplTest::RunTests (void)
   47.82 +{
   47.83 +  Test1();
   47.84 +  Test2(600);
   47.85 +  return result;
   47.86 +}
   47.87 +
   47.88 +void
   47.89 +TcpSocketImplTest::Test1 ()
   47.90 +{
   47.91 +  const char* netmask = "255.255.255.0";
   47.92 +  const char* ipaddr0 = "192.168.1.1";
   47.93 +  const char* ipaddr1 = "192.168.1.2";
   47.94 +  node0 = CreateInternetNode ();
   47.95 +  node1 = CreateInternetNode ();
   47.96 +  dev0 = AddSimpleNetDevice (node0, ipaddr0, netmask);
   47.97 +  dev1 = AddSimpleNetDevice (node1, ipaddr1, netmask);
   47.98 +  
   47.99 +  channel = CreateObject<SimpleChannel> ();
  47.100 +  dev0->SetChannel (channel);
  47.101 +  dev1->SetChannel (channel);
  47.102 +  
  47.103 +  Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory> ();
  47.104 +  Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory> ();
  47.105 +  
  47.106 +  listeningSock = sockFactory0->CreateSocket();
  47.107 +  sock1 = sockFactory1->CreateSocket();
  47.108 +  
  47.109 +  uint16_t port = 50000;
  47.110 +  InetSocketAddress serverlocaladdr (Ipv4Address::GetAny(), port);
  47.111 +  InetSocketAddress serverremoteaddr (Ipv4Address(ipaddr0), port);
  47.112 +  
  47.113 +  listeningSock->Bind(serverlocaladdr);
  47.114 +  listeningSock->Listen (0);
  47.115 +  listeningSock->SetAcceptCallback 
  47.116 +    (MakeNullCallback<bool, Ptr< Socket >, const Address &> (),
  47.117 +     MakeCallback(&TcpSocketImplTest::Test1_HandleConnectionCreated,this));
  47.118 +  
  47.119 +  sock1->Connect(serverremoteaddr);
  47.120 +  sock1->SetRecvCallback (MakeCallback(&TcpSocketImplTest::Test1_HandleRecv, this));
  47.121 +  
  47.122 +  Simulator::Run ();
  47.123 +  Simulator::Destroy ();
  47.124 +  
  47.125 +  result = result && (rxBytes1 == 13);
  47.126 +  result = result && (strcmp((const char*) rxPayload,"Hello World!") == 0);
  47.127 +  
  47.128 +  Reset ();
  47.129 +}
  47.130 +
  47.131 +void
  47.132 +TcpSocketImplTest::Test2 (uint32_t payloadSize)
  47.133 +{
  47.134 +  test2_payloadSize = payloadSize;
  47.135 +  const char* netmask = "255.255.255.0";
  47.136 +  const char* ipaddr0 = "192.168.1.1";
  47.137 +  const char* ipaddr1 = "192.168.1.2";
  47.138 +  node0 = CreateInternetNode ();
  47.139 +  node1 = CreateInternetNode ();
  47.140 +  dev0 = AddSimpleNetDevice (node0, ipaddr0, netmask);
  47.141 +  dev1 = AddSimpleNetDevice (node1, ipaddr1, netmask);
  47.142 +  
  47.143 +  channel = CreateObject<SimpleChannel> ();
  47.144 +  dev0->SetChannel (channel);
  47.145 +  dev1->SetChannel (channel);
  47.146 +  
  47.147 +  Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory> ();
  47.148 +  Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory> ();
  47.149 +  
  47.150 +  listeningSock = sockFactory0->CreateSocket();
  47.151 +  sock1 = sockFactory1->CreateSocket();
  47.152 +  
  47.153 +  uint16_t port = 50000;
  47.154 +  InetSocketAddress serverlocaladdr (Ipv4Address::GetAny(), port);
  47.155 +  InetSocketAddress serverremoteaddr (Ipv4Address(ipaddr0), port);
  47.156 +  
  47.157 +  listeningSock->Bind(serverlocaladdr);
  47.158 +  listeningSock->Listen (0);
  47.159 +  listeningSock->SetAcceptCallback 
  47.160 +    (MakeNullCallback<bool, Ptr< Socket >, const Address &> (),
  47.161 +     MakeCallback(&TcpSocketImplTest::Test2_HandleConnectionCreated,this));
  47.162 +  
  47.163 +  sock1->Connect(serverremoteaddr);
  47.164 +  sock1->SetRecvCallback (MakeCallback(&TcpSocketImplTest::Test2_HandleRecv, this));
  47.165 +  
  47.166 +  Simulator::Run ();
  47.167 +  Simulator::Destroy ();
  47.168 +  
  47.169 +  result = result && (rxBytes1 == test2_payloadSize);
  47.170 +  
  47.171 +  Reset ();
  47.172 +}
  47.173 +
  47.174 +Ptr<Node>
  47.175 +TcpSocketImplTest::CreateInternetNode ()
  47.176 +{
  47.177 +  Ptr<Node> node = CreateObject<Node> ();
  47.178 +  AddInternetStack (node);
  47.179 +  return node;
  47.180 +}
  47.181 +
  47.182 +Ptr<SimpleNetDevice>
  47.183 +TcpSocketImplTest::AddSimpleNetDevice (Ptr<Node> node, const char* ipaddr, const char* netmask)
  47.184 +{
  47.185 +  Ptr<SimpleNetDevice> dev = CreateObject<SimpleNetDevice> ();
  47.186 +  dev->SetAddress (Mac48Address::Allocate ());
  47.187 +  node->AddDevice (dev);
  47.188 +  Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
  47.189 +  uint32_t ndid = ipv4->AddInterface (dev);
  47.190 +  ipv4->SetAddress (ndid, Ipv4Address (ipaddr));
  47.191 +  ipv4->SetNetworkMask (ndid, Ipv4Mask (netmask));
  47.192 +  ipv4->SetUp (ndid);
  47.193 +  return dev;
  47.194 +}
  47.195 +
  47.196 +void
  47.197 +TcpSocketImplTest::Test1_HandleConnectionCreated (Ptr<Socket> s, const Address & addr)
  47.198 +{
  47.199 +  NS_ASSERT(s != listeningSock);
  47.200 +  NS_ASSERT(sock0 == 0);
  47.201 +  sock0 = s;
  47.202 +  const uint8_t* hello = (uint8_t*)"Hello World!";
  47.203 +  Ptr<Packet> p = Create<Packet> (hello, 13);
  47.204 +  sock0->Send(p);
  47.205 +  
  47.206 +  sock0->SetRecvCallback (MakeCallback(&TcpSocketImplTest::Test1_HandleRecv, this));
  47.207 +}
  47.208 +
  47.209 +void
  47.210 +TcpSocketImplTest::Test1_HandleRecv (Ptr<Socket> sock)
  47.211 +{
  47.212 +  NS_ASSERT (sock == sock0 || sock == sock1);
  47.213 +  Ptr<Packet> p = sock->Recv();
  47.214 +  uint32_t sz = p->GetSize();
  47.215 +  if (sock == sock1)
  47.216 +  {
  47.217 +    rxBytes1 += sz;
  47.218 +    rxPayload = new uint8_t[sz];
  47.219 +    memcpy (rxPayload, p->PeekData(), sz);
  47.220 +  }
  47.221 +  else
  47.222 +  {
  47.223 +    NS_FATAL_ERROR ("Recv from unknown socket "<<sock);
  47.224 +  }
  47.225 +}
  47.226 +
  47.227 +void
  47.228 +TcpSocketImplTest::Test2_HandleConnectionCreated (Ptr<Socket> s, const Address & addr)
  47.229 +{
  47.230 +  NS_ASSERT(s != listeningSock);
  47.231 +  NS_ASSERT(sock0 == 0);
  47.232 +  sock0 = s;
  47.233 +  Ptr<Packet> p = Create<Packet> (test2_payloadSize);
  47.234 +  sock0->Send(p);
  47.235 +  
  47.236 +  sock0->SetRecvCallback (MakeCallback(&TcpSocketImplTest::Test2_HandleRecv, this));
  47.237 +}
  47.238 +
  47.239 +void
  47.240 +TcpSocketImplTest::Test2_HandleRecv (Ptr<Socket> sock)
  47.241 +{
  47.242 +  NS_ASSERT (sock == sock0 || sock == sock1);
  47.243 +  Ptr<Packet> p = sock->Recv();
  47.244 +  uint32_t sz = p->GetSize();
  47.245 +  if (sock == sock1)
  47.246 +  {
  47.247 +    rxBytes1 += sz;
  47.248 +  }
  47.249 +  else
  47.250 +  {
  47.251 +    NS_FATAL_ERROR ("Recv from unknown socket "<<sock);
  47.252 +  }
  47.253 +}
  47.254 +
  47.255 +void
  47.256 +TcpSocketImplTest::Reset ()
  47.257 +{
  47.258 +  node0 = 0;
  47.259 +  node1 = 0;
  47.260 +  dev0 = 0;
  47.261 +  dev1 = 0;
  47.262 +  channel = 0;
  47.263 +  listeningSock = 0;
  47.264 +  sock0 = 0;
  47.265 +  sock1 = 0;
  47.266 +  rxBytes0 = 0;
  47.267 +  rxBytes1 = 0;
  47.268 +  delete[] rxPayload;
  47.269 +  rxPayload = 0;
  47.270 +}
  47.271 +
  47.272 +static TcpSocketImplTest gTcpSocketImplTest;
  47.273 +
  47.274 +}//namespace ns3
  47.275 +
  47.276 +#endif /* RUN_SELF_TESTS */
    48.1 --- a/src/node/drop-tail-queue.cc	Tue Aug 12 14:54:46 2008 +0100
    48.2 +++ b/src/node/drop-tail-queue.cc	Sat Aug 23 21:52:44 2008 +0100
    48.3 @@ -87,7 +87,7 @@
    48.4    return p;
    48.5  }
    48.6  
    48.7 -Ptr<Packet>
    48.8 +Ptr<const Packet>
    48.9  DropTailQueue::DoPeek (void) const
   48.10  {
   48.11    NS_LOG_FUNCTION (this);
    49.1 --- a/src/node/drop-tail-queue.h	Tue Aug 12 14:54:46 2008 +0100
    49.2 +++ b/src/node/drop-tail-queue.h	Sat Aug 23 21:52:44 2008 +0100
    49.3 @@ -47,7 +47,7 @@
    49.4  private:
    49.5    virtual bool DoEnqueue (Ptr<Packet> p);
    49.6    virtual Ptr<Packet> DoDequeue (void);
    49.7 -  virtual Ptr<Packet> DoPeek (void) const;
    49.8 +  virtual Ptr<const Packet> DoPeek (void) const;
    49.9  
   49.10  private:
   49.11    std::queue<Ptr<Packet> > m_packets;
    50.1 --- a/src/node/node.cc	Tue Aug 12 14:54:46 2008 +0100
    50.2 +++ b/src/node/node.cc	Sat Aug 23 21:52:44 2008 +0100
    50.3 @@ -136,18 +136,6 @@
    50.4  {
    50.5    return m_applications.size ();
    50.6  }
    50.7 -Ptr<Application>
    50.8 -Node::GetFirstApplication(TypeId tid)
    50.9 -{
   50.10 -  for (std::vector<Ptr<Application> >::iterator i = m_applications.begin ();
   50.11 -       i != m_applications.end (); i++) {
   50.12 -    Ptr<Application> app = *i;
   50.13 -    if (app->GetInstanceTypeId() == tid)
   50.14 -      return app;
   50.15 -  }
   50.16 -
   50.17 -  return 0;
   50.18 -}
   50.19  
   50.20  void 
   50.21  Node::DoDispose()
    51.1 --- a/src/node/node.h	Tue Aug 12 14:54:46 2008 +0100
    51.2 +++ b/src/node/node.h	Sat Aug 23 21:52:44 2008 +0100
    51.3 @@ -122,12 +122,6 @@
    51.4     *          within this Node.
    51.5     */
    51.6    Ptr<Application> GetApplication (uint32_t index) const;
    51.7 -  /**
    51.8 -   * \param index
    51.9 -   * \returns the application associated to this requested index
   51.10 -   *          within this Node.
   51.11 -   */
   51.12 -  Ptr<Application> GetFirstApplication (TypeId tid);
   51.13  
   51.14    /**
   51.15     * \returns the number of applications associated to this Node.
    52.1 --- a/src/node/queue.cc	Tue Aug 12 14:54:46 2008 +0100
    52.2 +++ b/src/node/queue.cc	Sat Aug 23 21:52:44 2008 +0100
    52.3 @@ -107,7 +107,7 @@
    52.4      }
    52.5  }
    52.6  
    52.7 -Ptr<Packet>
    52.8 +Ptr<const Packet>
    52.9  Queue::Peek (void) const
   52.10  {
   52.11    NS_LOG_FUNCTION (this);
    53.1 --- a/src/node/queue.h	Tue Aug 12 14:54:46 2008 +0100
    53.2 +++ b/src/node/queue.h	Sat Aug 23 21:52:44 2008 +0100
    53.3 @@ -68,7 +68,7 @@
    53.4     * Get a copy of the item at the front of the queue without removing it
    53.5     * \return 0 if the operation was not successful; the packet otherwise.
    53.6     */
    53.7 -  Ptr<Packet> Peek (void) const;
    53.8 +  Ptr<const Packet> Peek (void) const;
    53.9  
   53.10    /**
   53.11     * Flush the queue.
   53.12 @@ -142,7 +142,7 @@
   53.13  
   53.14    virtual bool DoEnqueue (Ptr<Packet> p) = 0;
   53.15    virtual Ptr<Packet> DoDequeue (void) = 0;
   53.16 -  virtual Ptr<Packet> DoPeek (void) const = 0;
   53.17 +  virtual Ptr<const Packet> DoPeek (void) const = 0;
   53.18  
   53.19  protected:
   53.20    // called by subclasses to notify parent of packet drops.
    54.1 --- a/src/node/simple-channel.cc	Tue Aug 12 14:54:46 2008 +0100
    54.2 +++ b/src/node/simple-channel.cc	Sat Aug 23 21:52:44 2008 +0100
    54.3 @@ -19,6 +19,7 @@
    54.4   */
    54.5  #include "simple-channel.h"
    54.6  #include "simple-net-device.h"
    54.7 +#include "ns3/simulator.h"
    54.8  #include "ns3/packet.h"
    54.9  
   54.10  namespace ns3 {
   54.11 @@ -48,7 +49,7 @@
   54.12  	{
   54.13  	  continue;
   54.14  	}
   54.15 -      tmp->Receive (p->Copy (), protocol, to, from);
   54.16 +      Simulator::ScheduleNow (&SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from);
   54.17      }
   54.18  }
   54.19  
    55.1 --- a/src/node/socket.h	Tue Aug 12 14:54:46 2008 +0100
    55.2 +++ b/src/node/socket.h	Sat Aug 23 21:52:44 2008 +0100
    55.3 @@ -147,8 +147,8 @@
    55.4     *        user should check this return value to confirm that the
    55.5     *        callback is supported.
    55.6     */
    55.7 -  virtual bool SetDataSentCallback (Callback<void, Ptr<Socket>, 
    55.8 -                                    uint32_t> dataSent);
    55.9 +  bool SetDataSentCallback (Callback<void, Ptr<Socket>, 
   55.10 +                            uint32_t> dataSent);
   55.11    /**
   55.12     * \brief Notify application when space in transmit buffer is added
   55.13     *