Nearly all flow monitoring code added; not debugged yet, though.
--- a/bindings/python/ns3_module_bridge.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_bridge.py Tue Apr 28 17:39:32 2009 +0100
@@ -8,10 +8,10 @@
## bridge-net-device.h: ns3::BridgeNetDevice [class]
module.add_class('BridgeNetDevice', parent=root_module['ns3::NetDevice'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +20,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -32,7 +32,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -40,7 +40,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -247,21 +247,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_common.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_common.py Tue Apr 28 17:39:32 2009 +0100
@@ -54,10 +54,10 @@
## error-model.h: ns3::RateErrorModel [class]
module.add_class('RateErrorModel', parent=root_module['ns3::ErrorModel'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -66,10 +66,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -78,7 +78,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -86,7 +86,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1113,21 +1113,21 @@
module.add_function('MakeDataRateChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_contrib.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_contrib.py Tue Apr 28 17:39:32 2009 +0100
@@ -49,10 +49,10 @@
module.add_container('std::vector< ns3::PyViz::NetDeviceStatistics >', 'ns3::PyViz::NetDeviceStatistics', container_type='vector')
module.add_container('std::vector< ns3::PyViz::NodeStatistics >', 'ns3::PyViz::NodeStatistics', container_type='vector')
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -61,10 +61,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -73,7 +73,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -81,7 +81,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -402,21 +402,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_core.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_core.py Tue Apr 28 17:39:32 2009 +0100
@@ -161,10 +161,10 @@
root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::EnumValue'])
module.add_container('std::set< ns3::TypeId >', 'ns3::TypeId', container_type='set')
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -173,10 +173,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -185,7 +185,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -193,7 +193,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1827,7 +1827,7 @@
cls.add_method('ConnectWithoutContext',
'void',
[param('ns3::CallbackBase const &', 'cb')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## 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]
cls.add_method('Connect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -1835,7 +1835,7 @@
cls.add_method('DisconnectWithoutContext',
'void',
[param('ns3::CallbackBase const &', 'cb')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## 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]
cls.add_method('Disconnect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -1852,10 +1852,60 @@
def register_functions(root_module):
module = root_module
+ ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
+ module.add_function('BreakpointFallback',
+ 'void',
+ [])
+ ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
+ module.add_function('Create',
+ 'ns3::Ptr< ns3::ObjectVectorValue >',
+ [],
+ template_parameters=['ns3::ObjectVectorValue'])
+ ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
+ module.add_function('Create',
+ 'ns3::Ptr< ns3::PointerValue >',
+ [],
+ template_parameters=['ns3::PointerValue'])
+ ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
+ module.add_function('LogComponentDisable',
+ 'void',
+ [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
+ ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
+ module.add_function('LogComponentDisableAll',
+ 'void',
+ [param('ns3::LogLevel', 'level')])
+ ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
+ module.add_function('LogComponentEnable',
+ 'void',
+ [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
+ ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
+ module.add_function('LogComponentEnableAll',
+ 'void',
+ [param('ns3::LogLevel', 'level')])
## boolean.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeBooleanChecker() [free function]
module.add_function('MakeBooleanChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
+ module.add_function('MakeEnumChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
+ ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
+ module.add_function('MakeObjectFactoryChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
+ module.add_function('MakeRandomVariableChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
+ module.add_function('MakeStringChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
+ module.add_function('MakeTypeIdChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## type-name.h: extern std::string ns3::TypeNameGet() [free function]
module.add_function('TypeNameGet',
'std::string',
@@ -1906,133 +1956,83 @@
'std::string',
[],
template_parameters=['unsigned char'])
- ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
- module.add_function('MakeStringChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
- module.add_function('MakeEnumChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
- ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
- module.add_function('LogComponentEnableAll',
- 'void',
- [param('ns3::LogLevel', 'level')])
- ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
- module.add_function('MakeTypeIdChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
- module.add_function('Create',
- 'ns3::Ptr< ns3::PointerValue >',
- [],
- template_parameters=['ns3::PointerValue'])
- ## ptr.h: extern ns3::Ptr<ns3::ObjectVectorValue> ns3::Create() [free function]
- module.add_function('Create',
- 'ns3::Ptr< ns3::ObjectVectorValue >',
- [],
- template_parameters=['ns3::ObjectVectorValue'])
- ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
- module.add_function('MakeObjectFactoryChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## log.h: extern void ns3::LogComponentDisableAll(ns3::LogLevel level) [free function]
- module.add_function('LogComponentDisableAll',
- 'void',
- [param('ns3::LogLevel', 'level')])
- ## breakpoint.h: extern void ns3::BreakpointFallback() [free function]
- module.add_function('BreakpointFallback',
- 'void',
- [])
- ## random-variable.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRandomVariableChecker() [free function]
- module.add_function('MakeRandomVariableChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
- module.add_function('LogComponentDisable',
- 'void',
- [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
- ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
- module.add_function('LogComponentEnable',
- 'void',
- [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
- register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
-def register_functions_ns3_internal(module, root_module):
- ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
- module.add_function('MakeUintegerChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
- ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
- module.add_function('MakeIntegerChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
- ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
- module.add_function('MakeDoubleChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
- return
-
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
def register_functions_ns3_Config(module, root_module):
- ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
- module.add_function('SetDefaultFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+ ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
+ module.add_function('Connect',
+ 'void',
+ [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
+ ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
+ module.add_function('ConnectWithoutContext',
+ 'void',
+ [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
+ ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
+ module.add_function('Disconnect',
+ 'void',
+ [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
## config.h: extern void ns3::Config::DisconnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
module.add_function('DisconnectWithoutContext',
'void',
[param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
- ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
- module.add_function('SetDefault',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
- module.add_function('Connect',
- 'void',
- [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
## config.h: extern ns3::Ptr<ns3::Object> ns3::Config::GetRootNamespaceObject(uint32_t i) [free function]
module.add_function('GetRootNamespaceObject',
'ns3::Ptr< ns3::Object >',
[param('uint32_t', 'i')])
- ## config.h: extern void ns3::Config::ConnectWithoutContext(std::string path, ns3::CallbackBase const & cb) [free function]
- module.add_function('ConnectWithoutContext',
- 'void',
- [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
- ## config.h: extern void ns3::Config::UnregisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
- module.add_function('UnregisterRootNamespaceObject',
- 'void',
- [param('ns3::Ptr< ns3::Object >', 'obj')])
- ## config.h: extern bool ns3::Config::SetGlobalFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
- module.add_function('SetGlobalFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
module.add_function('GetRootNamespaceObjectN',
'uint32_t',
[])
+ ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
+ module.add_function('RegisterRootNamespaceObject',
+ 'void',
+ [param('ns3::Ptr< ns3::Object >', 'obj')])
## config.h: extern void ns3::Config::Set(std::string path, ns3::AttributeValue const & value) [free function]
module.add_function('Set',
'void',
[param('std::string', 'path'), param('ns3::AttributeValue const &', 'value')])
+ ## config.h: extern void ns3::Config::SetDefault(std::string name, ns3::AttributeValue const & value) [free function]
+ module.add_function('SetDefault',
+ 'void',
+ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+ ## config.h: extern bool ns3::Config::SetDefaultFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
+ module.add_function('SetDefaultFailSafe',
+ 'bool',
+ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
## config.h: extern void ns3::Config::SetGlobal(std::string name, ns3::AttributeValue const & value) [free function]
module.add_function('SetGlobal',
'void',
[param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## config.h: extern void ns3::Config::RegisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
- module.add_function('RegisterRootNamespaceObject',
+ ## config.h: extern bool ns3::Config::SetGlobalFailSafe(std::string name, ns3::AttributeValue const & value) [free function]
+ module.add_function('SetGlobalFailSafe',
+ 'bool',
+ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+ ## config.h: extern void ns3::Config::UnregisterRootNamespaceObject(ns3::Ptr<ns3::Object> obj) [free function]
+ module.add_function('UnregisterRootNamespaceObject',
'void',
[param('ns3::Ptr< ns3::Object >', 'obj')])
- ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
- module.add_function('Disconnect',
- 'void',
- [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ ## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
+ module.add_function('MakeDoubleChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [param('double', 'min'), param('double', 'max'), param('std::string', 'name')])
+ ## integer.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeIntegerChecker(int64_t min, int64_t max, std::string name) [free function]
+ module.add_function('MakeIntegerChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [param('int64_t', 'min'), param('int64_t', 'max'), param('std::string', 'name')])
+ ## uinteger.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeUintegerChecker(uint64_t min, uint64_t max, std::string name) [free function]
+ module.add_function('MakeUintegerChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [param('uint64_t', 'min'), param('uint64_t', 'max'), param('std::string', 'name')])
return
def register_functions_ns3_olsr(module, root_module):
--- a/bindings/python/ns3_module_csma.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_csma.py Tue Apr 28 17:39:32 2009 +0100
@@ -16,10 +16,10 @@
## csma-net-device.h: ns3::CsmaNetDevice::EncapsulationMode [enumeration]
module.add_enum('EncapsulationMode', ['ILLEGAL', 'DIX', 'LLC'], outer_class=root_module['ns3::CsmaNetDevice'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -28,10 +28,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -40,7 +40,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -48,7 +48,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -417,21 +417,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_flow_monitor.py Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,242 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass
+
+def register_types(module):
+ root_module = module.get_root()
+
+ ## flow-classifier.h: ns3::FlowClassifier [class]
+ module.add_class('FlowClassifier', parent=root_module['ns3::RefCountBase'])
+ ## flow-probe.h: ns3::FlowProbe [class]
+ module.add_class('FlowProbe', parent=root_module['ns3::RefCountBase'])
+ ## flow-probe.h: ns3::FlowProbe::FlowStats [struct]
+ module.add_class('FlowStats', outer_class=root_module['ns3::FlowProbe'])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier [class]
+ module.add_class('Ipv4FlowClassifier', parent=root_module['ns3::FlowClassifier'])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple [struct]
+ module.add_class('FiveTuple', outer_class=root_module['ns3::Ipv4FlowClassifier'])
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe [class]
+ module.add_class('Ipv4FlowProbe', parent=root_module['ns3::FlowProbe'])
+ ## flow-monitor.h: ns3::FlowMonitor [class]
+ module.add_class('FlowMonitor', parent=root_module['ns3::Object'])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats [struct]
+ module.add_class('FlowStats', outer_class=root_module['ns3::FlowMonitor'])
+ module.add_container('std::map< unsigned int, ns3::FlowProbe::FlowStats >', ('unsigned int', 'ns3::FlowProbe::FlowStats'), container_type='map')
+ module.add_container('std::map< unsigned int, ns3::FlowMonitor::FlowStats >', ('unsigned int', 'ns3::FlowMonitor::FlowStats'), container_type='map')
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3FlowClassifier_methods(root_module, root_module['ns3::FlowClassifier'])
+ register_Ns3FlowProbe_methods(root_module, root_module['ns3::FlowProbe'])
+ register_Ns3FlowProbeFlowStats_methods(root_module, root_module['ns3::FlowProbe::FlowStats'])
+ register_Ns3Ipv4FlowClassifier_methods(root_module, root_module['ns3::Ipv4FlowClassifier'])
+ register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, root_module['ns3::Ipv4FlowClassifier::FiveTuple'])
+ register_Ns3Ipv4FlowProbe_methods(root_module, root_module['ns3::Ipv4FlowProbe'])
+ register_Ns3FlowMonitor_methods(root_module, root_module['ns3::FlowMonitor'])
+ register_Ns3FlowMonitorFlowStats_methods(root_module, root_module['ns3::FlowMonitor::FlowStats'])
+ return
+
+def register_Ns3FlowClassifier_methods(root_module, cls):
+ ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier(ns3::FlowClassifier const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowClassifier const &', 'arg0')])
+ ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier() [constructor]
+ cls.add_constructor([])
+ ## flow-classifier.h: ns3::FlowId ns3::FlowClassifier::GetNewFlowId() [member function]
+ cls.add_method('GetNewFlowId',
+ 'ns3::FlowId',
+ [],
+ visibility='protected')
+ return
+
+def register_Ns3FlowProbe_methods(root_module, cls):
+ ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::FlowProbe const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowProbe const &', 'arg0')])
+ ## flow-probe.h: void ns3::FlowProbe::AddPacketStats(ns3::FlowId flowId, uint32_t packetSize, ns3::Time delayFromFirstProbe) [member function]
+ cls.add_method('AddPacketStats',
+ 'void',
+ [param('ns3::FlowId', 'flowId'), param('uint32_t', 'packetSize'), param('ns3::Time', 'delayFromFirstProbe')])
+ ## 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]
+ cls.add_method('GetStats',
+ 'std::map< unsigned int, ns3::FlowProbe::FlowStats >',
+ [],
+ is_const=True)
+ ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::Ptr<ns3::FlowMonitor> flowMonitor) [constructor]
+ cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'flowMonitor')],
+ visibility='protected')
+ return
+
+def register_Ns3FlowProbeFlowStats_methods(root_module, cls):
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::delayFromFirstProbeSum [variable]
+ cls.add_instance_attribute('delayFromFirstProbeSum', 'ns3::Time', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::bytes [variable]
+ cls.add_instance_attribute('bytes', 'uint64_t', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::packets [variable]
+ cls.add_instance_attribute('packets', 'uint32_t', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats(ns3::FlowProbe::FlowStats const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowProbe::FlowStats const &', 'arg0')])
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats() [constructor]
+ cls.add_constructor([])
+ return
+
+def register_Ns3Ipv4FlowClassifier_methods(root_module, cls):
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier(ns3::Ipv4FlowClassifier const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowClassifier const &', 'arg0')])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier() [constructor]
+ cls.add_constructor([])
+ ## 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]
+ cls.add_method('Classify',
+ 'bool',
+ [param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet const >', 'ipPayload'), param('uint32_t *', 'out_flowId'), param('uint32_t *', 'out_packetId')])
+ return
+
+def register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, cls):
+ cls.add_binary_comparison_operator('<')
+ cls.add_binary_comparison_operator('==')
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple() [constructor]
+ cls.add_constructor([])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple(ns3::Ipv4FlowClassifier::FiveTuple const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowClassifier::FiveTuple const &', 'arg0')])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationAddress [variable]
+ cls.add_instance_attribute('destinationAddress', 'ns3::Ipv4Address', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationPort [variable]
+ cls.add_instance_attribute('destinationPort', 'uint16_t', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::protocol [variable]
+ cls.add_instance_attribute('protocol', 'uint8_t', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourceAddress [variable]
+ cls.add_instance_attribute('sourceAddress', 'ns3::Ipv4Address', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourcePort [variable]
+ cls.add_instance_attribute('sourcePort', 'uint16_t', is_const=False)
+ return
+
+def register_Ns3Ipv4FlowProbe_methods(root_module, cls):
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ipv4FlowProbe const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowProbe const &', 'arg0')])
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ptr<ns3::FlowMonitor> monitor, ns3::Ptr<ns3::Ipv4FlowClassifier> classifier, ns3::Ptr<ns3::Node> node) [constructor]
+ cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'monitor'), param('ns3::Ptr< ns3::Ipv4FlowClassifier >', 'classifier'), param('ns3::Ptr< ns3::Node >', 'node')])
+ return
+
+def register_Ns3FlowMonitor_methods(root_module, cls):
+ ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor(ns3::FlowMonitor const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowMonitor const &', 'arg0')])
+ ## flow-monitor.h: static ns3::TypeId ns3::FlowMonitor::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## flow-monitor.h: ns3::TypeId ns3::FlowMonitor::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor() [constructor]
+ cls.add_constructor([])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportFirstTx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportFirstTx',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportForwarding(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportForwarding',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportLastRx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportLastRx',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets() [member function]
+ cls.add_method('CheckForLostPackets',
+ 'void',
+ [])
+ ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets(ns3::Time maxDelay) [member function]
+ cls.add_method('CheckForLostPackets',
+ 'void',
+ [param('ns3::Time', 'maxDelay')])
+ ## 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]
+ cls.add_method('GetFlowStats',
+ 'std::map< unsigned int, ns3::FlowMonitor::FlowStats >',
+ [],
+ is_const=True)
+ ## flow-monitor.h: void ns3::FlowMonitor::NotifyConstructionCompleted() [member function]
+ cls.add_method('NotifyConstructionCompleted',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3FlowMonitorFlowStats_methods(root_module, cls):
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::delaySum [variable]
+ cls.add_instance_attribute('delaySum', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txBytes [variable]
+ cls.add_instance_attribute('txBytes', 'uint64_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxBytes [variable]
+ cls.add_instance_attribute('rxBytes', 'uint64_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txPackets [variable]
+ cls.add_instance_attribute('txPackets', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxPackets [variable]
+ cls.add_instance_attribute('rxPackets', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::lostPackets [variable]
+ cls.add_instance_attribute('lostPackets', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timesForwarded [variable]
+ cls.add_instance_attribute('timesForwarded', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats(ns3::FlowMonitor::FlowStats const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowMonitor::FlowStats const &', 'arg0')])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats() [constructor]
+ cls.add_constructor([])
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_global_routing.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_global_routing.py Tue Apr 28 17:39:32 2009 +0100
@@ -18,10 +18,10 @@
## global-router-interface.h: ns3::GlobalRouter [class]
module.add_class('GlobalRouter', is_singleton=True, parent=root_module['ns3::Object'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -30,10 +30,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -42,7 +42,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -50,7 +50,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -260,21 +260,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_helper.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_helper.py Tue Apr 28 17:39:32 2009 +0100
@@ -42,10 +42,10 @@
## wifi-helper.h: ns3::WifiHelper [class]
module.add_class('WifiHelper', allow_subclassing=False)
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -54,10 +54,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -66,7 +66,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -74,7 +74,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -726,21 +726,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_internet_stack.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_internet_stack.py Tue Apr 28 17:39:32 2009 +0100
@@ -16,10 +16,10 @@
## ipv4-static-routing.h: ns3::Ipv4StaticRouting [class]
module.add_class('Ipv4StaticRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -28,10 +28,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -40,7 +40,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -48,7 +48,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -642,21 +642,21 @@
module.add_function('AddNscInternetStack',
'void',
[param('ns3::Ptr< ns3::Node >', 'node'), param('std::string const &', 'soname')])
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_mobility.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_mobility.py Tue Apr 28 17:39:32 2009 +0100
@@ -48,10 +48,10 @@
## hierarchical-mobility-model.h: ns3::HierarchicalMobilityModel [class]
module.add_class('HierarchicalMobilityModel', parent=root_module['ns3::MobilityModel'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -60,10 +60,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -72,7 +72,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -80,7 +80,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -691,33 +691,33 @@
def register_functions(root_module):
module = root_module
- ## rectangle.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRectangleChecker() [free function]
- module.add_function('MakeRectangleChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
## vector.h: extern double ns3::CalculateDistance(ns3::Vector const & a, ns3::Vector const & b) [free function]
module.add_function('CalculateDistance',
'double',
[param('ns3::Vector const &', 'a'), param('ns3::Vector const &', 'b')])
+ ## rectangle.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeRectangleChecker() [free function]
+ module.add_function('MakeRectangleChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## vector.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeVectorChecker() [free function]
module.add_function('MakeVectorChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_node.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_node.py Tue Apr 28 17:39:32 2009 +0100
@@ -106,10 +106,10 @@
## simple-net-device.h: ns3::SimpleNetDevice [class]
module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -118,10 +118,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -130,7 +130,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -138,7 +138,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -2581,18 +2581,34 @@
def register_functions(root_module):
module = root_module
- ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
- module.add_function('MakeMac48AddressChecker',
+ ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
+ module.add_function('MakeAddressChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
module.add_function('MakeIpv4AddressChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
- module.add_function('WriteTo',
+ ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
+ module.add_function('MakeIpv4MaskChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
+ module.add_function('MakeMac48AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
+ module.add_function('ReadFrom',
'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Address const & ad) [free function]
module.add_function('WriteTo',
'void',
@@ -2601,41 +2617,25 @@
module.add_function('WriteTo',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address', 'ad')])
- ## address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeAddressChecker() [free function]
- module.add_function('MakeAddressChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4MaskChecker() [free function]
- module.add_function('MakeIpv4MaskChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
- module.add_function('ReadFrom',
+ ## address-utils.h: extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
+ module.add_function('WriteTo',
'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
- module.add_function('ReadFrom',
- 'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
- module.add_function('ReadFrom',
- 'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
- register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_olsr.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_olsr.py Tue Apr 28 17:39:32 2009 +0100
@@ -4,10 +4,10 @@
root_module = module.get_root()
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -16,10 +16,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -28,7 +28,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -36,7 +36,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -533,19 +533,19 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
-def register_functions_ns3_internal(module, root_module):
+def register_functions_ns3_Config(module, root_module):
return
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
-def register_functions_ns3_Config(module, root_module):
+def register_functions_ns3_internal(module, root_module):
return
def register_functions_ns3_olsr(module, root_module):
--- a/bindings/python/ns3_module_onoff.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_onoff.py Tue Apr 28 17:39:32 2009 +0100
@@ -6,10 +6,10 @@
## onoff-application.h: ns3::OnOffApplication [class]
module.add_class('OnOffApplication', parent=root_module['ns3::Application'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -18,10 +18,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -30,7 +30,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -38,7 +38,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -83,21 +83,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_packet_sink.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_packet_sink.py Tue Apr 28 17:39:32 2009 +0100
@@ -6,10 +6,10 @@
## packet-sink.h: ns3::PacketSink [class]
module.add_class('PacketSink', parent=root_module['ns3::Application'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -18,10 +18,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -30,7 +30,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -38,7 +38,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -79,21 +79,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_point_to_point.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_point_to_point.py Tue Apr 28 17:39:32 2009 +0100
@@ -3,15 +3,17 @@
def register_types(module):
root_module = module.get_root()
+ ## ppp-header.h: ns3::PppHeader [class]
+ module.add_class('PppHeader', parent=root_module['ns3::Header'])
## point-to-point-channel.h: ns3::PointToPointChannel [class]
module.add_class('PointToPointChannel', parent=root_module['ns3::Channel'])
## point-to-point-net-device.h: ns3::PointToPointNetDevice [class]
module.add_class('PointToPointNetDevice', parent=root_module['ns3::NetDevice'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +22,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -32,7 +34,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -40,7 +42,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -49,10 +51,48 @@
def register_methods(root_module):
+ register_Ns3PppHeader_methods(root_module, root_module['ns3::PppHeader'])
register_Ns3PointToPointChannel_methods(root_module, root_module['ns3::PointToPointChannel'])
register_Ns3PointToPointNetDevice_methods(root_module, root_module['ns3::PointToPointNetDevice'])
return
+def register_Ns3PppHeader_methods(root_module, cls):
+ ## ppp-header.h: ns3::PppHeader::PppHeader(ns3::PppHeader const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PppHeader const &', 'arg0')])
+ ## ppp-header.h: ns3::PppHeader::PppHeader() [constructor]
+ cls.add_constructor([])
+ ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ppp-header.h: ns3::TypeId ns3::PppHeader::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## ppp-header.h: void ns3::PppHeader::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## ppp-header.h: void ns3::PppHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_const=True, is_virtual=True)
+ ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
+ cls.add_method('Deserialize',
+ 'uint32_t',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_virtual=True)
+ ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ return
+
def register_Ns3PointToPointChannel_methods(root_module, cls):
## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')])
@@ -264,21 +304,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_simulator.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_simulator.py Tue Apr 28 17:39:32 2009 +0100
@@ -60,10 +60,10 @@
## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration]
module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -72,10 +72,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -84,7 +84,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -94,7 +94,7 @@
## nstime.h: ns3::TimeStepPrecision::precision_t [enumeration]
module.add_enum('precision_t', ['S', 'MS', 'US', 'NS', 'PS', 'FS'])
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1420,77 +1420,77 @@
def register_functions(root_module):
module = root_module
- ## high-precision.h: extern ns3::HighPrecision ns3::Max(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
- module.add_function('Max',
+ ## high-precision.h: extern ns3::HighPrecision ns3::Abs(ns3::HighPrecision const & value) [free function]
+ module.add_function('Abs',
'ns3::HighPrecision',
- [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
+ [param('ns3::HighPrecision const &', 'value')])
## nstime.h: extern ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
module.add_function('FemtoSeconds',
'ns3::Time',
[param('uint64_t', 'fs')])
+ ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
+ module.add_function('MakeTimeChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ ## high-precision.h: extern ns3::HighPrecision ns3::Max(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
+ module.add_function('Max',
+ 'ns3::HighPrecision',
+ [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
## nstime.h: extern ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
module.add_function('MicroSeconds',
'ns3::Time',
[param('uint64_t', 'us')])
- ## simulator.h: extern ns3::Time ns3::Now() [free function]
- module.add_function('Now',
- 'ns3::Time',
- [])
## nstime.h: extern ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
module.add_function('MilliSeconds',
'ns3::Time',
[param('uint64_t', 'ms')])
+ ## high-precision.h: extern ns3::HighPrecision ns3::Min(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
+ module.add_function('Min',
+ 'ns3::HighPrecision',
+ [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
## nstime.h: extern ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
module.add_function('NanoSeconds',
'ns3::Time',
[param('uint64_t', 'ns')])
- ## high-precision.h: extern ns3::HighPrecision ns3::Abs(ns3::HighPrecision const & value) [free function]
- module.add_function('Abs',
- 'ns3::HighPrecision',
- [param('ns3::HighPrecision const &', 'value')])
- ## nstime.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
- module.add_function('MakeTimeChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
+ ## simulator.h: extern ns3::Time ns3::Now() [free function]
+ module.add_function('Now',
+ 'ns3::Time',
[])
+ ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
+ module.add_function('PicoSeconds',
+ 'ns3::Time',
+ [param('uint64_t', 'ps')])
## nstime.h: extern ns3::Time ns3::Seconds(double seconds) [free function]
module.add_function('Seconds',
'ns3::Time',
[param('double', 'seconds')])
- ## nstime.h: extern ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
- module.add_function('PicoSeconds',
- 'ns3::Time',
- [param('uint64_t', 'ps')])
- ## high-precision.h: extern ns3::HighPrecision ns3::Min(ns3::HighPrecision const & a, ns3::HighPrecision const & b) [free function]
- module.add_function('Min',
- 'ns3::HighPrecision',
- [param('ns3::HighPrecision const &', 'a'), param('ns3::HighPrecision const &', 'b')])
## nstime.h: extern ns3::Time ns3::TimeStep(uint64_t ts) [free function]
module.add_function('TimeStep',
'ns3::Time',
[param('uint64_t', 'ts')])
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
+ module.add_function('Get',
+ 'ns3::TimeStepPrecision::precision_t',
+ [])
+ ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
+ module.add_function('Set',
+ 'void',
+ [param('ns3::TimeStepPrecision::precision_t', 'precision')])
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- ## nstime.h: extern void ns3::TimeStepPrecision::Set(ns3::TimeStepPrecision::precision_t precision) [free function]
- module.add_function('Set',
- 'void',
- [param('ns3::TimeStepPrecision::precision_t', 'precision')])
- ## nstime.h: extern ns3::TimeStepPrecision::precision_t ns3::TimeStepPrecision::Get() [free function]
- module.add_function('Get',
- 'ns3::TimeStepPrecision::precision_t',
- [])
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_stats.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_stats.py Tue Apr 28 17:39:32 2009 +0100
@@ -26,10 +26,10 @@
## packet-data-calculators.h: ns3::PacketCounterCalculator [class]
module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -38,10 +38,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -50,7 +50,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -58,7 +58,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -417,21 +417,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_udp_echo.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_udp_echo.py Tue Apr 28 17:39:32 2009 +0100
@@ -8,10 +8,10 @@
## udp-echo-server.h: ns3::UdpEchoServer [class]
module.add_class('UdpEchoServer', parent=root_module['ns3::Application'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -20,10 +20,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -32,7 +32,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -40,7 +40,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -113,21 +113,21 @@
def register_functions(root_module):
module = root_module
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3_module_wifi.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3_module_wifi.py Tue Apr 28 17:39:32 2009 +0100
@@ -96,10 +96,10 @@
## aarf-wifi-manager.h: ns3::AarfWifiManager [class]
module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager'])
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -108,10 +108,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -120,7 +120,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -128,7 +128,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -2547,29 +2547,29 @@
def register_functions(root_module):
module = root_module
+ ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
+ module.add_function('MakeSsidChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## wifi-mode.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeWifiModeChecker() [free function]
module.add_function('MakeWifiModeChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- ## ssid.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeSsidChecker() [free function]
- module.add_function('MakeSsidChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
- register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
-def register_functions_ns3_TimeStepPrecision(module, root_module):
- return
-
-def register_functions_ns3_Config(module, root_module):
- return
-
def register_functions_ns3_olsr(module, root_module):
return
--- a/bindings/python/ns3modulegen_generated.py Thu Apr 23 15:48:35 2009 +0100
+++ b/bindings/python/ns3modulegen_generated.py Tue Apr 28 17:39:32 2009 +0100
@@ -28,6 +28,7 @@
import ns3_module_global_routing
import ns3_module_onoff
import ns3_module_olsr
+import ns3_module_flow_monitor
import ns3_module_udp_echo
import ns3_module_helper
@@ -214,6 +215,17 @@
ns3_module_olsr__local.register_types(module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_types(module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_types(module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_types(module)
@@ -241,10 +253,10 @@
module.add_container('std::set< unsigned int >', 'unsigned int', container_type='set')
module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
- ## Register a nested module for the namespace internal
+ ## Register a nested module for the namespace Config
- nested_module = module.add_cpp_namespace('internal')
- register_types_ns3_internal(nested_module)
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
## Register a nested module for the namespace TimeStepPrecision
@@ -253,10 +265,10 @@
register_types_ns3_TimeStepPrecision(nested_module)
- ## Register a nested module for the namespace Config
+ ## Register a nested module for the namespace internal
- nested_module = module.add_cpp_namespace('Config')
- register_types_ns3_Config(nested_module)
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
## Register a nested module for the namespace olsr
@@ -265,7 +277,7 @@
register_types_ns3_olsr(nested_module)
-def register_types_ns3_internal(module):
+def register_types_ns3_Config(module):
root_module = module.get_root()
@@ -273,7 +285,7 @@
root_module = module.get_root()
-def register_types_ns3_Config(module):
+def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -458,6 +470,17 @@
ns3_module_olsr__local.register_methods(root_module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_methods(root_module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_methods(root_module)
@@ -660,6 +683,17 @@
ns3_module_olsr__local.register_functions(root_module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_functions(root_module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_functions(root_module)
@@ -682,19 +716,19 @@
ns3_module_helper__local.register_functions(root_module)
root_module.end_section('ns3_module_helper')
- register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
- register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
-def register_functions_ns3_internal(module, root_module):
+def register_functions_ns3_Config(module, root_module):
return
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
-def register_functions_ns3_Config(module, root_module):
+def register_functions_ns3_internal(module, root_module):
return
def register_functions_ns3_olsr(module, root_module):
--- a/src/contrib/flow-monitor/flow-classifier.cc Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/flow-classifier.cc Tue Apr 28 17:39:32 2009 +0100
@@ -22,23 +22,6 @@
namespace ns3 {
-TypeId
-FlowClassifier::GetTypeId (void)
-{
- static TypeId tid = TypeId ("ns3::FlowClassifier")
- .SetParent<Object> ()
- ;
- return tid;
-}
-
-
-TypeId
-FlowClassifier::GetInstanceTypeId (void) const
-{
- return GetTypeId ();
-}
-
-
FlowClassifier::FlowClassifier ()
:
m_lastNewFlowId (0)
--- a/src/contrib/flow-monitor/flow-classifier.h Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/flow-classifier.h Tue Apr 28 17:39:32 2009 +0100
@@ -18,24 +18,23 @@
// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
//
-#ifndef __FLOW_MONITOR_PROBE_H__
-#define __FLOW_MONITOR_PROBE_H__
+#ifndef __FLOW_CLASSIFIER_H__
+#define __FLOW_CLASSIFIER_H__
-#include "ns3/object.h"
+#include "ns3/ref-count-base.h"
namespace ns3 {
-typedef uint32_t FlowId;
+typedef uint32_t FlowId;
+typedef uint32_t FlowPacketId;
-class FlowClassifier : public Object
+class FlowClassifier : public RefCountBase
{
FlowId m_lastNewFlowId;
public:
- static TypeId GetTypeId (void);
- virtual TypeId GetInstanceTypeId (void) const;
FlowClassifier ();
protected:
--- a/src/contrib/flow-monitor/flow-monitor.cc Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/flow-monitor.cc Tue Apr 28 17:39:32 2009 +0100
@@ -19,32 +19,177 @@
//
#include "flow-monitor.h"
+#include "ns3/simulator.h"
+#include "ns3/log.h"
+
+#define PERIODIC_CHECK_INTERVAL (Seconds (1))
namespace ns3 {
+NS_LOG_COMPONENT_DEFINE ("FlowMonitor");
+
+
+TypeId
+FlowMonitor::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::FlowMonitor")
+ .SetParent<Object> ()
+ .AddConstructor<FlowMonitor> ()
+ .AddAttribute ("MaxPerHopDelay", ("The maximum per-hop delay that should be considered. "
+ "Packets still not received after this delay are to be considered lost."),
+ TimeValue (Seconds (10.0)),
+ MakeTimeAccessor (&FlowMonitor::m_maxPerHopDelay),
+ MakeTimeChecker ())
+ ;
+ return tid;
+}
+
+TypeId
+FlowMonitor::GetInstanceTypeId (void) const
+{
+ return GetTypeId ();
+}
FlowMonitor::FlowMonitor ()
{
}
+
+inline FlowMonitor::FlowStats&
+FlowMonitor::GetStatsForFlow (FlowId flowId)
+{
+ std::map<FlowId, FlowStats>::iterator iter;
+ iter = m_flowStats.find (flowId);
+ if (iter == m_flowStats.end ())
+ {
+ FlowMonitor::FlowStats &ref = m_flowStats[flowId];
+ ref.delaySum = Seconds (0);
+ ref.txBytes = 0;
+ ref.rxBytes = 0;
+ ref.txPackets = 0;
+ ref.rxPackets = 0;
+ ref.lostPackets = 0;
+ ref.timesForwarded = 0;
+ return ref;
+ }
+ else
+ {
+ return iter->second;
+ }
+}
+
+
void
-FlowMonitor::ReportFirstTx (uint32_t flowId, uint32_t packetId)
+FlowMonitor::ReportFirstTx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
{
+ TrackedPacket &tracked = m_trackedPackets[std::make_pair (flowId, packetId)];
+ tracked.firstSeenTime = Simulator::Now ();
+ tracked.lastSeenTime = tracked.firstSeenTime;
+ tracked.timesForwarded = 0;
+
+ probe->AddPacketStats (flowId, packetSize, Seconds (0));
+
+ FlowStats &stats = GetStatsForFlow (flowId);
+ stats.txBytes += packetSize;
+ stats.txPackets++;
+}
+
+
+void
+FlowMonitor::ReportForwarding (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
+{
+ std::pair<FlowId, FlowPacketId> key (flowId, packetId);
+ TrackedPacketMap::iterator tracked = m_trackedPackets.find (key);
+ if (tracked == m_trackedPackets.end ())
+ {
+ NS_LOG_WARN ("Received packet forward report (flowId=" << flowId << ", packetId=" << packetId
+ << ") but not known to be transmitted.");
+ return;
+ }
+
+ tracked->second.timesForwarded++;
+ tracked->second.lastSeenTime = Simulator::Now ();
+
+ Time delay = (tracked->second.firstSeenTime - Simulator::Now ());
+ probe->AddPacketStats (flowId, packetSize, delay);
}
void
-FlowMonitor::ReportLastRx (uint32_t flowId, uint32_t packetId)
+FlowMonitor::ReportLastRx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
{
+ TrackedPacketMap::iterator tracked = m_trackedPackets.find (std::make_pair (flowId, packetId));
+ if (tracked == m_trackedPackets.end ())
+ {
+ NS_LOG_WARN ("Received packet last-tx report (flowId=" << flowId << ", packetId=" << packetId
+ << ") but not known to be transmitted.");
+ return;
+ }
+
+ Time delay = (tracked->second.firstSeenTime - Simulator::Now ());
+ probe->AddPacketStats (flowId, packetSize, delay);
+
+ FlowStats &stats = GetStatsForFlow (flowId);
+ stats.delaySum += delay;
+ stats.rxBytes += packetSize;
+ stats.rxPackets++;
+ stats.timesForwarded += tracked->second.timesForwarded;
+
+ m_trackedPackets.erase (tracked); // we don't need to track this packet anymore
+}
+
+
+std::map<FlowId, FlowMonitor::FlowStats>
+FlowMonitor::GetFlowStats () const
+{
+ return m_flowStats;
}
-std::vector<FlowMonitor::Flow>
-FlowMonitor::GetFlows () const
+void
+FlowMonitor::CheckForLostPackets (Time maxDelay)
{
- std::vector<FlowMonitor::Flow> retval;
- // TODO
- return retval;
+ Time now = Simulator::Now ();
+
+ for (TrackedPacketMap::iterator iter = m_trackedPackets.begin ();
+ iter != m_trackedPackets.end (); )
+ {
+ if (now - iter->second.lastSeenTime >= maxDelay)
+ {
+ // packet is considered lost, add it to the loss statistics
+ std::map<FlowId, FlowStats>::iterator
+ flow = m_flowStats.find (iter->first.first);
+ NS_ASSERT (flow != m_flowStats.end ());
+ flow->second.lostPackets++;
+
+ // we won't track it anymore
+ m_trackedPackets.erase (iter++);
+ }
+ else
+ {
+ iter++;
+ }
+ }
+}
+
+void
+FlowMonitor::CheckForLostPackets ()
+{
+ CheckForLostPackets (m_maxPerHopDelay);
+}
+
+void
+FlowMonitor::PeriodicCheckForLostPackets ()
+{
+ CheckForLostPackets ();
+ Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
+}
+
+void
+FlowMonitor::NotifyConstructionCompleted ()
+{
+ Object::NotifyConstructionCompleted ();
+ Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
}
--- a/src/contrib/flow-monitor/flow-monitor.h Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/flow-monitor.h Tue Apr 28 17:39:32 2009 +0100
@@ -25,54 +25,74 @@
#include <map>
#include "ns3/ptr.h"
+#include "ns3/object.h"
#include "ns3/flow-probe.h"
+#include "ns3/flow-classifier.h"
#include "ns3/nstime.h"
namespace ns3 {
-class FlowMonitor
+class FlowMonitor : public Object
{
public:
struct FlowStats
{
- uint64_t txPackets;
- uint64_t rxPackets;
- uint64_t lostPackets;
+ Time delaySum; // delayCount == rxPackets
uint64_t txBytes;
uint64_t rxBytes;
- Time delaySum; // delayCount == rxPackets
- };
-
- struct Flow
- {
- uint32_t flowId;
- FlowStats flowStats;
+ uint32_t txPackets;
+ uint32_t rxPackets;
+ uint32_t lostPackets;
+ uint32_t timesForwarded; // number of times a packet was forwarded, summed for all packets
};
// basic methods
+ static TypeId GetTypeId ();
+ TypeId GetInstanceTypeId () const;
+
FlowMonitor ();
+
//void AddProbe (Ptr<FlowProbe> probe);
-
// common scenario utility methods
//void MonitorIpv4AllNodes ();
// methods to be used by the FlowMonitorProbe's
- void ReportFirstTx (uint32_t flowId, uint32_t packetId);
- void ReportLastRx (uint32_t flowId, uint32_t packetId);
+ void ReportFirstTx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+ void ReportForwarding (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+ void ReportLastRx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+
+ void CheckForLostPackets ();
+ void CheckForLostPackets (Time maxDelay);
+
+ // remember to call CheckForLostPackets first!
+ std::map<FlowId, FlowStats> GetFlowStats () const;
- std::vector<Flow> GetFlows () const;
+protected:
+
+ virtual void NotifyConstructionCompleted ();
private:
struct TrackedPacket
{
- Time firstTxTime;
+ Time firstSeenTime; // absolute time when the packet was first seen by a probe
+ Time lastSeenTime; // absolute time when the packet was last seen by a probe
+ uint32_t timesForwarded; // number of times the packet was reportedly forwarded
};
- std::map<uint32_t, FlowStats> m_flowStats;
- std::map<uint32_t, TrackedPacket> m_trackedPackets;
+ // FlowId --> FlowStats
+ std::map<FlowId, FlowStats> m_flowStats;
+
+ // (FlowId,PacketId) --> TrackedPacket
+ typedef std::map< std::pair<FlowId, FlowPacketId>, TrackedPacket> TrackedPacketMap;
+ TrackedPacketMap m_trackedPackets;
+ Time m_maxPerHopDelay;
+
+
+ FlowStats& GetStatsForFlow (FlowId flowId);
+ void PeriodicCheckForLostPackets ();
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-probe.cc Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,55 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/flow-probe.h"
+#include "ns3/flow-monitor.h"
+
+namespace ns3 {
+
+
+FlowProbe::~FlowProbe ()
+{
+}
+
+
+FlowProbe::FlowProbe (Ptr<FlowMonitor> flowMonitor)
+ : m_flowMonitor (flowMonitor)
+{
+}
+
+void
+FlowProbe::AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe)
+{
+ FlowStats &flow = m_stats[flowId];
+ flow.delayFromFirstProbeSum += delayFromFirstProbe;
+ flow.bytes += packetSize;
+ ++flow.packets;
+}
+
+FlowProbe::Stats
+FlowProbe::GetStats () const
+{
+ return m_stats;
+}
+
+
+} // namespace ns3
+
+
--- a/src/contrib/flow-monitor/flow-probe.h Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/flow-probe.h Tue Apr 28 17:39:32 2009 +0100
@@ -21,14 +21,43 @@
#ifndef __FLOW_PROBE_H__
#define __FLOW_PROBE_H__
+#include <map>
+
#include "ns3/ref-count-base.h"
+#include "ns3/flow-classifier.h"
+#include "ns3/nstime.h"
namespace ns3 {
+class FlowMonitor;
+
class FlowProbe : public RefCountBase
{
+protected:
+ FlowProbe (Ptr<FlowMonitor> flowMonitor);
+
+public:
+ ~FlowProbe ();
+
+ struct FlowStats
+ {
+ FlowStats () : delayFromFirstProbeSum (Seconds (0)), bytes (0), packets (0) {}
+
+ Time delayFromFirstProbeSum; // divide by 'Scalar (packets)' to get the average delay
+ uint64_t bytes;
+ uint32_t packets;
+ };
+
+ typedef std::map<FlowId, FlowStats> Stats;
+
+ void AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe);
+ Stats GetStats () const;
+
+private:
+ Ptr<FlowMonitor> m_flowMonitor;
+ Stats m_stats;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-classifier.cc Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,153 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/packet.h"
+
+#include "ipv4-flow-classifier.h"
+#include "ns3/udp-header.h"
+#include "ns3/tcp-header.h"
+
+namespace ns3 {
+
+/* see http://www.iana.org/assignments/protocol-numbers */
+const uint8_t TCP_PROT_NUMBER = 6;
+const uint8_t UDP_PROT_NUMBER = 17;
+
+
+
+bool operator < (const Ipv4FlowClassifier::FiveTuple &t1,
+ const Ipv4FlowClassifier::FiveTuple &t2)
+{
+ if (t1.sourceAddress < t2.sourceAddress)
+ {
+ return true;
+ }
+ if (t1.sourceAddress != t2.sourceAddress)
+ {
+ return false;
+ }
+
+ if (t1.destinationAddress < t2.destinationAddress)
+ {
+ return true;
+ }
+ if (t1.destinationAddress != t2.destinationAddress)
+ {
+ return false;
+ }
+
+ if (t1.protocol < t2.protocol)
+ {
+ return true;
+ }
+ if (t1.protocol != t2.protocol)
+ {
+ return false;
+ }
+
+ if (t1.sourcePort < t2.sourcePort)
+ {
+ return true;
+ }
+ if (t1.sourcePort != t2.sourcePort)
+ {
+ return false;
+ }
+
+ if (t1.destinationPort < t2.destinationPort)
+ {
+ return true;
+ }
+ if (t1.destinationPort != t2.destinationPort)
+ {
+ return false;
+ }
+
+ return false;
+}
+
+bool operator == (const Ipv4FlowClassifier::FiveTuple &t1,
+ const Ipv4FlowClassifier::FiveTuple &t2)
+{
+ return (t1.sourceAddress == t2.sourceAddress &&
+ t1.destinationAddress == t2.destinationAddress &&
+ t1.protocol == t2.protocol &&
+ t1.sourcePort == t2.sourcePort &&
+ t1.destinationPort == t2.destinationPort);
+}
+
+
+
+Ipv4FlowClassifier::Ipv4FlowClassifier ()
+{
+}
+
+bool
+Ipv4FlowClassifier::Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ uint32_t *out_flowId, uint32_t *out_packetId)
+{
+ FiveTuple tuple;
+ tuple.sourceAddress = ipHeader.GetSource ();
+ tuple.destinationAddress = ipHeader.GetDestination ();
+ tuple.protocol = ipHeader.GetProtocol ();
+
+ switch (tuple.protocol)
+ {
+ case UDP_PROT_NUMBER:
+ {
+ UdpHeader udpHeader;
+ ipPayload->PeekHeader (udpHeader);
+ tuple.sourcePort = udpHeader.GetSourcePort ();
+ tuple.destinationPort = udpHeader.GetDestinationPort ();
+ }
+ break;
+
+ case TCP_PROT_NUMBER:
+ {
+ TcpHeader tcpHeader;
+ ipPayload->PeekHeader (tcpHeader);
+ tuple.sourcePort = tcpHeader.GetSourcePort ();
+ tuple.destinationPort = tcpHeader.GetDestinationPort ();
+ }
+ break;
+
+ default:
+ return false;
+ }
+
+ // try to insert the tuple, but check if it already exists
+ std::pair<std::map<FiveTuple, FlowId>::iterator, bool> insert
+ = m_flowMap.insert (std::pair<FiveTuple, FlowId> (tuple, 0));
+
+ // if the insertion succeeded, we need to assign this tuple a new flow identifier
+ if (insert.second)
+ {
+ insert.first->second = GetNewFlowId ();
+ }
+
+ *out_flowId = insert.first->second;
+ *out_packetId = ipHeader.GetIdentification ();
+
+ return true;
+}
+
+
+} // namespace ns3
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-classifier.h Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,70 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __IPV4_FLOW_CLASSIFIER_H__
+#define __IPV4_FLOW_CLASSIFIER_H__
+
+#include <stdint.h>
+#include <map>
+
+#include "ns3/ipv4-header.h"
+#include "ns3/flow-classifier.h"
+
+namespace ns3 {
+
+class Packet;
+
+class Ipv4FlowClassifier : public FlowClassifier
+{
+public:
+
+ struct FiveTuple
+ {
+ Ipv4Address sourceAddress;
+ Ipv4Address destinationAddress;
+ uint8_t protocol;
+ uint16_t sourcePort;
+ uint16_t destinationPort;
+ };
+
+ Ipv4FlowClassifier ();
+
+ /// \brief try to classify the packet into flow-id and packet-id
+ /// \return true if the packet was classified, false if not (i.e. it
+ /// does not appear to be part of a flow).
+ bool Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ uint32_t *out_flowId, uint32_t *out_packetId);
+
+
+private:
+
+ std::map<FiveTuple, FlowId> m_flowMap;
+
+};
+
+
+bool operator < (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
+bool operator == (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-probe.cc Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,104 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/ipv4-flow-probe.h"
+#include "ns3/ipv4-flow-classifier.h"
+#include "ns3/node.h"
+#include "ns3/ipv4-l3-protocol.h"
+#include "ns3/packet.h"
+#include "ns3/flow-monitor.h"
+
+namespace ns3 {
+
+
+Ipv4FlowProbe::~Ipv4FlowProbe ()
+{
+}
+
+
+Ipv4FlowProbe::Ipv4FlowProbe (Ptr<FlowMonitor> monitor,
+ Ptr<Ipv4FlowClassifier> classifier,
+ Ptr<Node> node)
+ : FlowProbe (monitor),
+ m_classifier (classifier)
+{
+ Ptr<Ipv4L3Protocol> ipv4 = node->GetObject<Ipv4L3Protocol> ();
+
+ if (!ipv4->TraceConnectWithoutContext ("SendOutgoing",
+ MakeCallback (&Ipv4FlowProbe::SendOutgoingLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+ if (!ipv4->TraceConnectWithoutContext ("Forward",
+ MakeCallback (&Ipv4FlowProbe::ForwardLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+ if (!ipv4->TraceConnectWithoutContext ("ForwardUp",
+ MakeCallback (&Ipv4FlowProbe::ForwardUpLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+}
+
+void
+Ipv4FlowProbe::SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ m_monitor->ReportFirstTx (this, flowId, packetId, size);
+ }
+}
+
+void
+Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ m_monitor->ReportForwarding (this, flowId, packetId, size);
+ }
+
+}
+
+void
+Ipv4FlowProbe::ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ m_monitor->ReportLastRx (this, flowId, packetId, size);
+ }
+}
+
+} // namespace ns3
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-probe.h Tue Apr 28 17:39:32 2009 +0100
@@ -0,0 +1,53 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __IPV4_FLOW_PROBE_H__
+#define __IPV4_FLOW_PROBE_H__
+
+#include "ns3/flow-probe.h"
+#include "ns3/ipv4-flow-classifier.h"
+
+namespace ns3 {
+
+class FlowMonitor;
+class Node;
+
+class Ipv4FlowProbe : public FlowProbe
+{
+
+public:
+ Ipv4FlowProbe (Ptr<FlowMonitor> monitor, Ptr<Ipv4FlowClassifier> classifier, Ptr<Node> node);
+ ~Ipv4FlowProbe ();
+
+private:
+
+ void SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+ void ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+ void ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+
+ Ptr<FlowMonitor> m_monitor;
+ Ptr<Ipv4FlowClassifier> m_classifier;
+};
+
+
+} // namespace ns3
+
+#endif
+
--- a/src/contrib/flow-monitor/wscript Thu Apr 23 15:48:35 2009 +0100
+++ b/src/contrib/flow-monitor/wscript Tue Apr 28 17:39:32 2009 +0100
@@ -5,6 +5,9 @@
obj.source = [
'flow-monitor.cc',
'flow-classifier.cc',
+ 'flow-probe.cc',
+ 'ipv4-flow-classifier.cc',
+ 'ipv4-flow-probe.cc',
]
headers = bld.create_obj('ns3header')
headers.module = 'flow-monitor'
@@ -12,5 +15,7 @@
'flow-monitor.h',
'flow-probe.h',
'flow-classifier.h',
+ 'ipv4-flow-classifier.h',
+ 'ipv4-flow-probe.h',
]