Nearly all flow monitoring code added; not debugged yet, though.
1.1 --- a/bindings/python/ns3_module_bridge.py Thu Apr 23 15:48:35 2009 +0100
1.2 +++ b/bindings/python/ns3_module_bridge.py Tue Apr 28 17:39:32 2009 +0100
1.3 @@ -8,10 +8,10 @@
1.4 ## bridge-net-device.h: ns3::BridgeNetDevice [class]
1.5 module.add_class('BridgeNetDevice', parent=root_module['ns3::NetDevice'])
1.6
1.7 - ## Register a nested module for the namespace internal
1.8 + ## Register a nested module for the namespace Config
1.9
1.10 - nested_module = module.add_cpp_namespace('internal')
1.11 - register_types_ns3_internal(nested_module)
1.12 + nested_module = module.add_cpp_namespace('Config')
1.13 + register_types_ns3_Config(nested_module)
1.14
1.15
1.16 ## Register a nested module for the namespace TimeStepPrecision
1.17 @@ -20,10 +20,10 @@
1.18 register_types_ns3_TimeStepPrecision(nested_module)
1.19
1.20
1.21 - ## Register a nested module for the namespace Config
1.22 + ## Register a nested module for the namespace internal
1.23
1.24 - nested_module = module.add_cpp_namespace('Config')
1.25 - register_types_ns3_Config(nested_module)
1.26 + nested_module = module.add_cpp_namespace('internal')
1.27 + register_types_ns3_internal(nested_module)
1.28
1.29
1.30 ## Register a nested module for the namespace olsr
1.31 @@ -32,7 +32,7 @@
1.32 register_types_ns3_olsr(nested_module)
1.33
1.34
1.35 -def register_types_ns3_internal(module):
1.36 +def register_types_ns3_Config(module):
1.37 root_module = module.get_root()
1.38
1.39
1.40 @@ -40,7 +40,7 @@
1.41 root_module = module.get_root()
1.42
1.43
1.44 -def register_types_ns3_Config(module):
1.45 +def register_types_ns3_internal(module):
1.46 root_module = module.get_root()
1.47
1.48
1.49 @@ -247,21 +247,21 @@
1.50
1.51 def register_functions(root_module):
1.52 module = root_module
1.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
1.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
1.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
1.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
1.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
1.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
1.59 return
1.60
1.61 +def register_functions_ns3_Config(module, root_module):
1.62 + return
1.63 +
1.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
1.65 + return
1.66 +
1.67 def register_functions_ns3_internal(module, root_module):
1.68 return
1.69
1.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
1.71 - return
1.72 -
1.73 -def register_functions_ns3_Config(module, root_module):
1.74 - return
1.75 -
1.76 def register_functions_ns3_olsr(module, root_module):
1.77 return
1.78
2.1 --- a/bindings/python/ns3_module_common.py Thu Apr 23 15:48:35 2009 +0100
2.2 +++ b/bindings/python/ns3_module_common.py Tue Apr 28 17:39:32 2009 +0100
2.3 @@ -54,10 +54,10 @@
2.4 ## error-model.h: ns3::RateErrorModel [class]
2.5 module.add_class('RateErrorModel', parent=root_module['ns3::ErrorModel'])
2.6
2.7 - ## Register a nested module for the namespace internal
2.8 + ## Register a nested module for the namespace Config
2.9
2.10 - nested_module = module.add_cpp_namespace('internal')
2.11 - register_types_ns3_internal(nested_module)
2.12 + nested_module = module.add_cpp_namespace('Config')
2.13 + register_types_ns3_Config(nested_module)
2.14
2.15
2.16 ## Register a nested module for the namespace TimeStepPrecision
2.17 @@ -66,10 +66,10 @@
2.18 register_types_ns3_TimeStepPrecision(nested_module)
2.19
2.20
2.21 - ## Register a nested module for the namespace Config
2.22 + ## Register a nested module for the namespace internal
2.23
2.24 - nested_module = module.add_cpp_namespace('Config')
2.25 - register_types_ns3_Config(nested_module)
2.26 + nested_module = module.add_cpp_namespace('internal')
2.27 + register_types_ns3_internal(nested_module)
2.28
2.29
2.30 ## Register a nested module for the namespace olsr
2.31 @@ -78,7 +78,7 @@
2.32 register_types_ns3_olsr(nested_module)
2.33
2.34
2.35 -def register_types_ns3_internal(module):
2.36 +def register_types_ns3_Config(module):
2.37 root_module = module.get_root()
2.38
2.39
2.40 @@ -86,7 +86,7 @@
2.41 root_module = module.get_root()
2.42
2.43
2.44 -def register_types_ns3_Config(module):
2.45 +def register_types_ns3_internal(module):
2.46 root_module = module.get_root()
2.47
2.48
2.49 @@ -1113,21 +1113,21 @@
2.50 module.add_function('MakeDataRateChecker',
2.51 'ns3::Ptr< ns3::AttributeChecker const >',
2.52 [])
2.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
2.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
2.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
2.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
2.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
2.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
2.59 return
2.60
2.61 +def register_functions_ns3_Config(module, root_module):
2.62 + return
2.63 +
2.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
2.65 + return
2.66 +
2.67 def register_functions_ns3_internal(module, root_module):
2.68 return
2.69
2.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
2.71 - return
2.72 -
2.73 -def register_functions_ns3_Config(module, root_module):
2.74 - return
2.75 -
2.76 def register_functions_ns3_olsr(module, root_module):
2.77 return
2.78
3.1 --- a/bindings/python/ns3_module_contrib.py Thu Apr 23 15:48:35 2009 +0100
3.2 +++ b/bindings/python/ns3_module_contrib.py Tue Apr 28 17:39:32 2009 +0100
3.3 @@ -49,10 +49,10 @@
3.4 module.add_container('std::vector< ns3::PyViz::NetDeviceStatistics >', 'ns3::PyViz::NetDeviceStatistics', container_type='vector')
3.5 module.add_container('std::vector< ns3::PyViz::NodeStatistics >', 'ns3::PyViz::NodeStatistics', container_type='vector')
3.6
3.7 - ## Register a nested module for the namespace internal
3.8 + ## Register a nested module for the namespace Config
3.9
3.10 - nested_module = module.add_cpp_namespace('internal')
3.11 - register_types_ns3_internal(nested_module)
3.12 + nested_module = module.add_cpp_namespace('Config')
3.13 + register_types_ns3_Config(nested_module)
3.14
3.15
3.16 ## Register a nested module for the namespace TimeStepPrecision
3.17 @@ -61,10 +61,10 @@
3.18 register_types_ns3_TimeStepPrecision(nested_module)
3.19
3.20
3.21 - ## Register a nested module for the namespace Config
3.22 + ## Register a nested module for the namespace internal
3.23
3.24 - nested_module = module.add_cpp_namespace('Config')
3.25 - register_types_ns3_Config(nested_module)
3.26 + nested_module = module.add_cpp_namespace('internal')
3.27 + register_types_ns3_internal(nested_module)
3.28
3.29
3.30 ## Register a nested module for the namespace olsr
3.31 @@ -73,7 +73,7 @@
3.32 register_types_ns3_olsr(nested_module)
3.33
3.34
3.35 -def register_types_ns3_internal(module):
3.36 +def register_types_ns3_Config(module):
3.37 root_module = module.get_root()
3.38
3.39
3.40 @@ -81,7 +81,7 @@
3.41 root_module = module.get_root()
3.42
3.43
3.44 -def register_types_ns3_Config(module):
3.45 +def register_types_ns3_internal(module):
3.46 root_module = module.get_root()
3.47
3.48
3.49 @@ -402,21 +402,21 @@
3.50
3.51 def register_functions(root_module):
3.52 module = root_module
3.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
3.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
3.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
3.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
3.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
3.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
3.59 return
3.60
3.61 +def register_functions_ns3_Config(module, root_module):
3.62 + return
3.63 +
3.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
3.65 + return
3.66 +
3.67 def register_functions_ns3_internal(module, root_module):
3.68 return
3.69
3.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
3.71 - return
3.72 -
3.73 -def register_functions_ns3_Config(module, root_module):
3.74 - return
3.75 -
3.76 def register_functions_ns3_olsr(module, root_module):
3.77 return
3.78
4.1 --- a/bindings/python/ns3_module_core.py Thu Apr 23 15:48:35 2009 +0100
4.2 +++ b/bindings/python/ns3_module_core.py Tue Apr 28 17:39:32 2009 +0100
4.3 @@ -161,10 +161,10 @@
4.4 root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::EnumValue'])
4.5 module.add_container('std::set< ns3::TypeId >', 'ns3::TypeId', container_type='set')
4.6
4.7 - ## Register a nested module for the namespace internal
4.8 + ## Register a nested module for the namespace Config
4.9
4.10 - nested_module = module.add_cpp_namespace('internal')
4.11 - register_types_ns3_internal(nested_module)
4.12 + nested_module = module.add_cpp_namespace('Config')
4.13 + register_types_ns3_Config(nested_module)
4.14
4.15
4.16 ## Register a nested module for the namespace TimeStepPrecision
4.17 @@ -173,10 +173,10 @@
4.18 register_types_ns3_TimeStepPrecision(nested_module)
4.19
4.20
4.21 - ## Register a nested module for the namespace Config
4.22 + ## Register a nested module for the namespace internal
4.23
4.24 - nested_module = module.add_cpp_namespace('Config')
4.25 - register_types_ns3_Config(nested_module)
4.26 + nested_module = module.add_cpp_namespace('internal')
4.27 + register_types_ns3_internal(nested_module)
4.28
4.29
4.30 ## Register a nested module for the namespace olsr
4.31 @@ -185,7 +185,7 @@
4.32 register_types_ns3_olsr(nested_module)
4.33
4.34
4.35 -def register_types_ns3_internal(module):
4.36 +def register_types_ns3_Config(module):
4.37 root_module = module.get_root()
4.38
4.39
4.40 @@ -193,7 +193,7 @@
4.41 root_module = module.get_root()
4.42
4.43
4.44 -def register_types_ns3_Config(module):
4.45 +def register_types_ns3_internal(module):
4.46 root_module = module.get_root()
4.47
4.48
4.49 @@ -1827,7 +1827,7 @@
4.50 cls.add_method('ConnectWithoutContext',
4.51 'void',
4.52 [param('ns3::CallbackBase const &', 'cb')])
4.53 - ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::string path) [member function]
4.54 + ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
4.55 cls.add_method('Connect',
4.56 'void',
4.57 [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
4.58 @@ -1835,7 +1835,7 @@
4.59 cls.add_method('DisconnectWithoutContext',
4.60 'void',
4.61 [param('ns3::CallbackBase const &', 'cb')])
4.62 - ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function]
4.63 + ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
4.64 cls.add_method('Disconnect',
4.65 'void',
4.66 [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
4.67 @@ -1852,10 +1852,60 @@
4.68
4.69 def register_functions(root_module):
4.70 module = root_module
4.71 + ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
4.72 + module.add_function('BreakpointFallback',
4.73 + 'void',
4.74 + [])
4.75 + ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
4.76 + module.add_function('Create',
4.77 + 'ns3::Ptr< ns3::ObjectVectorValue >',
4.78 + [],
4.79 + template_parameters=['ns3::ObjectVectorValue'])
4.80 + ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
4.81 + module.add_function('Create',
4.82 + 'ns3::Ptr< ns3::PointerValue >',
4.83 + [],
4.84 + template_parameters=['ns3::PointerValue'])
4.85 + ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
4.86 + module.add_function('LogComponentDisable',
4.87 + 'void',
4.88 + [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
4.89 + ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
4.90 + module.add_function('LogComponentDisableAll',
4.91 + 'void',
4.92 + [param('ns3::LogLevel', 'level')])
4.93 + ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
4.94 + module.add_function('LogComponentEnable',
4.95 + 'void',
4.96 + [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
4.97 + ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
4.98 + module.add_function('LogComponentEnableAll',
4.99 + 'void',
4.100 + [param('ns3::LogLevel', 'level')])
4.101 ## boolean.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeBooleanChecker() [free function]
4.102 module.add_function('MakeBooleanChecker',
4.103 'ns3::Ptr< ns3::AttributeChecker const >',
4.104 [])
4.105 + ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
4.106 + module.add_function('MakeEnumChecker',
4.107 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.108 + [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
4.109 + ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
4.110 + module.add_function('MakeObjectFactoryChecker',
4.111 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.112 + [])
4.113 + ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
4.114 + module.add_function('MakeRandomVariableChecker',
4.115 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.116 + [])
4.117 + ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
4.118 + module.add_function('MakeStringChecker',
4.119 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.120 + [])
4.121 + ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
4.122 + module.add_function('MakeTypeIdChecker',
4.123 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.124 + [])
4.125 ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
4.126 module.add_function('TypeNameGet',
4.127 'std::string',
4.128 @@ -1906,133 +1956,83 @@
4.129 'std::string',
4.130 [],
4.131 template_parameters=['unsigned char'])
4.132 - ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
4.133 - module.add_function('MakeStringChecker',
4.134 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.135 - [])
4.136 - ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
4.137 - module.add_function('MakeEnumChecker',
4.138 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.139 - [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
4.140 - ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
4.141 - module.add_function('LogComponentEnableAll',
4.142 - 'void',
4.143 - [param('ns3::LogLevel', 'level')])
4.144 - ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
4.145 - module.add_function('MakeTypeIdChecker',
4.146 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.147 - [])
4.148 - ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
4.149 - module.add_function('Create',
4.150 - 'ns3::Ptr< ns3::PointerValue >',
4.151 - [],
4.152 - template_parameters=['ns3::PointerValue'])
4.153 - ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
4.154 - module.add_function('Create',
4.155 - 'ns3::Ptr< ns3::ObjectVectorValue >',
4.156 - [],
4.157 - template_parameters=['ns3::ObjectVectorValue'])
4.158 - ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
4.159 - module.add_function('MakeObjectFactoryChecker',
4.160 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.161 - [])
4.162 - ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
4.163 - module.add_function('LogComponentDisableAll',
4.164 - 'void',
4.165 - [param('ns3::LogLevel', 'level')])
4.166 - ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
4.167 - module.add_function('BreakpointFallback',
4.168 - 'void',
4.169 - [])
4.170 - ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
4.171 - module.add_function('MakeRandomVariableChecker',
4.172 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.173 - [])
4.174 - ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
4.175 - module.add_function('LogComponentDisable',
4.176 - 'void',
4.177 - [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
4.178 - ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
4.179 - module.add_function('LogComponentEnable',
4.180 - 'void',
4.181 - [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
4.182 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
4.183 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
4.184 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
4.185 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
4.186 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
4.187 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
4.188 return
4.189
4.190 -def register_functions_ns3_internal(module, root_module):
4.191 - ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
4.192 - module.add_function('MakeUintegerChecker',
4.193 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.194 - [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
4.195 - ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
4.196 - module.add_function('MakeIntegerChecker',
4.197 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.198 - [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
4.199 - ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
4.200 - module.add_function('MakeDoubleChecker',
4.201 - 'ns3::Ptr< ns3::AttributeChecker const >',
4.202 - [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
4.203 - return
4.204 -
4.205 -def register_functions_ns3_TimeStepPrecision(module, root_module):
4.206 - return
4.207 -
4.208 def register_functions_ns3_Config(module, root_module):
4.209 - ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
4.210 - module.add_function('SetDefaultFailSafe',
4.211 - 'bool',
4.212 - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.213 + ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
4.214 + module.add_function('Connect',
4.215 + 'void',
4.216 + [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.217 + ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
4.218 + module.add_function('ConnectWithoutContext',
4.219 + 'void',
4.220 + [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.221 + ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
4.222 + module.add_function('Disconnect',
4.223 + 'void',
4.224 + [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.225 ## config.h: extern void ns3::Config::DisconnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
4.226 module.add_function('DisconnectWithoutContext',
4.227 'void',
4.228 [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.229 - ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
4.230 - module.add_function('SetDefault',
4.231 - 'void',
4.232 - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.233 - ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
4.234 - module.add_function('Connect',
4.235 - 'void',
4.236 - [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.237 ## config.h: extern ns3::Ptr<ns3::Object> ns3::Config::GetRootNamespaceObject(uint32_t i) [free function]
4.238 module.add_function('GetRootNamespaceObject',
4.239 'ns3::Ptr< ns3::Object >',
4.240 [param('uint32_t', 'i')])
4.241 - ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
4.242 - module.add_function('ConnectWithoutContext',
4.243 + ## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
4.244 + module.add_function('GetRootNamespaceObjectN',
4.245 + 'uint32_t',
4.246 + [])
4.247 + ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
4.248 + module.add_function('RegisterRootNamespaceObject',
4.249 'void',
4.250 - [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.251 + [param('ns3::Ptr< ns3::Object >', 'obj')])
4.252 + ## config.h: extern void ns3::Config::Set(std::string path, ns3::AttributeValue const & value) [free function]
4.253 + module.add_function('Set',
4.254 + 'void',
4.255 + [param('std::string', 'path'), param('ns3::AttributeValue const &', 'value')])
4.256 + ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
4.257 + module.add_function('SetDefault',
4.258 + 'void',
4.259 + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.260 + ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
4.261 + module.add_function('SetDefaultFailSafe',
4.262 + 'bool',
4.263 + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.264 + ## config.h: extern void ns3::Config::SetGlobal(std::string name, ns3::AttributeValue const & value) [free function]
4.265 + module.add_function('SetGlobal',
4.266 + 'void',
4.267 + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.268 + ## config.h: extern bool ns3::Config::SetGlobalFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
4.269 + module.add_function('SetGlobalFailSafe',
4.270 + 'bool',
4.271 + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.272 ## config.h: extern void ns3::Config::UnregisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
4.273 module.add_function('UnregisterRootNamespaceObject',
4.274 'void',
4.275 [param('ns3::Ptr< ns3::Object >', 'obj')])
4.276 - ## config.h: extern bool ns3::Config::SetGlobalFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
4.277 - module.add_function('SetGlobalFailSafe',
4.278 - 'bool',
4.279 - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.280 - ## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
4.281 - module.add_function('GetRootNamespaceObjectN',
4.282 - 'uint32_t',
4.283 - [])
4.284 - ## config.h: extern void ns3::Config::Set(std::string path, ns3::AttributeValue const & value) [free function]
4.285 - module.add_function('Set',
4.286 - 'void',
4.287 - [param('std::string', 'path'), param('ns3::AttributeValue const &', 'value')])
4.288 - ## config.h: extern void ns3::Config::SetGlobal(std::string name, ns3::AttributeValue const & value) [free function]
4.289 - module.add_function('SetGlobal',
4.290 - 'void',
4.291 - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
4.292 - ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
4.293 - module.add_function('RegisterRootNamespaceObject',
4.294 - 'void',
4.295 - [param('ns3::Ptr< ns3::Object >', 'obj')])
4.296 - ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
4.297 - module.add_function('Disconnect',
4.298 - 'void',
4.299 - [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
4.300 + return
4.301 +
4.302 +def register_functions_ns3_TimeStepPrecision(module, root_module):
4.303 + return
4.304 +
4.305 +def register_functions_ns3_internal(module, root_module):
4.306 + ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
4.307 + module.add_function('MakeDoubleChecker',
4.308 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.309 + [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
4.310 + ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
4.311 + module.add_function('MakeIntegerChecker',
4.312 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.313 + [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
4.314 + ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
4.315 + module.add_function('MakeUintegerChecker',
4.316 + 'ns3::Ptr< ns3::AttributeChecker const >',
4.317 + [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
4.318 return
4.319
4.320 def register_functions_ns3_olsr(module, root_module):
5.1 --- a/bindings/python/ns3_module_csma.py Thu Apr 23 15:48:35 2009 +0100
5.2 +++ b/bindings/python/ns3_module_csma.py Tue Apr 28 17:39:32 2009 +0100
5.3 @@ -16,10 +16,10 @@
5.4 ## csma-net-device.h: ns3::CsmaNetDevice::EncapsulationMode [enumeration]
5.5 module.add_enum('EncapsulationMode', ['ILLEGAL', 'DIX', 'LLC'], outer_class=root_module['ns3::CsmaNetDevice'])
5.6
5.7 - ## Register a nested module for the namespace internal
5.8 + ## Register a nested module for the namespace Config
5.9
5.10 - nested_module = module.add_cpp_namespace('internal')
5.11 - register_types_ns3_internal(nested_module)
5.12 + nested_module = module.add_cpp_namespace('Config')
5.13 + register_types_ns3_Config(nested_module)
5.14
5.15
5.16 ## Register a nested module for the namespace TimeStepPrecision
5.17 @@ -28,10 +28,10 @@
5.18 register_types_ns3_TimeStepPrecision(nested_module)
5.19
5.20
5.21 - ## Register a nested module for the namespace Config
5.22 + ## Register a nested module for the namespace internal
5.23
5.24 - nested_module = module.add_cpp_namespace('Config')
5.25 - register_types_ns3_Config(nested_module)
5.26 + nested_module = module.add_cpp_namespace('internal')
5.27 + register_types_ns3_internal(nested_module)
5.28
5.29
5.30 ## Register a nested module for the namespace olsr
5.31 @@ -40,7 +40,7 @@
5.32 register_types_ns3_olsr(nested_module)
5.33
5.34
5.35 -def register_types_ns3_internal(module):
5.36 +def register_types_ns3_Config(module):
5.37 root_module = module.get_root()
5.38
5.39
5.40 @@ -48,7 +48,7 @@
5.41 root_module = module.get_root()
5.42
5.43
5.44 -def register_types_ns3_Config(module):
5.45 +def register_types_ns3_internal(module):
5.46 root_module = module.get_root()
5.47
5.48
5.49 @@ -417,21 +417,21 @@
5.50
5.51 def register_functions(root_module):
5.52 module = root_module
5.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
5.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
5.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
5.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
5.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
5.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
5.59 return
5.60
5.61 +def register_functions_ns3_Config(module, root_module):
5.62 + return
5.63 +
5.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
5.65 + return
5.66 +
5.67 def register_functions_ns3_internal(module, root_module):
5.68 return
5.69
5.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
5.71 - return
5.72 -
5.73 -def register_functions_ns3_Config(module, root_module):
5.74 - return
5.75 -
5.76 def register_functions_ns3_olsr(module, root_module):
5.77 return
5.78
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/bindings/python/ns3_module_flow_monitor.py Tue Apr 28 17:39:32 2009 +0100
6.3 @@ -0,0 +1,242 @@
6.4 +from pybindgen import Module, FileCodeSink, param, retval, cppclass
6.5 +
6.6 +def register_types(module):
6.7 + root_module = module.get_root()
6.8 +
6.9 + ## flow-classifier.h: ns3::FlowClassifier [class]
6.10 + module.add_class('FlowClassifier', parent=root_module['ns3::RefCountBase'])
6.11 + ## flow-probe.h: ns3::FlowProbe [class]
6.12 + module.add_class('FlowProbe', parent=root_module['ns3::RefCountBase'])
6.13 + ## flow-probe.h: ns3::FlowProbe::FlowStats [struct]
6.14 + module.add_class('FlowStats', outer_class=root_module['ns3::FlowProbe'])
6.15 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier [class]
6.16 + module.add_class('Ipv4FlowClassifier', parent=root_module['ns3::FlowClassifier'])
6.17 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple [struct]
6.18 + module.add_class('FiveTuple', outer_class=root_module['ns3::Ipv4FlowClassifier'])
6.19 + ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe [class]
6.20 + module.add_class('Ipv4FlowProbe', parent=root_module['ns3::FlowProbe'])
6.21 + ## flow-monitor.h: ns3::FlowMonitor [class]
6.22 + module.add_class('FlowMonitor', parent=root_module['ns3::Object'])
6.23 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats [struct]
6.24 + module.add_class('FlowStats', outer_class=root_module['ns3::FlowMonitor'])
6.25 + module.add_container('std::map< unsigned int, ns3::FlowProbe::FlowStats >', ('unsigned int', 'ns3::FlowProbe::FlowStats'), container_type='map')
6.26 + module.add_container('std::map< unsigned int, ns3::FlowMonitor::FlowStats >', ('unsigned int', 'ns3::FlowMonitor::FlowStats'), container_type='map')
6.27 +
6.28 + ## Register a nested module for the namespace Config
6.29 +
6.30 + nested_module = module.add_cpp_namespace('Config')
6.31 + register_types_ns3_Config(nested_module)
6.32 +
6.33 +
6.34 + ## Register a nested module for the namespace TimeStepPrecision
6.35 +
6.36 + nested_module = module.add_cpp_namespace('TimeStepPrecision')
6.37 + register_types_ns3_TimeStepPrecision(nested_module)
6.38 +
6.39 +
6.40 + ## Register a nested module for the namespace internal
6.41 +
6.42 + nested_module = module.add_cpp_namespace('internal')
6.43 + register_types_ns3_internal(nested_module)
6.44 +
6.45 +
6.46 + ## Register a nested module for the namespace olsr
6.47 +
6.48 + nested_module = module.add_cpp_namespace('olsr')
6.49 + register_types_ns3_olsr(nested_module)
6.50 +
6.51 +
6.52 +def register_types_ns3_Config(module):
6.53 + root_module = module.get_root()
6.54 +
6.55 +
6.56 +def register_types_ns3_TimeStepPrecision(module):
6.57 + root_module = module.get_root()
6.58 +
6.59 +
6.60 +def register_types_ns3_internal(module):
6.61 + root_module = module.get_root()
6.62 +
6.63 +
6.64 +def register_types_ns3_olsr(module):
6.65 + root_module = module.get_root()
6.66 +
6.67 +
6.68 +def register_methods(root_module):
6.69 + register_Ns3FlowClassifier_methods(root_module, root_module['ns3::FlowClassifier'])
6.70 + register_Ns3FlowProbe_methods(root_module, root_module['ns3::FlowProbe'])
6.71 + register_Ns3FlowProbeFlowStats_methods(root_module, root_module['ns3::FlowProbe::FlowStats'])
6.72 + register_Ns3Ipv4FlowClassifier_methods(root_module, root_module['ns3::Ipv4FlowClassifier'])
6.73 + register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, root_module['ns3::Ipv4FlowClassifier::FiveTuple'])
6.74 + register_Ns3Ipv4FlowProbe_methods(root_module, root_module['ns3::Ipv4FlowProbe'])
6.75 + register_Ns3FlowMonitor_methods(root_module, root_module['ns3::FlowMonitor'])
6.76 + register_Ns3FlowMonitorFlowStats_methods(root_module, root_module['ns3::FlowMonitor::FlowStats'])
6.77 + return
6.78 +
6.79 +def register_Ns3FlowClassifier_methods(root_module, cls):
6.80 + ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier(ns3::FlowClassifier const & arg0) [copy constructor]
6.81 + cls.add_constructor([param('ns3::FlowClassifier const &', 'arg0')])
6.82 + ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier() [constructor]
6.83 + cls.add_constructor([])
6.84 + ## flow-classifier.h: ns3::FlowId ns3::FlowClassifier::GetNewFlowId() [member function]
6.85 + cls.add_method('GetNewFlowId',
6.86 + 'ns3::FlowId',
6.87 + [],
6.88 + visibility='protected')
6.89 + return
6.90 +
6.91 +def register_Ns3FlowProbe_methods(root_module, cls):
6.92 + ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::FlowProbe const & arg0) [copy constructor]
6.93 + cls.add_constructor([param('ns3::FlowProbe const &', 'arg0')])
6.94 + ## flow-probe.h: void ns3::FlowProbe::AddPacketStats(ns3::FlowId flowId, uint32_t packetSize, ns3::Time delayFromFirstProbe) [member function]
6.95 + cls.add_method('AddPacketStats',
6.96 + 'void',
6.97 + [param('ns3::FlowId', 'flowId'), param('uint32_t', 'packetSize'), param('ns3::Time', 'delayFromFirstProbe')])
6.98 + ## flow-probe.h: std::map<unsigned int, ns3::FlowProbe::FlowStats, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowProbe::FlowStats> > > ns3::FlowProbe::GetStats() const [member function]
6.99 + cls.add_method('GetStats',
6.100 + 'std::map< unsigned int, ns3::FlowProbe::FlowStats >',
6.101 + [],
6.102 + is_const=True)
6.103 + ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::Ptr<ns3::FlowMonitor> flowMonitor) [constructor]
6.104 + cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'flowMonitor')],
6.105 + visibility='protected')
6.106 + return
6.107 +
6.108 +def register_Ns3FlowProbeFlowStats_methods(root_module, cls):
6.109 + ## flow-probe.h: ns3::FlowProbe::FlowStats::delayFromFirstProbeSum [variable]
6.110 + cls.add_instance_attribute('delayFromFirstProbeSum', 'ns3::Time', is_const=False)
6.111 + ## flow-probe.h: ns3::FlowProbe::FlowStats::bytes [variable]
6.112 + cls.add_instance_attribute('bytes', 'uint64_t', is_const=False)
6.113 + ## flow-probe.h: ns3::FlowProbe::FlowStats::packets [variable]
6.114 + cls.add_instance_attribute('packets', 'uint32_t', is_const=False)
6.115 + ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats(ns3::FlowProbe::FlowStats const & arg0) [copy constructor]
6.116 + cls.add_constructor([param('ns3::FlowProbe::FlowStats const &', 'arg0')])
6.117 + ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats() [constructor]
6.118 + cls.add_constructor([])
6.119 + return
6.120 +
6.121 +def register_Ns3Ipv4FlowClassifier_methods(root_module, cls):
6.122 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier(ns3::Ipv4FlowClassifier const & arg0) [copy constructor]
6.123 + cls.add_constructor([param('ns3::Ipv4FlowClassifier const &', 'arg0')])
6.124 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier() [constructor]
6.125 + cls.add_constructor([])
6.126 + ## ipv4-flow-classifier.h: bool ns3::Ipv4FlowClassifier::Classify(ns3::Ipv4Header const & ipHeader, ns3::Ptr<const ns3::Packet> ipPayload, uint32_t * out_flowId, uint32_t * out_packetId) [member function]
6.127 + cls.add_method('Classify',
6.128 + 'bool',
6.129 + [param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet const >', 'ipPayload'), param('uint32_t *', 'out_flowId'), param('uint32_t *', 'out_packetId')])
6.130 + return
6.131 +
6.132 +def register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, cls):
6.133 + cls.add_binary_comparison_operator('<')
6.134 + cls.add_binary_comparison_operator('==')
6.135 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple() [constructor]
6.136 + cls.add_constructor([])
6.137 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple(ns3::Ipv4FlowClassifier::FiveTuple const & arg0) [copy constructor]
6.138 + cls.add_constructor([param('ns3::Ipv4FlowClassifier::FiveTuple const &', 'arg0')])
6.139 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationAddress [variable]
6.140 + cls.add_instance_attribute('destinationAddress', 'ns3::Ipv4Address', is_const=False)
6.141 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationPort [variable]
6.142 + cls.add_instance_attribute('destinationPort', 'uint16_t', is_const=False)
6.143 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::protocol [variable]
6.144 + cls.add_instance_attribute('protocol', 'uint8_t', is_const=False)
6.145 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourceAddress [variable]
6.146 + cls.add_instance_attribute('sourceAddress', 'ns3::Ipv4Address', is_const=False)
6.147 + ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourcePort [variable]
6.148 + cls.add_instance_attribute('sourcePort', 'uint16_t', is_const=False)
6.149 + return
6.150 +
6.151 +def register_Ns3Ipv4FlowProbe_methods(root_module, cls):
6.152 + ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ipv4FlowProbe const & arg0) [copy constructor]
6.153 + cls.add_constructor([param('ns3::Ipv4FlowProbe const &', 'arg0')])
6.154 + ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ptr<ns3::FlowMonitor> monitor, ns3::Ptr<ns3::Ipv4FlowClassifier> classifier, ns3::Ptr<ns3::Node> node) [constructor]
6.155 + cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'monitor'), param('ns3::Ptr< ns3::Ipv4FlowClassifier >', 'classifier'), param('ns3::Ptr< ns3::Node >', 'node')])
6.156 + return
6.157 +
6.158 +def register_Ns3FlowMonitor_methods(root_module, cls):
6.159 + ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor(ns3::FlowMonitor const & arg0) [copy constructor]
6.160 + cls.add_constructor([param('ns3::FlowMonitor const &', 'arg0')])
6.161 + ## flow-monitor.h: static ns3::TypeId ns3::FlowMonitor::GetTypeId() [member function]
6.162 + cls.add_method('GetTypeId',
6.163 + 'ns3::TypeId',
6.164 + [],
6.165 + is_static=True)
6.166 + ## flow-monitor.h: ns3::TypeId ns3::FlowMonitor::GetInstanceTypeId() const [member function]
6.167 + cls.add_method('GetInstanceTypeId',
6.168 + 'ns3::TypeId',
6.169 + [],
6.170 + is_const=True, is_virtual=True)
6.171 + ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor() [constructor]
6.172 + cls.add_constructor([])
6.173 + ## flow-monitor.h: void ns3::FlowMonitor::ReportFirstTx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
6.174 + cls.add_method('ReportFirstTx',
6.175 + 'void',
6.176 + [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
6.177 + ## flow-monitor.h: void ns3::FlowMonitor::ReportForwarding(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
6.178 + cls.add_method('ReportForwarding',
6.179 + 'void',
6.180 + [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
6.181 + ## flow-monitor.h: void ns3::FlowMonitor::ReportLastRx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
6.182 + cls.add_method('ReportLastRx',
6.183 + 'void',
6.184 + [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
6.185 + ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets() [member function]
6.186 + cls.add_method('CheckForLostPackets',
6.187 + 'void',
6.188 + [])
6.189 + ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets(ns3::Time maxDelay) [member function]
6.190 + cls.add_method('CheckForLostPackets',
6.191 + 'void',
6.192 + [param('ns3::Time', 'maxDelay')])
6.193 + ## flow-monitor.h: std::map<unsigned int, ns3::FlowMonitor::FlowStats, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> > > ns3::FlowMonitor::GetFlowStats() const [member function]
6.194 + cls.add_method('GetFlowStats',
6.195 + 'std::map< unsigned int, ns3::FlowMonitor::FlowStats >',
6.196 + [],
6.197 + is_const=True)
6.198 + ## flow-monitor.h: void ns3::FlowMonitor::NotifyConstructionCompleted() [member function]
6.199 + cls.add_method('NotifyConstructionCompleted',
6.200 + 'void',
6.201 + [],
6.202 + visibility='protected', is_virtual=True)
6.203 + return
6.204 +
6.205 +def register_Ns3FlowMonitorFlowStats_methods(root_module, cls):
6.206 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::delaySum [variable]
6.207 + cls.add_instance_attribute('delaySum', 'ns3::Time', is_const=False)
6.208 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txBytes [variable]
6.209 + cls.add_instance_attribute('txBytes', 'uint64_t', is_const=False)
6.210 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxBytes [variable]
6.211 + cls.add_instance_attribute('rxBytes', 'uint64_t', is_const=False)
6.212 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txPackets [variable]
6.213 + cls.add_instance_attribute('txPackets', 'uint32_t', is_const=False)
6.214 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxPackets [variable]
6.215 + cls.add_instance_attribute('rxPackets', 'uint32_t', is_const=False)
6.216 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::lostPackets [variable]
6.217 + cls.add_instance_attribute('lostPackets', 'uint32_t', is_const=False)
6.218 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timesForwarded [variable]
6.219 + cls.add_instance_attribute('timesForwarded', 'uint32_t', is_const=False)
6.220 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats(ns3::FlowMonitor::FlowStats const & arg0) [copy constructor]
6.221 + cls.add_constructor([param('ns3::FlowMonitor::FlowStats const &', 'arg0')])
6.222 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats() [constructor]
6.223 + cls.add_constructor([])
6.224 + return
6.225 +
6.226 +def register_functions(root_module):
6.227 + module = root_module
6.228 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
6.229 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
6.230 + register_functions_ns3_internal(module.get_submodule('internal'), root_module)
6.231 + register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
6.232 + return
6.233 +
6.234 +def register_functions_ns3_Config(module, root_module):
6.235 + return
6.236 +
6.237 +def register_functions_ns3_TimeStepPrecision(module, root_module):
6.238 + return
6.239 +
6.240 +def register_functions_ns3_internal(module, root_module):
6.241 + return
6.242 +
6.243 +def register_functions_ns3_olsr(module, root_module):
6.244 + return
6.245 +
7.1 --- a/bindings/python/ns3_module_global_routing.py Thu Apr 23 15:48:35 2009 +0100
7.2 +++ b/bindings/python/ns3_module_global_routing.py Tue Apr 28 17:39:32 2009 +0100
7.3 @@ -18,10 +18,10 @@
7.4 ## global-router-interface.h: ns3::GlobalRouter [class]
7.5 module.add_class('GlobalRouter', is_singleton=True, parent=root_module['ns3::Object'])
7.6
7.7 - ## Register a nested module for the namespace internal
7.8 + ## Register a nested module for the namespace Config
7.9
7.10 - nested_module = module.add_cpp_namespace('internal')
7.11 - register_types_ns3_internal(nested_module)
7.12 + nested_module = module.add_cpp_namespace('Config')
7.13 + register_types_ns3_Config(nested_module)
7.14
7.15
7.16 ## Register a nested module for the namespace TimeStepPrecision
7.17 @@ -30,10 +30,10 @@
7.18 register_types_ns3_TimeStepPrecision(nested_module)
7.19
7.20
7.21 - ## Register a nested module for the namespace Config
7.22 + ## Register a nested module for the namespace internal
7.23
7.24 - nested_module = module.add_cpp_namespace('Config')
7.25 - register_types_ns3_Config(nested_module)
7.26 + nested_module = module.add_cpp_namespace('internal')
7.27 + register_types_ns3_internal(nested_module)
7.28
7.29
7.30 ## Register a nested module for the namespace olsr
7.31 @@ -42,7 +42,7 @@
7.32 register_types_ns3_olsr(nested_module)
7.33
7.34
7.35 -def register_types_ns3_internal(module):
7.36 +def register_types_ns3_Config(module):
7.37 root_module = module.get_root()
7.38
7.39
7.40 @@ -50,7 +50,7 @@
7.41 root_module = module.get_root()
7.42
7.43
7.44 -def register_types_ns3_Config(module):
7.45 +def register_types_ns3_internal(module):
7.46 root_module = module.get_root()
7.47
7.48
7.49 @@ -260,21 +260,21 @@
7.50
7.51 def register_functions(root_module):
7.52 module = root_module
7.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
7.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
7.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
7.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
7.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
7.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
7.59 return
7.60
7.61 +def register_functions_ns3_Config(module, root_module):
7.62 + return
7.63 +
7.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
7.65 + return
7.66 +
7.67 def register_functions_ns3_internal(module, root_module):
7.68 return
7.69
7.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
7.71 - return
7.72 -
7.73 -def register_functions_ns3_Config(module, root_module):
7.74 - return
7.75 -
7.76 def register_functions_ns3_olsr(module, root_module):
7.77 return
7.78
8.1 --- a/bindings/python/ns3_module_helper.py Thu Apr 23 15:48:35 2009 +0100
8.2 +++ b/bindings/python/ns3_module_helper.py Tue Apr 28 17:39:32 2009 +0100
8.3 @@ -42,10 +42,10 @@
8.4 ## wifi-helper.h: ns3::WifiHelper [class]
8.5 module.add_class('WifiHelper', allow_subclassing=False)
8.6
8.7 - ## Register a nested module for the namespace internal
8.8 + ## Register a nested module for the namespace Config
8.9
8.10 - nested_module = module.add_cpp_namespace('internal')
8.11 - register_types_ns3_internal(nested_module)
8.12 + nested_module = module.add_cpp_namespace('Config')
8.13 + register_types_ns3_Config(nested_module)
8.14
8.15
8.16 ## Register a nested module for the namespace TimeStepPrecision
8.17 @@ -54,10 +54,10 @@
8.18 register_types_ns3_TimeStepPrecision(nested_module)
8.19
8.20
8.21 - ## Register a nested module for the namespace Config
8.22 + ## Register a nested module for the namespace internal
8.23
8.24 - nested_module = module.add_cpp_namespace('Config')
8.25 - register_types_ns3_Config(nested_module)
8.26 + nested_module = module.add_cpp_namespace('internal')
8.27 + register_types_ns3_internal(nested_module)
8.28
8.29
8.30 ## Register a nested module for the namespace olsr
8.31 @@ -66,7 +66,7 @@
8.32 register_types_ns3_olsr(nested_module)
8.33
8.34
8.35 -def register_types_ns3_internal(module):
8.36 +def register_types_ns3_Config(module):
8.37 root_module = module.get_root()
8.38
8.39
8.40 @@ -74,7 +74,7 @@
8.41 root_module = module.get_root()
8.42
8.43
8.44 -def register_types_ns3_Config(module):
8.45 +def register_types_ns3_internal(module):
8.46 root_module = module.get_root()
8.47
8.48
8.49 @@ -726,21 +726,21 @@
8.50
8.51 def register_functions(root_module):
8.52 module = root_module
8.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
8.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
8.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
8.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
8.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
8.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
8.59 return
8.60
8.61 +def register_functions_ns3_Config(module, root_module):
8.62 + return
8.63 +
8.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
8.65 + return
8.66 +
8.67 def register_functions_ns3_internal(module, root_module):
8.68 return
8.69
8.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
8.71 - return
8.72 -
8.73 -def register_functions_ns3_Config(module, root_module):
8.74 - return
8.75 -
8.76 def register_functions_ns3_olsr(module, root_module):
8.77 return
8.78
9.1 --- a/bindings/python/ns3_module_internet_stack.py Thu Apr 23 15:48:35 2009 +0100
9.2 +++ b/bindings/python/ns3_module_internet_stack.py Tue Apr 28 17:39:32 2009 +0100
9.3 @@ -16,10 +16,10 @@
9.4 ## ipv4-static-routing.h: ns3::Ipv4StaticRouting [class]
9.5 module.add_class('Ipv4StaticRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
9.6
9.7 - ## Register a nested module for the namespace internal
9.8 + ## Register a nested module for the namespace Config
9.9
9.10 - nested_module = module.add_cpp_namespace('internal')
9.11 - register_types_ns3_internal(nested_module)
9.12 + nested_module = module.add_cpp_namespace('Config')
9.13 + register_types_ns3_Config(nested_module)
9.14
9.15
9.16 ## Register a nested module for the namespace TimeStepPrecision
9.17 @@ -28,10 +28,10 @@
9.18 register_types_ns3_TimeStepPrecision(nested_module)
9.19
9.20
9.21 - ## Register a nested module for the namespace Config
9.22 + ## Register a nested module for the namespace internal
9.23
9.24 - nested_module = module.add_cpp_namespace('Config')
9.25 - register_types_ns3_Config(nested_module)
9.26 + nested_module = module.add_cpp_namespace('internal')
9.27 + register_types_ns3_internal(nested_module)
9.28
9.29
9.30 ## Register a nested module for the namespace olsr
9.31 @@ -40,7 +40,7 @@
9.32 register_types_ns3_olsr(nested_module)
9.33
9.34
9.35 -def register_types_ns3_internal(module):
9.36 +def register_types_ns3_Config(module):
9.37 root_module = module.get_root()
9.38
9.39
9.40 @@ -48,7 +48,7 @@
9.41 root_module = module.get_root()
9.42
9.43
9.44 -def register_types_ns3_Config(module):
9.45 +def register_types_ns3_internal(module):
9.46 root_module = module.get_root()
9.47
9.48
9.49 @@ -642,21 +642,21 @@
9.50 module.add_function('AddNscInternetStack',
9.51 'void',
9.52 [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string const &', 'soname')])
9.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
9.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
9.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
9.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
9.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
9.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
9.59 return
9.60
9.61 +def register_functions_ns3_Config(module, root_module):
9.62 + return
9.63 +
9.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
9.65 + return
9.66 +
9.67 def register_functions_ns3_internal(module, root_module):
9.68 return
9.69
9.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
9.71 - return
9.72 -
9.73 -def register_functions_ns3_Config(module, root_module):
9.74 - return
9.75 -
9.76 def register_functions_ns3_olsr(module, root_module):
9.77 return
9.78
10.1 --- a/bindings/python/ns3_module_mobility.py Thu Apr 23 15:48:35 2009 +0100
10.2 +++ b/bindings/python/ns3_module_mobility.py Tue Apr 28 17:39:32 2009 +0100
10.3 @@ -48,10 +48,10 @@
10.4 ## hierarchical-mobility-model.h: ns3::HierarchicalMobilityModel [class]
10.5 module.add_class('HierarchicalMobilityModel', parent=root_module['ns3::MobilityModel'])
10.6
10.7 - ## Register a nested module for the namespace internal
10.8 + ## Register a nested module for the namespace Config
10.9
10.10 - nested_module = module.add_cpp_namespace('internal')
10.11 - register_types_ns3_internal(nested_module)
10.12 + nested_module = module.add_cpp_namespace('Config')
10.13 + register_types_ns3_Config(nested_module)
10.14
10.15
10.16 ## Register a nested module for the namespace TimeStepPrecision
10.17 @@ -60,10 +60,10 @@
10.18 register_types_ns3_TimeStepPrecision(nested_module)
10.19
10.20
10.21 - ## Register a nested module for the namespace Config
10.22 + ## Register a nested module for the namespace internal
10.23
10.24 - nested_module = module.add_cpp_namespace('Config')
10.25 - register_types_ns3_Config(nested_module)
10.26 + nested_module = module.add_cpp_namespace('internal')
10.27 + register_types_ns3_internal(nested_module)
10.28
10.29
10.30 ## Register a nested module for the namespace olsr
10.31 @@ -72,7 +72,7 @@
10.32 register_types_ns3_olsr(nested_module)
10.33
10.34
10.35 -def register_types_ns3_internal(module):
10.36 +def register_types_ns3_Config(module):
10.37 root_module = module.get_root()
10.38
10.39
10.40 @@ -80,7 +80,7 @@
10.41 root_module = module.get_root()
10.42
10.43
10.44 -def register_types_ns3_Config(module):
10.45 +def register_types_ns3_internal(module):
10.46 root_module = module.get_root()
10.47
10.48
10.49 @@ -691,33 +691,33 @@
10.50
10.51 def register_functions(root_module):
10.52 module = root_module
10.53 + ## vector.h: extern double ns3::CalculateDistance(ns3::Vector const & a, ns3::Vector const & b) [free function]
10.54 + module.add_function('CalculateDistance',
10.55 + 'double',
10.56 + [param('ns3::Vector const &', 'a'), param('ns3::Vector const &', 'b')])
10.57 ## rectangle.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRectangleChecker() [free function]
10.58 module.add_function('MakeRectangleChecker',
10.59 'ns3::Ptr< ns3::AttributeChecker const >',
10.60 [])
10.61 - ## vector.h: extern double ns3::CalculateDistance(ns3::Vector const & a, ns3::Vector const & b) [free function]
10.62 - module.add_function('CalculateDistance',
10.63 - 'double',
10.64 - [param('ns3::Vector const &', 'a'), param('ns3::Vector const &', 'b')])
10.65 ## vector.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeVectorChecker() [free function]
10.66 module.add_function('MakeVectorChecker',
10.67 'ns3::Ptr< ns3::AttributeChecker const >',
10.68 [])
10.69 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
10.70 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
10.71 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
10.72 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
10.73 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
10.74 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
10.75 return
10.76
10.77 +def register_functions_ns3_Config(module, root_module):
10.78 + return
10.79 +
10.80 +def register_functions_ns3_TimeStepPrecision(module, root_module):
10.81 + return
10.82 +
10.83 def register_functions_ns3_internal(module, root_module):
10.84 return
10.85
10.86 -def register_functions_ns3_TimeStepPrecision(module, root_module):
10.87 - return
10.88 -
10.89 -def register_functions_ns3_Config(module, root_module):
10.90 - return
10.91 -
10.92 def register_functions_ns3_olsr(module, root_module):
10.93 return
10.94
11.1 --- a/bindings/python/ns3_module_node.py Thu Apr 23 15:48:35 2009 +0100
11.2 +++ b/bindings/python/ns3_module_node.py Tue Apr 28 17:39:32 2009 +0100
11.3 @@ -106,10 +106,10 @@
11.4 ## simple-net-device.h: ns3::SimpleNetDevice [class]
11.5 module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
11.6
11.7 - ## Register a nested module for the namespace internal
11.8 + ## Register a nested module for the namespace Config
11.9
11.10 - nested_module = module.add_cpp_namespace('internal')
11.11 - register_types_ns3_internal(nested_module)
11.12 + nested_module = module.add_cpp_namespace('Config')
11.13 + register_types_ns3_Config(nested_module)
11.14
11.15
11.16 ## Register a nested module for the namespace TimeStepPrecision
11.17 @@ -118,10 +118,10 @@
11.18 register_types_ns3_TimeStepPrecision(nested_module)
11.19
11.20
11.21 - ## Register a nested module for the namespace Config
11.22 + ## Register a nested module for the namespace internal
11.23
11.24 - nested_module = module.add_cpp_namespace('Config')
11.25 - register_types_ns3_Config(nested_module)
11.26 + nested_module = module.add_cpp_namespace('internal')
11.27 + register_types_ns3_internal(nested_module)
11.28
11.29
11.30 ## Register a nested module for the namespace olsr
11.31 @@ -130,7 +130,7 @@
11.32 register_types_ns3_olsr(nested_module)
11.33
11.34
11.35 -def register_types_ns3_internal(module):
11.36 +def register_types_ns3_Config(module):
11.37 root_module = module.get_root()
11.38
11.39
11.40 @@ -138,7 +138,7 @@
11.41 root_module = module.get_root()
11.42
11.43
11.44 -def register_types_ns3_Config(module):
11.45 +def register_types_ns3_internal(module):
11.46 root_module = module.get_root()
11.47
11.48
11.49 @@ -2581,18 +2581,34 @@
11.50
11.51 def register_functions(root_module):
11.52 module = root_module
11.53 - ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
11.54 - module.add_function('MakeMac48AddressChecker',
11.55 + ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
11.56 + module.add_function('MakeAddressChecker',
11.57 'ns3::Ptr< ns3::AttributeChecker const >',
11.58 [])
11.59 ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
11.60 module.add_function('MakeIpv4AddressChecker',
11.61 'ns3::Ptr< ns3::AttributeChecker const >',
11.62 [])
11.63 - ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
11.64 - module.add_function('WriteTo',
11.65 + ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
11.66 + module.add_function('MakeIpv4MaskChecker',
11.67 + 'ns3::Ptr< ns3::AttributeChecker const >',
11.68 + [])
11.69 + ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
11.70 + module.add_function('MakeMac48AddressChecker',
11.71 + 'ns3::Ptr< ns3::AttributeChecker const >',
11.72 + [])
11.73 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
11.74 + module.add_function('ReadFrom',
11.75 'void',
11.76 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
11.77 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
11.78 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
11.79 + module.add_function('ReadFrom',
11.80 + 'void',
11.81 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
11.82 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
11.83 + module.add_function('ReadFrom',
11.84 + 'void',
11.85 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
11.86 ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Address const & ad) [free function]
11.87 module.add_function('WriteTo',
11.88 'void',
11.89 @@ -2601,41 +2617,25 @@
11.90 module.add_function('WriteTo',
11.91 'void',
11.92 [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address', 'ad')])
11.93 - ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
11.94 - module.add_function('MakeAddressChecker',
11.95 - 'ns3::Ptr< ns3::AttributeChecker const >',
11.96 - [])
11.97 - ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
11.98 - module.add_function('MakeIpv4MaskChecker',
11.99 - 'ns3::Ptr< ns3::AttributeChecker const >',
11.100 - [])
11.101 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
11.102 - module.add_function('ReadFrom',
11.103 + ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
11.104 + module.add_function('WriteTo',
11.105 'void',
11.106 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
11.107 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
11.108 - module.add_function('ReadFrom',
11.109 - 'void',
11.110 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
11.111 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
11.112 - module.add_function('ReadFrom',
11.113 - 'void',
11.114 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
11.115 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
11.116 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
11.117 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
11.118 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
11.119 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
11.120 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
11.121 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
11.122 return
11.123
11.124 +def register_functions_ns3_Config(module, root_module):
11.125 + return
11.126 +
11.127 +def register_functions_ns3_TimeStepPrecision(module, root_module):
11.128 + return
11.129 +
11.130 def register_functions_ns3_internal(module, root_module):
11.131 return
11.132
11.133 -def register_functions_ns3_TimeStepPrecision(module, root_module):
11.134 - return
11.135 -
11.136 -def register_functions_ns3_Config(module, root_module):
11.137 - return
11.138 -
11.139 def register_functions_ns3_olsr(module, root_module):
11.140 return
11.141
12.1 --- a/bindings/python/ns3_module_olsr.py Thu Apr 23 15:48:35 2009 +0100
12.2 +++ b/bindings/python/ns3_module_olsr.py Tue Apr 28 17:39:32 2009 +0100
12.3 @@ -4,10 +4,10 @@
12.4 root_module = module.get_root()
12.5
12.6
12.7 - ## Register a nested module for the namespace internal
12.8 + ## Register a nested module for the namespace Config
12.9
12.10 - nested_module = module.add_cpp_namespace('internal')
12.11 - register_types_ns3_internal(nested_module)
12.12 + nested_module = module.add_cpp_namespace('Config')
12.13 + register_types_ns3_Config(nested_module)
12.14
12.15
12.16 ## Register a nested module for the namespace TimeStepPrecision
12.17 @@ -16,10 +16,10 @@
12.18 register_types_ns3_TimeStepPrecision(nested_module)
12.19
12.20
12.21 - ## Register a nested module for the namespace Config
12.22 + ## Register a nested module for the namespace internal
12.23
12.24 - nested_module = module.add_cpp_namespace('Config')
12.25 - register_types_ns3_Config(nested_module)
12.26 + nested_module = module.add_cpp_namespace('internal')
12.27 + register_types_ns3_internal(nested_module)
12.28
12.29
12.30 ## Register a nested module for the namespace olsr
12.31 @@ -28,7 +28,7 @@
12.32 register_types_ns3_olsr(nested_module)
12.33
12.34
12.35 -def register_types_ns3_internal(module):
12.36 +def register_types_ns3_Config(module):
12.37 root_module = module.get_root()
12.38
12.39
12.40 @@ -36,7 +36,7 @@
12.41 root_module = module.get_root()
12.42
12.43
12.44 -def register_types_ns3_Config(module):
12.45 +def register_types_ns3_internal(module):
12.46 root_module = module.get_root()
12.47
12.48
12.49 @@ -533,19 +533,19 @@
12.50
12.51 def register_functions(root_module):
12.52 module = root_module
12.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
12.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
12.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
12.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
12.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
12.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
12.59 return
12.60
12.61 -def register_functions_ns3_internal(module, root_module):
12.62 +def register_functions_ns3_Config(module, root_module):
12.63 return
12.64
12.65 def register_functions_ns3_TimeStepPrecision(module, root_module):
12.66 return
12.67
12.68 -def register_functions_ns3_Config(module, root_module):
12.69 +def register_functions_ns3_internal(module, root_module):
12.70 return
12.71
12.72 def register_functions_ns3_olsr(module, root_module):
13.1 --- a/bindings/python/ns3_module_onoff.py Thu Apr 23 15:48:35 2009 +0100
13.2 +++ b/bindings/python/ns3_module_onoff.py Tue Apr 28 17:39:32 2009 +0100
13.3 @@ -6,10 +6,10 @@
13.4 ## onoff-application.h: ns3::OnOffApplication [class]
13.5 module.add_class('OnOffApplication', parent=root_module['ns3::Application'])
13.6
13.7 - ## Register a nested module for the namespace internal
13.8 + ## Register a nested module for the namespace Config
13.9
13.10 - nested_module = module.add_cpp_namespace('internal')
13.11 - register_types_ns3_internal(nested_module)
13.12 + nested_module = module.add_cpp_namespace('Config')
13.13 + register_types_ns3_Config(nested_module)
13.14
13.15
13.16 ## Register a nested module for the namespace TimeStepPrecision
13.17 @@ -18,10 +18,10 @@
13.18 register_types_ns3_TimeStepPrecision(nested_module)
13.19
13.20
13.21 - ## Register a nested module for the namespace Config
13.22 + ## Register a nested module for the namespace internal
13.23
13.24 - nested_module = module.add_cpp_namespace('Config')
13.25 - register_types_ns3_Config(nested_module)
13.26 + nested_module = module.add_cpp_namespace('internal')
13.27 + register_types_ns3_internal(nested_module)
13.28
13.29
13.30 ## Register a nested module for the namespace olsr
13.31 @@ -30,7 +30,7 @@
13.32 register_types_ns3_olsr(nested_module)
13.33
13.34
13.35 -def register_types_ns3_internal(module):
13.36 +def register_types_ns3_Config(module):
13.37 root_module = module.get_root()
13.38
13.39
13.40 @@ -38,7 +38,7 @@
13.41 root_module = module.get_root()
13.42
13.43
13.44 -def register_types_ns3_Config(module):
13.45 +def register_types_ns3_internal(module):
13.46 root_module = module.get_root()
13.47
13.48
13.49 @@ -83,21 +83,21 @@
13.50
13.51 def register_functions(root_module):
13.52 module = root_module
13.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
13.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
13.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
13.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
13.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
13.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
13.59 return
13.60
13.61 +def register_functions_ns3_Config(module, root_module):
13.62 + return
13.63 +
13.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
13.65 + return
13.66 +
13.67 def register_functions_ns3_internal(module, root_module):
13.68 return
13.69
13.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
13.71 - return
13.72 -
13.73 -def register_functions_ns3_Config(module, root_module):
13.74 - return
13.75 -
13.76 def register_functions_ns3_olsr(module, root_module):
13.77 return
13.78
14.1 --- a/bindings/python/ns3_module_packet_sink.py Thu Apr 23 15:48:35 2009 +0100
14.2 +++ b/bindings/python/ns3_module_packet_sink.py Tue Apr 28 17:39:32 2009 +0100
14.3 @@ -6,10 +6,10 @@
14.4 ## packet-sink.h: ns3::PacketSink [class]
14.5 module.add_class('PacketSink', parent=root_module['ns3::Application'])
14.6
14.7 - ## Register a nested module for the namespace internal
14.8 + ## Register a nested module for the namespace Config
14.9
14.10 - nested_module = module.add_cpp_namespace('internal')
14.11 - register_types_ns3_internal(nested_module)
14.12 + nested_module = module.add_cpp_namespace('Config')
14.13 + register_types_ns3_Config(nested_module)
14.14
14.15
14.16 ## Register a nested module for the namespace TimeStepPrecision
14.17 @@ -18,10 +18,10 @@
14.18 register_types_ns3_TimeStepPrecision(nested_module)
14.19
14.20
14.21 - ## Register a nested module for the namespace Config
14.22 + ## Register a nested module for the namespace internal
14.23
14.24 - nested_module = module.add_cpp_namespace('Config')
14.25 - register_types_ns3_Config(nested_module)
14.26 + nested_module = module.add_cpp_namespace('internal')
14.27 + register_types_ns3_internal(nested_module)
14.28
14.29
14.30 ## Register a nested module for the namespace olsr
14.31 @@ -30,7 +30,7 @@
14.32 register_types_ns3_olsr(nested_module)
14.33
14.34
14.35 -def register_types_ns3_internal(module):
14.36 +def register_types_ns3_Config(module):
14.37 root_module = module.get_root()
14.38
14.39
14.40 @@ -38,7 +38,7 @@
14.41 root_module = module.get_root()
14.42
14.43
14.44 -def register_types_ns3_Config(module):
14.45 +def register_types_ns3_internal(module):
14.46 root_module = module.get_root()
14.47
14.48
14.49 @@ -79,21 +79,21 @@
14.50
14.51 def register_functions(root_module):
14.52 module = root_module
14.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
14.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
14.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
14.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
14.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
14.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
14.59 return
14.60
14.61 +def register_functions_ns3_Config(module, root_module):
14.62 + return
14.63 +
14.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
14.65 + return
14.66 +
14.67 def register_functions_ns3_internal(module, root_module):
14.68 return
14.69
14.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
14.71 - return
14.72 -
14.73 -def register_functions_ns3_Config(module, root_module):
14.74 - return
14.75 -
14.76 def register_functions_ns3_olsr(module, root_module):
14.77 return
14.78
15.1 --- a/bindings/python/ns3_module_point_to_point.py Thu Apr 23 15:48:35 2009 +0100
15.2 +++ b/bindings/python/ns3_module_point_to_point.py Tue Apr 28 17:39:32 2009 +0100
15.3 @@ -3,15 +3,17 @@
15.4 def register_types(module):
15.5 root_module = module.get_root()
15.6
15.7 + ## ppp-header.h: ns3::PppHeader [class]
15.8 + module.add_class('PppHeader', parent=root_module['ns3::Header'])
15.9 ## point-to-point-channel.h: ns3::PointToPointChannel [class]
15.10 module.add_class('PointToPointChannel', parent=root_module['ns3::Channel'])
15.11 ## point-to-point-net-device.h: ns3::PointToPointNetDevice [class]
15.12 module.add_class('PointToPointNetDevice', parent=root_module['ns3::NetDevice'])
15.13
15.14 - ## Register a nested module for the namespace internal
15.15 + ## Register a nested module for the namespace Config
15.16
15.17 - nested_module = module.add_cpp_namespace('internal')
15.18 - register_types_ns3_internal(nested_module)
15.19 + nested_module = module.add_cpp_namespace('Config')
15.20 + register_types_ns3_Config(nested_module)
15.21
15.22
15.23 ## Register a nested module for the namespace TimeStepPrecision
15.24 @@ -20,10 +22,10 @@
15.25 register_types_ns3_TimeStepPrecision(nested_module)
15.26
15.27
15.28 - ## Register a nested module for the namespace Config
15.29 + ## Register a nested module for the namespace internal
15.30
15.31 - nested_module = module.add_cpp_namespace('Config')
15.32 - register_types_ns3_Config(nested_module)
15.33 + nested_module = module.add_cpp_namespace('internal')
15.34 + register_types_ns3_internal(nested_module)
15.35
15.36
15.37 ## Register a nested module for the namespace olsr
15.38 @@ -32,7 +34,7 @@
15.39 register_types_ns3_olsr(nested_module)
15.40
15.41
15.42 -def register_types_ns3_internal(module):
15.43 +def register_types_ns3_Config(module):
15.44 root_module = module.get_root()
15.45
15.46
15.47 @@ -40,7 +42,7 @@
15.48 root_module = module.get_root()
15.49
15.50
15.51 -def register_types_ns3_Config(module):
15.52 +def register_types_ns3_internal(module):
15.53 root_module = module.get_root()
15.54
15.55
15.56 @@ -49,10 +51,48 @@
15.57
15.58
15.59 def register_methods(root_module):
15.60 + register_Ns3PppHeader_methods(root_module, root_module['ns3::PppHeader'])
15.61 register_Ns3PointToPointChannel_methods(root_module, root_module['ns3::PointToPointChannel'])
15.62 register_Ns3PointToPointNetDevice_methods(root_module, root_module['ns3::PointToPointNetDevice'])
15.63 return
15.64
15.65 +def register_Ns3PppHeader_methods(root_module, cls):
15.66 + ## ppp-header.h: ns3::PppHeader::PppHeader(ns3::PppHeader const & arg0) [copy constructor]
15.67 + cls.add_constructor([param('ns3::PppHeader const &', 'arg0')])
15.68 + ## ppp-header.h: ns3::PppHeader::PppHeader() [constructor]
15.69 + cls.add_constructor([])
15.70 + ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function]
15.71 + cls.add_method('GetTypeId',
15.72 + 'ns3::TypeId',
15.73 + [],
15.74 + is_static=True)
15.75 + ## ppp-header.h: ns3::TypeId ns3::PppHeader::GetInstanceTypeId() const [member function]
15.76 + cls.add_method('GetInstanceTypeId',
15.77 + 'ns3::TypeId',
15.78 + [],
15.79 + is_const=True, is_virtual=True)
15.80 + ## ppp-header.h: void ns3::PppHeader::Print(std::ostream & os) const [member function]
15.81 + cls.add_method('Print',
15.82 + 'void',
15.83 + [param('std::ostream &', 'os')],
15.84 + is_const=True, is_virtual=True)
15.85 + ## ppp-header.h: void ns3::PppHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
15.86 + cls.add_method('Serialize',
15.87 + 'void',
15.88 + [param('ns3::Buffer::Iterator', 'start')],
15.89 + is_const=True, is_virtual=True)
15.90 + ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
15.91 + cls.add_method('Deserialize',
15.92 + 'uint32_t',
15.93 + [param('ns3::Buffer::Iterator', 'start')],
15.94 + is_virtual=True)
15.95 + ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function]
15.96 + cls.add_method('GetSerializedSize',
15.97 + 'uint32_t',
15.98 + [],
15.99 + is_const=True, is_virtual=True)
15.100 + return
15.101 +
15.102 def register_Ns3PointToPointChannel_methods(root_module, cls):
15.103 ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor]
15.104 cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')])
15.105 @@ -264,21 +304,21 @@
15.106
15.107 def register_functions(root_module):
15.108 module = root_module
15.109 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
15.110 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
15.111 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
15.112 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
15.113 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
15.114 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
15.115 return
15.116
15.117 +def register_functions_ns3_Config(module, root_module):
15.118 + return
15.119 +
15.120 +def register_functions_ns3_TimeStepPrecision(module, root_module):
15.121 + return
15.122 +
15.123 def register_functions_ns3_internal(module, root_module):
15.124 return
15.125
15.126 -def register_functions_ns3_TimeStepPrecision(module, root_module):
15.127 - return
15.128 -
15.129 -def register_functions_ns3_Config(module, root_module):
15.130 - return
15.131 -
15.132 def register_functions_ns3_olsr(module, root_module):
15.133 return
15.134
16.1 --- a/bindings/python/ns3_module_simulator.py Thu Apr 23 15:48:35 2009 +0100
16.2 +++ b/bindings/python/ns3_module_simulator.py Tue Apr 28 17:39:32 2009 +0100
16.3 @@ -60,10 +60,10 @@
16.4 ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration]
16.5 module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl'])
16.6
16.7 - ## Register a nested module for the namespace internal
16.8 + ## Register a nested module for the namespace Config
16.9
16.10 - nested_module = module.add_cpp_namespace('internal')
16.11 - register_types_ns3_internal(nested_module)
16.12 + nested_module = module.add_cpp_namespace('Config')
16.13 + register_types_ns3_Config(nested_module)
16.14
16.15
16.16 ## Register a nested module for the namespace TimeStepPrecision
16.17 @@ -72,10 +72,10 @@
16.18 register_types_ns3_TimeStepPrecision(nested_module)
16.19
16.20
16.21 - ## Register a nested module for the namespace Config
16.22 + ## Register a nested module for the namespace internal
16.23
16.24 - nested_module = module.add_cpp_namespace('Config')
16.25 - register_types_ns3_Config(nested_module)
16.26 + nested_module = module.add_cpp_namespace('internal')
16.27 + register_types_ns3_internal(nested_module)
16.28
16.29
16.30 ## Register a nested module for the namespace olsr
16.31 @@ -84,7 +84,7 @@
16.32 register_types_ns3_olsr(nested_module)
16.33
16.34
16.35 -def register_types_ns3_internal(module):
16.36 +def register_types_ns3_Config(module):
16.37 root_module = module.get_root()
16.38
16.39
16.40 @@ -94,7 +94,7 @@
16.41 ## nstime.h: ns3::TimeStepPrecision::precision_t [enumeration]
16.42 module.add_enum('precision_t', ['S', 'MS', 'US', 'NS', 'PS', 'FS'])
16.43
16.44 -def register_types_ns3_Config(module):
16.45 +def register_types_ns3_internal(module):
16.46 root_module = module.get_root()
16.47
16.48
16.49 @@ -1420,77 +1420,77 @@
16.50
16.51 def register_functions(root_module):
16.52 module = root_module
16.53 + ## high-precision.h: extern ns3::HighPrecision ns3::Abs(ns3::HighPrecision const & value) [free function]
16.54 + module.add_function('Abs',
16.55 + 'ns3::HighPrecision',
16.56 + [param('ns3::HighPrecision const &', 'value')])
16.57 + ## nstime.h: extern ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
16.58 + module.add_function('FemtoSeconds',
16.59 + 'ns3::Time',
16.60 + [param('uint64_t', 'fs')])
16.61 + ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
16.62 + module.add_function('MakeTimeChecker',
16.63 + 'ns3::Ptr< ns3::AttributeChecker const >',
16.64 + [])
16.65 ## high-precision.h: extern ns3::HighPrecision ns3::Max(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
16.66 module.add_function('Max',
16.67 'ns3::HighPrecision',
16.68 [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
16.69 - ## nstime.h: extern ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
16.70 - module.add_function('FemtoSeconds',
16.71 - 'ns3::Time',
16.72 - [param('uint64_t', 'fs')])
16.73 ## nstime.h: extern ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
16.74 module.add_function('MicroSeconds',
16.75 'ns3::Time',
16.76 [param('uint64_t', 'us')])
16.77 + ## nstime.h: extern ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
16.78 + module.add_function('MilliSeconds',
16.79 + 'ns3::Time',
16.80 + [param('uint64_t', 'ms')])
16.81 + ## high-precision.h: extern ns3::HighPrecision ns3::Min(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
16.82 + module.add_function('Min',
16.83 + 'ns3::HighPrecision',
16.84 + [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
16.85 + ## nstime.h: extern ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
16.86 + module.add_function('NanoSeconds',
16.87 + 'ns3::Time',
16.88 + [param('uint64_t', 'ns')])
16.89 ## simulator.h: extern ns3::Time ns3::Now() [free function]
16.90 module.add_function('Now',
16.91 'ns3::Time',
16.92 [])
16.93 - ## nstime.h: extern ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
16.94 - module.add_function('MilliSeconds',
16.95 + ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
16.96 + module.add_function('PicoSeconds',
16.97 'ns3::Time',
16.98 - [param('uint64_t', 'ms')])
16.99 - ## nstime.h: extern ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
16.100 - module.add_function('NanoSeconds',
16.101 - 'ns3::Time',
16.102 - [param('uint64_t', 'ns')])
16.103 - ## high-precision.h: extern ns3::HighPrecision ns3::Abs(ns3::HighPrecision const & value) [free function]
16.104 - module.add_function('Abs',
16.105 - 'ns3::HighPrecision',
16.106 - [param('ns3::HighPrecision const &', 'value')])
16.107 - ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
16.108 - module.add_function('MakeTimeChecker',
16.109 - 'ns3::Ptr< ns3::AttributeChecker const >',
16.110 - [])
16.111 + [param('uint64_t', 'ps')])
16.112 ## nstime.h: extern ns3::Time ns3::Seconds(double seconds) [free function]
16.113 module.add_function('Seconds',
16.114 'ns3::Time',
16.115 [param('double', 'seconds')])
16.116 - ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
16.117 - module.add_function('PicoSeconds',
16.118 - 'ns3::Time',
16.119 - [param('uint64_t', 'ps')])
16.120 - ## high-precision.h: extern ns3::HighPrecision ns3::Min(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
16.121 - module.add_function('Min',
16.122 - 'ns3::HighPrecision',
16.123 - [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
16.124 ## nstime.h: extern ns3::Time ns3::TimeStep(uint64_t ts) [free function]
16.125 module.add_function('TimeStep',
16.126 'ns3::Time',
16.127 [param('uint64_t', 'ts')])
16.128 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
16.129 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
16.130 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
16.131 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
16.132 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
16.133 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
16.134 return
16.135
16.136 +def register_functions_ns3_Config(module, root_module):
16.137 + return
16.138 +
16.139 +def register_functions_ns3_TimeStepPrecision(module, root_module):
16.140 + ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
16.141 + module.add_function('Get',
16.142 + 'ns3::TimeStepPrecision::precision_t',
16.143 + [])
16.144 + ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
16.145 + module.add_function('Set',
16.146 + 'void',
16.147 + [param('ns3::TimeStepPrecision::precision_t', 'precision')])
16.148 + return
16.149 +
16.150 def register_functions_ns3_internal(module, root_module):
16.151 return
16.152
16.153 -def register_functions_ns3_TimeStepPrecision(module, root_module):
16.154 - ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
16.155 - module.add_function('Set',
16.156 - 'void',
16.157 - [param('ns3::TimeStepPrecision::precision_t', 'precision')])
16.158 - ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
16.159 - module.add_function('Get',
16.160 - 'ns3::TimeStepPrecision::precision_t',
16.161 - [])
16.162 - return
16.163 -
16.164 -def register_functions_ns3_Config(module, root_module):
16.165 - return
16.166 -
16.167 def register_functions_ns3_olsr(module, root_module):
16.168 return
16.169
17.1 --- a/bindings/python/ns3_module_stats.py Thu Apr 23 15:48:35 2009 +0100
17.2 +++ b/bindings/python/ns3_module_stats.py Tue Apr 28 17:39:32 2009 +0100
17.3 @@ -26,10 +26,10 @@
17.4 ## packet-data-calculators.h: ns3::PacketCounterCalculator [class]
17.5 module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
17.6
17.7 - ## Register a nested module for the namespace internal
17.8 + ## Register a nested module for the namespace Config
17.9
17.10 - nested_module = module.add_cpp_namespace('internal')
17.11 - register_types_ns3_internal(nested_module)
17.12 + nested_module = module.add_cpp_namespace('Config')
17.13 + register_types_ns3_Config(nested_module)
17.14
17.15
17.16 ## Register a nested module for the namespace TimeStepPrecision
17.17 @@ -38,10 +38,10 @@
17.18 register_types_ns3_TimeStepPrecision(nested_module)
17.19
17.20
17.21 - ## Register a nested module for the namespace Config
17.22 + ## Register a nested module for the namespace internal
17.23
17.24 - nested_module = module.add_cpp_namespace('Config')
17.25 - register_types_ns3_Config(nested_module)
17.26 + nested_module = module.add_cpp_namespace('internal')
17.27 + register_types_ns3_internal(nested_module)
17.28
17.29
17.30 ## Register a nested module for the namespace olsr
17.31 @@ -50,7 +50,7 @@
17.32 register_types_ns3_olsr(nested_module)
17.33
17.34
17.35 -def register_types_ns3_internal(module):
17.36 +def register_types_ns3_Config(module):
17.37 root_module = module.get_root()
17.38
17.39
17.40 @@ -58,7 +58,7 @@
17.41 root_module = module.get_root()
17.42
17.43
17.44 -def register_types_ns3_Config(module):
17.45 +def register_types_ns3_internal(module):
17.46 root_module = module.get_root()
17.47
17.48
17.49 @@ -417,21 +417,21 @@
17.50
17.51 def register_functions(root_module):
17.52 module = root_module
17.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
17.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
17.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
17.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
17.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
17.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
17.59 return
17.60
17.61 +def register_functions_ns3_Config(module, root_module):
17.62 + return
17.63 +
17.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
17.65 + return
17.66 +
17.67 def register_functions_ns3_internal(module, root_module):
17.68 return
17.69
17.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
17.71 - return
17.72 -
17.73 -def register_functions_ns3_Config(module, root_module):
17.74 - return
17.75 -
17.76 def register_functions_ns3_olsr(module, root_module):
17.77 return
17.78
18.1 --- a/bindings/python/ns3_module_udp_echo.py Thu Apr 23 15:48:35 2009 +0100
18.2 +++ b/bindings/python/ns3_module_udp_echo.py Tue Apr 28 17:39:32 2009 +0100
18.3 @@ -8,10 +8,10 @@
18.4 ## udp-echo-server.h: ns3::UdpEchoServer [class]
18.5 module.add_class('UdpEchoServer', parent=root_module['ns3::Application'])
18.6
18.7 - ## Register a nested module for the namespace internal
18.8 + ## Register a nested module for the namespace Config
18.9
18.10 - nested_module = module.add_cpp_namespace('internal')
18.11 - register_types_ns3_internal(nested_module)
18.12 + nested_module = module.add_cpp_namespace('Config')
18.13 + register_types_ns3_Config(nested_module)
18.14
18.15
18.16 ## Register a nested module for the namespace TimeStepPrecision
18.17 @@ -20,10 +20,10 @@
18.18 register_types_ns3_TimeStepPrecision(nested_module)
18.19
18.20
18.21 - ## Register a nested module for the namespace Config
18.22 + ## Register a nested module for the namespace internal
18.23
18.24 - nested_module = module.add_cpp_namespace('Config')
18.25 - register_types_ns3_Config(nested_module)
18.26 + nested_module = module.add_cpp_namespace('internal')
18.27 + register_types_ns3_internal(nested_module)
18.28
18.29
18.30 ## Register a nested module for the namespace olsr
18.31 @@ -32,7 +32,7 @@
18.32 register_types_ns3_olsr(nested_module)
18.33
18.34
18.35 -def register_types_ns3_internal(module):
18.36 +def register_types_ns3_Config(module):
18.37 root_module = module.get_root()
18.38
18.39
18.40 @@ -40,7 +40,7 @@
18.41 root_module = module.get_root()
18.42
18.43
18.44 -def register_types_ns3_Config(module):
18.45 +def register_types_ns3_internal(module):
18.46 root_module = module.get_root()
18.47
18.48
18.49 @@ -113,21 +113,21 @@
18.50
18.51 def register_functions(root_module):
18.52 module = root_module
18.53 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
18.54 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
18.55 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
18.56 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
18.57 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
18.58 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
18.59 return
18.60
18.61 +def register_functions_ns3_Config(module, root_module):
18.62 + return
18.63 +
18.64 +def register_functions_ns3_TimeStepPrecision(module, root_module):
18.65 + return
18.66 +
18.67 def register_functions_ns3_internal(module, root_module):
18.68 return
18.69
18.70 -def register_functions_ns3_TimeStepPrecision(module, root_module):
18.71 - return
18.72 -
18.73 -def register_functions_ns3_Config(module, root_module):
18.74 - return
18.75 -
18.76 def register_functions_ns3_olsr(module, root_module):
18.77 return
18.78
19.1 --- a/bindings/python/ns3_module_wifi.py Thu Apr 23 15:48:35 2009 +0100
19.2 +++ b/bindings/python/ns3_module_wifi.py Tue Apr 28 17:39:32 2009 +0100
19.3 @@ -96,10 +96,10 @@
19.4 ## aarf-wifi-manager.h: ns3::AarfWifiManager [class]
19.5 module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager'])
19.6
19.7 - ## Register a nested module for the namespace internal
19.8 + ## Register a nested module for the namespace Config
19.9
19.10 - nested_module = module.add_cpp_namespace('internal')
19.11 - register_types_ns3_internal(nested_module)
19.12 + nested_module = module.add_cpp_namespace('Config')
19.13 + register_types_ns3_Config(nested_module)
19.14
19.15
19.16 ## Register a nested module for the namespace TimeStepPrecision
19.17 @@ -108,10 +108,10 @@
19.18 register_types_ns3_TimeStepPrecision(nested_module)
19.19
19.20
19.21 - ## Register a nested module for the namespace Config
19.22 + ## Register a nested module for the namespace internal
19.23
19.24 - nested_module = module.add_cpp_namespace('Config')
19.25 - register_types_ns3_Config(nested_module)
19.26 + nested_module = module.add_cpp_namespace('internal')
19.27 + register_types_ns3_internal(nested_module)
19.28
19.29
19.30 ## Register a nested module for the namespace olsr
19.31 @@ -120,7 +120,7 @@
19.32 register_types_ns3_olsr(nested_module)
19.33
19.34
19.35 -def register_types_ns3_internal(module):
19.36 +def register_types_ns3_Config(module):
19.37 root_module = module.get_root()
19.38
19.39
19.40 @@ -128,7 +128,7 @@
19.41 root_module = module.get_root()
19.42
19.43
19.44 -def register_types_ns3_Config(module):
19.45 +def register_types_ns3_internal(module):
19.46 root_module = module.get_root()
19.47
19.48
19.49 @@ -2547,29 +2547,29 @@
19.50
19.51 def register_functions(root_module):
19.52 module = root_module
19.53 + ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
19.54 + module.add_function('MakeSsidChecker',
19.55 + 'ns3::Ptr< ns3::AttributeChecker const >',
19.56 + [])
19.57 ## wifi-mode.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeWifiModeChecker() [free function]
19.58 module.add_function('MakeWifiModeChecker',
19.59 'ns3::Ptr< ns3::AttributeChecker const >',
19.60 [])
19.61 - ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
19.62 - module.add_function('MakeSsidChecker',
19.63 - 'ns3::Ptr< ns3::AttributeChecker const >',
19.64 - [])
19.65 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
19.66 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
19.67 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
19.68 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
19.69 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
19.70 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
19.71 return
19.72
19.73 +def register_functions_ns3_Config(module, root_module):
19.74 + return
19.75 +
19.76 +def register_functions_ns3_TimeStepPrecision(module, root_module):
19.77 + return
19.78 +
19.79 def register_functions_ns3_internal(module, root_module):
19.80 return
19.81
19.82 -def register_functions_ns3_TimeStepPrecision(module, root_module):
19.83 - return
19.84 -
19.85 -def register_functions_ns3_Config(module, root_module):
19.86 - return
19.87 -
19.88 def register_functions_ns3_olsr(module, root_module):
19.89 return
19.90
20.1 --- a/bindings/python/ns3modulegen_generated.py Thu Apr 23 15:48:35 2009 +0100
20.2 +++ b/bindings/python/ns3modulegen_generated.py Tue Apr 28 17:39:32 2009 +0100
20.3 @@ -28,6 +28,7 @@
20.4 import ns3_module_global_routing
20.5 import ns3_module_onoff
20.6 import ns3_module_olsr
20.7 +import ns3_module_flow_monitor
20.8 import ns3_module_udp_echo
20.9 import ns3_module_helper
20.10
20.11 @@ -214,6 +215,17 @@
20.12 ns3_module_olsr__local.register_types(module)
20.13
20.14 root_module.end_section('ns3_module_olsr')
20.15 + root_module.begin_section('ns3_module_flow_monitor')
20.16 + ns3_module_flow_monitor.register_types(module)
20.17 +
20.18 + try:
20.19 + import ns3_module_flow_monitor__local
20.20 + except ImportError:
20.21 + pass
20.22 + else:
20.23 + ns3_module_flow_monitor__local.register_types(module)
20.24 +
20.25 + root_module.end_section('ns3_module_flow_monitor')
20.26 root_module.begin_section('ns3_module_udp_echo')
20.27 ns3_module_udp_echo.register_types(module)
20.28
20.29 @@ -241,10 +253,10 @@
20.30 module.add_container('std::set< unsigned int >', 'unsigned int', container_type='set')
20.31 module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
20.32
20.33 - ## Register a nested module for the namespace internal
20.34 + ## Register a nested module for the namespace Config
20.35
20.36 - nested_module = module.add_cpp_namespace('internal')
20.37 - register_types_ns3_internal(nested_module)
20.38 + nested_module = module.add_cpp_namespace('Config')
20.39 + register_types_ns3_Config(nested_module)
20.40
20.41
20.42 ## Register a nested module for the namespace TimeStepPrecision
20.43 @@ -253,10 +265,10 @@
20.44 register_types_ns3_TimeStepPrecision(nested_module)
20.45
20.46
20.47 - ## Register a nested module for the namespace Config
20.48 + ## Register a nested module for the namespace internal
20.49
20.50 - nested_module = module.add_cpp_namespace('Config')
20.51 - register_types_ns3_Config(nested_module)
20.52 + nested_module = module.add_cpp_namespace('internal')
20.53 + register_types_ns3_internal(nested_module)
20.54
20.55
20.56 ## Register a nested module for the namespace olsr
20.57 @@ -265,7 +277,7 @@
20.58 register_types_ns3_olsr(nested_module)
20.59
20.60
20.61 -def register_types_ns3_internal(module):
20.62 +def register_types_ns3_Config(module):
20.63 root_module = module.get_root()
20.64
20.65
20.66 @@ -273,7 +285,7 @@
20.67 root_module = module.get_root()
20.68
20.69
20.70 -def register_types_ns3_Config(module):
20.71 +def register_types_ns3_internal(module):
20.72 root_module = module.get_root()
20.73
20.74
20.75 @@ -458,6 +470,17 @@
20.76 ns3_module_olsr__local.register_methods(root_module)
20.77
20.78 root_module.end_section('ns3_module_olsr')
20.79 + root_module.begin_section('ns3_module_flow_monitor')
20.80 + ns3_module_flow_monitor.register_methods(root_module)
20.81 +
20.82 + try:
20.83 + import ns3_module_flow_monitor__local
20.84 + except ImportError:
20.85 + pass
20.86 + else:
20.87 + ns3_module_flow_monitor__local.register_methods(root_module)
20.88 +
20.89 + root_module.end_section('ns3_module_flow_monitor')
20.90 root_module.begin_section('ns3_module_udp_echo')
20.91 ns3_module_udp_echo.register_methods(root_module)
20.92
20.93 @@ -660,6 +683,17 @@
20.94 ns3_module_olsr__local.register_functions(root_module)
20.95
20.96 root_module.end_section('ns3_module_olsr')
20.97 + root_module.begin_section('ns3_module_flow_monitor')
20.98 + ns3_module_flow_monitor.register_functions(root_module)
20.99 +
20.100 + try:
20.101 + import ns3_module_flow_monitor__local
20.102 + except ImportError:
20.103 + pass
20.104 + else:
20.105 + ns3_module_flow_monitor__local.register_functions(root_module)
20.106 +
20.107 + root_module.end_section('ns3_module_flow_monitor')
20.108 root_module.begin_section('ns3_module_udp_echo')
20.109 ns3_module_udp_echo.register_functions(root_module)
20.110
20.111 @@ -682,19 +716,19 @@
20.112 ns3_module_helper__local.register_functions(root_module)
20.113
20.114 root_module.end_section('ns3_module_helper')
20.115 + register_functions_ns3_Config(module.get_submodule('Config'), root_module)
20.116 + register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
20.117 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
20.118 - register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
20.119 - register_functions_ns3_Config(module.get_submodule('Config'), root_module)
20.120 register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
20.121 return
20.122
20.123 -def register_functions_ns3_internal(module, root_module):
20.124 +def register_functions_ns3_Config(module, root_module):
20.125 return
20.126
20.127 def register_functions_ns3_TimeStepPrecision(module, root_module):
20.128 return
20.129
20.130 -def register_functions_ns3_Config(module, root_module):
20.131 +def register_functions_ns3_internal(module, root_module):
20.132 return
20.133
20.134 def register_functions_ns3_olsr(module, root_module):
21.1 --- a/src/contrib/flow-monitor/flow-classifier.cc Thu Apr 23 15:48:35 2009 +0100
21.2 +++ b/src/contrib/flow-monitor/flow-classifier.cc Tue Apr 28 17:39:32 2009 +0100
21.3 @@ -22,23 +22,6 @@
21.4
21.5 namespace ns3 {
21.6
21.7 -TypeId
21.8 -FlowClassifier::GetTypeId (void)
21.9 -{
21.10 - static TypeId tid = TypeId ("ns3::FlowClassifier")
21.11 - .SetParent<Object> ()
21.12 - ;
21.13 - return tid;
21.14 -}
21.15 -
21.16 -
21.17 -TypeId
21.18 -FlowClassifier::GetInstanceTypeId (void) const
21.19 -{
21.20 - return GetTypeId ();
21.21 -}
21.22 -
21.23 -
21.24 FlowClassifier::FlowClassifier ()
21.25 :
21.26 m_lastNewFlowId (0)
22.1 --- a/src/contrib/flow-monitor/flow-classifier.h Thu Apr 23 15:48:35 2009 +0100
22.2 +++ b/src/contrib/flow-monitor/flow-classifier.h Tue Apr 28 17:39:32 2009 +0100
22.3 @@ -18,24 +18,23 @@
22.4 // Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
22.5 //
22.6
22.7 -#ifndef __FLOW_MONITOR_PROBE_H__
22.8 -#define __FLOW_MONITOR_PROBE_H__
22.9 +#ifndef __FLOW_CLASSIFIER_H__
22.10 +#define __FLOW_CLASSIFIER_H__
22.11
22.12 -#include "ns3/object.h"
22.13 +#include "ns3/ref-count-base.h"
22.14
22.15 namespace ns3 {
22.16
22.17 -typedef uint32_t FlowId;
22.18 +typedef uint32_t FlowId;
22.19 +typedef uint32_t FlowPacketId;
22.20
22.21
22.22 -class FlowClassifier : public Object
22.23 +class FlowClassifier : public RefCountBase
22.24 {
22.25 FlowId m_lastNewFlowId;
22.26
22.27 public:
22.28
22.29 - static TypeId GetTypeId (void);
22.30 - virtual TypeId GetInstanceTypeId (void) const;
22.31 FlowClassifier ();
22.32
22.33 protected:
23.1 --- a/src/contrib/flow-monitor/flow-monitor.cc Thu Apr 23 15:48:35 2009 +0100
23.2 +++ b/src/contrib/flow-monitor/flow-monitor.cc Tue Apr 28 17:39:32 2009 +0100
23.3 @@ -19,32 +19,177 @@
23.4 //
23.5
23.6 #include "flow-monitor.h"
23.7 +#include "ns3/simulator.h"
23.8 +#include "ns3/log.h"
23.9 +
23.10 +#define PERIODIC_CHECK_INTERVAL (Seconds (1))
23.11
23.12 namespace ns3 {
23.13
23.14 +NS_LOG_COMPONENT_DEFINE ("FlowMonitor");
23.15 +
23.16 +
23.17 +TypeId
23.18 +FlowMonitor::GetTypeId (void)
23.19 +{
23.20 + static TypeId tid = TypeId ("ns3::FlowMonitor")
23.21 + .SetParent<Object> ()
23.22 + .AddConstructor<FlowMonitor> ()
23.23 + .AddAttribute ("MaxPerHopDelay", ("The maximum per-hop delay that should be considered. "
23.24 + "Packets still not received after this delay are to be considered lost."),
23.25 + TimeValue (Seconds (10.0)),
23.26 + MakeTimeAccessor (&FlowMonitor::m_maxPerHopDelay),
23.27 + MakeTimeChecker ())
23.28 + ;
23.29 + return tid;
23.30 +}
23.31 +
23.32 +TypeId
23.33 +FlowMonitor::GetInstanceTypeId (void) const
23.34 +{
23.35 + return GetTypeId ();
23.36 +}
23.37
23.38 FlowMonitor::FlowMonitor ()
23.39 {
23.40 }
23.41
23.42 -void
23.43 -FlowMonitor::ReportFirstTx (uint32_t flowId, uint32_t packetId)
23.44 +
23.45 +inline FlowMonitor::FlowStats&
23.46 +FlowMonitor::GetStatsForFlow (FlowId flowId)
23.47 {
23.48 + std::map<FlowId, FlowStats>::iterator iter;
23.49 + iter = m_flowStats.find (flowId);
23.50 + if (iter == m_flowStats.end ())
23.51 + {
23.52 + FlowMonitor::FlowStats &ref = m_flowStats[flowId];
23.53 + ref.delaySum = Seconds (0);
23.54 + ref.txBytes = 0;
23.55 + ref.rxBytes = 0;
23.56 + ref.txPackets = 0;
23.57 + ref.rxPackets = 0;
23.58 + ref.lostPackets = 0;
23.59 + ref.timesForwarded = 0;
23.60 + return ref;
23.61 + }
23.62 + else
23.63 + {
23.64 + return iter->second;
23.65 + }
23.66 }
23.67
23.68
23.69 void
23.70 -FlowMonitor::ReportLastRx (uint32_t flowId, uint32_t packetId)
23.71 +FlowMonitor::ReportFirstTx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
23.72 {
23.73 + TrackedPacket &tracked = m_trackedPackets[std::make_pair (flowId, packetId)];
23.74 + tracked.firstSeenTime = Simulator::Now ();
23.75 + tracked.lastSeenTime = tracked.firstSeenTime;
23.76 + tracked.timesForwarded = 0;
23.77 +
23.78 + probe->AddPacketStats (flowId, packetSize, Seconds (0));
23.79 +
23.80 + FlowStats &stats = GetStatsForFlow (flowId);
23.81 + stats.txBytes += packetSize;
23.82 + stats.txPackets++;
23.83 }
23.84
23.85
23.86 -std::vector<FlowMonitor::Flow>
23.87 -FlowMonitor::GetFlows () const
23.88 +void
23.89 +FlowMonitor::ReportForwarding (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
23.90 {
23.91 - std::vector<FlowMonitor::Flow> retval;
23.92 - // TODO
23.93 - return retval;
23.94 + std::pair<FlowId, FlowPacketId> key (flowId, packetId);
23.95 + TrackedPacketMap::iterator tracked = m_trackedPackets.find (key);
23.96 + if (tracked == m_trackedPackets.end ())
23.97 + {
23.98 + NS_LOG_WARN ("Received packet forward report (flowId=" << flowId << ", packetId=" << packetId
23.99 + << ") but not known to be transmitted.");
23.100 + return;
23.101 + }
23.102 +
23.103 + tracked->second.timesForwarded++;
23.104 + tracked->second.lastSeenTime = Simulator::Now ();
23.105 +
23.106 + Time delay = (tracked->second.firstSeenTime - Simulator::Now ());
23.107 + probe->AddPacketStats (flowId, packetSize, delay);
23.108 +}
23.109 +
23.110 +
23.111 +void
23.112 +FlowMonitor::ReportLastRx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
23.113 +{
23.114 + TrackedPacketMap::iterator tracked = m_trackedPackets.find (std::make_pair (flowId, packetId));
23.115 + if (tracked == m_trackedPackets.end ())
23.116 + {
23.117 + NS_LOG_WARN ("Received packet last-tx report (flowId=" << flowId << ", packetId=" << packetId
23.118 + << ") but not known to be transmitted.");
23.119 + return;
23.120 + }
23.121 +
23.122 + Time delay = (tracked->second.firstSeenTime - Simulator::Now ());
23.123 + probe->AddPacketStats (flowId, packetSize, delay);
23.124 +
23.125 + FlowStats &stats = GetStatsForFlow (flowId);
23.126 + stats.delaySum += delay;
23.127 + stats.rxBytes += packetSize;
23.128 + stats.rxPackets++;
23.129 + stats.timesForwarded += tracked->second.timesForwarded;
23.130 +
23.131 + m_trackedPackets.erase (tracked); // we don't need to track this packet anymore
23.132 +}
23.133 +
23.134 +
23.135 +std::map<FlowId, FlowMonitor::FlowStats>
23.136 +FlowMonitor::GetFlowStats () const
23.137 +{
23.138 + return m_flowStats;
23.139 +}
23.140 +
23.141 +
23.142 +void
23.143 +FlowMonitor::CheckForLostPackets (Time maxDelay)
23.144 +{
23.145 + Time now = Simulator::Now ();
23.146 +
23.147 + for (TrackedPacketMap::iterator iter = m_trackedPackets.begin ();
23.148 + iter != m_trackedPackets.end (); )
23.149 + {
23.150 + if (now - iter->second.lastSeenTime >= maxDelay)
23.151 + {
23.152 + // packet is considered lost, add it to the loss statistics
23.153 + std::map<FlowId, FlowStats>::iterator
23.154 + flow = m_flowStats.find (iter->first.first);
23.155 + NS_ASSERT (flow != m_flowStats.end ());
23.156 + flow->second.lostPackets++;
23.157 +
23.158 + // we won't track it anymore
23.159 + m_trackedPackets.erase (iter++);
23.160 + }
23.161 + else
23.162 + {
23.163 + iter++;
23.164 + }
23.165 + }
23.166 +}
23.167 +
23.168 +void
23.169 +FlowMonitor::CheckForLostPackets ()
23.170 +{
23.171 + CheckForLostPackets (m_maxPerHopDelay);
23.172 +}
23.173 +
23.174 +void
23.175 +FlowMonitor::PeriodicCheckForLostPackets ()
23.176 +{
23.177 + CheckForLostPackets ();
23.178 + Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
23.179 +}
23.180 +
23.181 +void
23.182 +FlowMonitor::NotifyConstructionCompleted ()
23.183 +{
23.184 + Object::NotifyConstructionCompleted ();
23.185 + Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
23.186 }
23.187
23.188
24.1 --- a/src/contrib/flow-monitor/flow-monitor.h Thu Apr 23 15:48:35 2009 +0100
24.2 +++ b/src/contrib/flow-monitor/flow-monitor.h Tue Apr 28 17:39:32 2009 +0100
24.3 @@ -25,54 +25,74 @@
24.4 #include <map>
24.5
24.6 #include "ns3/ptr.h"
24.7 +#include "ns3/object.h"
24.8 #include "ns3/flow-probe.h"
24.9 +#include "ns3/flow-classifier.h"
24.10 #include "ns3/nstime.h"
24.11
24.12 namespace ns3 {
24.13
24.14
24.15 -class FlowMonitor
24.16 +class FlowMonitor : public Object
24.17 {
24.18 public:
24.19
24.20 struct FlowStats
24.21 {
24.22 - uint64_t txPackets;
24.23 - uint64_t rxPackets;
24.24 - uint64_t lostPackets;
24.25 + Time delaySum; // delayCount == rxPackets
24.26 uint64_t txBytes;
24.27 uint64_t rxBytes;
24.28 - Time delaySum; // delayCount == rxPackets
24.29 - };
24.30 -
24.31 - struct Flow
24.32 - {
24.33 - uint32_t flowId;
24.34 - FlowStats flowStats;
24.35 + uint32_t txPackets;
24.36 + uint32_t rxPackets;
24.37 + uint32_t lostPackets;
24.38 + uint32_t timesForwarded; // number of times a packet was forwarded, summed for all packets
24.39 };
24.40
24.41 // basic methods
24.42 + static TypeId GetTypeId ();
24.43 + TypeId GetInstanceTypeId () const;
24.44 +
24.45 FlowMonitor ();
24.46 +
24.47 //void AddProbe (Ptr<FlowProbe> probe);
24.48 -
24.49 // common scenario utility methods
24.50 //void MonitorIpv4AllNodes ();
24.51
24.52 // methods to be used by the FlowMonitorProbe's
24.53 - void ReportFirstTx (uint32_t flowId, uint32_t packetId);
24.54 - void ReportLastRx (uint32_t flowId, uint32_t packetId);
24.55 + void ReportFirstTx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
24.56 + void ReportForwarding (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
24.57 + void ReportLastRx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
24.58 +
24.59 + void CheckForLostPackets ();
24.60 + void CheckForLostPackets (Time maxDelay);
24.61 +
24.62 + // remember to call CheckForLostPackets first!
24.63 + std::map<FlowId, FlowStats> GetFlowStats () const;
24.64
24.65 - std::vector<Flow> GetFlows () const;
24.66 +protected:
24.67 +
24.68 + virtual void NotifyConstructionCompleted ();
24.69
24.70 private:
24.71
24.72 struct TrackedPacket
24.73 {
24.74 - Time firstTxTime;
24.75 + Time firstSeenTime; // absolute time when the packet was first seen by a probe
24.76 + Time lastSeenTime; // absolute time when the packet was last seen by a probe
24.77 + uint32_t timesForwarded; // number of times the packet was reportedly forwarded
24.78 };
24.79
24.80 - std::map<uint32_t, FlowStats> m_flowStats;
24.81 - std::map<uint32_t, TrackedPacket> m_trackedPackets;
24.82 + // FlowId --> FlowStats
24.83 + std::map<FlowId, FlowStats> m_flowStats;
24.84 +
24.85 + // (FlowId,PacketId) --> TrackedPacket
24.86 + typedef std::map< std::pair<FlowId, FlowPacketId>, TrackedPacket> TrackedPacketMap;
24.87 + TrackedPacketMap m_trackedPackets;
24.88 + Time m_maxPerHopDelay;
24.89 +
24.90 +
24.91 + FlowStats& GetStatsForFlow (FlowId flowId);
24.92 + void PeriodicCheckForLostPackets ();
24.93 };
24.94
24.95
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/src/contrib/flow-monitor/flow-probe.cc Tue Apr 28 17:39:32 2009 +0100
25.3 @@ -0,0 +1,55 @@
25.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25.5 +//
25.6 +// Copyright (c) 2009 INESC Porto
25.7 +//
25.8 +// This program is free software; you can redistribute it and/or modify
25.9 +// it under the terms of the GNU General Public License version 2 as
25.10 +// published by the Free Software Foundation;
25.11 +//
25.12 +// This program is distributed in the hope that it will be useful,
25.13 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
25.14 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25.15 +// GNU General Public License for more details.
25.16 +//
25.17 +// You should have received a copy of the GNU General Public License
25.18 +// along with this program; if not, write to the Free Software
25.19 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25.20 +//
25.21 +// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
25.22 +//
25.23 +
25.24 +#include "ns3/flow-probe.h"
25.25 +#include "ns3/flow-monitor.h"
25.26 +
25.27 +namespace ns3 {
25.28 +
25.29 +
25.30 +FlowProbe::~FlowProbe ()
25.31 +{
25.32 +}
25.33 +
25.34 +
25.35 +FlowProbe::FlowProbe (Ptr<FlowMonitor> flowMonitor)
25.36 + : m_flowMonitor (flowMonitor)
25.37 +{
25.38 +}
25.39 +
25.40 +void
25.41 +FlowProbe::AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe)
25.42 +{
25.43 + FlowStats &flow = m_stats[flowId];
25.44 + flow.delayFromFirstProbeSum += delayFromFirstProbe;
25.45 + flow.bytes += packetSize;
25.46 + ++flow.packets;
25.47 +}
25.48 +
25.49 +FlowProbe::Stats
25.50 +FlowProbe::GetStats () const
25.51 +{
25.52 + return m_stats;
25.53 +}
25.54 +
25.55 +
25.56 +} // namespace ns3
25.57 +
25.58 +
26.1 --- a/src/contrib/flow-monitor/flow-probe.h Thu Apr 23 15:48:35 2009 +0100
26.2 +++ b/src/contrib/flow-monitor/flow-probe.h Tue Apr 28 17:39:32 2009 +0100
26.3 @@ -21,14 +21,43 @@
26.4 #ifndef __FLOW_PROBE_H__
26.5 #define __FLOW_PROBE_H__
26.6
26.7 +#include <map>
26.8 +
26.9 #include "ns3/ref-count-base.h"
26.10 +#include "ns3/flow-classifier.h"
26.11 +#include "ns3/nstime.h"
26.12
26.13 namespace ns3 {
26.14
26.15 +class FlowMonitor;
26.16 +
26.17
26.18 class FlowProbe : public RefCountBase
26.19 {
26.20 +protected:
26.21
26.22 + FlowProbe (Ptr<FlowMonitor> flowMonitor);
26.23 +
26.24 +public:
26.25 + ~FlowProbe ();
26.26 +
26.27 + struct FlowStats
26.28 + {
26.29 + FlowStats () : delayFromFirstProbeSum (Seconds (0)), bytes (0), packets (0) {}
26.30 +
26.31 + Time delayFromFirstProbeSum; // divide by 'Scalar (packets)' to get the average delay
26.32 + uint64_t bytes;
26.33 + uint32_t packets;
26.34 + };
26.35 +
26.36 + typedef std::map<FlowId, FlowStats> Stats;
26.37 +
26.38 + void AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe);
26.39 + Stats GetStats () const;
26.40 +
26.41 +private:
26.42 + Ptr<FlowMonitor> m_flowMonitor;
26.43 + Stats m_stats;
26.44
26.45 };
26.46
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/src/contrib/flow-monitor/ipv4-flow-classifier.cc Tue Apr 28 17:39:32 2009 +0100
27.3 @@ -0,0 +1,153 @@
27.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
27.5 +//
27.6 +// Copyright (c) 2009 INESC Porto
27.7 +//
27.8 +// This program is free software; you can redistribute it and/or modify
27.9 +// it under the terms of the GNU General Public License version 2 as
27.10 +// published by the Free Software Foundation;
27.11 +//
27.12 +// This program is distributed in the hope that it will be useful,
27.13 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
27.14 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27.15 +// GNU General Public License for more details.
27.16 +//
27.17 +// You should have received a copy of the GNU General Public License
27.18 +// along with this program; if not, write to the Free Software
27.19 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27.20 +//
27.21 +// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
27.22 +//
27.23 +
27.24 +#include "ns3/packet.h"
27.25 +
27.26 +#include "ipv4-flow-classifier.h"
27.27 +#include "ns3/udp-header.h"
27.28 +#include "ns3/tcp-header.h"
27.29 +
27.30 +namespace ns3 {
27.31 +
27.32 +/* see http://www.iana.org/assignments/protocol-numbers */
27.33 +const uint8_t TCP_PROT_NUMBER = 6;
27.34 +const uint8_t UDP_PROT_NUMBER = 17;
27.35 +
27.36 +
27.37 +
27.38 +bool operator < (const Ipv4FlowClassifier::FiveTuple &t1,
27.39 + const Ipv4FlowClassifier::FiveTuple &t2)
27.40 +{
27.41 + if (t1.sourceAddress < t2.sourceAddress)
27.42 + {
27.43 + return true;
27.44 + }
27.45 + if (t1.sourceAddress != t2.sourceAddress)
27.46 + {
27.47 + return false;
27.48 + }
27.49 +
27.50 + if (t1.destinationAddress < t2.destinationAddress)
27.51 + {
27.52 + return true;
27.53 + }
27.54 + if (t1.destinationAddress != t2.destinationAddress)
27.55 + {
27.56 + return false;
27.57 + }
27.58 +
27.59 + if (t1.protocol < t2.protocol)
27.60 + {
27.61 + return true;
27.62 + }
27.63 + if (t1.protocol != t2.protocol)
27.64 + {
27.65 + return false;
27.66 + }
27.67 +
27.68 + if (t1.sourcePort < t2.sourcePort)
27.69 + {
27.70 + return true;
27.71 + }
27.72 + if (t1.sourcePort != t2.sourcePort)
27.73 + {
27.74 + return false;
27.75 + }
27.76 +
27.77 + if (t1.destinationPort < t2.destinationPort)
27.78 + {
27.79 + return true;
27.80 + }
27.81 + if (t1.destinationPort != t2.destinationPort)
27.82 + {
27.83 + return false;
27.84 + }
27.85 +
27.86 + return false;
27.87 +}
27.88 +
27.89 +bool operator == (const Ipv4FlowClassifier::FiveTuple &t1,
27.90 + const Ipv4FlowClassifier::FiveTuple &t2)
27.91 +{
27.92 + return (t1.sourceAddress == t2.sourceAddress &&
27.93 + t1.destinationAddress == t2.destinationAddress &&
27.94 + t1.protocol == t2.protocol &&
27.95 + t1.sourcePort == t2.sourcePort &&
27.96 + t1.destinationPort == t2.destinationPort);
27.97 +}
27.98 +
27.99 +
27.100 +
27.101 +Ipv4FlowClassifier::Ipv4FlowClassifier ()
27.102 +{
27.103 +}
27.104 +
27.105 +bool
27.106 +Ipv4FlowClassifier::Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
27.107 + uint32_t *out_flowId, uint32_t *out_packetId)
27.108 +{
27.109 + FiveTuple tuple;
27.110 + tuple.sourceAddress = ipHeader.GetSource ();
27.111 + tuple.destinationAddress = ipHeader.GetDestination ();
27.112 + tuple.protocol = ipHeader.GetProtocol ();
27.113 +
27.114 + switch (tuple.protocol)
27.115 + {
27.116 + case UDP_PROT_NUMBER:
27.117 + {
27.118 + UdpHeader udpHeader;
27.119 + ipPayload->PeekHeader (udpHeader);
27.120 + tuple.sourcePort = udpHeader.GetSourcePort ();
27.121 + tuple.destinationPort = udpHeader.GetDestinationPort ();
27.122 + }
27.123 + break;
27.124 +
27.125 + case TCP_PROT_NUMBER:
27.126 + {
27.127 + TcpHeader tcpHeader;
27.128 + ipPayload->PeekHeader (tcpHeader);
27.129 + tuple.sourcePort = tcpHeader.GetSourcePort ();
27.130 + tuple.destinationPort = tcpHeader.GetDestinationPort ();
27.131 + }
27.132 + break;
27.133 +
27.134 + default:
27.135 + return false;
27.136 + }
27.137 +
27.138 + // try to insert the tuple, but check if it already exists
27.139 + std::pair<std::map<FiveTuple, FlowId>::iterator, bool> insert
27.140 + = m_flowMap.insert (std::pair<FiveTuple, FlowId> (tuple, 0));
27.141 +
27.142 + // if the insertion succeeded, we need to assign this tuple a new flow identifier
27.143 + if (insert.second)
27.144 + {
27.145 + insert.first->second = GetNewFlowId ();
27.146 + }
27.147 +
27.148 + *out_flowId = insert.first->second;
27.149 + *out_packetId = ipHeader.GetIdentification ();
27.150 +
27.151 + return true;
27.152 +}
27.153 +
27.154 +
27.155 +} // namespace ns3
27.156 +
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/src/contrib/flow-monitor/ipv4-flow-classifier.h Tue Apr 28 17:39:32 2009 +0100
28.3 @@ -0,0 +1,70 @@
28.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
28.5 +//
28.6 +// Copyright (c) 2009 INESC Porto
28.7 +//
28.8 +// This program is free software; you can redistribute it and/or modify
28.9 +// it under the terms of the GNU General Public License version 2 as
28.10 +// published by the Free Software Foundation;
28.11 +//
28.12 +// This program is distributed in the hope that it will be useful,
28.13 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
28.14 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28.15 +// GNU General Public License for more details.
28.16 +//
28.17 +// You should have received a copy of the GNU General Public License
28.18 +// along with this program; if not, write to the Free Software
28.19 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28.20 +//
28.21 +// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
28.22 +//
28.23 +
28.24 +#ifndef __IPV4_FLOW_CLASSIFIER_H__
28.25 +#define __IPV4_FLOW_CLASSIFIER_H__
28.26 +
28.27 +#include <stdint.h>
28.28 +#include <map>
28.29 +
28.30 +#include "ns3/ipv4-header.h"
28.31 +#include "ns3/flow-classifier.h"
28.32 +
28.33 +namespace ns3 {
28.34 +
28.35 +class Packet;
28.36 +
28.37 +class Ipv4FlowClassifier : public FlowClassifier
28.38 +{
28.39 +public:
28.40 +
28.41 + struct FiveTuple
28.42 + {
28.43 + Ipv4Address sourceAddress;
28.44 + Ipv4Address destinationAddress;
28.45 + uint8_t protocol;
28.46 + uint16_t sourcePort;
28.47 + uint16_t destinationPort;
28.48 + };
28.49 +
28.50 + Ipv4FlowClassifier ();
28.51 +
28.52 + /// \brief try to classify the packet into flow-id and packet-id
28.53 + /// \return true if the packet was classified, false if not (i.e. it
28.54 + /// does not appear to be part of a flow).
28.55 + bool Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
28.56 + uint32_t *out_flowId, uint32_t *out_packetId);
28.57 +
28.58 +
28.59 +private:
28.60 +
28.61 + std::map<FiveTuple, FlowId> m_flowMap;
28.62 +
28.63 +};
28.64 +
28.65 +
28.66 +bool operator < (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
28.67 +bool operator == (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
28.68 +
28.69 +
28.70 +} // namespace ns3
28.71 +
28.72 +#endif
28.73 +
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/src/contrib/flow-monitor/ipv4-flow-probe.cc Tue Apr 28 17:39:32 2009 +0100
29.3 @@ -0,0 +1,104 @@
29.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
29.5 +//
29.6 +// Copyright (c) 2009 INESC Porto
29.7 +//
29.8 +// This program is free software; you can redistribute it and/or modify
29.9 +// it under the terms of the GNU General Public License version 2 as
29.10 +// published by the Free Software Foundation;
29.11 +//
29.12 +// This program is distributed in the hope that it will be useful,
29.13 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
29.14 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29.15 +// GNU General Public License for more details.
29.16 +//
29.17 +// You should have received a copy of the GNU General Public License
29.18 +// along with this program; if not, write to the Free Software
29.19 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29.20 +//
29.21 +// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
29.22 +//
29.23 +
29.24 +#include "ns3/ipv4-flow-probe.h"
29.25 +#include "ns3/ipv4-flow-classifier.h"
29.26 +#include "ns3/node.h"
29.27 +#include "ns3/ipv4-l3-protocol.h"
29.28 +#include "ns3/packet.h"
29.29 +#include "ns3/flow-monitor.h"
29.30 +
29.31 +namespace ns3 {
29.32 +
29.33 +
29.34 +Ipv4FlowProbe::~Ipv4FlowProbe ()
29.35 +{
29.36 +}
29.37 +
29.38 +
29.39 +Ipv4FlowProbe::Ipv4FlowProbe (Ptr<FlowMonitor> monitor,
29.40 + Ptr<Ipv4FlowClassifier> classifier,
29.41 + Ptr<Node> node)
29.42 + : FlowProbe (monitor),
29.43 + m_classifier (classifier)
29.44 +{
29.45 + Ptr<Ipv4L3Protocol> ipv4 = node->GetObject<Ipv4L3Protocol> ();
29.46 +
29.47 + if (!ipv4->TraceConnectWithoutContext ("SendOutgoing",
29.48 + MakeCallback (&Ipv4FlowProbe::SendOutgoingLogger, Ptr<Ipv4FlowProbe> (this))))
29.49 + {
29.50 + NS_FATAL_ERROR ("trace fail");
29.51 + }
29.52 + if (!ipv4->TraceConnectWithoutContext ("Forward",
29.53 + MakeCallback (&Ipv4FlowProbe::ForwardLogger, Ptr<Ipv4FlowProbe> (this))))
29.54 + {
29.55 + NS_FATAL_ERROR ("trace fail");
29.56 + }
29.57 + if (!ipv4->TraceConnectWithoutContext ("ForwardUp",
29.58 + MakeCallback (&Ipv4FlowProbe::ForwardUpLogger, Ptr<Ipv4FlowProbe> (this))))
29.59 + {
29.60 + NS_FATAL_ERROR ("trace fail");
29.61 + }
29.62 +}
29.63 +
29.64 +void
29.65 +Ipv4FlowProbe::SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
29.66 +{
29.67 + FlowId flowId;
29.68 + FlowPacketId packetId;
29.69 +
29.70 + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
29.71 + {
29.72 + uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
29.73 + m_monitor->ReportFirstTx (this, flowId, packetId, size);
29.74 + }
29.75 +}
29.76 +
29.77 +void
29.78 +Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
29.79 +{
29.80 + FlowId flowId;
29.81 + FlowPacketId packetId;
29.82 +
29.83 + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
29.84 + {
29.85 + uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
29.86 + m_monitor->ReportForwarding (this, flowId, packetId, size);
29.87 + }
29.88 +
29.89 +}
29.90 +
29.91 +void
29.92 +Ipv4FlowProbe::ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
29.93 +{
29.94 +
29.95 + FlowId flowId;
29.96 + FlowPacketId packetId;
29.97 +
29.98 + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
29.99 + {
29.100 + uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
29.101 + m_monitor->ReportLastRx (this, flowId, packetId, size);
29.102 + }
29.103 +}
29.104 +
29.105 +} // namespace ns3
29.106 +
29.107 +
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/src/contrib/flow-monitor/ipv4-flow-probe.h Tue Apr 28 17:39:32 2009 +0100
30.3 @@ -0,0 +1,53 @@
30.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
30.5 +//
30.6 +// Copyright (c) 2009 INESC Porto
30.7 +//
30.8 +// This program is free software; you can redistribute it and/or modify
30.9 +// it under the terms of the GNU General Public License version 2 as
30.10 +// published by the Free Software Foundation;
30.11 +//
30.12 +// This program is distributed in the hope that it will be useful,
30.13 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
30.14 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30.15 +// GNU General Public License for more details.
30.16 +//
30.17 +// You should have received a copy of the GNU General Public License
30.18 +// along with this program; if not, write to the Free Software
30.19 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30.20 +//
30.21 +// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
30.22 +//
30.23 +
30.24 +#ifndef __IPV4_FLOW_PROBE_H__
30.25 +#define __IPV4_FLOW_PROBE_H__
30.26 +
30.27 +#include "ns3/flow-probe.h"
30.28 +#include "ns3/ipv4-flow-classifier.h"
30.29 +
30.30 +namespace ns3 {
30.31 +
30.32 +class FlowMonitor;
30.33 +class Node;
30.34 +
30.35 +class Ipv4FlowProbe : public FlowProbe
30.36 +{
30.37 +
30.38 +public:
30.39 + Ipv4FlowProbe (Ptr<FlowMonitor> monitor, Ptr<Ipv4FlowClassifier> classifier, Ptr<Node> node);
30.40 + ~Ipv4FlowProbe ();
30.41 +
30.42 +private:
30.43 +
30.44 + void SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
30.45 + void ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
30.46 + void ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
30.47 +
30.48 + Ptr<FlowMonitor> m_monitor;
30.49 + Ptr<Ipv4FlowClassifier> m_classifier;
30.50 +};
30.51 +
30.52 +
30.53 +} // namespace ns3
30.54 +
30.55 +#endif
30.56 +
31.1 --- a/src/contrib/flow-monitor/wscript Thu Apr 23 15:48:35 2009 +0100
31.2 +++ b/src/contrib/flow-monitor/wscript Tue Apr 28 17:39:32 2009 +0100
31.3 @@ -5,6 +5,9 @@
31.4 obj.source = [
31.5 'flow-monitor.cc',
31.6 'flow-classifier.cc',
31.7 + 'flow-probe.cc',
31.8 + 'ipv4-flow-classifier.cc',
31.9 + 'ipv4-flow-probe.cc',
31.10 ]
31.11 headers = bld.create_obj('ns3header')
31.12 headers.module = 'flow-monitor'
31.13 @@ -12,5 +15,7 @@
31.14 'flow-monitor.h',
31.15 'flow-probe.h',
31.16 'flow-classifier.h',
31.17 + 'ipv4-flow-classifier.h',
31.18 + 'ipv4-flow-probe.h',
31.19 ]
31.20