Deconflict NetDevice::ifIndex and Ipv4::ifIndex (bug 85).
All function parameters named "ifIndex" that refer
to an Ipv4 interface are instead named "interface".
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 12972faaa..1edbeadca 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -17,13 +17,21 @@ This release is scheduled for June/July 2009
New user-visible features
-------------------------
- a) 802.11e EDCA support: Has been added possibilty to manage QoS traffic on wifi stations.
- b) 802.11n initial support: Has been added support for A-MSDU frame aggregation feature.
+ a) 802.11 MAC:
+ - EDCA multi-qos-class support (Mirko Banchi)
+ - 802.11n initial support for A-MSDU frame aggregation (Mirko Banchi)
+ - aarf-cd and cara rate control algorithms (Federico Maguolo)
+ b) 802.11 PHY:
+ - 802.11b PHY support (Gary Pei)
+ - Nakagami propagation loss model (Timo Bingmann)
+ c) GammaVariable and ErlangVariable (Timo Bingmann)
API changes from ns-3.4
-----------------------
-API changes for this release are documented in the file CHANGES.html
+API changes for this release are documented in the file CHANGES.html. The
+internal API and composition of the IPv4 stack underwent significant
+refactoring in this release cycle.
Release 3.4
===========
diff --git a/bindings/python/ns3_module_bridge.py b/bindings/python/ns3_module_bridge.py
index e63db6b91..8ed571317 100644
--- a/bindings/python/ns3_module_bridge.py
+++ b/bindings/python/ns3_module_bridge.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -20,6 +20,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -40,6 +46,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -254,6 +264,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -264,6 +275,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_common.py b/bindings/python/ns3_module_common.py
index 46badd328..73d6da029 100644
--- a/bindings/python/ns3_module_common.py
+++ b/bindings/python/ns3_module_common.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -66,6 +66,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -86,6 +92,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1115,6 +1125,7 @@ def register_functions(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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1125,6 +1136,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_contrib.py b/bindings/python/ns3_module_contrib.py
index f334a7a30..9ad4041ac 100644
--- a/bindings/python/ns3_module_contrib.py
+++ b/bindings/python/ns3_module_contrib.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -52,6 +52,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -72,6 +78,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -470,6 +480,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -480,6 +491,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py
index f92b4d19a..498c1d520 100644
--- a/bindings/python/ns3_module_core.py
+++ b/bindings/python/ns3_module_core.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -186,6 +186,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -209,6 +215,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1641,6 +1651,11 @@ def register_Ns3Object_methods(root_module, cls):
'ns3::Object::AggregateIterator',
[],
is_const=True)
+ ## object.h: void ns3::Object::NotifyNewAggregate() [member function]
+ cls.add_method('NotifyNewAggregate',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
## object.h: void ns3::Object::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -2222,6 +2237,7 @@ def register_functions(root_module):
template_parameters=['unsigned char'])
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -2288,6 +2304,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
## double.h: extern ns3::Ptr ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
module.add_function('MakeDoubleChecker',
diff --git a/bindings/python/ns3_module_csma.py b/bindings/python/ns3_module_csma.py
index d7e8e9b4f..eeceb9b65 100644
--- a/bindings/python/ns3_module_csma.py
+++ b/bindings/python/ns3_module_csma.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -28,6 +28,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +54,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -414,6 +424,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -424,6 +435,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_emu.py b/bindings/python/ns3_module_emu.py
index 4fa5d12a1..f32ed9c94 100644
--- a/bindings/python/ns3_module_emu.py
+++ b/bindings/python/ns3_module_emu.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -18,6 +18,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -38,6 +44,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -206,6 +216,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -216,6 +227,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_global_routing.py b/bindings/python/ns3_module_global_routing.py
index c3e0386d5..c93d06e34 100644
--- a/bindings/python/ns3_module_global_routing.py
+++ b/bindings/python/ns3_module_global_routing.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -30,6 +30,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -50,6 +56,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -287,6 +297,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -297,6 +308,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_helper.py b/bindings/python/ns3_module_helper.py
index 09473b2f9..eb690ce1a 100644
--- a/bindings/python/ns3_module_helper.py
+++ b/bindings/python/ns3_module_helper.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -17,6 +17,8 @@ def register_types(module):
module.add_class('Ipv4AddressHelper', allow_subclassing=False)
## ipv4-interface-container.h: ns3::Ipv4InterfaceContainer [class]
module.add_class('Ipv4InterfaceContainer')
+ ## ipv4-static-routing-helper.h: ns3::Ipv4StaticRoutingHelper [class]
+ module.add_class('Ipv4StaticRoutingHelper', allow_subclassing=False)
## mobility-helper.h: ns3::MobilityHelper [class]
module.add_class('MobilityHelper', allow_subclassing=False)
## net-device-container.h: ns3::NetDeviceContainer [class]
@@ -35,8 +37,6 @@ def register_types(module):
module.add_class('PacketSocketHelper', allow_subclassing=False)
## point-to-point-helper.h: ns3::PointToPointHelper [class]
module.add_class('PointToPointHelper', allow_subclassing=False)
- ## static-multicast-route-helper.h: ns3::StaticMulticastRouteHelper [class]
- module.add_class('StaticMulticastRouteHelper', allow_subclassing=False)
## tap-bridge-helper.h: ns3::TapBridgeHelper [class]
module.add_class('TapBridgeHelper', allow_subclassing=False)
## udp-echo-helper.h: ns3::UdpEchoClientHelper [class]
@@ -72,6 +72,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -92,6 +98,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -108,6 +118,7 @@ def register_methods(root_module):
register_Ns3InternetStackHelper_methods(root_module, root_module['ns3::InternetStackHelper'])
register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer'])
+ register_Ns3Ipv4StaticRoutingHelper_methods(root_module, root_module['ns3::Ipv4StaticRoutingHelper'])
register_Ns3MobilityHelper_methods(root_module, root_module['ns3::MobilityHelper'])
register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer'])
register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer'])
@@ -117,7 +128,6 @@ def register_methods(root_module):
register_Ns3PacketSinkHelper_methods(root_module, root_module['ns3::PacketSinkHelper'])
register_Ns3PacketSocketHelper_methods(root_module, root_module['ns3::PacketSocketHelper'])
register_Ns3PointToPointHelper_methods(root_module, root_module['ns3::PointToPointHelper'])
- register_Ns3StaticMulticastRouteHelper_methods(root_module, root_module['ns3::StaticMulticastRouteHelper'])
register_Ns3TapBridgeHelper_methods(root_module, root_module['ns3::TapBridgeHelper'])
register_Ns3UdpEchoClientHelper_methods(root_module, root_module['ns3::UdpEchoClientHelper'])
register_Ns3UdpEchoServerHelper_methods(root_module, root_module['ns3::UdpEchoServerHelper'])
@@ -423,10 +433,14 @@ def register_Ns3InternetStackHelper_methods(root_module, cls):
'void',
[param('ns3::NodeContainer', 'c')],
is_const=True)
- ## internet-stack-helper.h: void ns3::InternetStackHelper::SetNscStack(std::string soname) [member function]
- cls.add_method('SetNscStack',
+ ## internet-stack-helper.h: void ns3::InternetStackHelper::SetTcp(std::string tid) [member function]
+ cls.add_method('SetTcp',
'void',
- [param('std::string', 'soname')])
+ [param('std::string', 'tid')])
+ ## internet-stack-helper.h: void ns3::InternetStackHelper::SetTcp(std::string tid, std::string attr, ns3::AttributeValue const & val) [member function]
+ cls.add_method('SetTcp',
+ 'void',
+ [param('std::string', 'tid'), param('std::string', 'attr'), param('ns3::AttributeValue const &', 'val')])
## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
cls.add_method('EnableAscii',
'void',
@@ -500,6 +514,50 @@ def register_Ns3Ipv4InterfaceContainer_methods(root_module, cls):
[param('std::string', 'ipv4Name'), param('uint32_t', 'interface')])
return
+def register_Ns3Ipv4StaticRoutingHelper_methods(root_module, cls):
+ ## ipv4-static-routing-helper.h: ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper(ns3::Ipv4StaticRoutingHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4StaticRoutingHelper const &', 'arg0')])
+ ## ipv4-static-routing-helper.h: ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper() [constructor]
+ cls.add_constructor([])
+ ## ipv4-static-routing-helper.h: ns3::Ptr ns3::Ipv4StaticRoutingHelper::GetStaticRouting(ns3::Ptr ipv4) const [member function]
+ cls.add_method('GetStaticRouting',
+ 'ns3::Ptr< ns3::Ipv4StaticRouting >',
+ [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')],
+ is_const=True)
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(std::string n, ns3::Ipv4Address source, ns3::Ipv4Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('std::string', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group, std::string inputName, ns3::NetDeviceContainer output) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(std::string nName, ns3::Ipv4Address source, ns3::Ipv4Address group, std::string inputName, ns3::NetDeviceContainer output) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('std::string', 'nName'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(ns3::Ptr n, ns3::Ptr nd) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(ns3::Ptr n, std::string ndName) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'n'), param('std::string', 'ndName')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(std::string nName, ns3::Ptr nd) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('std::string', 'nName'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
+ ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(std::string nName, std::string ndName) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('std::string', 'nName'), param('std::string', 'ndName')])
+ return
+
def register_Ns3MobilityHelper_methods(root_module, cls):
## mobility-helper.h: ns3::MobilityHelper::MobilityHelper(ns3::MobilityHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MobilityHelper const &', 'arg0')])
@@ -885,53 +943,6 @@ def register_Ns3PointToPointHelper_methods(root_module, cls):
[param('std::string', 'hubName'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')])
return
-def register_Ns3StaticMulticastRouteHelper_methods(root_module, cls):
- ## static-multicast-route-helper.h: ns3::StaticMulticastRouteHelper::StaticMulticastRouteHelper(ns3::StaticMulticastRouteHelper const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::StaticMulticastRouteHelper const &', 'arg0')])
- ## static-multicast-route-helper.h: ns3::StaticMulticastRouteHelper::StaticMulticastRouteHelper() [constructor]
- cls.add_constructor([])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function]
- cls.add_method('AddMulticastRoute',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::AddMulticastRoute(std::string n, ns3::Ipv4Address source, ns3::Ipv4Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function]
- cls.add_method('AddMulticastRoute',
- 'void',
- [param('std::string', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group, std::string inputName, ns3::NetDeviceContainer output) [member function]
- cls.add_method('AddMulticastRoute',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::AddMulticastRoute(std::string nName, ns3::Ipv4Address source, ns3::Ipv4Address group, std::string inputName, ns3::NetDeviceContainer output) [member function]
- cls.add_method('AddMulticastRoute',
- 'void',
- [param('std::string', 'nName'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::SetDefaultMulticastRoute(ns3::Ptr n, ns3::Ptr nd) [member function]
- cls.add_method('SetDefaultMulticastRoute',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::SetDefaultMulticastRoute(ns3::Ptr n, std::string ndName) [member function]
- cls.add_method('SetDefaultMulticastRoute',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'n'), param('std::string', 'ndName')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::SetDefaultMulticastRoute(std::string nName, ns3::Ptr nd) [member function]
- cls.add_method('SetDefaultMulticastRoute',
- 'void',
- [param('std::string', 'nName'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::SetDefaultMulticastRoute(std::string nName, std::string ndName) [member function]
- cls.add_method('SetDefaultMulticastRoute',
- 'void',
- [param('std::string', 'nName'), param('std::string', 'ndName')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::JoinMulticastGroup(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group) [member function]
- cls.add_method('JoinMulticastGroup',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group')])
- ## static-multicast-route-helper.h: void ns3::StaticMulticastRouteHelper::JoinMulticastGroup(std::string nName, ns3::Ipv4Address source, ns3::Ipv4Address group) [member function]
- cls.add_method('JoinMulticastGroup',
- 'void',
- [param('std::string', 'nName'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group')])
- return
-
def register_Ns3TapBridgeHelper_methods(root_module, cls):
## tap-bridge-helper.h: ns3::TapBridgeHelper::TapBridgeHelper(ns3::TapBridgeHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TapBridgeHelper const &', 'arg0')])
@@ -1264,6 +1275,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1274,6 +1286,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_internet_stack.py b/bindings/python/ns3_module_internet_stack.py
index c29a3992a..f5cda47aa 100644
--- a/bindings/python/ns3_module_internet_stack.py
+++ b/bindings/python/ns3_module_internet_stack.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -23,8 +23,12 @@ def register_types(module):
module.add_enum('Flags_t', ['NONE', 'FIN', 'SYN', 'RST', 'PSH', 'ACK', 'URG'], outer_class=root_module['ns3::TcpHeader'])
## udp-header.h: ns3::UdpHeader [class]
module.add_class('UdpHeader', parent=root_module['ns3::Header'])
+ ## ipv4-static-routing-impl.h: ns3::Ipv4StaticRoutingImpl [class]
+ module.add_class('Ipv4StaticRoutingImpl', parent=root_module['ns3::Ipv4StaticRouting'])
## ipv4-global-routing.h: ns3::Ipv4GlobalRouting [class]
module.add_class('Ipv4GlobalRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
+ ## ipv4-list-routing-impl.h: ns3::Ipv4ListRoutingImpl [class]
+ module.add_class('Ipv4ListRoutingImpl', parent=root_module['ns3::Ipv4ListRouting'])
## Register a nested module for the namespace Config
@@ -38,6 +42,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -58,6 +68,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -73,7 +87,9 @@ def register_methods(root_module):
register_Ns3Icmpv4TimeExceeded_methods(root_module, root_module['ns3::Icmpv4TimeExceeded'])
register_Ns3TcpHeader_methods(root_module, root_module['ns3::TcpHeader'])
register_Ns3UdpHeader_methods(root_module, root_module['ns3::UdpHeader'])
+ register_Ns3Ipv4StaticRoutingImpl_methods(root_module, root_module['ns3::Ipv4StaticRoutingImpl'])
register_Ns3Ipv4GlobalRouting_methods(root_module, root_module['ns3::Ipv4GlobalRouting'])
+ register_Ns3Ipv4ListRoutingImpl_methods(root_module, root_module['ns3::Ipv4ListRoutingImpl'])
return
def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls):
@@ -508,6 +524,118 @@ def register_Ns3UdpHeader_methods(root_module, cls):
is_const=True)
return
+def register_Ns3Ipv4StaticRoutingImpl_methods(root_module, cls):
+ ## ipv4-static-routing-impl.h: ns3::Ipv4StaticRoutingImpl::Ipv4StaticRoutingImpl(ns3::Ipv4StaticRoutingImpl const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4StaticRoutingImpl const &', 'arg0')])
+ ## ipv4-static-routing-impl.h: static ns3::TypeId ns3::Ipv4StaticRoutingImpl::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-static-routing-impl.h: ns3::Ipv4StaticRoutingImpl::Ipv4StaticRoutingImpl() [constructor]
+ cls.add_constructor([])
+ ## ipv4-static-routing-impl.h: ns3::Ptr ns3::Ipv4StaticRoutingImpl::RouteOutput(ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: bool ns3::Ipv4StaticRoutingImpl::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ cls.add_method('RouteInput',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('AddHostRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'dest'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::AddHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
+ cls.add_method('AddHostRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('AddNetworkRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
+ cls.add_method('AddNetworkRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::SetDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('SetDefaultRoute',
+ 'void',
+ [param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: uint32_t ns3::Ipv4StaticRoutingImpl::GetNRoutes() [member function]
+ cls.add_method('GetNRoutes',
+ 'uint32_t',
+ [],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRoutingImpl::GetDefaultRoute() [member function]
+ cls.add_method('GetDefaultRoute',
+ 'ns3::Ipv4RoutingTableEntry',
+ [],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRoutingImpl::GetRoute(uint32_t i) [member function]
+ cls.add_method('GetRoute',
+ 'ns3::Ipv4RoutingTableEntry',
+ [param('uint32_t', 'i')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::RemoveRoute(uint32_t i) [member function]
+ cls.add_method('RemoveRoute',
+ 'void',
+ [param('uint32_t', 'i')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::AddMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::SetDefaultMulticastRoute(uint32_t outputInterface) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('uint32_t', 'outputInterface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: uint32_t ns3::Ipv4StaticRoutingImpl::GetNMulticastRoutes() const [member function]
+ cls.add_method('GetNMulticastRoutes',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv4-static-routing-impl.h: ns3::Ipv4MulticastRoutingTableEntry ns3::Ipv4StaticRoutingImpl::GetMulticastRoute(uint32_t i) const [member function]
+ cls.add_method('GetMulticastRoute',
+ 'ns3::Ipv4MulticastRoutingTableEntry',
+ [param('uint32_t', 'i')],
+ is_const=True, is_virtual=True)
+ ## ipv4-static-routing-impl.h: bool ns3::Ipv4StaticRoutingImpl::RemoveMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface) [member function]
+ cls.add_method('RemoveMulticastRoute',
+ 'bool',
+ [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::RemoveMulticastRoute(uint32_t index) [member function]
+ cls.add_method('RemoveMulticastRoute',
+ 'void',
+ [param('uint32_t', 'index')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::SetNode(ns3::Ptr node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')],
+ is_virtual=True)
+ ## ipv4-static-routing-impl.h: ns3::Ptr ns3::Ipv4StaticRoutingImpl::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv4-static-routing-impl.h: void ns3::Ipv4StaticRoutingImpl::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_Ns3Ipv4GlobalRouting_methods(root_module, cls):
## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting(ns3::Ipv4GlobalRouting const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Ipv4GlobalRouting const &', 'arg0')])
@@ -518,15 +646,15 @@ def register_Ns3Ipv4GlobalRouting_methods(root_module, cls):
is_static=True)
## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting() [constructor]
cls.add_constructor([])
- ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RequestRoute(uint32_t interface, ns3::Ipv4Header const & ipHeader, ns3::Ptr packet, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> routeReply) [member function]
- cls.add_method('RequestRoute',
- 'bool',
- [param('uint32_t', 'interface'), param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Callback< void, bool, ns3::Ipv4Route const &, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ ## ipv4-global-routing.h: ns3::Ptr ns3::Ipv4GlobalRouting::RouteOutput(ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
is_virtual=True)
- ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RequestInterface(ns3::Ipv4Address destination, uint32_t & interface) [member function]
- cls.add_method('RequestInterface',
+ ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ cls.add_method('RouteInput',
'bool',
- [param('ns3::Ipv4Address', 'destination'), param('uint32_t &', 'interface')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_virtual=True)
## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
cls.add_method('AddHostRouteTo',
@@ -548,14 +676,23 @@ def register_Ns3Ipv4GlobalRouting_methods(root_module, cls):
cls.add_method('GetNRoutes',
'uint32_t',
[])
- ## ipv4-global-routing.h: ns3::Ipv4Route * ns3::Ipv4GlobalRouting::GetRoute(uint32_t i) [member function]
+ ## ipv4-global-routing.h: ns3::Ipv4RoutingTableEntry * ns3::Ipv4GlobalRouting::GetRoute(uint32_t i) [member function]
cls.add_method('GetRoute',
- 'ns3::Ipv4Route *',
+ 'ns3::Ipv4RoutingTableEntry *',
[param('uint32_t', 'i')])
## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::RemoveRoute(uint32_t i) [member function]
cls.add_method('RemoveRoute',
'void',
[param('uint32_t', 'i')])
+ ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::SetNode(ns3::Ptr node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')])
+ ## ipv4-global-routing.h: ns3::Ptr ns3::Ipv4GlobalRouting::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True)
## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -563,18 +700,67 @@ def register_Ns3Ipv4GlobalRouting_methods(root_module, cls):
visibility='protected', is_virtual=True)
return
+def register_Ns3Ipv4ListRoutingImpl_methods(root_module, cls):
+ ## ipv4-list-routing-impl.h: ns3::Ipv4ListRoutingImpl::Ipv4ListRoutingImpl(ns3::Ipv4ListRoutingImpl const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4ListRoutingImpl const &', 'arg0')])
+ ## ipv4-list-routing-impl.h: static ns3::TypeId ns3::Ipv4ListRoutingImpl::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-list-routing-impl.h: ns3::Ipv4ListRoutingImpl::Ipv4ListRoutingImpl() [constructor]
+ cls.add_constructor([])
+ ## ipv4-list-routing-impl.h: ns3::Ptr ns3::Ipv4ListRoutingImpl::RouteOutput(ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
+ is_virtual=True)
+ ## ipv4-list-routing-impl.h: bool ns3::Ipv4ListRoutingImpl::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ cls.add_method('RouteInput',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ is_virtual=True)
+ ## ipv4-list-routing-impl.h: void ns3::Ipv4ListRoutingImpl::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function]
+ cls.add_method('AddRoutingProtocol',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')],
+ is_virtual=True)
+ ## ipv4-list-routing-impl.h: uint32_t ns3::Ipv4ListRoutingImpl::GetNRoutingProtocols() const [member function]
+ cls.add_method('GetNRoutingProtocols',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv4-list-routing-impl.h: ns3::Ptr ns3::Ipv4ListRoutingImpl::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function]
+ cls.add_method('GetRoutingProtocol',
+ 'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
+ [param('uint32_t', 'index'), param('int16_t &', 'priority')],
+ is_const=True, is_virtual=True)
+ ## ipv4-list-routing-impl.h: ns3::Ptr ns3::Ipv4ListRoutingImpl::GetStaticRouting() const [member function]
+ cls.add_method('GetStaticRouting',
+ 'ns3::Ptr< ns3::Ipv4StaticRouting >',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv4-list-routing-impl.h: void ns3::Ipv4ListRoutingImpl::SetNode(ns3::Ptr node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')])
+ ## ipv4-list-routing-impl.h: ns3::Ptr ns3::Ipv4ListRoutingImpl::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True)
+ ## ipv4-list-routing-impl.h: void ns3::Ipv4ListRoutingImpl::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_functions(root_module):
module = root_module
- ## internet-stack.h: extern void ns3::AddInternetStack(ns3::Ptr node) [free function]
- module.add_function('AddInternetStack',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'node')])
- ## internet-stack.h: extern void ns3::AddNscInternetStack(ns3::Ptr node, std::string const & soname) [free function]
- module.add_function('AddNscInternetStack',
- 'void',
- [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string const &', 'soname')])
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -585,6 +771,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_mobility.py b/bindings/python/ns3_module_mobility.py
index ef884b178..fdf2f0bdd 100644
--- a/bindings/python/ns3_module_mobility.py
+++ b/bindings/python/ns3_module_mobility.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -62,6 +62,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -82,6 +88,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -748,6 +758,7 @@ def register_functions(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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -758,6 +769,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_node.py b/bindings/python/ns3_module_node.py
index 8fa22046a..9828444b2 100644
--- a/bindings/python/ns3_module_node.py
+++ b/bindings/python/ns3_module_node.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -29,10 +29,10 @@ def register_types(module):
module.add_enum('InterfaceAddressScope_e', ['HOST', 'LINK', 'GLOBAL'], outer_class=root_module['ns3::Ipv4InterfaceAddress'])
## ipv4-address.h: ns3::Ipv4Mask [class]
module.add_class('Ipv4Mask')
- ## ipv4-route.h: ns3::Ipv4MulticastRoute [class]
- module.add_class('Ipv4MulticastRoute')
- ## ipv4-route.h: ns3::Ipv4Route [class]
- module.add_class('Ipv4Route')
+ ## ipv4-routing-table-entry.h: ns3::Ipv4MulticastRoutingTableEntry [class]
+ module.add_class('Ipv4MulticastRoutingTableEntry')
+ ## ipv4-routing-table-entry.h: ns3::Ipv4RoutingTableEntry [class]
+ module.add_class('Ipv4RoutingTableEntry')
## ipv6-address.h: ns3::Ipv6Address [class]
module.add_class('Ipv6Address')
## ipv6-address.h: ns3::Ipv6Address [class]
@@ -63,6 +63,10 @@ def register_types(module):
module.add_class('Ipv4MaskChecker', parent=root_module['ns3::AttributeChecker'])
## ipv4-address.h: ns3::Ipv4MaskValue [class]
module.add_class('Ipv4MaskValue', parent=root_module['ns3::AttributeValue'])
+ ## ipv4-route.h: ns3::Ipv4MulticastRoute [class]
+ module.add_class('Ipv4MulticastRoute', parent=root_module['ns3::RefCountBase'])
+ ## ipv4-route.h: ns3::Ipv4Route [class]
+ module.add_class('Ipv4Route', parent=root_module['ns3::RefCountBase'])
## ipv6-address.h: ns3::Ipv6AddressChecker [class]
module.add_class('Ipv6AddressChecker', parent=root_module['ns3::AttributeChecker'])
## ipv6-address.h: ns3::Ipv6AddressValue [class]
@@ -123,8 +127,10 @@ def register_types(module):
module.add_class('Ipv4', parent=root_module['ns3::Object'])
## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory [class]
module.add_class('Ipv4RawSocketFactory', parent=root_module['ns3::SocketFactory'])
- ## ipv4.h: ns3::Ipv4RoutingProtocol [class]
+ ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol [class]
module.add_class('Ipv4RoutingProtocol', parent=root_module['ns3::Object'])
+ ## ipv4-static-routing.h: ns3::Ipv4StaticRouting [class]
+ module.add_class('Ipv4StaticRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
## net-device.h: ns3::NetDevice [class]
module.add_class('NetDevice', parent=root_module['ns3::Object'])
## net-device.h: ns3::NetDevice::PacketType [enumeration]
@@ -137,6 +143,8 @@ def register_types(module):
module.add_class('SimpleChannel', parent=root_module['ns3::Channel'])
## simple-net-device.h: ns3::SimpleNetDevice [class]
module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
+ ## ipv4-list-routing.h: ns3::Ipv4ListRouting [class]
+ module.add_class('Ipv4ListRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
module.add_container('ns3::olsr::MprSet', 'ns3::Ipv4Address', container_type='set')
module.add_container('std::vector< ns3::Ipv4Address >', 'ns3::Ipv4Address', container_type='vector')
@@ -152,6 +160,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -172,6 +186,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -188,8 +206,8 @@ def register_methods(root_module):
register_Ns3Ipv4AddressGenerator_methods(root_module, root_module['ns3::Ipv4AddressGenerator'])
register_Ns3Ipv4InterfaceAddress_methods(root_module, root_module['ns3::Ipv4InterfaceAddress'])
register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask'])
- register_Ns3Ipv4MulticastRoute_methods(root_module, root_module['ns3::Ipv4MulticastRoute'])
- register_Ns3Ipv4Route_methods(root_module, root_module['ns3::Ipv4Route'])
+ register_Ns3Ipv4MulticastRoutingTableEntry_methods(root_module, root_module['ns3::Ipv4MulticastRoutingTableEntry'])
+ register_Ns3Ipv4RoutingTableEntry_methods(root_module, root_module['ns3::Ipv4RoutingTableEntry'])
register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address'])
register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix'])
register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address'])
@@ -201,6 +219,8 @@ def register_methods(root_module):
register_Ns3Ipv4Header_methods(root_module, root_module['ns3::Ipv4Header'])
register_Ns3Ipv4MaskChecker_methods(root_module, root_module['ns3::Ipv4MaskChecker'])
register_Ns3Ipv4MaskValue_methods(root_module, root_module['ns3::Ipv4MaskValue'])
+ register_Ns3Ipv4MulticastRoute_methods(root_module, root_module['ns3::Ipv4MulticastRoute'])
+ register_Ns3Ipv4Route_methods(root_module, root_module['ns3::Ipv4Route'])
register_Ns3Ipv6AddressChecker_methods(root_module, root_module['ns3::Ipv6AddressChecker'])
register_Ns3Ipv6AddressValue_methods(root_module, root_module['ns3::Ipv6AddressValue'])
register_Ns3Ipv6Header_methods(root_module, root_module['ns3::Ipv6Header'])
@@ -229,11 +249,13 @@ def register_methods(root_module):
register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
register_Ns3Ipv4RawSocketFactory_methods(root_module, root_module['ns3::Ipv4RawSocketFactory'])
register_Ns3Ipv4RoutingProtocol_methods(root_module, root_module['ns3::Ipv4RoutingProtocol'])
+ register_Ns3Ipv4StaticRouting_methods(root_module, root_module['ns3::Ipv4StaticRouting'])
register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice'])
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory'])
register_Ns3SimpleChannel_methods(root_module, root_module['ns3::SimpleChannel'])
register_Ns3SimpleNetDevice_methods(root_module, root_module['ns3::SimpleNetDevice'])
+ register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting'])
return
def register_Ns3Address_methods(root_module, cls):
@@ -664,125 +686,125 @@ def register_Ns3Ipv4Mask_methods(root_module, cls):
[param('uint32_t', 'mask')])
return
-def register_Ns3Ipv4MulticastRoute_methods(root_module, cls):
+def register_Ns3Ipv4MulticastRoutingTableEntry_methods(root_module, cls):
cls.add_output_stream_operator()
- ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute() [constructor]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry() [constructor]
cls.add_constructor([])
- ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute(ns3::Ipv4MulticastRoute const & route) [copy constructor]
- cls.add_constructor([param('ns3::Ipv4MulticastRoute const &', 'route')])
- ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute(ns3::Ipv4MulticastRoute const * route) [constructor]
- cls.add_constructor([param('ns3::Ipv4MulticastRoute const *', 'route')])
- ## ipv4-route.h: static ns3::Ipv4MulticastRoute ns3::Ipv4MulticastRoute::CreateMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry(ns3::Ipv4MulticastRoutingTableEntry const & route) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4MulticastRoutingTableEntry const &', 'route')])
+ ## ipv4-routing-table-entry.h: ns3::Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry(ns3::Ipv4MulticastRoutingTableEntry const * route) [constructor]
+ cls.add_constructor([param('ns3::Ipv4MulticastRoutingTableEntry const *', 'route')])
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4MulticastRoutingTableEntry ns3::Ipv4MulticastRoutingTableEntry::CreateMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function]
cls.add_method('CreateMulticastRoute',
- 'ns3::Ipv4MulticastRoute',
+ 'ns3::Ipv4MulticastRoutingTableEntry',
[param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')],
is_static=True)
- ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetGroup() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Address ns3::Ipv4MulticastRoutingTableEntry::GetGroup() const [member function]
cls.add_method('GetGroup',
'ns3::Ipv4Address',
[],
is_const=True)
- ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetInputInterface() const [member function]
+ ## ipv4-routing-table-entry.h: uint32_t ns3::Ipv4MulticastRoutingTableEntry::GetInputInterface() const [member function]
cls.add_method('GetInputInterface',
'uint32_t',
[],
is_const=True)
- ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetNOutputInterfaces() const [member function]
+ ## ipv4-routing-table-entry.h: uint32_t ns3::Ipv4MulticastRoutingTableEntry::GetNOutputInterfaces() const [member function]
cls.add_method('GetNOutputInterfaces',
'uint32_t',
[],
is_const=True)
- ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetOrigin() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Address ns3::Ipv4MulticastRoutingTableEntry::GetOrigin() const [member function]
cls.add_method('GetOrigin',
'ns3::Ipv4Address',
[],
is_const=True)
- ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetOutputInterface(uint32_t n) const [member function]
+ ## ipv4-routing-table-entry.h: uint32_t ns3::Ipv4MulticastRoutingTableEntry::GetOutputInterface(uint32_t n) const [member function]
cls.add_method('GetOutputInterface',
'uint32_t',
[param('uint32_t', 'n')],
is_const=True)
- ## ipv4-route.h: std::vector > ns3::Ipv4MulticastRoute::GetOutputInterfaces() const [member function]
+ ## ipv4-routing-table-entry.h: std::vector > ns3::Ipv4MulticastRoutingTableEntry::GetOutputInterfaces() const [member function]
cls.add_method('GetOutputInterfaces',
'std::vector< unsigned int >',
[],
is_const=True)
return
-def register_Ns3Ipv4Route_methods(root_module, cls):
+def register_Ns3Ipv4RoutingTableEntry_methods(root_module, cls):
cls.add_output_stream_operator()
- ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route() [constructor]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry() [constructor]
cls.add_constructor([])
- ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route(ns3::Ipv4Route const & route) [copy constructor]
- cls.add_constructor([param('ns3::Ipv4Route const &', 'route')])
- ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route(ns3::Ipv4Route const * route) [constructor]
- cls.add_constructor([param('ns3::Ipv4Route const *', 'route')])
- ## ipv4-route.h: static ns3::Ipv4Route ns3::Ipv4Route::CreateDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry(ns3::Ipv4RoutingTableEntry const & route) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4RoutingTableEntry const &', 'route')])
+ ## ipv4-routing-table-entry.h: ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry(ns3::Ipv4RoutingTableEntry const * route) [constructor]
+ cls.add_constructor([param('ns3::Ipv4RoutingTableEntry const *', 'route')])
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4RoutingTableEntry ns3::Ipv4RoutingTableEntry::CreateDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function]
cls.add_method('CreateDefaultRoute',
- 'ns3::Ipv4Route',
+ 'ns3::Ipv4RoutingTableEntry',
[param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
is_static=True)
- ## ipv4-route.h: static ns3::Ipv4Route ns3::Ipv4Route::CreateHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4RoutingTableEntry ns3::Ipv4RoutingTableEntry::CreateHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
cls.add_method('CreateHostRouteTo',
- 'ns3::Ipv4Route',
+ 'ns3::Ipv4RoutingTableEntry',
[param('ns3::Ipv4Address', 'dest'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
is_static=True)
- ## ipv4-route.h: static ns3::Ipv4Route ns3::Ipv4Route::CreateHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4RoutingTableEntry ns3::Ipv4RoutingTableEntry::CreateHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
cls.add_method('CreateHostRouteTo',
- 'ns3::Ipv4Route',
+ 'ns3::Ipv4RoutingTableEntry',
[param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')],
is_static=True)
- ## ipv4-route.h: static ns3::Ipv4Route ns3::Ipv4Route::CreateNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4RoutingTableEntry ns3::Ipv4RoutingTableEntry::CreateNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
cls.add_method('CreateNetworkRouteTo',
- 'ns3::Ipv4Route',
+ 'ns3::Ipv4RoutingTableEntry',
[param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
is_static=True)
- ## ipv4-route.h: static ns3::Ipv4Route ns3::Ipv4Route::CreateNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
+ ## ipv4-routing-table-entry.h: static ns3::Ipv4RoutingTableEntry ns3::Ipv4RoutingTableEntry::CreateNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
cls.add_method('CreateNetworkRouteTo',
- 'ns3::Ipv4Route',
+ 'ns3::Ipv4RoutingTableEntry',
[param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')],
is_static=True)
- ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetDest() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Address ns3::Ipv4RoutingTableEntry::GetDest() const [member function]
cls.add_method('GetDest',
'ns3::Ipv4Address',
[],
is_const=True)
- ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetDestNetwork() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Address ns3::Ipv4RoutingTableEntry::GetDestNetwork() const [member function]
cls.add_method('GetDestNetwork',
'ns3::Ipv4Address',
[],
is_const=True)
- ## ipv4-route.h: ns3::Ipv4Mask ns3::Ipv4Route::GetDestNetworkMask() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Mask ns3::Ipv4RoutingTableEntry::GetDestNetworkMask() const [member function]
cls.add_method('GetDestNetworkMask',
'ns3::Ipv4Mask',
[],
is_const=True)
- ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetGateway() const [member function]
+ ## ipv4-routing-table-entry.h: ns3::Ipv4Address ns3::Ipv4RoutingTableEntry::GetGateway() const [member function]
cls.add_method('GetGateway',
'ns3::Ipv4Address',
[],
is_const=True)
- ## ipv4-route.h: uint32_t ns3::Ipv4Route::GetInterface() const [member function]
+ ## ipv4-routing-table-entry.h: uint32_t ns3::Ipv4RoutingTableEntry::GetInterface() const [member function]
cls.add_method('GetInterface',
'uint32_t',
[],
is_const=True)
- ## ipv4-route.h: bool ns3::Ipv4Route::IsDefault() const [member function]
+ ## ipv4-routing-table-entry.h: bool ns3::Ipv4RoutingTableEntry::IsDefault() const [member function]
cls.add_method('IsDefault',
'bool',
[],
is_const=True)
- ## ipv4-route.h: bool ns3::Ipv4Route::IsGateway() const [member function]
+ ## ipv4-routing-table-entry.h: bool ns3::Ipv4RoutingTableEntry::IsGateway() const [member function]
cls.add_method('IsGateway',
'bool',
[],
is_const=True)
- ## ipv4-route.h: bool ns3::Ipv4Route::IsHost() const [member function]
+ ## ipv4-routing-table-entry.h: bool ns3::Ipv4RoutingTableEntry::IsHost() const [member function]
cls.add_method('IsHost',
'bool',
[],
is_const=True)
- ## ipv4-route.h: bool ns3::Ipv4Route::IsNetwork() const [member function]
+ ## ipv4-routing-table-entry.h: bool ns3::Ipv4RoutingTableEntry::IsNetwork() const [member function]
cls.add_method('IsNetwork',
'bool',
[],
@@ -1403,6 +1425,97 @@ def register_Ns3Ipv4MaskValue_methods(root_module, cls):
is_virtual=True)
return
+def register_Ns3Ipv4MulticastRoute_methods(root_module, cls):
+ ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_INTERFACES [variable]
+ cls.add_static_attribute('MAX_INTERFACES', 'uint32_t const', is_const=True)
+ ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_TTL [variable]
+ cls.add_static_attribute('MAX_TTL', 'uint32_t const', is_const=True)
+ ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute(ns3::Ipv4MulticastRoute const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4MulticastRoute const &', 'arg0')])
+ ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute() [constructor]
+ cls.add_constructor([])
+ ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetGroup(ns3::Ipv4Address const group) [member function]
+ cls.add_method('SetGroup',
+ 'void',
+ [param('ns3::Ipv4Address const', 'group')])
+ ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetGroup() const [member function]
+ cls.add_method('GetGroup',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOrigin(ns3::Ipv4Address const group) [member function]
+ cls.add_method('SetOrigin',
+ 'void',
+ [param('ns3::Ipv4Address const', 'group')])
+ ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetOrigin() const [member function]
+ cls.add_method('GetOrigin',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetParent(uint32_t iif) [member function]
+ cls.add_method('SetParent',
+ 'void',
+ [param('uint32_t', 'iif')])
+ ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetParent() const [member function]
+ cls.add_method('GetParent',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOutputTtl(uint32_t oif, uint32_t ttl) [member function]
+ cls.add_method('SetOutputTtl',
+ 'void',
+ [param('uint32_t', 'oif'), param('uint32_t', 'ttl')])
+ ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetOutputTtl(uint32_t oif) const [member function]
+ cls.add_method('GetOutputTtl',
+ 'uint32_t',
+ [param('uint32_t', 'oif')],
+ is_const=True)
+ return
+
+def register_Ns3Ipv4Route_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route(ns3::Ipv4Route const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4Route const &', 'arg0')])
+ ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route() [constructor]
+ cls.add_constructor([])
+ ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetDestination() const [member function]
+ cls.add_method('GetDestination',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetGateway() const [member function]
+ cls.add_method('GetGateway',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## ipv4-route.h: ns3::Ptr ns3::Ipv4Route::GetOutputDevice() const [member function]
+ cls.add_method('GetOutputDevice',
+ 'ns3::Ptr< ns3::NetDevice >',
+ [],
+ is_const=True)
+ ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4Route::GetSource() const [member function]
+ cls.add_method('GetSource',
+ 'ns3::Ipv4Address',
+ [],
+ is_const=True)
+ ## ipv4-route.h: void ns3::Ipv4Route::SetDestination(ns3::Ipv4Address dest) [member function]
+ cls.add_method('SetDestination',
+ 'void',
+ [param('ns3::Ipv4Address', 'dest')])
+ ## ipv4-route.h: void ns3::Ipv4Route::SetGateway(ns3::Ipv4Address gw) [member function]
+ cls.add_method('SetGateway',
+ 'void',
+ [param('ns3::Ipv4Address', 'gw')])
+ ## ipv4-route.h: void ns3::Ipv4Route::SetOutputDevice(ns3::Ptr outputDevice) [member function]
+ cls.add_method('SetOutputDevice',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice >', 'outputDevice')])
+ ## ipv4-route.h: void ns3::Ipv4Route::SetSource(ns3::Ipv4Address src) [member function]
+ cls.add_method('SetSource',
+ 'void',
+ [param('ns3::Ipv4Address', 'src')])
+ return
+
def register_Ns3Ipv6AddressChecker_methods(root_module, cls):
## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')])
@@ -2219,6 +2332,16 @@ def register_Ns3UdpSocket_methods(root_module, cls):
is_static=True)
## udp-socket.h: ns3::UdpSocket::UdpSocket() [constructor]
cls.add_constructor([])
+ ## udp-socket.h: int ns3::UdpSocket::MulticastJoinGroup(uint32_t interface, ns3::Address const & groupAddress) [member function]
+ cls.add_method('MulticastJoinGroup',
+ 'int',
+ [param('uint32_t', 'interface'), param('ns3::Address const &', 'groupAddress')],
+ is_pure_virtual=True, is_virtual=True)
+ ## udp-socket.h: int ns3::UdpSocket::MulticastLeaveGroup(uint32_t interface, ns3::Address const & groupAddress) [member function]
+ cls.add_method('MulticastLeaveGroup',
+ 'int',
+ [param('uint32_t', 'interface'), param('ns3::Address const &', 'groupAddress')],
+ is_pure_virtual=True, is_virtual=True)
## udp-socket.h: void ns3::UdpSocket::SetRcvBufSize(uint32_t size) [member function]
cls.add_method('SetRcvBufSize',
'void',
@@ -2229,24 +2352,44 @@ def register_Ns3UdpSocket_methods(root_module, cls):
'uint32_t',
[],
is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
- ## udp-socket.h: void ns3::UdpSocket::SetIpTtl(uint32_t ipTtl) [member function]
+ ## udp-socket.h: void ns3::UdpSocket::SetIpTtl(uint8_t ipTtl) [member function]
cls.add_method('SetIpTtl',
'void',
- [param('uint32_t', 'ipTtl')],
+ [param('uint8_t', 'ipTtl')],
is_pure_virtual=True, visibility='private', is_virtual=True)
- ## udp-socket.h: uint32_t ns3::UdpSocket::GetIpTtl() const [member function]
+ ## udp-socket.h: uint8_t ns3::UdpSocket::GetIpTtl() const [member function]
cls.add_method('GetIpTtl',
- 'uint32_t',
+ 'uint8_t',
[],
is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
- ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastTtl(uint32_t ipTtl) [member function]
+ ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastTtl(uint8_t ipTtl) [member function]
cls.add_method('SetIpMulticastTtl',
'void',
- [param('uint32_t', 'ipTtl')],
+ [param('uint8_t', 'ipTtl')],
is_pure_virtual=True, visibility='private', is_virtual=True)
- ## udp-socket.h: uint32_t ns3::UdpSocket::GetIpMulticastTtl() const [member function]
+ ## udp-socket.h: uint8_t ns3::UdpSocket::GetIpMulticastTtl() const [member function]
cls.add_method('GetIpMulticastTtl',
- 'uint32_t',
+ 'uint8_t',
+ [],
+ is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
+ ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastIf(int32_t ipIf) [member function]
+ cls.add_method('SetIpMulticastIf',
+ 'void',
+ [param('int32_t', 'ipIf')],
+ is_pure_virtual=True, visibility='private', is_virtual=True)
+ ## udp-socket.h: int32_t ns3::UdpSocket::GetIpMulticastIf() const [member function]
+ cls.add_method('GetIpMulticastIf',
+ 'int32_t',
+ [],
+ is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
+ ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastLoop(bool loop) [member function]
+ cls.add_method('SetIpMulticastLoop',
+ 'void',
+ [param('bool', 'loop')],
+ is_pure_virtual=True, visibility='private', is_virtual=True)
+ ## udp-socket.h: bool ns3::UdpSocket::GetIpMulticastLoop() const [member function]
+ cls.add_method('GetIpMulticastLoop',
+ 'bool',
[],
is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
## udp-socket.h: void ns3::UdpSocket::SetMtuDiscover(bool discover) [member function]
@@ -2572,6 +2715,8 @@ def register_Ns3EthernetTrailer_methods(root_module, cls):
return
def register_Ns3Ipv4_methods(root_module, cls):
+ ## ipv4.h: ns3::Ipv4::IF_ANY [variable]
+ cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True)
## ipv4.h: ns3::Ipv4::Ipv4(ns3::Ipv4 const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Ipv4 const &', 'arg0')])
## ipv4.h: static ns3::TypeId ns3::Ipv4::GetTypeId() [member function]
@@ -2581,81 +2726,16 @@ def register_Ns3Ipv4_methods(root_module, cls):
is_static=True)
## ipv4.h: ns3::Ipv4::Ipv4() [constructor]
cls.add_constructor([])
- ## ipv4.h: void ns3::Ipv4::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function]
- cls.add_method('AddRoutingProtocol',
+ ## ipv4.h: void ns3::Ipv4::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function]
+ cls.add_method('SetRoutingProtocol',
'void',
- [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')],
+ [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')],
is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
- cls.add_method('AddHostRouteTo',
- 'void',
- [param('ns3::Ipv4Address', 'dest'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::AddHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
- cls.add_method('AddHostRouteTo',
- 'void',
- [param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
- cls.add_method('AddNetworkRouteTo',
- 'void',
- [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
- cls.add_method('AddNetworkRouteTo',
- 'void',
- [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::SetDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function]
- cls.add_method('SetDefaultRoute',
- 'void',
- [param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: uint32_t ns3::Ipv4::GetNRoutes() [member function]
- cls.add_method('GetNRoutes',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: ns3::Ipv4Route ns3::Ipv4::GetRoute(uint32_t i) [member function]
- cls.add_method('GetRoute',
- 'ns3::Ipv4Route',
- [param('uint32_t', 'i')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::RemoveRoute(uint32_t i) [member function]
- cls.add_method('RemoveRoute',
- 'void',
- [param('uint32_t', 'i')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::AddMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function]
- cls.add_method('AddMulticastRoute',
- 'void',
- [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::RemoveMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface) [member function]
- cls.add_method('RemoveMulticastRoute',
- 'void',
- [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::SetDefaultMulticastRoute(uint32_t outputInterface) [member function]
- cls.add_method('SetDefaultMulticastRoute',
- 'void',
- [param('uint32_t', 'outputInterface')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: uint32_t ns3::Ipv4::GetNMulticastRoutes() const [member function]
- cls.add_method('GetNMulticastRoutes',
- 'uint32_t',
+ ## ipv4.h: ns3::Ptr ns3::Ipv4::GetRoutingProtocol() const [member function]
+ cls.add_method('GetRoutingProtocol',
+ 'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: ns3::Ipv4MulticastRoute ns3::Ipv4::GetMulticastRoute(uint32_t i) const [member function]
- cls.add_method('GetMulticastRoute',
- 'ns3::Ipv4MulticastRoute',
- [param('uint32_t', 'i')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::RemoveMulticastRoute(uint32_t i) [member function]
- cls.add_method('RemoveMulticastRoute',
- 'void',
- [param('uint32_t', 'i')],
- is_pure_virtual=True, is_virtual=True)
## ipv4.h: uint32_t ns3::Ipv4::AddInterface(ns3::Ptr device) [member function]
cls.add_method('AddInterface',
'uint32_t',
@@ -2666,36 +2746,26 @@ def register_Ns3Ipv4_methods(root_module, cls):
'uint32_t',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: uint32_t ns3::Ipv4::FindInterfaceForAddr(ns3::Ipv4Address addr) const [member function]
- cls.add_method('FindInterfaceForAddr',
- 'uint32_t',
- [param('ns3::Ipv4Address', 'addr')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: uint32_t ns3::Ipv4::FindInterfaceForAddr(ns3::Ipv4Address addr, ns3::Ipv4Mask mask) const [member function]
- cls.add_method('FindInterfaceForAddr',
- 'uint32_t',
- [param('ns3::Ipv4Address', 'addr'), param('ns3::Ipv4Mask', 'mask')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: int32_t ns3::Ipv4::FindInterfaceForDevice(ns3::Ptr nd) const [member function]
- cls.add_method('FindInterfaceForDevice',
+ ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForAddress(ns3::Ipv4Address address) const [member function]
+ cls.add_method('GetInterfaceForAddress',
'int32_t',
- [param('ns3::Ptr< ns3::NetDevice >', 'nd')],
+ [param('ns3::Ipv4Address', 'address')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: ns3::Ptr ns3::Ipv4::GetNetDevice(uint32_t i) [member function]
+ ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForPrefix(ns3::Ipv4Address address, ns3::Ipv4Mask mask) const [member function]
+ cls.add_method('GetInterfaceForPrefix',
+ 'int32_t',
+ [param('ns3::Ipv4Address', 'address'), param('ns3::Ipv4Mask', 'mask')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## ipv4.h: ns3::Ptr ns3::Ipv4::GetNetDevice(uint32_t interface) [member function]
cls.add_method('GetNetDevice',
'ns3::Ptr< ns3::NetDevice >',
- [param('uint32_t', 'i')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::JoinMulticastGroup(ns3::Ipv4Address origin, ns3::Ipv4Address group) [member function]
- cls.add_method('JoinMulticastGroup',
- 'void',
- [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group')],
- is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::LeaveMulticastGroup(ns3::Ipv4Address origin, ns3::Ipv4Address group) [member function]
- cls.add_method('LeaveMulticastGroup',
- 'void',
- [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
+ ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForDevice(ns3::Ptr device) const [member function]
+ cls.add_method('GetInterfaceForDevice',
+ 'int32_t',
+ [param('ns3::Ptr< ns3::NetDevice const >', 'device')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
## ipv4.h: uint32_t ns3::Ipv4::AddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
cls.add_method('AddAddress',
'uint32_t',
@@ -2711,51 +2781,46 @@ def register_Ns3Ipv4_methods(root_module, cls):
'ns3::Ipv4InterfaceAddress',
[param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::SetMetric(uint32_t i, uint16_t metric) [member function]
+ ## ipv4.h: void ns3::Ipv4::SetMetric(uint32_t interface, uint16_t metric) [member function]
cls.add_method('SetMetric',
'void',
- [param('uint32_t', 'i'), param('uint16_t', 'metric')],
+ [param('uint32_t', 'interface'), param('uint16_t', 'metric')],
is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: uint16_t ns3::Ipv4::GetMetric(uint32_t i) const [member function]
+ ## ipv4.h: uint16_t ns3::Ipv4::GetMetric(uint32_t interface) const [member function]
cls.add_method('GetMetric',
'uint16_t',
- [param('uint32_t', 'i')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: ns3::Ipv4Address ns3::Ipv4::GetSourceAddress(ns3::Ipv4Address destination) const [member function]
- cls.add_method('GetSourceAddress',
- 'ns3::Ipv4Address',
- [param('ns3::Ipv4Address', 'destination')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: bool ns3::Ipv4::GetInterfaceForDestination(ns3::Ipv4Address dest, uint32_t & interface) const [member function]
- cls.add_method('GetInterfaceForDestination',
- 'bool',
- [param('ns3::Ipv4Address', 'dest'), param('uint32_t &', 'interface')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: uint16_t ns3::Ipv4::GetMtu(uint32_t i) const [member function]
+ ## ipv4.h: uint16_t ns3::Ipv4::GetMtu(uint32_t interface) const [member function]
cls.add_method('GetMtu',
'uint16_t',
- [param('uint32_t', 'i')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: bool ns3::Ipv4::IsUp(uint32_t i) const [member function]
+ ## ipv4.h: bool ns3::Ipv4::IsUp(uint32_t interface) const [member function]
cls.add_method('IsUp',
'bool',
- [param('uint32_t', 'i')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::SetUp(uint32_t i) [member function]
+ ## ipv4.h: void ns3::Ipv4::SetUp(uint32_t interface) [member function]
cls.add_method('SetUp',
'void',
- [param('uint32_t', 'i')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: void ns3::Ipv4::SetDown(uint32_t i) [member function]
+ ## ipv4.h: void ns3::Ipv4::SetDown(uint32_t interface) [member function]
cls.add_method('SetDown',
'void',
- [param('uint32_t', 'i')],
+ [param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: uint32_t ns3::Ipv4::GetInterfaceByAddress(ns3::Ipv4Address addr, ns3::Ipv4Mask mask=ns3::Ipv4Mask(((const char*)"255.255.255.255"))) [member function]
- cls.add_method('GetInterfaceByAddress',
- 'uint32_t',
- [param('ns3::Ipv4Address', 'addr'), param('ns3::Ipv4Mask', 'mask', default_value='ns3::Ipv4Mask(((const char*)"255.255.255.255"))')],
- is_virtual=True)
+ ## ipv4.h: void ns3::Ipv4::SetIpForward(bool forward) [member function]
+ cls.add_method('SetIpForward',
+ 'void',
+ [param('bool', 'forward')],
+ is_pure_virtual=True, visibility='private', is_virtual=True)
+ ## ipv4.h: bool ns3::Ipv4::GetIpForward() const [member function]
+ cls.add_method('GetIpForward',
+ 'bool',
+ [],
+ is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
return
def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls):
@@ -2771,24 +2836,124 @@ def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls):
return
def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls):
- ## ipv4.h: ns3::Ipv4RoutingProtocol::INTERFACE_ANY [variable]
- cls.add_static_attribute('INTERFACE_ANY', 'uint32_t const', is_const=True)
- ## ipv4.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol(ns3::Ipv4RoutingProtocol const & arg0) [copy constructor]
+ ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol(ns3::Ipv4RoutingProtocol const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Ipv4RoutingProtocol const &', 'arg0')])
- ## ipv4.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol() [constructor]
+ ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol() [constructor]
cls.add_constructor([])
- ## ipv4.h: bool ns3::Ipv4RoutingProtocol::RequestRoute(uint32_t interface, ns3::Ipv4Header const & ipHeader, ns3::Ptr packet, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> routeReply) [member function]
- cls.add_method('RequestRoute',
- 'bool',
- [param('uint32_t', 'interface'), param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Callback< void, bool, ns3::Ipv4Route const &, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ ## ipv4-routing-protocol.h: static ns3::TypeId ns3::Ipv4RoutingProtocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-routing-protocol.h: ns3::Ptr ns3::Ipv4RoutingProtocol::RouteOutput(ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
is_pure_virtual=True, is_virtual=True)
- ## ipv4.h: bool ns3::Ipv4RoutingProtocol::RequestInterface(ns3::Ipv4Address destination, uint32_t & interface) [member function]
- cls.add_method('RequestInterface',
+ ## ipv4-routing-protocol.h: bool ns3::Ipv4RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ cls.add_method('RouteInput',
'bool',
- [param('ns3::Ipv4Address', 'destination'), param('uint32_t &', 'interface')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_pure_virtual=True, is_virtual=True)
return
+def register_Ns3Ipv4StaticRouting_methods(root_module, cls):
+ ## ipv4-static-routing.h: ns3::Ipv4StaticRouting::Ipv4StaticRouting(ns3::Ipv4StaticRouting const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4StaticRouting const &', 'arg0')])
+ ## ipv4-static-routing.h: ns3::Ipv4StaticRouting::Ipv4StaticRouting() [constructor]
+ cls.add_constructor([])
+ ## ipv4-static-routing.h: static ns3::TypeId ns3::Ipv4StaticRouting::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('AddHostRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'dest'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddHostRouteTo(ns3::Ipv4Address dest, uint32_t interface) [member function]
+ cls.add_method('AddHostRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('AddNetworkRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, uint32_t interface) [member function]
+ cls.add_method('AddNetworkRouteTo',
+ 'void',
+ [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function]
+ cls.add_method('SetDefaultRoute',
+ 'void',
+ [param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNRoutes() [member function]
+ cls.add_method('GetNRoutes',
+ 'uint32_t',
+ [],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRouting::GetDefaultRoute() [member function]
+ cls.add_method('GetDefaultRoute',
+ 'ns3::Ipv4RoutingTableEntry',
+ [],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRouting::GetRoute(uint32_t i) [member function]
+ cls.add_method('GetRoute',
+ 'ns3::Ipv4RoutingTableEntry',
+ [param('uint32_t', 'i')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::RemoveRoute(uint32_t i) [member function]
+ cls.add_method('RemoveRoute',
+ 'void',
+ [param('uint32_t', 'i')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function]
+ cls.add_method('AddMulticastRoute',
+ 'void',
+ [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultMulticastRoute(uint32_t outputInterface) [member function]
+ cls.add_method('SetDefaultMulticastRoute',
+ 'void',
+ [param('uint32_t', 'outputInterface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNMulticastRoutes() const [member function]
+ cls.add_method('GetNMulticastRoutes',
+ 'uint32_t',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## ipv4-static-routing.h: ns3::Ipv4MulticastRoutingTableEntry ns3::Ipv4StaticRouting::GetMulticastRoute(uint32_t i) const [member function]
+ cls.add_method('GetMulticastRoute',
+ 'ns3::Ipv4MulticastRoutingTableEntry',
+ [param('uint32_t', 'i')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## ipv4-static-routing.h: bool ns3::Ipv4StaticRouting::RemoveMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface) [member function]
+ cls.add_method('RemoveMulticastRoute',
+ 'bool',
+ [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::RemoveMulticastRoute(uint32_t index) [member function]
+ cls.add_method('RemoveMulticastRoute',
+ 'void',
+ [param('uint32_t', 'index')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetNode(ns3::Ptr node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-static-routing.h: ns3::Ptr ns3::Ipv4StaticRouting::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ return
+
def register_Ns3NetDevice_methods(root_module, cls):
## net-device.h: ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor]
cls.add_constructor([param('ns3::NetDevice const &', 'arg0')])
@@ -3177,6 +3342,33 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
visibility='protected', is_virtual=True)
return
+def register_Ns3Ipv4ListRouting_methods(root_module, cls):
+ ## ipv4-list-routing.h: ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')])
+ ## ipv4-list-routing.h: ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor]
+ cls.add_constructor([])
+ ## ipv4-list-routing.h: static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function]
+ cls.add_method('AddRoutingProtocol',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv4-list-routing.h: uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols() const [member function]
+ cls.add_method('GetNRoutingProtocols',
+ 'uint32_t',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## ipv4-list-routing.h: ns3::Ptr ns3::Ipv4ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function]
+ cls.add_method('GetRoutingProtocol',
+ 'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
+ [param('uint32_t', 'index'), param('int16_t &', 'priority')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ return
+
def register_functions(root_module):
module = root_module
## address.h: extern ns3::Ptr ns3::MakeAddressChecker() [free function]
@@ -3237,6 +3429,7 @@ def register_functions(root_module):
[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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -3247,6 +3440,13 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ ## address-utils.h: extern bool ns3::addressUtils::IsMulticast(ns3::Address const & ad) [free function]
+ module.add_function('IsMulticast',
+ 'bool',
+ [param('ns3::Address const &', 'ad')])
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_olsr.py b/bindings/python/ns3_module_olsr.py
index a4f946822..e4dd16efa 100644
--- a/bindings/python/ns3_module_olsr.py
+++ b/bindings/python/ns3_module_olsr.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -24,6 +24,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -44,6 +50,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -91,6 +101,15 @@ def register_types_ns3_olsr(module):
module.add_class('TwoHopNeighborTuple')
module.add_container('std::vector< ns3::olsr::MessageHeader::Hello::LinkMessage >', 'ns3::olsr::MessageHeader::Hello::LinkMessage', container_type='vector')
module.add_container('std::vector< ns3::olsr::MessageHeader::Hna::Association >', 'ns3::olsr::MessageHeader::Hna::Association', container_type='vector')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::DuplicateTuple, std::allocator< ns3::olsr::DuplicateTuple > >', 'ns3::olsr::DuplicateSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >', 'ns3::olsr::TopologySet')
+ typehandlers.add_type_alias('std::set< ns3::Ipv4Address, std::less< ns3::Ipv4Address >, std::allocator< ns3::Ipv4Address > >', 'ns3::olsr::MprSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::MprSelectorTuple, std::allocator< ns3::olsr::MprSelectorTuple > >', 'ns3::olsr::MprSelectorSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::MessageHeader, std::allocator< ns3::olsr::MessageHeader > >', 'ns3::olsr::MessageList')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::IfaceAssocTuple, std::allocator< ns3::olsr::IfaceAssocTuple > >', 'ns3::olsr::IfaceAssocSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >', 'ns3::olsr::NeighborSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::TwoHopNeighborTuple, std::allocator< ns3::olsr::TwoHopNeighborTuple > >', 'ns3::olsr::TwoHopNeighborSet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::LinkTuple, std::allocator< ns3::olsr::LinkTuple > >', 'ns3::olsr::LinkSet')
def register_methods(root_module):
register_Ns3OlsrState_methods(root_module, root_module['ns3::OlsrState'])
@@ -740,15 +759,15 @@ def register_Ns3OlsrRoutingProtocol_methods(root_module, cls):
cls.add_method('SetMainInterface',
'void',
[param('uint32_t', 'interface')])
- ## olsr-routing-protocol.h: bool ns3::olsr::RoutingProtocol::RequestRoute(uint32_t ifIndex, ns3::Ipv4Header const & ipHeader, ns3::Ptr packet, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> routeReply) [member function]
- cls.add_method('RequestRoute',
- 'bool',
- [param('uint32_t', 'ifIndex'), param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Callback< void, bool, ns3::Ipv4Route const &, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ ## olsr-routing-protocol.h: ns3::Ptr ns3::olsr::RoutingProtocol::RouteOutput(ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
visibility='private', is_virtual=True)
- ## olsr-routing-protocol.h: bool ns3::olsr::RoutingProtocol::RequestInterface(ns3::Ipv4Address destination, uint32_t & ifIndex) [member function]
- cls.add_method('RequestInterface',
+ ## olsr-routing-protocol.h: bool ns3::olsr::RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ cls.add_method('RouteInput',
'bool',
- [param('ns3::Ipv4Address', 'destination'), param('uint32_t &', 'ifIndex')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
visibility='private', is_virtual=True)
## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::DoDispose() [member function]
cls.add_method('DoDispose',
@@ -808,6 +827,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -818,6 +838,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_onoff.py b/bindings/python/ns3_module_onoff.py
index 2d253ec6d..2701eb149 100644
--- a/bindings/python/ns3_module_onoff.py
+++ b/bindings/python/ns3_module_onoff.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -18,6 +18,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -38,6 +44,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -85,6 +95,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -95,6 +106,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_packet_sink.py b/bindings/python/ns3_module_packet_sink.py
index 8478d79c4..0f2935c9b 100644
--- a/bindings/python/ns3_module_packet_sink.py
+++ b/bindings/python/ns3_module_packet_sink.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -18,6 +18,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -38,6 +44,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -81,6 +91,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -91,6 +102,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_point_to_point.py b/bindings/python/ns3_module_point_to_point.py
index 2360f1f62..5b72f28d0 100644
--- a/bindings/python/ns3_module_point_to_point.py
+++ b/bindings/python/ns3_module_point_to_point.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -22,6 +22,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -42,6 +48,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -301,6 +311,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -311,6 +322,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_simulator.py b/bindings/python/ns3_module_simulator.py
index b2271d232..d292314e3 100644
--- a/bindings/python/ns3_module_simulator.py
+++ b/bindings/python/ns3_module_simulator.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -61,6 +61,10 @@ def register_types(module):
module.add_class('RealtimeSimulatorImpl', parent=root_module['ns3::SimulatorImpl'])
## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration]
module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl'])
+ typehandlers.add_type_alias('ns3::TimeUnit< 2 >', 'ns3::TimeSquare')
+ typehandlers.add_type_alias('ns3::TimeUnit< - 1 >', 'ns3::TimeInvert')
+ typehandlers.add_type_alias('ns3::TimeUnit< 0 >', 'ns3::Scalar')
+ typehandlers.add_type_alias('ns3::TimeUnit< 1 >', 'ns3::Time')
## Register a nested module for the namespace Config
@@ -74,6 +78,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -96,6 +106,10 @@ def register_types_ns3_TimeStepPrecision(module):
## nstime.h: ns3::TimeStepPrecision::precision_t [enumeration]
module.add_enum('precision_t', ['S', 'MS', 'US', 'NS', 'PS', 'FS'])
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1530,6 +1544,7 @@ def register_functions(root_module):
[param('uint64_t', 'ts')])
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1548,6 +1563,9 @@ def register_functions_ns3_TimeStepPrecision(module, root_module):
[param('ns3::TimeStepPrecision::precision_t', 'precision')])
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_stats.py b/bindings/python/ns3_module_stats.py
index 59532ca76..1b455aa87 100644
--- a/bindings/python/ns3_module_stats.py
+++ b/bindings/python/ns3_module_stats.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -25,6 +25,8 @@ def register_types(module):
module.add_class('CounterCalculator', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator'])
## packet-data-calculators.h: ns3::PacketCounterCalculator [class]
module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList')
+ typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >', 'ns3::MetadataList')
## Register a nested module for the namespace Config
@@ -38,6 +40,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -58,6 +66,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -419,6 +431,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -429,6 +442,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_tap_bridge.py b/bindings/python/ns3_module_tap_bridge.py
index ba5310e25..b78e4ef6b 100644
--- a/bindings/python/ns3_module_tap_bridge.py
+++ b/bindings/python/ns3_module_tap_bridge.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -20,6 +20,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -40,6 +46,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -217,6 +227,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -227,6 +238,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_udp_echo.py b/bindings/python/ns3_module_udp_echo.py
index dae92a56e..52f36dac6 100644
--- a/bindings/python/ns3_module_udp_echo.py
+++ b/bindings/python/ns3_module_udp_echo.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -20,6 +20,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -40,6 +46,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -115,6 +125,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -125,6 +136,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_v4ping.py b/bindings/python/ns3_module_v4ping.py
index ec2bc2357..3305759f2 100644
--- a/bindings/python/ns3_module_v4ping.py
+++ b/bindings/python/ns3_module_v4ping.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -18,6 +18,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -38,6 +44,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -81,6 +91,7 @@ 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_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -91,6 +102,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py
index e13cc31ea..b7e0a8988 100644
--- a/bindings/python/ns3_module_wifi.py
+++ b/bindings/python/ns3_module_wifi.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
@@ -135,6 +135,7 @@ def register_types(module):
module.add_class('YansWifiChannel', parent=root_module['ns3::WifiChannel'])
## aarf-wifi-manager.h: ns3::AarfWifiManager [class]
module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager'])
+ typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >', 'ns3::Thresholds')
## Register a nested module for the namespace Config
@@ -148,6 +149,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -168,6 +175,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -4181,6 +4192,7 @@ def register_functions(root_module):
[param('uint8_t', 'tid')])
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -4191,6 +4203,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/ns3modulegen_generated.py b/bindings/python/ns3modulegen_generated.py
index 694befa0b..323510a4d 100644
--- a/bindings/python/ns3modulegen_generated.py
+++ b/bindings/python/ns3modulegen_generated.py
@@ -1,4 +1,4 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
@@ -288,6 +288,12 @@ def register_types(module):
register_types_ns3_TimeStepPrecision(nested_module)
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -309,6 +315,10 @@ def register_types_ns3_TimeStepPrecision(module):
root_module = module.get_root()
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -786,6 +796,7 @@ def register_functions(root_module):
root_module.end_section('ns3_module_helper')
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -796,6 +807,9 @@ def register_functions_ns3_Config(module, root_module):
def register_functions_ns3_TimeStepPrecision(module, root_module):
return
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
diff --git a/bindings/python/wscript b/bindings/python/wscript
index e0bd95b09..bb5c0a50e 100644
--- a/bindings/python/wscript
+++ b/bindings/python/wscript
@@ -15,7 +15,7 @@ import Build
import Utils
## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 10, 0, 630)
+REQUIRED_PYBINDGEN_VERSION = (0, 10, 0, 640)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
diff --git a/doc/manual/attributes.texi b/doc/manual/attributes.texi
index e24e9caa7..db7dcb61b 100644
--- a/doc/manual/attributes.texi
+++ b/doc/manual/attributes.texi
@@ -207,6 +207,8 @@ and some type of global default value.
In the ns-3 attribute system, these value definitions and accessor
functions are moved into the TypeId class; e.g.:
@verbatim
+NS_OBJECT_ENSURE_REGISTERED (DropTailQueue);
+
TypeId DropTailQueue::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::DropTailQueue")
@@ -239,6 +241,11 @@ strings such as "MaxPackets" and TypeId strings. In the next
section, we will provide an example script that shows how users
may manipulate these values.
+Note that initialization of the attribute relies on the macro
+NS_OBJECT_ENSURE_REGISTERED (DropTailQueue) being called; if you leave
+this out of your new class implementation, your attributes will not be
+initialized corretly.
+
@subsection Basic usage
Let's look at how a user script might access these values.
diff --git a/examples/csma-multicast.cc b/examples/csma-multicast.cc
index 6fd061cae..6d502e8d5 100644
--- a/examples/csma-multicast.cc
+++ b/examples/csma-multicast.cc
@@ -105,7 +105,7 @@ main (int argc, char *argv[])
// 2) Set up a default multicast route on the sender n0
// 3) Have node n4 join the multicast group
// We have a helper that can help us with static multicast
- StaticMulticastRouteHelper multicast;
+ Ipv4StaticRoutingHelper multicast;
// 1) Configure a (static) multicast route on node n2 (multicastRouter)
Ptr multicastRouter = c.Get (2); // The node in question
@@ -121,10 +121,6 @@ main (int argc, char *argv[])
Ptr senderIf = nd0.Get(0);
multicast.SetDefaultMulticastRoute (sender, senderIf);
- // 3) Have node n4 join the multicast group
- Ptr receiver = c.Get (4);
- multicast.JoinMulticastGroup (receiver, multicastSource, multicastGroup);
-
//
// Create an OnOff application to send UDP datagrams from node zero to the
// multicast group (node four will be listening).
diff --git a/examples/emu-ping.cc b/examples/emu-ping.cc
index 6ced3457a..45151324e 100644
--- a/examples/emu-ping.cc
+++ b/examples/emu-ping.cc
@@ -55,7 +55,6 @@
#include "ns3/core-module.h"
#include "ns3/simulator-module.h"
#include "ns3/node-module.h"
-#include "ns3/internet-stack-module.h"
#include "ns3/emu-module.h"
#include "ns3/v4ping-module.h"
#include "ns3/helper-module.h"
@@ -149,7 +148,8 @@ main (int argc, char *argv[])
// of ARP, IPv4, ICMP, UDP and TCP.
//
NS_LOG_INFO ("Add Internet Stack");
- AddInternetStack (node);
+ InternetStackHelper internetStackHelper;
+ internetStackHelper.Install (node);
NS_LOG_INFO ("Create IPv4 Interface");
Ptr ipv4 = node->GetObject ();
@@ -175,7 +175,9 @@ main (int argc, char *argv[])
Ipv4Address gateway ("1.2.3.4");
NS_ABORT_MSG_IF (gateway == "1.2.3.4", "You must change the gateway IP address before running this example");
- ipv4->SetDefaultRoute (gateway, interface);
+ Ipv4StaticRoutingHelper ipv4RoutingHelper;
+ Ptr staticRouting = ipv4RoutingHelper.GetStaticRouting (ipv4);
+ staticRouting->SetDefaultRoute (gateway, interface);
//
// Create the ping application. This application knows how to send
diff --git a/examples/static-routing-slash32.cc b/examples/static-routing-slash32.cc
index 91329ae91..dc6d62499 100644
--- a/examples/static-routing-slash32.cc
+++ b/examples/static-routing-slash32.cc
@@ -97,12 +97,14 @@ main (int argc, char *argv[])
ipv4C->SetMetric (ifIndexC, 1);
ipv4C->SetUp (ifIndexC);
+ Ipv4StaticRoutingHelper ipv4RoutingHelper;
// Create static routes from A to C
+ Ptr staticRoutingA = ipv4RoutingHelper.GetStaticRouting (ipv4A);
// The ifIndex for this outbound route is 1; the first p2p link added
- ipv4A->AddHostRouteTo (Ipv4Address ("192.168.1.1"), Ipv4Address ("10.1.1.2"), 1);
+ staticRoutingA->AddHostRouteTo (Ipv4Address ("192.168.1.1"), Ipv4Address ("10.1.1.2"), 1);
+ Ptr staticRoutingB = ipv4RoutingHelper.GetStaticRouting (ipv4B);
// The ifIndex we want on node B is 2; 0 corresponds to loopback, and 1 to the first point to point link
- ipv4B->AddHostRouteTo (Ipv4Address ("192.168.1.1"), Ipv4Address ("10.1.1.6"), 2);
-
+ staticRoutingB->AddHostRouteTo (Ipv4Address ("192.168.1.1"), Ipv4Address ("10.1.1.6"), 2);
// Create the OnOff application to send UDP datagrams of size
// 210 bytes at a rate of 448 Kb/s
uint16_t port = 9; // Discard port (RFC 863)
diff --git a/examples/tcp-nsc-lfn.cc b/examples/tcp-nsc-lfn.cc
index b79674413..93a67774b 100644
--- a/examples/tcp-nsc-lfn.cc
+++ b/examples/tcp-nsc-lfn.cc
@@ -91,7 +91,7 @@ int main (int argc, char *argv[])
InternetStackHelper internet;
// The next statement switches the nodes to 'NSC'-Mode.
// It disables the native ns-3 TCP model and loads the NSC library.
- internet.SetNscStack (nscStack);
+ internet.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue(nscStack));
internet.Install (n);
if (tcpCong != "cubic") // make sure we only fail if both --nscstack and --TCP_CONGESTION are used
diff --git a/examples/tcp-nsc-zoo.cc b/examples/tcp-nsc-zoo.cc
index 81f73c585..bb4ca6d77 100644
--- a/examples/tcp-nsc-zoo.cc
+++ b/examples/tcp-nsc-zoo.cc
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
InternetStackHelper internetStack;
- internetStack.SetNscStack ("liblinux2.6.26.so");
+ internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue("liblinux2.6.26.so"));
// this switches nodes 0 and 1 to NSCs Linux 2.6.26 stack.
internetStack.Install (n.Get(0));
internetStack.Install (n.Get(1));
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
{
// the next statement doesn't change anything for the nodes 0, 1, and 2; since they
// already have a stack assigned.
- internetStack.SetNscStack ("liblinux2.6.18.so");
+ internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue("liblinux2.6.18.so"));
// this switches node 3 to NSCs Linux 2.6.18 stack.
internetStack.Install (n.Get(3));
// and then agains disables sack/timestamps/wscale on node 3.
diff --git a/examples/wifi-clear-channel-cmu.cc b/examples/wifi-clear-channel-cmu.cc
new file mode 100644
index 000000000..4028d6789
--- /dev/null
+++ b/examples/wifi-clear-channel-cmu.cc
@@ -0,0 +1,229 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Boeing Company
+ *
+ * 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: Guangyu Pei
+ */
+
+#include "ns3/core-module.h"
+#include "ns3/common-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/mobility-module.h"
+#include "ns3/contrib-module.h"
+
+#include
+#include
+#include
+#include
+
+NS_LOG_COMPONENT_DEFINE ("Main");
+
+using namespace ns3;
+
+class Experiment
+{
+public:
+ Experiment ();
+ Experiment (std::string name);
+ uint32_t Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
+ const NqosWifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel);
+private:
+ void ReceivePacket (Ptr socket);
+ void SetPosition (Ptr node, Vector position);
+ Vector GetPosition (Ptr node);
+ Ptr SetupPacketReceive (Ptr node);
+ void GenerateTraffic (Ptr socket, uint32_t pktSize,
+ uint32_t pktCount, Time pktInterval );
+
+ uint32_t m_pktsTotal;
+ Gnuplot2dDataset m_output;
+};
+
+Experiment::Experiment ()
+{}
+
+Experiment::Experiment (std::string name)
+ : m_output (name)
+{
+ m_output.SetStyle (Gnuplot2dDataset::LINES);
+}
+
+void
+Experiment::SetPosition (Ptr node, Vector position)
+{
+ Ptr mobility = node->GetObject ();
+ mobility->SetPosition (position);
+}
+
+Vector
+Experiment::GetPosition (Ptr node)
+{
+ Ptr mobility = node->GetObject ();
+ return mobility->GetPosition ();
+}
+
+void
+Experiment::ReceivePacket (Ptr socket)
+{
+ Ptr packet;
+ while (packet = socket->Recv ())
+ {
+ m_pktsTotal ++;
+ }
+}
+
+Ptr
+Experiment::SetupPacketReceive (Ptr node)
+{
+ TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
+ Ptr sink = Socket::CreateSocket (node, tid);
+ InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
+ sink->Bind (local);
+ sink->SetRecvCallback (MakeCallback (&Experiment::ReceivePacket, this));
+ return sink;
+}
+
+void
+Experiment::GenerateTraffic (Ptr socket, uint32_t pktSize,
+ uint32_t pktCount, Time pktInterval )
+{
+ if (pktCount > 0)
+ {
+ socket->Send (Create (pktSize));
+ Simulator::Schedule (pktInterval, &Experiment::GenerateTraffic, this,
+ socket, pktSize,pktCount-1, pktInterval);
+ }
+ else
+ {
+ socket->Close ();
+ }
+}
+
+uint32_t
+Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
+ const NqosWifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
+{
+ m_pktsTotal = 0;
+
+ NodeContainer c;
+ c.Create (2);
+
+ InternetStackHelper internet;
+ internet.Install (c);
+
+ YansWifiPhyHelper phy = wifiPhy;
+ phy.SetChannel (wifiChannel.Create ());
+
+ NqosWifiMacHelper mac = wifiMac;
+ NetDeviceContainer devices = wifi.Install (phy, mac, c);
+
+ MobilityHelper mobility;
+ Ptr positionAlloc = CreateObject ();
+ positionAlloc->Add (Vector (0.0, 0.0, 0.0));
+ positionAlloc->Add (Vector (5.0, 0.0, 0.0));
+ mobility.SetPositionAllocator (positionAlloc);
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (c);
+
+ Ipv4AddressHelper ipv4;
+ NS_LOG_INFO ("Assign IP Addresses.");
+ ipv4.SetBase ("10.1.1.0", "255.255.255.0");
+ Ipv4InterfaceContainer i = ipv4.Assign (devices);
+
+ Ptr recvSink = SetupPacketReceive (c.Get (0));
+
+ TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
+ Ptr source = Socket::CreateSocket (c.Get (1), tid);
+ InetSocketAddress remote = InetSocketAddress (Ipv4Address ("255.255.255.255"), 80);
+ source->Connect (remote);
+ uint32_t packetSize = 1014;
+ uint32_t maxPacketCount = 200;
+ Time interPacketInterval = Seconds (1.);
+ Simulator::Schedule (Seconds (1.0), &Experiment::GenerateTraffic,
+ this, source, packetSize, maxPacketCount,interPacketInterval);
+ Simulator::Run ();
+
+ Simulator::Destroy ();
+
+ return m_pktsTotal;
+}
+
+int main (int argc, char *argv[])
+{
+ std::ofstream outfile ("clear-channel.plt");
+ std::vector modes;
+
+ modes.push_back ("wifib-1mbs");
+ modes.push_back ("wifib-2mbs");
+ modes.push_back ("wifib-5.5mbs");
+ modes.push_back ("wifib-11mbs");
+ // disable fragmentation
+ Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
+ Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
+
+ CommandLine cmd;
+ cmd.Parse (argc, argv);
+
+ Gnuplot gnuplot = Gnuplot ("clear-channel.eps");
+
+ for (uint32_t i = 0; i < modes.size(); i++)
+ {
+ std::cout << modes[i] << std::endl;
+ Gnuplot2dDataset dataset (modes[i]);
+
+ for (double rss = -102.0; rss <= -80.0; rss += 0.5)
+ {
+ Experiment experiment;
+ dataset.SetStyle (Gnuplot2dDataset::LINES);
+
+ WifiHelper wifi;
+ NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
+ Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
+ StringValue (modes[i]));
+ wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
+ "DataMode",StringValue(modes[i]),
+ "ControlMode",StringValue(modes[i]));
+ wifiMac.SetType ("ns3::AdhocWifiMac");
+
+ YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
+ YansWifiChannelHelper wifiChannel ;
+ wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
+ wifiChannel.AddPropagationLoss ("ns3::FixedRssLossModel","Rss",DoubleValue(rss));
+
+
+ NS_LOG_DEBUG (modes[i]);
+ experiment = Experiment (modes[i]);
+ wifiPhy.Set ("Standard", StringValue ("802.11b") );
+ wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0) );
+ wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) );
+ wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) );
+ wifiPhy.Set ("RxGain", DoubleValue (0) );
+ wifiPhy.Set ("RxNoiseFigure", DoubleValue (7) );
+ uint32_t pktsRecvd = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel);
+ dataset.Add (rss, pktsRecvd);
+ }
+
+ gnuplot.AddDataset (dataset);
+ }
+ gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\"");
+ gnuplot.SetLegend ("RSS(dBm)", "Number of packets received");
+ gnuplot.SetExtra ("set xrange [-102:-83]");
+ gnuplot.GenerateOutput (outfile);
+ outfile.close ();
+
+ return 0;
+}
diff --git a/examples/wscript b/examples/wscript
index 0af2e4583..5c920cefb 100644
--- a/examples/wscript
+++ b/examples/wscript
@@ -120,6 +120,10 @@ def build(bld):
['core', 'simulator', 'mobility', 'wifi'])
obj.source = 'wifi-adhoc.cc'
+ obj = bld.create_ns3_program('wifi-clear-channel-cmu',
+ ['core', 'simulator', 'mobility', 'wifi'])
+ obj.source = 'wifi-clear-channel-cmu.cc'
+
obj = bld.create_ns3_program('wifi-ap',
['core', 'simulator', 'mobility', 'wifi'])
obj.source = 'wifi-ap.cc'
diff --git a/samples/main-propagation-loss.cc b/samples/main-propagation-loss.cc
index b16279004..15e3c3605 100644
--- a/samples/main-propagation-loss.cc
+++ b/samples/main-propagation-loss.cc
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2007 INRIA
+ * Copyright (c) 2008 Timo Bingmann
*
* 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
@@ -15,45 +15,298 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author: Mathieu Lacage
+ * Author: Timo Bingmann
*/
+
#include "ns3/propagation-loss-model.h"
+#include "ns3/jakes-propagation-loss-model.h"
#include "ns3/constant-position-mobility-model.h"
+
#include "ns3/config.h"
#include "ns3/string.h"
+#include "ns3/boolean.h"
+#include "ns3/double.h"
+#include "ns3/gnuplot.h"
+#include "ns3/simulator.h"
+
+#include
using namespace ns3;
-static void
-PrintOne (double minTxpower, double maxTxpower, double stepTxpower, double min, double max, double step)
+/// Round a double number to the given precision. e.g. dround(0.234, 0.1) = 0.2
+/// and dround(0.257, 0.1) = 0.3
+static double dround(double number, double precision)
+{
+ number /= precision;
+ if (number >= 0)
+ {
+ number = floor(number + 0.5);
+ }
+ else
+ {
+ number = ceil(number - 0.5);
+ }
+ number *= precision;
+ return number;
+}
+
+static Gnuplot
+TestDeterministic (Ptr model)
{
Ptr a = CreateObject ();
Ptr b = CreateObject ();
- Ptr log = CreateObject ();
- Ptr model = log;
+ Gnuplot plot;
- a->SetPosition (Vector (0.0, 0.0, 0.0));
- for (double x = min; x < max; x+= step)
- {
- b->SetPosition (Vector (x, 0.0, 0.0));
- std::cout << x << " ";
- for (double txpower = minTxpower; txpower < maxTxpower; txpower += stepTxpower)
- {
- double rxPowerDbm = model->CalcRxPower (txpower, a, b);
- std::cout << rxPowerDbm << " ";
- }
- std::cout << std::endl;
- }
+ plot.AppendExtra("set xlabel 'Distance'");
+ plot.AppendExtra("set ylabel 'rxPower (dBm)'");
+ plot.AppendExtra("set key top right");
+
+ double txPowerDbm = +20; // dBm
+
+ Gnuplot2dDataset dataset;
+
+ dataset.SetStyle(Gnuplot2dDataset::LINES);
+
+ {
+ a->SetPosition (Vector (0.0, 0.0, 0.0));
+
+ for (double distance = 0.0; distance < 2500.0; distance += 10.0)
+ {
+ b->SetPosition (Vector (distance, 0.0, 0.0));
+
+ // CalcRxPower() returns dBm.
+ double rxPowerDbm = model->CalcRxPower (txPowerDbm, a, b);
+
+ dataset.Add(distance, rxPowerDbm);
+
+ Simulator::Stop (Seconds (1.0));
+ Simulator::Run ();
+ }
+ }
+
+ std::ostringstream os;
+ os << "txPower " << txPowerDbm << "dBm";
+ dataset.SetTitle(os.str());
+
+ plot.AddDataset(dataset);
+
+ plot.AddDataset( Gnuplot2dFunction("-94 dBm CSThreshold", "-94.0") );
+
+ return plot;
+}
+
+static Gnuplot
+TestProbabilistic (Ptr model, unsigned int samples = 100000)
+{
+ Ptr a = CreateObject ();
+ Ptr b = CreateObject ();
+
+ Gnuplot plot;
+
+ plot.AppendExtra("set xlabel 'Distance'");
+ plot.AppendExtra("set ylabel 'rxPower (dBm)'");
+ plot.AppendExtra("set zlabel 'Probability' offset 0,+10");
+ plot.AppendExtra("set view 50, 120, 1.0, 1.0");
+ plot.AppendExtra("set key top right");
+
+ plot.AppendExtra("set ticslevel 0");
+ plot.AppendExtra("set xtics offset -0.5,0");
+ plot.AppendExtra("set ytics offset 0,-0.5");
+ plot.AppendExtra("set xrange [100:]");
+
+ double txPowerDbm = +20; // dBm
+
+ Gnuplot3dDataset dataset;
+
+ dataset.SetStyle("with linespoints");
+ dataset.SetExtra("pointtype 3 pointsize 0.5");
+
+ typedef std::map rxPowerMapType;
+
+ // Take given number of samples from CalcRxPower() and show probability
+ // density for discrete distances.
+ {
+ a->SetPosition (Vector (0.0, 0.0, 0.0));
+
+ for (double distance = 100.0; distance < 2500.0; distance += 100.0)
+ {
+ b->SetPosition (Vector (distance, 0.0, 0.0));
+
+ rxPowerMapType rxPowerMap;
+
+ for (unsigned int samp = 0; samp < samples; ++samp)
+ {
+ // CalcRxPower() returns dBm.
+ double rxPowerDbm = model->CalcRxPower (txPowerDbm, a, b);
+ rxPowerDbm = dround(rxPowerDbm, 1.0);
+
+ rxPowerMap[ rxPowerDbm ] ++;
+
+ Simulator::Stop (Seconds (0.01));
+ Simulator::Run ();
+ }
+
+ for (rxPowerMapType::const_iterator i = rxPowerMap.begin();
+ i != rxPowerMap.end(); ++i)
+ {
+ dataset.Add(distance, i->first, (double)i->second / (double)samples);
+ }
+ dataset.AddEmptyLine();
+ }
+ }
+
+ std::ostringstream os;
+ os << "txPower " << txPowerDbm << "dBm";
+ dataset.SetTitle(os.str());
+
+ plot.AddDataset(dataset);
+
+ return plot;
+}
+
+static Gnuplot
+TestDeterministicByTime (Ptr model,
+ Time timeStep = Seconds(0.001),
+ Time timeTotal = Seconds(1.0),
+ double distance = 100.0)
+{
+ Ptr a = CreateObject ();
+ Ptr b = CreateObject ();
+
+ Gnuplot plot;
+
+ plot.AppendExtra("set xlabel 'Time (s)'");
+ plot.AppendExtra("set ylabel 'rxPower (dBm)'");
+ plot.AppendExtra("set key center right");
+
+ double txPowerDbm = +20; // dBm
+
+ Gnuplot2dDataset dataset;
+
+ dataset.SetStyle(Gnuplot2dDataset::LINES);
+
+ {
+ a->SetPosition (Vector (0.0, 0.0, 0.0));
+ b->SetPosition (Vector (distance, 0.0, 0.0));
+
+ Time start = Simulator::Now();
+ while( Simulator::Now() < start + timeTotal )
+ {
+ // CalcRxPower() returns dBm.
+ double rxPowerDbm = model->CalcRxPower (txPowerDbm, a, b);
+
+ Time elapsed = Simulator::Now() - start;
+ dataset.Add(elapsed.GetSeconds(), rxPowerDbm);
+
+ Simulator::Stop (timeStep);
+ Simulator::Run ();
+ }
+ }
+
+ std::ostringstream os;
+ os << "txPower " << txPowerDbm << "dBm";
+ dataset.SetTitle(os.str());
+
+ plot.AddDataset(dataset);
+
+ plot.AddDataset( Gnuplot2dFunction("-94 dBm CSThreshold", "-94.0") );
+
+ return plot;
}
int main (int argc, char *argv[])
{
+ GnuplotCollection gnuplots("main-propagation-loss.pdf");
- Config::SetDefault ("ns3::LogDistancePropagationLossModel::ReferenceDistance", StringValue ("1.0"));
- Config::SetDefault ("ns3::LogDistancePropagationLossModel::Exponent", StringValue ("4"));
+ {
+ Ptr friis = CreateObject ();
- PrintOne (-10, 20, 5, 0, 10000, 2);
+ Gnuplot plot = TestDeterministic(friis);
+ plot.SetTitle("ns3::FriisPropagationLossModel (Default Parameters)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr log = CreateObject ();
+ log->SetAttribute("Exponent", DoubleValue (2.5));
+
+ Gnuplot plot = TestDeterministic(log);
+ plot.SetTitle("ns3::LogDistancePropagationLossModel (Exponent = 2.5)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr random = CreateObject ();
+ random->SetAttribute("Variable", RandomVariableValue(ExponentialVariable(50.0)));
+
+ Gnuplot plot = TestDeterministic(random);
+ plot.SetTitle("ns3::RandomPropagationLossModel with Exponential Distribution");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr jakes = CreateObject ();
+
+ // doppler frequency shift for 5.15 GHz at 100 km/h
+ jakes->SetAttribute("DopplerFreq", DoubleValue(477.9));
+
+ Gnuplot plot = TestDeterministicByTime (jakes, Seconds(0.001), Seconds(1.0));
+ plot.SetTitle("ns3::JakesPropagationLossModel (with 477.9 Hz shift and 1 millisec resolution)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr jakes = CreateObject ();
+
+ // doppler frequency shift for 5.15 GHz at 100 km/h
+ jakes->SetAttribute("DopplerFreq", DoubleValue(477.9));
+
+ Gnuplot plot = TestDeterministicByTime (jakes, Seconds(0.0001), Seconds(0.1));
+ plot.SetTitle("ns3::JakesPropagationLossModel (with 477.9 Hz shift and 0.1 millisec resolution)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr log3 = CreateObject ();
+
+ Gnuplot plot = TestDeterministic(log3);
+ plot.SetTitle("ns3::ThreeLogDistancePropagationLossModel (Defaults)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr log3 = CreateObject ();
+ // more prominent example values:
+ log3->SetAttribute("Exponent0", DoubleValue(1.0));
+ log3->SetAttribute("Exponent1", DoubleValue(3.0));
+ log3->SetAttribute("Exponent2", DoubleValue(10.0));
+
+ Gnuplot plot = TestDeterministic(log3);
+ plot.SetTitle("ns3::ThreeLogDistancePropagationLossModel (Exponents 1.0, 3.0 and 10.0)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr nak = CreateObject ();
+
+ Gnuplot plot = TestProbabilistic(nak);
+ plot.SetTitle("ns3::NakagamiPropagationLossModel (Default Parameters)");
+ gnuplots.AddPlot(plot);
+ }
+
+ {
+ Ptr log3 = CreateObject ();
+
+ Ptr nak = CreateObject ();
+ log3->SetNext(nak);
+
+ Gnuplot plot = TestProbabilistic(log3);
+ plot.SetTitle("ns3::ThreeLogDistancePropagationLossModel and ns3::NakagamiPropagationLossModel (Default Parameters)");
+ gnuplots.AddPlot(plot);
+ }
+
+ gnuplots.GenerateOutput(std::cout);
return 0;
}
diff --git a/src/applications/packet-sink/packet-sink.cc b/src/applications/packet-sink/packet-sink.cc
index 4e0419096..3a86f5416 100644
--- a/src/applications/packet-sink/packet-sink.cc
+++ b/src/applications/packet-sink/packet-sink.cc
@@ -18,10 +18,12 @@
* Author: Tom Henderson (tomhend@u.washington.edu)
*/
#include "ns3/address.h"
+#include "ns3/address-utils.h"
#include "ns3/log.h"
#include "ns3/inet-socket-address.h"
#include "ns3/node.h"
#include "ns3/socket.h"
+#include "ns3/udp-socket.h"
#include "ns3/simulator.h"
#include "ns3/socket-factory.h"
#include "ns3/packet.h"
@@ -88,6 +90,19 @@ void PacketSink::StartApplication() // Called at time specified by Start
m_socket = Socket::CreateSocket (GetNode(), m_tid);
m_socket->Bind (m_local);
m_socket->Listen ();
+ if (addressUtils::IsMulticast (m_local))
+ {
+ Ptr udpSocket = DynamicCast (m_socket);
+ if (udpSocket)
+ {
+ // equivalent to setsockopt (MCAST_JOIN_GROUP)
+ udpSocket->MulticastJoinGroup (0, m_local);
+ }
+ else
+ {
+ NS_FATAL_ERROR ("Error: joining multicast on a non-UDP socket");
+ }
+ }
}
m_socket->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this));
diff --git a/src/applications/udp-echo/udp-echo-server.cc b/src/applications/udp-echo/udp-echo-server.cc
index bc05993cc..526a0ee6a 100644
--- a/src/applications/udp-echo/udp-echo-server.cc
+++ b/src/applications/udp-echo/udp-echo-server.cc
@@ -18,9 +18,11 @@
#include "ns3/log.h"
#include "ns3/ipv4-address.h"
+#include "ns3/address-utils.h"
#include "ns3/nstime.h"
#include "ns3/inet-socket-address.h"
#include "ns3/socket.h"
+#include "ns3/udp-socket.h"
#include "ns3/simulator.h"
#include "ns3/socket-factory.h"
#include "ns3/packet.h"
@@ -76,6 +78,19 @@ UdpEchoServer::StartApplication (void)
m_socket = Socket::CreateSocket (GetNode(), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), m_port);
m_socket->Bind (local);
+ if (addressUtils::IsMulticast (m_local))
+ {
+ Ptr udpSocket = DynamicCast (m_socket);
+ if (udpSocket)
+ {
+ // equivalent to setsockopt (MCAST_JOIN_GROUP)
+ udpSocket->MulticastJoinGroup (0, m_local);
+ }
+ else
+ {
+ NS_FATAL_ERROR ("Error: joining multicast on a non-UDP socket");
+ }
+ }
}
m_socket->SetRecvCallback(MakeCallback(&UdpEchoServer::HandleRead, this));
diff --git a/src/core/object.cc b/src/core/object.cc
index e2a56d22a..26836db96 100644
--- a/src/core/object.cc
+++ b/src/core/object.cc
@@ -160,6 +160,24 @@ Object::AggregateObject (Ptr o)
other->m_next = next;
NS_ASSERT (CheckLoose ());
NS_ASSERT (o->CheckLoose ());
+ // call NotifyNewAggregate in the listed chain
+ Object *currentObject = this;
+ do
+ {
+ // the NotifyNewAggregate of the current object implementation
+ // should be called on the next object in the linked chain
+ currentObject->NotifyNewAggregate ();
+ currentObject = currentObject->m_next;
+ } while (currentObject != this);
+}
+/**
+ * This function must be implemented in the stack that needs to notify
+ * other stacks connected to the node of their presence in the node.
+ */
+void
+Object::NotifyNewAggregate ()
+{
+
}
Object::AggregateIterator
diff --git a/src/core/object.h b/src/core/object.h
index e746d7940..8cf1120d2 100644
--- a/src/core/object.h
+++ b/src/core/object.h
@@ -160,6 +160,13 @@ public:
AggregateIterator GetAggregateIterator (void) const;
protected:
+ /**
+ * This function is called by the AggregateObject on all the objects connected in the listed chain.
+ * This way the new object aggregated will be used if needed by the NotifyNewAggregate corresponding
+ * to each object connected in the listed chain. It should be implemented by objects needing an
+ * additional/special behavior when aggregated to another object.
+ */
+ virtual void NotifyNewAggregate ();
/**
* This method is called by Object::Dispose or by the object's
* destructor, whichever comes first.
diff --git a/src/devices/emu/emu-net-device.cc b/src/devices/emu/emu-net-device.cc
index 93eab5939..94f452d24 100644
--- a/src/devices/emu/emu-net-device.cc
+++ b/src/devices/emu/emu-net-device.cc
@@ -173,7 +173,9 @@ EmuNetDevice::EmuNetDevice ()
m_sock (-1),
m_readThread (0),
m_ifIndex (std::numeric_limits::max ()), // absurdly large value
- m_sll_ifindex (-1)
+ m_sll_ifindex (-1),
+ m_isBroadcast (true),
+ m_isMulticast (false)
{
NS_LOG_FUNCTION (this);
Start (m_tStart);
@@ -293,7 +295,19 @@ EmuNetDevice::StartDevice (void)
{
NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode");
}
-
+ if ((ifr.ifr_flags & IFF_BROADCAST) != IFF_BROADCAST)
+ {
+ // We default m_isBroadcast to true but turn it off here if not
+ // supported, because in the common case, overlying IP code will
+ // assert during configuration time if this is false, before this
+ // method has a chance to set it during runtime
+ m_isBroadcast = false;
+ }
+ if ((ifr.ifr_flags & IFF_MULTICAST) == IFF_MULTICAST)
+ {
+ // This one is OK to enable at runtime
+ m_isMulticast = true;
+ }
//
// Now spin up a read thread to read packets.
//
@@ -918,7 +932,7 @@ EmuNetDevice::SetLinkChangeCallback (Callback callback)
bool
EmuNetDevice::IsBroadcast (void) const
{
- return true;
+ return m_isBroadcast;
}
Address
@@ -930,7 +944,7 @@ EmuNetDevice::GetBroadcast (void) const
bool
EmuNetDevice::IsMulticast (void) const
{
- return false;
+ return m_isMulticast;
}
Address
diff --git a/src/devices/emu/emu-net-device.h b/src/devices/emu/emu-net-device.h
index 4dbb3ffa6..ee00d05e6 100644
--- a/src/devices/emu/emu-net-device.h
+++ b/src/devices/emu/emu-net-device.h
@@ -452,6 +452,18 @@ private:
*/
bool m_linkUp;
+ /**
+ * Flag indicating whether or not the underlying net device supports
+ * broadcast.
+ */
+ bool m_isBroadcast;
+
+ /**
+ * Flag indicating whether or not the underlying net device supports
+ * multicast.
+ */
+ bool m_isMulticast;
+
/**
* Callback to fire if the link changes state (up or down).
*/
diff --git a/src/devices/tap-bridge/tap-bridge.cc b/src/devices/tap-bridge/tap-bridge.cc
index aff3a8907..df422d15c 100644
--- a/src/devices/tap-bridge/tap-bridge.cc
+++ b/src/devices/tap-bridge/tap-bridge.cc
@@ -342,7 +342,7 @@ TapBridge::CreateTap (void)
Ptr nd = GetBridgedNetDevice ();
Ptr n = nd->GetNode ();
Ptr ipv4 = n->GetObject ();
- uint32_t index = ipv4->FindInterfaceForDevice (nd);
+ uint32_t index = ipv4->GetInterfaceForDevice (nd);
if (ipv4->GetNAddresses (index) > 1)
{
NS_LOG_WARN ("Underlying bridged NetDevice has multiple IP addresses; using first one.");
diff --git a/src/devices/wifi/adhoc-wifi-mac.cc b/src/devices/wifi/adhoc-wifi-mac.cc
index 89462a3ee..2baceceff 100644
--- a/src/devices/wifi/adhoc-wifi-mac.cc
+++ b/src/devices/wifi/adhoc-wifi-mac.cc
@@ -98,7 +98,6 @@ void
AdhocWifiMac::SetEifsNoDifs (Time eifsNoDifs)
{
m_dcfManager->SetEifsNoDifs (eifsNoDifs);
- m_eifsNoDifs = eifsNoDifs;
}
void
AdhocWifiMac::SetAckTimeout (Time ackTimeout)
@@ -128,7 +127,7 @@ AdhocWifiMac::GetSifs (void) const
Time
AdhocWifiMac::GetEifsNoDifs (void) const
{
- return m_eifsNoDifs;
+ return m_dcfManager->GetEifsNoDifs ();
}
Time
AdhocWifiMac::GetAckTimeout (void) const
@@ -241,7 +240,7 @@ AdhocWifiMac::SupportsSendFrom (void) const
}
void
-AdhocWifiMac::ForwardUp (Ptr packet, WifiMacHeader const *hdr)
+AdhocWifiMac::ForwardUp (Ptr packet, const WifiMacHeader *hdr)
{
NS_LOG_DEBUG ("received size="<GetSize ()<<", from="<GetAddr2 ());
m_upCallback (packet, hdr->GetAddr2 (), hdr->GetAddr1 ());
diff --git a/src/devices/wifi/adhoc-wifi-mac.h b/src/devices/wifi/adhoc-wifi-mac.h
index b1b70b73c..3c56182c1 100644
--- a/src/devices/wifi/adhoc-wifi-mac.h
+++ b/src/devices/wifi/adhoc-wifi-mac.h
@@ -83,7 +83,7 @@ private:
// inherited from Object base class.
virtual void DoDispose (void);
/* invoked by the MacLows. */
- void ForwardUp (Ptr packet, WifiMacHeader const*hdr);
+ void ForwardUp (Ptr packet, const WifiMacHeader *hdr);
AdhocWifiMac (const AdhocWifiMac & ctor_arg);
AdhocWifiMac &operator = (const AdhocWifiMac &o);
Ptr GetDcaTxop(void) const;
@@ -97,7 +97,6 @@ private:
MacRxMiddle *m_rxMiddle;
Ptr m_low;
Ssid m_ssid;
- Time m_eifsNoDifs;
};
} // namespace ns3
diff --git a/src/devices/wifi/dca-txop.cc b/src/devices/wifi/dca-txop.cc
index c20bca9fe..0aff87242 100644
--- a/src/devices/wifi/dca-txop.cc
+++ b/src/devices/wifi/dca-txop.cc
@@ -232,7 +232,7 @@ DcaTxop::GetAifsn (void) const
}
void
-DcaTxop::Queue (Ptr packet, WifiMacHeader const &hdr)
+DcaTxop::Queue (Ptr packet, const WifiMacHeader &hdr)
{
NS_LOG_FUNCTION (this << packet << &hdr);
WifiMacTrailer fcs;
diff --git a/src/devices/wifi/dca-txop.h b/src/devices/wifi/dca-txop.h
index 55a4f2106..7c4e2bb91 100644
--- a/src/devices/wifi/dca-txop.h
+++ b/src/devices/wifi/dca-txop.h
@@ -67,8 +67,8 @@ class DcaTxop : public Object
public:
static TypeId GetTypeId (void);
- typedef Callback TxOk;
- typedef Callback TxFailed;
+ typedef Callback TxOk;
+ typedef Callback TxFailed;
DcaTxop ();
~DcaTxop ();
@@ -104,7 +104,7 @@ public:
* Store the packet in the internal queue until it
* can be sent safely.
*/
- void Queue (Ptr packet, WifiMacHeader const &hdr);
+ void Queue (Ptr packet, const WifiMacHeader &hdr);
private:
class TransmissionListener;
diff --git a/src/devices/wifi/dcf-manager.cc b/src/devices/wifi/dcf-manager.cc
index 6dd69b31f..b8cc65315 100644
--- a/src/devices/wifi/dcf-manager.cc
+++ b/src/devices/wifi/dcf-manager.cc
@@ -261,6 +261,11 @@ DcfManager::SetEifsNoDifs (Time eifsNoDifs)
{
m_eifsNoDifs = eifsNoDifs;
}
+Time
+DcfManager::GetEifsNoDifs () const
+{
+ return m_eifsNoDifs;
+}
void
DcfManager::Add (DcfState *dcf)
diff --git a/src/devices/wifi/dcf-manager.h b/src/devices/wifi/dcf-manager.h
index 39582aaca..6d97e3914 100644
--- a/src/devices/wifi/dcf-manager.h
+++ b/src/devices/wifi/dcf-manager.h
@@ -168,6 +168,11 @@ public:
*/
void SetEifsNoDifs (Time eifsNoDifs);
+ /**
+ * \return value set previously using SetEifsNoDifs.
+ */
+ Time GetEifsNoDifs () const;
+
/**
* \param dcf a new DcfState.
*
diff --git a/src/devices/wifi/interference-helper.cc b/src/devices/wifi/interference-helper.cc
index dff6c5eb9..d1bebbebc 100644
--- a/src/devices/wifi/interference-helper.cc
+++ b/src/devices/wifi/interference-helper.cc
@@ -123,7 +123,7 @@ InterferenceHelper::NiChange::operator < (InterferenceHelper::NiChange const &o)
****************************************************************/
InterferenceHelper::InterferenceHelper ()
- : m_80211a (false),
+ : m_80211_standard (WIFI_PHY_STANDARD_80211a),
m_errorRateModel (0)
{}
InterferenceHelper::~InterferenceHelper ()
@@ -227,12 +227,25 @@ InterferenceHelper::GetEnergyDuration (double energyW)
Time
InterferenceHelper::CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble) const
{
- NS_ASSERT (m_80211a);
uint64_t delay = 0;
- delay += m_plcpLongPreambleDelayUs;
- // symbol duration is 4us
- delay += 4;
- delay += lrint (ceil ((size * 8.0 + 16.0 + 6.0) / payloadMode.GetDataRate () / 4e-6) * 4);
+ switch (m_80211_standard)
+ {
+ case WIFI_PHY_STANDARD_80211a:
+ case WIFI_PHY_STANDARD_holland:
+ delay += m_plcpLongPreambleDelayUs;
+ // symbol duration is 4us
+ delay += 4;
+ delay += lrint (ceil ((size * 8.0 + 16.0 + 6.0) / payloadMode.GetDataRate () / 4e-6) * 4);
+ break;
+ case WIFI_PHY_STANDARD_80211b:
+ delay += m_plcpLongPreambleDelayUs;
+ delay += lrint (ceil ((size * 8.0 + 48.0) / payloadMode.GetDataRate () / 4e-6) * 4);
+ break;
+ default:
+ NS_ASSERT (false);
+ break;
+ }
+
return MicroSeconds (delay);
}
@@ -240,7 +253,7 @@ void
InterferenceHelper::Configure80211aParameters (void)
{
NS_LOG_FUNCTION (this);
- m_80211a = true;
+ m_80211_standard = WIFI_PHY_STANDARD_80211a;
m_plcpLongPreambleDelayUs = 16;
m_plcpShortPreambleDelayUs = 16;
m_longPlcpHeaderMode = WifiPhy::Get6mba ();
@@ -250,6 +263,20 @@ InterferenceHelper::Configure80211aParameters (void)
m_maxPacketDuration = CalculateTxDuration (4095, WifiPhy::Get6mba (), WIFI_PREAMBLE_LONG);
}
+void
+InterferenceHelper::Configure80211bParameters (void)
+{
+ NS_LOG_FUNCTION (this);
+ m_80211_standard = WIFI_PHY_STANDARD_80211b;
+ m_plcpLongPreambleDelayUs = 144;
+ m_plcpShortPreambleDelayUs = 144; // fixed preamable for 802.11b
+ m_longPlcpHeaderMode = WifiPhy::Get1mbb ();
+ m_shortPlcpHeaderMode = WifiPhy::Get1mbb ();
+ // PLCP Header: signal 8, service 8, length 16, CRC 16 bits
+ m_plcpHeaderLength = 8 + 8 + 16 + 16;
+ m_maxPacketDuration = CalculateTxDuration (4095, WifiPhy::Get1mbb (), WIFI_PREAMBLE_LONG);
+}
+
void
InterferenceHelper::AppendEvent (Ptr event)
{
diff --git a/src/devices/wifi/interference-helper.h b/src/devices/wifi/interference-helper.h
index 0b40e239d..78f73c91b 100644
--- a/src/devices/wifi/interference-helper.h
+++ b/src/devices/wifi/interference-helper.h
@@ -25,6 +25,7 @@
#include
#include "wifi-mode.h"
#include "wifi-preamble.h"
+#include "wifi-phy-standard.h"
#include "ns3/nstime.h"
#include "ns3/ref-count-base.h"
@@ -69,6 +70,7 @@ public:
~InterferenceHelper ();
void Configure80211aParameters (void);
+ void Configure80211bParameters (void);
void SetNoiseFigure (double value);
void SetErrorRateModel (Ptr rate);
@@ -120,7 +122,7 @@ private:
Time m_maxPacketDuration;
double m_noiseFigure; /**< noise figure (linear) */
Events m_events;
- bool m_80211a;
+ enum WifiPhyStandard m_80211_standard;
Ptr m_errorRateModel;
};
diff --git a/src/devices/wifi/jakes-propagation-loss-model.cc b/src/devices/wifi/jakes-propagation-loss-model.cc
index aaf030d10..d1e153bb9 100644
--- a/src/devices/wifi/jakes-propagation-loss-model.cc
+++ b/src/devices/wifi/jakes-propagation-loss-model.cc
@@ -127,7 +127,7 @@ JakesPropagationLossModel::PathCoefficients::GetLoss (void)
NS_OBJECT_ENSURE_REGISTERED (JakesPropagationLossModel);
-const double JakesPropagationLossModel::PI = 3.1415;
+const double JakesPropagationLossModel::PI = 3.14159265358979323846;
TypeId
JakesPropagationLossModel::GetTypeId (void)
diff --git a/src/devices/wifi/msdu-aggregator.cc b/src/devices/wifi/msdu-aggregator.cc
index 5455bcb79..ce7f3f436 100644
--- a/src/devices/wifi/msdu-aggregator.cc
+++ b/src/devices/wifi/msdu-aggregator.cc
@@ -59,7 +59,7 @@ MsduAggregator::Deaggregate (Ptr aggregatedPacket)
padding = (4 - ((hdr.GetLength () + 14) %4 )) % 4;
- if (padding > 0)
+ if (padding > 0 && deserialized < maxSize)
{
aggregatedPacket->RemoveAtStart (padding);
deserialized += padding;
diff --git a/src/devices/wifi/msdu-standard-aggregator.cc b/src/devices/wifi/msdu-standard-aggregator.cc
index 5fcb0ca24..c8ea0c9e3 100644
--- a/src/devices/wifi/msdu-standard-aggregator.cc
+++ b/src/devices/wifi/msdu-standard-aggregator.cc
@@ -57,19 +57,20 @@ MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggrega
Ptr currentPacket;
AmsduSubframeHeader currentHdr;
- uint32_t padding = CalculatePadding (packet);
+ uint32_t padding = CalculatePadding (aggregatedPacket);
uint32_t actualSize = aggregatedPacket->GetSize ();
if ((14 + packet->GetSize () + actualSize + padding) <= m_maxAmsduLength)
{
+ if (padding)
+ {
+ aggregatedPacket->AddPaddingAtEnd (padding);
+ }
currentHdr.SetDestinationAddr (dest);
currentHdr.SetSourceAddr (src);
currentHdr.SetLength (packet->GetSize ());
currentPacket = packet->Copy ();
- if (padding)
- {
- currentPacket->AddPaddingAtEnd (padding);
- }
+
currentPacket->AddHeader (currentHdr);
aggregatedPacket->AddAtEnd (currentPacket);
return true;
@@ -80,7 +81,7 @@ MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggrega
uint32_t
MsduStandardAggregator::CalculatePadding (Ptr packet)
{
- return (4 - ((packet->GetSize() + 14) %4 )) % 4;
+ return (4 - (packet->GetSize() %4 )) % 4;
}
} //namespace ns3
diff --git a/src/devices/wifi/msdu-standard-aggregator.h b/src/devices/wifi/msdu-standard-aggregator.h
index 7e626fe2d..7a9fa05ad 100644
--- a/src/devices/wifi/msdu-standard-aggregator.h
+++ b/src/devices/wifi/msdu-standard-aggregator.h
@@ -43,7 +43,8 @@ public:
virtual bool Aggregate (Ptr packet, Ptr aggregatedPacket,
Mac48Address src, Mac48Address dest);
private:
- /* Calculates how much padding must be added to the end of packet.
+ /* Calculates how much padding must be added to the end of aggregated packet,
+ after that a new packet is added.
Each A-MSDU subframe is padded so that its length is multiple of 4 octects.
*/
uint32_t CalculatePadding (Ptr packet);
diff --git a/src/devices/wifi/nqap-wifi-mac.cc b/src/devices/wifi/nqap-wifi-mac.cc
index 0e019e32e..f72b865b5 100644
--- a/src/devices/wifi/nqap-wifi-mac.cc
+++ b/src/devices/wifi/nqap-wifi-mac.cc
@@ -152,7 +152,6 @@ NqapWifiMac::SetEifsNoDifs (Time eifsNoDifs)
{
NS_LOG_FUNCTION (this << eifsNoDifs);
m_dcfManager->SetEifsNoDifs (eifsNoDifs);
- m_eifsNoDifs = eifsNoDifs;
}
void
NqapWifiMac::SetAckTimeout (Time ackTimeout)
@@ -182,7 +181,7 @@ NqapWifiMac::GetSifs (void) const
Time
NqapWifiMac::GetEifsNoDifs (void) const
{
- return m_eifsNoDifs;
+ return m_dcfManager->GetEifsNoDifs ();
}
Time
NqapWifiMac::GetAckTimeout (void) const
diff --git a/src/devices/wifi/nqap-wifi-mac.h b/src/devices/wifi/nqap-wifi-mac.h
index a7e792fc6..998bc0d61 100644
--- a/src/devices/wifi/nqap-wifi-mac.h
+++ b/src/devices/wifi/nqap-wifi-mac.h
@@ -129,7 +129,6 @@ private:
Ptr m_low;
Ssid m_ssid;
EventId m_beaconEvent;
- Time m_eifsNoDifs;
};
} // namespace ns3
diff --git a/src/devices/wifi/nqsta-wifi-mac.cc b/src/devices/wifi/nqsta-wifi-mac.cc
index e7ff5eafa..0fedd0e45 100644
--- a/src/devices/wifi/nqsta-wifi-mac.cc
+++ b/src/devices/wifi/nqsta-wifi-mac.cc
@@ -156,7 +156,6 @@ NqstaWifiMac::SetEifsNoDifs (Time eifsNoDifs)
{
NS_LOG_FUNCTION (this << eifsNoDifs);
m_dcfManager->SetEifsNoDifs (eifsNoDifs);
- m_eifsNoDifs = eifsNoDifs;
}
void
NqstaWifiMac::SetAckTimeout (Time ackTimeout)
@@ -186,7 +185,7 @@ NqstaWifiMac::GetSifs (void) const
Time
NqstaWifiMac::GetEifsNoDifs (void) const
{
- return m_eifsNoDifs;
+ return m_dcfManager->GetEifsNoDifs ();
}
Time
NqstaWifiMac::GetAckTimeout (void) const
diff --git a/src/devices/wifi/nqsta-wifi-mac.h b/src/devices/wifi/nqsta-wifi-mac.h
index 414596bf1..4675db4f9 100644
--- a/src/devices/wifi/nqsta-wifi-mac.h
+++ b/src/devices/wifi/nqsta-wifi-mac.h
@@ -160,7 +160,6 @@ private:
MacRxMiddle *m_rxMiddle;
Ptr m_low;
Ssid m_ssid;
- Time m_eifsNoDifs;
TracedCallback m_assocLogger;
TracedCallback m_deAssocLogger;
diff --git a/src/devices/wifi/propagation-loss-model.cc b/src/devices/wifi/propagation-loss-model.cc
index 058e84b2d..0bf4d59b1 100644
--- a/src/devices/wifi/propagation-loss-model.cc
+++ b/src/devices/wifi/propagation-loss-model.cc
@@ -107,7 +107,7 @@ RandomPropagationLossModel::DoCalcRxPower (double txPowerDbm,
NS_OBJECT_ENSURE_REGISTERED (FriisPropagationLossModel);
-const double FriisPropagationLossModel::PI = 3.1415;
+const double FriisPropagationLossModel::PI = 3.14159265358979323846;
TypeId
FriisPropagationLossModel::GetTypeId (void)
@@ -408,5 +408,139 @@ ThreeLogDistancePropagationLossModel::DoCalcRxPower (double txPowerDbm,
return txPowerDbm - pathLossDb;
}
+// ------------------------------------------------------------------------- //
+
+NS_OBJECT_ENSURE_REGISTERED (NakagamiPropagationLossModel);
+
+TypeId
+NakagamiPropagationLossModel::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::NakagamiPropagationLossModel")
+ .SetParent ()
+ .AddConstructor ()
+ .AddAttribute ("Distance1",
+ "Beginning of the second distance field. Default is 80m.",
+ DoubleValue (80.0),
+ MakeDoubleAccessor (&NakagamiPropagationLossModel::m_distance1),
+ MakeDoubleChecker ())
+ .AddAttribute ("Distance2",
+ "Beginning of the third distance field. Default is 200m.",
+ DoubleValue (200.0),
+ MakeDoubleAccessor (&NakagamiPropagationLossModel::m_distance2),
+ MakeDoubleChecker ())
+ .AddAttribute ("m0",
+ "m0 for distances smaller than Distance1. Default is 1.5.",
+ DoubleValue (1.5),
+ MakeDoubleAccessor (&NakagamiPropagationLossModel::m_m0),
+ MakeDoubleChecker ())
+ .AddAttribute ("m1",
+ "m1 for distances smaller than Distance2. Default is 0.75.",
+ DoubleValue (0.75),
+ MakeDoubleAccessor (&NakagamiPropagationLossModel::m_m1),
+ MakeDoubleChecker ())
+ .AddAttribute ("m2",
+ "m2 for distances greater than Distance2. Default is 0.75.",
+ DoubleValue (0.75),
+ MakeDoubleAccessor (&NakagamiPropagationLossModel::m_m2),
+ MakeDoubleChecker ())
+ ;
+ return tid;
+
+}
+
+NakagamiPropagationLossModel::NakagamiPropagationLossModel ()
+{}
+
+double
+NakagamiPropagationLossModel::DoCalcRxPower (double txPowerDbm,
+ Ptr a,
+ Ptr b) const
+{
+ // select m parameter
+
+ double distance = a->GetDistanceFrom (b);
+ NS_ASSERT(distance >= 0);
+
+ double m;
+ if (distance < m_distance1)
+ {
+ m = m_m0;
+ }
+ else if (distance < m_distance2)
+ {
+ m = m_m1;
+ }
+ else
+ {
+ m = m_m2;
+ }
+
+ // the current power unit is dBm, but Watt is put into the Nakagami /
+ // Rayleigh distribution.
+ double powerW = pow(10, (txPowerDbm - 30) / 10);
+
+ double resultPowerW;
+
+ // switch between Erlang- and Gamma distributions: this is only for
+ // speed. (Gamma is equal to Erlang for any positive integer m.)
+ unsigned int int_m = static_cast(floor(m));
+
+ if (int_m == m)
+ {
+ resultPowerW = m_erlangRandomVariable.GetValue(int_m, powerW / m);
+ }
+ else
+ {
+ resultPowerW = m_gammaRandomVariable.GetValue(m, powerW / m);
+ }
+
+ double resultPowerDbm = 10 * log10(resultPowerW) + 30;
+
+ NS_LOG_DEBUG ("Nakagami distance=" << distance << "m, " <<
+ "power=" << powerW <<"W, " <<
+ "resultPower=" << resultPowerW << "W=" << resultPowerDbm << "dBm");
+
+ return resultPowerDbm;
+}
+
+// ------------------------------------------------------------------------- //
+
+NS_OBJECT_ENSURE_REGISTERED (FixedRssLossModel);
+
+TypeId
+FixedRssLossModel::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::FixedRssLossModel")
+ .SetParent ()
+ .AddConstructor ()
+ .AddAttribute ("Rss", "The fixed receiver Rss.",
+ DoubleValue (-150.0),
+ MakeDoubleAccessor (&FixedRssLossModel::m_rss),
+ MakeDoubleChecker ())
+ ;
+ return tid;
+}
+FixedRssLossModel::FixedRssLossModel ()
+ : PropagationLossModel ()
+{}
+
+FixedRssLossModel::~FixedRssLossModel ()
+{}
+
+void
+FixedRssLossModel::SetRss (double rss)
+{
+ m_rss = rss;
+}
+
+double
+FixedRssLossModel::DoCalcRxPower (double txPowerDbm,
+ Ptr a,
+ Ptr b) const
+{
+ return m_rss;
+}
+
+// ------------------------------------------------------------------------- //
} // namespace ns3
diff --git a/src/devices/wifi/propagation-loss-model.h b/src/devices/wifi/propagation-loss-model.h
index 3feb1ba18..35d6a5cf8 100644
--- a/src/devices/wifi/propagation-loss-model.h
+++ b/src/devices/wifi/propagation-loss-model.h
@@ -17,6 +17,7 @@
*
* Author: Mathieu Lacage
* Contributions: Timo Bingmann
+ * Contributions: Gary Pei for fixed RSS
*/
#ifndef PROPAGATION_LOSS_MODEL_H
@@ -296,6 +297,79 @@ private:
double m_referenceLoss;
};
+/**
+ * \brief Nakagami-m fast fading propagation loss model.
+ *
+ * The Nakagami-m distribution is applied to the power level. The probability
+ * density function is defined as
+ * \f[ p(x; m, \omega) = \frac{2 m^m}{\Gamma(m) \omega^m} x^{2m - 1} e^{-\frac{m}{\omega} x^2} = 2 x \cdot p_{\text{Gamma}}(x^2, m, \frac{m}{\omega}) \f]
+ * with \f$ m \f$ the fading depth parameter and \f$ \omega \f$ the average received power.
+ *
+ * It is implemented by either a ns3::GammaVariable or a ns3::ErlangVariable
+ * random variable.
+ *
+ * Like in ns3::ThreeLogDistancePropagationLossModel, the m parameter is varied
+ * over three distance fields:
+ * \f[ \underbrace{0 \cdots\cdots}_{m_0} \underbrace{d_1 \cdots\cdots}_{m_1} \underbrace{d_2 \cdots\cdots}_{m_2} \infty \f]
+ *
+ * For m = 1 the Nakagami-m distribution equals the Rayleigh distribution. Thus
+ * this model also implements Rayleigh distribution based fast fading.
+ */
+
+class NakagamiPropagationLossModel : public PropagationLossModel
+{
+public:
+ static TypeId GetTypeId (void);
+
+ NakagamiPropagationLossModel ();
+
+ // Parameters are all accessible via attributes.
+
+private:
+ NakagamiPropagationLossModel (const NakagamiPropagationLossModel& o);
+ NakagamiPropagationLossModel& operator= (const NakagamiPropagationLossModel& o);
+
+ virtual double DoCalcRxPower (double txPowerDbm,
+ Ptr a,
+ Ptr b) const;
+
+ double m_distance1;
+ double m_distance2;
+
+ double m_m0;
+ double m_m1;
+ double m_m2;
+
+ ErlangVariable m_erlangRandomVariable;
+ GammaVariable m_gammaRandomVariable;
+};
+
+/**
+ * \brief The propagation loss is fixed. The user can set received power level.
+ */
+class FixedRssLossModel : public PropagationLossModel
+{
+public:
+ static TypeId GetTypeId (void);
+
+ FixedRssLossModel ();
+ virtual ~FixedRssLossModel ();
+ /**
+ * \param RSS (dBm) the received signal strength
+ *
+ * Set the RSS.
+ */
+ void SetRss (double rss);
+
+private:
+ FixedRssLossModel (const FixedRssLossModel &o);
+ FixedRssLossModel & operator = (const FixedRssLossModel &o);
+ virtual double DoCalcRxPower (double txPowerDbm,
+ Ptr a,
+ Ptr b) const;
+ double m_rss;
+};
+
} // namespace ns3
#endif /* PROPAGATION_LOSS_MODEL_H */
diff --git a/src/devices/wifi/qap-wifi-mac.cc b/src/devices/wifi/qap-wifi-mac.cc
index c125abbfd..066bf0187 100644
--- a/src/devices/wifi/qap-wifi-mac.cc
+++ b/src/devices/wifi/qap-wifi-mac.cc
@@ -188,7 +188,6 @@ QapWifiMac::SetEifsNoDifs (Time eifsNoDifs)
{
NS_LOG_FUNCTION (this << eifsNoDifs);
m_dcfManager->SetEifsNoDifs (eifsNoDifs);
- m_eifsNoDifs = eifsNoDifs;
}
void
@@ -224,7 +223,7 @@ QapWifiMac::GetSifs (void) const
Time
QapWifiMac::GetEifsNoDifs (void) const
{
- return m_eifsNoDifs;
+ return m_dcfManager->GetEifsNoDifs ();
}
Time
diff --git a/src/devices/wifi/qap-wifi-mac.h b/src/devices/wifi/qap-wifi-mac.h
index 5ae25dc3c..c906a14a5 100644
--- a/src/devices/wifi/qap-wifi-mac.h
+++ b/src/devices/wifi/qap-wifi-mac.h
@@ -88,7 +88,7 @@ public:
private:
virtual void DoDispose (void);
- void Receive (Ptr packet, WifiMacHeader const *hdr);
+ void Receive (Ptr packet, WifiMacHeader const*hdr);
void ForwardUp (Ptr