Merge ns-3-dev.
--- a/AUTHORS Tue Sep 15 16:25:49 2009 -0400
+++ b/AUTHORS Thu Sep 24 10:57:41 2009 -0400
@@ -31,3 +31,4 @@
Sebastien Vincent (vincent@clarinet.u-strasbg.fr)
Guillaume Vu-Brugier (gvubrugier@gmail.com)
Florian Westphal (fw@strlen.de)
+Josh Pelkey (jpelkey@gatech.edu)
--- a/CHANGES.html Tue Sep 15 16:25:49 2009 -0400
+++ b/CHANGES.html Thu Sep 24 10:57:41 2009 -0400
@@ -113,6 +113,17 @@
</p>
</li>
+<li><b> Nix-vector Routing</b>
+<p> Add nix-vector routing protocol
+<ul>
+<li> new helper class Ipv4NixVectorHelper
+</ul>
+<ul>
+<li> examples: nix-simple.cc, nms-p2p-nix.cc
+</ul>
+</p>
+</li>
+
</ul>
<h2>Changes to existing API:</h2>
--- a/RELEASE_NOTES Tue Sep 15 16:25:49 2009 -0400
+++ b/RELEASE_NOTES Thu Sep 24 10:57:41 2009 -0400
@@ -59,6 +59,10 @@
- IEEE 802.11s (Draft 3.0) model including Peering Management Protocol and HWMP.
- Forwarding Layer for Meshing (FLAME) protocol.
+ d) Nix-vector routing:
+ - Ipv4NixVectorHelper
+ - Examples (nix-simple, nms-p2p-nix)
+
API changes from ns-3.5
-----------------------
API changes for this release are documented in the file CHANGES.html.
--- a/bindings/python/callbacks_list.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/callbacks_list.py Thu Sep 24 10:57:41 2009 -0400
@@ -2,12 +2,17 @@
['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::Packet>', 'ns3::Address const&', 'ns3::Address const&', 'unsigned short', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['void', 'ns3::Mac48Address', 'ns3::Mac48Address', 'unsigned int', 'bool', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['void', 'unsigned int', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::dot11s::PeerLink::PeerState', 'ns3::dot11s::PeerLink::PeerState', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['unsigned int', 'ns3::Mac48Address', 'ns3::Ptr<ns3::MeshWifiInterfaceMac>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'ns3::WifiMacHeader const*', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
- ['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['std::vector<ns3::Mac48Address, std::allocator<ns3::Mac48Address> >', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
+ ['void', 'bool', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'unsigned short', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'std::string', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
--- a/bindings/python/ns3_module_bridge.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_bridge.py Thu Sep 24 10:57:41 2009 -0400
@@ -26,6 +26,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -50,6 +62,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -270,6 +290,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -283,6 +305,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_common.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_common.py Thu Sep 24 10:57:41 2009 -0400
@@ -39,6 +39,8 @@
module.add_class('PacketTagList')
## packet-tag-list.h: ns3::PacketTagList::TagData [struct]
module.add_class('TagData', outer_class=root_module['ns3::PacketTagList'])
+ ## pcap-file.h: ns3::PcapFile [class]
+ module.add_class('PcapFile')
## tag.h: ns3::Tag [class]
module.add_class('Tag', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h: ns3::TagBuffer [class]
@@ -63,6 +65,8 @@
module.add_class('ErrorModel', parent=root_module['ns3::Object'])
## error-model.h: ns3::ListErrorModel [class]
module.add_class('ListErrorModel', parent=root_module['ns3::ErrorModel'])
+ ## nix-vector.h: ns3::NixVector [class]
+ module.add_class('NixVector', parent=root_module['ns3::Object'])
## error-model.h: ns3::RateErrorModel [class]
module.add_class('RateErrorModel', parent=root_module['ns3::ErrorModel'])
@@ -84,6 +88,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -108,6 +124,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -133,6 +157,7 @@
register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item'])
register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList'])
register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData'])
+ register_Ns3PcapFile_methods(root_module, root_module['ns3::PcapFile'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3AsciiWriter_methods(root_module, root_module['ns3::AsciiWriter'])
@@ -144,6 +169,7 @@
register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
register_Ns3ErrorModel_methods(root_module, root_module['ns3::ErrorModel'])
register_Ns3ListErrorModel_methods(root_module, root_module['ns3::ListErrorModel'])
+ register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
register_Ns3RateErrorModel_methods(root_module, root_module['ns3::RateErrorModel'])
return
@@ -588,6 +614,11 @@
'ns3::ByteTagIterator',
[],
is_const=True)
+ ## packet.h: ns3::Ptr<ns3::NixVector> ns3::Packet::GetNixVector() const [member function]
+ cls.add_method('GetNixVector',
+ 'ns3::Ptr< ns3::NixVector >',
+ [],
+ is_const=True)
## packet.h: ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function]
cls.add_method('GetPacketTagIterator',
'ns3::PacketTagIterator',
@@ -670,6 +701,10 @@
'ns3::Buffer',
[],
is_const=True)
+ ## packet.h: void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
+ cls.add_method('SetNixVector',
+ 'void',
+ [param('ns3::Ptr< ns3::NixVector >', 'arg0')])
return
def register_Ns3PacketMetadata_methods(root_module, cls):
@@ -859,6 +894,69 @@
cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
return
+def register_Ns3PcapFile_methods(root_module, cls):
+ ## pcap-file.h: ns3::PcapFile::PcapFile(ns3::PcapFile const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PcapFile const &', 'arg0')])
+ ## pcap-file.h: ns3::PcapFile::PcapFile() [constructor]
+ cls.add_constructor([])
+ ## pcap-file.h: void ns3::PcapFile::Close() [member function]
+ cls.add_method('Close',
+ 'void',
+ [])
+ ## pcap-file.h: uint32_t ns3::PcapFile::GetDataLinkType() [member function]
+ cls.add_method('GetDataLinkType',
+ 'uint32_t',
+ [])
+ ## pcap-file.h: uint32_t ns3::PcapFile::GetMagic() [member function]
+ cls.add_method('GetMagic',
+ 'uint32_t',
+ [])
+ ## pcap-file.h: uint32_t ns3::PcapFile::GetSigFigs() [member function]
+ cls.add_method('GetSigFigs',
+ 'uint32_t',
+ [])
+ ## pcap-file.h: uint32_t ns3::PcapFile::GetSnapLen() [member function]
+ cls.add_method('GetSnapLen',
+ 'uint32_t',
+ [])
+ ## pcap-file.h: bool ns3::PcapFile::GetSwapMode() [member function]
+ cls.add_method('GetSwapMode',
+ 'bool',
+ [])
+ ## pcap-file.h: int32_t ns3::PcapFile::GetTimeZoneOffset() [member function]
+ cls.add_method('GetTimeZoneOffset',
+ 'int32_t',
+ [])
+ ## pcap-file.h: uint16_t ns3::PcapFile::GetVersionMajor() [member function]
+ cls.add_method('GetVersionMajor',
+ 'uint16_t',
+ [])
+ ## pcap-file.h: uint16_t ns3::PcapFile::GetVersionMinor() [member function]
+ cls.add_method('GetVersionMinor',
+ 'uint16_t',
+ [])
+ ## pcap-file.h: bool ns3::PcapFile::Init(uint32_t dataLinkType, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT, int32_t timeZoneCorrection=ns3::PcapFile::ZONE_DEFAULT, bool swapMode=false) [member function]
+ cls.add_method('Init',
+ 'bool',
+ [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT'), param('int32_t', 'timeZoneCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT'), param('bool', 'swapMode', default_value='false')])
+ ## pcap-file.h: bool ns3::PcapFile::Open(std::string const & filename, std::string const & mode) [member function]
+ cls.add_method('Open',
+ 'bool',
+ [param('std::string const &', 'filename'), param('std::string const &', 'mode')])
+ ## pcap-file.h: bool ns3::PcapFile::Read(uint8_t * const data, uint32_t maxBytes, uint32_t & tsSec, uint32_t & tsUsec, uint32_t & inclLen, uint32_t & origLen, uint32_t & readLen) [member function]
+ cls.add_method('Read',
+ 'bool',
+ [param('uint8_t * const', 'data'), param('uint32_t', 'maxBytes'), param('uint32_t &', 'tsSec'), param('uint32_t &', 'tsUsec'), param('uint32_t &', 'inclLen'), param('uint32_t &', 'origLen'), param('uint32_t &', 'readLen')])
+ ## pcap-file.h: bool ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, uint8_t const * const data, uint32_t totalLen) [member function]
+ cls.add_method('Write',
+ 'bool',
+ [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('uint8_t const * const', 'data'), param('uint32_t', 'totalLen')])
+ ## pcap-file.h: ns3::PcapFile::SNAPLEN_DEFAULT [variable]
+ cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True)
+ ## pcap-file.h: ns3::PcapFile::ZONE_DEFAULT [variable]
+ cls.add_static_attribute('ZONE_DEFAULT', 'int32_t const', is_const=True)
+ return
+
def register_Ns3Tag_methods(root_module, cls):
## tag.h: ns3::Tag::Tag() [constructor]
cls.add_constructor([])
@@ -1222,6 +1320,60 @@
visibility='private', is_virtual=True)
return
+def register_Ns3NixVector_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ ## nix-vector.h: ns3::NixVector::NixVector() [constructor]
+ cls.add_constructor([])
+ ## nix-vector.h: ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor]
+ cls.add_constructor([param('ns3::NixVector const &', 'o')])
+ ## nix-vector.h: void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function]
+ cls.add_method('AddNeighborIndex',
+ 'void',
+ [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')])
+ ## nix-vector.h: uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function]
+ cls.add_method('BitCount',
+ 'uint32_t',
+ [param('uint32_t', 'numberOfNeighbors')],
+ is_const=True)
+ ## nix-vector.h: ns3::Ptr<ns3::NixVector> ns3::NixVector::Copy() const [member function]
+ cls.add_method('Copy',
+ 'ns3::Ptr< ns3::NixVector >',
+ [],
+ is_const=True)
+ ## nix-vector.h: uint32_t ns3::NixVector::Deserialize(ns3::Buffer::Iterator i) [member function]
+ cls.add_method('Deserialize',
+ 'uint32_t',
+ [param('ns3::Buffer::Iterator', 'i')])
+ ## nix-vector.h: void ns3::NixVector::DumpNixVector(std::ostream & os) const [member function]
+ cls.add_method('DumpNixVector',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## nix-vector.h: uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function]
+ cls.add_method('ExtractNeighborIndex',
+ 'uint32_t',
+ [param('uint32_t', 'numberOfBits')])
+ ## nix-vector.h: uint32_t ns3::NixVector::GetRemainingBits() [member function]
+ cls.add_method('GetRemainingBits',
+ 'uint32_t',
+ [])
+ ## nix-vector.h: uint32_t ns3::NixVector::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## nix-vector.h: static ns3::TypeId ns3::NixVector::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## nix-vector.h: void ns3::NixVector::Serialize(ns3::Buffer::Iterator i, uint32_t size) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'i'), param('uint32_t', 'size')],
+ is_const=True)
+ return
+
def register_Ns3RateErrorModel_methods(root_module, cls):
## error-model.h: ns3::RateErrorModel::RateErrorModel(ns3::RateErrorModel const & arg0) [copy constructor]
cls.add_constructor([param('ns3::RateErrorModel const &', 'arg0')])
@@ -1290,6 +1442,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1303,6 +1457,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_contrib.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_contrib.py Thu Sep 24 10:57:41 2009 -0400
@@ -58,6 +58,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -82,6 +94,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -481,6 +501,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -494,6 +516,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_core.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_core.py Thu Sep 24 10:57:41 2009 -0400
@@ -69,6 +69,14 @@
module.add_class('SystemThread')
## system-wall-clock-ms.h: ns3::SystemWallClockMs [class]
module.add_class('SystemWallClockMs')
+ ## test.h: ns3::TestCase [class]
+ module.add_class('TestCase', allow_subclassing=True)
+ ## test.h: ns3::TestRunner [class]
+ module.add_class('TestRunner')
+ ## test.h: ns3::TestSuite [class]
+ module.add_class('TestSuite', allow_subclassing=True)
+ ## test.h: ns3::TestSuite::TestType [enumeration]
+ module.add_enum('TestType', ['BVT', 'UNIT', 'SYSTEM', 'EXAMPLE', 'PERFORMANCE'], outer_class=root_module['ns3::TestSuite'])
## trace-source-accessor.h: ns3::TraceSourceAccessor [class]
module.add_class('TraceSourceAccessor', allow_subclassing=True)
## random-variable.h: ns3::TriangularVariable [class]
@@ -189,6 +197,8 @@
root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::EnumValue'])
module.add_container('std::list< ns3::Ptr< ns3::RadvdPrefix > >', 'ns3::Ptr< ns3::RadvdPrefix >', container_type='list')
module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list')
+ module.add_container('std::vector< ns3::Ptr< ns3::FlowProbe > >', 'ns3::Ptr< ns3::FlowProbe >', container_type='vector')
+ module.add_container('std::vector< ns3::Ptr< ns3::NetDevice > >', 'ns3::Ptr< ns3::NetDevice >', container_type='vector')
typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector')
typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*')
typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&')
@@ -220,6 +230,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -247,6 +269,15 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+ module.add_container('std::vector< ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit > >', 'ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit >', container_type='vector')
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -281,6 +312,9 @@
register_Ns3SystemMutex_methods(root_module, root_module['ns3::SystemMutex'])
register_Ns3SystemThread_methods(root_module, root_module['ns3::SystemThread'])
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
+ register_Ns3TestCase_methods(root_module, root_module['ns3::TestCase'])
+ register_Ns3TestRunner_methods(root_module, root_module['ns3::TestRunner'])
+ register_Ns3TestSuite_methods(root_module, root_module['ns3::TestSuite'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
register_Ns3TriangularVariable_methods(root_module, root_module['ns3::TriangularVariable'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -937,6 +971,228 @@
[])
return
+def register_Ns3TestCase_methods(root_module, cls):
+ ## test.h: ns3::TestCase::TestCase(std::string name) [constructor]
+ cls.add_constructor([param('std::string', 'name')])
+ ## test.h: bool ns3::TestCase::Run() [member function]
+ cls.add_method('Run',
+ 'bool',
+ [])
+ ## test.h: void ns3::TestCase::SetVerbose(bool verbose) [member function]
+ cls.add_method('SetVerbose',
+ 'void',
+ [param('bool', 'verbose')])
+ ## test.h: void ns3::TestCase::SetName(std::string name) [member function]
+ cls.add_method('SetName',
+ 'void',
+ [param('std::string', 'name')])
+ ## test.h: std::string ns3::TestCase::GetName() [member function]
+ cls.add_method('GetName',
+ 'std::string',
+ [])
+ ## test.h: void ns3::TestCase::SetBaseDir(std::string dir) [member function]
+ cls.add_method('SetBaseDir',
+ 'void',
+ [param('std::string', 'dir')])
+ ## test.h: std::string ns3::TestCase::GetBaseDir() [member function]
+ cls.add_method('GetBaseDir',
+ 'std::string',
+ [])
+ ## test.h: std::string ns3::TestCase::GetSourceDir(std::string file) [member function]
+ cls.add_method('GetSourceDir',
+ 'std::string',
+ [param('std::string', 'file')])
+ ## test.h: void ns3::TestCase::SetStream(std::ofstream * ofs) [member function]
+ cls.add_method('SetStream',
+ 'void',
+ [param('std::ofstream *', 'ofs')])
+ ## test.h: std::ofstream * ns3::TestCase::GetStream() [member function]
+ cls.add_method('GetStream',
+ 'std::ofstream *',
+ [])
+ ## test.h: void ns3::TestCase::SetErrorStatus(bool error) [member function]
+ cls.add_method('SetErrorStatus',
+ 'void',
+ [param('bool', 'error')])
+ ## test.h: bool ns3::TestCase::GetErrorStatus() [member function]
+ cls.add_method('GetErrorStatus',
+ 'bool',
+ [])
+ ## test.h: void ns3::TestCase::ReportStart() [member function]
+ cls.add_method('ReportStart',
+ 'void',
+ [])
+ ## test.h: void ns3::TestCase::ReportSuccess() [member function]
+ cls.add_method('ReportSuccess',
+ 'void',
+ [])
+ ## test.h: void ns3::TestCase::ReportFailure(std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) [member function]
+ cls.add_method('ReportFailure',
+ 'void',
+ [param('std::string', 'cond'), param('std::string', 'actual'), param('std::string', 'limit'), param('std::string', 'message'), param('std::string', 'file'), param('int32_t', 'line')])
+ ## test.h: void ns3::TestCase::ReportEnd() [member function]
+ cls.add_method('ReportEnd',
+ 'void',
+ [])
+ ## test.h: void ns3::TestCase::DoReportStart() [member function]
+ cls.add_method('DoReportStart',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestCase::DoReportSuccess() [member function]
+ cls.add_method('DoReportSuccess',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestCase::DoReportFailure(std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) [member function]
+ cls.add_method('DoReportFailure',
+ 'void',
+ [param('std::string', 'cond'), param('std::string', 'actual'), param('std::string', 'limit'), param('std::string', 'message'), param('std::string', 'file'), param('int32_t', 'line')],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestCase::DoReportEnd() [member function]
+ cls.add_method('DoReportEnd',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestCase::DoSetup() [member function]
+ cls.add_method('DoSetup',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: bool ns3::TestCase::DoRun() [member function]
+ cls.add_method('DoRun',
+ 'bool',
+ [],
+ is_pure_virtual=True, visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestCase::DoTeardown() [member function]
+ cls.add_method('DoTeardown',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3TestRunner_methods(root_module, cls):
+ ## test.h: ns3::TestRunner::TestRunner() [constructor]
+ cls.add_constructor([])
+ ## test.h: ns3::TestRunner::TestRunner(ns3::TestRunner const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::TestRunner const &', 'arg0')])
+ ## test.h: static uint32_t ns3::TestRunner::AddTestSuite(ns3::TestSuite * testSuite) [member function]
+ cls.add_method('AddTestSuite',
+ 'uint32_t',
+ [param('ns3::TestSuite *', 'testSuite')],
+ is_static=True)
+ ## test.h: static uint32_t ns3::TestRunner::GetNTestSuites() [member function]
+ cls.add_method('GetNTestSuites',
+ 'uint32_t',
+ [],
+ is_static=True)
+ ## test.h: static ns3::TestSuite * ns3::TestRunner::GetTestSuite(uint32_t n) [member function]
+ cls.add_method('GetTestSuite',
+ 'ns3::TestSuite *',
+ [param('uint32_t', 'n')],
+ is_static=True)
+ return
+
+def register_Ns3TestSuite_methods(root_module, cls):
+ ## test.h: ns3::TestSuite::TestSuite(std::string name, ns3::TestSuite::TestType type=::ns3::TestSuite::UNIT) [constructor]
+ cls.add_constructor([param('std::string', 'name'), param('ns3::TestSuite::TestType', 'type', default_value='::ns3::TestSuite::UNIT')])
+ ## test.h: bool ns3::TestSuite::Run() [member function]
+ cls.add_method('Run',
+ 'bool',
+ [])
+ ## test.h: uint32_t ns3::TestSuite::AddTestCase(ns3::TestCase * testCase) [member function]
+ cls.add_method('AddTestCase',
+ 'uint32_t',
+ [param('ns3::TestCase *', 'testCase')])
+ ## test.h: uint32_t ns3::TestSuite::GetNTestCases() [member function]
+ cls.add_method('GetNTestCases',
+ 'uint32_t',
+ [])
+ ## test.h: ns3::TestCase * ns3::TestSuite::GetTestCase(uint32_t i) [member function]
+ cls.add_method('GetTestCase',
+ 'ns3::TestCase *',
+ [param('uint32_t', 'i')])
+ ## test.h: ns3::TestSuite::TestType ns3::TestSuite::GetTestType() [member function]
+ cls.add_method('GetTestType',
+ 'ns3::TestSuite::TestType',
+ [])
+ ## test.h: void ns3::TestSuite::SetVerbose(bool verbose) [member function]
+ cls.add_method('SetVerbose',
+ 'void',
+ [param('bool', 'verbose')])
+ ## test.h: void ns3::TestSuite::SetName(std::string name) [member function]
+ cls.add_method('SetName',
+ 'void',
+ [param('std::string', 'name')])
+ ## test.h: std::string ns3::TestSuite::GetName() [member function]
+ cls.add_method('GetName',
+ 'std::string',
+ [])
+ ## test.h: void ns3::TestSuite::SetBaseDir(std::string basedir) [member function]
+ cls.add_method('SetBaseDir',
+ 'void',
+ [param('std::string', 'basedir')])
+ ## test.h: std::string ns3::TestSuite::GetBaseDir() [member function]
+ cls.add_method('GetBaseDir',
+ 'std::string',
+ [])
+ ## test.h: void ns3::TestSuite::SetStream(std::ofstream * ofs) [member function]
+ cls.add_method('SetStream',
+ 'void',
+ [param('std::ofstream *', 'ofs')])
+ ## test.h: void ns3::TestSuite::ReportStart() [member function]
+ cls.add_method('ReportStart',
+ 'void',
+ [])
+ ## test.h: void ns3::TestSuite::ReportSuccess() [member function]
+ cls.add_method('ReportSuccess',
+ 'void',
+ [])
+ ## test.h: void ns3::TestSuite::ReportFailure() [member function]
+ cls.add_method('ReportFailure',
+ 'void',
+ [])
+ ## test.h: void ns3::TestSuite::ReportEnd() [member function]
+ cls.add_method('ReportEnd',
+ 'void',
+ [])
+ ## test.h: void ns3::TestSuite::DoReportStart() [member function]
+ cls.add_method('DoReportStart',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestSuite::DoReportSuccess() [member function]
+ cls.add_method('DoReportSuccess',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestSuite::DoReportFailure() [member function]
+ cls.add_method('DoReportFailure',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestSuite::DoReportEnd() [member function]
+ cls.add_method('DoReportEnd',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestSuite::DoSetup() [member function]
+ cls.add_method('DoSetup',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: bool ns3::TestSuite::DoRun() [member function]
+ cls.add_method('DoRun',
+ 'bool',
+ [],
+ visibility='protected', is_virtual=True)
+ ## test.h: void ns3::TestSuite::DoTeardown() [member function]
+ cls.add_method('DoTeardown',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_Ns3TraceSourceAccessor_methods(root_module, cls):
## trace-source-accessor.h: ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')])
@@ -2203,7 +2459,7 @@
cls.add_constructor([param('ns3::BooleanValue const &', 'value')])
## traced-value.h: ns3::TracedValue<unsigned int>::TracedValue(ns3::EnumValue const & value) [constructor]
cls.add_constructor([param('ns3::EnumValue const &', 'value')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
cls.add_method('Connect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -2211,7 +2467,7 @@
cls.add_method('ConnectWithoutContext',
'void',
[param('ns3::CallbackBase const &', 'cb')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
cls.add_method('Disconnect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -2369,6 +2625,10 @@
module.add_function('MakeVectorChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## test.h: extern bool ns3::TestDoubleIsEqual(double const a, double const b, double const epsilon=std::numeric_limits<double>::epsilon()) [free function]
+ module.add_function('TestDoubleIsEqual',
+ 'bool',
+ [param('double const', 'a'), param('double const', 'b'), param('double const', 'epsilon', default_value='std::numeric_limits<double>::epsilon()')])
## type-name.h: extern std::string ns3::TypeNameGet() [free function]
module.add_function('TypeNameGet',
'std::string',
@@ -2383,7 +2643,7 @@
module.add_function('TypeNameGet',
'std::string',
[],
- template_parameters=['long long'])
+ template_parameters=['long'])
## type-name.h: extern std::string ns3::TypeNameGet() [free function]
module.add_function('TypeNameGet',
'std::string',
@@ -2403,7 +2663,7 @@
module.add_function('TypeNameGet',
'std::string',
[],
- template_parameters=['unsigned long long'])
+ template_parameters=['unsigned long'])
## type-name.h: extern std::string ns3::TypeNameGet() [free function]
module.add_function('TypeNameGet',
'std::string',
@@ -2422,6 +2682,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -2491,6 +2753,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
## double.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::internal::MakeDoubleChecker(double min, double max, std::string name) [free function]
module.add_function('MakeDoubleChecker',
--- a/bindings/python/ns3_module_csma.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_csma.py Thu Sep 24 10:57:41 2009 -0400
@@ -34,6 +34,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -58,6 +70,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -424,6 +444,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -437,6 +459,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_dot11s.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,782 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
+
+def register_types(module):
+ root_module = module.get_root()
+
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+ ## ie-dot11s-configuration.h: ns3::dot11s::dot11sSynchronizationProtocolIdentifier [enumeration]
+ module.add_enum('dot11sSynchronizationProtocolIdentifier', ['SYNC_NEIGHBOUR_OFFSET', 'SYNC_NULL'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::dot11sCongestionControlMode [enumeration]
+ module.add_enum('dot11sCongestionControlMode', ['CONGESTION_SIGNALING', 'CONGESTION_NULL'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::dot11sAuthenticationProtocol [enumeration]
+ module.add_enum('dot11sAuthenticationProtocol', ['AUTH_NULL', 'AUTH_SAE'])
+ ## ie-dot11s-peer-management.h: ns3::dot11s::PmpReasonCode [enumeration]
+ module.add_enum('PmpReasonCode', ['REASON11S_PEERING_CANCELLED', 'REASON11S_MESH_MAX_PEERS', 'REASON11S_MESH_CAPABILITY_POLICY_VIOLATION', 'REASON11S_MESH_CLOSE_RCVD', 'REASON11S_MESH_MAX_RETRIES', 'REASON11S_MESH_CONFIRM_TIMEOUT', 'REASON11S_MESH_INVALID_GTK', 'REASON11S_MESH_INCONSISTENT_PARAMETERS', 'REASON11S_MESH_INVALID_SECURITY_CAPABILITY', 'REASON11S_RESERVED'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::dot11sPathSelectionMetric [enumeration]
+ module.add_enum('dot11sPathSelectionMetric', ['METRIC_AIRTIME'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::dot11sPathSelectionProtocol [enumeration]
+ module.add_enum('dot11sPathSelectionProtocol', ['PROTOCOL_HWMP'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability [class]
+ module.add_class('Dot11sMeshCapability')
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol [class]
+ module.add_class('HwmpProtocol', parent=root_module['ns3::MeshL2RoutingProtocol'])
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::FailedDestination [struct]
+ module.add_class('FailedDestination', outer_class=root_module['ns3::dot11s::HwmpProtocol'])
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTiming [class]
+ module.add_class('IeBeaconTiming', parent=root_module['ns3::WifiInformationElement'])
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTimingUnit [class]
+ module.add_class('IeBeaconTimingUnit', parent=root_module['ns3::RefCountBase'])
+ ## ie-dot11s-configuration.h: ns3::dot11s::IeConfiguration [class]
+ module.add_class('IeConfiguration', parent=root_module['ns3::WifiInformationElement'])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshId [class]
+ module.add_class('IeMeshId', parent=root_module['ns3::WifiInformationElement'])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdChecker [class]
+ module.add_class('IeMeshIdChecker', parent=root_module['ns3::AttributeChecker'])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdValue [class]
+ module.add_class('IeMeshIdValue', parent=root_module['ns3::AttributeValue'])
+ ## ie-dot11s-peer-management.h: ns3::dot11s::IePeerManagement [class]
+ module.add_class('IePeerManagement', parent=root_module['ns3::WifiInformationElement'])
+ ## ie-dot11s-peer-management.h: ns3::dot11s::IePeerManagement::Subtype [enumeration]
+ module.add_enum('Subtype', ['PEER_OPEN', 'PEER_CONFIRM', 'PEER_CLOSE'], outer_class=root_module['ns3::dot11s::IePeerManagement'])
+ ## peer-link.h: ns3::dot11s::PeerLink [class]
+ module.add_class('PeerLink', parent=root_module['ns3::Object'])
+ ## peer-link.h: ns3::dot11s::PeerLink::PeerState [enumeration]
+ module.add_enum('PeerState', ['IDLE', 'OPN_SNT', 'CNF_RCVD', 'OPN_RCVD', 'ESTAB', 'HOLDING'], outer_class=root_module['ns3::dot11s::PeerLink'])
+ ## peer-management-protocol.h: ns3::dot11s::PeerManagementProtocol [class]
+ module.add_class('PeerManagementProtocol', parent=root_module['ns3::Object'])
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3Dot11sDot11sMeshCapability_methods(root_module, root_module['ns3::dot11s::Dot11sMeshCapability'])
+ register_Ns3Dot11sHwmpProtocol_methods(root_module, root_module['ns3::dot11s::HwmpProtocol'])
+ register_Ns3Dot11sHwmpProtocolFailedDestination_methods(root_module, root_module['ns3::dot11s::HwmpProtocol::FailedDestination'])
+ register_Ns3Dot11sIeBeaconTiming_methods(root_module, root_module['ns3::dot11s::IeBeaconTiming'])
+ register_Ns3Dot11sIeBeaconTimingUnit_methods(root_module, root_module['ns3::dot11s::IeBeaconTimingUnit'])
+ register_Ns3Dot11sIeConfiguration_methods(root_module, root_module['ns3::dot11s::IeConfiguration'])
+ register_Ns3Dot11sIeMeshId_methods(root_module, root_module['ns3::dot11s::IeMeshId'])
+ register_Ns3Dot11sIeMeshIdChecker_methods(root_module, root_module['ns3::dot11s::IeMeshIdChecker'])
+ register_Ns3Dot11sIeMeshIdValue_methods(root_module, root_module['ns3::dot11s::IeMeshIdValue'])
+ register_Ns3Dot11sIePeerManagement_methods(root_module, root_module['ns3::dot11s::IePeerManagement'])
+ register_Ns3Dot11sPeerLink_methods(root_module, root_module['ns3::dot11s::PeerLink'])
+ register_Ns3Dot11sPeerManagementProtocol_methods(root_module, root_module['ns3::dot11s::PeerManagementProtocol'])
+ return
+
+def register_Ns3Dot11sDot11sMeshCapability_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::Dot11sMeshCapability(ns3::dot11s::Dot11sMeshCapability const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::Dot11sMeshCapability const &', 'arg0')])
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::Dot11sMeshCapability() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-configuration.h: ns3::Buffer::Iterator ns3::dot11s::Dot11sMeshCapability::Deserialize(ns3::Buffer::Iterator i) [member function]
+ cls.add_method('Deserialize',
+ 'ns3::Buffer::Iterator',
+ [param('ns3::Buffer::Iterator', 'i')])
+ ## ie-dot11s-configuration.h: uint8_t ns3::dot11s::Dot11sMeshCapability::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-configuration.h: uint16_t ns3::dot11s::Dot11sMeshCapability::GetUint16() const [member function]
+ cls.add_method('GetUint16',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-configuration.h: bool ns3::dot11s::Dot11sMeshCapability::Is(uint16_t cap, uint8_t n) const [member function]
+ cls.add_method('Is',
+ 'bool',
+ [param('uint16_t', 'cap'), param('uint8_t', 'n')],
+ is_const=True)
+ ## ie-dot11s-configuration.h: ns3::Buffer::Iterator ns3::dot11s::Dot11sMeshCapability::Serialize(ns3::Buffer::Iterator i) const [member function]
+ cls.add_method('Serialize',
+ 'ns3::Buffer::Iterator',
+ [param('ns3::Buffer::Iterator', 'i')],
+ is_const=True)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::MCCAEnabled [variable]
+ cls.add_instance_attribute('MCCAEnabled', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::MCCASupported [variable]
+ cls.add_instance_attribute('MCCASupported', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::TBTTAdjustment [variable]
+ cls.add_instance_attribute('TBTTAdjustment', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::acceptPeerLinks [variable]
+ cls.add_instance_attribute('acceptPeerLinks', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::beaconTimingReport [variable]
+ cls.add_instance_attribute('beaconTimingReport', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::forwarding [variable]
+ cls.add_instance_attribute('forwarding', 'bool', is_const=False)
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability::powerSaveLevel [variable]
+ cls.add_instance_attribute('powerSaveLevel', 'bool', is_const=False)
+ return
+
+def register_Ns3Dot11sHwmpProtocol_methods(root_module, cls):
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::HwmpProtocol() [constructor]
+ cls.add_constructor([])
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## hwmp-protocol.h: static ns3::TypeId ns3::dot11s::HwmpProtocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## hwmp-protocol.h: bool ns3::dot11s::HwmpProtocol::Install(ns3::Ptr<ns3::MeshPointDevice> arg0) [member function]
+ cls.add_method('Install',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'arg0')])
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::PeerLinkStatus(ns3::Mac48Address meshPontAddress, ns3::Mac48Address peerAddress, uint32_t interface, bool status) [member function]
+ cls.add_method('PeerLinkStatus',
+ 'void',
+ [param('ns3::Mac48Address', 'meshPontAddress'), param('ns3::Mac48Address', 'peerAddress'), param('uint32_t', 'interface'), param('bool', 'status')])
+ ## hwmp-protocol.h: bool ns3::dot11s::HwmpProtocol::RemoveRoutingStuff(uint32_t fromIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet> packet, uint16_t & protocolType) [member function]
+ cls.add_method('RemoveRoutingStuff',
+ 'bool',
+ [param('uint32_t', 'fromIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t &', 'protocolType')],
+ is_virtual=True)
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::Report(std::ostream & arg0) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'arg0')],
+ is_const=True)
+ ## hwmp-protocol.h: bool ns3::dot11s::HwmpProtocol::RequestRoute(uint32_t sourceIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet const> packet, uint16_t protocolType, ns3::Callback<void, bool, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty> routeReply) [member function]
+ cls.add_method('RequestRoute',
+ 'bool',
+ [param('uint32_t', 'sourceIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocolType'), param('ns3::Callback< void, bool, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ is_virtual=True)
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::ResetStats() [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [])
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::SetNeighboursCallback(ns3::Callback<std::vector<ns3::Mac48Address, std::allocator<ns3::Mac48Address> >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetNeighboursCallback',
+ 'void',
+ [param('ns3::Callback< std::vector< ns3::Mac48Address >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')])
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::SetRoot() [member function]
+ cls.add_method('SetRoot',
+ 'void',
+ [])
+ ## hwmp-protocol.h: void ns3::dot11s::HwmpProtocol::UnsetRoot() [member function]
+ cls.add_method('UnsetRoot',
+ 'void',
+ [])
+ return
+
+def register_Ns3Dot11sHwmpProtocolFailedDestination_methods(root_module, cls):
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::FailedDestination::FailedDestination() [constructor]
+ cls.add_constructor([])
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::FailedDestination::FailedDestination(ns3::dot11s::HwmpProtocol::FailedDestination const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::HwmpProtocol::FailedDestination const &', 'arg0')])
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::FailedDestination::destination [variable]
+ cls.add_instance_attribute('destination', 'ns3::Mac48Address', is_const=False)
+ ## hwmp-protocol.h: ns3::dot11s::HwmpProtocol::FailedDestination::seqnum [variable]
+ cls.add_instance_attribute('seqnum', 'uint32_t', is_const=False)
+ return
+
+def register_Ns3Dot11sIeBeaconTiming_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTiming::IeBeaconTiming(ns3::dot11s::IeBeaconTiming const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeBeaconTiming const &', 'arg0')])
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTiming::IeBeaconTiming() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTiming::AddNeighboursTimingElementUnit(uint16_t aid, ns3::Time last_beacon, ns3::Time beacon_interval) [member function]
+ cls.add_method('AddNeighboursTimingElementUnit',
+ 'void',
+ [param('uint16_t', 'aid'), param('ns3::Time', 'last_beacon'), param('ns3::Time', 'beacon_interval')])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTiming::ClearTimingElement() [member function]
+ cls.add_method('ClearTimingElement',
+ 'void',
+ [])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTiming::DelNeighboursTimingElementUnit(uint16_t aid, ns3::Time last_beacon, ns3::Time beacon_interval) [member function]
+ cls.add_method('DelNeighboursTimingElementUnit',
+ 'void',
+ [param('uint16_t', 'aid'), param('ns3::Time', 'last_beacon'), param('ns3::Time', 'beacon_interval')])
+ ## ie-dot11s-beacon-timing.h: uint8_t ns3::dot11s::IeBeaconTiming::DeserializeInformation(ns3::Buffer::Iterator i, uint8_t length) [member function]
+ cls.add_method('DeserializeInformation',
+ 'uint8_t',
+ [param('ns3::Buffer::Iterator', 'i'), param('uint8_t', 'length')],
+ is_virtual=True)
+ ## ie-dot11s-beacon-timing.h: ns3::WifiElementId ns3::dot11s::IeBeaconTiming::ElementId() const [member function]
+ cls.add_method('ElementId',
+ 'ns3::WifiElementId',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-beacon-timing.h: uint8_t ns3::dot11s::IeBeaconTiming::GetInformationSize() const [member function]
+ cls.add_method('GetInformationSize',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-beacon-timing.h: std::vector<ns3::Ptr<ns3::dot11s::IeBeaconTimingUnit>, std::allocator<ns3::Ptr<ns3::dot11s::IeBeaconTimingUnit> > > ns3::dot11s::IeBeaconTiming::GetNeighboursTimingElementsList() [member function]
+ cls.add_method('GetNeighboursTimingElementsList',
+ 'std::vector< ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit > >',
+ [])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTiming::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTiming::SerializeInformation(ns3::Buffer::Iterator i) const [member function]
+ cls.add_method('SerializeInformation',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'i')],
+ is_const=True, is_virtual=True)
+ return
+
+def register_Ns3Dot11sIeBeaconTimingUnit_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTimingUnit::IeBeaconTimingUnit(ns3::dot11s::IeBeaconTimingUnit const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeBeaconTimingUnit const &', 'arg0')])
+ ## ie-dot11s-beacon-timing.h: ns3::dot11s::IeBeaconTimingUnit::IeBeaconTimingUnit() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-beacon-timing.h: uint8_t ns3::dot11s::IeBeaconTimingUnit::GetAid() const [member function]
+ cls.add_method('GetAid',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-beacon-timing.h: uint16_t ns3::dot11s::IeBeaconTimingUnit::GetBeaconInterval() const [member function]
+ cls.add_method('GetBeaconInterval',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-beacon-timing.h: uint16_t ns3::dot11s::IeBeaconTimingUnit::GetLastBeacon() const [member function]
+ cls.add_method('GetLastBeacon',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTimingUnit::SetAid(uint8_t aid) [member function]
+ cls.add_method('SetAid',
+ 'void',
+ [param('uint8_t', 'aid')])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTimingUnit::SetBeaconInterval(uint16_t beaconInterval) [member function]
+ cls.add_method('SetBeaconInterval',
+ 'void',
+ [param('uint16_t', 'beaconInterval')])
+ ## ie-dot11s-beacon-timing.h: void ns3::dot11s::IeBeaconTimingUnit::SetLastBeacon(uint16_t lastBeacon) [member function]
+ cls.add_method('SetLastBeacon',
+ 'void',
+ [param('uint16_t', 'lastBeacon')])
+ return
+
+def register_Ns3Dot11sIeConfiguration_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ cls.add_binary_comparison_operator('==')
+ ## ie-dot11s-configuration.h: ns3::dot11s::IeConfiguration::IeConfiguration(ns3::dot11s::IeConfiguration const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeConfiguration const &', 'arg0')])
+ ## ie-dot11s-configuration.h: ns3::dot11s::IeConfiguration::IeConfiguration() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-configuration.h: uint8_t ns3::dot11s::IeConfiguration::DeserializeInformation(ns3::Buffer::Iterator i, uint8_t length) [member function]
+ cls.add_method('DeserializeInformation',
+ 'uint8_t',
+ [param('ns3::Buffer::Iterator', 'i'), param('uint8_t', 'length')],
+ is_virtual=True)
+ ## ie-dot11s-configuration.h: ns3::WifiElementId ns3::dot11s::IeConfiguration::ElementId() const [member function]
+ cls.add_method('ElementId',
+ 'ns3::WifiElementId',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-configuration.h: uint8_t ns3::dot11s::IeConfiguration::GetInformationSize() const [member function]
+ cls.add_method('GetInformationSize',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-configuration.h: uint8_t ns3::dot11s::IeConfiguration::GetNeighborCount() [member function]
+ cls.add_method('GetNeighborCount',
+ 'uint8_t',
+ [])
+ ## ie-dot11s-configuration.h: bool ns3::dot11s::IeConfiguration::IsAirtime() [member function]
+ cls.add_method('IsAirtime',
+ 'bool',
+ [])
+ ## ie-dot11s-configuration.h: bool ns3::dot11s::IeConfiguration::IsHWMP() [member function]
+ cls.add_method('IsHWMP',
+ 'bool',
+ [])
+ ## ie-dot11s-configuration.h: ns3::dot11s::Dot11sMeshCapability const & ns3::dot11s::IeConfiguration::MeshCapability() [member function]
+ cls.add_method('MeshCapability',
+ 'ns3::dot11s::Dot11sMeshCapability const &',
+ [])
+ ## ie-dot11s-configuration.h: void ns3::dot11s::IeConfiguration::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-configuration.h: void ns3::dot11s::IeConfiguration::SerializeInformation(ns3::Buffer::Iterator i) const [member function]
+ cls.add_method('SerializeInformation',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'i')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-configuration.h: void ns3::dot11s::IeConfiguration::SetMetric(ns3::dot11s::dot11sPathSelectionMetric metricId) [member function]
+ cls.add_method('SetMetric',
+ 'void',
+ [param('ns3::dot11s::dot11sPathSelectionMetric', 'metricId')])
+ ## ie-dot11s-configuration.h: void ns3::dot11s::IeConfiguration::SetNeighborCount(uint8_t neighbors) [member function]
+ cls.add_method('SetNeighborCount',
+ 'void',
+ [param('uint8_t', 'neighbors')])
+ ## ie-dot11s-configuration.h: void ns3::dot11s::IeConfiguration::SetRouting(ns3::dot11s::dot11sPathSelectionProtocol routingId) [member function]
+ cls.add_method('SetRouting',
+ 'void',
+ [param('ns3::dot11s::dot11sPathSelectionProtocol', 'routingId')])
+ return
+
+def register_Ns3Dot11sIeMeshId_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ cls.add_binary_comparison_operator('==')
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshId::IeMeshId(ns3::dot11s::IeMeshId const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeMeshId const &', 'arg0')])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshId::IeMeshId() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshId::IeMeshId(std::string s) [constructor]
+ cls.add_constructor([param('std::string', 's')])
+ ## ie-dot11s-id.h: uint8_t ns3::dot11s::IeMeshId::DeserializeInformation(ns3::Buffer::Iterator start, uint8_t length) [member function]
+ cls.add_method('DeserializeInformation',
+ 'uint8_t',
+ [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')],
+ is_virtual=True)
+ ## ie-dot11s-id.h: ns3::WifiElementId ns3::dot11s::IeMeshId::ElementId() const [member function]
+ cls.add_method('ElementId',
+ 'ns3::WifiElementId',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-id.h: uint8_t ns3::dot11s::IeMeshId::GetInformationSize() const [member function]
+ cls.add_method('GetInformationSize',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-id.h: bool ns3::dot11s::IeMeshId::IsBroadcast() const [member function]
+ cls.add_method('IsBroadcast',
+ 'bool',
+ [],
+ is_const=True)
+ ## ie-dot11s-id.h: bool ns3::dot11s::IeMeshId::IsEqual(ns3::dot11s::IeMeshId const & o) const [member function]
+ cls.add_method('IsEqual',
+ 'bool',
+ [param('ns3::dot11s::IeMeshId const &', 'o')],
+ is_const=True)
+ ## ie-dot11s-id.h: char * ns3::dot11s::IeMeshId::PeekString() const [member function]
+ cls.add_method('PeekString',
+ 'char *',
+ [],
+ is_const=True)
+ ## ie-dot11s-id.h: void ns3::dot11s::IeMeshId::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-id.h: void ns3::dot11s::IeMeshId::SerializeInformation(ns3::Buffer::Iterator i) const [member function]
+ cls.add_method('SerializeInformation',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'i')],
+ is_const=True, is_virtual=True)
+ return
+
+def register_Ns3Dot11sIeMeshIdChecker_methods(root_module, cls):
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdChecker::IeMeshIdChecker() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdChecker::IeMeshIdChecker(ns3::dot11s::IeMeshIdChecker const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeMeshIdChecker const &', 'arg0')])
+ return
+
+def register_Ns3Dot11sIeMeshIdValue_methods(root_module, cls):
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdValue::IeMeshIdValue() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdValue::IeMeshIdValue(ns3::dot11s::IeMeshIdValue const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IeMeshIdValue const &', 'arg0')])
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshIdValue::IeMeshIdValue(ns3::dot11s::IeMeshId const & value) [constructor]
+ cls.add_constructor([param('ns3::dot11s::IeMeshId const &', 'value')])
+ ## ie-dot11s-id.h: ns3::Ptr<ns3::AttributeValue> ns3::dot11s::IeMeshIdValue::Copy() const [member function]
+ cls.add_method('Copy',
+ 'ns3::Ptr< ns3::AttributeValue >',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-id.h: bool ns3::dot11s::IeMeshIdValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
+ cls.add_method('DeserializeFromString',
+ 'bool',
+ [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
+ is_virtual=True)
+ ## ie-dot11s-id.h: ns3::dot11s::IeMeshId ns3::dot11s::IeMeshIdValue::Get() const [member function]
+ cls.add_method('Get',
+ 'ns3::dot11s::IeMeshId',
+ [],
+ is_const=True)
+ ## ie-dot11s-id.h: std::string ns3::dot11s::IeMeshIdValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
+ cls.add_method('SerializeToString',
+ 'std::string',
+ [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-id.h: void ns3::dot11s::IeMeshIdValue::Set(ns3::dot11s::IeMeshId const & value) [member function]
+ cls.add_method('Set',
+ 'void',
+ [param('ns3::dot11s::IeMeshId const &', 'value')])
+ return
+
+def register_Ns3Dot11sIePeerManagement_methods(root_module, cls):
+ cls.add_output_stream_operator()
+ cls.add_binary_comparison_operator('==')
+ ## ie-dot11s-peer-management.h: ns3::dot11s::IePeerManagement::IePeerManagement(ns3::dot11s::IePeerManagement const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::dot11s::IePeerManagement const &', 'arg0')])
+ ## ie-dot11s-peer-management.h: ns3::dot11s::IePeerManagement::IePeerManagement() [constructor]
+ cls.add_constructor([])
+ ## ie-dot11s-peer-management.h: uint8_t ns3::dot11s::IePeerManagement::DeserializeInformation(ns3::Buffer::Iterator i, uint8_t length) [member function]
+ cls.add_method('DeserializeInformation',
+ 'uint8_t',
+ [param('ns3::Buffer::Iterator', 'i'), param('uint8_t', 'length')],
+ is_virtual=True)
+ ## ie-dot11s-peer-management.h: ns3::WifiElementId ns3::dot11s::IePeerManagement::ElementId() const [member function]
+ cls.add_method('ElementId',
+ 'ns3::WifiElementId',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-peer-management.h: uint8_t ns3::dot11s::IePeerManagement::GetInformationSize() const [member function]
+ cls.add_method('GetInformationSize',
+ 'uint8_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-peer-management.h: uint16_t ns3::dot11s::IePeerManagement::GetLocalLinkId() const [member function]
+ cls.add_method('GetLocalLinkId',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: uint16_t ns3::dot11s::IePeerManagement::GetPeerLinkId() const [member function]
+ cls.add_method('GetPeerLinkId',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: ns3::dot11s::PmpReasonCode ns3::dot11s::IePeerManagement::GetReasonCode() const [member function]
+ cls.add_method('GetReasonCode',
+ 'ns3::dot11s::PmpReasonCode',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: uint8_t ns3::dot11s::IePeerManagement::GetSubtype() const [member function]
+ cls.add_method('GetSubtype',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: void ns3::dot11s::IePeerManagement::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-peer-management.h: void ns3::dot11s::IePeerManagement::SerializeInformation(ns3::Buffer::Iterator i) const [member function]
+ cls.add_method('SerializeInformation',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'i')],
+ is_const=True, is_virtual=True)
+ ## ie-dot11s-peer-management.h: void ns3::dot11s::IePeerManagement::SetPeerClose(uint16_t localLinkID, uint16_t peerLinkId, ns3::dot11s::PmpReasonCode reasonCode) [member function]
+ cls.add_method('SetPeerClose',
+ 'void',
+ [param('uint16_t', 'localLinkID'), param('uint16_t', 'peerLinkId'), param('ns3::dot11s::PmpReasonCode', 'reasonCode')])
+ ## ie-dot11s-peer-management.h: void ns3::dot11s::IePeerManagement::SetPeerConfirm(uint16_t localLinkID, uint16_t peerLinkId) [member function]
+ cls.add_method('SetPeerConfirm',
+ 'void',
+ [param('uint16_t', 'localLinkID'), param('uint16_t', 'peerLinkId')])
+ ## ie-dot11s-peer-management.h: void ns3::dot11s::IePeerManagement::SetPeerOpen(uint16_t localLinkId) [member function]
+ cls.add_method('SetPeerOpen',
+ 'void',
+ [param('uint16_t', 'localLinkId')])
+ ## ie-dot11s-peer-management.h: bool ns3::dot11s::IePeerManagement::SubtypeIsClose() const [member function]
+ cls.add_method('SubtypeIsClose',
+ 'bool',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: bool ns3::dot11s::IePeerManagement::SubtypeIsConfirm() const [member function]
+ cls.add_method('SubtypeIsConfirm',
+ 'bool',
+ [],
+ is_const=True)
+ ## ie-dot11s-peer-management.h: bool ns3::dot11s::IePeerManagement::SubtypeIsOpen() const [member function]
+ cls.add_method('SubtypeIsOpen',
+ 'bool',
+ [],
+ is_const=True)
+ return
+
+def register_Ns3Dot11sPeerLink_methods(root_module, cls):
+ ## peer-link.h: static ns3::TypeId ns3::dot11s::PeerLink::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## peer-link.h: ns3::dot11s::PeerLink::PeerLink() [constructor]
+ cls.add_constructor([])
+ ## peer-link.h: void ns3::dot11s::PeerLink::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetBeaconInformation(ns3::Time lastBeacon, ns3::Time BeaconInterval) [member function]
+ cls.add_method('SetBeaconInformation',
+ 'void',
+ [param('ns3::Time', 'lastBeacon'), param('ns3::Time', 'BeaconInterval')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetLinkStatusCallback(ns3::Callback<void,unsigned int,ns3::Mac48Address,bool,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> cb) [member function]
+ cls.add_method('SetLinkStatusCallback',
+ 'void',
+ [param('ns3::Callback< void, unsigned int, ns3::Mac48Address, bool, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetPeerAddress(ns3::Mac48Address macaddr) [member function]
+ cls.add_method('SetPeerAddress',
+ 'void',
+ [param('ns3::Mac48Address', 'macaddr')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetPeerMeshPointAddress(ns3::Mac48Address macaddr) [member function]
+ cls.add_method('SetPeerMeshPointAddress',
+ 'void',
+ [param('ns3::Mac48Address', 'macaddr')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetInterface(uint32_t interface) [member function]
+ cls.add_method('SetInterface',
+ 'void',
+ [param('uint32_t', 'interface')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetLocalLinkId(uint16_t id) [member function]
+ cls.add_method('SetLocalLinkId',
+ 'void',
+ [param('uint16_t', 'id')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetLocalAid(uint16_t aid) [member function]
+ cls.add_method('SetLocalAid',
+ 'void',
+ [param('uint16_t', 'aid')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::SetBeaconTimingElement(ns3::dot11s::IeBeaconTiming beaconTiming) [member function]
+ cls.add_method('SetBeaconTimingElement',
+ 'void',
+ [param('ns3::dot11s::IeBeaconTiming', 'beaconTiming')])
+ ## peer-link.h: ns3::Mac48Address ns3::dot11s::PeerLink::GetPeerAddress() const [member function]
+ cls.add_method('GetPeerAddress',
+ 'ns3::Mac48Address',
+ [],
+ is_const=True)
+ ## peer-link.h: uint16_t ns3::dot11s::PeerLink::GetLocalAid() const [member function]
+ cls.add_method('GetLocalAid',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## peer-link.h: ns3::Time ns3::dot11s::PeerLink::GetLastBeacon() const [member function]
+ cls.add_method('GetLastBeacon',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## peer-link.h: ns3::Time ns3::dot11s::PeerLink::GetBeaconInterval() const [member function]
+ cls.add_method('GetBeaconInterval',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## peer-link.h: ns3::dot11s::IeBeaconTiming ns3::dot11s::PeerLink::GetBeaconTimingElement() const [member function]
+ cls.add_method('GetBeaconTimingElement',
+ 'ns3::dot11s::IeBeaconTiming',
+ [],
+ is_const=True)
+ ## peer-link.h: void ns3::dot11s::PeerLink::MLMECancelPeerLink(ns3::dot11s::PmpReasonCode reason) [member function]
+ cls.add_method('MLMECancelPeerLink',
+ 'void',
+ [param('ns3::dot11s::PmpReasonCode', 'reason')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::MLMEActivePeerLinkOpen() [member function]
+ cls.add_method('MLMEActivePeerLinkOpen',
+ 'void',
+ [])
+ ## peer-link.h: void ns3::dot11s::PeerLink::MLMEPeeringRequestReject() [member function]
+ cls.add_method('MLMEPeeringRequestReject',
+ 'void',
+ [])
+ ## peer-link.h: void ns3::dot11s::PeerLink::MLMESetSignalStatusCallback(ns3::Callback<void, unsigned int, ns3::Mac48Address, ns3::Mac48Address, ns3::dot11s::PeerLink::PeerState, ns3::dot11s::PeerLink::PeerState, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function]
+ cls.add_method('MLMESetSignalStatusCallback',
+ 'void',
+ [param('ns3::Callback< void, unsigned int, ns3::Mac48Address, ns3::Mac48Address, ns3::dot11s::PeerLink::PeerState, ns3::dot11s::PeerLink::PeerState, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arg0')])
+ ## peer-link.h: void ns3::dot11s::PeerLink::TransmissionSuccess() [member function]
+ cls.add_method('TransmissionSuccess',
+ 'void',
+ [])
+ ## peer-link.h: void ns3::dot11s::PeerLink::TransmissionFailure() [member function]
+ cls.add_method('TransmissionFailure',
+ 'void',
+ [])
+ ## peer-link.h: void ns3::dot11s::PeerLink::Report(std::ostream & os) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ return
+
+def register_Ns3Dot11sPeerManagementProtocol_methods(root_module, cls):
+ ## peer-management-protocol.h: ns3::dot11s::PeerManagementProtocol::PeerManagementProtocol() [constructor]
+ cls.add_constructor([])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ConfigurationMismatch(uint32_t interface, ns3::Mac48Address peerAddress) [member function]
+ cls.add_method('ConfigurationMismatch',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## peer-management-protocol.h: ns3::Ptr<ns3::dot11s::PeerLink> ns3::dot11s::PeerManagementProtocol::FindPeerLink(uint32_t interface, ns3::Mac48Address peerAddress) [member function]
+ cls.add_method('FindPeerLink',
+ 'ns3::Ptr< ns3::dot11s::PeerLink >',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
+ ## peer-management-protocol.h: std::vector<ns3::Mac48Address,std::allocator<ns3::Mac48Address> > ns3::dot11s::PeerManagementProtocol::GetActiveLinks(uint32_t interface) [member function]
+ cls.add_method('GetActiveLinks',
+ 'std::vector< ns3::Mac48Address >',
+ [param('uint32_t', 'interface')])
+ ## peer-management-protocol.h: ns3::Mac48Address ns3::dot11s::PeerManagementProtocol::GetAddress() [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Mac48Address',
+ [])
+ ## peer-management-protocol.h: ns3::Ptr<ns3::dot11s::IeBeaconTiming> ns3::dot11s::PeerManagementProtocol::GetBeaconTimingElement(uint32_t interface) [member function]
+ cls.add_method('GetBeaconTimingElement',
+ 'ns3::Ptr< ns3::dot11s::IeBeaconTiming >',
+ [param('uint32_t', 'interface')])
+ ## peer-management-protocol.h: ns3::Ptr<ns3::dot11s::IeMeshId> ns3::dot11s::PeerManagementProtocol::GetMeshId() const [member function]
+ cls.add_method('GetMeshId',
+ 'ns3::Ptr< ns3::dot11s::IeMeshId >',
+ [],
+ is_const=True)
+ ## peer-management-protocol.h: uint8_t ns3::dot11s::PeerManagementProtocol::GetNumberOfLinks() [member function]
+ cls.add_method('GetNumberOfLinks',
+ 'uint8_t',
+ [])
+ ## peer-management-protocol.h: static ns3::TypeId ns3::dot11s::PeerManagementProtocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## peer-management-protocol.h: bool ns3::dot11s::PeerManagementProtocol::Install(ns3::Ptr<ns3::MeshPointDevice> arg0) [member function]
+ cls.add_method('Install',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'arg0')])
+ ## peer-management-protocol.h: bool ns3::dot11s::PeerManagementProtocol::IsActiveLink(uint32_t interface, ns3::Mac48Address peerAddress) [member function]
+ cls.add_method('IsActiveLink',
+ 'bool',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ReceivePeerLinkFrame(uint32_t interface, ns3::Mac48Address peerAddress, ns3::Mac48Address peerMeshPointAddress, uint16_t aid, ns3::dot11s::IePeerManagement peerManagementElement, ns3::dot11s::IeConfiguration meshConfig) [member function]
+ cls.add_method('ReceivePeerLinkFrame',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Mac48Address', 'peerMeshPointAddress'), param('uint16_t', 'aid'), param('ns3::dot11s::IePeerManagement', 'peerManagementElement'), param('ns3::dot11s::IeConfiguration', 'meshConfig')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::Report(std::ostream & arg0) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'arg0')],
+ is_const=True)
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ResetStats() [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetMeshId(std::string s) [member function]
+ cls.add_method('SetMeshId',
+ 'void',
+ [param('std::string', 's')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetPeerLinkStatusCallback(ns3::Callback<void, ns3::Mac48Address, ns3::Mac48Address, unsigned int, bool, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetPeerLinkStatusCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::Mac48Address, ns3::Mac48Address, unsigned int, bool, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::TransmissionFailure(uint32_t interface, ns3::Mac48Address const peerAddress) [member function]
+ cls.add_method('TransmissionFailure',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address const', 'peerAddress')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::TransmissionSuccess(uint32_t interface, ns3::Mac48Address const peerAddress) [member function]
+ cls.add_method('TransmissionSuccess',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Mac48Address const', 'peerAddress')])
+ ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::UpdatePeerBeaconTiming(uint32_t interface, bool meshBeacon, ns3::dot11s::IeBeaconTiming timingElement, ns3::Mac48Address peerAddress, ns3::Time receivingTime, ns3::Time beaconInterval) [member function]
+ cls.add_method('UpdatePeerBeaconTiming',
+ 'void',
+ [param('uint32_t', 'interface'), param('bool', 'meshBeacon'), param('ns3::dot11s::IeBeaconTiming', 'timingElement'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Time', 'receivingTime'), param('ns3::Time', 'beaconInterval')])
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
+def register_functions_ns3_dot11s(module, root_module):
+ ## ie-dot11s-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::dot11s::MakeIeMeshIdChecker() [free function]
+ module.add_function('MakeIeMeshIdChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_emu.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_emu.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -218,6 +238,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -231,6 +253,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_flame.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,200 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
+
+def register_types(module):
+ root_module = module.get_root()
+
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+ ## flame-protocol.h: ns3::flame::FlameProtocol [class]
+ module.add_class('FlameProtocol', parent=root_module['ns3::MeshL2RoutingProtocol'])
+ ## flame-protocol.h: ns3::flame::FlameTag [class]
+ module.add_class('FlameTag', parent=root_module['ns3::Tag'])
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3FlameFlameProtocol_methods(root_module, root_module['ns3::flame::FlameProtocol'])
+ register_Ns3FlameFlameTag_methods(root_module, root_module['ns3::flame::FlameTag'])
+ return
+
+def register_Ns3FlameFlameProtocol_methods(root_module, cls):
+ ## flame-protocol.h: ns3::flame::FlameProtocol::FlameProtocol() [constructor]
+ cls.add_constructor([])
+ ## flame-protocol.h: void ns3::flame::FlameProtocol::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## flame-protocol.h: ns3::Mac48Address ns3::flame::FlameProtocol::GetAddress() [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Mac48Address',
+ [])
+ ## flame-protocol.h: static ns3::TypeId ns3::flame::FlameProtocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## flame-protocol.h: bool ns3::flame::FlameProtocol::Install(ns3::Ptr<ns3::MeshPointDevice> arg0) [member function]
+ cls.add_method('Install',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'arg0')])
+ ## flame-protocol.h: bool ns3::flame::FlameProtocol::RemoveRoutingStuff(uint32_t fromIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet> packet, uint16_t & protocolType) [member function]
+ cls.add_method('RemoveRoutingStuff',
+ 'bool',
+ [param('uint32_t', 'fromIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t &', 'protocolType')],
+ is_virtual=True)
+ ## flame-protocol.h: void ns3::flame::FlameProtocol::Report(std::ostream & arg0) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'arg0')],
+ is_const=True)
+ ## flame-protocol.h: bool ns3::flame::FlameProtocol::RequestRoute(uint32_t sourceIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet const> packet, uint16_t protocolType, ns3::Callback<void, bool, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty> routeReply) [member function]
+ cls.add_method('RequestRoute',
+ 'bool',
+ [param('uint32_t', 'sourceIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocolType'), param('ns3::Callback< void, bool, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ is_virtual=True)
+ ## flame-protocol.h: void ns3::flame::FlameProtocol::ResetStats() [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [])
+ return
+
+def register_Ns3FlameFlameTag_methods(root_module, cls):
+ ## flame-protocol.h: ns3::flame::FlameTag::FlameTag(ns3::flame::FlameTag const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::flame::FlameTag const &', 'arg0')])
+ ## flame-protocol.h: ns3::flame::FlameTag::FlameTag(ns3::Mac48Address a=ns3::Mac48Address()) [constructor]
+ cls.add_constructor([param('ns3::Mac48Address', 'a', default_value='ns3::Mac48Address()')])
+ ## flame-protocol.h: void ns3::flame::FlameTag::Deserialize(ns3::TagBuffer i) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_virtual=True)
+ ## flame-protocol.h: ns3::TypeId ns3::flame::FlameTag::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## flame-protocol.h: uint32_t ns3::flame::FlameTag::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## flame-protocol.h: static ns3::TypeId ns3::flame::FlameTag::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## flame-protocol.h: void ns3::flame::FlameTag::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## flame-protocol.h: void ns3::flame::FlameTag::Serialize(ns3::TagBuffer i) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::TagBuffer', 'i')],
+ is_const=True, is_virtual=True)
+ ## flame-protocol.h: ns3::flame::FlameTag::receiver [variable]
+ cls.add_instance_attribute('receiver', 'ns3::Mac48Address', is_const=False)
+ ## flame-protocol.h: ns3::flame::FlameTag::transmitter [variable]
+ cls.add_instance_attribute('transmitter', 'ns3::Mac48Address', is_const=False)
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_flow_monitor.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,434 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
+
+def register_types(module):
+ root_module = module.get_root()
+
+ ## histogram.h: ns3::Histogram [class]
+ module.add_class('Histogram')
+ ## flow-classifier.h: ns3::FlowClassifier [class]
+ module.add_class('FlowClassifier', parent=root_module['ns3::RefCountBase'])
+ ## flow-probe.h: ns3::FlowProbe [class]
+ module.add_class('FlowProbe', parent=root_module['ns3::RefCountBase'])
+ ## flow-probe.h: ns3::FlowProbe::FlowStats [struct]
+ module.add_class('FlowStats', outer_class=root_module['ns3::FlowProbe'])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier [class]
+ module.add_class('Ipv4FlowClassifier', parent=root_module['ns3::FlowClassifier'])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple [struct]
+ module.add_class('FiveTuple', outer_class=root_module['ns3::Ipv4FlowClassifier'])
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe [class]
+ module.add_class('Ipv4FlowProbe', parent=root_module['ns3::FlowProbe'])
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::DropReason [enumeration]
+ module.add_enum('DropReason', ['DROP_NO_ROUTE', 'DROP_TTL_EXPIRE', 'DROP_BAD_CHECKSUM', 'DROP_INVALID_REASON'], outer_class=root_module['ns3::Ipv4FlowProbe'])
+ ## flow-monitor.h: ns3::FlowMonitor [class]
+ module.add_class('FlowMonitor', parent=root_module['ns3::Object'])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats [struct]
+ module.add_class('FlowStats', outer_class=root_module['ns3::FlowMonitor'])
+ module.add_container('std::map< unsigned int, ns3::FlowProbe::FlowStats >', ('unsigned int', 'ns3::FlowProbe::FlowStats'), container_type='map')
+ module.add_container('std::map< unsigned int, ns3::FlowMonitor::FlowStats >', ('unsigned int', 'ns3::FlowMonitor::FlowStats'), container_type='map')
+ typehandlers.add_type_alias('uint32_t', 'ns3::FlowPacketId')
+ typehandlers.add_type_alias('uint32_t*', 'ns3::FlowPacketId*')
+ typehandlers.add_type_alias('uint32_t&', 'ns3::FlowPacketId&')
+ typehandlers.add_type_alias('uint32_t', 'ns3::FlowId')
+ typehandlers.add_type_alias('uint32_t*', 'ns3::FlowId*')
+ typehandlers.add_type_alias('uint32_t&', 'ns3::FlowId&')
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3Histogram_methods(root_module, root_module['ns3::Histogram'])
+ register_Ns3FlowClassifier_methods(root_module, root_module['ns3::FlowClassifier'])
+ register_Ns3FlowProbe_methods(root_module, root_module['ns3::FlowProbe'])
+ register_Ns3FlowProbeFlowStats_methods(root_module, root_module['ns3::FlowProbe::FlowStats'])
+ register_Ns3Ipv4FlowClassifier_methods(root_module, root_module['ns3::Ipv4FlowClassifier'])
+ register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, root_module['ns3::Ipv4FlowClassifier::FiveTuple'])
+ register_Ns3Ipv4FlowProbe_methods(root_module, root_module['ns3::Ipv4FlowProbe'])
+ register_Ns3FlowMonitor_methods(root_module, root_module['ns3::FlowMonitor'])
+ register_Ns3FlowMonitorFlowStats_methods(root_module, root_module['ns3::FlowMonitor::FlowStats'])
+ return
+
+def register_Ns3Histogram_methods(root_module, cls):
+ ## histogram.h: ns3::Histogram::Histogram(ns3::Histogram const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Histogram const &', 'arg0')])
+ ## histogram.h: ns3::Histogram::Histogram(double binWidth) [constructor]
+ cls.add_constructor([param('double', 'binWidth')])
+ ## histogram.h: ns3::Histogram::Histogram() [constructor]
+ cls.add_constructor([])
+ ## histogram.h: void ns3::Histogram::AddValue(double value) [member function]
+ cls.add_method('AddValue',
+ 'void',
+ [param('double', 'value')])
+ ## histogram.h: uint32_t ns3::Histogram::GetBinCount(uint32_t index) [member function]
+ cls.add_method('GetBinCount',
+ 'uint32_t',
+ [param('uint32_t', 'index')])
+ ## histogram.h: double ns3::Histogram::GetBinEnd(uint32_t index) [member function]
+ cls.add_method('GetBinEnd',
+ 'double',
+ [param('uint32_t', 'index')])
+ ## histogram.h: double ns3::Histogram::GetBinStart(uint32_t index) [member function]
+ cls.add_method('GetBinStart',
+ 'double',
+ [param('uint32_t', 'index')])
+ ## histogram.h: double ns3::Histogram::GetBinWidth(uint32_t index) const [member function]
+ cls.add_method('GetBinWidth',
+ 'double',
+ [param('uint32_t', 'index')],
+ is_const=True)
+ ## histogram.h: uint32_t ns3::Histogram::GetNBins() const [member function]
+ cls.add_method('GetNBins',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## histogram.h: void ns3::Histogram::SerializeToXmlStream(std::ostream & os, int indent, std::string elementName) const [member function]
+ cls.add_method('SerializeToXmlStream',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'indent'), param('std::string', 'elementName')],
+ is_const=True)
+ ## histogram.h: void ns3::Histogram::SetDefaultBinWidth(double binWidth) [member function]
+ cls.add_method('SetDefaultBinWidth',
+ 'void',
+ [param('double', 'binWidth')])
+ return
+
+def register_Ns3FlowClassifier_methods(root_module, cls):
+ ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier(ns3::FlowClassifier const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowClassifier const &', 'arg0')])
+ ## flow-classifier.h: ns3::FlowClassifier::FlowClassifier() [constructor]
+ cls.add_constructor([])
+ ## flow-classifier.h: void ns3::FlowClassifier::SerializeToXmlStream(std::ostream & os, int indent) const [member function]
+ cls.add_method('SerializeToXmlStream',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'indent')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## flow-classifier.h: ns3::FlowId ns3::FlowClassifier::GetNewFlowId() [member function]
+ cls.add_method('GetNewFlowId',
+ 'ns3::FlowId',
+ [],
+ visibility='protected')
+ return
+
+def register_Ns3FlowProbe_methods(root_module, cls):
+ ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::FlowProbe const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowProbe const &', 'arg0')])
+ ## flow-probe.h: void ns3::FlowProbe::AddPacketDropStats(ns3::FlowId flowId, uint32_t packetSize, uint32_t reasonCode) [member function]
+ cls.add_method('AddPacketDropStats',
+ 'void',
+ [param('ns3::FlowId', 'flowId'), param('uint32_t', 'packetSize'), param('uint32_t', 'reasonCode')])
+ ## flow-probe.h: void ns3::FlowProbe::AddPacketStats(ns3::FlowId flowId, uint32_t packetSize, ns3::Time delayFromFirstProbe) [member function]
+ cls.add_method('AddPacketStats',
+ 'void',
+ [param('ns3::FlowId', 'flowId'), param('uint32_t', 'packetSize'), param('ns3::Time', 'delayFromFirstProbe')])
+ ## flow-probe.h: std::map<unsigned int, ns3::FlowProbe::FlowStats, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowProbe::FlowStats> > > ns3::FlowProbe::GetStats() const [member function]
+ cls.add_method('GetStats',
+ 'std::map< unsigned int, ns3::FlowProbe::FlowStats >',
+ [],
+ is_const=True)
+ ## flow-probe.h: void ns3::FlowProbe::SerializeToXmlStream(std::ostream & os, int indent, uint32_t index) const [member function]
+ cls.add_method('SerializeToXmlStream',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'indent'), param('uint32_t', 'index')],
+ is_const=True)
+ ## flow-probe.h: ns3::FlowProbe::FlowProbe(ns3::Ptr<ns3::FlowMonitor> flowMonitor) [constructor]
+ cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'flowMonitor')],
+ visibility='protected')
+ return
+
+def register_Ns3FlowProbeFlowStats_methods(root_module, cls):
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats(ns3::FlowProbe::FlowStats const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowProbe::FlowStats const &', 'arg0')])
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::FlowStats() [constructor]
+ cls.add_constructor([])
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::bytes [variable]
+ cls.add_instance_attribute('bytes', 'uint64_t', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::bytesDropped [variable]
+ cls.add_instance_attribute('bytesDropped', 'std::vector< unsigned long >', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::delayFromFirstProbeSum [variable]
+ cls.add_instance_attribute('delayFromFirstProbeSum', 'ns3::Time', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::packets [variable]
+ cls.add_instance_attribute('packets', 'uint32_t', is_const=False)
+ ## flow-probe.h: ns3::FlowProbe::FlowStats::packetsDropped [variable]
+ cls.add_instance_attribute('packetsDropped', 'std::vector< unsigned int >', is_const=False)
+ return
+
+def register_Ns3Ipv4FlowClassifier_methods(root_module, cls):
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier(ns3::Ipv4FlowClassifier const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowClassifier const &', 'arg0')])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::Ipv4FlowClassifier() [constructor]
+ cls.add_constructor([])
+ ## ipv4-flow-classifier.h: bool ns3::Ipv4FlowClassifier::Classify(ns3::Ipv4Header const & ipHeader, ns3::Ptr<ns3::Packet const> ipPayload, uint32_t * out_flowId, uint32_t * out_packetId) [member function]
+ cls.add_method('Classify',
+ 'bool',
+ [param('ns3::Ipv4Header const &', 'ipHeader'), param('ns3::Ptr< ns3::Packet const >', 'ipPayload'), param('uint32_t *', 'out_flowId'), param('uint32_t *', 'out_packetId')])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple ns3::Ipv4FlowClassifier::FindFlow(ns3::FlowId flowId) const [member function]
+ cls.add_method('FindFlow',
+ 'ns3::Ipv4FlowClassifier::FiveTuple',
+ [param('ns3::FlowId', 'flowId')],
+ is_const=True)
+ ## ipv4-flow-classifier.h: void ns3::Ipv4FlowClassifier::SerializeToXmlStream(std::ostream & os, int indent) const [member function]
+ cls.add_method('SerializeToXmlStream',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'indent')],
+ is_const=True, is_virtual=True)
+ return
+
+def register_Ns3Ipv4FlowClassifierFiveTuple_methods(root_module, cls):
+ cls.add_binary_comparison_operator('<')
+ cls.add_binary_comparison_operator('==')
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple() [constructor]
+ cls.add_constructor([])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::FiveTuple(ns3::Ipv4FlowClassifier::FiveTuple const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowClassifier::FiveTuple const &', 'arg0')])
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationAddress [variable]
+ cls.add_instance_attribute('destinationAddress', 'ns3::Ipv4Address', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::destinationPort [variable]
+ cls.add_instance_attribute('destinationPort', 'uint16_t', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::protocol [variable]
+ cls.add_instance_attribute('protocol', 'uint8_t', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourceAddress [variable]
+ cls.add_instance_attribute('sourceAddress', 'ns3::Ipv4Address', is_const=False)
+ ## ipv4-flow-classifier.h: ns3::Ipv4FlowClassifier::FiveTuple::sourcePort [variable]
+ cls.add_instance_attribute('sourcePort', 'uint16_t', is_const=False)
+ return
+
+def register_Ns3Ipv4FlowProbe_methods(root_module, cls):
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ipv4FlowProbe const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4FlowProbe const &', 'arg0')])
+ ## ipv4-flow-probe.h: ns3::Ipv4FlowProbe::Ipv4FlowProbe(ns3::Ptr<ns3::FlowMonitor> monitor, ns3::Ptr<ns3::Ipv4FlowClassifier> classifier, ns3::Ptr<ns3::Node> node) [constructor]
+ cls.add_constructor([param('ns3::Ptr< ns3::FlowMonitor >', 'monitor'), param('ns3::Ptr< ns3::Ipv4FlowClassifier >', 'classifier'), param('ns3::Ptr< ns3::Node >', 'node')])
+ return
+
+def register_Ns3FlowMonitor_methods(root_module, cls):
+ ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor(ns3::FlowMonitor const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowMonitor const &', 'arg0')])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowMonitor() [constructor]
+ cls.add_constructor([])
+ ## flow-monitor.h: void ns3::FlowMonitor::AddProbe(ns3::Ptr<ns3::FlowProbe> probe) [member function]
+ cls.add_method('AddProbe',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe')])
+ ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets() [member function]
+ cls.add_method('CheckForLostPackets',
+ 'void',
+ [])
+ ## flow-monitor.h: void ns3::FlowMonitor::CheckForLostPackets(ns3::Time maxDelay) [member function]
+ cls.add_method('CheckForLostPackets',
+ 'void',
+ [param('ns3::Time', 'maxDelay')])
+ ## flow-monitor.h: std::vector<ns3::Ptr<ns3::FlowProbe>, std::allocator<ns3::Ptr<ns3::FlowProbe> > > ns3::FlowMonitor::GetAllProbes() const [member function]
+ cls.add_method('GetAllProbes',
+ 'std::vector< ns3::Ptr< ns3::FlowProbe > >',
+ [],
+ is_const=True)
+ ## flow-monitor.h: std::map<unsigned int, ns3::FlowMonitor::FlowStats, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, ns3::FlowMonitor::FlowStats> > > ns3::FlowMonitor::GetFlowStats() const [member function]
+ cls.add_method('GetFlowStats',
+ 'std::map< unsigned int, ns3::FlowMonitor::FlowStats >',
+ [],
+ is_const=True)
+ ## flow-monitor.h: ns3::TypeId ns3::FlowMonitor::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## flow-monitor.h: static ns3::TypeId ns3::FlowMonitor::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportDrop(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize, uint32_t reasonCode) [member function]
+ cls.add_method('ReportDrop',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize'), param('uint32_t', 'reasonCode')])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportFirstTx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportFirstTx',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportForwarding(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportForwarding',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::ReportLastRx(ns3::Ptr<ns3::FlowProbe> probe, ns3::FlowId flowId, ns3::FlowPacketId packetId, uint32_t packetSize) [member function]
+ cls.add_method('ReportLastRx',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowProbe >', 'probe'), param('ns3::FlowId', 'flowId'), param('ns3::FlowPacketId', 'packetId'), param('uint32_t', 'packetSize')])
+ ## flow-monitor.h: void ns3::FlowMonitor::SerializeToXmlFile(std::string fileName, bool enableHistograms, bool enableProbes) [member function]
+ cls.add_method('SerializeToXmlFile',
+ 'void',
+ [param('std::string', 'fileName'), param('bool', 'enableHistograms'), param('bool', 'enableProbes')])
+ ## flow-monitor.h: void ns3::FlowMonitor::SerializeToXmlStream(std::ostream & os, int indent, bool enableHistograms, bool enableProbes) [member function]
+ cls.add_method('SerializeToXmlStream',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'indent'), param('bool', 'enableHistograms'), param('bool', 'enableProbes')])
+ ## flow-monitor.h: std::string ns3::FlowMonitor::SerializeToXmlString(int indent, bool enableHistograms, bool enableProbes) [member function]
+ cls.add_method('SerializeToXmlString',
+ 'std::string',
+ [param('int', 'indent'), param('bool', 'enableHistograms'), param('bool', 'enableProbes')])
+ ## flow-monitor.h: void ns3::FlowMonitor::SetFlowClassifier(ns3::Ptr<ns3::FlowClassifier> classifier) [member function]
+ cls.add_method('SetFlowClassifier',
+ 'void',
+ [param('ns3::Ptr< ns3::FlowClassifier >', 'classifier')])
+ ## flow-monitor.h: void ns3::FlowMonitor::Start(ns3::Time const & time) [member function]
+ cls.add_method('Start',
+ 'void',
+ [param('ns3::Time const &', 'time')])
+ ## flow-monitor.h: void ns3::FlowMonitor::StartRightNow() [member function]
+ cls.add_method('StartRightNow',
+ 'void',
+ [])
+ ## flow-monitor.h: void ns3::FlowMonitor::Stop(ns3::Time const & time) [member function]
+ cls.add_method('Stop',
+ 'void',
+ [param('ns3::Time const &', 'time')])
+ ## flow-monitor.h: void ns3::FlowMonitor::StopRightNow() [member function]
+ cls.add_method('StopRightNow',
+ 'void',
+ [])
+ ## flow-monitor.h: void ns3::FlowMonitor::NotifyConstructionCompleted() [member function]
+ cls.add_method('NotifyConstructionCompleted',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3FlowMonitorFlowStats_methods(root_module, cls):
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats() [constructor]
+ cls.add_constructor([])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats(ns3::FlowMonitor::FlowStats const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowMonitor::FlowStats const &', 'arg0')])
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::bytesDropped [variable]
+ cls.add_instance_attribute('bytesDropped', 'std::vector< unsigned long >', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::delayHistogram [variable]
+ cls.add_instance_attribute('delayHistogram', 'ns3::Histogram', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::delaySum [variable]
+ cls.add_instance_attribute('delaySum', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::jitterHistogram [variable]
+ cls.add_instance_attribute('jitterHistogram', 'ns3::Histogram', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::jitterSum [variable]
+ cls.add_instance_attribute('jitterSum', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::lastDelay [variable]
+ cls.add_instance_attribute('lastDelay', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::lostPackets [variable]
+ cls.add_instance_attribute('lostPackets', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::packetSizeHistogram [variable]
+ cls.add_instance_attribute('packetSizeHistogram', 'ns3::Histogram', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::packetsDropped [variable]
+ cls.add_instance_attribute('packetsDropped', 'std::vector< unsigned int >', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxBytes [variable]
+ cls.add_instance_attribute('rxBytes', 'uint64_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::rxPackets [variable]
+ cls.add_instance_attribute('rxPackets', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timeFirstRxPacket [variable]
+ cls.add_instance_attribute('timeFirstRxPacket', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timeFirstTxPacket [variable]
+ cls.add_instance_attribute('timeFirstTxPacket', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timeLastRxPacket [variable]
+ cls.add_instance_attribute('timeLastRxPacket', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timeLastTxPacket [variable]
+ cls.add_instance_attribute('timeLastTxPacket', 'ns3::Time', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timesForwarded [variable]
+ cls.add_instance_attribute('timesForwarded', 'uint32_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txBytes [variable]
+ cls.add_instance_attribute('txBytes', 'uint64_t', is_const=False)
+ ## flow-monitor.h: ns3::FlowMonitor::FlowStats::txPackets [variable]
+ cls.add_instance_attribute('txPackets', 'uint32_t', is_const=False)
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_global_routing.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_global_routing.py Thu Sep 24 10:57:41 2009 -0400
@@ -38,6 +38,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -62,6 +74,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -417,6 +437,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -430,6 +452,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_helper.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_helper.py Thu Sep 24 10:57:41 2009 -0400
@@ -13,6 +13,8 @@
module.add_class('CsmaHelper', allow_subclassing=False)
## emu-helper.h: ns3::EmuHelper [class]
module.add_class('EmuHelper', allow_subclassing=False)
+ ## flow-monitor-helper.h: ns3::FlowMonitorHelper [class]
+ module.add_class('FlowMonitorHelper', allow_subclassing=False)
## internet-stack-helper.h: ns3::InternetStackHelper [class]
module.add_class('InternetStackHelper', allow_subclassing=False)
## ipv4-address-helper.h: ns3::Ipv4AddressHelper [class]
@@ -31,6 +33,10 @@
module.add_class('Ipv6RoutingHelper', allow_subclassing=False)
## ipv6-static-routing-helper.h: ns3::Ipv6StaticRoutingHelper [class]
module.add_class('Ipv6StaticRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv6RoutingHelper'])
+ ## mesh-helper.h: ns3::MeshHelper [class]
+ module.add_class('MeshHelper', allow_subclassing=False)
+ ## mesh-helper.h: ns3::MeshHelper::ChannelPolicy [enumeration]
+ module.add_enum('ChannelPolicy', ['SPREAD_CHANNELS', 'ZERO_CHANNEL'], outer_class=root_module['ns3::MeshHelper'])
## mobility-helper.h: ns3::MobilityHelper [class]
module.add_class('MobilityHelper', allow_subclassing=False)
## net-device-container.h: ns3::NetDeviceContainer [class]
@@ -75,6 +81,8 @@
module.add_class('Ipv4GlobalRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
## ipv4-list-routing-helper.h: ns3::Ipv4ListRoutingHelper [class]
module.add_class('Ipv4ListRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
+ ## ipv4-nix-vector-helper.h: ns3::Ipv4NixVectorHelper [class]
+ module.add_class('Ipv4NixVectorHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
## ipv6-list-routing-helper.h: ns3::Ipv6ListRoutingHelper [class]
module.add_class('Ipv6ListRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv6RoutingHelper'])
## nqos-wifi-mac-helper.h: ns3::NqosWifiMacHelper [class]
@@ -83,6 +91,12 @@
module.add_class('QosWifiMacHelper', allow_subclassing=False, parent=root_module['ns3::WifiMacHelper'])
## athstats-helper.h: ns3::AthstatsWifiTraceSink [class]
module.add_class('AthstatsWifiTraceSink', parent=root_module['ns3::Object'])
+ ## mesh-stack-installer.h: ns3::MeshStack [class]
+ module.add_class('MeshStack', parent=root_module['ns3::Object'])
+ ## dot11s-installer.h: ns3::Dot11sStack [class]
+ module.add_class('Dot11sStack', parent=root_module['ns3::MeshStack'])
+ ## flame-installer.h: ns3::FlameStack [class]
+ module.add_class('FlameStack', parent=root_module['ns3::MeshStack'])
## Register a nested module for the namespace Config
@@ -102,6 +116,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -126,6 +152,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -140,6 +174,7 @@
register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
+ register_Ns3FlowMonitorHelper_methods(root_module, root_module['ns3::FlowMonitorHelper'])
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'])
@@ -149,6 +184,7 @@
register_Ns3Ipv6InterfaceContainer_methods(root_module, root_module['ns3::Ipv6InterfaceContainer'])
register_Ns3Ipv6RoutingHelper_methods(root_module, root_module['ns3::Ipv6RoutingHelper'])
register_Ns3Ipv6StaticRoutingHelper_methods(root_module, root_module['ns3::Ipv6StaticRoutingHelper'])
+ register_Ns3MeshHelper_methods(root_module, root_module['ns3::MeshHelper'])
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'])
@@ -170,10 +206,14 @@
register_Ns3YansWifiPhyHelper_methods(root_module, root_module['ns3::YansWifiPhyHelper'])
register_Ns3Ipv4GlobalRoutingHelper_methods(root_module, root_module['ns3::Ipv4GlobalRoutingHelper'])
register_Ns3Ipv4ListRoutingHelper_methods(root_module, root_module['ns3::Ipv4ListRoutingHelper'])
+ register_Ns3Ipv4NixVectorHelper_methods(root_module, root_module['ns3::Ipv4NixVectorHelper'])
register_Ns3Ipv6ListRoutingHelper_methods(root_module, root_module['ns3::Ipv6ListRoutingHelper'])
register_Ns3NqosWifiMacHelper_methods(root_module, root_module['ns3::NqosWifiMacHelper'])
register_Ns3QosWifiMacHelper_methods(root_module, root_module['ns3::QosWifiMacHelper'])
register_Ns3AthstatsWifiTraceSink_methods(root_module, root_module['ns3::AthstatsWifiTraceSink'])
+ register_Ns3MeshStack_methods(root_module, root_module['ns3::MeshStack'])
+ register_Ns3Dot11sStack_methods(root_module, root_module['ns3::Dot11sStack'])
+ register_Ns3FlameStack_methods(root_module, root_module['ns3::FlameStack'])
return
def register_Ns3ApplicationContainer_methods(root_module, cls):
@@ -471,6 +511,37 @@
[param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
return
+def register_Ns3FlowMonitorHelper_methods(root_module, cls):
+ ## flow-monitor-helper.h: ns3::FlowMonitorHelper::FlowMonitorHelper(ns3::FlowMonitorHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlowMonitorHelper const &', 'arg0')])
+ ## flow-monitor-helper.h: ns3::FlowMonitorHelper::FlowMonitorHelper() [constructor]
+ cls.add_constructor([])
+ ## flow-monitor-helper.h: ns3::Ptr<ns3::FlowClassifier> ns3::FlowMonitorHelper::GetClassifier() [member function]
+ cls.add_method('GetClassifier',
+ 'ns3::Ptr< ns3::FlowClassifier >',
+ [])
+ ## flow-monitor-helper.h: ns3::Ptr<ns3::FlowMonitor> ns3::FlowMonitorHelper::GetMonitor() [member function]
+ cls.add_method('GetMonitor',
+ 'ns3::Ptr< ns3::FlowMonitor >',
+ [])
+ ## flow-monitor-helper.h: ns3::Ptr<ns3::FlowMonitor> ns3::FlowMonitorHelper::Install(ns3::NodeContainer nodes) [member function]
+ cls.add_method('Install',
+ 'ns3::Ptr< ns3::FlowMonitor >',
+ [param('ns3::NodeContainer', 'nodes')])
+ ## flow-monitor-helper.h: ns3::Ptr<ns3::FlowMonitor> ns3::FlowMonitorHelper::Install(ns3::Ptr<ns3::Node> node) [member function]
+ cls.add_method('Install',
+ 'ns3::Ptr< ns3::FlowMonitor >',
+ [param('ns3::Ptr< ns3::Node >', 'node')])
+ ## flow-monitor-helper.h: ns3::Ptr<ns3::FlowMonitor> ns3::FlowMonitorHelper::InstallAll() [member function]
+ cls.add_method('InstallAll',
+ 'ns3::Ptr< ns3::FlowMonitor >',
+ [])
+ ## flow-monitor-helper.h: void ns3::FlowMonitorHelper::SetMonitorAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+ cls.add_method('SetMonitorAttribute',
+ 'void',
+ [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+ return
+
def register_Ns3InternetStackHelper_methods(root_module, cls):
## internet-stack-helper.h: ns3::InternetStackHelper::InternetStackHelper(ns3::InternetStackHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::InternetStackHelper const &', 'arg0')])
@@ -542,6 +613,8 @@
cls.add_constructor([param('ns3::Ipv4AddressHelper const &', 'arg0')])
## ipv4-address-helper.h: ns3::Ipv4AddressHelper::Ipv4AddressHelper() [constructor]
cls.add_constructor([])
+ ## ipv4-address-helper.h: ns3::Ipv4AddressHelper::Ipv4AddressHelper(ns3::Ipv4Address network, ns3::Ipv4Mask mask, ns3::Ipv4Address base="0.0.0.1") [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'mask'), param('ns3::Ipv4Address', 'base', default_value='"0.0.0.1"')])
## ipv4-address-helper.h: ns3::Ipv4InterfaceContainer ns3::Ipv4AddressHelper::Assign(ns3::NetDeviceContainer const & c) [member function]
cls.add_method('Assign',
'ns3::Ipv4InterfaceContainer',
@@ -573,10 +646,19 @@
cls.add_method('Add',
'void',
[param('ns3::Ptr< ns3::Ipv4 >', 'ipv4'), param('uint32_t', 'interface')])
+ ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> arg0) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >', 'arg0')])
## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::string ipv4Name, uint32_t interface) [member function]
cls.add_method('Add',
'void',
[param('std::string', 'ipv4Name'), param('uint32_t', 'interface')])
+ ## ipv4-interface-container.h: std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> ns3::Ipv4InterfaceContainer::Get(uint32_t arg0) const [member function]
+ cls.add_method('Get',
+ 'std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >',
+ [param('uint32_t', 'arg0')],
+ is_const=True)
## ipv4-interface-container.h: ns3::Ipv4Address ns3::Ipv4InterfaceContainer::GetAddress(uint32_t i, uint32_t j=0) const [member function]
cls.add_method('GetAddress',
'ns3::Ipv4Address',
@@ -768,6 +850,55 @@
is_const=True)
return
+def register_Ns3MeshHelper_methods(root_module, cls):
+ ## mesh-helper.h: ns3::MeshHelper::MeshHelper(ns3::MeshHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshHelper const &', 'arg0')])
+ ## mesh-helper.h: ns3::MeshHelper::MeshHelper() [constructor]
+ cls.add_constructor([])
+ ## mesh-helper.h: static ns3::MeshHelper ns3::MeshHelper::Default() [member function]
+ cls.add_method('Default',
+ 'ns3::MeshHelper',
+ [],
+ is_static=True)
+ ## mesh-helper.h: ns3::NetDeviceContainer ns3::MeshHelper::Install(ns3::WifiPhyHelper const & phyHelper, ns3::NodeContainer c) const [member function]
+ cls.add_method('Install',
+ 'ns3::NetDeviceContainer',
+ [param('ns3::WifiPhyHelper const &', 'phyHelper'), param('ns3::NodeContainer', 'c')],
+ is_const=True)
+ ## mesh-helper.h: void ns3::MeshHelper::Report(ns3::Ptr<ns3::NetDevice> const & arg0, std::ostream & arg1) [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice > const &', 'arg0'), param('std::ostream &', 'arg1')])
+ ## mesh-helper.h: void ns3::MeshHelper::ResetStats(ns3::Ptr<ns3::NetDevice> const & arg0) [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice > const &', 'arg0')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetMacType(std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function]
+ cls.add_method('SetMacType',
+ 'void',
+ [param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetNumberOfInterfaces(uint32_t nInterfaces) [member function]
+ cls.add_method('SetNumberOfInterfaces',
+ 'void',
+ [param('uint32_t', 'nInterfaces')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetRemoteStationManager(std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function]
+ cls.add_method('SetRemoteStationManager',
+ 'void',
+ [param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetSpreadInterfaceChannels(ns3::MeshHelper::ChannelPolicy arg0) [member function]
+ cls.add_method('SetSpreadInterfaceChannels',
+ 'void',
+ [param('ns3::MeshHelper::ChannelPolicy', 'arg0')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetStackInstaller(std::string type, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function]
+ cls.add_method('SetStackInstaller',
+ 'void',
+ [param('std::string', 'type'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
+ ## mesh-helper.h: void ns3::MeshHelper::SetStandard(ns3::WifiPhyStandard standard) [member function]
+ cls.add_method('SetStandard',
+ 'void',
+ [param('ns3::WifiPhyStandard', 'standard')])
+ 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')])
@@ -1500,6 +1631,18 @@
is_const=True, is_virtual=True)
return
+def register_Ns3Ipv4NixVectorHelper_methods(root_module, cls):
+ ## ipv4-nix-vector-helper.h: ns3::Ipv4NixVectorHelper::Ipv4NixVectorHelper(ns3::Ipv4NixVectorHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4NixVectorHelper const &', 'arg0')])
+ ## ipv4-nix-vector-helper.h: ns3::Ipv4NixVectorHelper::Ipv4NixVectorHelper() [constructor]
+ cls.add_constructor([])
+ ## ipv4-nix-vector-helper.h: ns3::Ptr<ns3::Ipv4RoutingProtocol> ns3::Ipv4NixVectorHelper::Create(ns3::Ptr<ns3::Node> node) const [member function]
+ cls.add_method('Create',
+ 'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
+ [param('ns3::Ptr< ns3::Node >', 'node')],
+ is_const=True, is_virtual=True)
+ return
+
def register_Ns3Ipv6ListRoutingHelper_methods(root_module, cls):
## ipv6-list-routing-helper.h: ns3::Ipv6ListRoutingHelper::Ipv6ListRoutingHelper(ns3::Ipv6ListRoutingHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Ipv6ListRoutingHelper const &', 'arg0')])
@@ -1618,11 +1761,99 @@
[param('std::string', 'context'), param('ns3::Mac48Address', 'address')])
return
+def register_Ns3MeshStack_methods(root_module, cls):
+ ## mesh-stack-installer.h: ns3::MeshStack::MeshStack() [constructor]
+ cls.add_constructor([])
+ ## mesh-stack-installer.h: ns3::MeshStack::MeshStack(ns3::MeshStack const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshStack const &', 'arg0')])
+ ## mesh-stack-installer.h: bool ns3::MeshStack::InstallStack(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
+ cls.add_method('InstallStack',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'mp')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-stack-installer.h: void ns3::MeshStack::Report(ns3::Ptr<ns3::MeshPointDevice> const mp, std::ostream & arg1) [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp'), param('std::ostream &', 'arg1')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-stack-installer.h: void ns3::MeshStack::ResetStats(ns3::Ptr<ns3::MeshPointDevice> const mp) [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp')],
+ is_pure_virtual=True, is_virtual=True)
+ return
+
+def register_Ns3Dot11sStack_methods(root_module, cls):
+ ## dot11s-installer.h: ns3::Dot11sStack::Dot11sStack(ns3::Dot11sStack const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Dot11sStack const &', 'arg0')])
+ ## dot11s-installer.h: ns3::Dot11sStack::Dot11sStack() [constructor]
+ cls.add_constructor([])
+ ## dot11s-installer.h: void ns3::Dot11sStack::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## dot11s-installer.h: static ns3::TypeId ns3::Dot11sStack::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## dot11s-installer.h: bool ns3::Dot11sStack::InstallStack(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
+ cls.add_method('InstallStack',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'mp')],
+ is_virtual=True)
+ ## dot11s-installer.h: void ns3::Dot11sStack::Report(ns3::Ptr<ns3::MeshPointDevice> const mp, std::ostream & arg1) [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp'), param('std::ostream &', 'arg1')],
+ is_virtual=True)
+ ## dot11s-installer.h: void ns3::Dot11sStack::ResetStats(ns3::Ptr<ns3::MeshPointDevice> const mp) [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp')],
+ is_virtual=True)
+ return
+
+def register_Ns3FlameStack_methods(root_module, cls):
+ ## flame-installer.h: ns3::FlameStack::FlameStack(ns3::FlameStack const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::FlameStack const &', 'arg0')])
+ ## flame-installer.h: ns3::FlameStack::FlameStack() [constructor]
+ cls.add_constructor([])
+ ## flame-installer.h: void ns3::FlameStack::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## flame-installer.h: static ns3::TypeId ns3::FlameStack::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## flame-installer.h: bool ns3::FlameStack::InstallStack(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
+ cls.add_method('InstallStack',
+ 'bool',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'mp')],
+ is_virtual=True)
+ ## flame-installer.h: void ns3::FlameStack::Report(ns3::Ptr<ns3::MeshPointDevice> const mp, std::ostream & arg1) [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp'), param('std::ostream &', 'arg1')],
+ is_virtual=True)
+ ## flame-installer.h: void ns3::FlameStack::ResetStats(ns3::Ptr<ns3::MeshPointDevice> const mp) [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice > const', 'mp')],
+ is_virtual=True)
+ return
+
def register_functions(root_module):
module = root_module
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1636,6 +1867,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_internet_stack.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_internet_stack.py Thu Sep 24 10:57:41 2009 -0400
@@ -73,16 +73,32 @@
module.add_class('Icmpv6Echo', parent=root_module['ns3::Icmpv6Header'])
## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol [class]
module.add_class('Ipv4L3Protocol', parent=root_module['ns3::Ipv4'])
+ ## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::DropReason [enumeration]
+ module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_BAD_CHECKSUM', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR'], outer_class=root_module['ns3::Ipv4L3Protocol'])
## ipv4-l4-protocol.h: ns3::Ipv4L4Protocol [class]
module.add_class('Ipv4L4Protocol', parent=root_module['ns3::Object'])
## ipv4-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus [enumeration]
module.add_enum('RxStatus', ['RX_OK', 'RX_CSUM_FAILED', 'RX_ENDPOINT_UNREACH'], outer_class=root_module['ns3::Ipv4L4Protocol'])
+ ## ipv6-l3-protocol.h: ns3::Ipv6L3Protocol [class]
+ module.add_class('Ipv6L3Protocol', parent=root_module['ns3::Ipv6'])
+ ## ipv6-l3-protocol.h: ns3::Ipv6L3Protocol::DropReason [enumeration]
+ module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR'], outer_class=root_module['ns3::Ipv6L3Protocol'])
+ ## ipv6-l4-protocol.h: ns3::Ipv6L4Protocol [class]
+ module.add_class('Ipv6L4Protocol', parent=root_module['ns3::Object'])
+ ## ipv6-l4-protocol.h: ns3::Ipv6L4Protocol::RxStatus_e [enumeration]
+ module.add_enum('RxStatus_e', ['RX_OK', 'RX_CSUM_FAILED', 'RX_ENDPOINT_UNREACH'], outer_class=root_module['ns3::Ipv6L4Protocol'])
+ ## ndisc-cache.h: ns3::NdiscCache [class]
+ module.add_class('NdiscCache', parent=root_module['ns3::Object'])
+ ## ndisc-cache.h: ns3::NdiscCache::Entry [class]
+ module.add_class('Entry', outer_class=root_module['ns3::NdiscCache'])
## tcp-l4-protocol.h: ns3::TcpL4Protocol [class]
module.add_class('TcpL4Protocol', parent=root_module['ns3::Ipv4L4Protocol'])
## udp-l4-protocol.h: ns3::UdpL4Protocol [class]
module.add_class('UdpL4Protocol', parent=root_module['ns3::Ipv4L4Protocol'])
## icmpv4-l4-protocol.h: ns3::Icmpv4L4Protocol [class]
module.add_class('Icmpv4L4Protocol', parent=root_module['ns3::Ipv4L4Protocol'])
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol [class]
+ module.add_class('Icmpv6L4Protocol', parent=root_module['ns3::Ipv6L4Protocol'])
## Register a nested module for the namespace Config
@@ -102,6 +118,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -126,6 +154,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -162,9 +198,14 @@
register_Ns3Icmpv6Echo_methods(root_module, root_module['ns3::Icmpv6Echo'])
register_Ns3Ipv4L3Protocol_methods(root_module, root_module['ns3::Ipv4L3Protocol'])
register_Ns3Ipv4L4Protocol_methods(root_module, root_module['ns3::Ipv4L4Protocol'])
+ register_Ns3Ipv6L3Protocol_methods(root_module, root_module['ns3::Ipv6L3Protocol'])
+ register_Ns3Ipv6L4Protocol_methods(root_module, root_module['ns3::Ipv6L4Protocol'])
+ register_Ns3NdiscCache_methods(root_module, root_module['ns3::NdiscCache'])
+ register_Ns3NdiscCacheEntry_methods(root_module, root_module['ns3::NdiscCache::Entry'])
register_Ns3TcpL4Protocol_methods(root_module, root_module['ns3::TcpL4Protocol'])
register_Ns3UdpL4Protocol_methods(root_module, root_module['ns3::UdpL4Protocol'])
register_Ns3Icmpv4L4Protocol_methods(root_module, root_module['ns3::Icmpv4L4Protocol'])
+ register_Ns3Icmpv6L4Protocol_methods(root_module, root_module['ns3::Icmpv6L4Protocol'])
return
def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls):
@@ -957,11 +998,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6ParameterError::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6ParameterError::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6ParameterError::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1116,11 +1157,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6RS::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6RS::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6RS::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1172,11 +1213,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6Redirection::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6Redirection::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6Redirection::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1226,11 +1267,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1277,11 +1318,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6TooBig::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6TooBig::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6TooBig::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1702,11 +1743,11 @@
'ns3::TypeId',
[],
is_static=True)
- ## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::Print(std::ostream & os) [member function]
+ ## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::Print(std::ostream & os) const [member function]
cls.add_method('Print',
'void',
[param('std::ostream &', 'os')],
- is_virtual=True)
+ is_const=True, is_virtual=True)
## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -1976,6 +2017,435 @@
is_virtual=True)
return
+def register_Ns3Ipv6L3Protocol_methods(root_module, cls):
+ ## ipv6-l3-protocol.h: ns3::Ipv6L3Protocol::PROT_NUMBER [variable]
+ cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True)
+ ## ipv6-l3-protocol.h: static ns3::TypeId ns3::Ipv6L3Protocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv6-l3-protocol.h: ns3::Ipv6L3Protocol::Ipv6L3Protocol() [constructor]
+ cls.add_constructor([])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetNode(ns3::Ptr<ns3::Node> node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::Insert(ns3::Ptr<ns3::Ipv6L4Protocol> protocol) [member function]
+ cls.add_method('Insert',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv6L4Protocol >', 'protocol')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::Remove(ns3::Ptr<ns3::Ipv6L4Protocol> protocol) [member function]
+ cls.add_method('Remove',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv6L4Protocol >', 'protocol')])
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::Ipv6L4Protocol> ns3::Ipv6L3Protocol::GetProtocol(int protocolNumber) const [member function]
+ cls.add_method('GetProtocol',
+ 'ns3::Ptr< ns3::Ipv6L4Protocol >',
+ [param('int', 'protocolNumber')],
+ is_const=True)
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::Socket> ns3::Ipv6L3Protocol::CreateRawSocket() [member function]
+ cls.add_method('CreateRawSocket',
+ 'ns3::Ptr< ns3::Socket >',
+ [])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::DeleteRawSocket(ns3::Ptr<ns3::Socket> socket) [member function]
+ cls.add_method('DeleteRawSocket',
+ 'void',
+ [param('ns3::Ptr< ns3::Socket >', 'socket')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetDefaultTtl(uint8_t ttl) [member function]
+ cls.add_method('SetDefaultTtl',
+ 'void',
+ [param('uint8_t', 'ttl')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::Receive(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> p, uint16_t protocol, ns3::Address const & from, ns3::Address const & to, ns3::NetDevice::PacketType packetType) [member function]
+ cls.add_method('Receive',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'p'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'from'), param('ns3::Address const &', 'to'), param('ns3::NetDevice::PacketType', 'packetType')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::Send(ns3::Ptr<ns3::Packet> packet, ns3::Ipv6Address source, ns3::Ipv6Address destination, uint8_t protocol, ns3::Ptr<ns3::Ipv6Route> route) [member function]
+ cls.add_method('Send',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv6Address', 'source'), param('ns3::Ipv6Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv6Route >', 'route')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetRoutingProtocol(ns3::Ptr<ns3::Ipv6RoutingProtocol> routingProtocol) [member function]
+ cls.add_method('SetRoutingProtocol',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv6RoutingProtocol >', 'routingProtocol')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::Ipv6RoutingProtocol> ns3::Ipv6L3Protocol::GetRoutingProtocol() const [member function]
+ cls.add_method('GetRoutingProtocol',
+ 'ns3::Ptr< ns3::Ipv6RoutingProtocol >',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: uint32_t ns3::Ipv6L3Protocol::AddInterface(ns3::Ptr<ns3::NetDevice> device) [member function]
+ cls.add_method('AddInterface',
+ 'uint32_t',
+ [param('ns3::Ptr< ns3::NetDevice >', 'device')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::Ipv6Interface> ns3::Ipv6L3Protocol::GetInterface(uint32_t i) const [member function]
+ cls.add_method('GetInterface',
+ 'ns3::Ptr< ns3::Ipv6Interface >',
+ [param('uint32_t', 'i')],
+ is_const=True)
+ ## ipv6-l3-protocol.h: uint32_t ns3::Ipv6L3Protocol::GetNInterfaces() const [member function]
+ cls.add_method('GetNInterfaces',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: int32_t ns3::Ipv6L3Protocol::GetInterfaceForAddress(ns3::Ipv6Address addr) const [member function]
+ cls.add_method('GetInterfaceForAddress',
+ 'int32_t',
+ [param('ns3::Ipv6Address', 'addr')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: int32_t ns3::Ipv6L3Protocol::GetInterfaceForPrefix(ns3::Ipv6Address addr, ns3::Ipv6Prefix mask) const [member function]
+ cls.add_method('GetInterfaceForPrefix',
+ 'int32_t',
+ [param('ns3::Ipv6Address', 'addr'), param('ns3::Ipv6Prefix', 'mask')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: int32_t ns3::Ipv6L3Protocol::GetInterfaceForDevice(ns3::Ptr<const ns3::NetDevice> device) const [member function]
+ cls.add_method('GetInterfaceForDevice',
+ 'int32_t',
+ [param('ns3::Ptr< ns3::NetDevice const >', 'device')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: bool ns3::Ipv6L3Protocol::AddAddress(uint32_t i, ns3::Ipv6InterfaceAddress address) [member function]
+ cls.add_method('AddAddress',
+ 'bool',
+ [param('uint32_t', 'i'), param('ns3::Ipv6InterfaceAddress', 'address')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: ns3::Ipv6InterfaceAddress ns3::Ipv6L3Protocol::GetAddress(uint32_t interfaceIndex, uint32_t addressIndex) const [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Ipv6InterfaceAddress',
+ [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: uint32_t ns3::Ipv6L3Protocol::GetNAddresses(uint32_t interface) const [member function]
+ cls.add_method('GetNAddresses',
+ 'uint32_t',
+ [param('uint32_t', 'interface')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: bool ns3::Ipv6L3Protocol::RemoveAddress(uint32_t interfaceIndex, uint32_t addressIndex) [member function]
+ cls.add_method('RemoveAddress',
+ 'bool',
+ [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetMetric(uint32_t i, uint16_t metric) [member function]
+ cls.add_method('SetMetric',
+ 'void',
+ [param('uint32_t', 'i'), param('uint16_t', 'metric')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: uint16_t ns3::Ipv6L3Protocol::GetMetric(uint32_t i) const [member function]
+ cls.add_method('GetMetric',
+ 'uint16_t',
+ [param('uint32_t', 'i')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: uint16_t ns3::Ipv6L3Protocol::GetMtu(uint32_t i) const [member function]
+ cls.add_method('GetMtu',
+ 'uint16_t',
+ [param('uint32_t', 'i')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: bool ns3::Ipv6L3Protocol::IsUp(uint32_t i) const [member function]
+ cls.add_method('IsUp',
+ 'bool',
+ [param('uint32_t', 'i')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetUp(uint32_t i) [member function]
+ cls.add_method('SetUp',
+ 'void',
+ [param('uint32_t', 'i')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetDown(uint32_t i) [member function]
+ cls.add_method('SetDown',
+ 'void',
+ [param('uint32_t', 'i')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: bool ns3::Ipv6L3Protocol::IsForwarding(uint32_t i) const [member function]
+ cls.add_method('IsForwarding',
+ 'bool',
+ [param('uint32_t', 'i')],
+ is_const=True, is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetForwarding(uint32_t i, bool val) [member function]
+ cls.add_method('SetForwarding',
+ 'void',
+ [param('uint32_t', 'i'), param('bool', 'val')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::NetDevice> ns3::Ipv6L3Protocol::GetNetDevice(uint32_t i) [member function]
+ cls.add_method('GetNetDevice',
+ 'ns3::Ptr< ns3::NetDevice >',
+ [param('uint32_t', 'i')],
+ is_virtual=True)
+ ## ipv6-l3-protocol.h: ns3::Ptr<ns3::Icmpv6L4Protocol> ns3::Ipv6L3Protocol::GetIcmpv6() const [member function]
+ cls.add_method('GetIcmpv6',
+ 'ns3::Ptr< ns3::Icmpv6L4Protocol >',
+ [],
+ is_const=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(uint32_t interface, ns3::Ipv6Address network, ns3::Ipv6Prefix mask, uint8_t flags, uint32_t validTime, uint32_t preferredTime, ns3::Ipv6Address defaultRouter=ns3::Ipv6Address::GetZero( )) [member function]
+ cls.add_method('AddAutoconfiguredAddress',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'mask'), param('uint8_t', 'flags'), param('uint32_t', 'validTime'), param('uint32_t', 'preferredTime'), param('ns3::Ipv6Address', 'defaultRouter', default_value='ns3::Ipv6Address::GetZero( )')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(uint32_t interface, ns3::Ipv6Address network, ns3::Ipv6Prefix mask, ns3::Ipv6Address defaultRouter) [member function]
+ cls.add_method('RemoveAutoconfiguredAddress',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'defaultRouter')])
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::NotifyNewAggregate() [member function]
+ cls.add_method('NotifyNewAggregate',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ ## ipv6-l3-protocol.h: void ns3::Ipv6L3Protocol::SetIpForward(bool forward) [member function]
+ cls.add_method('SetIpForward',
+ 'void',
+ [param('bool', 'forward')],
+ visibility='private', is_virtual=True)
+ ## ipv6-l3-protocol.h: bool ns3::Ipv6L3Protocol::GetIpForward() const [member function]
+ cls.add_method('GetIpForward',
+ 'bool',
+ [],
+ is_const=True, visibility='private', is_virtual=True)
+ return
+
+def register_Ns3Ipv6L4Protocol_methods(root_module, cls):
+ ## ipv6-l4-protocol.h: ns3::Ipv6L4Protocol::Ipv6L4Protocol() [constructor]
+ cls.add_constructor([])
+ ## ipv6-l4-protocol.h: ns3::Ipv6L4Protocol::Ipv6L4Protocol(ns3::Ipv6L4Protocol const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv6L4Protocol const &', 'arg0')])
+ ## ipv6-l4-protocol.h: int ns3::Ipv6L4Protocol::GetProtocolNumber() const [member function]
+ cls.add_method('GetProtocolNumber',
+ 'int',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## ipv6-l4-protocol.h: static ns3::TypeId ns3::Ipv6L4Protocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv6-l4-protocol.h: ns3::Ipv6L4Protocol::RxStatus_e ns3::Ipv6L4Protocol::Receive(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Address const & src, ns3::Ipv6Address const & dst, ns3::Ptr<ns3::Ipv6Interface> incomingInterface) [member function]
+ cls.add_method('Receive',
+ 'ns3::Ipv6L4Protocol::RxStatus_e',
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address const &', 'src'), param('ns3::Ipv6Address const &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')],
+ is_pure_virtual=True, is_virtual=True)
+ ## ipv6-l4-protocol.h: void ns3::Ipv6L4Protocol::ReceiveIcmp(ns3::Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv6Address payloadSource, ns3::Ipv6Address payloadDestination, uint8_t const * payload) [member function]
+ cls.add_method('ReceiveIcmp',
+ 'void',
+ [param('ns3::Ipv6Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo'), param('ns3::Ipv6Address', 'payloadSource'), param('ns3::Ipv6Address', 'payloadDestination'), param('uint8_t const *', 'payload')],
+ is_virtual=True)
+ return
+
+def register_Ns3NdiscCache_methods(root_module, cls):
+ ## ndisc-cache.h: ns3::NdiscCache::NdiscCache() [constructor]
+ cls.add_constructor([])
+ ## ndisc-cache.h: ns3::NdiscCache::Entry * ns3::NdiscCache::Add(ns3::Ipv6Address to) [member function]
+ cls.add_method('Add',
+ 'ns3::NdiscCache::Entry *',
+ [param('ns3::Ipv6Address', 'to')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Flush() [member function]
+ cls.add_method('Flush',
+ 'void',
+ [])
+ ## ndisc-cache.h: ns3::Ptr<ns3::NetDevice> ns3::NdiscCache::GetDevice() const [member function]
+ cls.add_method('GetDevice',
+ 'ns3::Ptr< ns3::NetDevice >',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: ns3::Ptr<ns3::Ipv6Interface> ns3::NdiscCache::GetInterface() const [member function]
+ cls.add_method('GetInterface',
+ 'ns3::Ptr< ns3::Ipv6Interface >',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: static ns3::TypeId ns3::NdiscCache::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ndisc-cache.h: uint32_t ns3::NdiscCache::GetUnresQlen() [member function]
+ cls.add_method('GetUnresQlen',
+ 'uint32_t',
+ [])
+ ## ndisc-cache.h: ns3::NdiscCache::Entry * ns3::NdiscCache::Lookup(ns3::Ipv6Address dst) [member function]
+ cls.add_method('Lookup',
+ 'ns3::NdiscCache::Entry *',
+ [param('ns3::Ipv6Address', 'dst')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Remove(ns3::NdiscCache::Entry * entry) [member function]
+ cls.add_method('Remove',
+ 'void',
+ [param('ns3::NdiscCache::Entry *', 'entry')])
+ ## ndisc-cache.h: void ns3::NdiscCache::SetDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Ipv6Interface> interface) [member function]
+ cls.add_method('SetDevice',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv6Interface >', 'interface')])
+ ## ndisc-cache.h: void ns3::NdiscCache::SetUnresQlen(uint32_t unresQlen) [member function]
+ cls.add_method('SetUnresQlen',
+ 'void',
+ [param('uint32_t', 'unresQlen')])
+ ## ndisc-cache.h: ns3::NdiscCache::DEFAULT_UNRES_QLEN [variable]
+ cls.add_static_attribute('DEFAULT_UNRES_QLEN', 'uint32_t const', is_const=True)
+ ## ndisc-cache.h: void ns3::NdiscCache::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ return
+
+def register_Ns3NdiscCacheEntry_methods(root_module, cls):
+ ## ndisc-cache.h: ns3::NdiscCache::Entry::Entry(ns3::NdiscCache::Entry const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::NdiscCache::Entry const &', 'arg0')])
+ ## ndisc-cache.h: ns3::NdiscCache::Entry::Entry(ns3::NdiscCache * nd) [constructor]
+ cls.add_constructor([param('ns3::NdiscCache *', 'nd')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::AddWaitingPacket(ns3::Ptr<ns3::Packet> p) [member function]
+ cls.add_method('AddWaitingPacket',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'p')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::ClearWaitingPacket() [member function]
+ cls.add_method('ClearWaitingPacket',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::FunctionDelayTimeout() [member function]
+ cls.add_method('FunctionDelayTimeout',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::FunctionProbeTimeout() [member function]
+ cls.add_method('FunctionProbeTimeout',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::FunctionReachableTimeout() [member function]
+ cls.add_method('FunctionReachableTimeout',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::FunctionRetransmitTimeout() [member function]
+ cls.add_method('FunctionRetransmitTimeout',
+ 'void',
+ [])
+ ## ndisc-cache.h: ns3::Time ns3::NdiscCache::Entry::GetLastReachabilityConfirmation() const [member function]
+ cls.add_method('GetLastReachabilityConfirmation',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: ns3::Address ns3::NdiscCache::Entry::GetMacAddress() const [member function]
+ cls.add_method('GetMacAddress',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: uint8_t ns3::NdiscCache::Entry::GetNSRetransmit() const [member function]
+ cls.add_method('GetNSRetransmit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::IncNSRetransmit() [member function]
+ cls.add_method('IncNSRetransmit',
+ 'void',
+ [])
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsDelay() const [member function]
+ cls.add_method('IsDelay',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsIncomplete() const [member function]
+ cls.add_method('IsIncomplete',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsProbe() const [member function]
+ cls.add_method('IsProbe',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsReachable() const [member function]
+ cls.add_method('IsReachable',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsRouter() const [member function]
+ cls.add_method('IsRouter',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: bool ns3::NdiscCache::Entry::IsStale() const [member function]
+ cls.add_method('IsStale',
+ 'bool',
+ [],
+ is_const=True)
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::MarkDelay() [member function]
+ cls.add_method('MarkDelay',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::MarkIncomplete(ns3::Ptr<ns3::Packet> p) [member function]
+ cls.add_method('MarkIncomplete',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'p')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::MarkProbe() [member function]
+ cls.add_method('MarkProbe',
+ 'void',
+ [])
+ ## ndisc-cache.h: std::list<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > ns3::NdiscCache::Entry::MarkReachable(ns3::Address mac) [member function]
+ cls.add_method('MarkReachable',
+ 'std::list< ns3::Ptr< ns3::Packet > >',
+ [param('ns3::Address', 'mac')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::MarkReachable() [member function]
+ cls.add_method('MarkReachable',
+ 'void',
+ [])
+ ## ndisc-cache.h: std::list<ns3::Ptr<ns3::Packet>, std::allocator<ns3::Ptr<ns3::Packet> > > ns3::NdiscCache::Entry::MarkStale(ns3::Address mac) [member function]
+ cls.add_method('MarkStale',
+ 'std::list< ns3::Ptr< ns3::Packet > >',
+ [param('ns3::Address', 'mac')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::MarkStale() [member function]
+ cls.add_method('MarkStale',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::ResetNSRetransmit() [member function]
+ cls.add_method('ResetNSRetransmit',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::SetIpv6Address(ns3::Ipv6Address ipv6Address) [member function]
+ cls.add_method('SetIpv6Address',
+ 'void',
+ [param('ns3::Ipv6Address', 'ipv6Address')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::SetMacAddress(ns3::Address mac) [member function]
+ cls.add_method('SetMacAddress',
+ 'void',
+ [param('ns3::Address', 'mac')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::SetRouter(bool router) [member function]
+ cls.add_method('SetRouter',
+ 'void',
+ [param('bool', 'router')])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StartDelayTimer() [member function]
+ cls.add_method('StartDelayTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StartProbeTimer() [member function]
+ cls.add_method('StartProbeTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StartReachableTimer() [member function]
+ cls.add_method('StartReachableTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StartRetransmitTimer() [member function]
+ cls.add_method('StartRetransmitTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StopDelayTimer() [member function]
+ cls.add_method('StopDelayTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StopProbeTimer() [member function]
+ cls.add_method('StopProbeTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StopReachableTimer() [member function]
+ cls.add_method('StopReachableTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::StopRetransmitTimer() [member function]
+ cls.add_method('StopRetransmitTimer',
+ 'void',
+ [])
+ ## ndisc-cache.h: void ns3::NdiscCache::Entry::UpdateLastReachabilityconfirmation() [member function]
+ cls.add_method('UpdateLastReachabilityconfirmation',
+ 'void',
+ [])
+ return
+
def register_Ns3TcpL4Protocol_methods(root_module, cls):
## tcp-l4-protocol.h: ns3::TcpL4Protocol::PROT_NUMBER [variable]
cls.add_static_attribute('PROT_NUMBER', 'uint8_t const', is_const=True)
@@ -2178,11 +2648,185 @@
visibility='private', is_virtual=True)
return
+def register_Ns3Icmpv6L4Protocol_methods(root_module, cls):
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::Icmpv6L4Protocol(ns3::Icmpv6L4Protocol const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Icmpv6L4Protocol const &', 'arg0')])
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::Icmpv6L4Protocol() [constructor]
+ cls.add_constructor([])
+ ## icmpv6-l4-protocol.h: ns3::Ptr<ns3::NdiscCache> ns3::Icmpv6L4Protocol::CreateCache(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Ipv6Interface> interface) [member function]
+ cls.add_method('CreateCache',
+ 'ns3::Ptr< ns3::NdiscCache >',
+ [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv6Interface >', 'interface')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::DoDAD(ns3::Ipv6Address target, ns3::Ptr<ns3::Ipv6Interface> interface) [member function]
+ cls.add_method('DoDAD',
+ 'void',
+ [param('ns3::Ipv6Address', 'target'), param('ns3::Ptr< ns3::Ipv6Interface >', 'interface')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::DoDad(ns3::Ipv6Address addr, ns3::Ptr<ns3::Ipv6Interface> interface) [member function]
+ cls.add_method('DoDad',
+ 'void',
+ [param('ns3::Ipv6Address', 'addr'), param('ns3::Ptr< ns3::Ipv6Interface >', 'interface')])
+ ## icmpv6-l4-protocol.h: ns3::Ptr<ns3::Packet> ns3::Icmpv6L4Protocol::ForgeEchoRequest(ns3::Ipv6Address src, ns3::Ipv6Address dst, uint16_t id, uint16_t seq, ns3::Ptr<ns3::Packet> data) [member function]
+ cls.add_method('ForgeEchoRequest',
+ 'ns3::Ptr< ns3::Packet >',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('uint16_t', 'id'), param('uint16_t', 'seq'), param('ns3::Ptr< ns3::Packet >', 'data')])
+ ## icmpv6-l4-protocol.h: ns3::Ptr<ns3::Packet> ns3::Icmpv6L4Protocol::ForgeNA(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Address * hardwareAddress, uint8_t flags) [member function]
+ cls.add_method('ForgeNA',
+ 'ns3::Ptr< ns3::Packet >',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address *', 'hardwareAddress'), param('uint8_t', 'flags')])
+ ## icmpv6-l4-protocol.h: ns3::Ptr<ns3::Packet> ns3::Icmpv6L4Protocol::ForgeNS(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Ipv6Address target, ns3::Address hardwareAddress) [member function]
+ cls.add_method('ForgeNS',
+ 'ns3::Ptr< ns3::Packet >',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'target'), param('ns3::Address', 'hardwareAddress')])
+ ## icmpv6-l4-protocol.h: ns3::Ptr<ns3::Packet> ns3::Icmpv6L4Protocol::ForgeRS(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Address hardwareAddress) [member function]
+ cls.add_method('ForgeRS',
+ 'ns3::Ptr< ns3::Packet >',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address', 'hardwareAddress')])
+ ## icmpv6-l4-protocol.h: static void ns3::Icmpv6L4Protocol::FunctionDadTimeout(ns3::Ptr<ns3::Icmpv6L4Protocol> icmpv6, ns3::Ipv6Interface * interface, ns3::Ipv6Address addr) [member function]
+ cls.add_method('FunctionDadTimeout',
+ 'void',
+ [param('ns3::Ptr< ns3::Icmpv6L4Protocol >', 'icmpv6'), param('ns3::Ipv6Interface *', 'interface'), param('ns3::Ipv6Address', 'addr')],
+ is_static=True)
+ ## icmpv6-l4-protocol.h: int ns3::Icmpv6L4Protocol::GetProtocolNumber() const [member function]
+ cls.add_method('GetProtocolNumber',
+ 'int',
+ [],
+ is_const=True, is_virtual=True)
+ ## icmpv6-l4-protocol.h: static uint16_t ns3::Icmpv6L4Protocol::GetStaticProtocolNumber() [member function]
+ cls.add_method('GetStaticProtocolNumber',
+ 'uint16_t',
+ [],
+ is_static=True)
+ ## icmpv6-l4-protocol.h: static ns3::TypeId ns3::Icmpv6L4Protocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## icmpv6-l4-protocol.h: int ns3::Icmpv6L4Protocol::GetVersion() const [member function]
+ cls.add_method('GetVersion',
+ 'int',
+ [],
+ is_const=True, is_virtual=True)
+ ## icmpv6-l4-protocol.h: bool ns3::Icmpv6L4Protocol::IsAlwaysDad() const [member function]
+ cls.add_method('IsAlwaysDad',
+ 'bool',
+ [],
+ is_const=True)
+ ## icmpv6-l4-protocol.h: bool ns3::Icmpv6L4Protocol::Lookup(ns3::Ipv6Address dst, ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::NdiscCache> cache, ns3::Address * hardwareDestination) [member function]
+ cls.add_method('Lookup',
+ 'bool',
+ [param('ns3::Ipv6Address', 'dst'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::NdiscCache >', 'cache'), param('ns3::Address *', 'hardwareDestination')])
+ ## icmpv6-l4-protocol.h: bool ns3::Icmpv6L4Protocol::Lookup(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Address dst, ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::NdiscCache> cache, ns3::Address * hardwareDestination) [member function]
+ cls.add_method('Lookup',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::NdiscCache >', 'cache'), param('ns3::Address *', 'hardwareDestination')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::NotifyNewAggregate() [member function]
+ cls.add_method('NotifyNewAggregate',
+ 'void',
+ [],
+ is_virtual=True)
+ ## icmpv6-l4-protocol.h: ns3::Ipv6L4Protocol::RxStatus_e ns3::Icmpv6L4Protocol::Receive(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Address const & src, ns3::Ipv6Address const & dst, ns3::Ptr<ns3::Ipv6Interface> interface) [member function]
+ cls.add_method('Receive',
+ 'ns3::Ipv6L4Protocol::RxStatus_e',
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address const &', 'src'), param('ns3::Ipv6Address const &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'interface')],
+ is_virtual=True)
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendEchoReply(ns3::Ipv6Address src, ns3::Ipv6Address dst, uint16_t id, uint16_t seq, ns3::Ptr<ns3::Packet> data) [member function]
+ cls.add_method('SendEchoReply',
+ 'void',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('uint16_t', 'id'), param('uint16_t', 'seq'), param('ns3::Ptr< ns3::Packet >', 'data')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendErrorDestinationUnreachable(ns3::Ptr<ns3::Packet> malformedPacket, ns3::Ipv6Address dst, uint8_t code) [member function]
+ cls.add_method('SendErrorDestinationUnreachable',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'malformedPacket'), param('ns3::Ipv6Address', 'dst'), param('uint8_t', 'code')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendErrorParameterError(ns3::Ptr<ns3::Packet> malformedPacket, ns3::Ipv6Address dst, uint8_t code, uint32_t ptr) [member function]
+ cls.add_method('SendErrorParameterError',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'malformedPacket'), param('ns3::Ipv6Address', 'dst'), param('uint8_t', 'code'), param('uint32_t', 'ptr')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendErrorTimeExceeded(ns3::Ptr<ns3::Packet> malformedPacket, ns3::Ipv6Address dst, uint8_t code) [member function]
+ cls.add_method('SendErrorTimeExceeded',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'malformedPacket'), param('ns3::Ipv6Address', 'dst'), param('uint8_t', 'code')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendErrorTooBig(ns3::Ptr<ns3::Packet> malformedPacket, ns3::Ipv6Address dst, uint32_t mtu) [member function]
+ cls.add_method('SendErrorTooBig',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'malformedPacket'), param('ns3::Ipv6Address', 'dst'), param('uint32_t', 'mtu')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendMessage(ns3::Ptr<ns3::Packet> packet, ns3::Ipv6Address src, ns3::Ipv6Address dst, uint8_t ttl) [member function]
+ cls.add_method('SendMessage',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('uint8_t', 'ttl')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendMessage(ns3::Ptr<ns3::Packet> packet, ns3::Ipv6Address dst, ns3::Icmpv6Header & icmpv6Hdr, uint8_t ttl) [member function]
+ cls.add_method('SendMessage',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv6Address', 'dst'), param('ns3::Icmpv6Header &', 'icmpv6Hdr'), param('uint8_t', 'ttl')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendNA(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Address * hardwareAddress, uint8_t flags) [member function]
+ cls.add_method('SendNA',
+ 'void',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address *', 'hardwareAddress'), param('uint8_t', 'flags')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendNS(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Ipv6Address target, ns3::Address hardwareAddress) [member function]
+ cls.add_method('SendNS',
+ 'void',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'target'), param('ns3::Address', 'hardwareAddress')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendRS(ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Address hardwareAddress) [member function]
+ cls.add_method('SendRS',
+ 'void',
+ [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address', 'hardwareAddress')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SendRedirection(ns3::Ptr<ns3::Packet> redirectedPacket, ns3::Ipv6Address dst, ns3::Ipv6Address redirTarget, ns3::Ipv6Address redirDestination, ns3::Address redirHardwareTarget) [member function]
+ cls.add_method('SendRedirection',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'redirectedPacket'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'redirTarget'), param('ns3::Ipv6Address', 'redirDestination'), param('ns3::Address', 'redirHardwareTarget')])
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::SetNode(ns3::Ptr<ns3::Node> node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')])
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME [variable]
+ cls.add_static_attribute('DELAY_FIRST_PROBE_TIME', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_ANYCAST_DELAY_TIME [variable]
+ cls.add_static_attribute('MAX_ANYCAST_DELAY_TIME', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_FINAL_RTR_ADVERTISEMENTS [variable]
+ cls.add_static_attribute('MAX_FINAL_RTR_ADVERTISEMENTS', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERTISEMENTS [variable]
+ cls.add_static_attribute('MAX_INITIAL_RTR_ADVERTISEMENTS', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERT_INTERVAL [variable]
+ cls.add_static_attribute('MAX_INITIAL_RTR_ADVERT_INTERVAL', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_MULTICAST_SOLICIT [variable]
+ cls.add_static_attribute('MAX_MULTICAST_SOLICIT', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_NEIGHBOR_ADVERTISEMENT [variable]
+ cls.add_static_attribute('MAX_NEIGHBOR_ADVERTISEMENT', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_RANDOM_FACTOR [variable]
+ cls.add_static_attribute('MAX_RANDOM_FACTOR', 'double const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_RA_DELAY_TIME [variable]
+ cls.add_static_attribute('MAX_RA_DELAY_TIME', 'uint32_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_RTR_SOLICITATIONS [variable]
+ cls.add_static_attribute('MAX_RTR_SOLICITATIONS', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_RTR_SOLICITATION_DELAY [variable]
+ cls.add_static_attribute('MAX_RTR_SOLICITATION_DELAY', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MAX_UNICAST_SOLICIT [variable]
+ cls.add_static_attribute('MAX_UNICAST_SOLICIT', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MIN_DELAY_BETWEEN_RAS [variable]
+ cls.add_static_attribute('MIN_DELAY_BETWEEN_RAS', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::MIN_RANDOM_FACTOR [variable]
+ cls.add_static_attribute('MIN_RANDOM_FACTOR', 'double const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::PROT_NUMBER [variable]
+ cls.add_static_attribute('PROT_NUMBER', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::REACHABLE_TIME [variable]
+ cls.add_static_attribute('REACHABLE_TIME', 'uint32_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::RETRANS_TIMER [variable]
+ cls.add_static_attribute('RETRANS_TIMER', 'uint32_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: ns3::Icmpv6L4Protocol::RTR_SOLICITATION_INTERVAL [variable]
+ cls.add_static_attribute('RTR_SOLICITATION_INTERVAL', 'uint8_t const', is_const=True)
+ ## icmpv6-l4-protocol.h: void ns3::Icmpv6L4Protocol::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_functions(root_module):
module = root_module
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -2196,6 +2840,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_list_routing.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_list_routing.py Thu Sep 24 10:57:41 2009 -0400
@@ -26,6 +26,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -50,6 +62,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -212,6 +232,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -225,6 +247,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_mesh.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,727 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
+
+def register_types(module):
+ root_module = module.get_root()
+
+ ## wifi-information-element-vector.h: ns3::WifiElementId [enumeration]
+ module.add_enum('WifiElementId', ['IE11S_MESH_CONFIGURATION', 'IE11S_MESH_ID', 'IE11S_LINK_METRIC_REPORT', 'IE11S_CONGESTION_NOTIFICATION', 'IE11S_PEERING_MANAGEMENT', 'IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS', 'IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT', 'IE11S_MESH_TIM', 'IE11S_AWAKE_WINDOW', 'IE11S_BEACON_TIMING', 'IE11S_MCCAOP_SETUP_REQUEST', 'IE11S_MCCAOP_SETUP_REPLY', 'IE11S_MCCAOP_ADVERTISEMENT', 'IE11S_MCCAOP_RESERVATION_TEARDOWN', 'IE11S_PORTAL_ANNOUNCEMENT', 'IE11S_RANN', 'IE11S_PREQ', 'IE11S_PREP', 'IE11S_PERR', 'IE11S_PROXY_UPDATE', 'IE11S_PROXY_UPDATE_CONFIRMATION', 'IE11S_ABBREVIATED_HANDSHAKE', 'IE11S_MESH_PEERING_PROTOCOL_VERSION'])
+ ## mesh-wifi-beacon.h: ns3::MeshWifiBeacon [class]
+ module.add_class('MeshWifiBeacon')
+ ## wifi-information-element-vector.h: ns3::WifiInformationElement [class]
+ module.add_class('WifiInformationElement', parent=root_module['ns3::RefCountBase'])
+ ## mesh-wifi-interface-mac-plugin.h: ns3::MeshWifiInterfaceMacPlugin [class]
+ module.add_class('MeshWifiInterfaceMacPlugin', parent=root_module['ns3::RefCountBase'])
+ ## wifi-information-element-vector.h: ns3::WifiInformationElementVector [class]
+ module.add_class('WifiInformationElementVector', parent=root_module['ns3::Header'])
+ ## mesh-l2-routing-protocol.h: ns3::MeshL2RoutingProtocol [class]
+ module.add_class('MeshL2RoutingProtocol', parent=root_module['ns3::Object'])
+ ## mesh-wifi-interface-mac.h: ns3::MeshWifiInterfaceMac [class]
+ module.add_class('MeshWifiInterfaceMac', parent=root_module['ns3::WifiMac'])
+ ## mesh-point-device.h: ns3::MeshPointDevice [class]
+ module.add_class('MeshPointDevice', parent=root_module['ns3::NetDevice'])
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3MeshWifiBeacon_methods(root_module, root_module['ns3::MeshWifiBeacon'])
+ register_Ns3WifiInformationElement_methods(root_module, root_module['ns3::WifiInformationElement'])
+ register_Ns3MeshWifiInterfaceMacPlugin_methods(root_module, root_module['ns3::MeshWifiInterfaceMacPlugin'])
+ register_Ns3WifiInformationElementVector_methods(root_module, root_module['ns3::WifiInformationElementVector'])
+ register_Ns3MeshL2RoutingProtocol_methods(root_module, root_module['ns3::MeshL2RoutingProtocol'])
+ register_Ns3MeshWifiInterfaceMac_methods(root_module, root_module['ns3::MeshWifiInterfaceMac'])
+ register_Ns3MeshPointDevice_methods(root_module, root_module['ns3::MeshPointDevice'])
+ return
+
+def register_Ns3MeshWifiBeacon_methods(root_module, cls):
+ ## mesh-wifi-beacon.h: ns3::MeshWifiBeacon::MeshWifiBeacon(ns3::MeshWifiBeacon const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshWifiBeacon const &', 'arg0')])
+ ## mesh-wifi-beacon.h: ns3::MeshWifiBeacon::MeshWifiBeacon(ns3::Ssid ssid, ns3::SupportedRates rates, uint64_t us) [constructor]
+ cls.add_constructor([param('ns3::Ssid', 'ssid'), param('ns3::SupportedRates', 'rates'), param('uint64_t', 'us')])
+ ## mesh-wifi-beacon.h: void ns3::MeshWifiBeacon::AddInformationElement(ns3::Ptr<ns3::WifiInformationElement> ie) [member function]
+ cls.add_method('AddInformationElement',
+ 'void',
+ [param('ns3::Ptr< ns3::WifiInformationElement >', 'ie')])
+ ## mesh-wifi-beacon.h: ns3::MgtBeaconHeader ns3::MeshWifiBeacon::BeaconHeader() const [member function]
+ cls.add_method('BeaconHeader',
+ 'ns3::MgtBeaconHeader',
+ [],
+ is_const=True)
+ ## mesh-wifi-beacon.h: ns3::WifiMacHeader ns3::MeshWifiBeacon::CreateHeader(ns3::Mac48Address address, ns3::Mac48Address mpAddress) [member function]
+ cls.add_method('CreateHeader',
+ 'ns3::WifiMacHeader',
+ [param('ns3::Mac48Address', 'address'), param('ns3::Mac48Address', 'mpAddress')])
+ ## mesh-wifi-beacon.h: ns3::Ptr<ns3::Packet> ns3::MeshWifiBeacon::CreatePacket() [member function]
+ cls.add_method('CreatePacket',
+ 'ns3::Ptr< ns3::Packet >',
+ [])
+ return
+
+def register_Ns3WifiInformationElement_methods(root_module, cls):
+ cls.add_binary_comparison_operator('<')
+ cls.add_binary_comparison_operator('==')
+ ## wifi-information-element-vector.h: ns3::WifiInformationElement::WifiInformationElement() [constructor]
+ cls.add_constructor([])
+ ## wifi-information-element-vector.h: ns3::WifiInformationElement::WifiInformationElement(ns3::WifiInformationElement const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::WifiInformationElement const &', 'arg0')])
+ ## wifi-information-element-vector.h: uint8_t ns3::WifiInformationElement::DeserializeInformation(ns3::Buffer::Iterator start, uint8_t length) [member function]
+ cls.add_method('DeserializeInformation',
+ 'uint8_t',
+ [param('ns3::Buffer::Iterator', 'start'), param('uint8_t', 'length')],
+ is_pure_virtual=True, is_virtual=True)
+ ## wifi-information-element-vector.h: ns3::WifiElementId ns3::WifiInformationElement::ElementId() const [member function]
+ cls.add_method('ElementId',
+ 'ns3::WifiElementId',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: uint8_t ns3::WifiInformationElement::GetInformationSize() const [member function]
+ cls.add_method('GetInformationSize',
+ 'uint8_t',
+ [],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: void ns3::WifiInformationElement::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: void ns3::WifiInformationElement::SerializeInformation(ns3::Buffer::Iterator start) const [member function]
+ cls.add_method('SerializeInformation',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ return
+
+def register_Ns3MeshWifiInterfaceMacPlugin_methods(root_module, cls):
+ ## mesh-wifi-interface-mac-plugin.h: ns3::MeshWifiInterfaceMacPlugin::MeshWifiInterfaceMacPlugin() [constructor]
+ cls.add_constructor([])
+ ## mesh-wifi-interface-mac-plugin.h: ns3::MeshWifiInterfaceMacPlugin::MeshWifiInterfaceMacPlugin(ns3::MeshWifiInterfaceMacPlugin const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshWifiInterfaceMacPlugin const &', 'arg0')])
+ ## mesh-wifi-interface-mac-plugin.h: bool ns3::MeshWifiInterfaceMacPlugin::Receive(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader const & header) [member function]
+ cls.add_method('Receive',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const &', 'header')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-wifi-interface-mac-plugin.h: void ns3::MeshWifiInterfaceMacPlugin::SetParent(ns3::Ptr<ns3::MeshWifiInterfaceMac> parent) [member function]
+ cls.add_method('SetParent',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshWifiInterfaceMac >', 'parent')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-wifi-interface-mac-plugin.h: void ns3::MeshWifiInterfaceMacPlugin::UpdateBeacon(ns3::MeshWifiBeacon & beacon) const [member function]
+ cls.add_method('UpdateBeacon',
+ 'void',
+ [param('ns3::MeshWifiBeacon &', 'beacon')],
+ is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac-plugin.h: bool ns3::MeshWifiInterfaceMacPlugin::UpdateOutcomingFrame(ns3::Ptr<ns3::Packet> packet, ns3::WifiMacHeader & header, ns3::Mac48Address from, ns3::Mac48Address to) [member function]
+ cls.add_method('UpdateOutcomingFrame',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader &', 'header'), param('ns3::Mac48Address', 'from'), param('ns3::Mac48Address', 'to')],
+ is_pure_virtual=True, is_virtual=True)
+ return
+
+def register_Ns3WifiInformationElementVector_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ ## wifi-information-element-vector.h: ns3::WifiInformationElementVector::WifiInformationElementVector(ns3::WifiInformationElementVector const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::WifiInformationElementVector const &', 'arg0')])
+ ## wifi-information-element-vector.h: ns3::WifiInformationElementVector::WifiInformationElementVector() [constructor]
+ cls.add_constructor([])
+ ## wifi-information-element-vector.h: bool ns3::WifiInformationElementVector::AddInformationElement(ns3::Ptr<ns3::WifiInformationElement> element) [member function]
+ cls.add_method('AddInformationElement',
+ 'bool',
+ [param('ns3::Ptr< ns3::WifiInformationElement >', 'element')])
+ ## wifi-information-element-vector.h: __gnu_cxx::__normal_iterator<ns3::Ptr<ns3::WifiInformationElement>*,std::vector<ns3::Ptr<ns3::WifiInformationElement>, std::allocator<ns3::Ptr<ns3::WifiInformationElement> > > > ns3::WifiInformationElementVector::Begin() [member function]
+ cls.add_method('Begin',
+ '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::WifiInformationElement >, std::vector< ns3::Ptr< ns3::WifiInformationElement > > >',
+ [])
+ ## wifi-information-element-vector.h: uint32_t ns3::WifiInformationElementVector::Deserialize(ns3::Buffer::Iterator start) [member function]
+ cls.add_method('Deserialize',
+ 'uint32_t',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_virtual=True)
+ ## wifi-information-element-vector.h: uint32_t ns3::WifiInformationElementVector::DeserializeSingleIe(ns3::Buffer::Iterator start) [member function]
+ cls.add_method('DeserializeSingleIe',
+ 'uint32_t',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_virtual=True)
+ ## wifi-information-element-vector.h: __gnu_cxx::__normal_iterator<ns3::Ptr<ns3::WifiInformationElement>*,std::vector<ns3::Ptr<ns3::WifiInformationElement>, std::allocator<ns3::Ptr<ns3::WifiInformationElement> > > > ns3::WifiInformationElementVector::End() [member function]
+ cls.add_method('End',
+ '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::WifiInformationElement >, std::vector< ns3::Ptr< ns3::WifiInformationElement > > >',
+ [])
+ ## wifi-information-element-vector.h: ns3::Ptr<ns3::WifiInformationElement> ns3::WifiInformationElementVector::FindFirst(ns3::WifiElementId id) const [member function]
+ cls.add_method('FindFirst',
+ 'ns3::Ptr< ns3::WifiInformationElement >',
+ [param('ns3::WifiElementId', 'id')],
+ is_const=True)
+ ## wifi-information-element-vector.h: ns3::TypeId ns3::WifiInformationElementVector::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: uint32_t ns3::WifiInformationElementVector::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: static ns3::TypeId ns3::WifiInformationElementVector::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## wifi-information-element-vector.h: void ns3::WifiInformationElementVector::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: void ns3::WifiInformationElementVector::Serialize(ns3::Buffer::Iterator start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_const=True, is_virtual=True)
+ ## wifi-information-element-vector.h: void ns3::WifiInformationElementVector::SetMaxSize(uint16_t size) [member function]
+ cls.add_method('SetMaxSize',
+ 'void',
+ [param('uint16_t', 'size')])
+ return
+
+def register_Ns3MeshL2RoutingProtocol_methods(root_module, cls):
+ ## mesh-l2-routing-protocol.h: ns3::MeshL2RoutingProtocol::MeshL2RoutingProtocol() [constructor]
+ cls.add_constructor([])
+ ## mesh-l2-routing-protocol.h: ns3::MeshL2RoutingProtocol::MeshL2RoutingProtocol(ns3::MeshL2RoutingProtocol const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshL2RoutingProtocol const &', 'arg0')])
+ ## mesh-l2-routing-protocol.h: ns3::Ptr<ns3::MeshPointDevice> ns3::MeshL2RoutingProtocol::GetMeshPoint() const [member function]
+ cls.add_method('GetMeshPoint',
+ 'ns3::Ptr< ns3::MeshPointDevice >',
+ [],
+ is_const=True)
+ ## mesh-l2-routing-protocol.h: static ns3::TypeId ns3::MeshL2RoutingProtocol::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## mesh-l2-routing-protocol.h: bool ns3::MeshL2RoutingProtocol::RemoveRoutingStuff(uint32_t fromIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet> packet, uint16_t & protocolType) [member function]
+ cls.add_method('RemoveRoutingStuff',
+ 'bool',
+ [param('uint32_t', 'fromIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t &', 'protocolType')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-l2-routing-protocol.h: bool ns3::MeshL2RoutingProtocol::RequestRoute(uint32_t sourceIface, ns3::Mac48Address const source, ns3::Mac48Address const destination, ns3::Ptr<ns3::Packet const> packet, uint16_t protocolType, ns3::Callback<void, bool, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty> routeReply) [member function]
+ cls.add_method('RequestRoute',
+ 'bool',
+ [param('uint32_t', 'sourceIface'), param('ns3::Mac48Address const', 'source'), param('ns3::Mac48Address const', 'destination'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocolType'), param('ns3::Callback< void, bool, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, unsigned short, unsigned int, ns3::empty, ns3::empty, ns3::empty >', 'routeReply')],
+ is_pure_virtual=True, is_virtual=True)
+ ## mesh-l2-routing-protocol.h: void ns3::MeshL2RoutingProtocol::SetMeshPoint(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
+ cls.add_method('SetMeshPoint',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshPointDevice >', 'mp')])
+ return
+
+def register_Ns3MeshWifiInterfaceMac_methods(root_module, cls):
+ ## mesh-wifi-interface-mac.h: ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac(ns3::MeshWifiInterfaceMac const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshWifiInterfaceMac const &', 'arg0')])
+ ## mesh-wifi-interface-mac.h: ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac() [constructor]
+ cls.add_constructor([])
+ ## mesh-wifi-interface-mac.h: bool ns3::MeshWifiInterfaceMac::CheckSupportedRates(ns3::SupportedRates rates) const [member function]
+ cls.add_method('CheckSupportedRates',
+ 'bool',
+ [param('ns3::SupportedRates', 'rates')],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to, ns3::Mac48Address from) [member function]
+ cls.add_method('Enqueue',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::Enqueue(ns3::Ptr<ns3::Packet const> packet, ns3::Mac48Address to) [member function]
+ cls.add_method('Enqueue',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function]
+ cls.add_method('FinishConfigureStandard',
+ 'void',
+ [param('ns3::WifiPhyStandard', 'standard')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetAckTimeout() const [member function]
+ cls.add_method('GetAckTimeout',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Mac48Address ns3::MeshWifiInterfaceMac::GetAddress() const [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Mac48Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetBeaconInterval() const [member function]
+ cls.add_method('GetBeaconInterval',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: ns3::Mac48Address ns3::MeshWifiInterfaceMac::GetBssid() const [member function]
+ cls.add_method('GetBssid',
+ 'ns3::Mac48Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetCtsTimeout() const [member function]
+ cls.add_method('GetCtsTimeout',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetEifsNoDifs() const [member function]
+ cls.add_method('GetEifsNoDifs',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: uint16_t ns3::MeshWifiInterfaceMac::GetFrequencyChannel() const [member function]
+ cls.add_method('GetFrequencyChannel',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: uint32_t ns3::MeshWifiInterfaceMac::GetLinkMetric(ns3::Mac48Address peerAddress) [member function]
+ cls.add_method('GetLinkMetric',
+ 'uint32_t',
+ [param('ns3::Mac48Address', 'peerAddress')])
+ ## mesh-wifi-interface-mac.h: ns3::Mac48Address ns3::MeshWifiInterfaceMac::GetMeshPointAddress() const [member function]
+ cls.add_method('GetMeshPointAddress',
+ 'ns3::Mac48Address',
+ [],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetPifs() const [member function]
+ cls.add_method('GetPifs',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetSifs() const [member function]
+ cls.add_method('GetSifs',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetSlot() const [member function]
+ cls.add_method('GetSlot',
+ 'ns3::Time',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Ssid ns3::MeshWifiInterfaceMac::GetSsid() const [member function]
+ cls.add_method('GetSsid',
+ 'ns3::Ssid',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: ns3::Ptr<ns3::WifiRemoteStationManager> ns3::MeshWifiInterfaceMac::GetStationManager() [member function]
+ cls.add_method('GetStationManager',
+ 'ns3::Ptr< ns3::WifiRemoteStationManager >',
+ [])
+ ## mesh-wifi-interface-mac.h: ns3::SupportedRates ns3::MeshWifiInterfaceMac::GetSupportedRates() const [member function]
+ cls.add_method('GetSupportedRates',
+ 'ns3::SupportedRates',
+ [],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: ns3::Time ns3::MeshWifiInterfaceMac::GetTbtt() const [member function]
+ cls.add_method('GetTbtt',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: static ns3::TypeId ns3::MeshWifiInterfaceMac::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::InstallPlugin(ns3::Ptr<ns3::MeshWifiInterfaceMacPlugin> plugin) [member function]
+ cls.add_method('InstallPlugin',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshWifiInterfaceMacPlugin >', 'plugin')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::Report(std::ostream & arg0) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'arg0')],
+ is_const=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::ResetStats() [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SendManagementFrame(ns3::Ptr<ns3::Packet> frame, ns3::WifiMacHeader const & hdr) [member function]
+ cls.add_method('SendManagementFrame',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'frame'), param('ns3::WifiMacHeader const &', 'hdr')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetAckTimeout(ns3::Time ackTimeout) [member function]
+ cls.add_method('SetAckTimeout',
+ 'void',
+ [param('ns3::Time', 'ackTimeout')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetAddress(ns3::Mac48Address address) [member function]
+ cls.add_method('SetAddress',
+ 'void',
+ [param('ns3::Mac48Address', 'address')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetBeaconGeneration(bool enable) [member function]
+ cls.add_method('SetBeaconGeneration',
+ 'void',
+ [param('bool', 'enable')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetBeaconInterval(ns3::Time interval) [member function]
+ cls.add_method('SetBeaconInterval',
+ 'void',
+ [param('ns3::Time', 'interval')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetCtsTimeout(ns3::Time ctsTimeout) [member function]
+ cls.add_method('SetCtsTimeout',
+ 'void',
+ [param('ns3::Time', 'ctsTimeout')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function]
+ cls.add_method('SetEifsNoDifs',
+ 'void',
+ [param('ns3::Time', 'eifsNoDifs')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetForwardUpCallback(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> upCallback) [member function]
+ cls.add_method('SetForwardUpCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Mac48Address, ns3::Mac48Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'upCallback')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetLinkDownCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkDown) [member function]
+ cls.add_method('SetLinkDownCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkDown')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetLinkMetricCallback(ns3::Callback<unsigned int, ns3::Mac48Address, ns3::Ptr<ns3::MeshWifiInterfaceMac>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetLinkMetricCallback',
+ 'void',
+ [param('ns3::Callback< unsigned int, ns3::Mac48Address, ns3::Ptr< ns3::MeshWifiInterfaceMac >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetLinkUpCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> linkUp) [member function]
+ cls.add_method('SetLinkUpCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'linkUp')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetMeshPointAddress(ns3::Mac48Address arg0) [member function]
+ cls.add_method('SetMeshPointAddress',
+ 'void',
+ [param('ns3::Mac48Address', 'arg0')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetPifs(ns3::Time pifs) [member function]
+ cls.add_method('SetPifs',
+ 'void',
+ [param('ns3::Time', 'pifs')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetQueue(ns3::AccessClass ac) [member function]
+ cls.add_method('SetQueue',
+ 'void',
+ [param('ns3::AccessClass', 'ac')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetRandomStartDelay(ns3::Time interval) [member function]
+ cls.add_method('SetRandomStartDelay',
+ 'void',
+ [param('ns3::Time', 'interval')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetSifs(ns3::Time sifs) [member function]
+ cls.add_method('SetSifs',
+ 'void',
+ [param('ns3::Time', 'sifs')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetSlot(ns3::Time slotTime) [member function]
+ cls.add_method('SetSlot',
+ 'void',
+ [param('ns3::Time', 'slotTime')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetSsid(ns3::Ssid ssid) [member function]
+ cls.add_method('SetSsid',
+ 'void',
+ [param('ns3::Ssid', 'ssid')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetWifiPhy(ns3::Ptr<ns3::WifiPhy> phy) [member function]
+ cls.add_method('SetWifiPhy',
+ 'void',
+ [param('ns3::Ptr< ns3::WifiPhy >', 'phy')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SetWifiRemoteStationManager(ns3::Ptr<ns3::WifiRemoteStationManager> stationManager) [member function]
+ cls.add_method('SetWifiRemoteStationManager',
+ 'void',
+ [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')],
+ is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::ShiftTbtt(ns3::Time shift) [member function]
+ cls.add_method('ShiftTbtt',
+ 'void',
+ [param('ns3::Time', 'shift')])
+ ## mesh-wifi-interface-mac.h: bool ns3::MeshWifiInterfaceMac::SupportsSendFrom() const [member function]
+ cls.add_method('SupportsSendFrom',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(uint16_t new_id) [member function]
+ cls.add_method('SwitchFrequencyChannel',
+ 'void',
+ [param('uint16_t', 'new_id')])
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address src, ns3::Mac48Address dst) [member function]
+ cls.add_method('ForwardUp',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')],
+ visibility='private', is_virtual=True)
+ return
+
+def register_Ns3MeshPointDevice_methods(root_module, cls):
+ ## mesh-point-device.h: ns3::MeshPointDevice::MeshPointDevice(ns3::MeshPointDevice const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MeshPointDevice const &', 'arg0')])
+ ## mesh-point-device.h: ns3::MeshPointDevice::MeshPointDevice() [constructor]
+ cls.add_constructor([])
+ ## mesh-point-device.h: void ns3::MeshPointDevice::AddInterface(ns3::Ptr<ns3::NetDevice> port) [member function]
+ cls.add_method('AddInterface',
+ 'void',
+ [param('ns3::Ptr< ns3::NetDevice >', 'port')])
+ ## mesh-point-device.h: void ns3::MeshPointDevice::AddLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
+ cls.add_method('AddLinkChangeCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ is_virtual=True)
+ ## mesh-point-device.h: ns3::Address ns3::MeshPointDevice::GetAddress() const [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Address ns3::MeshPointDevice::GetBroadcast() const [member function]
+ cls.add_method('GetBroadcast',
+ 'ns3::Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Ptr<ns3::Channel> ns3::MeshPointDevice::GetChannel() const [member function]
+ cls.add_method('GetChannel',
+ 'ns3::Ptr< ns3::Channel >',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: uint32_t ns3::MeshPointDevice::GetIfIndex() const [member function]
+ cls.add_method('GetIfIndex',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Ptr<ns3::NetDevice> ns3::MeshPointDevice::GetInterface(uint32_t id) const [member function]
+ cls.add_method('GetInterface',
+ 'ns3::Ptr< ns3::NetDevice >',
+ [param('uint32_t', 'id')],
+ is_const=True)
+ ## mesh-point-device.h: std::vector<ns3::Ptr<ns3::NetDevice>, std::allocator<ns3::Ptr<ns3::NetDevice> > > ns3::MeshPointDevice::GetInterfaces() const [member function]
+ cls.add_method('GetInterfaces',
+ 'std::vector< ns3::Ptr< ns3::NetDevice > >',
+ [],
+ is_const=True)
+ ## mesh-point-device.h: uint16_t ns3::MeshPointDevice::GetMtu() const [member function]
+ cls.add_method('GetMtu',
+ 'uint16_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Address ns3::MeshPointDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
+ cls.add_method('GetMulticast',
+ 'ns3::Address',
+ [param('ns3::Ipv4Address', 'multicastGroup')],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Address ns3::MeshPointDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
+ cls.add_method('GetMulticast',
+ 'ns3::Address',
+ [param('ns3::Ipv6Address', 'addr')],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: uint32_t ns3::MeshPointDevice::GetNInterfaces() const [member function]
+ cls.add_method('GetNInterfaces',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## mesh-point-device.h: ns3::Ptr<ns3::Node> ns3::MeshPointDevice::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: ns3::Ptr<ns3::MeshL2RoutingProtocol> ns3::MeshPointDevice::GetRoutingProtocol() const [member function]
+ cls.add_method('GetRoutingProtocol',
+ 'ns3::Ptr< ns3::MeshL2RoutingProtocol >',
+ [],
+ is_const=True)
+ ## mesh-point-device.h: static ns3::TypeId ns3::MeshPointDevice::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::IsBridge() const [member function]
+ cls.add_method('IsBridge',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::IsBroadcast() const [member function]
+ cls.add_method('IsBroadcast',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::IsLinkUp() const [member function]
+ cls.add_method('IsLinkUp',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::IsMulticast() const [member function]
+ cls.add_method('IsMulticast',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::IsPointToPoint() const [member function]
+ cls.add_method('IsPointToPoint',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::NeedsArp() const [member function]
+ cls.add_method('NeedsArp',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::Report(std::ostream & os) const [member function]
+ cls.add_method('Report',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::ResetStats() [member function]
+ cls.add_method('ResetStats',
+ 'void',
+ [])
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+ cls.add_method('Send',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')],
+ is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+ cls.add_method('SendFrom',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetAddress(ns3::Address a) [member function]
+ cls.add_method('SetAddress',
+ 'void',
+ [param('ns3::Address', 'a')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetIfIndex(uint32_t const index) [member function]
+ cls.add_method('SetIfIndex',
+ 'void',
+ [param('uint32_t const', 'index')],
+ is_virtual=True)
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::SetMtu(uint16_t const mtu) [member function]
+ cls.add_method('SetMtu',
+ 'bool',
+ [param('uint16_t const', 'mtu')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetPromiscReceiveCallback',
+ 'void',
+ [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetReceiveCallback',
+ 'void',
+ [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')],
+ is_virtual=True)
+ ## mesh-point-device.h: void ns3::MeshPointDevice::SetRoutingProtocol(ns3::Ptr<ns3::MeshL2RoutingProtocol> protocol) [member function]
+ cls.add_method('SetRoutingProtocol',
+ 'void',
+ [param('ns3::Ptr< ns3::MeshL2RoutingProtocol >', 'protocol')])
+ ## mesh-point-device.h: bool ns3::MeshPointDevice::SupportsSendFrom() const [member function]
+ cls.add_method('SupportsSendFrom',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_mobility.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_mobility.py Thu Sep 24 10:57:41 2009 -0400
@@ -62,6 +62,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -86,6 +98,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -686,6 +706,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -699,6 +721,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_nix_vector_routing.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,180 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
+
+def register_types(module):
+ root_module = module.get_root()
+
+ ## ipv4-nix-vector-routing.h: ns3::Ipv4NixVectorRouting [class]
+ module.add_class('Ipv4NixVectorRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::NixVector >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::NixVector > > > >', 'ns3::NixMap_t')
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::NixVector >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::NixVector > > > >*', 'ns3::NixMap_t*')
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::NixVector >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::NixVector > > > >&', 'ns3::NixMap_t&')
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::Ipv4Route >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::Ipv4Route > > > >', 'ns3::Ipv4RouteMap_t')
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::Ipv4Route >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::Ipv4Route > > > >*', 'ns3::Ipv4RouteMap_t*')
+ typehandlers.add_type_alias('std::map< ns3::Ipv4Address, ns3::Ptr< ns3::Ipv4Route >, std::less< ns3::Ipv4Address >, std::allocator< std::pair< ns3::Ipv4Address const, ns3::Ptr< ns3::Ipv4Route > > > >&', 'ns3::Ipv4RouteMap_t&')
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace addressUtils
+
+ nested_module = module.add_cpp_namespace('addressUtils')
+ register_types_ns3_addressUtils(nested_module)
+
+
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_addressUtils(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3Ipv4NixVectorRouting_methods(root_module, root_module['ns3::Ipv4NixVectorRouting'])
+ return
+
+def register_Ns3Ipv4NixVectorRouting_methods(root_module, cls):
+ ## ipv4-nix-vector-routing.h: ns3::Ipv4NixVectorRouting::Ipv4NixVectorRouting(ns3::Ipv4NixVectorRouting const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Ipv4NixVectorRouting const &', 'arg0')])
+ ## ipv4-nix-vector-routing.h: ns3::Ipv4NixVectorRouting::Ipv4NixVectorRouting() [constructor]
+ cls.add_constructor([])
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::FlushGlobalNixRoutingCache() [member function]
+ cls.add_method('FlushGlobalNixRoutingCache',
+ 'void',
+ [])
+ ## ipv4-nix-vector-routing.h: static ns3::TypeId ns3::Ipv4NixVectorRouting::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::SetNode(ns3::Ptr<ns3::Node> arg0) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'arg0')])
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
+ cls.add_method('NotifyAddAddress',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::NotifyInterfaceDown(uint32_t interface) [member function]
+ cls.add_method('NotifyInterfaceDown',
+ 'void',
+ [param('uint32_t', 'interface')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::NotifyInterfaceUp(uint32_t interface) [member function]
+ cls.add_method('NotifyInterfaceUp',
+ 'void',
+ [param('uint32_t', 'interface')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function]
+ cls.add_method('NotifyRemoveAddress',
+ 'void',
+ [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: bool ns3::Ipv4NixVectorRouting::RouteInput(ns3::Ptr<ns3::Packet const> p, ns3::Ipv4Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv4Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv4MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv4Header&,ns3::Socket::SocketErrno,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::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: ns3::Ptr<ns3::Ipv4Route> ns3::Ipv4NixVectorRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv4Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function]
+ cls.add_method('RouteOutput',
+ 'ns3::Ptr< ns3::Ipv4Route >',
+ [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')],
+ visibility='private', is_virtual=True)
+ ## ipv4-nix-vector-routing.h: void ns3::Ipv4NixVectorRouting::SetIpv4(ns3::Ptr<ns3::Ipv4> ipv4) [member function]
+ cls.add_method('SetIpv4',
+ 'void',
+ [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')],
+ visibility='private', is_virtual=True)
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
+ register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_addressUtils(module, root_module):
+ return
+
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_node.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_node.py Thu Sep 24 10:57:41 2009 -0400
@@ -3,6 +3,8 @@
def register_types(module):
root_module = module.get_root()
+ ## packetbb.h: ns3::PbbAddressLength [enumeration]
+ module.add_enum('PbbAddressLength', ['IPV4', 'IPV6'])
## ethernet-header.h: ns3::ethernet_header_t [enumeration]
module.add_enum('ethernet_header_t', ['LENGTH', 'VLAN', 'QINQ'])
## address.h: ns3::Address [class]
@@ -55,6 +57,24 @@
module.add_class('PacketSocketAddress')
## packet-socket-address.h: ns3::PacketSocketAddress [class]
root_module['ns3::PacketSocketAddress'].implicitly_converts_to(root_module['ns3::Address'])
+ ## packetbb.h: ns3::PbbAddressBlock [class]
+ module.add_class('PbbAddressBlock', allow_subclassing=True)
+ ## packetbb.h: ns3::PbbAddressBlockIpv4 [class]
+ module.add_class('PbbAddressBlockIpv4', parent=root_module['ns3::PbbAddressBlock'])
+ ## packetbb.h: ns3::PbbAddressBlockIpv6 [class]
+ module.add_class('PbbAddressBlockIpv6', parent=root_module['ns3::PbbAddressBlock'])
+ ## packetbb.h: ns3::PbbAddressTlvBlock [class]
+ module.add_class('PbbAddressTlvBlock')
+ ## packetbb.h: ns3::PbbMessage [class]
+ module.add_class('PbbMessage', allow_subclassing=True)
+ ## packetbb.h: ns3::PbbMessageIpv4 [class]
+ module.add_class('PbbMessageIpv4', parent=root_module['ns3::PbbMessage'])
+ ## packetbb.h: ns3::PbbMessageIpv6 [class]
+ module.add_class('PbbMessageIpv6', parent=root_module['ns3::PbbMessage'])
+ ## packetbb.h: ns3::PbbTlv [class]
+ module.add_class('PbbTlv')
+ ## packetbb.h: ns3::PbbTlvBlock [class]
+ module.add_class('PbbTlvBlock')
## ipv4-address.h: ns3::Ipv4AddressChecker [class]
module.add_class('Ipv4AddressChecker', parent=root_module['ns3::AttributeChecker'])
## ipv4-address.h: ns3::Ipv4AddressValue [class]
@@ -91,6 +111,10 @@
module.add_class('Mac48AddressChecker', parent=root_module['ns3::AttributeChecker'])
## mac48-address.h: ns3::Mac48AddressValue [class]
module.add_class('Mac48AddressValue', parent=root_module['ns3::AttributeValue'])
+ ## packetbb.h: ns3::PbbAddressTlv [class]
+ module.add_class('PbbAddressTlv', parent=root_module['ns3::PbbTlv'])
+ ## packetbb.h: ns3::PbbPacket [class]
+ module.add_class('PbbPacket', parent=root_module['ns3::Header'])
## queue.h: ns3::Queue [class]
module.add_class('Queue', parent=root_module['ns3::Object'])
## socket.h: ns3::Socket [class]
@@ -174,6 +198,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -198,6 +234,15 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+ module.add_container('std::vector< ns3::Mac48Address >', 'ns3::Mac48Address', container_type='vector')
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -221,6 +266,15 @@
register_Ns3Mac64Address_methods(root_module, root_module['ns3::Mac64Address'])
register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
register_Ns3PacketSocketAddress_methods(root_module, root_module['ns3::PacketSocketAddress'])
+ register_Ns3PbbAddressBlock_methods(root_module, root_module['ns3::PbbAddressBlock'])
+ register_Ns3PbbAddressBlockIpv4_methods(root_module, root_module['ns3::PbbAddressBlockIpv4'])
+ register_Ns3PbbAddressBlockIpv6_methods(root_module, root_module['ns3::PbbAddressBlockIpv6'])
+ register_Ns3PbbAddressTlvBlock_methods(root_module, root_module['ns3::PbbAddressTlvBlock'])
+ register_Ns3PbbMessage_methods(root_module, root_module['ns3::PbbMessage'])
+ register_Ns3PbbMessageIpv4_methods(root_module, root_module['ns3::PbbMessageIpv4'])
+ register_Ns3PbbMessageIpv6_methods(root_module, root_module['ns3::PbbMessageIpv6'])
+ register_Ns3PbbTlv_methods(root_module, root_module['ns3::PbbTlv'])
+ register_Ns3PbbTlvBlock_methods(root_module, root_module['ns3::PbbTlvBlock'])
register_Ns3Ipv4AddressChecker_methods(root_module, root_module['ns3::Ipv4AddressChecker'])
register_Ns3Ipv4AddressValue_methods(root_module, root_module['ns3::Ipv4AddressValue'])
register_Ns3Ipv4Header_methods(root_module, root_module['ns3::Ipv4Header'])
@@ -238,6 +292,8 @@
register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker'])
register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue'])
+ register_Ns3PbbAddressTlv_methods(root_module, root_module['ns3::PbbAddressTlv'])
+ register_Ns3PbbPacket_methods(root_module, root_module['ns3::PbbPacket'])
register_Ns3Queue_methods(root_module, root_module['ns3::Queue'])
register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag'])
@@ -1163,6 +1219,1021 @@
[param('uint32_t', 'device')])
return
+def register_Ns3PbbAddressBlock_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbAddressBlock::PbbAddressBlock(ns3::PbbAddressBlock const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbAddressBlock const &', 'arg0')])
+ ## packetbb.h: ns3::PbbAddressBlock::PbbAddressBlock() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Address ns3::PbbAddressBlock::AddressBack() const [member function]
+ cls.add_method('AddressBack',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Address> ns3::PbbAddressBlock::AddressBegin() [member function]
+ cls.add_method('AddressBegin',
+ 'std::_List_iterator< ns3::Address >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Address> ns3::PbbAddressBlock::AddressBegin() const [member function]
+ cls.add_method('AddressBegin',
+ 'std::_List_const_iterator< ns3::Address >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::AddressClear() [member function]
+ cls.add_method('AddressClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbAddressBlock::AddressEmpty() const [member function]
+ cls.add_method('AddressEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Address> ns3::PbbAddressBlock::AddressEnd() [member function]
+ cls.add_method('AddressEnd',
+ 'std::_List_iterator< ns3::Address >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Address> ns3::PbbAddressBlock::AddressEnd() const [member function]
+ cls.add_method('AddressEnd',
+ 'std::_List_const_iterator< ns3::Address >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Address> ns3::PbbAddressBlock::AddressErase(std::_List_iterator<ns3::Address> position) [member function]
+ cls.add_method('AddressErase',
+ 'std::_List_iterator< ns3::Address >',
+ [param('std::_List_iterator< ns3::Address >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Address> ns3::PbbAddressBlock::AddressErase(std::_List_iterator<ns3::Address> first, std::_List_iterator<ns3::Address> last) [member function]
+ cls.add_method('AddressErase',
+ 'std::_List_iterator< ns3::Address >',
+ [param('std::_List_iterator< ns3::Address >', 'first'), param('std::_List_iterator< ns3::Address >', 'last')])
+ ## packetbb.h: ns3::Address ns3::PbbAddressBlock::AddressFront() const [member function]
+ cls.add_method('AddressFront',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Address> ns3::PbbAddressBlock::AddressInsert(std::_List_iterator<ns3::Address> position, ns3::Address const value) [member function]
+ cls.add_method('AddressInsert',
+ 'std::_List_iterator< ns3::Address >',
+ [param('std::_List_iterator< ns3::Address >', 'position'), param('ns3::Address const', 'value')])
+ ## packetbb.h: void ns3::PbbAddressBlock::AddressPopBack() [member function]
+ cls.add_method('AddressPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::AddressPopFront() [member function]
+ cls.add_method('AddressPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::AddressPushBack(ns3::Address address) [member function]
+ cls.add_method('AddressPushBack',
+ 'void',
+ [param('ns3::Address', 'address')])
+ ## packetbb.h: void ns3::PbbAddressBlock::AddressPushFront(ns3::Address address) [member function]
+ cls.add_method('AddressPushFront',
+ 'void',
+ [param('ns3::Address', 'address')])
+ ## packetbb.h: int ns3::PbbAddressBlock::AddressSize() const [member function]
+ cls.add_method('AddressSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Deserialize(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')])
+ ## packetbb.h: uint32_t ns3::PbbAddressBlock::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbAddressBlock::PrefixBack() const [member function]
+ cls.add_method('PrefixBack',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<unsigned char> ns3::PbbAddressBlock::PrefixBegin() [member function]
+ cls.add_method('PrefixBegin',
+ 'std::_List_iterator< unsigned char >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<unsigned char> ns3::PbbAddressBlock::PrefixBegin() const [member function]
+ cls.add_method('PrefixBegin',
+ 'std::_List_const_iterator< unsigned char >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::PrefixClear() [member function]
+ cls.add_method('PrefixClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbAddressBlock::PrefixEmpty() const [member function]
+ cls.add_method('PrefixEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<unsigned char> ns3::PbbAddressBlock::PrefixEnd() [member function]
+ cls.add_method('PrefixEnd',
+ 'std::_List_iterator< unsigned char >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<unsigned char> ns3::PbbAddressBlock::PrefixEnd() const [member function]
+ cls.add_method('PrefixEnd',
+ 'std::_List_const_iterator< unsigned char >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<unsigned char> ns3::PbbAddressBlock::PrefixErase(std::_List_iterator<unsigned char> position) [member function]
+ cls.add_method('PrefixErase',
+ 'std::_List_iterator< unsigned char >',
+ [param('std::_List_iterator< unsigned char >', 'position')])
+ ## packetbb.h: std::_List_iterator<unsigned char> ns3::PbbAddressBlock::PrefixErase(std::_List_iterator<unsigned char> first, std::_List_iterator<unsigned char> last) [member function]
+ cls.add_method('PrefixErase',
+ 'std::_List_iterator< unsigned char >',
+ [param('std::_List_iterator< unsigned char >', 'first'), param('std::_List_iterator< unsigned char >', 'last')])
+ ## packetbb.h: uint8_t ns3::PbbAddressBlock::PrefixFront() const [member function]
+ cls.add_method('PrefixFront',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<unsigned char> ns3::PbbAddressBlock::PrefixInsert(std::_List_iterator<unsigned char> position, uint8_t const value) [member function]
+ cls.add_method('PrefixInsert',
+ 'std::_List_iterator< unsigned char >',
+ [param('std::_List_iterator< unsigned char >', 'position'), param('uint8_t const', 'value')])
+ ## packetbb.h: void ns3::PbbAddressBlock::PrefixPopBack() [member function]
+ cls.add_method('PrefixPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::PrefixPopFront() [member function]
+ cls.add_method('PrefixPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::PrefixPushBack(uint8_t prefix) [member function]
+ cls.add_method('PrefixPushBack',
+ 'void',
+ [param('uint8_t', 'prefix')])
+ ## packetbb.h: void ns3::PbbAddressBlock::PrefixPushFront(uint8_t prefix) [member function]
+ cls.add_method('PrefixPushFront',
+ 'void',
+ [param('uint8_t', 'prefix')])
+ ## packetbb.h: int ns3::PbbAddressBlock::PrefixSize() const [member function]
+ cls.add_method('PrefixSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Print(std::ostream & os, int level) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'level')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Ref() const [member function]
+ cls.add_method('Ref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Serialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True)
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> ns3::PbbAddressBlock::TlvBack() [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbAddressTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> const ns3::PbbAddressBlock::TlvBack() const [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbAddressTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvBegin() [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvBegin() const [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::TlvClear() [member function]
+ cls.add_method('TlvClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbAddressBlock::TlvEmpty() const [member function]
+ cls.add_method('TlvEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvEnd() [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvEnd() const [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvErase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > position) [member function]
+ cls.add_method('TlvErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvErase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > first, std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > last) [member function]
+ cls.add_method('TlvErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'last')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> ns3::PbbAddressBlock::TlvFront() [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbAddressTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> const ns3::PbbAddressBlock::TlvFront() const [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbAddressTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressBlock::TlvInsert(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > position, ns3::Ptr<ns3::PbbTlv> const value) [member function]
+ cls.add_method('TlvInsert',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'position'), param('ns3::Ptr< ns3::PbbTlv > const', 'value')])
+ ## packetbb.h: void ns3::PbbAddressBlock::TlvPopBack() [member function]
+ cls.add_method('TlvPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::TlvPopFront() [member function]
+ cls.add_method('TlvPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressBlock::TlvPushBack(ns3::Ptr<ns3::PbbAddressTlv> address) [member function]
+ cls.add_method('TlvPushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressTlv >', 'address')])
+ ## packetbb.h: void ns3::PbbAddressBlock::TlvPushFront(ns3::Ptr<ns3::PbbAddressTlv> address) [member function]
+ cls.add_method('TlvPushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressTlv >', 'address')])
+ ## packetbb.h: int ns3::PbbAddressBlock::TlvSize() const [member function]
+ cls.add_method('TlvSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::Unref() const [member function]
+ cls.add_method('Unref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Address ns3::PbbAddressBlock::DeserializeAddress(uint8_t * buffer) const [member function]
+ cls.add_method('DeserializeAddress',
+ 'ns3::Address',
+ [param('uint8_t *', 'buffer')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: uint8_t ns3::PbbAddressBlock::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'uint8_t',
+ [],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::PrintAddress(std::ostream & os, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('PrintAddress',
+ 'void',
+ [param('std::ostream &', 'os'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlock::SerializeAddress(uint8_t * buffer, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('SerializeAddress',
+ 'void',
+ [param('uint8_t *', 'buffer'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbAddressBlockIpv4_methods(root_module, cls):
+ ## packetbb.h: ns3::PbbAddressBlockIpv4::PbbAddressBlockIpv4(ns3::PbbAddressBlockIpv4 const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbAddressBlockIpv4 const &', 'arg0')])
+ ## packetbb.h: ns3::PbbAddressBlockIpv4::PbbAddressBlockIpv4() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Address ns3::PbbAddressBlockIpv4::DeserializeAddress(uint8_t * buffer) const [member function]
+ cls.add_method('DeserializeAddress',
+ 'ns3::Address',
+ [param('uint8_t *', 'buffer')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: uint8_t ns3::PbbAddressBlockIpv4::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'uint8_t',
+ [],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlockIpv4::PrintAddress(std::ostream & os, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('PrintAddress',
+ 'void',
+ [param('std::ostream &', 'os'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlockIpv4::SerializeAddress(uint8_t * buffer, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('SerializeAddress',
+ 'void',
+ [param('uint8_t *', 'buffer'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbAddressBlockIpv6_methods(root_module, cls):
+ ## packetbb.h: ns3::PbbAddressBlockIpv6::PbbAddressBlockIpv6(ns3::PbbAddressBlockIpv6 const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbAddressBlockIpv6 const &', 'arg0')])
+ ## packetbb.h: ns3::PbbAddressBlockIpv6::PbbAddressBlockIpv6() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Address ns3::PbbAddressBlockIpv6::DeserializeAddress(uint8_t * buffer) const [member function]
+ cls.add_method('DeserializeAddress',
+ 'ns3::Address',
+ [param('uint8_t *', 'buffer')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: uint8_t ns3::PbbAddressBlockIpv6::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'uint8_t',
+ [],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlockIpv6::PrintAddress(std::ostream & os, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('PrintAddress',
+ 'void',
+ [param('std::ostream &', 'os'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbAddressBlockIpv6::SerializeAddress(uint8_t * buffer, std::_List_const_iterator<ns3::Address> iter) const [member function]
+ cls.add_method('SerializeAddress',
+ 'void',
+ [param('uint8_t *', 'buffer'), param('std::_List_const_iterator< ns3::Address >', 'iter')],
+ is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbAddressTlvBlock_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbAddressTlvBlock::PbbAddressTlvBlock() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::PbbAddressTlvBlock::PbbAddressTlvBlock(ns3::PbbAddressTlvBlock const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbAddressTlvBlock const &', 'arg0')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> ns3::PbbAddressTlvBlock::Back() const [member function]
+ cls.add_method('Back',
+ 'ns3::Ptr< ns3::PbbAddressTlv >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::Begin() [member function]
+ cls.add_method('Begin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::Begin() const [member function]
+ cls.add_method('Begin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::Clear() [member function]
+ cls.add_method('Clear',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::Deserialize(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')])
+ ## packetbb.h: bool ns3::PbbAddressTlvBlock::Empty() const [member function]
+ cls.add_method('Empty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::End() [member function]
+ cls.add_method('End',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::End() const [member function]
+ cls.add_method('End',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > position) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > first, std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > last) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'last')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressTlv> ns3::PbbAddressTlvBlock::Front() const [member function]
+ cls.add_method('Front',
+ 'ns3::Ptr< ns3::PbbAddressTlv >',
+ [],
+ is_const=True)
+ ## packetbb.h: uint32_t ns3::PbbAddressTlvBlock::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > ns3::PbbAddressTlvBlock::Insert(std::_List_iterator<ns3::Ptr<ns3::PbbAddressTlv> > position, ns3::Ptr<ns3::PbbAddressTlv> const tlv) [member function]
+ cls.add_method('Insert',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressTlv > >', 'position'), param('ns3::Ptr< ns3::PbbAddressTlv > const', 'tlv')])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::PopBack() [member function]
+ cls.add_method('PopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::PopFront() [member function]
+ cls.add_method('PopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::Print(std::ostream & os, int level) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'level')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::PushBack(ns3::Ptr<ns3::PbbAddressTlv> tlv) [member function]
+ cls.add_method('PushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::PushFront(ns3::Ptr<ns3::PbbAddressTlv> tlv) [member function]
+ cls.add_method('PushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbAddressTlvBlock::Serialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True)
+ ## packetbb.h: int ns3::PbbAddressTlvBlock::Size() const [member function]
+ cls.add_method('Size',
+ 'int',
+ [],
+ is_const=True)
+ return
+
+def register_Ns3PbbMessage_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbMessage::PbbMessage(ns3::PbbMessage const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbMessage const &', 'arg0')])
+ ## packetbb.h: ns3::PbbMessage::PbbMessage() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> ns3::PbbMessage::AddressBlockBack() [member function]
+ cls.add_method('AddressBlockBack',
+ 'ns3::Ptr< ns3::PbbAddressBlock >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> const ns3::PbbMessage::AddressBlockBack() const [member function]
+ cls.add_method('AddressBlockBack',
+ 'ns3::Ptr< ns3::PbbAddressBlock > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockBegin() [member function]
+ cls.add_method('AddressBlockBegin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockBegin() const [member function]
+ cls.add_method('AddressBlockBegin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::AddressBlockClear() [member function]
+ cls.add_method('AddressBlockClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbMessage::AddressBlockEmpty() const [member function]
+ cls.add_method('AddressBlockEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockEnd() [member function]
+ cls.add_method('AddressBlockEnd',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockEnd() const [member function]
+ cls.add_method('AddressBlockEnd',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockErase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > position) [member function]
+ cls.add_method('AddressBlockErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > ns3::PbbMessage::AddressBlockErase(std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > first, std::_List_iterator<ns3::Ptr<ns3::PbbAddressBlock> > last) [member function]
+ cls.add_method('AddressBlockErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbAddressBlock > >', 'last')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> ns3::PbbMessage::AddressBlockFront() [member function]
+ cls.add_method('AddressBlockFront',
+ 'ns3::Ptr< ns3::PbbAddressBlock >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> const ns3::PbbMessage::AddressBlockFront() const [member function]
+ cls.add_method('AddressBlockFront',
+ 'ns3::Ptr< ns3::PbbAddressBlock > const',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::AddressBlockPopBack() [member function]
+ cls.add_method('AddressBlockPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbMessage::AddressBlockPopFront() [member function]
+ cls.add_method('AddressBlockPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbMessage::AddressBlockPushBack(ns3::Ptr<ns3::PbbAddressBlock> block) [member function]
+ cls.add_method('AddressBlockPushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressBlock >', 'block')])
+ ## packetbb.h: void ns3::PbbMessage::AddressBlockPushFront(ns3::Ptr<ns3::PbbAddressBlock> block) [member function]
+ cls.add_method('AddressBlockPushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbAddressBlock >', 'block')])
+ ## packetbb.h: int ns3::PbbMessage::AddressBlockSize() const [member function]
+ cls.add_method('AddressBlockSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Deserialize(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')])
+ ## packetbb.h: static ns3::Ptr<ns3::PbbMessage> ns3::PbbMessage::DeserializeMessage(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('DeserializeMessage',
+ 'ns3::Ptr< ns3::PbbMessage >',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_static=True)
+ ## packetbb.h: uint8_t ns3::PbbMessage::GetHopCount() const [member function]
+ cls.add_method('GetHopCount',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbMessage::GetHopLimit() const [member function]
+ cls.add_method('GetHopLimit',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Address ns3::PbbMessage::GetOriginatorAddress() const [member function]
+ cls.add_method('GetOriginatorAddress',
+ 'ns3::Address',
+ [],
+ is_const=True)
+ ## packetbb.h: uint16_t ns3::PbbMessage::GetSequenceNumber() const [member function]
+ cls.add_method('GetSequenceNumber',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint32_t ns3::PbbMessage::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbMessage::GetType() const [member function]
+ cls.add_method('GetType',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbMessage::HasHopCount() const [member function]
+ cls.add_method('HasHopCount',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbMessage::HasHopLimit() const [member function]
+ cls.add_method('HasHopLimit',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbMessage::HasOriginatorAddress() const [member function]
+ cls.add_method('HasOriginatorAddress',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbMessage::HasSequenceNumber() const [member function]
+ cls.add_method('HasSequenceNumber',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Print(std::ostream & os, int level) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'level')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Ref() const [member function]
+ cls.add_method('Ref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Serialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::SetHopCount(uint8_t hopcount) [member function]
+ cls.add_method('SetHopCount',
+ 'void',
+ [param('uint8_t', 'hopcount')])
+ ## packetbb.h: void ns3::PbbMessage::SetHopLimit(uint8_t hoplimit) [member function]
+ cls.add_method('SetHopLimit',
+ 'void',
+ [param('uint8_t', 'hoplimit')])
+ ## packetbb.h: void ns3::PbbMessage::SetOriginatorAddress(ns3::Address address) [member function]
+ cls.add_method('SetOriginatorAddress',
+ 'void',
+ [param('ns3::Address', 'address')])
+ ## packetbb.h: void ns3::PbbMessage::SetSequenceNumber(uint16_t seqnum) [member function]
+ cls.add_method('SetSequenceNumber',
+ 'void',
+ [param('uint16_t', 'seqnum')])
+ ## packetbb.h: void ns3::PbbMessage::SetType(uint8_t type) [member function]
+ cls.add_method('SetType',
+ 'void',
+ [param('uint8_t', 'type')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbMessage::TlvBack() [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> const ns3::PbbMessage::TlvBack() const [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvBegin() [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvBegin() const [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::TlvClear() [member function]
+ cls.add_method('TlvClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbMessage::TlvEmpty() const [member function]
+ cls.add_method('TlvEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvEnd() [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvEnd() const [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvErase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > position) [member function]
+ cls.add_method('TlvErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbMessage::TlvErase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > first, std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > last) [member function]
+ cls.add_method('TlvErase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'last')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbMessage::TlvFront() [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> const ns3::PbbMessage::TlvFront() const [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::TlvPopBack() [member function]
+ cls.add_method('TlvPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbMessage::TlvPopFront() [member function]
+ cls.add_method('TlvPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbMessage::TlvPushBack(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('TlvPushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbMessage::TlvPushFront(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('TlvPushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: int ns3::PbbMessage::TlvSize() const [member function]
+ cls.add_method('TlvSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbMessage::Unref() const [member function]
+ cls.add_method('Unref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> ns3::PbbMessage::AddressBlockDeserialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('AddressBlockDeserialize',
+ 'ns3::Ptr< ns3::PbbAddressBlock >',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::Address ns3::PbbMessage::DeserializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('DeserializeOriginatorAddress',
+ 'ns3::Address',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::PbbAddressLength ns3::PbbMessage::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'ns3::PbbAddressLength',
+ [],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessage::PrintOriginatorAddress(std::ostream & os) const [member function]
+ cls.add_method('PrintOriginatorAddress',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessage::SerializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('SerializeOriginatorAddress',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_pure_virtual=True, is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbMessageIpv4_methods(root_module, cls):
+ ## packetbb.h: ns3::PbbMessageIpv4::PbbMessageIpv4(ns3::PbbMessageIpv4 const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbMessageIpv4 const &', 'arg0')])
+ ## packetbb.h: ns3::PbbMessageIpv4::PbbMessageIpv4() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> ns3::PbbMessageIpv4::AddressBlockDeserialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('AddressBlockDeserialize',
+ 'ns3::Ptr< ns3::PbbAddressBlock >',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::Address ns3::PbbMessageIpv4::DeserializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('DeserializeOriginatorAddress',
+ 'ns3::Address',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::PbbAddressLength ns3::PbbMessageIpv4::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'ns3::PbbAddressLength',
+ [],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessageIpv4::PrintOriginatorAddress(std::ostream & os) const [member function]
+ cls.add_method('PrintOriginatorAddress',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessageIpv4::SerializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('SerializeOriginatorAddress',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbMessageIpv6_methods(root_module, cls):
+ ## packetbb.h: ns3::PbbMessageIpv6::PbbMessageIpv6(ns3::PbbMessageIpv6 const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbMessageIpv6 const &', 'arg0')])
+ ## packetbb.h: ns3::PbbMessageIpv6::PbbMessageIpv6() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::Ptr<ns3::PbbAddressBlock> ns3::PbbMessageIpv6::AddressBlockDeserialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('AddressBlockDeserialize',
+ 'ns3::Ptr< ns3::PbbAddressBlock >',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::Address ns3::PbbMessageIpv6::DeserializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('DeserializeOriginatorAddress',
+ 'ns3::Address',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: ns3::PbbAddressLength ns3::PbbMessageIpv6::GetAddressLength() const [member function]
+ cls.add_method('GetAddressLength',
+ 'ns3::PbbAddressLength',
+ [],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessageIpv6::PrintOriginatorAddress(std::ostream & os) const [member function]
+ cls.add_method('PrintOriginatorAddress',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, visibility='protected', is_virtual=True)
+ ## packetbb.h: void ns3::PbbMessageIpv6::SerializeOriginatorAddress(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('SerializeOriginatorAddress',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected', is_virtual=True)
+ return
+
+def register_Ns3PbbTlv_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbTlv::PbbTlv(ns3::PbbTlv const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbTlv const &', 'arg0')])
+ ## packetbb.h: ns3::PbbTlv::PbbTlv() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: void ns3::PbbTlv::Deserialize(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')])
+ ## packetbb.h: uint32_t ns3::PbbTlv::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbTlv::GetType() const [member function]
+ cls.add_method('GetType',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbTlv::GetTypeExt() const [member function]
+ cls.add_method('GetTypeExt',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Buffer ns3::PbbTlv::GetValue() const [member function]
+ cls.add_method('GetValue',
+ 'ns3::Buffer',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbTlv::HasTypeExt() const [member function]
+ cls.add_method('HasTypeExt',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbTlv::HasValue() const [member function]
+ cls.add_method('HasValue',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlv::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlv::Print(std::ostream & os, int level) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'level')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlv::Ref() const [member function]
+ cls.add_method('Ref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlv::Serialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlv::SetType(uint8_t type) [member function]
+ cls.add_method('SetType',
+ 'void',
+ [param('uint8_t', 'type')])
+ ## packetbb.h: void ns3::PbbTlv::SetTypeExt(uint8_t type) [member function]
+ cls.add_method('SetTypeExt',
+ 'void',
+ [param('uint8_t', 'type')])
+ ## packetbb.h: void ns3::PbbTlv::SetValue(ns3::Buffer start) [member function]
+ cls.add_method('SetValue',
+ 'void',
+ [param('ns3::Buffer', 'start')])
+ ## packetbb.h: void ns3::PbbTlv::SetValue(uint8_t const * buffer, uint32_t size) [member function]
+ cls.add_method('SetValue',
+ 'void',
+ [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
+ ## packetbb.h: void ns3::PbbTlv::Unref() const [member function]
+ cls.add_method('Unref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbTlv::GetIndexStart() const [member function]
+ cls.add_method('GetIndexStart',
+ 'uint8_t',
+ [],
+ is_const=True, visibility='protected')
+ ## packetbb.h: uint8_t ns3::PbbTlv::GetIndexStop() const [member function]
+ cls.add_method('GetIndexStop',
+ 'uint8_t',
+ [],
+ is_const=True, visibility='protected')
+ ## packetbb.h: bool ns3::PbbTlv::HasIndexStart() const [member function]
+ cls.add_method('HasIndexStart',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## packetbb.h: bool ns3::PbbTlv::HasIndexStop() const [member function]
+ cls.add_method('HasIndexStop',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## packetbb.h: bool ns3::PbbTlv::IsMultivalue() const [member function]
+ cls.add_method('IsMultivalue',
+ 'bool',
+ [],
+ is_const=True, visibility='protected')
+ ## packetbb.h: void ns3::PbbTlv::SetIndexStart(uint8_t index) [member function]
+ cls.add_method('SetIndexStart',
+ 'void',
+ [param('uint8_t', 'index')],
+ visibility='protected')
+ ## packetbb.h: void ns3::PbbTlv::SetIndexStop(uint8_t index) [member function]
+ cls.add_method('SetIndexStop',
+ 'void',
+ [param('uint8_t', 'index')],
+ visibility='protected')
+ ## packetbb.h: void ns3::PbbTlv::SetMultivalue(bool isMultivalue) [member function]
+ cls.add_method('SetMultivalue',
+ 'void',
+ [param('bool', 'isMultivalue')],
+ visibility='protected')
+ return
+
+def register_Ns3PbbTlvBlock_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbTlvBlock::PbbTlvBlock() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::PbbTlvBlock::PbbTlvBlock(ns3::PbbTlvBlock const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbTlvBlock const &', 'arg0')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbTlvBlock::Back() const [member function]
+ cls.add_method('Back',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::Begin() [member function]
+ cls.add_method('Begin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::Begin() const [member function]
+ cls.add_method('Begin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlvBlock::Clear() [member function]
+ cls.add_method('Clear',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbTlvBlock::Deserialize(ns3::Buffer::Iterator & start) [member function]
+ cls.add_method('Deserialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')])
+ ## packetbb.h: bool ns3::PbbTlvBlock::Empty() const [member function]
+ cls.add_method('Empty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::End() [member function]
+ cls.add_method('End',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::End() const [member function]
+ cls.add_method('End',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > position) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > first, std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > last) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'last')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbTlvBlock::Front() const [member function]
+ cls.add_method('Front',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [],
+ is_const=True)
+ ## packetbb.h: uint32_t ns3::PbbTlvBlock::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbTlvBlock::Insert(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > position, ns3::Ptr<ns3::PbbTlv> const tlv) [member function]
+ cls.add_method('Insert',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'position'), param('ns3::Ptr< ns3::PbbTlv > const', 'tlv')])
+ ## packetbb.h: void ns3::PbbTlvBlock::PopBack() [member function]
+ cls.add_method('PopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbTlvBlock::PopFront() [member function]
+ cls.add_method('PopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbTlvBlock::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlvBlock::Print(std::ostream & os, int level) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os'), param('int', 'level')],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbTlvBlock::PushBack(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('PushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbTlvBlock::PushFront(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('PushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbTlvBlock::Serialize(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True)
+ ## packetbb.h: int ns3::PbbTlvBlock::Size() const [member function]
+ cls.add_method('Size',
+ 'int',
+ [],
+ is_const=True)
+ return
+
def register_Ns3Ipv4AddressChecker_methods(root_module, cls):
## ipv4-address.h: ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor]
cls.add_constructor([])
@@ -1835,6 +2906,271 @@
[param('ns3::Mac48Address const &', 'value')])
return
+def register_Ns3PbbAddressTlv_methods(root_module, cls):
+ ## packetbb.h: ns3::PbbAddressTlv::PbbAddressTlv() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: ns3::PbbAddressTlv::PbbAddressTlv(ns3::PbbAddressTlv const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbAddressTlv const &', 'arg0')])
+ ## packetbb.h: uint8_t ns3::PbbAddressTlv::GetIndexStart() const [member function]
+ cls.add_method('GetIndexStart',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint8_t ns3::PbbAddressTlv::GetIndexStop() const [member function]
+ cls.add_method('GetIndexStop',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbAddressTlv::HasIndexStart() const [member function]
+ cls.add_method('HasIndexStart',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbAddressTlv::HasIndexStop() const [member function]
+ cls.add_method('HasIndexStop',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbAddressTlv::IsMultivalue() const [member function]
+ cls.add_method('IsMultivalue',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbAddressTlv::SetIndexStart(uint8_t index) [member function]
+ cls.add_method('SetIndexStart',
+ 'void',
+ [param('uint8_t', 'index')])
+ ## packetbb.h: void ns3::PbbAddressTlv::SetIndexStop(uint8_t index) [member function]
+ cls.add_method('SetIndexStop',
+ 'void',
+ [param('uint8_t', 'index')])
+ ## packetbb.h: void ns3::PbbAddressTlv::SetMultivalue(bool isMultivalue) [member function]
+ cls.add_method('SetMultivalue',
+ 'void',
+ [param('bool', 'isMultivalue')])
+ return
+
+def register_Ns3PbbPacket_methods(root_module, cls):
+ cls.add_binary_comparison_operator('==')
+ cls.add_binary_comparison_operator('!=')
+ ## packetbb.h: ns3::PbbPacket::PbbPacket(ns3::PbbPacket const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PbbPacket const &', 'arg0')])
+ ## packetbb.h: ns3::PbbPacket::PbbPacket() [constructor]
+ cls.add_constructor([])
+ ## packetbb.h: uint32_t ns3::PbbPacket::Deserialize(ns3::Buffer::Iterator start) [member function]
+ cls.add_method('Deserialize',
+ 'uint32_t',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_virtual=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > position) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > first, std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > last) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >', 'last')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > position) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >', 'position')])
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::Erase(std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > first, std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > last) [member function]
+ cls.add_method('Erase',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [param('std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >', 'first'), param('std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >', 'last')])
+ ## packetbb.h: ns3::TypeId ns3::PbbPacket::GetInstanceTypeId() const [member function]
+ cls.add_method('GetInstanceTypeId',
+ 'ns3::TypeId',
+ [],
+ is_const=True, is_virtual=True)
+ ## packetbb.h: uint16_t ns3::PbbPacket::GetSequenceNumber() const [member function]
+ cls.add_method('GetSequenceNumber',
+ 'uint16_t',
+ [],
+ is_const=True)
+ ## packetbb.h: uint32_t ns3::PbbPacket::GetSerializedSize() const [member function]
+ cls.add_method('GetSerializedSize',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## packetbb.h: static ns3::TypeId ns3::PbbPacket::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## packetbb.h: uint8_t ns3::PbbPacket::GetVersion() const [member function]
+ cls.add_method('GetVersion',
+ 'uint8_t',
+ [],
+ is_const=True)
+ ## packetbb.h: bool ns3::PbbPacket::HasSequenceNumber() const [member function]
+ cls.add_method('HasSequenceNumber',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Ptr<ns3::PbbMessage> ns3::PbbPacket::MessageBack() [member function]
+ cls.add_method('MessageBack',
+ 'ns3::Ptr< ns3::PbbMessage >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbMessage> const ns3::PbbPacket::MessageBack() const [member function]
+ cls.add_method('MessageBack',
+ 'ns3::Ptr< ns3::PbbMessage > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::MessageBegin() [member function]
+ cls.add_method('MessageBegin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::MessageBegin() const [member function]
+ cls.add_method('MessageBegin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::MessageClear() [member function]
+ cls.add_method('MessageClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbPacket::MessageEmpty() const [member function]
+ cls.add_method('MessageEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::MessageEnd() [member function]
+ cls.add_method('MessageEnd',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbMessage> > ns3::PbbPacket::MessageEnd() const [member function]
+ cls.add_method('MessageEnd',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbMessage > >',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Ptr<ns3::PbbMessage> ns3::PbbPacket::MessageFront() [member function]
+ cls.add_method('MessageFront',
+ 'ns3::Ptr< ns3::PbbMessage >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbMessage> const ns3::PbbPacket::MessageFront() const [member function]
+ cls.add_method('MessageFront',
+ 'ns3::Ptr< ns3::PbbMessage > const',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::MessagePopBack() [member function]
+ cls.add_method('MessagePopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbPacket::MessagePopFront() [member function]
+ cls.add_method('MessagePopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbPacket::MessagePushBack(ns3::Ptr<ns3::PbbMessage> message) [member function]
+ cls.add_method('MessagePushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbMessage >', 'message')])
+ ## packetbb.h: void ns3::PbbPacket::MessagePushFront(ns3::Ptr<ns3::PbbMessage> message) [member function]
+ cls.add_method('MessagePushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbMessage >', 'message')])
+ ## packetbb.h: int ns3::PbbPacket::MessageSize() const [member function]
+ cls.add_method('MessageSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::Print(std::ostream & os) const [member function]
+ cls.add_method('Print',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True, is_virtual=True)
+ ## packetbb.h: void ns3::PbbPacket::Ref() const [member function]
+ cls.add_method('Ref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::Serialize(ns3::Buffer::Iterator start) const [member function]
+ cls.add_method('Serialize',
+ 'void',
+ [param('ns3::Buffer::Iterator', 'start')],
+ is_const=True, is_virtual=True)
+ ## packetbb.h: void ns3::PbbPacket::SetSequenceNumber(uint16_t number) [member function]
+ cls.add_method('SetSequenceNumber',
+ 'void',
+ [param('uint16_t', 'number')])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbPacket::TlvBack() [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> const ns3::PbbPacket::TlvBack() const [member function]
+ cls.add_method('TlvBack',
+ 'ns3::Ptr< ns3::PbbTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::TlvBegin() [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::TlvBegin() const [member function]
+ cls.add_method('TlvBegin',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::TlvClear() [member function]
+ cls.add_method('TlvClear',
+ 'void',
+ [])
+ ## packetbb.h: bool ns3::PbbPacket::TlvEmpty() const [member function]
+ cls.add_method('TlvEmpty',
+ 'bool',
+ [],
+ is_const=True)
+ ## packetbb.h: std::_List_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::TlvEnd() [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [])
+ ## packetbb.h: std::_List_const_iterator<ns3::Ptr<ns3::PbbTlv> > ns3::PbbPacket::TlvEnd() const [member function]
+ cls.add_method('TlvEnd',
+ 'std::_List_const_iterator< ns3::Ptr< ns3::PbbTlv > >',
+ [],
+ is_const=True)
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> ns3::PbbPacket::TlvFront() [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbTlv >',
+ [])
+ ## packetbb.h: ns3::Ptr<ns3::PbbTlv> const ns3::PbbPacket::TlvFront() const [member function]
+ cls.add_method('TlvFront',
+ 'ns3::Ptr< ns3::PbbTlv > const',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::TlvPopBack() [member function]
+ cls.add_method('TlvPopBack',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbPacket::TlvPopFront() [member function]
+ cls.add_method('TlvPopFront',
+ 'void',
+ [])
+ ## packetbb.h: void ns3::PbbPacket::TlvPushBack(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('TlvPushBack',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: void ns3::PbbPacket::TlvPushFront(ns3::Ptr<ns3::PbbTlv> tlv) [member function]
+ cls.add_method('TlvPushFront',
+ 'void',
+ [param('ns3::Ptr< ns3::PbbTlv >', 'tlv')])
+ ## packetbb.h: int ns3::PbbPacket::TlvSize() const [member function]
+ cls.add_method('TlvSize',
+ 'int',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::Unref() const [member function]
+ cls.add_method('Unref',
+ 'void',
+ [],
+ is_const=True)
+ ## packetbb.h: void ns3::PbbPacket::SerializePacketTlv(ns3::Buffer::Iterator & start) const [member function]
+ cls.add_method('SerializePacketTlv',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'start')],
+ is_const=True, visibility='protected')
+ return
+
def register_Ns3Queue_methods(root_module, cls):
## queue.h: ns3::Queue::Queue(ns3::Queue const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Queue const &', 'arg0')])
@@ -3604,6 +4940,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -3621,6 +4959,12 @@
[param('ns3::Address const &', 'ad')])
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_olsr.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_olsr.py Thu Sep 24 10:57:41 2009 -0400
@@ -30,6 +30,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -54,6 +66,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -104,27 +124,27 @@
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::DuplicateTuple, std::allocator< ns3::olsr::DuplicateTuple > >*', 'ns3::olsr::DuplicateSet*')
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::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >', 'ns3::olsr::NeighborSet')
+ 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::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >&', 'ns3::olsr::NeighborSet&')
typehandlers.add_type_alias('std::set< ns3::Ipv4Address, std::less< ns3::Ipv4Address >, std::allocator< ns3::Ipv4Address > >', 'ns3::olsr::MprSet')
typehandlers.add_type_alias('std::set< ns3::Ipv4Address, std::less< ns3::Ipv4Address >, std::allocator< ns3::Ipv4Address > >*', 'ns3::olsr::MprSet*')
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::MprSelectorTuple, std::allocator< ns3::olsr::MprSelectorTuple > >*', 'ns3::olsr::MprSelectorSet*')
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::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >', 'ns3::olsr::TopologySet')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >*', 'ns3::olsr::TopologySet*')
+ typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >&', 'ns3::olsr::TopologySet&')
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::MessageHeader, std::allocator< ns3::olsr::MessageHeader > >*', 'ns3::olsr::MessageList*')
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::IfaceAssocTuple, std::allocator< ns3::olsr::IfaceAssocTuple > >*', 'ns3::olsr::IfaceAssocSet*')
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::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >*', 'ns3::olsr::NeighborSet*')
- 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::TwoHopNeighborTuple, std::allocator< ns3::olsr::TwoHopNeighborTuple > >*', 'ns3::olsr::TwoHopNeighborSet*')
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::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >', 'ns3::olsr::TopologySet')
- typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >*', 'ns3::olsr::TopologySet*')
- typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >&', 'ns3::olsr::TopologySet&')
typehandlers.add_type_alias('std::vector< ns3::olsr::LinkTuple, std::allocator< ns3::olsr::LinkTuple > >', 'ns3::olsr::LinkSet')
typehandlers.add_type_alias('std::vector< ns3::olsr::LinkTuple, std::allocator< ns3::olsr::LinkTuple > >*', 'ns3::olsr::LinkSet*')
typehandlers.add_type_alias('std::vector< ns3::olsr::LinkTuple, std::allocator< ns3::olsr::LinkTuple > >&', 'ns3::olsr::LinkSet&')
@@ -863,6 +883,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -876,6 +898,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_onoff.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_onoff.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -96,6 +116,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -109,6 +131,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_packet_sink.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_packet_sink.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -92,6 +112,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -105,6 +127,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_ping6.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_ping6.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -104,6 +124,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -117,6 +139,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_point_to_point.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_point_to_point.py Thu Sep 24 10:57:41 2009 -0400
@@ -28,6 +28,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -52,6 +64,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -313,6 +333,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -326,6 +348,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_radvd.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_radvd.py Thu Sep 24 10:57:41 2009 -0400
@@ -28,6 +28,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -52,6 +64,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -368,6 +388,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -381,6 +403,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_simulator.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_simulator.py Thu Sep 24 10:57:41 2009 -0400
@@ -92,6 +92,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -118,6 +130,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -1534,6 +1554,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -1555,6 +1577,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_static_routing.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_static_routing.py Thu Sep 24 10:57:41 2009 -0400
@@ -34,6 +34,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -58,6 +70,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -602,6 +622,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -615,6 +637,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_stats.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_stats.py Thu Sep 24 10:57:41 2009 -0400
@@ -50,6 +50,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -74,6 +86,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -427,6 +447,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -440,6 +462,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_tap_bridge.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_tap_bridge.py Thu Sep 24 10:57:41 2009 -0400
@@ -26,6 +26,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -50,6 +62,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -238,6 +258,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -251,6 +273,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_udp_echo.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_udp_echo.py Thu Sep 24 10:57:41 2009 -0400
@@ -26,6 +26,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -50,6 +62,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -147,6 +167,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -160,6 +182,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_v4ping.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_v4ping.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -92,6 +112,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -105,6 +127,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_virtual_net_device.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_virtual_net_device.py Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -48,6 +60,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -222,6 +242,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -235,6 +257,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3_module_wifi.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3_module_wifi.py Thu Sep 24 10:57:41 2009 -0400
@@ -104,7 +104,7 @@
## wifi-phy.h: ns3::WifiPhy [class]
module.add_class('WifiPhy', parent=root_module['ns3::Object'])
## wifi-phy.h: ns3::WifiPhy::State [enumeration]
- module.add_enum('State', ['SYNC', 'TX', 'CCA_BUSY', 'IDLE'], outer_class=root_module['ns3::WifiPhy'])
+ module.add_enum('State', ['SYNC', 'TX', 'CCA_BUSY', 'IDLE', 'SWITCHING'], outer_class=root_module['ns3::WifiPhy'])
## wifi-remote-station-manager.h: ns3::WifiRemoteStationManager [class]
module.add_class('WifiRemoteStationManager', parent=root_module['ns3::Object'])
## yans-wifi-phy.h: ns3::YansWifiPhy [class]
@@ -203,6 +203,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -227,6 +239,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -408,6 +428,10 @@
cls.add_method('NotifyRxStartNow',
'void',
[param('ns3::Time', 'duration')])
+ ## dcf-manager.h: void ns3::DcfManager::NotifySwitchingStartNow(ns3::Time duration) [member function]
+ cls.add_method('NotifySwitchingStartNow',
+ 'void',
+ [param('ns3::Time', 'duration')])
## dcf-manager.h: void ns3::DcfManager::NotifyTxStartNow(ns3::Time duration) [member function]
cls.add_method('NotifyTxStartNow',
'void',
@@ -497,6 +521,11 @@
'void',
[],
is_pure_virtual=True, visibility='private', is_virtual=True)
+ ## dcf-manager.h: void ns3::DcfState::DoNotifyChannelSwitching() [member function]
+ cls.add_method('DoNotifyChannelSwitching',
+ 'void',
+ [],
+ is_pure_virtual=True, visibility='private', is_virtual=True)
## dcf-manager.h: void ns3::DcfState::DoNotifyCollision() [member function]
cls.add_method('DoNotifyCollision',
'void',
@@ -525,6 +554,10 @@
'ns3::Time',
[param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')],
is_static=True)
+ ## interference-helper.h: void ns3::InterferenceHelper::EraseEvents() [member function]
+ cls.add_method('EraseEvents',
+ 'void',
+ [])
## interference-helper.h: ns3::Time ns3::InterferenceHelper::GetEnergyDuration(double energyW) [member function]
cls.add_method('GetEnergyDuration',
'ns3::Time',
@@ -1055,6 +1088,11 @@
'void',
[param('ns3::Time', 'duration')],
is_pure_virtual=True, is_virtual=True)
+ ## wifi-phy.h: void ns3::WifiPhyListener::NotifySwitchingStart(ns3::Time duration) [member function]
+ cls.add_method('NotifySwitchingStart',
+ 'void',
+ [param('ns3::Time', 'duration')],
+ is_pure_virtual=True, is_virtual=True)
## wifi-phy.h: void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration) [member function]
cls.add_method('NotifyTxStart',
'void',
@@ -3335,6 +3373,11 @@
'bool',
[],
is_virtual=True)
+ ## yans-wifi-phy.h: bool ns3::YansWifiPhy::IsStateSwitching() [member function]
+ cls.add_method('IsStateSwitching',
+ 'bool',
+ [],
+ is_virtual=True)
## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetStateDuration() [member function]
cls.add_method('GetStateDuration',
'ns3::Time',
@@ -3857,6 +3900,10 @@
cls.add_method('NotifyCollision',
'void',
[])
+ ## edca-txop-n.h: void ns3::EdcaTxopN::NotifyChannelSwitching() [member function]
+ cls.add_method('NotifyChannelSwitching',
+ 'void',
+ [])
## edca-txop-n.h: void ns3::EdcaTxopN::GotCts(double snr, ns3::WifiMode txMode) [member function]
cls.add_method('GotCts',
'void',
@@ -4170,6 +4217,10 @@
'ns3::Time',
[],
is_const=True)
+ ## mac-low.h: void ns3::MacLow::NotifySwitchingStartNow(ns3::Time duration) [member function]
+ cls.add_method('NotifySwitchingStartNow',
+ 'void',
+ [param('ns3::Time', 'duration')])
## mac-low.h: void ns3::MacLow::ReceiveError(ns3::Ptr<ns3::Packet const> packet, double rxSnr) [member function]
cls.add_method('ReceiveError',
'void',
@@ -5486,6 +5537,8 @@
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -5499,6 +5552,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/ns3modulegen_generated.py Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/ns3modulegen_generated.py Thu Sep 24 10:57:41 2009 -0400
@@ -16,28 +16,33 @@
import ns3_module_simulator
import ns3_module_mobility
import ns3_module_common
+import ns3_module_node
import ns3_module_contrib
-import ns3_module_node
+import ns3_module_point_to_point
+import ns3_module_internet_stack
import ns3_module_tap_bridge
+import ns3_module_csma
+import ns3_module_wifi
+import ns3_module_static_routing
import ns3_module_v4ping
+import ns3_module_virtual_net_device
import ns3_module_packet_sink
+import ns3_module_global_routing
import ns3_module_stats
-import ns3_module_onoff
-import ns3_module_internet_stack
-import ns3_module_point_to_point
-import ns3_module_csma
import ns3_module_list_routing
-import ns3_module_static_routing
-import ns3_module_virtual_net_device
-import ns3_module_wifi
import ns3_module_emu
import ns3_module_bridge
-import ns3_module_global_routing
+import ns3_module_onoff
import ns3_module_udp_echo
+import ns3_module_ping6
+import ns3_module_nix_vector_routing
import ns3_module_olsr
+import ns3_module_flow_monitor
import ns3_module_radvd
-import ns3_module_ping6
+import ns3_module_mesh
import ns3_module_helper
+import ns3_module_dot11s
+import ns3_module_flame
def module_init():
root_module = Module('ns3', cpp_namespace='::ns3')
@@ -90,17 +95,6 @@
ns3_module_common__local.register_types(module)
root_module.end_section('ns3_module_common')
- root_module.begin_section('ns3_module_contrib')
- ns3_module_contrib.register_types(module)
-
- try:
- import ns3_module_contrib__local
- except ImportError:
- pass
- else:
- ns3_module_contrib__local.register_types(module)
-
- root_module.end_section('ns3_module_contrib')
root_module.begin_section('ns3_module_node')
ns3_module_node.register_types(module)
@@ -112,6 +106,39 @@
ns3_module_node__local.register_types(module)
root_module.end_section('ns3_module_node')
+ root_module.begin_section('ns3_module_contrib')
+ ns3_module_contrib.register_types(module)
+
+ try:
+ import ns3_module_contrib__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_contrib__local.register_types(module)
+
+ root_module.end_section('ns3_module_contrib')
+ root_module.begin_section('ns3_module_point_to_point')
+ ns3_module_point_to_point.register_types(module)
+
+ try:
+ import ns3_module_point_to_point__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_point_to_point__local.register_types(module)
+
+ root_module.end_section('ns3_module_point_to_point')
+ root_module.begin_section('ns3_module_internet_stack')
+ ns3_module_internet_stack.register_types(module)
+
+ try:
+ import ns3_module_internet_stack__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_internet_stack__local.register_types(module)
+
+ root_module.end_section('ns3_module_internet_stack')
root_module.begin_section('ns3_module_tap_bridge')
ns3_module_tap_bridge.register_types(module)
@@ -123,6 +150,39 @@
ns3_module_tap_bridge__local.register_types(module)
root_module.end_section('ns3_module_tap_bridge')
+ root_module.begin_section('ns3_module_csma')
+ ns3_module_csma.register_types(module)
+
+ try:
+ import ns3_module_csma__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_csma__local.register_types(module)
+
+ root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_wifi')
+ ns3_module_wifi.register_types(module)
+
+ try:
+ import ns3_module_wifi__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_wifi__local.register_types(module)
+
+ root_module.end_section('ns3_module_wifi')
+ root_module.begin_section('ns3_module_static_routing')
+ ns3_module_static_routing.register_types(module)
+
+ try:
+ import ns3_module_static_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_static_routing__local.register_types(module)
+
+ root_module.end_section('ns3_module_static_routing')
root_module.begin_section('ns3_module_v4ping')
ns3_module_v4ping.register_types(module)
@@ -134,6 +194,17 @@
ns3_module_v4ping__local.register_types(module)
root_module.end_section('ns3_module_v4ping')
+ root_module.begin_section('ns3_module_virtual_net_device')
+ ns3_module_virtual_net_device.register_types(module)
+
+ try:
+ import ns3_module_virtual_net_device__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_virtual_net_device__local.register_types(module)
+
+ root_module.end_section('ns3_module_virtual_net_device')
root_module.begin_section('ns3_module_packet_sink')
ns3_module_packet_sink.register_types(module)
@@ -145,6 +216,17 @@
ns3_module_packet_sink__local.register_types(module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_global_routing')
+ ns3_module_global_routing.register_types(module)
+
+ try:
+ import ns3_module_global_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_global_routing__local.register_types(module)
+
+ root_module.end_section('ns3_module_global_routing')
root_module.begin_section('ns3_module_stats')
ns3_module_stats.register_types(module)
@@ -156,50 +238,6 @@
ns3_module_stats__local.register_types(module)
root_module.end_section('ns3_module_stats')
- root_module.begin_section('ns3_module_onoff')
- ns3_module_onoff.register_types(module)
-
- try:
- import ns3_module_onoff__local
- except ImportError:
- pass
- else:
- ns3_module_onoff__local.register_types(module)
-
- root_module.end_section('ns3_module_onoff')
- root_module.begin_section('ns3_module_internet_stack')
- ns3_module_internet_stack.register_types(module)
-
- try:
- import ns3_module_internet_stack__local
- except ImportError:
- pass
- else:
- ns3_module_internet_stack__local.register_types(module)
-
- root_module.end_section('ns3_module_internet_stack')
- root_module.begin_section('ns3_module_point_to_point')
- ns3_module_point_to_point.register_types(module)
-
- try:
- import ns3_module_point_to_point__local
- except ImportError:
- pass
- else:
- ns3_module_point_to_point__local.register_types(module)
-
- root_module.end_section('ns3_module_point_to_point')
- root_module.begin_section('ns3_module_csma')
- ns3_module_csma.register_types(module)
-
- try:
- import ns3_module_csma__local
- except ImportError:
- pass
- else:
- ns3_module_csma__local.register_types(module)
-
- root_module.end_section('ns3_module_csma')
root_module.begin_section('ns3_module_list_routing')
ns3_module_list_routing.register_types(module)
@@ -211,39 +249,6 @@
ns3_module_list_routing__local.register_types(module)
root_module.end_section('ns3_module_list_routing')
- root_module.begin_section('ns3_module_static_routing')
- ns3_module_static_routing.register_types(module)
-
- try:
- import ns3_module_static_routing__local
- except ImportError:
- pass
- else:
- ns3_module_static_routing__local.register_types(module)
-
- root_module.end_section('ns3_module_static_routing')
- root_module.begin_section('ns3_module_virtual_net_device')
- ns3_module_virtual_net_device.register_types(module)
-
- try:
- import ns3_module_virtual_net_device__local
- except ImportError:
- pass
- else:
- ns3_module_virtual_net_device__local.register_types(module)
-
- root_module.end_section('ns3_module_virtual_net_device')
- root_module.begin_section('ns3_module_wifi')
- ns3_module_wifi.register_types(module)
-
- try:
- import ns3_module_wifi__local
- except ImportError:
- pass
- else:
- ns3_module_wifi__local.register_types(module)
-
- root_module.end_section('ns3_module_wifi')
root_module.begin_section('ns3_module_emu')
ns3_module_emu.register_types(module)
@@ -266,17 +271,17 @@
ns3_module_bridge__local.register_types(module)
root_module.end_section('ns3_module_bridge')
- root_module.begin_section('ns3_module_global_routing')
- ns3_module_global_routing.register_types(module)
+ root_module.begin_section('ns3_module_onoff')
+ ns3_module_onoff.register_types(module)
try:
- import ns3_module_global_routing__local
+ import ns3_module_onoff__local
except ImportError:
pass
else:
- ns3_module_global_routing__local.register_types(module)
+ ns3_module_onoff__local.register_types(module)
- root_module.end_section('ns3_module_global_routing')
+ root_module.end_section('ns3_module_onoff')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_types(module)
@@ -288,6 +293,28 @@
ns3_module_udp_echo__local.register_types(module)
root_module.end_section('ns3_module_udp_echo')
+ root_module.begin_section('ns3_module_ping6')
+ ns3_module_ping6.register_types(module)
+
+ try:
+ import ns3_module_ping6__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_ping6__local.register_types(module)
+
+ root_module.end_section('ns3_module_ping6')
+ root_module.begin_section('ns3_module_nix_vector_routing')
+ ns3_module_nix_vector_routing.register_types(module)
+
+ try:
+ import ns3_module_nix_vector_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_nix_vector_routing__local.register_types(module)
+
+ root_module.end_section('ns3_module_nix_vector_routing')
root_module.begin_section('ns3_module_olsr')
ns3_module_olsr.register_types(module)
@@ -299,6 +326,17 @@
ns3_module_olsr__local.register_types(module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_types(module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_types(module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_radvd')
ns3_module_radvd.register_types(module)
@@ -310,17 +348,17 @@
ns3_module_radvd__local.register_types(module)
root_module.end_section('ns3_module_radvd')
- root_module.begin_section('ns3_module_ping6')
- ns3_module_ping6.register_types(module)
+ root_module.begin_section('ns3_module_mesh')
+ ns3_module_mesh.register_types(module)
try:
- import ns3_module_ping6__local
+ import ns3_module_mesh__local
except ImportError:
pass
else:
- ns3_module_ping6__local.register_types(module)
+ ns3_module_mesh__local.register_types(module)
- root_module.end_section('ns3_module_ping6')
+ root_module.end_section('ns3_module_mesh')
root_module.begin_section('ns3_module_helper')
ns3_module_helper.register_types(module)
@@ -332,8 +370,39 @@
ns3_module_helper__local.register_types(module)
root_module.end_section('ns3_module_helper')
+ root_module.begin_section('ns3_module_dot11s')
+ ns3_module_dot11s.register_types(module)
+
+ try:
+ import ns3_module_dot11s__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_dot11s__local.register_types(module)
+
+ root_module.end_section('ns3_module_dot11s')
+ root_module.begin_section('ns3_module_flame')
+ ns3_module_flame.register_types(module)
+
+ try:
+ import ns3_module_flame__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flame__local.register_types(module)
+
+ root_module.end_section('ns3_module_flame')
+ ## animation-interface.h: ns3::AnimationInterface [class]
+ module.add_class('AnimationInterface')
+ ## point-to-point-dumbbell-helper.h: ns3::PointToPointDumbbellHelper [class]
+ module.add_class('PointToPointDumbbellHelper', allow_subclassing=False)
+ ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper [class]
+ module.add_class('PointToPointGridHelper', allow_subclassing=False)
+ ## node-location.h: ns3::NodeLocation [class]
+ module.add_class('NodeLocation', parent=root_module['ns3::Object'])
module.add_container('std::vector< unsigned int >', 'unsigned int', container_type='vector')
module.add_container('std::vector< bool >', 'bool', container_type='vector')
+ module.add_container('std::vector< unsigned long >', 'long unsigned int', container_type='vector')
module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader >', container_type='list')
@@ -355,6 +424,18 @@
register_types_ns3_addressUtils(nested_module)
+ ## Register a nested module for the namespace dot11s
+
+ nested_module = module.add_cpp_namespace('dot11s')
+ register_types_ns3_dot11s(nested_module)
+
+
+ ## Register a nested module for the namespace flame
+
+ nested_module = module.add_cpp_namespace('flame')
+ register_types_ns3_flame(nested_module)
+
+
## Register a nested module for the namespace internal
nested_module = module.add_cpp_namespace('internal')
@@ -380,6 +461,14 @@
root_module = module.get_root()
+def register_types_ns3_dot11s(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_flame(module):
+ root_module = module.get_root()
+
+
def register_types_ns3_internal(module):
root_module = module.get_root()
@@ -389,6 +478,10 @@
def register_methods(root_module):
+ register_Ns3AnimationInterface_methods(root_module, root_module['ns3::AnimationInterface'])
+ register_Ns3PointToPointDumbbellHelper_methods(root_module, root_module['ns3::PointToPointDumbbellHelper'])
+ register_Ns3PointToPointGridHelper_methods(root_module, root_module['ns3::PointToPointGridHelper'])
+ register_Ns3NodeLocation_methods(root_module, root_module['ns3::NodeLocation'])
root_module.begin_section('ns3_module_core')
ns3_module_core.register_methods(root_module)
@@ -433,17 +526,6 @@
ns3_module_common__local.register_methods(root_module)
root_module.end_section('ns3_module_common')
- root_module.begin_section('ns3_module_contrib')
- ns3_module_contrib.register_methods(root_module)
-
- try:
- import ns3_module_contrib__local
- except ImportError:
- pass
- else:
- ns3_module_contrib__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_contrib')
root_module.begin_section('ns3_module_node')
ns3_module_node.register_methods(root_module)
@@ -455,6 +537,39 @@
ns3_module_node__local.register_methods(root_module)
root_module.end_section('ns3_module_node')
+ root_module.begin_section('ns3_module_contrib')
+ ns3_module_contrib.register_methods(root_module)
+
+ try:
+ import ns3_module_contrib__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_contrib__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_contrib')
+ root_module.begin_section('ns3_module_point_to_point')
+ ns3_module_point_to_point.register_methods(root_module)
+
+ try:
+ import ns3_module_point_to_point__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_point_to_point__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_point_to_point')
+ root_module.begin_section('ns3_module_internet_stack')
+ ns3_module_internet_stack.register_methods(root_module)
+
+ try:
+ import ns3_module_internet_stack__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_internet_stack__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_internet_stack')
root_module.begin_section('ns3_module_tap_bridge')
ns3_module_tap_bridge.register_methods(root_module)
@@ -466,6 +581,39 @@
ns3_module_tap_bridge__local.register_methods(root_module)
root_module.end_section('ns3_module_tap_bridge')
+ root_module.begin_section('ns3_module_csma')
+ ns3_module_csma.register_methods(root_module)
+
+ try:
+ import ns3_module_csma__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_csma__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_wifi')
+ ns3_module_wifi.register_methods(root_module)
+
+ try:
+ import ns3_module_wifi__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_wifi__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_wifi')
+ root_module.begin_section('ns3_module_static_routing')
+ ns3_module_static_routing.register_methods(root_module)
+
+ try:
+ import ns3_module_static_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_static_routing__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_static_routing')
root_module.begin_section('ns3_module_v4ping')
ns3_module_v4ping.register_methods(root_module)
@@ -477,6 +625,17 @@
ns3_module_v4ping__local.register_methods(root_module)
root_module.end_section('ns3_module_v4ping')
+ root_module.begin_section('ns3_module_virtual_net_device')
+ ns3_module_virtual_net_device.register_methods(root_module)
+
+ try:
+ import ns3_module_virtual_net_device__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_virtual_net_device__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_virtual_net_device')
root_module.begin_section('ns3_module_packet_sink')
ns3_module_packet_sink.register_methods(root_module)
@@ -488,6 +647,17 @@
ns3_module_packet_sink__local.register_methods(root_module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_global_routing')
+ ns3_module_global_routing.register_methods(root_module)
+
+ try:
+ import ns3_module_global_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_global_routing__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_global_routing')
root_module.begin_section('ns3_module_stats')
ns3_module_stats.register_methods(root_module)
@@ -499,50 +669,6 @@
ns3_module_stats__local.register_methods(root_module)
root_module.end_section('ns3_module_stats')
- root_module.begin_section('ns3_module_onoff')
- ns3_module_onoff.register_methods(root_module)
-
- try:
- import ns3_module_onoff__local
- except ImportError:
- pass
- else:
- ns3_module_onoff__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_onoff')
- root_module.begin_section('ns3_module_internet_stack')
- ns3_module_internet_stack.register_methods(root_module)
-
- try:
- import ns3_module_internet_stack__local
- except ImportError:
- pass
- else:
- ns3_module_internet_stack__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_internet_stack')
- root_module.begin_section('ns3_module_point_to_point')
- ns3_module_point_to_point.register_methods(root_module)
-
- try:
- import ns3_module_point_to_point__local
- except ImportError:
- pass
- else:
- ns3_module_point_to_point__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_point_to_point')
- root_module.begin_section('ns3_module_csma')
- ns3_module_csma.register_methods(root_module)
-
- try:
- import ns3_module_csma__local
- except ImportError:
- pass
- else:
- ns3_module_csma__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_csma')
root_module.begin_section('ns3_module_list_routing')
ns3_module_list_routing.register_methods(root_module)
@@ -554,39 +680,6 @@
ns3_module_list_routing__local.register_methods(root_module)
root_module.end_section('ns3_module_list_routing')
- root_module.begin_section('ns3_module_static_routing')
- ns3_module_static_routing.register_methods(root_module)
-
- try:
- import ns3_module_static_routing__local
- except ImportError:
- pass
- else:
- ns3_module_static_routing__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_static_routing')
- root_module.begin_section('ns3_module_virtual_net_device')
- ns3_module_virtual_net_device.register_methods(root_module)
-
- try:
- import ns3_module_virtual_net_device__local
- except ImportError:
- pass
- else:
- ns3_module_virtual_net_device__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_virtual_net_device')
- root_module.begin_section('ns3_module_wifi')
- ns3_module_wifi.register_methods(root_module)
-
- try:
- import ns3_module_wifi__local
- except ImportError:
- pass
- else:
- ns3_module_wifi__local.register_methods(root_module)
-
- root_module.end_section('ns3_module_wifi')
root_module.begin_section('ns3_module_emu')
ns3_module_emu.register_methods(root_module)
@@ -609,17 +702,17 @@
ns3_module_bridge__local.register_methods(root_module)
root_module.end_section('ns3_module_bridge')
- root_module.begin_section('ns3_module_global_routing')
- ns3_module_global_routing.register_methods(root_module)
+ root_module.begin_section('ns3_module_onoff')
+ ns3_module_onoff.register_methods(root_module)
try:
- import ns3_module_global_routing__local
+ import ns3_module_onoff__local
except ImportError:
pass
else:
- ns3_module_global_routing__local.register_methods(root_module)
+ ns3_module_onoff__local.register_methods(root_module)
- root_module.end_section('ns3_module_global_routing')
+ root_module.end_section('ns3_module_onoff')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_methods(root_module)
@@ -631,6 +724,28 @@
ns3_module_udp_echo__local.register_methods(root_module)
root_module.end_section('ns3_module_udp_echo')
+ root_module.begin_section('ns3_module_ping6')
+ ns3_module_ping6.register_methods(root_module)
+
+ try:
+ import ns3_module_ping6__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_ping6__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_ping6')
+ root_module.begin_section('ns3_module_nix_vector_routing')
+ ns3_module_nix_vector_routing.register_methods(root_module)
+
+ try:
+ import ns3_module_nix_vector_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_nix_vector_routing__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_nix_vector_routing')
root_module.begin_section('ns3_module_olsr')
ns3_module_olsr.register_methods(root_module)
@@ -642,6 +757,17 @@
ns3_module_olsr__local.register_methods(root_module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_methods(root_module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_radvd')
ns3_module_radvd.register_methods(root_module)
@@ -653,17 +779,17 @@
ns3_module_radvd__local.register_methods(root_module)
root_module.end_section('ns3_module_radvd')
- root_module.begin_section('ns3_module_ping6')
- ns3_module_ping6.register_methods(root_module)
+ root_module.begin_section('ns3_module_mesh')
+ ns3_module_mesh.register_methods(root_module)
try:
- import ns3_module_ping6__local
+ import ns3_module_mesh__local
except ImportError:
pass
else:
- ns3_module_ping6__local.register_methods(root_module)
+ ns3_module_mesh__local.register_methods(root_module)
- root_module.end_section('ns3_module_ping6')
+ root_module.end_section('ns3_module_mesh')
root_module.begin_section('ns3_module_helper')
ns3_module_helper.register_methods(root_module)
@@ -675,6 +801,164 @@
ns3_module_helper__local.register_methods(root_module)
root_module.end_section('ns3_module_helper')
+ root_module.begin_section('ns3_module_dot11s')
+ ns3_module_dot11s.register_methods(root_module)
+
+ try:
+ import ns3_module_dot11s__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_dot11s__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_dot11s')
+ root_module.begin_section('ns3_module_flame')
+ ns3_module_flame.register_methods(root_module)
+
+ try:
+ import ns3_module_flame__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flame__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_flame')
+ return
+
+def register_Ns3AnimationInterface_methods(root_module, cls):
+ ## animation-interface.h: ns3::AnimationInterface::AnimationInterface(ns3::AnimationInterface const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::AnimationInterface const &', 'arg0')])
+ ## animation-interface.h: ns3::AnimationInterface::AnimationInterface() [constructor]
+ cls.add_constructor([])
+ ## animation-interface.h: bool ns3::AnimationInterface::SetInternalAnimation() [member function]
+ cls.add_method('SetInternalAnimation',
+ 'bool',
+ [])
+ ## animation-interface.h: bool ns3::AnimationInterface::SetOutputFile(std::string const & fn) [member function]
+ cls.add_method('SetOutputFile',
+ 'bool',
+ [param('std::string const &', 'fn')])
+ ## animation-interface.h: bool ns3::AnimationInterface::SetServerPort(uint16_t port) [member function]
+ cls.add_method('SetServerPort',
+ 'bool',
+ [param('uint16_t', 'port')])
+ ## animation-interface.h: void ns3::AnimationInterface::StartAnimation() [member function]
+ cls.add_method('StartAnimation',
+ 'void',
+ [])
+ ## animation-interface.h: void ns3::AnimationInterface::StopAnimation() [member function]
+ cls.add_method('StopAnimation',
+ 'void',
+ [])
+ return
+
+def register_Ns3PointToPointDumbbellHelper_methods(root_module, cls):
+ ## point-to-point-dumbbell-helper.h: ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(ns3::PointToPointDumbbellHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PointToPointDumbbellHelper const &', 'arg0')])
+ ## point-to-point-dumbbell-helper.h: ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(uint32_t nLeftLeaf, ns3::PointToPointHelper & leftHelper, uint32_t nRightLeaf, ns3::PointToPointHelper & rightHelper, ns3::PointToPointHelper & bottleneckHelper) [constructor]
+ cls.add_constructor([param('uint32_t', 'nLeftLeaf'), param('ns3::PointToPointHelper &', 'leftHelper'), param('uint32_t', 'nRightLeaf'), param('ns3::PointToPointHelper &', 'rightHelper'), param('ns3::PointToPointHelper &', 'bottleneckHelper')])
+ ## point-to-point-dumbbell-helper.h: void ns3::PointToPointDumbbellHelper::AssignAddresses(ns3::Ipv4AddressHelper leftIp, ns3::Ipv4AddressHelper rightIp, ns3::Ipv4AddressHelper routerIp) [member function]
+ cls.add_method('AssignAddresses',
+ 'void',
+ [param('ns3::Ipv4AddressHelper', 'leftIp'), param('ns3::Ipv4AddressHelper', 'rightIp'), param('ns3::Ipv4AddressHelper', 'routerIp')])
+ ## point-to-point-dumbbell-helper.h: void ns3::PointToPointDumbbellHelper::BoundingBox(double arg0, double arg1, double arg2, double arg3) [member function]
+ cls.add_method('BoundingBox',
+ 'void',
+ [param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3')])
+ ## point-to-point-dumbbell-helper.h: ns3::Ptr<ns3::Node> ns3::PointToPointDumbbellHelper::GetLeft() const [member function]
+ cls.add_method('GetLeft',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: ns3::Ptr<ns3::Node> ns3::PointToPointDumbbellHelper::GetLeft(uint32_t arg0) const [member function]
+ cls.add_method('GetLeft',
+ 'ns3::Ptr< ns3::Node >',
+ [param('uint32_t', 'arg0')],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: ns3::Ipv4Address ns3::PointToPointDumbbellHelper::GetLeftAddress(uint32_t arg0) const [member function]
+ cls.add_method('GetLeftAddress',
+ 'ns3::Ipv4Address',
+ [param('uint32_t', 'arg0')],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: ns3::Ptr<ns3::Node> ns3::PointToPointDumbbellHelper::GetRight() const [member function]
+ cls.add_method('GetRight',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: ns3::Ptr<ns3::Node> ns3::PointToPointDumbbellHelper::GetRight(uint32_t arg0) const [member function]
+ cls.add_method('GetRight',
+ 'ns3::Ptr< ns3::Node >',
+ [param('uint32_t', 'arg0')],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: ns3::Ipv4Address ns3::PointToPointDumbbellHelper::GetRightAddress(uint32_t arg0) const [member function]
+ cls.add_method('GetRightAddress',
+ 'ns3::Ipv4Address',
+ [param('uint32_t', 'arg0')],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: void ns3::PointToPointDumbbellHelper::InstallStack(ns3::InternetStackHelper stack) [member function]
+ cls.add_method('InstallStack',
+ 'void',
+ [param('ns3::InternetStackHelper', 'stack')])
+ ## point-to-point-dumbbell-helper.h: uint32_t ns3::PointToPointDumbbellHelper::LeftCount() const [member function]
+ cls.add_method('LeftCount',
+ 'uint32_t',
+ [],
+ is_const=True)
+ ## point-to-point-dumbbell-helper.h: uint32_t ns3::PointToPointDumbbellHelper::RightCount() const [member function]
+ cls.add_method('RightCount',
+ 'uint32_t',
+ [],
+ is_const=True)
+ return
+
+def register_Ns3PointToPointGridHelper_methods(root_module, cls):
+ ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper::PointToPointGridHelper(ns3::PointToPointGridHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::PointToPointGridHelper const &', 'arg0')])
+ ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper::PointToPointGridHelper(uint32_t nRows, uint32_t nCols, ns3::PointToPointHelper pointToPoint) [constructor]
+ cls.add_constructor([param('uint32_t', 'nRows'), param('uint32_t', 'nCols'), param('ns3::PointToPointHelper', 'pointToPoint')])
+ ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper::PointToPointGridHelper(uint32_t nRows, uint32_t nCols, ns3::PointToPointHelper pointToPoint, uint16_t mpiSize) [constructor]
+ cls.add_constructor([param('uint32_t', 'nRows'), param('uint32_t', 'nCols'), param('ns3::PointToPointHelper', 'pointToPoint'), param('uint16_t', 'mpiSize')])
+ ## point-to-point-grid-helper.h: void ns3::PointToPointGridHelper::AssignAddresses(ns3::Ipv4AddressHelper rowIp, ns3::Ipv4AddressHelper colIp) [member function]
+ cls.add_method('AssignAddresses',
+ 'void',
+ [param('ns3::Ipv4AddressHelper', 'rowIp'), param('ns3::Ipv4AddressHelper', 'colIp')])
+ ## point-to-point-grid-helper.h: void ns3::PointToPointGridHelper::BoundingBox(double ulx, double uly, double lrx, double lry) [member function]
+ cls.add_method('BoundingBox',
+ 'void',
+ [param('double', 'ulx'), param('double', 'uly'), param('double', 'lrx'), param('double', 'lry')])
+ ## point-to-point-grid-helper.h: ns3::Ipv4Address ns3::PointToPointGridHelper::GetAddress(uint32_t row, uint32_t col) [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Ipv4Address',
+ [param('uint32_t', 'row'), param('uint32_t', 'col')])
+ ## point-to-point-grid-helper.h: ns3::Ptr<ns3::Node> ns3::PointToPointGridHelper::GetNode(uint32_t row, uint32_t col) [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [param('uint32_t', 'row'), param('uint32_t', 'col')])
+ ## point-to-point-grid-helper.h: void ns3::PointToPointGridHelper::InstallStack(ns3::InternetStackHelper stack) [member function]
+ cls.add_method('InstallStack',
+ 'void',
+ [param('ns3::InternetStackHelper', 'stack')])
+ return
+
+def register_Ns3NodeLocation_methods(root_module, cls):
+ ## node-location.h: ns3::NodeLocation::NodeLocation(ns3::NodeLocation const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::NodeLocation const &', 'arg0')])
+ ## node-location.h: ns3::NodeLocation::NodeLocation() [constructor]
+ cls.add_constructor([])
+ ## node-location.h: ns3::Vector ns3::NodeLocation::GetLocation() const [member function]
+ cls.add_method('GetLocation',
+ 'ns3::Vector',
+ [],
+ is_const=True)
+ ## node-location.h: static ns3::TypeId ns3::NodeLocation::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## node-location.h: void ns3::NodeLocation::SetLocation(ns3::Vector const & location) [member function]
+ cls.add_method('SetLocation',
+ 'void',
+ [param('ns3::Vector const &', 'location')])
return
def register_functions(root_module):
@@ -723,17 +1007,6 @@
ns3_module_common__local.register_functions(root_module)
root_module.end_section('ns3_module_common')
- root_module.begin_section('ns3_module_contrib')
- ns3_module_contrib.register_functions(root_module)
-
- try:
- import ns3_module_contrib__local
- except ImportError:
- pass
- else:
- ns3_module_contrib__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_contrib')
root_module.begin_section('ns3_module_node')
ns3_module_node.register_functions(root_module)
@@ -745,6 +1018,39 @@
ns3_module_node__local.register_functions(root_module)
root_module.end_section('ns3_module_node')
+ root_module.begin_section('ns3_module_contrib')
+ ns3_module_contrib.register_functions(root_module)
+
+ try:
+ import ns3_module_contrib__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_contrib__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_contrib')
+ root_module.begin_section('ns3_module_point_to_point')
+ ns3_module_point_to_point.register_functions(root_module)
+
+ try:
+ import ns3_module_point_to_point__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_point_to_point__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_point_to_point')
+ root_module.begin_section('ns3_module_internet_stack')
+ ns3_module_internet_stack.register_functions(root_module)
+
+ try:
+ import ns3_module_internet_stack__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_internet_stack__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_internet_stack')
root_module.begin_section('ns3_module_tap_bridge')
ns3_module_tap_bridge.register_functions(root_module)
@@ -756,6 +1062,39 @@
ns3_module_tap_bridge__local.register_functions(root_module)
root_module.end_section('ns3_module_tap_bridge')
+ root_module.begin_section('ns3_module_csma')
+ ns3_module_csma.register_functions(root_module)
+
+ try:
+ import ns3_module_csma__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_csma__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_wifi')
+ ns3_module_wifi.register_functions(root_module)
+
+ try:
+ import ns3_module_wifi__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_wifi__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_wifi')
+ root_module.begin_section('ns3_module_static_routing')
+ ns3_module_static_routing.register_functions(root_module)
+
+ try:
+ import ns3_module_static_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_static_routing__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_static_routing')
root_module.begin_section('ns3_module_v4ping')
ns3_module_v4ping.register_functions(root_module)
@@ -767,6 +1106,17 @@
ns3_module_v4ping__local.register_functions(root_module)
root_module.end_section('ns3_module_v4ping')
+ root_module.begin_section('ns3_module_virtual_net_device')
+ ns3_module_virtual_net_device.register_functions(root_module)
+
+ try:
+ import ns3_module_virtual_net_device__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_virtual_net_device__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_virtual_net_device')
root_module.begin_section('ns3_module_packet_sink')
ns3_module_packet_sink.register_functions(root_module)
@@ -778,6 +1128,17 @@
ns3_module_packet_sink__local.register_functions(root_module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_global_routing')
+ ns3_module_global_routing.register_functions(root_module)
+
+ try:
+ import ns3_module_global_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_global_routing__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_global_routing')
root_module.begin_section('ns3_module_stats')
ns3_module_stats.register_functions(root_module)
@@ -789,50 +1150,6 @@
ns3_module_stats__local.register_functions(root_module)
root_module.end_section('ns3_module_stats')
- root_module.begin_section('ns3_module_onoff')
- ns3_module_onoff.register_functions(root_module)
-
- try:
- import ns3_module_onoff__local
- except ImportError:
- pass
- else:
- ns3_module_onoff__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_onoff')
- root_module.begin_section('ns3_module_internet_stack')
- ns3_module_internet_stack.register_functions(root_module)
-
- try:
- import ns3_module_internet_stack__local
- except ImportError:
- pass
- else:
- ns3_module_internet_stack__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_internet_stack')
- root_module.begin_section('ns3_module_point_to_point')
- ns3_module_point_to_point.register_functions(root_module)
-
- try:
- import ns3_module_point_to_point__local
- except ImportError:
- pass
- else:
- ns3_module_point_to_point__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_point_to_point')
- root_module.begin_section('ns3_module_csma')
- ns3_module_csma.register_functions(root_module)
-
- try:
- import ns3_module_csma__local
- except ImportError:
- pass
- else:
- ns3_module_csma__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_csma')
root_module.begin_section('ns3_module_list_routing')
ns3_module_list_routing.register_functions(root_module)
@@ -844,39 +1161,6 @@
ns3_module_list_routing__local.register_functions(root_module)
root_module.end_section('ns3_module_list_routing')
- root_module.begin_section('ns3_module_static_routing')
- ns3_module_static_routing.register_functions(root_module)
-
- try:
- import ns3_module_static_routing__local
- except ImportError:
- pass
- else:
- ns3_module_static_routing__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_static_routing')
- root_module.begin_section('ns3_module_virtual_net_device')
- ns3_module_virtual_net_device.register_functions(root_module)
-
- try:
- import ns3_module_virtual_net_device__local
- except ImportError:
- pass
- else:
- ns3_module_virtual_net_device__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_virtual_net_device')
- root_module.begin_section('ns3_module_wifi')
- ns3_module_wifi.register_functions(root_module)
-
- try:
- import ns3_module_wifi__local
- except ImportError:
- pass
- else:
- ns3_module_wifi__local.register_functions(root_module)
-
- root_module.end_section('ns3_module_wifi')
root_module.begin_section('ns3_module_emu')
ns3_module_emu.register_functions(root_module)
@@ -899,17 +1183,17 @@
ns3_module_bridge__local.register_functions(root_module)
root_module.end_section('ns3_module_bridge')
- root_module.begin_section('ns3_module_global_routing')
- ns3_module_global_routing.register_functions(root_module)
+ root_module.begin_section('ns3_module_onoff')
+ ns3_module_onoff.register_functions(root_module)
try:
- import ns3_module_global_routing__local
+ import ns3_module_onoff__local
except ImportError:
pass
else:
- ns3_module_global_routing__local.register_functions(root_module)
+ ns3_module_onoff__local.register_functions(root_module)
- root_module.end_section('ns3_module_global_routing')
+ root_module.end_section('ns3_module_onoff')
root_module.begin_section('ns3_module_udp_echo')
ns3_module_udp_echo.register_functions(root_module)
@@ -921,6 +1205,28 @@
ns3_module_udp_echo__local.register_functions(root_module)
root_module.end_section('ns3_module_udp_echo')
+ root_module.begin_section('ns3_module_ping6')
+ ns3_module_ping6.register_functions(root_module)
+
+ try:
+ import ns3_module_ping6__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_ping6__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_ping6')
+ root_module.begin_section('ns3_module_nix_vector_routing')
+ ns3_module_nix_vector_routing.register_functions(root_module)
+
+ try:
+ import ns3_module_nix_vector_routing__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_nix_vector_routing__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_nix_vector_routing')
root_module.begin_section('ns3_module_olsr')
ns3_module_olsr.register_functions(root_module)
@@ -932,6 +1238,17 @@
ns3_module_olsr__local.register_functions(root_module)
root_module.end_section('ns3_module_olsr')
+ root_module.begin_section('ns3_module_flow_monitor')
+ ns3_module_flow_monitor.register_functions(root_module)
+
+ try:
+ import ns3_module_flow_monitor__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flow_monitor__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_flow_monitor')
root_module.begin_section('ns3_module_radvd')
ns3_module_radvd.register_functions(root_module)
@@ -943,17 +1260,17 @@
ns3_module_radvd__local.register_functions(root_module)
root_module.end_section('ns3_module_radvd')
- root_module.begin_section('ns3_module_ping6')
- ns3_module_ping6.register_functions(root_module)
+ root_module.begin_section('ns3_module_mesh')
+ ns3_module_mesh.register_functions(root_module)
try:
- import ns3_module_ping6__local
+ import ns3_module_mesh__local
except ImportError:
pass
else:
- ns3_module_ping6__local.register_functions(root_module)
+ ns3_module_mesh__local.register_functions(root_module)
- root_module.end_section('ns3_module_ping6')
+ root_module.end_section('ns3_module_mesh')
root_module.begin_section('ns3_module_helper')
ns3_module_helper.register_functions(root_module)
@@ -965,9 +1282,33 @@
ns3_module_helper__local.register_functions(root_module)
root_module.end_section('ns3_module_helper')
+ root_module.begin_section('ns3_module_dot11s')
+ ns3_module_dot11s.register_functions(root_module)
+
+ try:
+ import ns3_module_dot11s__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_dot11s__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_dot11s')
+ root_module.begin_section('ns3_module_flame')
+ ns3_module_flame.register_functions(root_module)
+
+ try:
+ import ns3_module_flame__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_flame__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_flame')
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_dot11s(module.get_submodule('dot11s'), root_module)
+ register_functions_ns3_flame(module.get_submodule('flame'), root_module)
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
return
@@ -981,6 +1322,12 @@
def register_functions_ns3_addressUtils(module, root_module):
return
+def register_functions_ns3_dot11s(module, root_module):
+ return
+
+def register_functions_ns3_flame(module, root_module):
+ return
+
def register_functions_ns3_internal(module, root_module):
return
--- a/bindings/python/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/bindings/python/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -15,7 +15,7 @@
import Utils
## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 12, 0)
+REQUIRED_PYBINDGEN_VERSION = (0, 12, 0, 700)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
@@ -404,6 +404,7 @@
scanned_modules.append(name)
if env['ENABLE_PYTHON_BINDINGS']:
+ debug = ('PYBINDGEN_DEBUG' in os.environ)
source = [
'ns3modulegen.py',
'ns3modulegen_generated.py',
@@ -412,9 +413,14 @@
target = [
'ns3module.cc',
'ns3module.h',
- 'ns3modulegen.log',
]
- argv = ['NS3_ENABLED_FEATURES=${FEATURES}', '${PYTHON}', '${SRC[0]}', '${TGT[0]}']
+ if not debug:
+ target.append('ns3modulegen.log')
+
+ argv = ['NS3_ENABLED_FEATURES=${FEATURES}', '${PYTHON}']
+ if debug:
+ argv.extend(["-m", "pdb"])
+ argv.extend(['${SRC[0]}', '${TGT[0]}'])
argv.extend(get_modules_and_headers(bld).iterkeys())
for module in scanned_modules:
source.append("ns3_module_%s.py" % module)
@@ -422,7 +428,8 @@
if os.path.exists(os.path.join(curdir, local)):
source.append(local)
- argv.extend(['2>', '${TGT[2]}']) # 2> ns3modulegen.log
+ if not debug:
+ argv.extend(['2>', '${TGT[2]}']) # 2> ns3modulegen.log
for module in scanned_modules:
target.append("ns3_module_%s.cc" % module)
--- a/doc/manual/tracing.texi Tue Sep 15 16:25:49 2009 -0400
+++ b/doc/manual/tracing.texi Thu Sep 24 10:57:41 2009 -0400
@@ -322,6 +322,7 @@
core of the simulator;
@item Advanced users can modify the simulator core to add new tracing sources and
sinks.
+@end itemize
@node Implementation details
@section Implementation details
--- a/doc/testing/testing.texi Tue Sep 15 16:25:49 2009 -0400
+++ b/doc/testing/testing.texi Thu Sep 24 10:57:41 2009 -0400
@@ -66,12 +66,14 @@
@end titlepage
@c So the toc is printed at the start.
+@ifnottex
@anchor{Full Table of Contents}
-@contents
+@end ifnottex
+@shortcontents
@ifnottex
@node Top, Overview, Full Table of Contents
-@top ns-3 Manual (html version)
+@top ns-3 Testing and Validation (html version)
For a pdf version of this document,
see @uref{http://www.nsnam.org/docs/testing.pdf}.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/nix-simple.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,114 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+
+/*
+ * Simple point to point links:
+ *
+ * n0 -- n1 -- n2 -- n3
+ *
+ * n0 has UdpEchoClient
+ * n3 has UdpEchoServer
+ *
+ * n0 IP: 10.1.1.1
+ * n1 IP: 10.1.1.2, 10.1.2.1
+ * n2 IP: 10.1.2.2, 10.1.3.1
+ * n3 IP: 10.1.3.2
+ *
+ */
+
+using namespace ns3;
+
+NS_LOG_COMPONENT_DEFINE ("FirstScriptExample");
+
+ int
+main (int argc, char *argv[])
+{
+ LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);
+ LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);
+
+ NodeContainer nodes12;
+ nodes12.Create (2);
+
+ NodeContainer nodes23;
+ nodes23.Add (nodes12.Get (1));
+ nodes23.Create (1);
+
+ NodeContainer nodes34;
+ nodes34.Add(nodes23.Get (1));
+ nodes34.Create (1);
+
+ PointToPointHelper pointToPoint;
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
+
+ NodeContainer allNodes = NodeContainer (nodes12, nodes23.Get (1), nodes34.Get (1));
+
+ // NixHelper to install nix-vector routing
+ // on all nodes
+ Ipv4NixVectorHelper nixRouting;
+ Ipv4StaticRoutingHelper staticRouting;
+
+ Ipv4ListRoutingHelper list;
+ list.Add (staticRouting, 0);
+ list.Add (nixRouting, 10);
+
+ InternetStackHelper stack;
+ stack.SetRoutingHelper (list);
+ stack.Install (allNodes);
+
+ NetDeviceContainer devices12;
+ NetDeviceContainer devices23;
+ NetDeviceContainer devices34;
+ devices12 = pointToPoint.Install (nodes12);
+ devices23 = pointToPoint.Install (nodes23);
+ devices34 = pointToPoint.Install (nodes34);
+
+ Ipv4AddressHelper address1;
+ address1.SetBase ("10.1.1.0", "255.255.255.0");
+ Ipv4AddressHelper address2;
+ address2.SetBase ("10.1.2.0", "255.255.255.0");
+ Ipv4AddressHelper address3;
+ address3.SetBase ("10.1.3.0", "255.255.255.0");
+
+ address1.Assign (devices12);
+ address2.Assign (devices23);
+ Ipv4InterfaceContainer interfaces = address3.Assign (devices34);
+
+ UdpEchoServerHelper echoServer (9);
+
+ ApplicationContainer serverApps = echoServer.Install (nodes34.Get (1));
+ serverApps.Start (Seconds (1.0));
+ serverApps.Stop (Seconds (10.0));
+
+ UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
+ echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
+ echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
+ echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
+
+ ApplicationContainer clientApps = echoClient.Install (nodes12.Get (0));
+ clientApps.Start (Seconds (2.0));
+ clientApps.Stop (Seconds (10.0));
+
+
+ Simulator::Run ();
+ Simulator::Destroy ();
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/nms-p2p-nix.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,458 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+// DARPA NMS Campus Network Model
+//
+// - This topology replicates the original NMS Campus Network model
+// with the exception of chord links (which were never utilized in the
+// original model)
+// - Link Bandwidths and Delays may not be the same as the original
+// specifications
+//
+// (c)2009, GTech Systems, Inc. - Alfred Park <park@gtech-systems.com>
+
+// for timing functions
+#include <cstdlib>
+#include <sys/time.h>
+#include <fstream>
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/global-routing-module.h"
+#include "ns3/onoff-application.h"
+#include "ns3/packet-sink.h"
+#include "ns3/point-to-point-net-device.h"
+#include "ns3/simulator.h"
+
+using namespace std;
+using namespace ns3;
+
+typedef struct timeval TIMER_TYPE;
+#define TIMER_NOW(_t) gettimeofday(&_t,NULL);
+#define TIMER_SECONDS(_t) ((double)(_t).tv_sec + (_t).tv_usec*1e-6)
+#define TIMER_DIFF(_t1, _t2) (TIMER_SECONDS(_t1)-TIMER_SECONDS(_t2))
+
+NS_LOG_COMPONENT_DEFINE ("CampusNetworkModel");
+
+void Progress ()
+{
+ Time now = Simulator::Now ();
+ Simulator::Schedule (Seconds (0.1), Progress);
+}
+
+int
+main (int argc, char *argv[])
+{
+ //Config::SetDefault ("ns3::Simulator::SchedulerType", StringValue ("ns3::CalendarScheduler"));
+ TIMER_TYPE t0, t1, t2;
+ TIMER_NOW(t0);
+ cout << " ==== DARPA NMS CAMPUS NETWORK SIMULATION ====" << endl;
+ LogComponentEnable ("OnOffApplication", LOG_LEVEL_INFO);
+
+ //RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
+
+ int nCN = 2, nLANClients = 42;
+ bool nix = true;
+
+ CommandLine cmd;
+ cmd.AddValue ("CN", "Number of total CNs [2]", nCN);
+ cmd.AddValue ("LAN", "Number of nodes per LAN [42]", nLANClients);
+ cmd.AddValue ("NIX", "Toggle nix-vector routing", nix);
+ cmd.Parse (argc,argv);
+
+ if (nCN < 2)
+ {
+ cout << "Number of total CNs (" << nCN << ") lower than minimum of 2"
+ << endl;
+ return 1;
+ }
+
+ cout << "Number of CNs: " << nCN << ", LAN nodes: " << nLANClients << endl;
+
+ NodeContainer nodes_net0[nCN][3], nodes_net1[nCN][6], nodes_netLR[nCN],
+ nodes_net2[nCN][14], nodes_net2LAN[nCN][7][nLANClients],
+ nodes_net3[nCN][9], nodes_net3LAN[nCN][5][nLANClients];
+ PointToPointHelper p2p_2gb200ms, p2p_1gb5ms, p2p_100mb1ms;
+ InternetStackHelper stack;
+ Ipv4InterfaceContainer ifs, ifs0[nCN][3], ifs1[nCN][6], ifs2[nCN][14],
+ ifs3[nCN][9], ifs2LAN[nCN][7][nLANClients],
+ ifs3LAN[nCN][5][nLANClients];
+ Ipv4AddressHelper address;
+ std::ostringstream oss;
+ p2p_1gb5ms.SetDeviceAttribute ("DataRate", StringValue ("1Gbps"));
+ p2p_1gb5ms.SetChannelAttribute ("Delay", StringValue ("5ms"));
+ p2p_2gb200ms.SetDeviceAttribute ("DataRate", StringValue ("2Gbps"));
+ p2p_2gb200ms.SetChannelAttribute ("Delay", StringValue ("200ms"));
+ p2p_100mb1ms.SetDeviceAttribute ("DataRate", StringValue ("100Mbps"));
+ p2p_100mb1ms.SetChannelAttribute ("Delay", StringValue ("1ms"));
+
+ // Setup NixVector Routing
+ Ipv4NixVectorHelper nixRouting;
+ Ipv4StaticRoutingHelper staticRouting;
+
+ Ipv4ListRoutingHelper list;
+ list.Add (staticRouting, 0);
+ list.Add (nixRouting, 10);
+
+ if (nix)
+ {
+ stack.SetRoutingHelper (list);
+ }
+
+ // Create Campus Networks
+ for (int z = 0; z < nCN; ++z)
+ {
+ cout << "Creating Campus Network " << z << ":" << endl;
+ // Create Net0
+ cout << " SubNet [ 0";
+ for (int i = 0; i < 3; ++i)
+ {
+ nodes_net0[z][i].Create (1);
+ stack.Install (nodes_net0[z][i]);
+ }
+ nodes_net0[z][0].Add (nodes_net0[z][1].Get (0));
+ nodes_net0[z][1].Add (nodes_net0[z][2].Get (0));
+ nodes_net0[z][2].Add (nodes_net0[z][0].Get (0));
+ NetDeviceContainer ndc0[3];
+ for (int i = 0; i < 3; ++i)
+ {
+ ndc0[i] = p2p_1gb5ms.Install (nodes_net0[z][i]);
+ }
+ // Create Net1
+ cout << " 1";
+ for (int i = 0; i < 6; ++i)
+ {
+ nodes_net1[z][i].Create (1);
+ stack.Install (nodes_net1[z][i]);
+ }
+ nodes_net1[z][0].Add (nodes_net1[z][1].Get (0));
+ nodes_net1[z][2].Add (nodes_net1[z][0].Get (0));
+ nodes_net1[z][3].Add (nodes_net1[z][0].Get (0));
+ nodes_net1[z][4].Add (nodes_net1[z][1].Get (0));
+ nodes_net1[z][5].Add (nodes_net1[z][1].Get (0));
+ NetDeviceContainer ndc1[6];
+ for (int i = 0; i < 6; ++i)
+ {
+ if (i == 1)
+ {
+ continue;
+ }
+ ndc1[i] = p2p_1gb5ms.Install (nodes_net1[z][i]);
+ }
+ // Connect Net0 <-> Net1
+ NodeContainer net0_1;
+ net0_1.Add (nodes_net0[z][2].Get (0));
+ net0_1.Add (nodes_net1[z][0].Get (0));
+ NetDeviceContainer ndc0_1;
+ ndc0_1 = p2p_1gb5ms.Install (net0_1);
+ oss.str("");
+ oss << 10 + z << ".1.252.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc0_1);
+ // Create Net2
+ cout << " 2";
+ for (int i = 0; i < 14; ++i)
+ {
+ nodes_net2[z][i].Create (1);
+ stack.Install (nodes_net2[z][i]);
+ }
+ nodes_net2[z][0].Add (nodes_net2[z][1].Get (0));
+ nodes_net2[z][2].Add (nodes_net2[z][0].Get (0));
+ nodes_net2[z][1].Add (nodes_net2[z][3].Get (0));
+ nodes_net2[z][3].Add (nodes_net2[z][2].Get (0));
+ nodes_net2[z][4].Add (nodes_net2[z][2].Get (0));
+ nodes_net2[z][5].Add (nodes_net2[z][3].Get (0));
+ nodes_net2[z][6].Add (nodes_net2[z][5].Get (0));
+ nodes_net2[z][7].Add (nodes_net2[z][2].Get (0));
+ nodes_net2[z][8].Add (nodes_net2[z][3].Get (0));
+ nodes_net2[z][9].Add (nodes_net2[z][4].Get (0));
+ nodes_net2[z][10].Add (nodes_net2[z][5].Get (0));
+ nodes_net2[z][11].Add (nodes_net2[z][6].Get (0));
+ nodes_net2[z][12].Add (nodes_net2[z][6].Get (0));
+ nodes_net2[z][13].Add (nodes_net2[z][6].Get (0));
+ NetDeviceContainer ndc2[14];
+ for (int i = 0; i < 14; ++i)
+ {
+ ndc2[i] = p2p_1gb5ms.Install (nodes_net2[z][i]);
+ }
+ NetDeviceContainer ndc2LAN[7][nLANClients];
+ for (int i = 0; i < 7; ++i)
+ {
+ oss.str ("");
+ oss << 10 + z << ".4." << 15 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ for (int j = 0; j < nLANClients; ++j)
+ {
+ nodes_net2LAN[z][i][j].Create (1);
+ stack.Install (nodes_net2LAN[z][i][j]);
+ nodes_net2LAN[z][i][j].Add (nodes_net2[z][i+7].Get (0));
+ ndc2LAN[i][j] = p2p_100mb1ms.Install (nodes_net2LAN[z][i][j]);
+ ifs2LAN[z][i][j] = address.Assign (ndc2LAN[i][j]);
+ }
+ }
+ // Create Net3
+ cout << " 3 ]" << endl;
+ for (int i = 0; i < 9; ++i)
+ {
+ nodes_net3[z][i].Create (1);
+ stack.Install(nodes_net3[z][i]);
+ }
+ nodes_net3[z][0].Add (nodes_net3[z][1].Get (0));
+ nodes_net3[z][1].Add (nodes_net3[z][2].Get (0));
+ nodes_net3[z][2].Add (nodes_net3[z][3].Get (0));
+ nodes_net3[z][3].Add (nodes_net3[z][1].Get (0));
+ nodes_net3[z][4].Add (nodes_net3[z][0].Get (0));
+ nodes_net3[z][5].Add (nodes_net3[z][0].Get (0));
+ nodes_net3[z][6].Add (nodes_net3[z][2].Get (0));
+ nodes_net3[z][7].Add (nodes_net3[z][3].Get (0));
+ nodes_net3[z][8].Add (nodes_net3[z][3].Get (0));
+ NetDeviceContainer ndc3[9];
+ for (int i = 0; i < 9; ++i)
+ {
+ ndc3[i] = p2p_1gb5ms.Install (nodes_net3[z][i]);
+ }
+ NetDeviceContainer ndc3LAN[5][nLANClients];
+ for (int i = 0; i < 5; ++i)
+ {
+ oss.str ("");
+ oss << 10 + z << ".5." << 10 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.255");
+ for (int j = 0; j < nLANClients; ++j)
+ {
+ nodes_net3LAN[z][i][j].Create (1);
+ stack.Install (nodes_net3LAN[z][i][j]);
+ nodes_net3LAN[z][i][j].Add (nodes_net3[z][i+4].Get (0));
+ ndc3LAN[i][j] = p2p_100mb1ms.Install (nodes_net3LAN[z][i][j]);
+ ifs3LAN[z][i][j] = address.Assign (ndc3LAN[i][j]);
+ }
+ }
+ cout << " Connecting Subnets..." << endl;
+ // Create Lone Routers (Node 4 & 5)
+ nodes_netLR[z].Create (2);
+ stack.Install (nodes_netLR[z]);
+ NetDeviceContainer ndcLR;
+ ndcLR = p2p_1gb5ms.Install (nodes_netLR[z]);
+ // Connect Net2/Net3 through Lone Routers to Net0
+ NodeContainer net0_4, net0_5, net2_4a, net2_4b, net3_5a, net3_5b;
+ net0_4.Add (nodes_netLR[z].Get (0));
+ net0_4.Add (nodes_net0[z][0].Get (0));
+ net0_5.Add (nodes_netLR[z].Get (1));
+ net0_5.Add (nodes_net0[z][1].Get (0));
+ net2_4a.Add (nodes_netLR[z].Get (0));
+ net2_4a.Add (nodes_net2[z][0].Get (0));
+ net2_4b.Add (nodes_netLR[z].Get (1));
+ net2_4b.Add (nodes_net2[z][1].Get (0));
+ net3_5a.Add (nodes_netLR[z].Get (1));
+ net3_5a.Add (nodes_net3[z][0].Get (0));
+ net3_5b.Add (nodes_netLR[z].Get (1));
+ net3_5b.Add (nodes_net3[z][1].Get (0));
+ NetDeviceContainer ndc0_4, ndc0_5, ndc2_4a, ndc2_4b, ndc3_5a, ndc3_5b;
+ ndc0_4 = p2p_1gb5ms.Install (net0_4);
+ oss.str ("");
+ oss << 10 + z << ".1.253.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc0_4);
+ ndc0_5 = p2p_1gb5ms.Install (net0_5);
+ oss.str ("");
+ oss << 10 + z << ".1.254.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc0_5);
+ ndc2_4a = p2p_1gb5ms.Install (net2_4a);
+ oss.str ("");
+ oss << 10 + z << ".4.253.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc2_4a);
+ ndc2_4b = p2p_1gb5ms.Install (net2_4b);
+ oss.str ("");
+ oss << 10 + z << ".4.254.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc2_4b);
+ ndc3_5a = p2p_1gb5ms.Install (net3_5a);
+ oss.str ("");
+ oss << 10 + z << ".5.253.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc3_5a);
+ ndc3_5b = p2p_1gb5ms.Install (net3_5b);
+ oss.str ("");
+ oss << 10 + z << ".5.254.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc3_5b);
+ // Assign IP addresses
+ cout << " Assigning IP addresses..." << endl;
+ for (int i = 0; i < 3; ++i)
+ {
+ oss.str ("");
+ oss << 10 + z << ".1." << 1 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs0[z][i] = address.Assign (ndc0[i]);
+ }
+ for (int i = 0; i < 6; ++i)
+ {
+ if (i == 1)
+ {
+ continue;
+ }
+ oss.str ("");
+ oss << 10 + z << ".2." << 1 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs1[z][i] = address.Assign (ndc1[i]);
+ }
+ oss.str ("");
+ oss << 10 + z << ".3.1.0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndcLR);
+ for (int i = 0; i < 14; ++i)
+ {
+ oss.str ("");
+ oss << 10 + z << ".4." << 1 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs2[z][i] = address.Assign (ndc2[i]);
+ }
+ for (int i = 0; i < 9; ++i)
+ {
+ oss.str ("");
+ oss << 10 + z << ".5." << 1 + i << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs3[z][i] = address.Assign (ndc3[i]);
+ }
+ }
+ // Create Ring Links
+ if (nCN > 1)
+ {
+ cout << "Forming Ring Topology..." << endl;
+ NodeContainer nodes_ring[nCN];
+ for (int z = 0; z < nCN-1; ++z)
+ {
+ nodes_ring[z].Add (nodes_net0[z][0].Get (0));
+ nodes_ring[z].Add (nodes_net0[z+1][0].Get (0));
+ }
+ nodes_ring[nCN-1].Add (nodes_net0[nCN-1][0].Get (0));
+ nodes_ring[nCN-1].Add (nodes_net0[0][0].Get (0));
+ NetDeviceContainer ndc_ring[nCN];
+ for (int z = 0; z < nCN; ++z)
+ {
+ ndc_ring[z] = p2p_2gb200ms.Install (nodes_ring[z]);
+ oss.str ("");
+ oss << "254.1." << z + 1 << ".0";
+ address.SetBase (oss.str ().c_str (), "255.255.255.0");
+ ifs = address.Assign (ndc_ring[z]);
+ }
+ }
+
+ // Create Traffic Flows
+ cout << "Creating TCP Traffic Flows:" << endl;
+ Config::SetDefault ("ns3::OnOffApplication::MaxBytes", UintegerValue (500000));
+ Config::SetDefault ("ns3::OnOffApplication::OnTime",
+ RandomVariableValue (ConstantVariable (1)));
+ Config::SetDefault ("ns3::OnOffApplication::OffTime",
+ RandomVariableValue (ConstantVariable (0)));
+ Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (512));
+
+ UniformVariable urng;
+ int r1;
+ double r2;
+ for (int z = 0; z < nCN; ++z)
+ {
+ int x = z + 1;
+ if (z == nCN - 1)
+ {
+ x = 0;
+ }
+ // Subnet 2 LANs
+ cout << " Campus Network " << z << " Flows [ Net2 ";
+ for (int i = 0; i < 7; ++i)
+ {
+ for (int j = 0; j < nLANClients; ++j)
+ {
+ // Sinks
+ PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory",
+ InetSocketAddress (Ipv4Address::GetAny (), 9999));
+ ApplicationContainer sinkApp = sinkHelper.Install (
+ nodes_net2LAN[z][i][j].Get (0));
+ sinkApp.Start (Seconds (100.0));
+ // Sources
+ r1 = 2 + (int)(4 * urng.GetValue ());
+ r2 = 100 + (10 * urng.GetValue ());;
+ OnOffHelper client ("ns3::TcpSocketFactory", Address ());
+ AddressValue remoteAddress(InetSocketAddress (
+ ifs2LAN[z][i][j].GetAddress (0), 9999));
+ client.SetAttribute ("Remote", remoteAddress);
+ ApplicationContainer clientApp;
+ clientApp.Add (client.Install (nodes_net1[x][r1].Get (0)));
+ clientApp.Start (Seconds (r2));
+ }
+ }
+ // Subnet 3 LANs
+ cout << "Net3 ]" << endl;
+ for (int i = 0; i < 5; ++i)
+ {
+ for (int j = 0; j < nLANClients; ++j)
+ {
+ // Sinks
+ PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory",
+ InetSocketAddress (Ipv4Address::GetAny (), 9999));
+ ApplicationContainer sinkApp = sinkHelper.Install (
+ nodes_net3LAN[z][i][j].Get (0));
+ sinkApp.Start (Seconds (100.0));
+ // Sources
+ r1 = 2 + (int)(4 * urng.GetValue ());
+ r2 = 100 + (10 * urng.GetValue ());;
+ OnOffHelper client ("ns3::TcpSocketFactory", Address ());
+ AddressValue remoteAddress (InetSocketAddress (
+ ifs2LAN[z][i][j].GetAddress (0), 9999));
+ client.SetAttribute ("Remote", remoteAddress);
+ ApplicationContainer clientApp;
+ clientApp.Add (client.Install (nodes_net1[x][r1].Get (0)));
+ clientApp.Start (Seconds (r2));
+ }
+ }
+ }
+
+ cout << "Created " << NodeList::GetNNodes () << " nodes." << endl;
+ TIMER_TYPE routingStart;
+ TIMER_NOW (routingStart);
+
+ if (nix)
+ {
+ // Calculate routing tables
+ cout << "Using Nix-vectors..." << endl;
+ }
+ else
+ {
+ // Calculate routing tables
+ cout << "Populating Global Static Routing Tables..." << endl;
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+ }
+
+ TIMER_TYPE routingEnd;
+ TIMER_NOW (routingEnd);
+ cout << "Routing tables population took "
+ << TIMER_DIFF (routingEnd, routingStart) << endl;
+#if 0
+ std::ofstream ascii;
+ ascii.open("nms_p2p_nix.tr");
+ PointToPointHelper::EnableAsciiAll(ascii);
+ CsmaHelper::EnableAsciiAll(ascii);
+#endif
+
+#if 0
+ PointToPointHelper::EnablePcapAll("nms_p2p");
+ CsmaHelper::EnablePcapAll("nms_csma");
+#endif
+
+ Simulator::ScheduleNow (Progress);
+ cout << "Running simulator..." << endl;
+ TIMER_NOW (t1);
+ Simulator::Stop (Seconds (200.0));
+ Simulator::Run ();
+ TIMER_NOW (t2);
+ cout << "Simulator finished." << endl;
+ Simulator::Destroy ();
+
+ double d1 = TIMER_DIFF (t1, t0), d2 = TIMER_DIFF (t2, t1);
+ cout << "-----" << endl << "Runtime Stats:" << endl;
+ cout << "Simulator init time: " << d1 << endl;
+ cout << "Simulator run time: " << d2 << endl;
+ cout << "Total elapsed time: " << d1+d2 << endl;
+ return 0;
+}
--- a/examples/simple-global-routing.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/examples/simple-global-routing.cc Thu Sep 24 10:57:41 2009 -0400
@@ -69,6 +69,8 @@
// Allow the user to override any of the defaults and the above
// DefaultValue::Bind ()s at run-time, via command-line arguments
CommandLine cmd;
+ bool enableFlowMonitor = false;
+ cmd.AddValue("EnableMonitor", "Enable Flow Monitor", enableFlowMonitor);
cmd.Parse (argc, argv);
// Here, we will explicitly create four nodes. In more sophisticated
@@ -148,10 +150,24 @@
PointToPointHelper::EnablePcapAll ("simple-global-routing");
PointToPointHelper::EnableAsciiAll (ascii);
+ // Flow Monitor
+ Ptr<FlowMonitor> flowmon;
+ if (enableFlowMonitor)
+ {
+ FlowMonitorHelper flowmonHelper;
+ flowmon = flowmonHelper.InstallAll ();
+ }
+
NS_LOG_INFO ("Run Simulation.");
+ Simulator::Stop (Seconds (11));
Simulator::Run ();
- Simulator::Destroy ();
NS_LOG_INFO ("Done.");
+ if (enableFlowMonitor)
+ {
+ flowmon->SerializeToXmlFile ("simple-global-routing.flowmon", false, false);
+ }
+
+ Simulator::Destroy ();
return 0;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/wifi-olsr-flowmon.py Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,171 @@
+# -*- Mode: Python; -*-
+# Copyright (c) 2009 INESC Porto
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Authors: Gustavo Carneiro <gjc@inescporto.pt>
+
+import sys
+import ns3
+
+DISTANCE = 150 # (m)
+NUM_NODES_SIDE = 3
+
+def main(argv):
+
+ cmd = ns3.CommandLine()
+
+ cmd.NumNodesSide = None
+ cmd.AddValue("NumNodesSide", "Grid side number of nodes (total number of nodes will be this number squared)")
+
+ cmd.Results = None
+ cmd.AddValue("Results", "Write XML results to file")
+
+ cmd.Plot = None
+ cmd.AddValue("Plot", "Plot the results using the matplotlib python module")
+
+ cmd.Parse(argv)
+
+ wifi = ns3.WifiHelper.Default()
+ wifiMac = ns3.NqosWifiMacHelper.Default()
+ wifiPhy = ns3.YansWifiPhyHelper.Default()
+ wifiChannel = ns3.YansWifiChannelHelper.Default()
+ wifiPhy.SetChannel(wifiChannel.Create())
+ ssid = ns3.Ssid("wifi-default")
+ wifi.SetRemoteStationManager("ns3::ArfWifiManager")
+ wifiMac.SetType ("ns3::AdhocWifiMac", "Ssid", ns3.SsidValue(ssid))
+
+ internet = ns3.InternetStackHelper()
+ list_routing = ns3.Ipv4ListRoutingHelper()
+ olsr_routing = ns3.OlsrHelper()
+ static_routing = ns3.Ipv4StaticRoutingHelper()
+ list_routing.Add(static_routing, 0)
+ list_routing.Add(olsr_routing, 100)
+ internet.SetRoutingHelper(list_routing)
+
+ ipv4Addresses = ns3.Ipv4AddressHelper()
+ ipv4Addresses.SetBase(ns3.Ipv4Address("10.0.0.0"), ns3.Ipv4Mask("255.255.255.0"))
+
+ port = 9 # Discard port(RFC 863)
+ onOffHelper = ns3.OnOffHelper("ns3::UdpSocketFactory",
+ ns3.Address(ns3.InetSocketAddress(ns3.Ipv4Address("10.0.0.1"), port)))
+ onOffHelper.SetAttribute("DataRate", ns3.DataRateValue(ns3.DataRate("100kbps")))
+ onOffHelper.SetAttribute("OnTime", ns3.RandomVariableValue(ns3.ConstantVariable(1)))
+ onOffHelper.SetAttribute("OffTime", ns3.RandomVariableValue(ns3.ConstantVariable(0)))
+
+ addresses = []
+ nodes = []
+
+ if cmd.NumNodesSide is None:
+ num_nodes_side = NUM_NODES_SIDE
+ else:
+ num_nodes_side = int(cmd.NumNodesSide)
+
+ for xi in range(num_nodes_side):
+ for yi in range(num_nodes_side):
+
+ node = ns3.Node()
+ nodes.append(node)
+
+ internet.Install(ns3.NodeContainer(node))
+
+ mobility = ns3.ConstantPositionMobilityModel()
+ mobility.SetPosition(ns3.Vector(xi*DISTANCE, yi*DISTANCE, 0))
+ node.AggregateObject(mobility)
+
+ devices = wifi.Install(wifiPhy, wifiMac, node)
+ ipv4_interfaces = ipv4Addresses.Assign(devices)
+ addresses.append(ipv4_interfaces.GetAddress(0))
+
+ for i, node in enumerate(nodes):
+ destaddr = addresses[(len(addresses) - 1 - i) % len(addresses)]
+ #print i, destaddr
+ onOffHelper.SetAttribute("Remote", ns3.AddressValue(ns3.InetSocketAddress(destaddr, port)))
+ app = onOffHelper.Install(ns3.NodeContainer(node))
+ app.Start(ns3.Seconds(ns3.UniformVariable(20, 30).GetValue()))
+
+ #internet.EnablePcapAll("wifi-olsr")
+ flowmon_helper = ns3.FlowMonitorHelper()
+ #flowmon_helper.SetMonitorAttribute("StartTime", ns3.TimeValue(ns3.Seconds(31)))
+ monitor = flowmon_helper.InstallAll()
+ monitor.SetAttribute("DelayBinWidth", ns3.DoubleValue(0.001))
+ monitor.SetAttribute("JitterBinWidth", ns3.DoubleValue(0.001))
+ monitor.SetAttribute("PacketSizeBinWidth", ns3.DoubleValue(20))
+
+ ns3.Simulator.Stop(ns3.Seconds(44.0))
+ ns3.Simulator.Run()
+
+ def print_stats(os, st):
+ print >> os, " Tx Bytes: ", st.txBytes
+ print >> os, " Rx Bytes: ", st.rxBytes
+ print >> os, " Tx Packets: ", st.txPackets
+ print >> os, " Rx Packets: ", st.rxPackets
+ print >> os, " Lost Packets: ", st.lostPackets
+ if st.rxPackets > 0:
+ print >> os, " Mean{Delay}: ", (st.delaySum.GetSeconds() / st.rxPackets)
+ print >> os, " Mean{Jitter}: ", (st.jitterSum.GetSeconds() / (st.rxPackets-1))
+ print >> os, " Mean{Hop Count}: ", float(st.timesForwarded) / st.rxPackets + 1
+
+ if 0:
+ print >> os, "Delay Histogram"
+ for i in range(st.delayHistogram.GetNBins () ):
+ print >> os, " ",i,"(", st.delayHistogram.GetBinStart (i), "-", \
+ st.delayHistogram.GetBinEnd (i), "): ", st.delayHistogram.GetBinCount (i)
+ print >> os, "Jitter Histogram"
+ for i in range(st.jitterHistogram.GetNBins () ):
+ print >> os, " ",i,"(", st.jitterHistogram.GetBinStart (i), "-", \
+ st.jitterHistogram.GetBinEnd (i), "): ", st.jitterHistogram.GetBinCount (i)
+ print >> os, "PacketSize Histogram"
+ for i in range(st.packetSizeHistogram.GetNBins () ):
+ print >> os, " ",i,"(", st.packetSizeHistogram.GetBinStart (i), "-", \
+ st.packetSizeHistogram.GetBinEnd (i), "): ", st.packetSizeHistogram.GetBinCount (i)
+
+ for reason, drops in enumerate(st.packetsDropped):
+ print " Packets dropped by reason %i: %i" % (reason, drops)
+ #for reason, drops in enumerate(st.bytesDropped):
+ # print "Bytes dropped by reason %i: %i" % (reason, drops)
+
+ monitor.CheckForLostPackets()
+ classifier = flowmon_helper.GetClassifier()
+
+ if cmd.Results is None:
+ for flow_id, flow_stats in monitor.GetFlowStats():
+ t = classifier.FindFlow(flow_id)
+ proto = {6: 'TCP', 17: 'UDP'} [t.protocol]
+ print "FlowID: %i (%s %s/%s --> %s/%i)" % \
+ (flow_id, proto, t.sourceAddress, t.sourcePort, t.destinationAddress, t.destinationPort)
+ print_stats(sys.stdout, flow_stats)
+ else:
+ print monitor.SerializeToXmlFile(cmd.Results, True, True)
+
+
+ if cmd.Plot is not None:
+ import pylab
+ delays = []
+ for flow_id, flow_stats in monitor.GetFlowStats():
+ tupl = classifier.FindFlow(flow_id)
+ if tupl.protocol == 17 and tupl.sourcePort == 698:
+ continue
+ delays.append(flow_stats.delaySum.GetSeconds() / flow_stats.rxPackets)
+ pylab.hist(delays, 20)
+ pylab.xlabel("Delay (s)")
+ pylab.ylabel("Number of Flows")
+ pylab.show()
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+
--- a/examples/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/examples/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -96,6 +96,14 @@
['point-to-point', 'internet-stack', 'olsr'])
obj.source = 'simple-point-to-point-olsr.cc'
+ obj = bld.create_ns3_program('nix-simple',
+ ['point-to-point', 'internet-stack', 'nix-vector-routing'])
+ obj.source = 'nix-simple.cc'
+
+ obj = bld.create_ns3_program('nms-p2p-nix',
+ ['point-to-point', 'internet-stack', 'nix-vector-routing'])
+ obj.source = 'nms-p2p-nix.cc'
+
obj = bld.create_ns3_program('tcp-large-transfer',
['point-to-point', 'internet-stack'])
obj.source = 'tcp-large-transfer.cc'
--- a/regression.py Tue Sep 15 16:25:49 2009 -0400
+++ b/regression.py Thu Sep 24 10:57:41 2009 -0400
@@ -112,7 +112,7 @@
if not reason_cannot_run:
pyscript = getattr(mod, "pyscript", None)
if pyscript:
- Options.options.compile_targets += ',ns3module'
+ Options.options.compile_targets += ',ns3module,pybindgen-command'
else:
program = getattr(mod, "program", short_name)
Options.options.compile_targets += ',' + program
--- a/src/applications/radvd/radvd-interface.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/applications/radvd/radvd-interface.h Thu Sep 24 10:57:41 2009 -0400
@@ -81,7 +81,7 @@
/**
* \brief Set send advert flag.
- * \return sendAdvert value
+ * \param sendAdvert value
*/
void SetSendAdvert (bool sendAdvert);
--- a/src/common/data-rate.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/data-rate.h Thu Sep 24 10:57:41 2009 -0400
@@ -78,6 +78,7 @@
* Construct a data rate from an integer. This class only supports positive
* integer data rates in units of bits/s, meaning 1bit/s is the smallest
* non-trivial bitrate availiable.
+ * \param bps bit/s value
*/
DataRate (uint64_t bps);
DataRate (std::string rate);
--- a/src/common/header.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/header.h Thu Sep 24 10:57:41 2009 -0400
@@ -77,6 +77,7 @@
*/
virtual uint32_t Deserialize (Buffer::Iterator start) = 0;
/**
+ * \param os output stream
* This method is used by Packet::Print to print the
* content of a trailer as ascii data to a c++ output stream.
* Although the trailer is free to format its output as it
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/nix-vector.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,419 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#include "ns3/log.h"
+
+#include "nix-vector.h"
+
+NS_LOG_COMPONENT_DEFINE ("NixVector");
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (NixVector);
+
+typedef std::vector<uint32_t> NixBits_t;
+
+NixVector::NixVector ()
+ : m_nixVector (0),
+ m_used (0),
+ m_currentVectorBitSize (0),
+ m_totalBitSize (0)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ m_nixVector.push_back (0);
+}
+
+NixVector::~NixVector ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+}
+
+Ptr<NixVector>
+NixVector::Copy (void) const
+{
+ // we need to invoke the copy constructor directly
+ // rather than calling Create because the copy constructor
+ // is private.
+ return Ptr<NixVector> (new NixVector (*this), false);
+}
+
+NixVector::NixVector (const NixVector &o)
+ : m_nixVector (o.m_nixVector),
+ m_used (o.m_used),
+ m_currentVectorBitSize (o.m_currentVectorBitSize),
+ m_totalBitSize (o.m_totalBitSize)
+{}
+
+NixVector &
+NixVector::operator = (const NixVector &o)
+{
+ if (this == &o)
+ {
+ return *this;
+ }
+ m_nixVector = o.m_nixVector;
+ m_used = o.m_used;
+ m_currentVectorBitSize = o.m_currentVectorBitSize;
+ m_totalBitSize = o.m_totalBitSize;
+ return *this;
+}
+
+TypeId
+NixVector::GetTypeId(void)
+{
+ static TypeId tid = TypeId ("ns3::NixVector")
+ .SetParent<Object> ()
+ .AddConstructor<NixVector> ()
+ ;
+
+ return tid;
+}
+
+std::ostream & operator << (std::ostream &os, const NixVector &nix)
+{
+ nix.DumpNixVector (os);
+ return os;
+}
+
+void
+NixVector::AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ if (numberOfBits > 32)
+ {
+ NS_FATAL_ERROR ("Can't add more than 32 bits to a nix-vector at one time");
+ }
+
+ // Check to see if the number
+ // of new bits forces the creation of
+ // a new entry into the NixVector vector
+ // i.e., we will overflow int o.w.
+ if (m_currentVectorBitSize + numberOfBits > 32)
+ {
+ if (m_currentVectorBitSize == 32)
+ {
+ // can't add any more to this vector, so
+ // start a new one
+ m_nixVector.push_back(newBits);
+
+ // also reset number of bits in
+ // m_currentVectorBitSize
+ // because we are working with a new
+ // entry in the vector
+ m_currentVectorBitSize = numberOfBits;
+ m_totalBitSize += numberOfBits;
+ }
+ else
+ {
+ // Put what we can in the remaining portion of the
+ // vector entry
+ uint32_t tempBits = newBits;
+ tempBits = newBits << m_currentVectorBitSize;
+ tempBits |= m_nixVector.back ();
+ m_nixVector.back () = tempBits;
+
+ // Now start a new vector entry
+ // and push the remaining bits
+ // there
+ newBits = newBits >> (32 - m_currentVectorBitSize);
+ m_nixVector.push_back (newBits);
+
+ // also reset number of bits in
+ // m_currentVectorBitSize
+ // because we are working with a new
+ // entry in the vector
+ m_currentVectorBitSize = (numberOfBits - (32 - m_currentVectorBitSize));
+ m_totalBitSize += numberOfBits;
+ }
+ }
+ else
+ {
+ // Shift over the newbits by the
+ // number of current bits. This allows
+ // us to logically OR with the present
+ // NixVector, resulting in the new
+ // NixVector
+ newBits = newBits << m_currentVectorBitSize;
+ newBits |= m_nixVector.back ();
+
+ // Now insert the new NixVector and
+ // increment number of bits for
+ // m_currentVectorBitSize and m_totalBitSize
+ // accordingly
+ m_nixVector.back () = newBits;
+ m_currentVectorBitSize += numberOfBits;
+ m_totalBitSize += numberOfBits;
+ }
+}
+
+uint32_t
+NixVector::ExtractNeighborIndex (uint32_t numberOfBits)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ if (numberOfBits > 32)
+ {
+ NS_FATAL_ERROR ("Can't extract more than 32 bits to a nix-vector at one time");
+ }
+
+ uint32_t vectorIndex = 0;
+ uint32_t extractedBits = 0;
+ uint32_t totalRemainingBits = GetRemainingBits ();
+
+ if (numberOfBits > totalRemainingBits)
+ {
+ NS_FATAL_ERROR ("You've tried to extract too many bits of the Nix-vector, " << this << ". NumberBits: "
+ << numberOfBits << " Remaining: " << totalRemainingBits);
+ }
+
+ if (numberOfBits <= 0)
+ {
+ NS_FATAL_ERROR ("You've specified a number of bits for Nix-vector <= 0!");
+ }
+
+ // First determine where in the NixVector
+ // vector we need to extract which depends
+ // on the number of used bits and the total
+ // number of bits
+ vectorIndex = ((totalRemainingBits-1) / 32);
+
+ // Next, determine if this extraction will
+ // span multiple vector entries
+ if (vectorIndex > 0) // we could span more than one
+ {
+ if ((numberOfBits-1) > ((totalRemainingBits-1) % 32)) // we do span more than one
+ {
+ extractedBits = m_nixVector.at (vectorIndex) << (32 - (totalRemainingBits % 32));
+ extractedBits = extractedBits >> ((32 - (totalRemainingBits % 32))
+ - (numberOfBits - (totalRemainingBits % 32)));
+ extractedBits |= (m_nixVector.at (vectorIndex-1)
+ >> (32 - (numberOfBits - (totalRemainingBits % 32))));
+ m_used += numberOfBits;
+ return extractedBits;
+ }
+ }
+
+ // we don't span more than one
+ extractedBits = m_nixVector.at (vectorIndex) << (32 - (totalRemainingBits % 32));
+ extractedBits = extractedBits >> (32 - (numberOfBits));
+ m_used += numberOfBits;
+ return extractedBits;
+}
+
+uint32_t
+NixVector::GetSerializedSize (void) const
+{
+ uint32_t totalSizeInBytes;
+ totalSizeInBytes = sizeof (m_used) + sizeof (m_currentVectorBitSize) +
+ sizeof (m_totalBitSize) + (4 * m_nixVector.size ());
+
+ // add four to this to account
+ // for the nix-vector length
+ // entry
+ return totalSizeInBytes+4;
+}
+
+void
+NixVector::Serialize (Buffer::Iterator i, uint32_t size) const
+{
+ uint32_t bytesWritten = 0;
+
+ i.WriteU32 (size);
+ bytesWritten += 4;
+
+ i.WriteU32 (m_used);
+ bytesWritten += 4;
+
+ i.WriteU32 (m_currentVectorBitSize);
+ bytesWritten += 4;
+
+ i.WriteU32 (m_totalBitSize);
+ bytesWritten += 4;
+
+ for (uint32_t j = 0; j < m_nixVector.size (); j++)
+ {
+ i.WriteU32 (m_nixVector.at(j));
+ bytesWritten += 4;
+ }
+
+ NS_ASSERT (bytesWritten == size);
+}
+
+uint32_t
+NixVector::Deserialize (Buffer::Iterator i)
+{
+ NS_LOG_FUNCTION (this);
+ uint32_t totalSize = i.ReadU32 ();
+ uint32_t size = totalSize;
+ size -= 4;
+
+ NS_ASSERT (size >= 4);
+ m_used = i.ReadU32 ();
+ size -=4;
+
+ NS_ASSERT (size >= 4);
+ m_currentVectorBitSize = i.ReadU32 ();
+ size -=4;
+
+ NS_ASSERT (size >= 4);
+ m_totalBitSize = i.ReadU32 ();
+ size -=4;
+
+ // make sure the nix-vector
+ // is empty
+ m_nixVector.clear ();
+ while (size > 0)
+ {
+ NS_ASSERT (size >= 4);
+ m_nixVector.push_back (i.ReadU32 ());
+ size -=4;
+ }
+
+ NS_ASSERT (size == 0);
+ return totalSize;
+}
+
+void
+NixVector::DumpNixVector (std::ostream &os) const
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ uint32_t i = m_nixVector.size ();
+ std::vector<uint32_t>::const_reverse_iterator rIter;
+ for (rIter = m_nixVector.rbegin (); rIter != m_nixVector.rend (); rIter++)
+ {
+ uint32_t numBits = BitCount (*rIter);
+
+ // all this work just to get the nix
+ // vector to print out neat
+
+ // if it's not the first entry in the vector,
+ // we may have to add some zeros and fill
+ // out the vector
+ if (m_totalBitSize > ((sizeof (uint32_t)*8) * i))
+ {
+ PrintDec2BinNixFill (*rIter,numBits,os);
+ }
+ else if (m_totalBitSize%32 == 0)
+ {
+ PrintDec2BinNix (*rIter,32,os);
+ }
+ else
+ {
+ PrintDec2BinNix (*rIter,m_totalBitSize%32,os);
+ }
+
+ i--;
+
+ if (i > 0)
+ {
+ os << "--";
+ }
+ }
+}
+
+uint32_t
+NixVector::GetRemainingBits (void)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ return (m_totalBitSize - m_used);
+}
+
+uint32_t
+NixVector::BitCount (uint32_t numberOfNeighbors) const
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ // Given the numberOfNeighbors, return the number
+ // of bits needed (essentially, log2(numberOfNeighbors-1)
+ uint32_t bitCount = 0;
+
+ if (numberOfNeighbors < 2)
+ {
+ return 1;
+ }
+ else
+ {
+ for (numberOfNeighbors -= 1; numberOfNeighbors != 0; numberOfNeighbors >>= 1)
+ {
+ bitCount++;
+ }
+ return bitCount;
+ }
+}
+
+void
+NixVector::PrintDec2BinNix (uint32_t decimalNum, uint32_t bitCount, std::ostream &os) const
+{
+ if(decimalNum == 0)
+ {
+ for (; bitCount > 0; bitCount--)
+ {
+ os << 0;
+ }
+ return;
+ }
+ if(decimalNum == 1)
+ {
+ for (; bitCount > 1; bitCount--)
+ {
+ os << 0;
+ }
+ os << 1;
+ }
+ else
+ {
+ PrintDec2BinNix (decimalNum / 2,bitCount-1, os);
+ os << decimalNum % 2;
+ }
+}
+
+void
+NixVector::PrintDec2BinNixFill (uint32_t decimalNum, uint32_t bitCount, std::ostream &os) const
+{
+ if(decimalNum == 0)
+ {
+ os << 0;
+ return;
+ }
+ if(decimalNum == 1)
+ {
+ // check to see if we need to
+ // print out some zeros at the
+ // beginning of the nix vector
+ if ((uint32_t)(sizeof (uint32_t)*8) > bitCount)
+ {
+ for (uint32_t i = ((sizeof (uint32_t)*8)-bitCount); i > 0; i--)
+ {
+ os << 0;
+ }
+ }
+ os << 1;
+ }
+ else
+ {
+ PrintDec2BinNixFill (decimalNum / 2, bitCount, os);
+ os << decimalNum % 2;
+ }
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/nix-vector.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,166 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#ifndef __NIX_VECTOR_H__
+#define __NIX_VECTOR_H__
+
+#include "ns3/object.h"
+#include "ns3/buffer.h"
+
+namespace ns3 {
+
+/**
+ * \ingroup packet
+ *
+ * \brief Neighbor-index data structure for nix-vector routing
+ *
+ * This data structure holds a vector of "neighbor-indexes" for
+ * a simulation specific routing protocol, nix-vector routing.
+ * Theses neighbor-indexes correspond to the net-device which a
+ * node should use to route a packet. A nix-vector is built
+ * (or fetched from a cache) on-demand. The nix-vector is
+ * transmitted with the packet, and along each hop of the
+ * route, the current node extracts the appropriate
+ * neighbor-index and routes the packet.
+ *
+ * \internal
+ * The implementation of NixVector uses a vector to store
+ * the neighbor-indexes. Each entry in the vector is 32
+ * bits long and can store multiple neighbor-indexes. A
+ * fair amount of bit manipulation is used to store these
+ * neighbor-indexes efficiently. A vector is used so that
+ * the nix-vector can grow arbitraily if the topoplogy and
+ * route requires a large number of neighbor-indexes.
+ *
+ * As the nix-vector travels along the route, an internal
+ * private member variable keeps track of how many bits
+ * have been used. At a particular node, the nix-vector
+ * is used to return the next neighbor-index. This
+ * neighbor-index is used to determine which net-device
+ * to use. The number of bits used would then be
+ * incremented accordingly, and the packet would be
+ * routed.
+ */
+
+class NixVector : public Object
+{
+ public:
+ NixVector ();
+ NixVector (const NixVector &o);
+ ~NixVector ();
+ Ptr<NixVector> Copy (void) const;
+ NixVector &operator = (const NixVector &o);
+ static TypeId GetTypeId (void);
+ /**
+ * \param newBits the neighbor-index to be added to the vector
+ * \param numberOfBits the number of bits that newBits contains
+ *
+ * Adds the neighbor index to the vector using a fair amount of
+ * bit manipulation to pack everything in efficiently.
+ *
+ * Note: This function assumes that the number of bits to be added
+ * is always less than or equal to 32, ie., you can only span one
+ * entry of a nix-vector at a time. This is reasonable, since 32
+ * bits gives you 2^32 possible neighbors.
+ */
+ void AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits);
+ /**
+ * \return the neighbor index
+ *
+ * \param numberOfBits the number of bits to extract from the vector
+ *
+ * Extracts the number of bits specified from
+ * the vector and returns the value extracted
+ *
+ * Note: This function assumes that the number of bits to be extracted
+ * is always less than or equal to 32, ie., you can only span one
+ * entry of a nix-vector at a time. This is reasonable, since 32
+ * bits gives you 2^32 possible neighbors.
+ */
+ uint32_t ExtractNeighborIndex (uint32_t numberOfBits);
+ /**
+ * \return number of bits remaining in the
+ * nix-vector (ie m_total - m_used)
+ */
+ uint32_t GetRemainingBits (void);
+ /**
+ * \return the number of bytes required for serialization
+ */
+ uint32_t GetSerializedSize (void) const;
+ /**
+ * \param i Buffer iterator for writing
+ *
+ * \param size number of bytes to write
+ */
+ void Serialize (Buffer::Iterator i, uint32_t size) const;
+ /**
+ * \return the number of bytes deserialized
+ *
+ * \param i Buffer iterator for reading
+ */
+ uint32_t Deserialize (Buffer::Iterator i);
+ /**
+ * \return number of bits of numberOfNeighbors
+ *
+ * \param numberOfNeighbors the total number of neighbors
+ *
+ * This function is used to determine the number of bits of
+ * numberOfNeighbors so that this value can be passed in to
+ * AddNeighborIndex or ExtractNeighborIndex.
+ */
+ uint32_t BitCount (uint32_t numberOfNeighbors) const;
+ /* for printing of nix-vector */
+ void DumpNixVector (std::ostream &os) const;
+ /* for printing of nix-vector */
+ friend std::ostream & operator <<( std::ostream &outs, const NixVector &nix);
+
+
+ private:
+ typedef std::vector<uint32_t> NixBits_t;
+
+ /* the actual nix-vector */
+ NixBits_t m_nixVector;
+
+ /* for tracking where we are
+ * in the nix-vector
+ */
+ uint32_t m_used;
+
+ /* for tracking how many bits we
+ * have used in the current vector
+ * entry. need this in order to
+ * expand the vector passed 32bits
+ */
+ uint32_t m_currentVectorBitSize;
+
+ /* a counter of how total bits are in
+ * the nix-vector
+ */
+ uint32_t m_totalBitSize;
+
+ /* internal for pretty printing of nix-vector */
+ void PrintDec2BinNixFill (uint32_t, uint32_t, std::ostream &os) const;
+
+ /* internal for pretty printing of nix-vector */
+ void PrintDec2BinNix (uint32_t, uint32_t, std::ostream &os) const;
+};
+} // namespace ns3
+
+#endif
--- a/src/common/packet.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/packet.cc Thu Sep 24 10:57:41 2009 -0400
@@ -138,6 +138,7 @@
m_byteTagList (),
m_packetTagList (),
m_metadata (m_globalUid, 0),
+ m_nixVector (0),
m_refCount (1)
{
m_globalUid++;
@@ -149,7 +150,10 @@
m_packetTagList (o.m_packetTagList),
m_metadata (o.m_metadata),
m_refCount (1)
-{}
+{
+ o.m_nixVector ? m_nixVector = o.m_nixVector->Copy ()
+ : m_nixVector = 0;
+}
Packet &
Packet::operator = (const Packet &o)
@@ -162,6 +166,8 @@
m_byteTagList = o.m_byteTagList;
m_packetTagList = o.m_packetTagList;
m_metadata = o.m_metadata;
+ o.m_nixVector ? m_nixVector = o.m_nixVector->Copy ()
+ : m_nixVector = 0;
return *this;
}
@@ -170,6 +176,7 @@
m_byteTagList (),
m_packetTagList (),
m_metadata (m_globalUid, size),
+ m_nixVector (0),
m_refCount (1)
{
m_globalUid++;
@@ -179,6 +186,7 @@
m_byteTagList (),
m_packetTagList (),
m_metadata (m_globalUid, size),
+ m_nixVector (0),
m_refCount (1)
{
m_globalUid++;
@@ -193,6 +201,7 @@
m_byteTagList (byteTagList),
m_packetTagList (packetTagList),
m_metadata (metadata),
+ m_nixVector (0),
m_refCount (1)
{}
@@ -209,6 +218,18 @@
return Ptr<Packet> (new Packet (buffer, m_byteTagList, m_packetTagList, metadata), false);
}
+void
+Packet::SetNixVector (Ptr<NixVector> nixVector)
+{
+ m_nixVector = nixVector;
+}
+
+Ptr<NixVector>
+Packet::GetNixVector (void) const
+{
+ return m_nixVector;
+}
+
uint32_t
Packet::GetSize (void) const
{
@@ -677,7 +698,6 @@
return PacketTagIterator (m_packetTagList.Head ());
}
-
std::ostream& operator<< (std::ostream& os, const Packet &packet)
{
packet.Print (os);
--- a/src/common/packet.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/packet.h Thu Sep 24 10:57:41 2009 -0400
@@ -28,6 +28,7 @@
#include "tag.h"
#include "byte-tag-list.h"
#include "packet-tag-list.h"
+#include "nix-vector.h"
#include "ns3/callback.h"
#include "ns3/assert.h"
#include "ns3/ptr.h"
@@ -520,6 +521,15 @@
*/
PacketTagIterator GetPacketTagIterator (void) const;
+ /* Note: These functions support a temporary solution
+ * to a specific problem in this generic class, i.e.
+ * how to associate something specific like nix-vector
+ * with a packet. This design methodology
+ * should _not_ be followed, and is only here as an
+ * impetus to fix this general issue. */
+ void SetNixVector (Ptr<NixVector>);
+ Ptr<NixVector> GetNixVector (void) const;
+
private:
Packet (const Buffer &buffer, const ByteTagList &byteTagList,
const PacketTagList &packetTagList, const PacketMetadata &metadata);
@@ -527,6 +537,10 @@
ByteTagList m_byteTagList;
PacketTagList m_packetTagList;
PacketMetadata m_metadata;
+
+ /* Please see comments above about nix-vector */
+ Ptr<NixVector> m_nixVector;
+
mutable uint32_t m_refCount;
static uint32_t m_globalUid;
};
--- a/src/common/trailer.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/trailer.h Thu Sep 24 10:57:41 2009 -0400
@@ -79,6 +79,7 @@
*/
virtual uint32_t Deserialize (Buffer::Iterator end) = 0;
/**
+ * \param os output stream
* This method is used by Packet::Print to print the
* content of a trailer as ascii data to a c++ output stream.
* Although the trailer is free to format its output as it
--- a/src/common/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/common/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -17,6 +17,7 @@
'byte-tag-list.cc',
'tag-buffer.cc',
'packet-tag-list.cc',
+ 'nix-vector.cc',
'ascii-writer.cc',
'pcap-file.cc',
'pcap-file-test-suite.cc',
@@ -38,6 +39,7 @@
'byte-tag-list.h',
'tag-buffer.h',
'packet-tag-list.h',
+ 'nix-vector.h',
'ascii-writer.h',
'sgi-hashmap.h',
'pcap-file.h',
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/design.txt Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,43 @@
+
+* One FlowMonitor per simulation
+
+* One FlowClassifier per simulation
+ - Assigns integer simulation unique identifiers to each flow
+ - Contains a classification method that maps parameters
+ (e.g. packets or packet headers) to the corresponding flow
+ identifier;
+ - FlowClassifier is abstract, needs a concrete subclass
+ > Ipv4FlowClassifier
+
+* Typically (but not necessarily) one FlowProbe node
+ - Is responsible for acquiring the packet data
+ - Works with FlowClassifier
+ - FlowProbe is abstract, needs a concrete subclass
+ > Ipv4FlowProbe
+ - Ipv4FlowProbe needs a matching classifier, Ipv4FlowClassifier
+
+* One ProbeFlowStats object per simulation flow per FlowProbe
+ - Indexed by the FlowId
+ - Bytes
+ - Packets
+ - Delay from first probe until the packet is received in this probe
+
+* One EndToEndFlowStats object per flow per FlowMonitor
+ - Lost packets
+ - Lost bytes
+ - Bytes
+ - Packets
+ - End-to-end delays
+
+
+
+
+TODO:
+
+ 1. Configurable time when to start/stop monitor. ***DONE***
+ 2. Possibly, detect packet losses also via "drop" trace sources
+ 3. FlowMonitor::FlowStats: add time duration metrics: first flow timestamp, last flow timestamp
+ > to calculate bitrates... ***DONE***
+ 4. Measure delay jitter
+ 5. Histogram for delays/jitters/packet sizes
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-classifier.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,40 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "flow-classifier.h"
+
+namespace ns3 {
+
+FlowClassifier::FlowClassifier ()
+ :
+ m_lastNewFlowId (0)
+{
+}
+
+
+FlowId
+FlowClassifier::GetNewFlowId ()
+{
+ return ++m_lastNewFlowId;
+}
+
+
+} // namespace ns3
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-classifier.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,61 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __FLOW_CLASSIFIER_H__
+#define __FLOW_CLASSIFIER_H__
+
+#include "ns3/ref-count-base.h"
+#include <ostream>
+
+namespace ns3 {
+
+typedef uint32_t FlowId;
+typedef uint32_t FlowPacketId;
+
+/// provides a method to translate raw packet data into abstract
+/// ``flow identifier'' and ``packet identifier'' parameters. These
+/// identifiers are unsigned 32-bit integers that uniquely identify a
+/// flow and a packet within that flow, respectively, for the whole
+/// simulation, regardless of the point in which the packet was
+/// captured. These abstract identifiers are used in the
+/// communication between FlowProbe and FlowMonitor, and all collected
+/// statistics reference only those abstract identifiers in order to
+/// keep the core architecture generic and not tied down to any
+/// particular flow capture method or classification system.
+class FlowClassifier : public RefCountBase
+{
+ FlowId m_lastNewFlowId;
+
+public:
+
+ FlowClassifier ();
+
+ virtual void SerializeToXmlStream (std::ostream &os, int indent) const = 0;
+
+protected:
+ FlowId GetNewFlowId ();
+
+};
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-monitor.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,468 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "flow-monitor.h"
+#include "ns3/simulator.h"
+#include "ns3/log.h"
+#include "ns3/double.h"
+#include <fstream>
+#include <sstream>
+
+#define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
+
+#define PERIODIC_CHECK_INTERVAL (Seconds (1))
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("FlowMonitor");
+
+NS_OBJECT_ENSURE_REGISTERED (FlowMonitor);
+
+
+TypeId
+FlowMonitor::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::FlowMonitor")
+ .SetParent<Object> ()
+ .AddConstructor<FlowMonitor> ()
+ .AddAttribute ("MaxPerHopDelay", ("The maximum per-hop delay that should be considered. "
+ "Packets still not received after this delay are to be considered lost."),
+ TimeValue (Seconds (10.0)),
+ MakeTimeAccessor (&FlowMonitor::m_maxPerHopDelay),
+ MakeTimeChecker ())
+ .AddAttribute ("StartTime", ("The time when the monitoring starts."),
+ TimeValue (Seconds (0.0)),
+ MakeTimeAccessor (&FlowMonitor::Start),
+ MakeTimeChecker ())
+ .AddAttribute ("DelayBinWidth", ("The width used in the delay histogram."),
+ DoubleValue (0.001),
+ MakeDoubleAccessor (&FlowMonitor::m_delayBinWidth),
+ MakeDoubleChecker <double> ())
+ .AddAttribute ("JitterBinWidth", ("The width used in the jitter histogram."),
+ DoubleValue (0.001),
+ MakeDoubleAccessor (&FlowMonitor::m_jitterBinWidth),
+ MakeDoubleChecker <double> ())
+ .AddAttribute ("PacketSizeBinWidth", ("The width used in the packetSize histogram."),
+ DoubleValue (20),
+ MakeDoubleAccessor (&FlowMonitor::m_packetSizeBinWidth),
+ MakeDoubleChecker <double> ())
+ ;
+ return tid;
+}
+
+TypeId
+FlowMonitor::GetInstanceTypeId (void) const
+{
+ return GetTypeId ();
+}
+
+FlowMonitor::FlowMonitor ()
+ : m_enabled (false)
+{
+ // m_histogramBinWidth=DEFAULT_BIN_WIDTH;
+}
+
+
+inline FlowMonitor::FlowStats&
+FlowMonitor::GetStatsForFlow (FlowId flowId)
+{
+ std::map<FlowId, FlowStats>::iterator iter;
+ iter = m_flowStats.find (flowId);
+ if (iter == m_flowStats.end ())
+ {
+ FlowMonitor::FlowStats &ref = m_flowStats[flowId];
+ ref.delaySum = Seconds (0);
+ ref.jitterSum = Seconds (0);
+ ref.lastDelay = Seconds (0);
+ ref.txBytes = 0;
+ ref.rxBytes = 0;
+ ref.txPackets = 0;
+ ref.rxPackets = 0;
+ ref.lostPackets = 0;
+ ref.timesForwarded = 0;
+ ref.delayHistogram.SetDefaultBinWidth (m_delayBinWidth);
+ ref.jitterHistogram.SetDefaultBinWidth (m_jitterBinWidth);
+ ref.packetSizeHistogram.SetDefaultBinWidth (m_packetSizeBinWidth);
+ return ref;
+ }
+ else
+ {
+ return iter->second;
+ }
+}
+
+
+void
+FlowMonitor::ReportFirstTx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+ Time now = Simulator::Now ();
+ TrackedPacket &tracked = m_trackedPackets[std::make_pair (flowId, packetId)];
+ tracked.firstSeenTime = now;
+ tracked.lastSeenTime = tracked.firstSeenTime;
+ tracked.timesForwarded = 0;
+ NS_LOG_DEBUG ("ReportFirstTx: adding tracked packet (flowId=" << flowId << ", packetId=" << packetId
+ << ").");
+
+ probe->AddPacketStats (flowId, packetSize, Seconds (0));
+
+ FlowStats &stats = GetStatsForFlow (flowId);
+ stats.txBytes += packetSize;
+ stats.txPackets++;
+ if (stats.txPackets == 1)
+ {
+ stats.timeFirstTxPacket = now;
+ }
+ stats.timeLastTxPacket = now;
+}
+
+
+void
+FlowMonitor::ReportForwarding (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+ std::pair<FlowId, FlowPacketId> key (flowId, packetId);
+ TrackedPacketMap::iterator tracked = m_trackedPackets.find (key);
+ if (tracked == m_trackedPackets.end ())
+ {
+ NS_LOG_WARN ("Received packet forward report (flowId=" << flowId << ", packetId=" << packetId
+ << ") but not known to be transmitted.");
+ return;
+ }
+
+ tracked->second.timesForwarded++;
+ tracked->second.lastSeenTime = Simulator::Now ();
+
+ Time delay = (Simulator::Now () - tracked->second.firstSeenTime);
+ probe->AddPacketStats (flowId, packetSize, delay);
+}
+
+
+void
+FlowMonitor::ReportLastRx (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize)
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+ TrackedPacketMap::iterator tracked = m_trackedPackets.find (std::make_pair (flowId, packetId));
+ if (tracked == m_trackedPackets.end ())
+ {
+ NS_LOG_WARN ("Received packet last-tx report (flowId=" << flowId << ", packetId=" << packetId
+ << ") but not known to be transmitted.");
+ return;
+ }
+
+ Time now = Simulator::Now ();
+ Time delay = (now - tracked->second.firstSeenTime);
+ probe->AddPacketStats (flowId, packetSize, delay);
+
+ FlowStats &stats = GetStatsForFlow (flowId);
+ stats.delaySum += delay;
+ stats.delayHistogram.AddValue (delay.GetSeconds ());
+ if (stats.rxPackets > 0 )
+ {
+ Time jitter = stats.lastDelay - delay;
+ if (jitter > Seconds (0))
+ {
+ stats.jitterSum += jitter;
+ stats.jitterHistogram.AddValue (jitter.GetSeconds ());
+ }
+ else
+ {
+ stats.jitterSum -= jitter;
+ stats.jitterHistogram.AddValue (-jitter.GetSeconds());
+ }
+ }
+ stats.lastDelay = delay;
+
+ stats.rxBytes += packetSize;
+ stats.packetSizeHistogram.AddValue ((double) packetSize);
+ stats.rxPackets++;
+ if (stats.rxPackets == 1)
+ {
+ stats.timeFirstRxPacket = now;
+ }
+ stats.timeLastRxPacket = now;
+ stats.timesForwarded += tracked->second.timesForwarded;
+
+ NS_LOG_DEBUG ("ReportLastTx: removing tracked packet (flowId="
+ << flowId << ", packetId=" << packetId << ").");
+
+ m_trackedPackets.erase (tracked); // we don't need to track this packet anymore
+}
+
+void
+FlowMonitor::ReportDrop (Ptr<FlowProbe> probe, uint32_t flowId, uint32_t packetId, uint32_t packetSize,
+ uint32_t reasonCode)
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+
+ probe->AddPacketDropStats (flowId, packetSize, reasonCode);
+
+ FlowStats &stats = GetStatsForFlow (flowId);
+ stats.lostPackets++;
+ if (stats.packetsDropped.size () < reasonCode + 1)
+ {
+ stats.packetsDropped.resize (reasonCode + 1, 0);
+ stats.bytesDropped.resize (reasonCode + 1, 0);
+ }
+ ++stats.packetsDropped[reasonCode];
+ stats.bytesDropped[reasonCode] += packetSize;
+ NS_LOG_DEBUG ("++stats.packetsDropped[" << reasonCode<< "]; // becomes: " << stats.packetsDropped[reasonCode]);
+
+ TrackedPacketMap::iterator tracked = m_trackedPackets.find (std::make_pair (flowId, packetId));
+ if (tracked != m_trackedPackets.end ())
+ {
+ // we don't need to track this packet anymore
+ // FIXME: this will not necessarily be true with broadcast/multicast
+ NS_LOG_DEBUG ("ReportDrop: removing tracked packet (flowId="
+ << flowId << ", packetId=" << packetId << ").");
+ m_trackedPackets.erase (tracked);
+ }
+}
+
+std::map<FlowId, FlowMonitor::FlowStats>
+FlowMonitor::GetFlowStats () const
+{
+ return m_flowStats;
+}
+
+
+void
+FlowMonitor::CheckForLostPackets (Time maxDelay)
+{
+ Time now = Simulator::Now ();
+
+ for (TrackedPacketMap::iterator iter = m_trackedPackets.begin ();
+ iter != m_trackedPackets.end (); )
+ {
+ if (now - iter->second.lastSeenTime >= maxDelay)
+ {
+ // packet is considered lost, add it to the loss statistics
+ std::map<FlowId, FlowStats>::iterator
+ flow = m_flowStats.find (iter->first.first);
+ NS_ASSERT (flow != m_flowStats.end ());
+ flow->second.lostPackets++;
+
+ // we won't track it anymore
+ m_trackedPackets.erase (iter++);
+ }
+ else
+ {
+ iter++;
+ }
+ }
+}
+
+void
+FlowMonitor::CheckForLostPackets ()
+{
+ CheckForLostPackets (m_maxPerHopDelay);
+}
+
+void
+FlowMonitor::PeriodicCheckForLostPackets ()
+{
+ CheckForLostPackets ();
+ Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
+}
+
+void
+FlowMonitor::NotifyConstructionCompleted ()
+{
+ Object::NotifyConstructionCompleted ();
+ Simulator::Schedule (PERIODIC_CHECK_INTERVAL, &FlowMonitor::PeriodicCheckForLostPackets, this);
+}
+
+void
+FlowMonitor::AddProbe (Ptr<FlowProbe> probe)
+{
+ m_flowProbes.push_back (probe);
+}
+
+std::vector< Ptr<FlowProbe> >
+FlowMonitor::GetAllProbes () const
+{
+ return m_flowProbes;
+}
+
+
+void
+FlowMonitor::Start (const Time &time)
+{
+ if (m_enabled)
+ {
+ return;
+ }
+ Simulator::Cancel (m_startEvent);
+ m_startEvent = Simulator::Schedule (time, &FlowMonitor::StartRightNow, Ptr<FlowMonitor> (this));
+}
+
+void
+FlowMonitor::Stop (const Time &time)
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+ Simulator::Cancel (m_stopEvent);
+ m_stopEvent = Simulator::Schedule (time, &FlowMonitor::StopRightNow, Ptr<FlowMonitor> (this));
+}
+
+
+void
+FlowMonitor::StartRightNow ()
+{
+ if (m_enabled)
+ {
+ return;
+ }
+ m_enabled = true;
+}
+
+
+void
+FlowMonitor::StopRightNow ()
+{
+ if (!m_enabled)
+ {
+ return;
+ }
+ m_enabled = false;
+ CheckForLostPackets ();
+}
+
+void
+FlowMonitor::SetFlowClassifier (Ptr<FlowClassifier> classifier)
+{
+ m_classifier = classifier;
+}
+
+void
+FlowMonitor::SerializeToXmlStream (std::ostream &os, int indent, bool enableHistograms, bool enableProbes)
+{
+ CheckForLostPackets ();
+
+ INDENT(indent); os << "<FlowMonitor>\n";
+ indent += 2;
+ INDENT(indent); os << "<FlowStats>\n";
+ indent += 2;
+ for (std::map<FlowId, FlowStats>::const_iterator flowI = m_flowStats.begin ();
+ flowI != m_flowStats.end (); flowI++)
+ {
+
+ INDENT(indent);
+#define ATTRIB(name) << " "#name"=\"" << flowI->second.name << "\""
+ os << "<Flow flowId=\"" << flowI->first << "\""
+ ATTRIB(timeFirstTxPacket)
+ ATTRIB(timeFirstRxPacket)
+ ATTRIB(timeLastTxPacket)
+ ATTRIB(timeLastRxPacket)
+ ATTRIB(delaySum)
+ ATTRIB(jitterSum)
+ ATTRIB(lastDelay)
+ ATTRIB(txBytes)
+ ATTRIB(rxBytes)
+ ATTRIB(txPackets)
+ ATTRIB(rxPackets)
+ ATTRIB(lostPackets)
+ ATTRIB(timesForwarded)
+ << ">\n";
+#undef ATTRIB
+
+
+ indent += 2;
+ for (uint32_t reasonCode = 0; reasonCode < flowI->second.packetsDropped.size (); reasonCode++)
+ {
+ INDENT(indent);
+ os << "<packetsDropped reasonCode=\"" << reasonCode << "\""
+ << " number=\"" << flowI->second.packetsDropped[reasonCode]
+ << "\" />\n";
+ }
+ for (uint32_t reasonCode = 0; reasonCode < flowI->second.bytesDropped.size (); reasonCode++)
+ {
+ INDENT(indent);
+ os << "<bytesDropped reasonCode=\"" << reasonCode << "\""
+ << " bytes=\"" << flowI->second.bytesDropped[reasonCode]
+ << "\" />\n";
+ }
+ if (enableHistograms)
+ {
+ flowI->second.delayHistogram.SerializeToXmlStream (os, indent, "delayHistogram");
+ flowI->second.jitterHistogram.SerializeToXmlStream (os, indent, "jitterHistogram");
+ flowI->second.packetSizeHistogram.SerializeToXmlStream (os, indent, "packetSizeHistogram");
+ }
+ indent -= 2;
+
+ INDENT(indent); os << "</Flow>\n";
+ }
+ indent -= 2;
+ INDENT(indent); os << "</FlowStats>\n";
+
+ m_classifier->SerializeToXmlStream (os, indent);
+
+ if (enableProbes)
+ {
+ INDENT(indent); os << "<FlowProbes>\n";
+ indent += 2;
+ for (uint32_t i = 0; i < m_flowProbes.size (); i++)
+ {
+ m_flowProbes[i]->SerializeToXmlStream (os, indent, i);
+ }
+ indent -= 2;
+ INDENT(indent); os << "</FlowProbes>\n";
+ }
+
+ indent -= 2;
+ INDENT(indent); os << "</FlowMonitor>\n";
+}
+
+
+std::string
+FlowMonitor::SerializeToXmlString (int indent, bool enableHistograms, bool enableProbes)
+{
+ std::ostringstream os;
+ SerializeToXmlStream (os, indent, enableHistograms, enableProbes);
+ return os.str ();
+}
+
+
+void
+FlowMonitor::SerializeToXmlFile (std::string fileName, bool enableHistograms, bool enableProbes)
+{
+ std::ofstream os (fileName.c_str (), std::ios::out|std::ios::binary);
+ os << "<?xml version=\"1.0\" ?>\n";
+ SerializeToXmlStream (os, 0, enableHistograms, enableProbes);
+ os.close ();
+}
+
+
+} // namespace ns3
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-monitor.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,244 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __FLOW_MONITOR_H__
+#define __FLOW_MONITOR_H__
+
+#include <vector>
+#include <map>
+
+#include "ns3/ptr.h"
+#include "ns3/object.h"
+#include "ns3/flow-probe.h"
+#include "ns3/flow-classifier.h"
+#include "ns3/histogram.h"
+#include "ns3/nstime.h"
+#include "ns3/event-id.h"
+
+namespace ns3 {
+
+/// \brief An object that monitors and reports back packet flows observed during a simulation
+///
+/// The FlowMonitor class is responsible forcoordinating efforts
+/// regarding probes, and collects end-to-end flowstatistics.
+class FlowMonitor : public Object
+{
+public:
+
+ /// \brief Structure that represents the measured metrics of an individual packet flow
+ struct FlowStats
+ {
+ /// Contains the absolute time when the first packet in the flow
+ /// was transmitted, i.e. the time when the flow transmission
+ /// starts
+ Time timeFirstTxPacket;
+
+ /// Contains the absolute time when the first packet in the flow
+ /// was received by an end node, i.e. the time when the flow
+ /// reception starts
+ Time timeFirstRxPacket;
+
+ /// Contains the absolute time when the last packet in the flow
+ /// was transmitted, i.e. the time when the flow transmission
+ /// ends
+ Time timeLastTxPacket;
+
+ /// Contains the absolute time when the last packet in the flow
+ /// was received, i.e. the time when the flow reception ends
+ Time timeLastRxPacket;
+
+ /// Contains the sum of all end-to-end delays for all received
+ /// packets of the flow.
+ Time delaySum; // delayCount == rxPackets
+
+ /// Contains the sum of all end-to-end delay jitter (delay
+ /// variation) values for all received packets of the flow. Here
+ /// we define _jitter_ of a packet as the delay variation
+ /// relatively to the last packet of the stream,
+ /// i.e. \f$Jitter\left\{P_N\right\} = \left|Delay\left\{P_N\right\} - Delay\left\{P_{N-1}\right\}\right|\f$.
+ /// This definition is in accordance with the Type-P-One-way-ipdv
+ /// as defined in IETF RFC 3393.
+ Time jitterSum; // jitterCount == rxPackets - 1
+
+ Time lastDelay;
+
+ /// Total number of transmitted bytes for the flow
+ uint64_t txBytes;
+ /// Total number of received bytes for the flow
+ uint64_t rxBytes;
+ /// Total number of transmitted packets for the flow
+ uint32_t txPackets;
+ /// Total number of received packets for the flow
+ uint32_t rxPackets;
+
+ /// Total number of packets that are assumed to be lost,
+ /// i.e. those that were transmitted but have not been reportedly
+ /// received or forwarded for a long time. By default, packets
+ /// missing for a period of over 10 seconds are assumed to be
+ /// lost, although this value can be easily configured in runtime
+ uint32_t lostPackets;
+
+ /// Contains the number of times a packet has been reportedly
+ /// forwarded, summed for all received packets in the flow
+ uint32_t timesForwarded;
+
+ /// Histogram of the packet delays
+ Histogram delayHistogram;
+ /// Histogram of the packet jitters
+ Histogram jitterHistogram;
+ /// Histogram of the packet sizes
+ Histogram packetSizeHistogram;
+
+ /// This attribute also tracks the number of lost packets and
+ /// bytes, but discriminates the losses by a _reason code_. This
+ /// reason code is usually an enumeration defined by the concrete
+ /// FlowProbe class, and for each reason code there may be a
+ /// vector entry indexed by that code and whose value is the
+ /// number of packets or bytes lost due to this reason. For
+ /// instance, in the Ipv4FlowProbe case the following reasons are
+ /// currently defined: DROP_NO_ROUTE (no IPv4 route found for a
+ /// packet), DROP_TTL_EXPIRE (a packet was dropped due to an IPv4
+ /// TTL field decremented and reaching zero), and
+ /// DROP_BAD_CHECKSUM (a packet had bad IPv4 header checksum and
+ /// had to be dropped).
+ std::vector<uint32_t> packetsDropped; // packetsDropped[reasonCode] => number of dropped packets
+
+ /// This attribute also tracks the number of lost bytes. See also
+ /// comment in attribute packetsDropped.
+ std::vector<uint64_t> bytesDropped; // bytesDropped[reasonCode] => number of dropped bytes
+ };
+
+ // --- basic methods ---
+ static TypeId GetTypeId ();
+ TypeId GetInstanceTypeId () const;
+ FlowMonitor ();
+
+ /// Set the FlowClassifier to be used by the flow monitor.
+ void SetFlowClassifier (Ptr<FlowClassifier> classifier);
+
+ /// Set the time, counting from the current time, from which to start monitoring flows
+ void Start (const Time &time);
+ /// Set the time, counting from the current time, from which to stop monitoring flows
+ void Stop (const Time &time);
+ /// Begin monitoring flows *right now*
+ void StartRightNow ();
+ /// End monitoring flows *right now*
+ void StopRightNow ();
+
+ // --- methods to be used by the FlowMonitorProbe's only ---
+ /// Register a new FlowProbe that will begin monitoring and report
+ /// events to this monitor. This method is normally only used by
+ /// FlowProbe implementations.
+ void AddProbe (Ptr<FlowProbe> probe);
+
+ /// FlowProbe implementations are supposed to call this method to
+ /// report that a new packet was transmitted (but keep in mind the
+ /// distinction between a new packet entering the system and a
+ /// packet that is already known and is only being forwarded).
+ void ReportFirstTx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+ /// FlowProbe implementations are supposed to call this method to
+ /// report that a known packet is being forwarded.
+ void ReportForwarding (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+ /// FlowProbe implementations are supposed to call this method to
+ /// report that a known packet is being received.
+ void ReportLastRx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
+ /// FlowProbe implementations are supposed to call this method to
+ /// report that a known packet is being dropped due to some reason.
+ void ReportDrop (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId,
+ uint32_t packetSize, uint32_t reasonCode);
+
+ /// Check right now for packets that appear to be lost
+ void CheckForLostPackets ();
+
+ /// Check right now for packets that appear to be lost, considering
+ /// packets as lost if not seen in the network for a time larger
+ /// than maxDelay
+ void CheckForLostPackets (Time maxDelay);
+
+ // --- methods to get the results ---
+ /// Retrieve all collected the flow statistics. Note, if the
+ /// FlowMonitor has not stopped monitoring yet, you should call
+ /// CheckForLostPackets() to make sure all possibly lost packets are
+ /// accounted for.
+ std::map<FlowId, FlowStats> GetFlowStats () const;
+
+ /// Get a list of all FlowProbe's associated with this FlowMonitor
+ std::vector< Ptr<FlowProbe> > GetAllProbes () const;
+
+ /// Serializes the results to an std::ostream in XML format
+ /// \param os the output stream
+ /// \param indent number of spaces to use as base indentation level
+ /// \param enableHistograms if true, include also the histograms in the output
+ /// \param enableProbes if true, include also the per-probe/flow pair statistics in the output
+ void SerializeToXmlStream (std::ostream &os, int indent, bool enableHistograms, bool enableProbes);
+ /// Same as SerializeToXmlStream, but returns the output as a std::string
+ /// \param indent number of spaces to use as base indentation level
+ /// \param enableHistograms if true, include also the histograms in the output
+ /// \param enableProbes if true, include also the per-probe/flow pair statistics in the output
+ /// \return the XML output as string
+ std::string SerializeToXmlString (int indent, bool enableHistograms, bool enableProbes);
+ /// Same as SerializeToXmlStream, but writes to a file instead
+ /// \param fileName name or path of the output file that will be created
+ /// \param enableHistograms if true, include also the histograms in the output
+ /// \param enableProbes if true, include also the per-probe/flow pair statistics in the output
+ void SerializeToXmlFile (std::string fileName, bool enableHistograms, bool enableProbes);
+
+
+protected:
+
+ virtual void NotifyConstructionCompleted ();
+
+private:
+
+ struct TrackedPacket
+ {
+ Time firstSeenTime; // absolute time when the packet was first seen by a probe
+ Time lastSeenTime; // absolute time when the packet was last seen by a probe
+ uint32_t timesForwarded; // number of times the packet was reportedly forwarded
+ };
+
+ // FlowId --> FlowStats
+ std::map<FlowId, FlowStats> m_flowStats;
+
+ // (FlowId,PacketId) --> TrackedPacket
+ typedef std::map< std::pair<FlowId, FlowPacketId>, TrackedPacket> TrackedPacketMap;
+ TrackedPacketMap m_trackedPackets;
+ Time m_maxPerHopDelay;
+ std::vector< Ptr<FlowProbe> > m_flowProbes;
+
+ // note: this is needed only for serialization
+ Ptr<FlowClassifier> m_classifier;
+
+ EventId m_startEvent;
+ EventId m_stopEvent;
+ bool m_enabled;
+ double m_delayBinWidth;
+ double m_jitterBinWidth;
+ double m_packetSizeBinWidth;
+
+ FlowStats& GetStatsForFlow (FlowId flowId);
+ void PeriodicCheckForLostPackets ();
+};
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-probe.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,111 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/flow-probe.h"
+#include "ns3/flow-monitor.h"
+
+namespace ns3 {
+
+
+FlowProbe::~FlowProbe ()
+{
+}
+
+
+FlowProbe::FlowProbe (Ptr<FlowMonitor> flowMonitor)
+ : m_flowMonitor (flowMonitor)
+{
+ m_flowMonitor->AddProbe (this);
+}
+
+void
+FlowProbe::AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe)
+{
+ FlowStats &flow = m_stats[flowId];
+ flow.delayFromFirstProbeSum += delayFromFirstProbe;
+ flow.bytes += packetSize;
+ ++flow.packets;
+}
+
+void
+FlowProbe::AddPacketDropStats (FlowId flowId, uint32_t packetSize, uint32_t reasonCode)
+{
+ FlowStats &flow = m_stats[flowId];
+
+ if (flow.packetsDropped.size () < reasonCode + 1)
+ {
+ flow.packetsDropped.resize (reasonCode + 1, 0);
+ flow.bytesDropped.resize (reasonCode + 1, 0);
+ }
+ ++flow.packetsDropped[reasonCode];
+ flow.bytesDropped[reasonCode] += packetSize;
+}
+
+FlowProbe::Stats
+FlowProbe::GetStats () const
+{
+ return m_stats;
+}
+
+void
+FlowProbe::SerializeToXmlStream (std::ostream &os, int indent, uint32_t index) const
+{
+ #define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
+
+ INDENT(indent); os << "<FlowProbe index=\"" << index << "\">\n";
+
+ indent += 2;
+
+ for (Stats::const_iterator iter = m_stats.begin (); iter != m_stats.end (); iter++)
+ {
+ INDENT(indent);
+ os << "<FlowStats "
+ << " flowId=\"" << iter->first << "\""
+ << " packets=\"" << iter->second.packets << "\""
+ << " bytes=\"" << iter->second.bytes << "\""
+ << " delayFromFirstProbeSum=\"" << iter->second.delayFromFirstProbeSum << "\""
+ << " >\n";
+ indent += 2;
+ for (uint32_t reasonCode = 0; reasonCode < iter->second.packetsDropped.size (); reasonCode++)
+ {
+ INDENT(indent);
+ os << "<packetsDropped reasonCode=\"" << reasonCode << "\""
+ << " number=\"" << iter->second.packetsDropped[reasonCode]
+ << "\" />\n";
+ }
+ for (uint32_t reasonCode = 0; reasonCode < iter->second.bytesDropped.size (); reasonCode++)
+ {
+ INDENT(indent);
+ os << "<bytesDropped reasonCode=\"" << reasonCode << "\""
+ << " bytes=\"" << iter->second.bytesDropped[reasonCode]
+ << "\" />\n";
+ }
+ indent -= 2;
+ INDENT(indent); os << "</FlowStats>\n";
+ }
+ indent -= 2;
+ INDENT(indent); os << "</FlowProbe>\n";
+}
+
+
+
+} // namespace ns3
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/flow-probe.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,87 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __FLOW_PROBE_H__
+#define __FLOW_PROBE_H__
+
+#include <map>
+#include <vector>
+
+#include "ns3/ref-count-base.h"
+#include "ns3/flow-classifier.h"
+#include "ns3/nstime.h"
+
+namespace ns3 {
+
+class FlowMonitor;
+
+/// The FlowProbe class is responsible for listening for packet events
+/// in a specific point of the simulated space, report those events to
+/// the global FlowMonitor, and collect its own flow statistics
+/// regarding only the packets that pass through that probe.
+class FlowProbe : public RefCountBase
+{
+protected:
+
+ FlowProbe (Ptr<FlowMonitor> flowMonitor);
+
+public:
+ ~FlowProbe ();
+
+ struct FlowStats
+ {
+ FlowStats () : delayFromFirstProbeSum (Seconds (0)), bytes (0), packets (0) {}
+
+ /// packetsDropped[reasonCode] => number of dropped packets
+ std::vector<uint32_t> packetsDropped;
+ /// bytesDropped[reasonCode] => number of dropped bytes
+ std::vector<uint64_t> bytesDropped;
+ /// divide by 'Scalar (packets)' to get the average delay from the
+ /// first (entry) probe up to this one (partial delay)
+ Time delayFromFirstProbeSum;
+ /// Number of bytes seen of this flow
+ uint64_t bytes;
+ /// Number of packets seen of this flow
+ uint32_t packets;
+ };
+
+ typedef std::map<FlowId, FlowStats> Stats;
+
+ void AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe);
+ void AddPacketDropStats (FlowId flowId, uint32_t packetSize, uint32_t reasonCode);
+
+ /// Get the partial flow statistics stored in this probe. With this
+ /// information you can, for example, find out what is the delay
+ /// from the first probe to this one.
+ Stats GetStats () const;
+
+ void SerializeToXmlStream (std::ostream &os, int indent, uint32_t index) const;
+
+protected:
+ Ptr<FlowMonitor> m_flowMonitor;
+ Stats m_stats;
+
+};
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/histogram.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,212 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Pedro Fortuna <pedro.fortuna@inescporto.pt> <pedro.fortuna@gmail.com>
+//
+
+#include <math.h>
+#include "histogram.h"
+#include "ns3/simulator.h"
+#include "ns3/log.h"
+
+#define DEFAULT_BIN_WIDTH 1
+// #define RESERVED_BINS_INC 10
+
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Histogram");
+
+// uint32_t
+// Histogram::GetSize () const
+// {
+// return m_histogram.size ();
+// }
+
+uint32_t
+Histogram::GetNBins () const
+{
+ return m_histogram.size ();
+}
+
+double
+Histogram::GetBinStart (uint32_t index)
+{
+ return index*m_binWidth;
+}
+
+double
+Histogram::GetBinEnd (uint32_t index)
+{
+ return (index + 1) * m_binWidth;
+}
+
+double
+Histogram::GetBinWidth (uint32_t index) const
+{
+ return m_binWidth;
+}
+
+void
+Histogram::SetDefaultBinWidth (double binWidth)
+{
+ NS_ASSERT (m_histogram.size () == 0); //we can only change the bin width if no values were added
+ m_binWidth = binWidth;
+}
+
+uint32_t
+Histogram::GetBinCount (uint32_t index)
+{
+ NS_ASSERT (index < m_histogram.size ());
+ return m_histogram[index];
+}
+
+void
+Histogram::AddValue (double value)
+{
+ uint32_t index = (uint32_t)floor (value/m_binWidth);
+
+ //check if we need to resize the vector
+ NS_LOG_DEBUG ("AddValue: index=" << index << ", m_histogram.size()=" << m_histogram.size ());
+
+ if (index >= m_histogram.size ())
+ {
+ m_histogram.resize (index + 1, 0);
+ }
+ m_histogram[index]++;
+}
+
+Histogram::Histogram (double binWidth)
+{
+ m_binWidth = binWidth;
+}
+
+Histogram::Histogram ()
+{
+ Histogram (DEFAULT_BIN_WIDTH);
+}
+
+
+void
+Histogram::SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const
+{
+#define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
+
+ INDENT(indent); os << "<" << elementName // << " binWidth=\"" << m_binWidth << "\""
+ << " nBins=\"" << m_histogram.size () << "\""
+ << " >\n";
+ indent += 2;
+
+#if 1 // two alternative forms of representing bin data, one more verbose than the other one
+ for (uint32_t index = 0; index < m_histogram.size (); index++)
+ {
+ if (m_histogram[index])
+ {
+ INDENT(indent);
+ os << "<bin"
+ << " index=\"" << (index) << "\""
+ << " start=\"" << (index*m_binWidth) << "\""
+ << " width=\"" << m_binWidth << "\""
+ << " count=\"" << m_histogram[index] << "\""
+ << " />\n";
+ }
+ }
+#else
+ INDENT(indent + 2);
+ for (uint32_t index = 0; index < m_histogram.size (); index++)
+ {
+ if (index > 0)
+ {
+ os << " ";
+ }
+ os << m_histogram[index];
+ }
+ os << "\n";
+#endif
+ indent -= 2;
+ INDENT(indent); os << "</" << elementName << ">\n";
+#undef INDENT
+}
+
+
+
+
+} // namespace ns3
+
+
+#ifdef RUN_SELF_TESTS
+
+#include "ns3/test.h"
+
+namespace ns3 {
+
+class HistogramTest : public ns3::Test {
+private:
+public:
+ HistogramTest ();
+ virtual bool RunTests (void);
+
+
+};
+
+HistogramTest::HistogramTest ()
+ : ns3::Test ("Histogram")
+{}
+
+
+bool
+HistogramTest::RunTests (void)
+{
+ bool result = true;
+
+ Histogram h0(3.5);
+ // Testing floating-point bin widths
+ {
+ for (int i=1; i<= 10; i++) h0.AddValue(3.4);
+ for (int i=1; i<= 5; i++) h0.AddValue(3.6);
+
+ NS_TEST_ASSERT_EQUAL (h0.GetBinWidth (0), 3.5);
+ NS_TEST_ASSERT_EQUAL (h0.GetNBins (), 2);
+ NS_TEST_ASSERT_EQUAL (h0.GetBinStart(1), 3.5);
+ NS_TEST_ASSERT_EQUAL (h0.GetBinCount(0), 10);
+ NS_TEST_ASSERT_EQUAL (h0.GetBinCount(1), 5);
+ }
+
+ {
+ // Testing bin expansion
+ h0.AddValue(74.3);
+
+ NS_TEST_ASSERT_EQUAL (h0.GetNBins (), 22);
+
+ /*for (uint32_t i=0; i < h0.GetSize () ; i++)
+ {
+ std::cout << i << ") BinStart:" << h0.GetBinStart (i) << " BinEnd:" << ((double) h0.GetBinStart (i) + h0.GetBinWidth (i)) << " BinCount: " << h0.GetBinCount (i) << std::endl;
+ }*/
+
+ NS_TEST_ASSERT_EQUAL (h0.GetBinCount (21), 1);
+ }
+
+ return result;
+}
+
+static HistogramTest gHistogramTest;
+
+}; // namespace
+
+
+#endif /* RUN_SELF_TESTS */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/histogram.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,64 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Pedro Fortuna <pedro.fortuna@inescporto.pt> <pedro.fortuna@gmail.com>
+//
+
+#ifndef __NS3_HISTOGRAM_H__
+#define __NS3_HISTOGRAM_H__
+
+#include <vector>
+#include <stdint.h>
+#include <ostream>
+
+namespace ns3 {
+
+class Histogram
+{
+public:
+
+ // --- basic methods ---
+ Histogram (double binWidth);
+ Histogram ();
+
+ // Methods for Getting the Histogram Results
+ uint32_t GetNBins () const;
+ double GetBinStart (uint32_t index);
+ double GetBinEnd (uint32_t index);
+ double GetBinWidth (uint32_t index) const;
+ void SetDefaultBinWidth (double binWidth);
+ uint32_t GetBinCount (uint32_t index);
+
+ // Method for adding values
+ void AddValue (double value);
+
+
+ void SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const;
+
+ // TODO: add method(s) to estimate N, µ, and s² from the histogram,
+ // see http://www.dspguide.com/ch2/4.htm
+
+private:
+ std::vector<uint32_t> m_histogram;
+ double m_binWidth;
+};
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-classifier.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,203 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/packet.h"
+
+#include "ipv4-flow-classifier.h"
+#include "ns3/udp-header.h"
+#include "ns3/tcp-header.h"
+
+namespace ns3 {
+
+/* see http://www.iana.org/assignments/protocol-numbers */
+const uint8_t TCP_PROT_NUMBER = 6;
+const uint8_t UDP_PROT_NUMBER = 17;
+
+
+
+bool operator < (const Ipv4FlowClassifier::FiveTuple &t1,
+ const Ipv4FlowClassifier::FiveTuple &t2)
+{
+ if (t1.sourceAddress < t2.sourceAddress)
+ {
+ return true;
+ }
+ if (t1.sourceAddress != t2.sourceAddress)
+ {
+ return false;
+ }
+
+ if (t1.destinationAddress < t2.destinationAddress)
+ {
+ return true;
+ }
+ if (t1.destinationAddress != t2.destinationAddress)
+ {
+ return false;
+ }
+
+ if (t1.protocol < t2.protocol)
+ {
+ return true;
+ }
+ if (t1.protocol != t2.protocol)
+ {
+ return false;
+ }
+
+ if (t1.sourcePort < t2.sourcePort)
+ {
+ return true;
+ }
+ if (t1.sourcePort != t2.sourcePort)
+ {
+ return false;
+ }
+
+ if (t1.destinationPort < t2.destinationPort)
+ {
+ return true;
+ }
+ if (t1.destinationPort != t2.destinationPort)
+ {
+ return false;
+ }
+
+ return false;
+}
+
+bool operator == (const Ipv4FlowClassifier::FiveTuple &t1,
+ const Ipv4FlowClassifier::FiveTuple &t2)
+{
+ return (t1.sourceAddress == t2.sourceAddress &&
+ t1.destinationAddress == t2.destinationAddress &&
+ t1.protocol == t2.protocol &&
+ t1.sourcePort == t2.sourcePort &&
+ t1.destinationPort == t2.destinationPort);
+}
+
+
+
+Ipv4FlowClassifier::Ipv4FlowClassifier ()
+{
+}
+
+bool
+Ipv4FlowClassifier::Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ uint32_t *out_flowId, uint32_t *out_packetId)
+{
+ if (ipHeader.GetDestination () == Ipv4Address::GetBroadcast ())
+ {
+ // we are not prepared to handle broadcast yet
+ return false;
+ }
+
+ FiveTuple tuple;
+ tuple.sourceAddress = ipHeader.GetSource ();
+ tuple.destinationAddress = ipHeader.GetDestination ();
+ tuple.protocol = ipHeader.GetProtocol ();
+
+ switch (tuple.protocol)
+ {
+ case UDP_PROT_NUMBER:
+ {
+ UdpHeader udpHeader;
+ ipPayload->PeekHeader (udpHeader);
+ tuple.sourcePort = udpHeader.GetSourcePort ();
+ tuple.destinationPort = udpHeader.GetDestinationPort ();
+ }
+ break;
+
+ case TCP_PROT_NUMBER:
+ {
+ TcpHeader tcpHeader;
+ ipPayload->PeekHeader (tcpHeader);
+ tuple.sourcePort = tcpHeader.GetSourcePort ();
+ tuple.destinationPort = tcpHeader.GetDestinationPort ();
+ }
+ break;
+
+ default:
+ return false;
+ }
+
+ // try to insert the tuple, but check if it already exists
+ std::pair<std::map<FiveTuple, FlowId>::iterator, bool> insert
+ = m_flowMap.insert (std::pair<FiveTuple, FlowId> (tuple, 0));
+
+ // if the insertion succeeded, we need to assign this tuple a new flow identifier
+ if (insert.second)
+ {
+ insert.first->second = GetNewFlowId ();
+ }
+
+ *out_flowId = insert.first->second;
+ *out_packetId = ipHeader.GetIdentification ();
+
+ return true;
+}
+
+
+Ipv4FlowClassifier::FiveTuple
+Ipv4FlowClassifier::FindFlow (FlowId flowId) const
+{
+ for (std::map<FiveTuple, FlowId>::const_iterator
+ iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
+ {
+ if (iter->second == flowId)
+ {
+ return iter->first;
+ }
+ }
+ NS_FATAL_ERROR ("Could not find the flow with ID " << flowId);
+ FiveTuple retval = { Ipv4Address::GetZero (), Ipv4Address::GetZero (), 0, 0, 0 };
+ return retval;
+}
+
+void
+Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const
+{
+#define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
+
+ INDENT(indent); os << "<Ipv4FlowClassifier>\n";
+
+ indent += 2;
+ for (std::map<FiveTuple, FlowId>::const_iterator
+ iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
+ {
+ INDENT(indent);
+ os << "<Flow flowId=\"" << iter->second << "\""
+ << " sourceAddress=\"" << iter->first.sourceAddress << "\""
+ << " destinationAddress=\"" << iter->first.destinationAddress << "\""
+ << " protocol=\"" << int(iter->first.protocol) << "\""
+ << " sourcePort=\"" << iter->first.sourcePort << "\""
+ << " destinationPort=\"" << iter->first.destinationPort << "\""
+ << " />\n";
+ }
+
+ indent -= 2;
+ INDENT(indent); os << "</Ipv4FlowClassifier>\n";
+
+#undef INDENT
+}
+
+
+} // namespace ns3
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-classifier.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,78 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __IPV4_FLOW_CLASSIFIER_H__
+#define __IPV4_FLOW_CLASSIFIER_H__
+
+#include <stdint.h>
+#include <map>
+
+#include "ns3/ipv4-header.h"
+#include "ns3/flow-classifier.h"
+
+namespace ns3 {
+
+class Packet;
+
+/// Classifies packets by looking at their IP and TCP/UDP headers.
+/// From these packet headers, a tuple (source-ip, destination-ip,
+/// protocol, source-port, destination-port) is created, and a unique
+/// flow identifier is assigned for each different tuple combination
+class Ipv4FlowClassifier : public FlowClassifier
+{
+public:
+
+ struct FiveTuple
+ {
+ Ipv4Address sourceAddress;
+ Ipv4Address destinationAddress;
+ uint8_t protocol;
+ uint16_t sourcePort;
+ uint16_t destinationPort;
+ };
+
+ Ipv4FlowClassifier ();
+
+ /// \brief try to classify the packet into flow-id and packet-id
+ /// \return true if the packet was classified, false if not (i.e. it
+ /// does not appear to be part of a flow).
+ bool Classify (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ uint32_t *out_flowId, uint32_t *out_packetId);
+
+ /// Searches for the FiveTuple corresponding to the given flowId
+ FiveTuple FindFlow (FlowId flowId) const;
+
+ virtual void SerializeToXmlStream (std::ostream &os, int indent) const;
+
+private:
+
+ std::map<FiveTuple, FlowId> m_flowMap;
+
+};
+
+
+bool operator < (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
+bool operator == (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2);
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-probe.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,178 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "ns3/ipv4-flow-probe.h"
+#include "ns3/ipv4-flow-classifier.h"
+#include "ns3/node.h"
+#include "ns3/packet.h"
+#include "ns3/flow-monitor.h"
+#include "ns3/log.h"
+#include "ns3/pointer.h"
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Ipv4FlowProbe");
+
+
+Ipv4FlowProbe::~Ipv4FlowProbe ()
+{
+}
+
+
+Ipv4FlowProbe::Ipv4FlowProbe (Ptr<FlowMonitor> monitor,
+ Ptr<Ipv4FlowClassifier> classifier,
+ Ptr<Node> node)
+ : FlowProbe (monitor),
+ m_classifier (classifier)
+{
+ NS_LOG_FUNCTION (this << node->GetId ());
+
+ Ptr<Ipv4L3Protocol> ipv4 = node->GetObject<Ipv4L3Protocol> ();
+
+ if (!ipv4->TraceConnectWithoutContext ("SendOutgoing",
+ MakeCallback (&Ipv4FlowProbe::SendOutgoingLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+ if (!ipv4->TraceConnectWithoutContext ("UnicastForward",
+ MakeCallback (&Ipv4FlowProbe::ForwardLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+ if (!ipv4->TraceConnectWithoutContext ("LocalDeliver",
+ MakeCallback (&Ipv4FlowProbe::ForwardUpLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+
+ if (!ipv4->TraceConnectWithoutContext ("Drop",
+ MakeCallback (&Ipv4FlowProbe::DropLogger, Ptr<Ipv4FlowProbe> (this))))
+ {
+ NS_FATAL_ERROR ("trace fail");
+ }
+}
+
+void
+Ipv4FlowProbe::SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ NS_LOG_DEBUG ("ReportFirstTx ("<<this<<", "<<flowId<<", "<<packetId<<", "<<size<<"); "
+ << ipHeader << *ipPayload);
+ m_flowMonitor->ReportFirstTx (this, flowId, packetId, size);
+ }
+}
+
+void
+Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ NS_LOG_DEBUG ("ReportForwarding ("<<this<<", "<<flowId<<", "<<packetId<<", "<<size<<");");
+ m_flowMonitor->ReportForwarding (this, flowId, packetId, size);
+ }
+
+}
+
+void
+Ipv4FlowProbe::ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
+{
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ NS_LOG_DEBUG ("ReportLastRx ("<<this<<", "<<flowId<<", "<<packetId<<", "<<size<<");");
+ m_flowMonitor->ReportLastRx (this, flowId, packetId, size);
+ }
+}
+
+void
+Ipv4FlowProbe::DropLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ Ipv4L3Protocol::DropReason reason, uint32_t ifIndex)
+{
+#if 0
+ switch (reason)
+ {
+ case Ipv4L3Protocol::DROP_NO_ROUTE:
+ break;
+
+ case Ipv4L3Protocol::DROP_TTL_EXPIRED:
+ case Ipv4L3Protocol::DROP_BAD_CHECKSUM:
+ Ipv4Address addri = m_ipv4->GetAddress (ifIndex);
+ Ipv4Mask maski = m_ipv4->GetNetworkMask (ifIndex);
+ Ipv4Address bcast = addri.GetSubnetDirectedBroadcast (maski);
+ if (ipHeader.GetDestination () == bcast) // we don't want broadcast packets
+ {
+ return;
+ }
+ }
+#endif
+
+ FlowId flowId;
+ FlowPacketId packetId;
+
+ if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId))
+ {
+ uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ());
+ NS_LOG_DEBUG ("Drop ("<<this<<", "<<flowId<<", "<<packetId<<", "<<size<<", " << reason
+ << ", destIp=" << ipHeader.GetDestination () << "); "
+ << "HDR: " << ipHeader << " PKT: " << *ipPayload);
+
+ DropReason myReason;
+
+
+ switch (reason)
+ {
+ case Ipv4L3Protocol::DROP_TTL_EXPIRED:
+ myReason = DROP_TTL_EXPIRE;
+ NS_LOG_DEBUG ("DROP_TTL_EXPIRE");
+ break;
+ case Ipv4L3Protocol::DROP_NO_ROUTE:
+ myReason = DROP_NO_ROUTE;
+ NS_LOG_DEBUG ("DROP_NO_ROUTE");
+ break;
+ case Ipv4L3Protocol::DROP_BAD_CHECKSUM:
+ myReason = DROP_BAD_CHECKSUM;
+ NS_LOG_DEBUG ("DROP_BAD_CHECKSUM");
+ break;
+ default:
+ myReason = DROP_INVALID_REASON;
+ NS_FATAL_ERROR ("Unexpected drop reason code " << reason);
+ }
+
+ m_flowMonitor->ReportDrop (this, flowId, packetId, size, myReason);
+ }
+}
+
+
+
+} // namespace ns3
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/ipv4-flow-probe.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,75 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#ifndef __IPV4_FLOW_PROBE_H__
+#define __IPV4_FLOW_PROBE_H__
+
+#include "ns3/flow-probe.h"
+#include "ns3/ipv4-flow-classifier.h"
+#include "ns3/ipv4-l3-protocol.h"
+
+namespace ns3 {
+
+class FlowMonitor;
+class Node;
+
+/// \brief Class that monitors flows at the IPv4 layer of a Node
+///
+/// For each node in the simulation, one instance of the class
+/// Ipv4FlowProbe is created to monitor that node. Ipv4FlowProbe
+/// accomplishes this by connecting callbacks to trace sources in the
+/// Ipv4L3Protocol interface of the node.
+class Ipv4FlowProbe : public FlowProbe
+{
+
+public:
+ Ipv4FlowProbe (Ptr<FlowMonitor> monitor, Ptr<Ipv4FlowClassifier> classifier, Ptr<Node> node);
+ ~Ipv4FlowProbe ();
+
+ /// \brief enumeration of possible reasons why a packet may be dropped
+ enum DropReason
+ {
+ /// Packet dropped due to missing route to the destination
+ DROP_NO_ROUTE = 0,
+ /// Packet dropped due to TTL decremented to zero during IPv4 forwarding
+ DROP_TTL_EXPIRE,
+ /// Packet dropped due to invalid checksum in the IPv4 header
+ DROP_BAD_CHECKSUM,
+
+ // DROP_QUEUE, // TODO: this is not easy to do
+ DROP_INVALID_REASON,
+ };
+
+private:
+
+ void SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+ void ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+ void ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
+ void DropLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload,
+ Ipv4L3Protocol::DropReason reason, uint32_t ifIndex);
+
+ Ptr<Ipv4FlowClassifier> m_classifier;
+};
+
+
+} // namespace ns3
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/waf Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec "`dirname "$0"`"/../../../waf "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/flow-monitor/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,23 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ obj = bld.create_ns3_module('flow-monitor', ['internet-stack'])
+ obj.source = [
+ 'flow-monitor.cc',
+ 'flow-classifier.cc',
+ 'flow-probe.cc',
+ 'ipv4-flow-classifier.cc',
+ 'ipv4-flow-probe.cc',
+ 'histogram.cc',
+ ]
+ headers = bld.new_task_gen('ns3header')
+ headers.module = 'flow-monitor'
+ headers.source = [
+ 'flow-monitor.h',
+ 'flow-probe.h',
+ 'flow-classifier.h',
+ 'ipv4-flow-classifier.h',
+ 'ipv4-flow-probe.h',
+ 'histogram.h',
+ ]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/animation-interface.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,193 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: George F. Riley<riley@ece.gatech.edu>
+ */
+
+// Interface between ns3 and the network animator
+
+#include <stdio.h>
+#include <sstream>
+
+// Socket related includes
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+// ns3 includes
+#include "ns3/animation-interface.h"
+#include "ns3/channel.h"
+#include "ns3/config.h"
+#include "ns3/node.h"
+#include "ns3/node-location.h"
+#include "ns3/packet.h"
+#include "ns3/simulator.h"
+
+using namespace std;
+
+NS_LOG_COMPONENT_DEFINE ("AnimationInterface");
+
+namespace ns3 {
+
+AnimationInterface::AnimationInterface ()
+ : m_fHandle (STDOUT_FILENO), m_model (0)
+{
+}
+
+bool AnimationInterface::SetOutputFile (const std::string& fn)
+{
+ FILE* f = fopen (fn.c_str (), "w");
+ if (!f)
+ {
+ return false; // Can't open
+ }
+ m_fHandle = fileno (f); // Set the file handle
+ return true;
+}
+
+bool AnimationInterface::SetServerPort (uint16_t port)
+{
+ int s = socket (AF_INET, SOCK_STREAM, 0);
+ struct sockaddr_in addr;
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons (port);
+ addr.sin_addr.s_addr = htonl (INADDR_ANY);
+ if (bind (s, (struct sockaddr*)&addr, sizeof (addr)) < 0)
+ {
+ NS_LOG_WARN ("Can't bind to port " << port << ", exiting.");
+ return false;
+ }
+ listen (s, 1);
+ NS_LOG_INFO ("Waiting for animator connection");
+ // Now wait for the animator to connect in
+ m_fHandle = accept (s, 0, 0);
+ NS_LOG_INFO ("Got animator connection from remote");
+ // set the linger socket option
+ int t = 1;
+ setsockopt (s, SOL_SOCKET, SO_LINGER, &t, sizeof(t));
+ return true;
+}
+
+bool AnimationInterface::SetInternalAnimation ()
+{
+ return false; // Not implemented yet
+}
+
+void AnimationInterface::StartAnimation ()
+{
+ // Dump the topology
+ for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
+ {
+ Ptr<Node> n = *i;
+ Ptr<NodeLocation> loc = n->GetObject<NodeLocation> ();
+ if (loc)
+ {
+ // Location exists, dump it
+ Vector v = loc->GetLocation ();
+ ostringstream oss;
+ oss << "0.0 N " << n->GetId ()
+ << " " << v.x << " " << v.y << endl;
+ WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ());
+ }
+ }
+ // Now dump the p2p links
+ for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End(); ++i)
+ {
+ Ptr<Node> n = *i;
+ uint32_t n1Id = n->GetId ();
+ uint32_t nDev = n->GetNDevices (); // Number of devices
+ for (uint32_t i = 0; i < nDev; ++i)
+ {
+ Ptr<NetDevice> dev = n->GetDevice (i);
+ Ptr<Channel> ch = dev->GetChannel ();
+ if (!ch)
+ {
+ continue; // No channel, can't be p2p device
+ }
+ string channelType = ch->GetInstanceTypeId ().GetName ();
+ if (channelType == string ("ns3::PointToPointChannel"))
+ { // Since these are duplex links, we only need to dump
+ // if srcid < dstid
+ uint32_t nChDev = ch->GetNDevices ();
+ for (uint32_t j = 0; j < nChDev; ++j)
+ {
+ Ptr<NetDevice> chDev = ch->GetDevice (j);
+ uint32_t n2Id = chDev->GetNode ()->GetId ();
+ if (n1Id < n2Id)
+ { // ouptut the p2p link
+ ostringstream oss;
+ oss << "0.0 L " << n1Id << " " << n2Id << endl;
+ WriteN (m_fHandle, oss.str ().c_str (),
+ oss.str ().length ());
+ }
+ }
+ }
+ else
+ {
+ NS_FATAL_ERROR ("Net animation currently only supports point-to-point links.");
+ }
+ }
+ }
+
+ // Connect the callback for packet tx events
+ Config::Connect ("/NodeList/*/DeviceList/*/TxRxPointToPoint",
+ MakeCallback (&AnimationInterface::DevTxTrace, this));
+}
+
+void AnimationInterface::StopAnimation ()
+{
+ if (m_fHandle > 0)
+ {
+ close (m_fHandle);
+ }
+}
+
+
+// Private methods
+int AnimationInterface::WriteN (int h, const char* data, uint32_t count)
+{ // Write count bytes to h from data
+ uint32_t nLeft = count;
+ const char* p = data;
+ uint32_t written = 0;
+
+ while (nLeft)
+ {
+ int n = write (h, p, nLeft);
+ if (n <= 0)
+ {
+ return written;
+ }
+ written += n;
+ nLeft -= n;
+ p += n;
+ }
+ return written;
+}
+
+void AnimationInterface::DevTxTrace (std::string context, Ptr<const Packet> p,
+ Ptr<NetDevice> tx, Ptr<NetDevice> rx,
+ Time txTime, Time rxTime)
+{
+ Time now = Simulator::Now ();
+ ostringstream oss;
+ oss << now.GetSeconds() << " P "
+ << tx->GetNode ()->GetId () << " "
+ << rx->GetNode ()->GetId () << " "
+ << (now + txTime).GetSeconds () << " " // last bit tx time
+ << (now + rxTime - txTime).GetSeconds() << " " // first bit rx time
+ << (now + rxTime).GetSeconds () << endl; // last bit rx time
+ WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ());
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/animation-interface.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,120 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: George F. Riley<riley@ece.gatech.edu>
+ */
+
+// Interface between ns3 and the network animator
+
+#ifndef __ANIMATION_INTERFACE__H__
+#define __ANIMATION_INTERFACE__H__
+
+#include <string>
+
+#include "ns3/ptr.h"
+#include "ns3/net-device.h"
+#include "ns3/nstime.h"
+#include "ns3/log.h"
+#include "ns3/node-list.h"
+
+
+namespace ns3 {
+class NetModel;
+
+/**
+ * \brief Interface to network animator
+ *
+ * Provides functions that facilitate communications with an
+ * external or internal network animator.
+ */
+class AnimationInterface
+{
+public:
+/**
+ * @brief Construct the animator interface. No arguments needed.
+ */
+ AnimationInterface ();
+/**
+ * @brief Specify that animation commands are to be written
+ * to the specified output file.
+ *
+ * This call is used to write the animation information to a text
+ * file that can later be used as input to the network animator tool.
+ *
+ * @param fn The name of the output file.
+ * @returns true if successful open.
+ */
+ bool SetOutputFile (const std::string& fn);
+
+/**
+ * @brief Specify that animation commands are to be written to
+ * a socket.
+ *
+ * This call is used to set the ns3 process in server mode, waiting
+ * for a TCP connection from the animator. This call will not
+ * return until the animator connects in, or if the bind to the
+ * specified port fails.
+ *
+ * @param port Port number to bind to.
+ * @returns true if connection created, false if bind failed.
+ */
+ bool SetServerPort (uint16_t port);
+
+/**
+ * @brief Specify that animation window is to be created as part
+ * of the ns3 process.
+ *
+ * This call is used to set the ns3 animator internal to the
+ * current process. This will fail if the ns3 library was built
+ * without the QT4 developer packages.
+ *
+ * @returns true if animation started, false if failed.
+ */
+ bool SetInternalAnimation ();
+
+/**
+ * @brief Writes the topology information and sets up the appropriate
+ * animation packet tx callback
+ *
+ * Writes the topology information to the appropriate output, depending
+ * on prior calls to SetOutputFile, SetServerPort, or SetInternalAnimation.
+ * Then creates the callbacks needed for the animator to start processing
+ * packets.
+ *
+ */
+ void StartAnimation ();
+
+/**
+ * @brief Closes the interface to the animator.
+ *
+ */
+ void StopAnimation ();
+
+
+private:
+ // Packet tx animation callback
+ void DevTxTrace (std::string context, Ptr<const Packet> p,
+ Ptr<NetDevice> tx, Ptr<NetDevice> rx,
+ Time txTime, Time rxTime);
+ // Write specified amount of data to the specified handle
+ int WriteN (int, const char*, uint32_t);
+private:
+ int m_fHandle; // File handle for output (-1 if none)
+ NetModel* m_model; // If non nil, points to the internal network model
+ // for the interlan animator
+};
+}
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/node-location.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 Georgia Institute of Technology
+ *
+ * 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: George Riley<riley@ece.gatech.edu>
+ */
+
+#include "node-location.h"
+
+namespace ns3 {
+
+TypeId
+NodeLocation::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::NodeLocation")
+ .SetParent<Object> ()
+ .AddAttribute ("Position", "The current position of the mobility model.",
+ TypeId::ATTR_SET | TypeId::ATTR_GET,
+ VectorValue (Vector (0.0, 0.0, 0.0)),
+ MakeVectorAccessor (&NodeLocation::SetLocation,
+ &NodeLocation::GetLocation),
+ MakeVectorChecker ())
+ ;
+ return tid;
+}
+
+NodeLocation::NodeLocation ()
+{}
+
+NodeLocation::~NodeLocation ()
+{}
+
+Vector NodeLocation::GetLocation (void) const
+{
+ return m_location;
+}
+
+void NodeLocation::SetLocation (const Vector &location)
+{
+ m_location = location;
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/node-location.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 Georgia Institute of Technology
+ *
+ * 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: George Riley<riley@ece.gatech.edu>
+ */
+#ifndef __NODE_LOCATION_H__
+#define __NODE_LOCATION_H__
+
+#include "ns3/object.h"
+#include "ns3/traced-callback.h"
+#include "ns3/vector.h"
+
+namespace ns3 {
+
+/**
+ * \brief Keep track of the current location of an object
+ *
+ * This can be used anytime a logical node location is needed
+ * (as opposed to a physical location used by the wireless PHY
+ * layer to calculate path loss). One potential use of
+ * this is by the animator to determine where to position the
+ * node icon on the animation display. Location units are
+ * arbitrary and dimensionless. In the case of use by the
+ * animator they dimensions are in pixels.
+ */
+class NodeLocation : public Object
+{
+public:
+ static TypeId GetTypeId (void);
+ NodeLocation ();
+ virtual ~NodeLocation ();
+
+ /**
+ * \returns the current location
+ */
+ Vector GetLocation (void) const;
+ /**
+ * \param location the location to set.
+ */
+ void SetLocation (const Vector &location);
+private:
+ Vector m_location;
+};
+
+}; // namespace ns3
+
+#endif /* __NODE_LOCATION_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/point-to-point-dumbbell-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,253 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: George F. Riley<riley@ece.gatech.edu>
+ */
+
+// Implement an object to create a dumbbell topology.
+
+#include <iostream>
+#include <sstream>
+
+// Socket related includes
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+// ns3 includes
+#include "ns3/animation-interface.h"
+#include "ns3/point-to-point-dumbbell-helper.h"
+#include "ns3/node-location.h"
+
+#include "ns3/node-list.h"
+#include "ns3/point-to-point-net-device.h"
+#include "ns3/vector.h"
+
+using namespace std;
+
+NS_LOG_COMPONENT_DEFINE("PointToPointDumbbellHelper");
+
+namespace ns3 {
+
+PointToPointDumbbellHelper::PointToPointDumbbellHelper (uint32_t nLeftLeaf,
+ PointToPointHelper& leftHelper,
+ uint32_t nRightLeaf,
+ PointToPointHelper& rightHelper,
+ PointToPointHelper& bottleneckHelper)
+{
+ // Create the bottleneck routers
+ m_routers.Create (2);
+ // Create the leaf nodes
+ m_leftLeaf.Create (nLeftLeaf);
+ m_rightLeaf.Create (nRightLeaf);
+
+ // Add the link connecting routers
+ m_routerDevices = bottleneckHelper.Install (m_routers);
+ // Add the left side links
+ for (uint32_t i = 0; i < nLeftLeaf; ++i)
+ {
+ NetDeviceContainer c = leftHelper.Install (m_routers.Get (0),
+ m_leftLeaf.Get (i));
+ m_leftRouterDevices.Add (c.Get (0));
+ m_leftLeafDevices.Add (c.Get(1));
+ }
+ // Add the right side links
+ for (uint32_t i = 0; i < nRightLeaf; ++i)
+ {
+ NetDeviceContainer c = rightHelper.Install (m_routers.Get (1),
+ m_rightLeaf.Get (i));
+ m_rightRouterDevices.Add (c.Get (0));
+ m_rightLeafDevices.Add (c.Get (1));
+ }
+}
+
+Ptr<Node> PointToPointDumbbellHelper::GetLeft () const
+{ // Get the left side bottleneck router
+ return m_routers.Get (0);
+}
+
+Ptr<Node> PointToPointDumbbellHelper::GetLeft (uint32_t i) const
+{ // Get the i'th left side leaf
+ return m_leftLeaf.Get (i);
+}
+
+Ptr<Node> PointToPointDumbbellHelper::GetRight () const
+{ // Get the right side bottleneck router
+ return m_routers.Get (1);
+}
+
+Ptr<Node> PointToPointDumbbellHelper::GetRight (uint32_t i) const
+{ // Get the i'th right side leaf
+ return m_rightLeaf.Get (i);
+}
+
+Ipv4Address PointToPointDumbbellHelper::GetLeftAddress (uint32_t i) const
+{
+ return m_leftLeafInterfaces.GetAddress (i);
+}
+
+Ipv4Address PointToPointDumbbellHelper::GetRightAddress (uint32_t i) const
+{
+ return m_rightLeafInterfaces.GetAddress (i);
+}
+
+uint32_t PointToPointDumbbellHelper::LeftCount () const
+{ // Number of left side nodes
+ return m_leftLeaf.GetN ();
+}
+
+uint32_t PointToPointDumbbellHelper::RightCount () const
+{ // Number of right side nodes
+ return m_rightLeaf.GetN ();
+}
+
+void PointToPointDumbbellHelper::InstallStack (InternetStackHelper stack)
+{
+ stack.Install (m_routers);
+ stack.Install (m_leftLeaf);
+ stack.Install (m_rightLeaf);
+}
+
+void PointToPointDumbbellHelper::AssignAddresses (Ipv4AddressHelper leftIp,
+ Ipv4AddressHelper rightIp,
+ Ipv4AddressHelper routerIp)
+{
+ // Assign the router network
+ m_routerInterfaces = routerIp.Assign (m_routerDevices);
+ // Assign to left side
+ for (uint32_t i = 0; i < LeftCount (); ++i)
+ {
+ NetDeviceContainer ndc;
+ ndc.Add (m_leftLeafDevices.Get (i));
+ ndc.Add (m_leftRouterDevices.Get (i));
+ Ipv4InterfaceContainer ifc = leftIp.Assign(ndc);
+ m_leftLeafInterfaces.Add (ifc.Get (0));
+ m_leftRouterInterfaces.Add (ifc.Get (1));
+ leftIp.NewNetwork ();
+ }
+ // Assign to right size
+ for (uint32_t i = 0; i < RightCount (); ++i)
+ {
+ NetDeviceContainer ndc;
+ ndc.Add (m_rightLeafDevices.Get (i));
+ ndc.Add (m_rightRouterDevices.Get (i));
+ Ipv4InterfaceContainer ifc = rightIp.Assign (ndc);
+ m_rightLeafInterfaces.Add (ifc.Get (0));
+ m_rightRouterInterfaces.Add (ifc.Get (1));
+ rightIp.NewNetwork ();
+ }
+}
+
+
+void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper left x/y
+ double lrx, double lry) // Lower right y
+{
+ double xDist = lrx - ulx;
+ double yDist = lry - uly;
+ double xAdder = xDist / 3.0;
+ double thetaL = M_PI / (LeftCount () + 1.0);
+ double thetaR = M_PI / (RightCount () + 1.0);
+
+ // Place the left router
+ Ptr<Node> lr = GetLeft ();
+ Ptr<NodeLocation> loc = lr->GetObject<NodeLocation> ();
+ if (loc == 0)
+ {
+ loc = CreateObject<NodeLocation> ();
+ lr->AggregateObject (loc);
+ }
+ Vector lrl (ulx + xAdder, uly + yDist/2.0, 0);
+ loc->SetLocation (lrl);
+
+ // Place the right router
+ Ptr<Node> rr = GetRight ();
+ loc = rr->GetObject<NodeLocation> ();
+ if (loc == 0)
+ {
+ loc = CreateObject<NodeLocation> ();
+ rr->AggregateObject (loc);
+ }
+ Vector rrl (ulx + xAdder * 2, uly + yDist/2.0, 0); // Right router location
+ loc->SetLocation (rrl);
+
+ // Place the left leaf nodes
+ double theta = -M_PI_2 + thetaL;
+ for (uint32_t l = 0; l < LeftCount (); ++l)
+ {
+ // Make them in a circular pattern to make all line lengths the same
+ // Special case when theta = 0, to be sure we get a straight line
+ if ((LeftCount () % 2) == 1)
+ { // Count is odd, see if we are in middle
+ if (l == (LeftCount () / 2))
+ {
+ theta = 0.0;
+ }
+ }
+ Ptr<Node> ln = GetLeft (l);
+ loc = ln->GetObject<NodeLocation> ();
+ if (loc == 0)
+ {
+ loc = CreateObject<NodeLocation> ();
+ ln->AggregateObject (loc);
+ }
+ Vector lnl (lrl.x - cos (theta) * xAdder,
+ lrl.y + sin (theta) * xAdder, 0); // Left Node Location
+ // Insure did not exceed bounding box
+ if (lnl.y < uly)
+ {
+ lnl.y = uly; // Set to upper right y
+ }
+ if (lnl.y > lry)
+ {
+ lnl.y = lry; // Set to lower right y
+ }
+ loc->SetLocation (lnl);
+ theta += thetaL;
+ }
+ // Place the right nodes
+ theta = -M_PI_2 + thetaR;
+ for (uint32_t r = 0; r < RightCount (); ++r)
+ {
+ // Special case when theta = 0, to be sure we get a straight line
+ if ((RightCount () % 2) == 1)
+ { // Count is odd, see if we are in middle
+ if (r == (RightCount () / 2))
+ {
+ theta = 0.0;
+ }
+ }
+ Ptr<Node> rn = GetRight (r);
+ loc = rn->GetObject<NodeLocation> ();
+ if (loc == 0)
+ {
+ loc = CreateObject<NodeLocation> ();
+ rn->AggregateObject (loc);
+ }
+ Vector rnl (rrl.x + cos (theta) * xAdder, // Right node location
+ rrl.y + sin (theta) * xAdder, 0);
+ // Insure did not exceed bounding box
+ if (rnl.y < uly)
+ {
+ rnl.y = uly; // Set to upper right y
+ }
+ if (rnl.y > lry)
+ {
+ rnl.y = lry; // Set to lower right y
+ }
+ loc->SetLocation (rnl);
+ theta += thetaR;
+ }
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/point-to-point-dumbbell-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,77 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: George F. Riley<riley@ece.gatech.edu>
+ */
+
+// Define an object to create a dumbbell topology.
+
+#ifndef __POINT_TO_POINT_DUMBBELL_HELPER_H__
+#define __POINT_TO_POINT_DUMBBELL_HELPER_H__
+
+#include <string>
+
+#include "point-to-point-helper.h"
+#include "ipv4-address-helper.h"
+#include "internet-stack-helper.h"
+#include "ipv4-interface-container.h"
+
+namespace ns3 {
+
+class PointToPointDumbbellHelper
+{
+public:
+ PointToPointDumbbellHelper (uint32_t nLeftLeaf, // Number of left size leaf nodes
+ PointToPointHelper& leftHelper,
+ uint32_t nRightLeaf, // Number of right side leaf nodes
+ PointToPointHelper& rightHelper,
+ PointToPointHelper& bottleneckHelper);
+public:
+ Ptr<Node> GetLeft () const; // Get the left side bottleneck router
+ Ptr<Node> GetLeft (uint32_t) const; // Get the i'th left side leaf
+ Ptr<Node> GetRight () const; // Get the right side bottleneck router
+ Ptr<Node> GetRight (uint32_t) const; // Get the i'th right side leaf
+ Ipv4Address GetLeftAddress (uint32_t) const; // Get left leaf address
+ Ipv4Address GetRightAddress (uint32_t) const; // Get right leaf address
+ uint32_t LeftCount () const; // Number of left side nodes
+ uint32_t RightCount () const; // Number of right side nodes
+ void InstallStack (InternetStackHelper stack);
+ void AssignAddresses (Ipv4AddressHelper leftIp,
+ Ipv4AddressHelper rightIp,
+ Ipv4AddressHelper routerIp);
+ // Add locations in the specified bounding box
+ // Arguments are uppler left x, upper left y, lower right x, lower right y
+ void BoundingBox (double, double, double, double);
+
+private:
+ NodeContainer m_leftLeaf;
+ NetDeviceContainer m_leftLeafDevices;
+ NodeContainer m_rightLeaf;
+ NetDeviceContainer m_rightLeafDevices;
+ NodeContainer m_routers;
+ NetDeviceContainer m_routerDevices; // just two connecting the routers
+ // Device containers for the router devices connecting to the leaf devices
+ NetDeviceContainer m_leftRouterDevices;
+ NetDeviceContainer m_rightRouterDevices;
+ Ipv4InterfaceContainer m_leftLeafInterfaces;
+ Ipv4InterfaceContainer m_leftRouterInterfaces;
+ Ipv4InterfaceContainer m_rightLeafInterfaces;
+ Ipv4InterfaceContainer m_rightRouterInterfaces;
+ Ipv4InterfaceContainer m_routerInterfaces;
+};
+}
+#endif
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/point-to-point-grid-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,240 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#include "ns3/point-to-point-grid-helper.h"
+#include "ns3/animation-interface.h"
+#include "ns3/internet-stack-helper.h"
+#include "ns3/point-to-point-helper.h"
+#include "ns3/node-location.h"
+#include "ns3/string.h"
+#include "ns3/vector.h"
+#include "ns3/log.h"
+
+#ifdef NS3_MPI
+#include <mpi.h>
+#endif
+
+NS_LOG_COMPONENT_DEFINE("PointToPointGridHelper");
+
+namespace ns3 {
+
+PointToPointGridHelper::PointToPointGridHelper (uint32_t nRows,
+ uint32_t nCols,
+ PointToPointHelper pointToPoint)
+ : m_xSize (nCols), m_ySize (nRows)
+{
+ InternetStackHelper stack;
+
+ for (uint32_t y = 0; y < nRows; ++y)
+ {
+ NodeContainer rowNodes;
+ NetDeviceContainer rowDevices;
+ NetDeviceContainer colDevices;
+
+ for (uint32_t x = 0; x < nCols; ++x)
+ {
+ rowNodes.Create(1);
+
+ // install p2p links across the row
+ if (x > 0)
+ {
+ rowDevices.Add (pointToPoint.
+ Install (rowNodes.Get (x-1), rowNodes.Get (x)));
+ }
+
+ // install vertical p2p links
+ if (y > 0)
+ {
+ colDevices.Add(pointToPoint.
+ Install ((m_nodes.at (y-1)).Get (x), rowNodes.Get (x)));
+ }
+ }
+
+ m_nodes.push_back(rowNodes);
+ m_rowDevices.push_back (rowDevices);
+
+ if (y > 0)
+ m_colDevices.push_back (colDevices);
+ }
+}
+
+PointToPointGridHelper::PointToPointGridHelper (uint32_t nRows,
+ uint32_t nCols, PointToPointHelper pointToPoint,
+ uint16_t mpiSize)
+ : m_xSize (nCols), m_ySize (nRows)
+{
+#ifdef NS3_MPI
+ for (uint32_t y = 0; y < nRows; ++y)
+ {
+ NodeContainer rowNodes;
+ NetDeviceContainer rowDevices;
+ NetDeviceContainer colDevices;
+
+ for (uint32_t x = 0; x < nCols; ++x)
+ {
+ Ptr<Node> node = CreateObject<Node> ();
+ // keep it simple for now, and
+ // split this up on to two
+ // processors
+ if (x > xSize/2)
+ {
+ node->SetSystemId(1);
+ }
+ else
+ {
+ node->SetSystemId(0);
+ }
+ rowNodes.Add (node);
+
+ // install p2p links across the row
+ if (x > 0)
+ {
+ rowDevices.Add (pointToPoint.
+ Install (rowNodes.Get (x-1), rowNodes.Get (x)));
+ }
+
+ // install vertical p2p links
+ if (y > 0)
+ {
+ colDevices.Add(pointToPoint.
+ Install ((m_nodes.at (y-1)).Get (x), rowNodes.Get (x)));
+ }
+ }
+
+ m_nodes.push_back(rowNodes);
+ m_rowDevices.push_back (rowDevices);
+
+ if (y > 0)
+ {
+ m_colDevices.push_back (colDevices);
+ }
+ }
+#else
+ NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in");
+#endif
+}
+
+void
+PointToPointGridHelper::InstallStack (InternetStackHelper stack)
+{
+ for (uint32_t i = 0; i < m_nodes.size (); ++i)
+ {
+ NodeContainer rowNodes = m_nodes[i];
+ for (uint32_t j = 0; j < rowNodes.GetN (); ++j)
+ {
+ stack.Install (rowNodes.Get (j));
+ }
+ }
+}
+
+void
+PointToPointGridHelper::AssignAddresses (Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp)
+{
+ // Assign addresses to all row devices in the grid.
+ // These devices are stored in a vector. Each row
+ // of the grid has all the row devices in one entry
+ // of the vector. These entries come in pairs.
+ for (uint32_t i = 0; i < m_rowDevices.size (); ++i)
+ {
+ Ipv4InterfaceContainer rowInterfaces;
+ NetDeviceContainer rowContainer = m_rowDevices[i];
+ for (uint32_t j = 0; j < rowContainer.GetN (); j+=2)
+ {
+ rowInterfaces.Add (rowIp.Assign (rowContainer.Get (j)));
+ rowInterfaces.Add (rowIp.Assign (rowContainer.Get (j+1)));
+ rowIp.NewNetwork ();
+ }
+ m_rowInterfaces.push_back (rowInterfaces);
+ }
+
+ // Assign addresses to all col devices in the grid.
+ // These devices are stored in a vector. Each col
+ // of the grid has all the col devices in one entry
+ // of the vector. These entries come in pairs.
+ for (uint32_t i = 0; i < m_colDevices.size (); ++i)
+ {
+ Ipv4InterfaceContainer colInterfaces;
+ NetDeviceContainer colContainer = m_colDevices[i];
+ for (uint32_t j = 0; j < colContainer.GetN (); j+=2)
+ {
+ colInterfaces.Add (colIp.Assign (colContainer.Get (j)));
+ colInterfaces.Add (colIp.Assign (colContainer.Get (j+1)));
+ colIp.NewNetwork ();
+ }
+ m_colInterfaces.push_back (colInterfaces);
+ }
+}
+
+void
+PointToPointGridHelper::BoundingBox (double ulx, double uly,
+ double lrx, double lry)
+{
+ double xDist = lrx - ulx;
+ double yDist = lry - uly;
+
+ double xAdder = xDist / m_xSize;
+ double yAdder = yDist / m_ySize;
+ double yLoc = yDist / 2;
+ for (uint32_t i = 0; i < m_ySize; ++i)
+ {
+ double xLoc = xDist / 2;
+ for (uint32_t j = 0; j < m_xSize; ++j)
+ {
+ Ptr<Node> node = GetNode (i, j);
+ Ptr<NodeLocation> loc = node->GetObject<NodeLocation> ();
+ if (loc ==0)
+ {
+ loc = CreateObject<NodeLocation> ();
+ node->AggregateObject (loc);
+ }
+ Vector locVec (xLoc, yLoc, 0);
+ loc->SetLocation (locVec);
+
+ xLoc += xAdder;
+ }
+ yLoc += yAdder;
+ }
+}
+
+Ptr<Node>
+PointToPointGridHelper::GetNode (uint32_t row, uint32_t col)
+{
+ return (m_nodes.at (row)).Get (col);
+}
+
+Ipv4Address
+PointToPointGridHelper::GetAddress (uint32_t row, uint32_t col)
+{
+ // Right now this just gets one of the addresses of the
+ // specified node. The exact device can't be specified.
+ // If you picture the grid, the address returned is the
+ // address of the left (row) device of all nodes, with
+ // the exception of the left-most nodes in the grid;
+ // in which case the right (row) device address is
+ // returned
+ if (col == 0)
+ {
+ return (m_rowInterfaces.at (row)).GetAddress (0);
+ }
+ else
+ {
+ return (m_rowInterfaces.at (row)).GetAddress ((2*col)-1);
+ }
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/point-to-point-grid-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,58 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#ifndef __POINT_TO_POINT_GRID_HELPER_H__
+#define __POINT_TO_POINT_GRID_HELPER_H__
+
+#include <vector>
+
+#include "internet-stack-helper.h"
+#include "point-to-point-helper.h"
+#include "ipv4-address-helper.h"
+#include "ipv4-interface-container.h"
+#include "net-device-container.h"
+
+namespace ns3 {
+
+class PointToPointGridHelper
+{
+ public:
+ PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper pointToPoint);
+ PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper pointToPoint, uint16_t mpiSize);
+
+ Ptr<Node> GetNode (uint32_t row, uint32_t col);
+ Ipv4Address GetAddress (uint32_t row, uint32_t col);
+
+ void InstallStack (InternetStackHelper stack);
+ void AssignAddresses (Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp);
+ void BoundingBox (double ulx, double uly, double lrx, double lry);
+
+ private:
+ uint32_t m_xSize;
+ uint32_t m_ySize;
+ std::vector<NetDeviceContainer> m_rowDevices;
+ std::vector<NetDeviceContainer> m_colDevices;
+ std::vector<Ipv4InterfaceContainer> m_rowInterfaces;
+ std::vector<Ipv4InterfaceContainer> m_colInterfaces;
+ std::vector<NodeContainer> m_nodes;
+
+};
+
+} // namespace ns3
+
+#endif /* GRID_HELPER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/test-dumbbell.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,119 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: George F. Riley<riley@ece.gatech.edu>
+ */
+
+#include <iostream>
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/net-anim-module.h"
+
+using namespace ns3;
+
+int main (int argc, char *argv[])
+{
+ Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (512));
+ Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("500kb/s"));
+
+ uint32_t nLeftLeaf = 5;
+ uint32_t nRightLeaf = 5;
+ uint32_t nLeaf = 0; // If non-zero, number of both left and right
+ uint16_t port = 0; // If non zero, port to bind to for anim connection
+ std::string animFile; // Name of file for animation output
+
+ CommandLine cmd;
+ cmd.AddValue ("nLeftLeaf", "Number of left side leaf nodes", nLeftLeaf);
+ cmd.AddValue ("nRightLeaf","Number of right side leaf nodes", nRightLeaf);
+ cmd.AddValue ("nLeaf", "Number of left and right side leaf nodes", nLeaf);
+ cmd.AddValue ("port", "Port Number for Remote Animation", port);
+ cmd.AddValue ("animFile", "File Name for Animation Output", animFile);
+
+ cmd.Parse (argc,argv);
+ if (nLeaf > 0)
+ {
+ nLeftLeaf = nLeaf;
+ nRightLeaf = nLeaf;
+ }
+
+ // Create the point-to-point link helpers
+ PointToPointHelper pointToPointRouter;
+ pointToPointRouter.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
+ pointToPointRouter.SetChannelAttribute ("Delay", StringValue ("1ms"));
+ PointToPointHelper pointToPointLeaf;
+ pointToPointLeaf.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
+ pointToPointLeaf.SetChannelAttribute ("Delay", StringValue ("1ms"));
+
+ PointToPointDumbbellHelper d(nLeftLeaf, pointToPointLeaf,
+ nRightLeaf, pointToPointLeaf,
+ pointToPointRouter);
+
+ // Install Stack
+ InternetStackHelper stack;
+ d.InstallStack (stack);
+
+ // Assign IP Addresses
+ d.AssignAddresses(Ipv4AddressHelper("10.1.1.0", "255.255.255.0"),
+ Ipv4AddressHelper("10.2.1.0", "255.255.255.0"),
+ Ipv4AddressHelper("10.3.1.0", "255.255.255.0"));
+
+ // Install on/off app on all right side nodes
+ OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
+ clientHelper.SetAttribute
+ ("OnTime", RandomVariableValue (UniformVariable (0, 1)));
+ clientHelper.SetAttribute
+ ("OffTime", RandomVariableValue (UniformVariable (0, 1)));
+ ApplicationContainer clientApps;
+
+ for (uint32_t i = 0; i < d.RightCount(); ++i)
+ {
+ // Create an on/off app sending packets to the same leaf right side
+ AddressValue remoteAddress(InetSocketAddress(d.GetLeftAddress(i), 1000));
+ clientHelper.SetAttribute("Remote", remoteAddress);
+ clientApps.Add(clientHelper.Install(d.GetRight(i)));
+ }
+
+ clientApps.Start (Seconds (0.0));
+ clientApps.Stop (Seconds (10.0));
+
+ // Set the bounding box for animation
+ d.BoundingBox(1, 1, 10, 10);
+
+ // Create the animation object and configure for specified output
+ AnimationInterface anim;
+ if (port > 0)
+ {
+ anim.SetServerPort(port);
+ }
+ else if (!animFile.empty())
+ {
+ anim.SetOutputFile(animFile);
+ }
+ anim.StartAnimation();
+
+ // Set up the acutal simulation
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+
+ std::cout << "Running the simulation" << std::endl;
+ Simulator::Run ();
+ std::cout << "Destroying the simulation" << std::endl;
+ Simulator::Destroy ();
+ std::cout << "Stopping the animation" << std::endl;
+ anim.StopAnimation();
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/test-grid.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,109 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#include <iostream>
+
+#include "ns3/core-module.h"
+#include "ns3/simulator-module.h"
+#include "ns3/node-module.h"
+#include "ns3/helper-module.h"
+#include "ns3/net-anim-module.h"
+
+using namespace ns3;
+
+int main (int argc, char *argv[])
+{
+ Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (512));
+ Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("500kb/s"));
+
+ uint32_t xSize = 5;
+ uint32_t ySize = 5;
+ uint16_t port = 0;
+ std::string animFile;
+
+ CommandLine cmd;
+ cmd.AddValue ("xSize", "Number of rows of nodes", xSize);
+ cmd.AddValue ("ySize", "Number of columns of nodes", ySize);
+ cmd.AddValue ("port", "Port Number for Remote Animation", port);
+ cmd.AddValue ("animFile", "File Name for Animation Output", animFile);
+
+ cmd.Parse (argc,argv);
+ if (xSize < 1)
+ NS_FATAL_ERROR ("Need more nodes for grid.");
+ if (ySize < 1)
+ NS_FATAL_ERROR ("Need more nodes for grid.");
+ if (xSize < 2 && ySize < 2)
+ NS_FATAL_ERROR ("Need more nodes for grid.");
+
+ PointToPointHelper pointToPoint;
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
+
+ // Create Grid
+ PointToPointGridHelper grid (xSize, ySize, pointToPoint);
+
+ // Install stack on Grid
+ InternetStackHelper stack;
+ grid.InstallStack (stack);
+
+ // Assign Addresses to Grid
+ grid.AssignAddresses (Ipv4AddressHelper("10.1.1.0", "255.255.255.0"),
+ Ipv4AddressHelper("10.2.1.0", "255.255.255.0"));
+
+
+ OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
+ clientHelper.SetAttribute
+ ("OnTime", RandomVariableValue (ConstantVariable (1)));
+ clientHelper.SetAttribute
+ ("OffTime", RandomVariableValue (ConstantVariable (0)));
+ ApplicationContainer clientApps;
+
+ // Create an on/off app sending packets
+ AddressValue remoteAddress(InetSocketAddress(grid.GetAddress (xSize-1,ySize-1), 1000));
+ clientHelper.SetAttribute("Remote", remoteAddress);
+ clientApps.Add(clientHelper.Install(grid.GetNode (0,0)));
+
+ clientApps.Start (Seconds (0.0));
+ clientApps.Stop (Seconds (1.5));
+
+ // Set the bounding box for animation
+ grid.BoundingBox(1, 1, 10, 10);
+
+ // Create the animation object and configure for specified output
+ AnimationInterface anim;
+ if (port > 0)
+ {
+ anim.SetServerPort(port);
+ }
+ else if (!animFile.empty())
+ {
+ anim.SetOutputFile(animFile);
+ }
+ anim.StartAnimation();
+
+ // Set up the actual simulation
+ Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+
+ std::cout << "Running the simulation" << std::endl;
+ Simulator::Run ();
+ std::cout << "Destroying the simulation" << std::endl;
+ Simulator::Destroy ();
+ std::cout << "Stopping the animation" << std::endl;
+ anim.StopAnimation();
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/contrib/net-anim/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,25 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ obj = bld.create_ns3_module('net-anim')
+ obj.source = [
+ 'point-to-point-dumbbell-helper.cc',
+ 'point-to-point-grid-helper.cc',
+ 'animation-interface.cc',
+ 'node-location.cc'
+ ]
+
+ headers = bld.new_task_gen('ns3header')
+ headers.module = 'net-anim'
+ headers.source = [
+ 'point-to-point-dumbbell-helper.h',
+ 'point-to-point-grid-helper.h',
+ 'animation-interface.h',
+ 'node-location.h'
+ ]
+
+ obj = bld.create_ns3_program('test-dumbbell', ['net-anim', 'point-to-point', 'internet-stack'])
+ obj.source = 'test-dumbbell.cc'
+
+ obj = bld.create_ns3_program('test-grid', ['net-anim', 'point-to-point', 'internet-stack'])
+ obj.source = 'test-grid.cc'
--- a/src/core/ptr.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/core/ptr.h Thu Sep 24 10:57:41 2009 -0400
@@ -140,6 +140,7 @@
/**
* \relates Ptr
+ * \param p smart pointer
* \return the pointer managed by this smart pointer.
*
* The underlying refcount is not incremented prior
@@ -151,6 +152,7 @@
/**
* \relates Ptr
+ * \param p smart pointer
* \return the pointer managed by this smart pointer.
*
* The underlying refcount is incremented prior
--- a/src/core/system-condition.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/core/system-condition.h Thu Sep 24 10:57:41 2009 -0400
@@ -61,6 +61,7 @@
/**
* Set the value of the underlying condition.
+ * \param condition value
*/
void SetCondition (bool condition);
@@ -91,6 +92,7 @@
/**
* Wait a maximum of ns nanoseconds for the condition to be true. If the
* wait times out, return true else return false.
+ * \param ns maximum of nanoseconds to wait
*/
bool TimedWait (uint64_t ns);
--- a/src/core/system-thread.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/core/system-thread.h Thu Sep 24 10:57:41 2009 -0400
@@ -84,6 +84,8 @@
* method provided to do this is Join (). If you call Join() you will block
* until the SystemThread run method returns.
*
+ * @param callback entry point of the thread
+ *
* @warning The SystemThread uses SIGALRM to wake threads that are possibly
* blocked on IO.
* @see Shutdown
--- a/src/core/test.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/core/test.h Thu Sep 24 10:57:41 2009 -0400
@@ -574,7 +574,7 @@
* This routine is based on the GNU Scientific Library function gsl_fcmp.
*
* \param a The first of double precision floating point numbers to compare
- * \param a The second of double precision floating point numbers to compare
+ * \param b The second of double precision floating point numbers to compare
* \param epsilon The second of double precision floating point numberss to compare
* \returns Returns true if the doubles are equal to a precision defined by epsilon
*/
@@ -591,7 +591,6 @@
/**
* \brief Run this test case.
- * \param verbose Turn on any output the test case may provide
* \returns Boolean sense of "an error has occurred."
*/
bool Run (void);
@@ -657,6 +656,7 @@
* around so we need to save it. Since file streams are not designed to be
* copied or assigned (what does it mean to have duplicate streams to a file)
* we have to stash a pointer to the stream.
+ * \param ofs output file stream
*/
void SetStream (std::ofstream *ofs);
@@ -748,6 +748,10 @@
class TestSuite
{
public:
+ /**
+ * \enum TestType
+ * \brief Type of test.
+ */
enum TestType {
BVT = 1, /**< This test suite implements a Build Verification Test */
UNIT, /**< This test suite implements a Unit Test */
@@ -772,7 +776,6 @@
/**
* \brief Run this test suite.
*
- * \param verbose Turn on any output the test case may provide
* \returns Boolean sense of "an error has occurred."
*/
bool Run (void);
@@ -838,6 +841,7 @@
* around so we need to save it. Since file streams are not designed to be
* copied or assigned (what does it mean to have duplicate streams to a file)
* we have to stash a pointer to the stream.
+ * \param ofs output file stream
*/
void SetStream (std::ofstream *ofs);
--- a/src/devices/bridge/bridge-net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/bridge/bridge-net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -70,12 +70,14 @@
BridgeNetDevice ();
virtual ~BridgeNetDevice ();
- /** \brief Add a 'port' to a bridge device
+ /**
+ * \brief Add a 'port' to a bridge device
*
* This method adds a new bridge port to a BridgeNetDevice, so that
* the new bridge port NetDevice becomes part of the bridge and L2
* frames start being forwarded to/from this NetDevice.
*
+ * \param bridgePort NetDevice
* \attention The netdevice that is being added as bridge port must
* _not_ have an IP address. In order to add IP connectivity to a
* bridging node you must enable IP on the BridgeNetDevice itself,
--- a/src/devices/csma/csma-net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/csma/csma-net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -349,12 +349,21 @@
/**
* Start sending a packet down the channel.
+ * \param packet packet to send
+ * \param dest layer 2 destination address
+ * \param protocolNumber protocol number
+ * \return true if successfull, false otherwise (drop, ...)
*/
virtual bool Send (Ptr<Packet> packet, const Address& dest,
uint16_t protocolNumber);
/**
* Start sending a packet down the channel, with MAC spoofing
+ * \param packet packet to send
+ * \param source layer 2 source address
+ * \param dest layer 2 destination address
+ * \param protocolNumber protocol number
+ * \return true if successfull, false otherwise (drop, ...)
*/
virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest,
uint16_t protocolNumber);
@@ -448,30 +457,35 @@
/**
* Operator = is declared but not implemented. This disables the assigment
* operator for CsmaNetDevice objects.
-
+ * \param o object to copy
*/
CsmaNetDevice &operator = (const CsmaNetDevice &o);
/**
* Copy constructor is declared but not implemented. This disables the
* copy constructor for CsmaNetDevice objects.
+ * \param o object to copy
*/
CsmaNetDevice (const CsmaNetDevice &o);
/**
* Initialization function used during object construction.
+ * \param sendEnable if device will be allowed to send
+ * \param receiveEnable if device will be allowed to receive
*/
void Init (bool sendEnable, bool receiveEnable);
/**
* Calculate the value for the MTU that would result from
* setting the frame size to the given value.
+ * \param frameSize size of frame
*/
uint32_t MtuFromFrameSize (uint32_t frameSize);
/**
* Calculate the value for the frame size that would be required
* to be able to set the MTU to the given value.
+ * \param mtu MTU
*/
uint32_t FrameSizeFromMtu (uint32_t mtu);
--- a/src/devices/emu/emu-net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/emu/emu-net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -225,12 +225,16 @@
/**
* Adds the necessary headers and trailers to a packet of data in order to
* respect the protocol implemented by the agent.
+ * \param p packet
+ * \param protocolNumber protocol number
*/
- void AddHeader(Ptr<Packet> p, uint16_t protocolNumber);
+ void AddHeader (Ptr<Packet> p, uint16_t protocolNumber);
/**
* Removes, from a packet of data, all headers and trailers that
* relate to the protocol implemented by the agent
+ * \param p Packet whose headers need to be processed
+ * \param param An integer parameter that can be set by the function
* \return Returns true if the packet should be forwarded up the
* protocol stack.
*/
@@ -238,7 +242,7 @@
/**
* Start Sending a Packet Down the Wire.
- *
+ * @param p packet to send
* @returns true if success, false on failure
*/
bool TransmitStart (Ptr<Packet> p);
--- a/src/devices/mesh/dot11s/hwmp-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/hwmp-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -86,6 +86,10 @@
void ResetStats ();
private:
friend class HwmpProtocolMac;
+
+ HwmpProtocol& operator= (const HwmpProtocol &);
+ HwmpProtocol (const HwmpProtocol &);
+
/**
* \brief Structure of path error: IePerr and list of receivers:
* interfaces and MAC address
--- a/src/devices/mesh/dot11s/ie-dot11s-id.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-id.cc Thu Sep 24 10:57:41 2009 -0400
@@ -23,6 +23,7 @@
namespace ns3 {
namespace dot11s {
+
IeMeshId::IeMeshId ()
{
for (uint8_t i = 0; i < 32; i++)
@@ -141,5 +142,17 @@
a.Print (os);
return os;
}
+
+std::istream &operator >> (std::istream &is, IeMeshId &a)
+{
+ std::string str;
+ is >> str;
+ a = IeMeshId (str.c_str ());
+ return is;
+}
+
+ATTRIBUTE_HELPER_CPP (IeMeshId);
+
+
} //namespace dot11s
} // namespace ns3
--- a/src/devices/mesh/dot11s/ie-dot11s-id.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-id.h Thu Sep 24 10:57:41 2009 -0400
@@ -40,7 +40,7 @@
bool IsEqual (IeMeshId const &o) const;
bool IsBroadcast (void) const;
- uint32_t GetLength (void) const;
+ //uint32_t GetLength (void) const;
char *PeekString (void) const;
/**
* \name Inherited from WifiInformationElement
@@ -55,6 +55,7 @@
private:
uint8_t m_meshId[33];
friend bool operator== (const IeMeshId & a, const IeMeshId & b);
+
};
std::ostream &operator << (std::ostream &os, const IeMeshId &meshId);
--- a/src/devices/mesh/dot11s/peer-link-frame.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-link-frame.cc Thu Sep 24 10:57:41 2009 -0400
@@ -29,7 +29,7 @@
NS_OBJECT_ENSURE_REGISTERED (PeerLinkFrameStart);
PeerLinkFrameStart::PeerLinkFrameStart () :
- m_subtype (255), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (IeMeshId ()),
+ m_subtype (255), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (),
m_config (IeConfiguration ()), m_reasonCode ((uint16_t) REASON11S_RESERVED)
{
}
--- a/src/devices/mesh/dot11s/peer-link-frame.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-link-frame.h Thu Sep 24 10:57:41 2009 -0400
@@ -86,6 +86,10 @@
uint16_t m_reasonCode;
friend bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
+
+ PeerLinkFrameStart& operator= (const PeerLinkFrameStart &);
+ PeerLinkFrameStart (const PeerLinkFrameStart &);
+
};
bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
} //namespace dot11s
--- a/src/devices/mesh/dot11s/peer-link.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-link.cc Thu Sep 24 10:57:41 2009 -0400
@@ -241,10 +241,7 @@
void
PeerLink::OpenAccept (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp)
{
- if (m_peerLinkId == 0)
- {
- m_peerLinkId = localLinkId;
- }
+ m_peerLinkId = localLinkId;
m_configuration = conf;
if (m_peerMeshPointAddress != Mac48Address::GetBroadcast ())
{
--- a/src/devices/mesh/dot11s/peer-link.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-link.h Thu Sep 24 10:57:41 2009 -0400
@@ -74,17 +74,17 @@
void SetPeerMeshPointAddress (Mac48Address macaddr);
void SetInterface (uint32_t interface);
void SetLocalLinkId (uint16_t id);
- void SetPeerLinkId (uint16_t id);
+ //void SetPeerLinkId (uint16_t id);
void SetLocalAid (uint16_t aid);
- void SetPeerAid (uint16_t aid);
+ //void SetPeerAid (uint16_t aid);
void SetBeaconTimingElement (IeBeaconTiming beaconTiming);
- void SetPeerLinkDescriptorElement (IePeerManagement peerLinkElement);
+ //void SetPeerLinkDescriptorElement (IePeerManagement peerLinkElement);
Mac48Address GetPeerAddress () const;
uint16_t GetLocalAid () const;
Time GetLastBeacon () const;
Time GetBeaconInterval () const;
IeBeaconTiming GetBeaconTimingElement ()const;
- IePeerManagement GetPeerLinkDescriptorElement ()const;
+ //IePeerManagement GetPeerLinkDescriptorElement ()const;
//\}
/**
@@ -198,6 +198,10 @@
/// Several successive beacons were lost, close link
void BeaconLoss ();
private:
+
+ PeerLink& operator= (const PeerLink &);
+ PeerLink (const PeerLink &);
+
///The number of interface I am associated with
uint32_t m_interface;
/// pointer to MAC plugin, which is responsible for peer management
--- a/src/devices/mesh/dot11s/peer-management-protocol-mac.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.h Thu Sep 24 10:57:41 2009 -0400
@@ -58,6 +58,9 @@
uint32_t GetLinkMetric (Mac48Address peerAddress);
///\}
private:
+ PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac &);
+ PeerManagementProtocolMac (const PeerManagementProtocolMac &);
+
friend class PeerManagementProtocol;
friend class PeerLink;
///\name Create peer link management frames:
--- a/src/devices/mesh/dot11s/peer-management-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-management-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -241,7 +241,7 @@
Ptr<PeerLink> peerLink = FindPeerLink (interface, peerAddress);
if (peerManagementElement.SubtypeIsOpen ())
{
- PmpReasonCode reasonCode;
+ PmpReasonCode reasonCode (REASON11S_RESERVED);
bool reject = !(ShouldAcceptOpen (interface, peerAddress, reasonCode));
if (peerLink == 0)
{
--- a/src/devices/mesh/dot11s/peer-management-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/peer-management-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -174,6 +174,9 @@
typedef std::map<uint32_t, Ptr<PeerManagementProtocolMac> > PeerManagementProtocolMacMap;
///\}
private:
+ PeerManagementProtocol& operator= (const PeerManagementProtocol &);
+ PeerManagementProtocol (const PeerManagementProtocol &);
+
/**
* \brief Fills information of received beacon. Needed to form own beacon timing element
*/
--- a/src/devices/mesh/dot11s/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/dot11s/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -32,5 +32,6 @@
'ie-dot11s-beacon-timing.h',
'ie-dot11s-configuration.h',
'ie-dot11s-peer-management.h',
+ 'ie-dot11s-id.h',
'peer-link.h',
]
--- a/src/devices/mesh/flame/flame-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/flame/flame-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -105,6 +105,9 @@
void Report (std::ostream &) const;
void ResetStats ();
private:
+ FlameProtocol& operator= (const FlameProtocol &);
+ FlameProtocol (const FlameProtocol &);
+
/// LLC protocol number reserved by flame
static const uint16_t FLAME_PROTOCOL = 0x4040;
/**
--- a/src/devices/mesh/flame/flame-rtable.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/mesh/flame/flame-rtable.h Thu Sep 24 10:57:41 2009 -0400
@@ -83,6 +83,9 @@
*/
LookupResult Lookup (Mac48Address destination);
private:
+ FlameRtable& operator= (const FlameRtable &);
+ FlameRtable (const FlameRtable &);
+
/// Routing table entry
struct Route
{
--- a/src/devices/point-to-point/point-to-point-channel.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/point-to-point/point-to-point-channel.cc Thu Sep 24 10:57:41 2009 -0400
@@ -91,6 +91,9 @@
Simulator::Schedule (txTime + m_delay, &PointToPointNetDevice::Receive,
m_link[wire].m_dst, p);
+
+ // Call the tx anim callback on the net device
+ src->m_txrxPointToPoint (p, src, m_link[wire].m_dst, txTime, txTime + m_delay);
return true;
}
--- a/src/devices/point-to-point/point-to-point-net-device.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/point-to-point/point-to-point-net-device.cc Thu Sep 24 10:57:41 2009 -0400
@@ -82,6 +82,9 @@
// Trace sources at the "top" of the net device, where packets transition
// to/from higher layers.
//
+ .AddTraceSource ("TxRxPointToPoint",
+ "Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.",
+ MakeTraceSourceAccessor (&PointToPointNetDevice::m_txrxPointToPoint))
.AddTraceSource ("MacTx",
"Trace source indicating a packet has arrived for transmission by this device",
MakeTraceSourceAccessor (&PointToPointNetDevice::m_macTxTrace))
--- a/src/devices/point-to-point/point-to-point-net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/point-to-point/point-to-point-net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -275,12 +275,14 @@
/**
* Calculate the value for the MTU that would result from
* setting the frame size to the given value.
+ * \param frameSize size of frame
*/
uint32_t MtuFromFrameSize (uint32_t frameSize);
/**
* Calculate the value for the frame size that would be required
* to be able to set the MTU to the given value.
+ * \param mtu MTU
*/
uint32_t FrameSizeFromMtu (uint32_t mtu);
@@ -293,12 +295,16 @@
/**
* Adds the necessary headers and trailers to a packet of data in order to
* respect the protocol implemented by the agent.
+ * \param p packet
+ * \param protocolNumber protocol number
*/
void AddHeader(Ptr<Packet> p, uint16_t protocolNumber);
/**
* Removes, from a packet of data, all headers and trailers that
* relate to the protocol implemented by the agent
+ * \param p Packet whose headers need to be processed
+ * \param param An integer parameter that can be set by the function
* \return Returns true if the packet should be forwarded up the
* protocol stack.
*/
@@ -381,6 +387,24 @@
Ptr<ErrorModel> m_receiveErrorModel;
/**
+ * The trace source for the packet transmission animation events that the
+ * device can fire.
+ * Arguments to the callback are the packet, transmitting
+ * net device, receiving net device, transmittion time and
+ * packet receipt time.
+ *
+ * @see class CallBackTraceSource
+ */
+ friend class PointToPointChannel; // Allow the channel to call the callback
+ TracedCallback<Ptr<const Packet>, // Packet being transmitted
+ Ptr<NetDevice>, // Transmitting NetDevice
+ Ptr<NetDevice>, // Receiving NetDevice
+ Time, // Amount of time to transmit the pkt
+ Time // Last bit receive time (relative to now)
+ > m_txrxPointToPoint;
+
+
+ /**
* The trace source fired when packets come into the "top" of the device
* at the L3/L2 transition, before being queued for transmission.
*
--- a/src/devices/tap-bridge/tap-bridge.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/tap-bridge/tap-bridge.h Thu Sep 24 10:57:41 2009 -0400
@@ -113,7 +113,8 @@
TapBridge ();
virtual ~TapBridge ();
- /** \brief Get the bridged net device.
+ /**
+ * \brief Get the bridged net device.
*
* The bridged net device is the ns-3 device to which this bridge is connected,
*
@@ -121,10 +122,13 @@
*/
Ptr<NetDevice> GetBridgedNetDevice (void);
- /** \brief Set the ns-3 net device to bridge.
+ /**
+ * \brief Set the ns-3 net device to bridge.
*
* This method tells the bridge which ns-3 net device it should use to connect
- * the simulation side of the bridge.
+ * the simulation side of the bridge.
+ *
+ * \param bridgedDevice device to set
*
* \attention The ns-3 net device that is being set as the device must have an
* an IP address assigned to it before the simulation is run. This address
--- a/src/devices/virtual-net-device/virtual-net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/virtual-net-device/virtual-net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -93,6 +93,7 @@
/**
* \brief Configure the reported MTU for the virtual device. The
* default value is 65535.
+ * \param mtu MTU value to set
* \return whether the MTU value was within legal bounds
*/
bool SetMtu (const uint16_t mtu);
--- a/src/devices/wifi/interference-helper.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/wifi/interference-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -460,7 +460,11 @@
i++;
continue;
}
- if (event->Overlaps ((*i)->GetStartTime ()))
+ if ((*i)->Overlaps (event->GetStartTime ()))
+ {
+ noiseInterference += (*i)->GetRxPowerW ();
+ }
+ else if (event->Overlaps ((*i)->GetStartTime ()))
{
ni->push_back (NiChange ((*i)->GetStartTime (), (*i)->GetRxPowerW ()));
}
@@ -468,10 +472,6 @@
{
ni->push_back (NiChange ((*i)->GetEndTime (), -(*i)->GetRxPowerW ()));
}
- if ((*i)->Overlaps (event->GetStartTime ()))
- {
- noiseInterference += (*i)->GetRxPowerW ();
- }
i++;
}
ni->push_back (NiChange (event->GetStartTime (), noiseInterference));
--- a/src/devices/wifi/minstrel-wifi-manager.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/devices/wifi/minstrel-wifi-manager.cc Thu Sep 24 10:57:41 2009 -0400
@@ -369,7 +369,6 @@
WifiMode
MinstrelWifiRemoteStation::DoGetDataMode (uint32_t size)
{
- UpdateStats ();
if (!m_initialized)
{
CheckInit ();
@@ -377,6 +376,7 @@
/// start the rate at half way
m_txrate = GetNSupportedModes () / 2;
}
+ UpdateStats ();
return GetSupportedMode (m_txrate);
}
@@ -435,7 +435,7 @@
{
/// now go through the table and find an index rate
- idx = GetNextSample ();
+ idx = GetNextSample();
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/flow-monitor-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,110 @@
+// -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+
+#include "flow-monitor-helper.h"
+
+#include "ns3/flow-monitor.h"
+#include "ns3/ipv4-flow-classifier.h"
+#include "ns3/ipv4-flow-probe.h"
+#include "ns3/ipv4-l3-protocol.h"
+#include "ns3/node.h"
+#include "ns3/node-list.h"
+
+
+namespace ns3 {
+
+FlowMonitorHelper::FlowMonitorHelper ()
+{
+ m_monitorFactory.SetTypeId ("ns3::FlowMonitor");
+}
+
+void
+FlowMonitorHelper::SetMonitorAttribute (std::string n1, const AttributeValue &v1)
+{
+ m_monitorFactory.Set (n1, v1);
+}
+
+
+Ptr<FlowMonitor>
+FlowMonitorHelper::GetMonitor ()
+{
+ if (!m_flowMonitor)
+ {
+ m_flowMonitor = m_monitorFactory.Create<FlowMonitor> ();
+ m_flowClassifier = Create<Ipv4FlowClassifier> ();
+ m_flowMonitor->SetFlowClassifier (m_flowClassifier);
+ }
+ return m_flowMonitor;
+}
+
+
+Ptr<FlowClassifier>
+FlowMonitorHelper::GetClassifier ()
+{
+ if (!m_flowClassifier)
+ {
+ m_flowClassifier = Create<Ipv4FlowClassifier> ();
+ }
+ return m_flowClassifier;
+}
+
+
+Ptr<FlowMonitor>
+FlowMonitorHelper::Install (Ptr<Node> node)
+{
+ Ptr<FlowMonitor> monitor = GetMonitor ();
+ Ptr<FlowClassifier> classifier = GetClassifier ();
+ Ptr<Ipv4FlowProbe> probe = Create<Ipv4FlowProbe> (monitor,
+ DynamicCast<Ipv4FlowClassifier> (classifier),
+ node);
+ return m_flowMonitor;
+}
+
+
+Ptr<FlowMonitor>
+FlowMonitorHelper::Install (NodeContainer nodes)
+{
+ for (NodeContainer::Iterator i = nodes.Begin (); i != nodes.End (); ++i)
+ {
+ Ptr<Node> node = *i;
+ if (node->GetObject<Ipv4L3Protocol> ())
+ {
+ Install (node);
+ }
+ }
+ return m_flowMonitor;
+}
+
+Ptr<FlowMonitor>
+FlowMonitorHelper::InstallAll ()
+{
+ for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
+ {
+ Ptr<Node> node = *i;
+ if (node->GetObject<Ipv4L3Protocol> ())
+ {
+ Install (node);
+ }
+ }
+ return m_flowMonitor;
+}
+
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/flow-monitor-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,66 @@
+// -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-
+//
+// Copyright (c) 2009 INESC Porto
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation;
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
+//
+#ifndef FLOW_MONITOR_HELPER_H
+#define FLOW_MONITOR_HELPER_H
+
+#include "node-container.h"
+#include "ns3/object-factory.h"
+#include "ns3/flow-monitor.h"
+#include "ns3/flow-classifier.h"
+#include <string>
+
+namespace ns3 {
+
+class AttributeValue;
+class Ipv4FlowClassifier;
+
+/// \brief Helper to enable IPv4 flow monitoring on a set of Nodes
+class FlowMonitorHelper
+{
+public:
+ FlowMonitorHelper ();
+
+
+ /// \brief Set an attribute for the to-be-created FlowMonitor object
+ void SetMonitorAttribute (std::string n1, const AttributeValue &v1);
+
+ /// \brief Enable flow monitoring on a set of nodes
+ Ptr<FlowMonitor> Install (NodeContainer nodes);
+ /// \brief Enable flow monitoring on a single node
+ Ptr<FlowMonitor> Install (Ptr<Node> node);
+ /// \brief Enable flow monitoring on all nodes
+ Ptr<FlowMonitor> InstallAll ();
+
+ /// \brief Retrieve the FlowMonitor object created by the Install* methods
+ Ptr<FlowMonitor> GetMonitor ();
+
+ /// \brief Retrieve the FlowClassifier object created by the Install* methods
+ Ptr<FlowClassifier> GetClassifier ();
+
+private:
+ ObjectFactory m_monitorFactory;
+ Ptr<FlowMonitor> m_flowMonitor;
+ Ptr<FlowClassifier> m_flowClassifier;
+};
+
+} // namespace ns3
+
+
+#endif /* FLOW_MONITOR_HELPER_H */
--- a/src/helper/internet-stack-helper.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/internet-stack-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -338,13 +338,13 @@
{
Ptr<Node> node = *i;
oss << "/NodeList/" << node->GetId () << "/$ns3::Ipv4L3Protocol/Drop";
- Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, writer));
+ Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEventIpv4, writer));
oss.str ("");
oss << "/NodeList/" << node->GetId () << "/$ns3::ArpL3Protocol/Drop";
- Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, writer));
+ Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEventArp, writer));
oss.str ("");
oss << "/NodeList/" << node->GetId () << "/$ns3::Ipv6L3Protocol/Drop";
- Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, writer));
+ Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEventIpv6, writer));
oss.str ("");
}
}
@@ -428,9 +428,29 @@
}
void
-InternetStackHelper::AsciiDropEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet)
+InternetStackHelper::AsciiDropEventArp (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet)
{
writer->WritePacket (AsciiWriter::DROP, path, packet);
}
+void
+InternetStackHelper::AsciiDropEventIpv4 (Ptr<AsciiWriter> writer, std::string path,
+ Ipv4Header const &header, Ptr<const Packet> packet,
+ Ipv4L3Protocol::DropReason reason, uint32_t interface)
+{
+ Ptr<Packet> p = packet->Copy ();
+ p->AddHeader (header);
+ writer->WritePacket (AsciiWriter::DROP, path, p);
+}
+
+void
+InternetStackHelper::AsciiDropEventIpv6 (Ptr<AsciiWriter> writer, std::string path,
+ Ipv6Header const &header, Ptr<const Packet> packet,
+ Ipv6L3Protocol::DropReason reason, uint32_t interface)
+{
+ Ptr<Packet> p = packet->Copy ();
+ p->AddHeader (header);
+ writer->WritePacket (AsciiWriter::DROP, path, p);
+}
+
} // namespace ns3
--- a/src/helper/internet-stack-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/internet-stack-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -28,6 +28,8 @@
#include "ns3/object-factory.h"
#include "ns3/pcap-writer.h"
#include "ns3/ascii-writer.h"
+#include "ns3/ipv4-l3-protocol.h"
+#include "ns3/ipv6-l3-protocol.h"
namespace ns3 {
@@ -198,7 +200,14 @@
uint32_t interfaceId;
Ptr<PcapWriter> writer;
};
- static void AsciiDropEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet);
+
+ static void AsciiDropEventIpv4 (Ptr<AsciiWriter> writer, std::string path,
+ Ipv4Header const &header, Ptr<const Packet> packet,
+ Ipv4L3Protocol::DropReason reason, uint32_t interface);
+ static void AsciiDropEventArp (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet);
+ static void AsciiDropEventIpv6 (Ptr<AsciiWriter> writer, std::string path,
+ Ipv6Header const &header, Ptr<const Packet> packet,
+ Ipv6L3Protocol::DropReason reason, uint32_t interface);
static std::string m_pcapBaseFilename;
static uint32_t GetNodeIndex (std::string context);
static std::vector<Trace> m_traces;
--- a/src/helper/ipv4-address-helper.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv4-address-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -46,6 +46,15 @@
m_max = 0xffffffff;
}
+Ipv4AddressHelper::Ipv4AddressHelper (
+ const Ipv4Address network,
+ const Ipv4Mask mask,
+ const Ipv4Address address)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ SetBase (network, mask, address);
+}
+
void
Ipv4AddressHelper::SetBase (
const Ipv4Address network,
--- a/src/helper/ipv4-address-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv4-address-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -52,6 +52,14 @@
Ipv4AddressHelper ();
/**
+ * @brief Construct a helper class to make life easier while doing simple IPv4
+ * address assignment in scripts. This version sets the base and mask
+ * in the constructor
+ */
+ Ipv4AddressHelper (Ipv4Address network, Ipv4Mask mask,
+ Ipv4Address base = "0.0.0.1");
+
+/**
* @brief Set the base network mumber, network mask and base address.
*
* The address helper allocates IP addresses based on a given network number
--- a/src/helper/ipv4-interface-container.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv4-interface-container.cc Thu Sep 24 10:57:41 2009 -0400
@@ -42,6 +42,10 @@
{
m_interfaces.push_back (std::make_pair (ipv4, interface));
}
+void Ipv4InterfaceContainer::Add (std::pair<Ptr<Ipv4>, uint32_t> a)
+ {
+ Add (a.first, a.second);
+ }
void
Ipv4InterfaceContainer::Add (std::string ipv4Name, uint32_t interface)
{
@@ -49,4 +53,11 @@
m_interfaces.push_back (std::make_pair (ipv4, interface));
}
+ std::pair<Ptr<Ipv4>, uint32_t>
+Ipv4InterfaceContainer::Get(uint32_t i) const
+ {
+ return m_interfaces[i];
+ }
+
+
} // namespace ns3
--- a/src/helper/ipv4-interface-container.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv4-interface-container.h Thu Sep 24 10:57:41 2009 -0400
@@ -22,6 +22,7 @@
/**
* Concatenate the entries in the other container with ours.
+ * \param other container
*/
void Add (Ipv4InterfaceContainer other);
@@ -31,6 +32,8 @@
uint32_t GetN (void) const;
/**
+ * \param i interface index
+ * \param j interface address index (if interface has multiple addresses)
* \returns the IPv4 address of the j'th address of the interface
* corresponding to index i.
*
@@ -46,8 +49,11 @@
* \param interface interface index of the Ipv4Interface to add to the container
*/
void Add (Ptr<Ipv4> ipv4, uint32_t interface);
+ void Add (std::pair<Ptr<Ipv4>, uint32_t>);
void Add (std::string ipv4Name, uint32_t interface);
+ std::pair<Ptr<Ipv4>, uint32_t> Get (uint32_t) const;
+
private:
typedef std::vector<std::pair<Ptr<Ipv4>,uint32_t> > InterfaceVector;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/ipv4-nix-vector-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#include "ipv4-nix-vector-helper.h"
+#include "ns3/ipv4-nix-vector-routing.h"
+
+namespace ns3 {
+
+Ipv4NixVectorHelper::Ipv4NixVectorHelper ()
+{
+ m_agentFactory.SetTypeId ("ns3::Ipv4NixVectorRouting");
+}
+
+Ptr<Ipv4RoutingProtocol>
+Ipv4NixVectorHelper::Create (Ptr<Node> node) const
+{
+ Ptr<Ipv4NixVectorRouting> agent = m_agentFactory.Create<Ipv4NixVectorRouting> ();
+ agent->SetNode(node);
+ node->AggregateObject (agent);
+ return agent;
+}
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/ipv4-nix-vector-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#ifndef IPV4_NIX_VECTOR_HELPER_H
+#define IPV4_NIX_VECTOR_HELPER_H
+
+#include "ns3/object-factory.h"
+#include "ns3/ipv4-routing-helper.h"
+
+namespace ns3 {
+
+/**
+ * \brief Helper class that adds Nix-vector routing to nodes.
+ *
+ * This class is expected to be used in conjunction with
+ * ns3::InternetStackHelper::SetRoutingHelper
+ *
+ */
+
+class Ipv4NixVectorHelper : public Ipv4RoutingHelper
+{
+public:
+ Ipv4NixVectorHelper ();
+
+ /**
+ * \param node the node on which the routing protocol will run
+ * \returns a newly-created routing protocol
+ *
+ * This method will be called by ns3::InternetStackHelper::Install
+ */
+ virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
+
+private:
+ ObjectFactory m_agentFactory;
+};
+} // namespace ns3
+
+#endif /* IPV4_NIX_VECTOR_HELPER_H */
--- a/src/helper/ipv4-static-routing-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv4-static-routing-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -67,6 +67,8 @@
*
* Functionally equivalent to:
* route add 224.0.0.0 netmask 240.0.0.0 dev nd
+ * \param n node
+ * \param nd device of the node to add default route
*/
void SetDefaultMulticastRoute (Ptr<Node> n, Ptr<NetDevice> nd);
void SetDefaultMulticastRoute (Ptr<Node> n, std::string ndName);
--- a/src/helper/ipv6-address-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-address-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,7 @@
#include <vector>
#include "ns3/ipv6-address.h"
+
#include "net-device-container.h"
#include "ipv6-interface-container.h"
--- a/src/helper/ipv6-interface-container.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-interface-container.h Thu Sep 24 10:57:41 2009 -0400
@@ -22,7 +22,9 @@
#define IPV6_INTERFACE_CONTAINER_H
#include <stdint.h>
+
#include <vector>
+
#include "ns3/ipv6.h"
#include "ns3/ipv6-address.h"
@@ -31,7 +33,7 @@
/**
* \class Ipv6InterfaceContainer
- * \brief keep track of a set of IPv6 interfaces.
+ * \brief Keep track of a set of IPv6 interfaces.
*/
class Ipv6InterfaceContainer
{
--- a/src/helper/ipv6-list-routing-helper.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-list-routing-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -17,10 +17,12 @@
*
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
-#include "ipv6-list-routing-helper.h"
+
#include "ns3/ipv6-list-routing.h"
#include "ns3/node.h"
+#include "ipv6-list-routing-helper.h"
+
namespace ns3 {
Ipv6ListRoutingHelper::Ipv6ListRoutingHelper ()
--- a/src/helper/ipv6-list-routing-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-list-routing-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -20,9 +20,11 @@
#ifndef IPV6_LIST_ROUTING_HELPER_H
#define IPV6_LIST_ROUTING_HELPER_H
+#include <stdint.h>
+
+#include <list>
+
#include "ipv6-routing-helper.h"
-#include <stdint.h>
-#include <list>
namespace ns3 {
--- a/src/helper/ipv6-routing-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-routing-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -17,6 +17,7 @@
*
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
+
#ifndef IPV6_ROUTING_HELPER_H
#define IPV6_ROUTING_HELPER_H
@@ -28,7 +29,7 @@
class Node;
/**
- * \brief a factory to create ns3::Ipv6RoutingProtocol objects
+ * \brief A factory to create ns3::Ipv6RoutingProtocol objects
*
* For each new routing protocol created as a subclass of
* ns3::Ipv6RoutingProtocol, you need to create a subclass of
--- a/src/helper/ipv6-static-routing-helper.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-static-routing-helper.cc Thu Sep 24 10:57:41 2009 -0400
@@ -17,6 +17,7 @@
*/
#include <vector>
+
#include "ns3/log.h"
#include "ns3/ptr.h"
#include "ns3/names.h"
@@ -27,6 +28,7 @@
#include "ns3/assert.h"
#include "ns3/ipv6-address.h"
#include "ns3/ipv6-routing-protocol.h"
+
#include "ipv6-static-routing-helper.h"
NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRoutingHelper");
--- a/src/helper/ipv6-static-routing-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ipv6-static-routing-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -25,9 +25,10 @@
#include "ns3/ipv6-address.h"
#include "ns3/node.h"
#include "ns3/net-device.h"
-#include "ipv6-routing-helper.h"
+
#include "node-container.h"
#include "net-device-container.h"
+#include "ipv6-routing-helper.h"
namespace ns3 {
@@ -40,6 +41,9 @@
class Ipv6StaticRoutingHelper : public Ipv6RoutingHelper
{
public:
+ /**
+ * \brief Constructor.
+ */
Ipv6StaticRoutingHelper ();
/**
@@ -50,6 +54,11 @@
*/
virtual Ptr<Ipv6RoutingProtocol> Create (Ptr<Node> node) const;
+ /**
+ * \brief Get Ipv6StaticRouting pointer from IPv6 stack.
+ * \param ipv6 Ipv6 pointer
+ * \return Ipv6StaticRouting pointer or 0 if not exist
+ */
Ptr<Ipv6StaticRouting> GetStaticRouting (Ptr<Ipv6> ipv6) const;
void AddMulticastRoute (Ptr<Node> n, Ipv6Address source, Ipv6Address group,
--- a/src/helper/mesh-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/mesh-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -106,7 +106,7 @@
* Set PHY standard
*/
void SetStandard (enum WifiPhyStandard standard);
- void SetMeshId (std::string s);
+ //void SetMeshId (std::string s); // XXX
/**
* \brief Spread/not spread frequency channels of MP interfaces.
*
--- a/src/helper/ping6-helper.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/ping6-helper.h Thu Sep 24 10:57:41 2009 -0400
@@ -22,10 +22,12 @@
#define PING6_HELPER_H
#include <stdint.h>
+
+#include "ns3/object-factory.h"
+#include "ns3/ipv6-address.h"
+
#include "application-container.h"
#include "node-container.h"
-#include "ns3/object-factory.h"
-#include "ns3/ipv6-address.h"
namespace ns3 {
--- a/src/helper/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/helper/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- helper = bld.create_ns3_module('helper', ['internet-stack', 'wifi', 'point-to-point', 'csma', 'olsr', 'global-routing', 'onoff', 'packet-sink', 'udp-echo'])
+ helper = bld.create_ns3_module('helper', ['internet-stack', 'wifi', 'point-to-point', 'csma', 'olsr', 'nix-vector-routing', 'global-routing', 'onoff', 'packet-sink', 'udp-echo'])
helper.source = [
'node-container.cc',
'net-device-container.cc',
@@ -25,6 +25,7 @@
'v4ping-helper.cc',
'nqos-wifi-mac-helper.cc',
'qos-wifi-mac-helper.cc',
+ 'ipv4-nix-vector-helper.cc',
'ipv4-global-routing-helper.cc',
'ipv4-list-routing-helper.cc',
'ipv4-routing-helper.cc',
@@ -38,6 +39,7 @@
'ipv6-list-routing-helper.cc',
'ipv6-routing-helper.cc',
'ping6-helper.cc',
+ 'flow-monitor-helper.cc',
]
headers = bld.new_task_gen('ns3header')
@@ -65,6 +67,7 @@
'v4ping-helper.h',
'nqos-wifi-mac-helper.h',
'qos-wifi-mac-helper.h',
+ 'ipv4-nix-vector-helper.h',
'ipv4-global-routing-helper.h',
'ipv4-list-routing-helper.h',
'ipv4-routing-helper.h',
@@ -79,6 +82,7 @@
'ipv6-list-routing-helper.h',
'ipv6-routing-helper.h',
'ping6-helper.h',
+ 'flow-monitor-helper.h',
]
env = bld.env_of_name('default')
--- a/src/internet-stack/icmpv6-header.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/icmpv6-header.cc Thu Sep 24 10:57:41 2009 -0400
@@ -22,8 +22,9 @@
#include "ns3/assert.h"
#include "ns3/address-utils.h"
+#include "ns3/log.h"
+
#include "icmpv6-header.h"
-#include "ns3/log.h"
namespace ns3
{
@@ -666,7 +667,7 @@
m_reserved = reserved;
}
-void Icmpv6RS::Print (std::ostream& os)
+void Icmpv6RS::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (RS) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")";
}
@@ -771,7 +772,7 @@
m_destination = destination;
}
-void Icmpv6Redirection::Print (std::ostream& os)
+void Icmpv6Redirection::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (Redirection) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " target = " << m_target << " destination = " << m_destination << ")";
}
@@ -970,7 +971,7 @@
m_packet = p;
}
-void Icmpv6DestinationUnreachable::Print (std::ostream& os)
+void Icmpv6DestinationUnreachable::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")";
}
@@ -1065,7 +1066,7 @@
m_mtu = mtu;
}
-void Icmpv6TooBig::Print (std::ostream& os)
+void Icmpv6TooBig::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (Too Big) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " mtu = " << (uint32_t)GetMtu () << ")";
}
@@ -1149,7 +1150,7 @@
m_packet = p;
}
-void Icmpv6TimeExceeded::Print (std::ostream& os)
+void Icmpv6TimeExceeded::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")";
}
@@ -1244,7 +1245,7 @@
m_ptr = ptr;
}
-void Icmpv6ParameterError::Print (std::ostream& os)
+void Icmpv6ParameterError::Print (std::ostream& os) const
{
os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " ptr = " << (uint32_t)GetPtr () << ")";
}
--- a/src/internet-stack/icmpv6-header.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/icmpv6-header.h Thu Sep 24 10:57:41 2009 -0400
@@ -384,8 +384,8 @@
void SetIpv6Target (Ipv6Address target);
/**
- * \brief Get the IPv6 target field.
- * \return IPv6 address
+ * \brief Print informations.
+ * \param os output stream
*/
virtual void Print (std::ostream& os) const;
@@ -799,7 +799,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
@@ -884,7 +884,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
@@ -1075,7 +1075,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
@@ -1160,7 +1160,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
@@ -1239,7 +1239,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
@@ -1325,7 +1325,7 @@
* \brief Print informations.
* \param os output stream
*/
- virtual void Print (std::ostream& os);
+ virtual void Print (std::ostream& os) const;
/**
* \brief Get the serialized size.
--- a/src/internet-stack/icmpv6-l4-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/icmpv6-l4-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -24,16 +24,15 @@
#include "ns3/assert.h"
#include "ns3/packet.h"
#include "ns3/node.h"
+#include "ns3/boolean.h"
#include "ns3/ipv6-routing-protocol.h"
#include "ns3/ipv6-route.h"
#include "ipv6-raw-socket-factory-impl.h"
+#include "ipv6-l3-protocol.h"
+#include "ipv6-interface.h"
#include "icmpv6-l4-protocol.h"
-#include "icmpv6-header.h"
-#include "ipv6-l3-protocol.h"
-#include "ipv6-end-point.h"
-
-#include "ns3/ipv6-static-routing-helper.h"
+#include "ndisc-cache.h"
namespace ns3
{
--- a/src/internet-stack/icmpv6-l4-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/icmpv6-l4-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -24,15 +24,10 @@
#define ICMPV6_L4_PROTOCOL_H
#include <list>
+
#include "ns3/ipv6-address.h"
-#include "ns3/ptr.h"
-#include "ns3/socket.h"
-#include "ns3/buffer.h"
-#include "ns3/boolean.h"
#include "icmpv6-header.h"
#include "ipv6-l4-protocol.h"
-#include "ndisc-cache.h"
-#include "ipv6-l3-protocol.h"
namespace ns3
{
@@ -41,6 +36,7 @@
class Node;
class Packet;
class TraceContext;
+class NdiscCache;
/**
* \class Icmpv6L4Protocol
--- a/src/internet-stack/ipv4-l3-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv4-l3-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -69,6 +69,14 @@
ObjectVectorValue (),
MakeObjectVectorAccessor (&Ipv4L3Protocol::m_interfaces),
MakeObjectVectorChecker<Ipv4Interface> ())
+
+ .AddTraceSource ("SendOutgoing", "A newly-generated by this node ipv4 packet is about to be queued for transmission",
+ MakeTraceSourceAccessor (&Ipv4L3Protocol::m_sendOutgoingTrace))
+ .AddTraceSource ("UnicastForward", "A unicast ipv4 packet was received by this node and is being forwarded to another node",
+ MakeTraceSourceAccessor (&Ipv4L3Protocol::m_unicastForwardTrace))
+ .AddTraceSource ("LocalDeliver", "An ipv4 packet was received by/for this node, and it is being forward up the stack",
+ MakeTraceSourceAccessor (&Ipv4L3Protocol::m_localDeliverTrace))
+
;
return tid;
}
@@ -369,7 +377,7 @@
Ptr<Ipv4Interface> ipv4Interface;
for (Ipv4InterfaceList::const_iterator i = m_interfaces.begin ();
i != m_interfaces.end ();
- i++)
+ i++, interface++)
{
ipv4Interface = *i;
if (ipv4Interface->GetDevice () == device)
@@ -382,11 +390,12 @@
else
{
NS_LOG_LOGIC ("Dropping received packet-- interface is down");
- m_dropTrace (packet);
+ Ipv4Header ipHeader;
+ packet->RemoveHeader (ipHeader);
+ m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface);
return;
}
}
- interface++;
}
Ipv4Header ipHeader;
@@ -398,7 +407,7 @@
if (!ipHeader.IsChecksumOk ())
{
- m_dropTrace (packet);
+ m_dropTrace (ipHeader, packet, DROP_BAD_CHECKSUM, interface);
return;
}
@@ -477,6 +486,8 @@
Ptr<Packet> packetCopy = packet->Copy ();
NS_ASSERT (packetCopy->GetSize () <= outInterface->GetDevice()->GetMtu ());
+
+ m_sendOutgoingTrace (ipHeader, packetCopy, ifaceIndex);
packetCopy->AddHeader (ipHeader);
m_txTrace (packetCopy, ifaceIndex);
outInterface->Send (packetCopy, destination);
@@ -501,6 +512,7 @@
ttl = 1;
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
Ptr<Packet> packetCopy = packet->Copy ();
+ m_sendOutgoingTrace (ipHeader, packetCopy, ifaceIndex);
packetCopy->AddHeader (ipHeader);
m_txTrace (packetCopy, ifaceIndex);
outInterface->Send (packetCopy, destination);
@@ -515,6 +527,8 @@
{
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 3: passed in with route");
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
+ int32_t interface = GetInterfaceForDevice (route->GetOutputDevice ());
+ m_sendOutgoingTrace (ipHeader, packet, interface);
SendRealOut (route, packet, ipHeader);
return;
}
@@ -535,12 +549,14 @@
Ptr<Ipv4Route> newRoute = m_routingProtocol->RouteOutput (packet, ipHeader, oif, errno_);
if (newRoute)
{
+ int32_t interface = GetInterfaceForDevice (newRoute->GetOutputDevice ());
+ m_sendOutgoingTrace (ipHeader, packet, interface);
SendRealOut (newRoute, packet, ipHeader);
}
else
{
NS_LOG_WARN ("No route to host. Drop.");
- m_dropTrace (packet);
+ m_dropTrace (ipHeader, packet, DROP_NO_ROUTE, 0);
}
}
@@ -590,16 +606,13 @@
{
NS_LOG_FUNCTION (this << packet << &ipHeader);
- // We add a header regardless of whether there is a route, since
- // we may want to drop trace
- packet->AddHeader (ipHeader);
if (route == 0)
{
NS_LOG_WARN ("No route to host. Drop.");
- m_dropTrace (packet);
+ m_dropTrace (ipHeader, packet, DROP_NO_ROUTE, 0);
return;
}
-
+ packet->AddHeader (ipHeader);
Ptr<NetDevice> outDev = route->GetOutputDevice ();
int32_t interface = GetInterfaceForDevice (outDev);
NS_ASSERT (interface >= 0);
@@ -618,7 +631,9 @@
else
{
NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << route->GetGateway ());
- m_dropTrace (packet);
+ Ipv4Header ipHeader;
+ packet->RemoveHeader (ipHeader);
+ m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface);
}
}
else
@@ -632,7 +647,9 @@
else
{
NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << ipHeader.GetDestination ());
- m_dropTrace (packet);
+ Ipv4Header ipHeader;
+ packet->RemoveHeader (ipHeader);
+ m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface);
}
}
}
@@ -655,7 +672,7 @@
if (h.GetTtl () == 0)
{
NS_LOG_WARN ("TTL exceeded. Drop.");
- m_dropTrace (packet);
+ m_dropTrace (header, packet, DROP_TTL_EXPIRED, i);
return;
}
NS_LOG_LOGIC ("Forward multicast via interface " << i);
@@ -679,6 +696,7 @@
// Forwarding
Ipv4Header ipHeader = header;
Ptr<Packet> packet = p->Copy ();
+ int32_t interface = GetInterfaceForDevice (rtentry->GetOutputDevice ());
ipHeader.SetTtl (ipHeader.GetTtl () - 1);
if (ipHeader.GetTtl () == 0)
{
@@ -691,9 +709,10 @@
icmp->SendTimeExceededTtl (ipHeader, packet);
}
NS_LOG_WARN ("TTL exceeded. Drop.");
- m_dropTrace (packet);
+ m_dropTrace (header, packet, DROP_TTL_EXPIRED, interface);
return;
}
+ m_unicastForwardTrace (ipHeader, packet, interface);
SendRealOut (rtentry, packet, ipHeader);
}
@@ -703,6 +722,8 @@
NS_LOG_FUNCTION (this << packet << &ip);
Ptr<Packet> p = packet->Copy (); // need to pass a non-const packet up
+ m_localDeliverTrace (ip, packet, iif);
+
Ptr<Ipv4L4Protocol> protocol = GetProtocol (ip.GetProtocol ());
if (protocol != 0)
{
@@ -891,7 +912,7 @@
{
NS_LOG_FUNCTION (this << p << ipHeader << sockErrno);
NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno);
- m_dropTrace (p);
+ m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, 0);
}
--- a/src/internet-stack/ipv4-l3-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv4-l3-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -63,6 +63,19 @@
Ipv4L3Protocol();
virtual ~Ipv4L3Protocol ();
+ /**
+ * \enum DropReason
+ * \brief Reason why a packet has been dropped.
+ */
+ enum DropReason
+ {
+ DROP_TTL_EXPIRED = 1, /**< Packet TTL has expired */
+ DROP_NO_ROUTE, /**< No route to host */
+ DROP_BAD_CHECKSUM, /**< Bad checksum */
+ DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */
+ DROP_ROUTE_ERROR, /**< Route error */
+ };
+
void SetNode (Ptr<Node> node);
// functions defined in base class Ipv4
@@ -116,6 +129,12 @@
* packet is coming to:
* - implement a per-NetDevice ARP cache
* - send back arp replies on the right device
+ * \param device network device
+ * \param p the packet
+ * \param protocol protocol value
+ * \param from address of the correspondant
+ * \param to address of the destination
+ * \param packetType type of the packet
*/
void Receive( Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t protocol, const Address &from,
const Address &to, NetDevice::PacketType packetType);
@@ -215,9 +234,15 @@
uint8_t m_defaultTtl;
uint16_t m_identification;
Ptr<Node> m_node;
+
+ TracedCallback<const Ipv4Header &, Ptr<const Packet>, uint32_t> m_sendOutgoingTrace;
+ TracedCallback<const Ipv4Header &, Ptr<const Packet>, uint32_t> m_unicastForwardTrace;
+ TracedCallback<const Ipv4Header &, Ptr<const Packet>, uint32_t> m_localDeliverTrace;
+
TracedCallback<Ptr<const Packet>, uint32_t> m_txTrace;
TracedCallback<Ptr<const Packet>, uint32_t> m_rxTrace;
- TracedCallback<Ptr<const Packet> > m_dropTrace;
+ // <ip-header, payload, reason, ifindex> (ifindex not valid if reason is DROP_NO_ROUTE)
+ TracedCallback<const Ipv4Header &, Ptr<const Packet>, DropReason, uint32_t> m_dropTrace;
Ptr<Ipv4RoutingProtocol> m_routingProtocol;
--- a/src/internet-stack/ipv4-raw-socket-factory-impl.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv4-raw-socket-factory-impl.cc Thu Sep 24 10:57:41 2009 -0400
@@ -1,3 +1,23 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
#include "ipv4-raw-socket-factory-impl.h"
#include "ipv4-l3-protocol.h"
#include "ns3/socket.h"
--- a/src/internet-stack/ipv4-raw-socket-factory-impl.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv4-raw-socket-factory-impl.h Thu Sep 24 10:57:41 2009 -0400
@@ -1,3 +1,23 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
#ifndef IPV4_RAW_SOCKET_FACTORY_IMPL_H
#define IPV4_RAW_SOCKET_FACTORY_IMPL_H
--- a/src/internet-stack/ipv6-autoconfigured-prefix.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-autoconfigured-prefix.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,11 +18,10 @@
* Author: Mehdi Benamor <benamor.mehdi@ensi.rnu.tn>
*/
-#include <stdlib.h>
#include "ns3/log.h"
-#include "ns3/packet.h"
#include "ns3/node.h"
+#include "ipv6-l3-protocol.h"
#include "ipv6-autoconfigured-prefix.h"
NS_LOG_COMPONENT_DEFINE ("Ipv6AutoconfiguredPrefix");
--- a/src/internet-stack/ipv6-autoconfigured-prefix.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-autoconfigured-prefix.h Thu Sep 24 10:57:41 2009 -0400
@@ -21,14 +21,14 @@
#ifndef IPV6_AUTOCONFIGURED_PREFIX_H
#define IPV6_AUTOCONFIGURED_PREFIX_H
+#include <stdint.h>
+
#include <list>
#include <vector>
#include <ostream>
#include "ns3/timer.h"
#include "ns3/ipv6-address.h"
-#include "ipv6-l3-protocol.h"
-#include "ipv6-interface.h"
namespace ns3
{
@@ -100,13 +100,13 @@
uint32_t GetValidLifeTime (void) const;
/**
- * \brief Set the prefix valid life time
+ * \brief Set the prefix valid life time.
* \param v the prefix valid life time
*/
void SetValidLifeTime (uint32_t v);
/**
- * \brief Test if the prefix is preferred
+ * \brief Test if the prefix is preferred.
* \return true if prefix is in preferred state, false otherwise
*/
bool IsPreferred () const;
@@ -118,74 +118,74 @@
bool IsValid () const;
/**
- * \brief Set the prefix as preferred
+ * \brief Set the prefix as preferred.
*/
void SetPreferred ();
/**
- * \brief Set the prefix as valid
+ * \brief Set the prefix as valid.
*/
void SetValid ();
/**
- * \brief Start the preferred timer
+ * \brief Start the preferred timer.
*/
void StartPreferredTimer ();
/**
- * \brief Start the valid timer
+ * \brief Start the valid timer.
*/
void StartValidTimer ();
/**
- * \brief Stop the preferred timer
+ * \brief Stop the preferred timer.
*/
void StopPreferredTimer ();
/**
- * \brief Stop the valid timer
+ * \brief Stop the valid timer.
*/
void StopValidTimer ();
/**
- * \brief Set the prefix as preferred
+ * \brief Set the prefix as preferred.
*/
void MarkPreferredTime ();
/**
- * \brief Set the prefix as valid
+ * \brief Set the prefix as valid.
*/
void MarkValidTime ();
/**
- * \brief Signal that the preferred time expired and start the valid timer
+ * \brief Signal that the preferred time expired and start the valid timer.
*/
void FunctionPreferredTimeout ();
/**
- * \brief Signal that the valid time expired
+ * \brief Signal that the valid time expired.
*/
void FunctionValidTimeout ();
/**
- * \brief Remove this prefix from the prefix list
+ * \brief Remove this prefix from the prefix list.
*/
void RemoveMe ();
/**
- * \brief Get the prefix identificator
+ * \brief Get the prefix identifier.
* \return id of the prefix.
*/
uint32_t GetId () const;
/**
- * \brief Get the prefix address
+ * \brief Get the prefix address.
* \return prefix address
*/
Ipv6Address GetPrefix () const;
/**
- * \brief Set the prefix address
+ * \brief Set the prefix address.
* \param prefix prefix address to set
*/
void SetPrefix (Ipv6Address prefix);
@@ -229,7 +229,8 @@
Ipv6Prefix m_mask;
/**
- * \brief Default gateway router
+ * \brief Default gateway router.
+ *
* If the RA received also configured the default gateway,
* this variable has the link-local address. Otherwise this
* is "::"
--- a/src/internet-stack/ipv6-end-point-demux.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-end-point-demux.h Thu Sep 24 10:57:41 2009 -0400
@@ -95,7 +95,8 @@
/**
* \brief Allocate a Ipv6EndPoint.
- * \return an empty Ipv6EndPoint instance
+ * \param address IPv6 address
+ * \return an Ipv6EndPoint instance
*/
Ipv6EndPoint *Allocate (Ipv6Address address);
--- a/src/internet-stack/ipv6-end-point.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-end-point.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,11 +18,12 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
-#include "ipv6-end-point.h"
#include "ns3/packet.h"
#include "ns3/log.h"
#include "ns3/simulator.h"
+#include "ipv6-end-point.h"
+
namespace ns3
{
--- a/src/internet-stack/ipv6-end-point.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-end-point.h Thu Sep 24 10:57:41 2009 -0400
@@ -22,6 +22,7 @@
#define IPV6_END_POINT_H
#include <stdint.h>
+
#include "ns3/ipv6-address.h"
#include "ns3/callback.h"
--- a/src/internet-stack/ipv6-interface.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-interface.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,14 +18,16 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
+#include "ns3/log.h"
+#include "ns3/node.h"
+#include "ns3/packet.h"
+
#include "ipv6-interface.h"
#include "ns3/net-device.h"
#include "loopback-net-device.h"
-#include "ns3/log.h"
-#include "ns3/node.h"
-#include <ns3/packet.h>
-
+#include "ipv6-l3-protocol.h"
#include "icmpv6-l4-protocol.h"
+#include "ndisc-cache.h"
namespace ns3
{
--- a/src/internet-stack/ipv6-interface.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-interface.h Thu Sep 24 10:57:41 2009 -0400
@@ -29,14 +29,13 @@
#include "ns3/object.h"
#include "ns3/timer.h"
-#include "ndisc-cache.h"
-
namespace ns3
{
class NetDevice;
class Packet;
class Node;
+class NdiscCache;
/**
* \class Ipv6Interface
--- a/src/internet-stack/ipv6-l3-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-l3-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -35,6 +35,7 @@
#include "ipv6-raw-socket-impl.h"
#include "ipv6-autoconfigured-prefix.h"
#include "icmpv6-l4-protocol.h"
+#include "ndisc-cache.h"
namespace ns3
{
@@ -646,7 +647,7 @@
else
{
NS_LOG_WARN ("No route to host, drop!");
- m_dropTrace (packet);
+ m_dropTrace (hdr, packet, DROP_NO_ROUTE, oif);
}
}
@@ -672,7 +673,9 @@
else
{
NS_LOG_LOGIC ("Dropping received packet-- interface is down");
- m_dropTrace (packet);
+ Ipv6Header hdr;
+ packet->RemoveHeader (hdr);
+ m_dropTrace (hdr, packet, DROP_INTERFACE_DOWN, interface);
return;
}
}
@@ -701,8 +704,6 @@
{
NS_LOG_FUNCTION (this << route << packet << ipHeader);
- packet->AddHeader (ipHeader);
-
if (!route)
{
NS_LOG_LOGIC ("No route to host, drop!.");
@@ -716,20 +717,20 @@
Ptr<Ipv6Interface> outInterface = GetInterface (interface);
NS_LOG_LOGIC ("Send via NetDevice ifIndex " << dev->GetIfIndex () << " Ipv6InterfaceIndex " << interface);
- NS_ASSERT (packet->GetSize () <= outInterface->GetDevice ()->GetMtu ());
-
if (!route->GetGateway ().IsEqual (Ipv6Address::GetAny ()))
{
if (outInterface->IsUp ())
{
NS_LOG_LOGIC ("Send to gateway " << route->GetGateway ());
+ packet->AddHeader (ipHeader);
+ NS_ASSERT (packet->GetSize () <= outInterface->GetDevice ()->GetMtu ());
m_txTrace (packet, interface);
outInterface->Send (packet, route->GetGateway ());
}
else
{
NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << route->GetGateway ());
- m_dropTrace (packet);
+ m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface);
}
}
else
@@ -737,13 +738,15 @@
if (outInterface->IsUp ())
{
NS_LOG_LOGIC ("Send to destination " << ipHeader.GetDestinationAddress ());
+ packet->AddHeader (ipHeader);
+ NS_ASSERT (packet->GetSize () <= outInterface->GetDevice ()->GetMtu ());
m_txTrace (packet, interface);
outInterface->Send (packet, ipHeader.GetDestinationAddress ());
}
else
{
NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << ipHeader.GetDestinationAddress ());
- m_dropTrace (packet);
+ m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface);
}
}
}
@@ -766,6 +769,8 @@
if (ipHeader.GetHopLimit () == 0)
{
+ NS_LOG_WARN ("TTL exceeded. Drop.");
+ m_dropTrace (ipHeader, packet, DROP_TTL_EXPIRED, 0);
// Do not reply to ICMPv6 or to multicast IPv6 address
if (ipHeader.GetNextHeader () != Icmpv6L4Protocol::PROT_NUMBER &&
ipHeader.GetDestinationAddress ().IsMulticast () == false)
@@ -773,8 +778,6 @@
packet->AddHeader (ipHeader);
GetIcmpv6 ()->SendErrorTimeExceeded (packet, ipHeader.GetSourceAddress (), Icmpv6Header::ICMPV6_HOPLIMIT);
}
- NS_LOG_WARN ("TTL exceeded. Drop.");
- m_dropTrace (packet);
return;
}
@@ -832,7 +835,7 @@
if (h.GetHopLimit () == 0)
{
NS_LOG_WARN ("TTL exceeded. Drop.");
- m_dropTrace (packet);
+ m_dropTrace (header, packet, DROP_TTL_EXPIRED, i);
return;
}
@@ -882,7 +885,7 @@
{
NS_LOG_FUNCTION (this << p << ipHeader << sockErrno);
NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno);
- m_dropTrace (p);
+ m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, 0);
}
Ipv6Header Ipv6L3Protocol::BuildHeader (Ipv6Address src, Ipv6Address dst, uint8_t protocol, uint16_t payloadSize, uint8_t ttl)
--- a/src/internet-stack/ipv6-l3-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-l3-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -24,7 +24,6 @@
#include <list>
#include "ns3/traced-callback.h"
-
#include "ns3/net-device.h"
#include "ns3/ipv6.h"
#include "ns3/ipv6-address.h"
@@ -59,6 +58,18 @@
* \brief The protocol number for IPv6 (0x86DD).
*/
static const uint16_t PROT_NUMBER;
+
+ /**
+ * \enum DropReason
+ * \brief Reason why a packet has been dropped.
+ */
+ enum DropReason
+ {
+ DROP_TTL_EXPIRED = 1, /**< Packet TTL has expired */
+ DROP_NO_ROUTE, /**< No route to host */
+ DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */
+ DROP_ROUTE_ERROR, /**< Route error */
+ };
/**
* \brief Constructor.
@@ -208,6 +219,7 @@
/**
* \brief Get number of address for an interface.
+ * \param interface interface index
* \return number of address
*/
uint32_t GetNAddresses (uint32_t interface) const;
@@ -344,7 +356,7 @@
/**
* \brief Callback to trace drop packets.
*/
- TracedCallback<Ptr<const Packet> > m_dropTrace;
+ TracedCallback<const Ipv6Header &, Ptr<const Packet>, DropReason, uint32_t> m_dropTrace;
/**
* \brief Copy constructor.
--- a/src/internet-stack/ipv6-l4-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-l4-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,8 +18,9 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
+#include "ns3/uinteger.h"
+
#include "ipv6-l4-protocol.h"
-#include "ns3/uinteger.h"
namespace ns3
{
--- a/src/internet-stack/ipv6-l4-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-l4-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -22,14 +22,14 @@
#define IPV6_L4_PROTOCOL_H
#include "ns3/object.h"
-#include "ipv6-interface.h"
+#include "ns3/ipv6-header.h"
namespace ns3
{
class Packet;
class Ipv6Address;
-class TraceContext;
+class Ipv6Interface;
/**
* \class Ipv6L4Protocol
@@ -44,14 +44,14 @@
*/
enum RxStatus_e
{
- RX_OK,
- RX_CSUM_FAILED,
- RX_ENDPOINT_UNREACH
+ RX_OK, /**< Receive OK */
+ RX_CSUM_FAILED, /**< Checksum of layer 4 protocol failed */
+ RX_ENDPOINT_UNREACH /**< Destination unreachable */
};
/**
- * \brief Get the type identificator.
- * \return type identificator
+ * \brief Get the type identifier.
+ * \return type identifier
*/
static TypeId GetTypeId (void);
@@ -77,9 +77,12 @@
* \param incomingInterface the Ipv6Interface on which the packet arrived
* \return status (OK, destination unreachable or checksum failed)
*/
- virtual enum RxStatus_e Receive (Ptr<Packet> p, Ipv6Address const &src, Ipv6Address const &dst, Ptr<Ipv6Interface> incomingInterface) = 0;
+ virtual enum RxStatus_e Receive (Ptr<Packet> p, Ipv6Address const &src,
+ Ipv6Address const &dst,
+ Ptr<Ipv6Interface> incomingInterface) = 0;
/**
+ * \brief ICMPv6 receive method.
* \param icmpSource the source address of the ICMPv6 message
* \param icmpTtl the ttl of the ICMPv6 message
* \param icmpType the 'type' field of the ICMPv6 message
@@ -94,9 +97,9 @@
* which triggered the ICMPv6 message.
*/
virtual void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl,
- uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
- Ipv6Address payloadSource, Ipv6Address payloadDestination,
- const uint8_t* payload);
+ uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
+ Ipv6Address payloadSource, Ipv6Address payloadDestination,
+ const uint8_t* payload);
};
--- a/src/internet-stack/ipv6-raw-socket-factory-impl.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-raw-socket-factory-impl.cc Thu Sep 24 10:57:41 2009 -0400
@@ -1,6 +1,27 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
+#include "ns3/socket.h"
+
#include "ipv6-raw-socket-factory-impl.h"
#include "ipv6-l3-protocol.h"
-#include "ns3/socket.h"
namespace ns3
{
--- a/src/internet-stack/ipv6-raw-socket-factory-impl.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-raw-socket-factory-impl.h Thu Sep 24 10:57:41 2009 -0400
@@ -1,3 +1,23 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
#ifndef IPV6_RAW_SOCKET_FACTORY_IMPL_H
#define IPV6_RAW_SOCKET_FACTORY_IMPL_H
--- a/src/internet-stack/ipv6-raw-socket-impl.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-raw-socket-impl.cc Thu Sep 24 10:57:41 2009 -0400
@@ -27,10 +27,9 @@
#include "ns3/ipv6-routing-protocol.h"
#include "ipv6-l3-protocol.h"
-
+#include "ipv6-raw-socket-impl.h"
#include "icmpv6-header.h"
#include "icmpv6-l4-protocol.h"
-#include "ipv6-raw-socket-impl.h"
namespace ns3
{
--- a/src/internet-stack/ipv6-test.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ipv6-test.cc Thu Sep 24 10:57:41 2009 -0400
@@ -23,12 +23,14 @@
#include "ns3/simulator.h"
#include "ns3/test.h"
#include "ns3/log.h"
+#include "ns3/boolean.h"
#include "ns3/inet6-socket-address.h"
#include "ns3/node.h"
#include "ns3/csma-net-device.h"
+#include "ipv6-interface.h"
+#include "ipv6-l3-protocol.h"
#include "icmpv6-l4-protocol.h"
-#include "ipv6-interface.h"
namespace ns3
{
--- a/src/internet-stack/ndisc-cache.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ndisc-cache.cc Thu Sep 24 10:57:41 2009 -0400
@@ -25,6 +25,7 @@
#include "ipv6-l3-protocol.h"
#include "icmpv6-l4-protocol.h"
#include "ndisc-cache.h"
+#include "ipv6-interface.h"
namespace ns3
{
--- a/src/internet-stack/ndisc-cache.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/ndisc-cache.h Thu Sep 24 10:57:41 2009 -0400
@@ -33,8 +33,6 @@
#include "ns3/timer.h"
#include "ns3/sgi-hashmap.h"
-#include "ipv6-interface.h"
-
namespace ns3
{
@@ -418,6 +416,18 @@
typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>::iterator CacheI;
/**
+ * \brief Copy constructor.
+ * \param a cache to copy
+ */
+ NdiscCache (NdiscCache const &a);
+
+ /**
+ * \brief Equal operator.
+ * \param a cache to copy
+ */
+ NdiscCache& operator= (NdiscCache const &a);
+
+ /**
* \brief Dispose this object.
*/
void DoDispose ();
@@ -433,7 +443,7 @@
Ptr<Ipv6Interface> m_interface;
/**
- * A list of Entry.
+ * \brief A list of Entry.
*/
Cache m_ndCache;
--- a/src/internet-stack/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/internet-stack/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -8,7 +8,7 @@
import Task
# Required NSC version
-NSC_RELEASE_NAME = "nsc-0.5.0"
+NSC_RELEASE_NAME = "nsc-0.5.1"
def set_options(opt):
@@ -122,12 +122,16 @@
'icmpv4.h',
'icmpv6-header.h',
'ipv4-l3-protocol.h',
+ 'ipv6-l3-protocol.h',
'arp-l3-protocol.h',
'udp-l4-protocol.h',
'tcp-l4-protocol.h',
'icmpv4-l4-protocol.h',
'ipv4-l4-protocol.h',
'arp-cache.h',
+ 'icmpv6-l4-protocol.h',
+ 'ipv6-l4-protocol.h',
+ 'ndisc-cache.h',
]
if bld.env['NSC_ENABLED']:
--- a/src/mobility/hierarchical-mobility-model.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/mobility/hierarchical-mobility-model.h Thu Sep 24 10:57:41 2009 -0400
@@ -80,6 +80,7 @@
* already existed a child model, then the child mobility model
* current position is also modified to ensure that the composite
* position is preserved.
+ * \param model new mobility model child
*/
void SetChild (Ptr<MobilityModel> model);
/**
@@ -87,6 +88,7 @@
* already existed a child model, then the child mobility model
* current position is also modified to ensure that the composite
* position is preserved.
+ * \param model new mobility model parent
*/
void SetParent (Ptr<MobilityModel> model);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/node/channel-list.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,182 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "ns3/simulator.h"
+#include "ns3/object-vector.h"
+#include "ns3/config.h"
+#include "ns3/log.h"
+#include "ns3/assert.h"
+#include "channel-list.h"
+#include "channel.h"
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("ChannelList");
+
+/**
+ * \brief private implementation detail of the ChannelList API.
+ */
+class ChannelListPriv : public Object
+{
+public:
+ static TypeId GetTypeId (void);
+ ChannelListPriv ();
+ ~ChannelListPriv ();
+
+ uint32_t Add (Ptr<Channel> channel);
+
+ ChannelList::Iterator Begin (void) const;
+ ChannelList::Iterator End (void) const;
+
+ Ptr<Channel> GetChannel (uint32_t n);
+ uint32_t GetNChannels (void);
+
+ static Ptr<ChannelListPriv> Get (void);
+
+private:
+ static Ptr<ChannelListPriv> *DoGet (void);
+ static void Delete (void);
+ std::vector<Ptr<Channel> > m_channels;
+};
+
+NS_OBJECT_ENSURE_REGISTERED (ChannelListPriv);
+
+TypeId
+ChannelListPriv::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::ChannelListPriv")
+ .SetParent<Object> ()
+ .AddAttribute ("ChannelList", "The list of all channels created during the simulation.",
+ ObjectVectorValue (),
+ MakeObjectVectorAccessor (&ChannelListPriv::m_channels),
+ MakeObjectVectorChecker<Channel> ())
+ ;
+ return tid;
+}
+
+Ptr<ChannelListPriv>
+ChannelListPriv::Get (void)
+{
+ return *DoGet ();
+}
+
+Ptr<ChannelListPriv> *
+ChannelListPriv::DoGet (void)
+{
+ static Ptr<ChannelListPriv> ptr = 0;
+ if (ptr == 0)
+ {
+ ptr = CreateObject<ChannelListPriv> ();
+ Config::RegisterRootNamespaceObject (ptr);
+ Simulator::ScheduleDestroy (&ChannelListPriv::Delete);
+ }
+ return &ptr;
+}
+
+void
+ChannelListPriv::Delete (void)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ Config::UnregisterRootNamespaceObject (Get ());
+ (*DoGet ()) = 0;
+}
+
+ChannelListPriv::ChannelListPriv ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+}
+
+ChannelListPriv::~ChannelListPriv ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ for (std::vector<Ptr<Channel> >::iterator i = m_channels.begin ();
+ i != m_channels.end (); i++)
+ {
+ Ptr<Channel> channel = *i;
+ channel->Dispose ();
+ *i = 0;
+ }
+ m_channels.erase (m_channels.begin (), m_channels.end ());
+}
+
+uint32_t
+ChannelListPriv::Add (Ptr<Channel> channel)
+{
+ uint32_t index = m_channels.size ();
+ m_channels.push_back (channel);
+ return index;
+
+}
+
+ChannelList::Iterator
+ChannelListPriv::Begin (void) const
+{
+ return m_channels.begin ();
+}
+
+ChannelList::Iterator
+ChannelListPriv::End (void) const
+{
+ return m_channels.end ();
+}
+
+uint32_t
+ChannelListPriv::GetNChannels (void)
+{
+ return m_channels.size ();
+}
+
+Ptr<Channel>
+ChannelListPriv::GetChannel (uint32_t n)
+{
+ NS_ASSERT_MSG (n < m_channels.size (), "Channel index " << n <<
+ " is out of range (only have " << m_channels.size () << " channels).");
+ return m_channels[n];
+}
+
+uint32_t
+ChannelList::Add (Ptr<Channel> channel)
+{
+ return ChannelListPriv::Get ()->Add (channel);
+}
+
+ChannelList::Iterator
+ChannelList::Begin (void)
+{
+ return ChannelListPriv::Get ()->Begin ();
+}
+
+ChannelList::Iterator
+ChannelList::End (void)
+{
+ return ChannelListPriv::Get ()->End ();
+}
+
+Ptr<Channel>
+ChannelList::GetChannel (uint32_t n)
+{
+ return ChannelListPriv::Get ()->GetChannel (n);
+}
+
+uint32_t
+ChannelList::GetNChannels (void)
+{
+ return ChannelListPriv::Get ()->GetNChannels ();
+}
+
+} //namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/node/channel-list.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef CHANNEL_LIST_H
+#define CHANNEL_LIST_H
+
+#include <vector>
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+class Channel;
+class CallbackBase;
+
+
+/**
+ * \ingroup node
+ *
+ * \brief the list of simulation channels.
+ *
+ * Every Channel created is automatically added to this list.
+ */
+class ChannelList
+{
+public:
+ typedef std::vector< Ptr<Channel> >::const_iterator Iterator;
+
+ /**
+ * \param channel channel to add
+ * \returns index of channel in list.
+ *
+ * This method is called automatically from Channel::Channel so
+ * the user has little reason to call it himself.
+ */
+ static uint32_t Add (Ptr<Channel> channel);
+ /**
+ * \returns a C++ iterator located at the beginning of this
+ * list.
+ */
+ static Iterator Begin (void);
+ /**
+ * \returns a C++ iterator located at the end of this
+ * list.
+ */
+ static Iterator End (void);
+ /**
+ * \param n index of requested channel.
+ * \returns the Channel associated to index n.
+ */
+ static Ptr<Channel> GetChannel (uint32_t n);
+ /**
+ * \returns the number of channels currently in the list.
+ */
+ static uint32_t GetNChannels (void);
+};
+
+}//namespace ns3
+
+#endif /* CHANNEL_LIST_H */
--- a/src/node/channel.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/channel.cc Thu Sep 24 10:57:41 2009 -0400
@@ -16,9 +16,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "channel.h"
+#include "channel-list.h"
+#include "net-device.h"
+
#include "ns3/log.h"
-#include "channel.h"
-#include "net-device.h"
+#include "ns3/uinteger.h"
NS_LOG_COMPONENT_DEFINE ("Channel");
@@ -30,19 +33,31 @@
Channel::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Channel")
- .SetParent<Object> ();
+ .SetParent<Object> ()
+ .AddAttribute ("Id", "The id (unique integer) of this Channel.",
+ TypeId::ATTR_GET,
+ UintegerValue (0),
+ MakeUintegerAccessor (&Channel::m_id),
+ MakeUintegerChecker<uint32_t> ());
return tid;
}
Channel::Channel ()
+ : m_id(0)
{
NS_LOG_FUNCTION_NOARGS ();
+ m_id = ChannelList::Add (this);
}
-
Channel::~Channel ()
{
NS_LOG_FUNCTION_NOARGS ();
}
+uint32_t
+Channel::GetId (void) const
+{
+ return m_id;
+}
+
} // namespace ns3
--- a/src/node/channel.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/channel.h Thu Sep 24 10:57:41 2009 -0400
@@ -46,6 +46,14 @@
virtual ~Channel ();
/**
+ * \returns the unique id of this channel
+ *
+ * This unique id happens to be also the index of the Channel into
+ * the ChannelList.
+ */
+ uint32_t GetId (void) const;
+
+ /**
* \returns the number of NetDevices connected to this Channel.
*
* This method must be implemented by subclasses.
@@ -59,6 +67,8 @@
*/
virtual Ptr<NetDevice> GetDevice (uint32_t i) const = 0;
+private:
+ uint32_t m_id; // Channel id for this channel
};
} // namespace ns3
--- a/src/node/inet-socket-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/inet-socket-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -87,6 +87,7 @@
void SetIpv4 (Ipv4Address address);
/**
+ * \param address address to test
* \returns true if the address matches, false otherwise.
*/
static bool IsMatchingType (const Address &address);
--- a/src/node/inet6-socket-address.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/inet6-socket-address.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,10 +18,12 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
-#include "inet6-socket-address.h"
#include "ns3/assert.h"
-namespace ns3 {
+#include "inet6-socket-address.h"
+
+namespace ns3
+{
Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6, uint16_t port)
: m_ipv6(ipv6),
--- a/src/node/inet6-socket-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/inet6-socket-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -21,9 +21,10 @@
#ifndef INET6_SOCKET_ADDRESS_H
#define INET6_SOCKET_ADDRESS_H
+#include <stdint.h>
+
#include "address.h"
#include "ipv6-address.h"
-#include <stdint.h>
namespace ns3 {
--- a/src/node/ipv4-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv4-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -210,7 +210,7 @@
*/
Ipv4Mask ();
/**
- * param mask bitwise integer representation of the mask
+ * \param mask bitwise integer representation of the mask
*
* For example, the integer input 0xffffff00 yields a 24-bit mask
*/
--- a/src/node/ipv6-address.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-address.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,14 +18,13 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
-#include <string.h>
+#include <iomanip>
#include "ns3/log.h"
-#include "ipv6-address.h"
#include "ns3/assert.h"
+
#include "mac48-address.h"
-
-#include <iomanip>
+#include "ipv6-address.h"
NS_LOG_COMPONENT_DEFINE ("Ipv6Address");
--- a/src/node/ipv6-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -26,8 +26,9 @@
#include <ostream>
+#include "ns3/attribute-helper.h"
+
#include "address.h"
-#include "ns3/attribute-helper.h"
namespace ns3 {
@@ -213,7 +214,8 @@
operator Address () const;
/**
- * \brief Convert the Address object into an Ipv6Address one.
+ * \brief Convert the Address object into an Ipv6Address ones.
+ * \param address address to convert
* \return an Ipv6Address
*/
static Ipv6Address ConvertFrom (const Address& address);
@@ -402,13 +404,13 @@
/**
* \class ns3::Ipv6AddressValue
- * \brief hold objects of type ns3::Ipv6Address
+ * \brief Hold objects of type ns3::Ipv6Address
*/
ATTRIBUTE_HELPER_HEADER (Ipv6Address);
/**
* \class ns3::Ipv6PrefixValue
- * \brief hold objects of type ns3::Ipv6Prefix
+ * \brief Hold objects of type ns3::Ipv6Prefix
*/
ATTRIBUTE_HELPER_HEADER (Ipv6Prefix);
@@ -432,9 +434,17 @@
return (memcmp (a.m_address, b.m_address, 16) < 0);
}
+/**
+ * \class Ipv6AddressHash
+ * \brief Hash function class for IPv6 addresses.
+ */
class Ipv6AddressHash : public std::unary_function<Ipv6Address, size_t>
{
public:
+ /**
+ * \brief Unary operator to hash IPv6 address.
+ * \param x IPv6 address to hash
+ */
size_t operator () (Ipv6Address const &x) const;
};
--- a/src/node/ipv6-header.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-header.cc Thu Sep 24 10:57:41 2009 -0400
@@ -21,6 +21,7 @@
#include "ns3/assert.h"
#include "ns3/log.h"
#include "ns3/header.h"
+
#include "address-utils.h"
#include "ipv6-header.h"
--- a/src/node/ipv6-interface-address.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-interface-address.cc Thu Sep 24 10:57:41 2009 -0400
@@ -22,6 +22,7 @@
#include "ns3/log.h"
#include "ns3/assert.h"
+
#include "ipv6-interface-address.h"
namespace ns3
--- a/src/node/ipv6-interface-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-interface-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -190,7 +190,7 @@
std::ostream& operator<< (std::ostream& os, const Ipv6InterfaceAddress &addr);
-/* follow Ipv6InterfaceAddress way, maybe not inline them */
+/* follow Ipv4InterfaceAddress way, maybe not inline them */
inline bool operator == (const Ipv6InterfaceAddress& a, const Ipv6InterfaceAddress& b)
{
return (a.m_address == b.m_address && a.m_prefix == b.m_prefix &&
--- a/src/node/ipv6-raw-socket-factory.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-raw-socket-factory.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,8 +18,9 @@
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
+#include "ns3/uinteger.h"
+
#include "ipv6-raw-socket-factory.h"
-#include "ns3/uinteger.h"
namespace ns3 {
--- a/src/node/ipv6-route.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-route.cc Thu Sep 24 10:57:41 2009 -0400
@@ -21,7 +21,6 @@
#include <iostream>
#include "net-device.h"
-
#include "ipv6-route.h"
namespace ns3
--- a/src/node/ipv6-route.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-route.h Thu Sep 24 10:57:41 2009 -0400
@@ -26,6 +26,7 @@
#include <ostream>
#include "ns3/ref-count-base.h"
+
#include "ipv6-address.h"
namespace ns3
@@ -176,22 +177,26 @@
Ipv6Address GetOrigin (void) const;
/**
+ * \brief Set parent for this route.
* \param iif Parent (input interface) for this route
*/
void SetParent (uint32_t iif);
+
/**
+ * \brief Get parent for this route.
* \return Parent (input interface) for this route
*/
uint32_t GetParent (void) const;
/**
+ * \brief set output TTL for this route.
* \param oif Outgoing interface index
* \param ttl time-to-live for this route
*/
void SetOutputTtl (uint32_t oif, uint32_t ttl);
/**
- * \brief Get output TTL.
+ * \brief Get output TTL for this route.
* \param oif outgoing interface
* \return TTL for this route
*/
@@ -214,7 +219,7 @@
uint32_t m_parent;
/**
- * \brief TTLs;
+ * \brief TTLs.
*/
std::vector<uint32_t> m_ttls;
};
--- a/src/node/ipv6-routing-protocol.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-routing-protocol.cc Thu Sep 24 10:57:41 2009 -0400
@@ -19,6 +19,7 @@
/* taken from src/node/ipv4-routing-protocol.cc and adapted to IPv6 */
#include "ns3/assert.h"
+
#include "ipv6-route.h"
#include "ipv6-routing-protocol.h"
--- a/src/node/ipv6-routing-protocol.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6-routing-protocol.h Thu Sep 24 10:57:41 2009 -0400
@@ -25,6 +25,7 @@
#include "ns3/callback.h"
#include "ns3/object.h"
#include "ns3/socket.h"
+
#include "ipv6-header.h"
#include "ipv6-interface-address.h"
#include "ipv6.h"
@@ -39,6 +40,7 @@
* \ingroup node
* \defgroup ipv6Routing Ipv6RoutingProtocol
*/
+
/**
* \ingroup ipv6Routing
* \brief Abstract base class for Ipv6 routing protocols.
@@ -102,37 +104,42 @@
LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
/**
- * \param interface the index of the interface we are being notified about
+ * \brief Notify when specified interface goes UP.
*
* Protocols are expected to implement this method to be notified of the state change of
* an interface in a node.
+ * \param interface the index of the interface we are being notified about
*/
virtual void NotifyInterfaceUp (uint32_t interface) = 0;
+
/**
- * \param interface the index of the interface we are being notified about
+ * \brief Notify when specified interface goes DOWN.
*
* Protocols are expected to implement this method to be notified of the state change of
* an interface in a node.
+ * \param interface the index of the interface we are being notified about
*/
virtual void NotifyInterfaceDown (uint32_t interface) = 0;
/**
- * \param interface the index of the interface we are being notified about
- * \param address a new address being added to an interface
+ * \brief Notify when specified interface add an address.
*
* Protocols are expected to implement this method to be notified whenever
* a new address is added to an interface. Typically used to add a 'network route' on an
* interface. Can be invoked on an up or down interface.
+ * \param interface the index of the interface we are being notified about
+ * \param address a new address being added to an interface
*/
virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) = 0;
/**
- * \param interface the index of the interface we are being notified about
- * \param address a new address being added to an interface
+ * \brief Notify when specified interface add an address.
*
* Protocols are expected to implement this method to be notified whenever
* a new address is removed from an interface. Typically used to remove the 'network route' of an
* interface. Can be invoked on an up or down interface.
+ * \param interface the index of the interface we are being notified about
+ * \param address a new address being added to an interface
*/
virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) = 0;
@@ -160,9 +167,8 @@
virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) = 0;
/**
+ * \brief Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol
* \param ipv6 the ipv6 object this routing protocol is being associated with
- *
- * Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol
*/
virtual void SetIpv6 (Ptr<Ipv6> ipv6) = 0;
};
--- a/src/node/ipv6.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6.cc Thu Sep 24 10:57:41 2009 -0400
@@ -23,6 +23,7 @@
#include "ns3/assert.h"
#include "ns3/node.h"
#include "ns3/boolean.h"
+
#include "ipv6.h"
namespace ns3
--- a/src/node/ipv6.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/ipv6.h Thu Sep 24 10:57:41 2009 -0400
@@ -24,9 +24,11 @@
#define IPV6_H
#include <stdint.h>
+
#include "ns3/object.h"
#include "ns3/socket.h"
#include "ns3/callback.h"
+
#include "ipv6-address.h"
#include "ipv6-interface-address.h"
@@ -108,17 +110,19 @@
virtual Ptr<Ipv6RoutingProtocol> GetRoutingProtocol (void) const = 0;
/**
- * \param device device to add to the list of IPv6 interfaces
- * which can be used as output interfaces during packet forwarding.
- * \returns the index of the IPv6 interface added.
+ * \brief Add a NetDevice interface.
*
* Once a device has been added, it can never be removed: if you want
* to disable it, you can invoke Ipv6::SetDown which will
* make sure that it is never used during packet forwarding.
+ * \param device device to add to the list of IPv6 interfaces
+ * which can be used as output interfaces during packet forwarding.
+ * \returns the index of the IPv6 interface added.
*/
virtual uint32_t AddInterface (Ptr<NetDevice> device) = 0;
/**
+ * \brief Get number of interfaces.
* \returns the number of interfaces added by the user.
*/
virtual uint32_t GetNInterfaces (void) const = 0;
@@ -159,18 +163,21 @@
Ipv6Prefix mask) const = 0;
/**
+ * \brief Get the NetDevice of the specified interface number.
* \param interface The interface number of an IPv6 interface.
* \returns The NetDevice associated with the IPv6 interface number.
*/
virtual Ptr<NetDevice> GetNetDevice (uint32_t interface) = 0;
/**
+ * \brief Get the interface index of the specified NetDevice.
* \param device The NetDevice for an Ipv6Interface
* \returns The interface number of an IPv6 interface or -1 if not found.
*/
virtual int32_t GetInterfaceForDevice (Ptr<const NetDevice> device) const = 0;
/**
+ * \brief Add an address on the specified IPv6 interface.
* \param interface Interface number of an IPv6 interface
* \param address Ipv6InterfaceAddress address to associate with the underlying IPv6 interface
* \returns true if the operation succeeded
@@ -178,12 +185,15 @@
virtual bool AddAddress (uint32_t interface, Ipv6InterfaceAddress address) = 0;
/**
+ * \brief Get number of addresses on specified IPv6 interface.
* \param interface Interface number of an IPv6 interface
* \returns the number of Ipv6InterfaceAddress entries for the interface.
*/
virtual uint32_t GetNAddresses (uint32_t interface) const = 0;
/**
+ * \brief Get IPv6 address on specified IPv6 interface.
+ *
* Because addresses can be removed, the addressIndex is not guaranteed
* to be static across calls to this method.
*
@@ -194,6 +204,8 @@
virtual Ipv6InterfaceAddress GetAddress (uint32_t interface, uint32_t addressIndex) const = 0;
/**
+ * \brief Remove an address on specified IPv6 interface.
+ *
* Remove the address at addressIndex on named interface. The addressIndex
* for all higher indices will decrement by one after this method is called;
* so, for example, to remove 5 addresses from an interface i, one could
@@ -206,6 +218,8 @@
virtual bool RemoveAddress (uint32_t interface, uint32_t addressIndex) = 0;
/**
+ * \brief Set metric on specified Ipv6 interface.
+ *
* \param interface The interface number of an IPv6 interface
* \param metric routing metric (cost) associated to the underlying
* IPv6 interface
@@ -213,6 +227,8 @@
virtual void SetMetric (uint32_t interface, uint16_t metric) = 0;
/**
+ * \brief Get metric for the specified IPv6 interface.
+ *
* \param interface The interface number of an IPv6 interface
* \returns routing metric (cost) associated to the underlying
* IPv6 interface
@@ -220,6 +236,7 @@
virtual uint16_t GetMetric (uint32_t interface) const = 0;
/**
+ * \brief Get MTU for the specified IPv6 interface.
* \param interface Interface number of IPv6 interface
* \returns the Maximum Transmission Unit (in bytes) associated
* to the underlying IPv6 interface
@@ -227,6 +244,7 @@
virtual uint16_t GetMtu (uint32_t interface) const = 0;
/**
+ * \brief If the specified interface index is in "up" state.
* \param interface Interface number of IPv6 interface
* \returns true if the underlying interface is in the "up" state,
* false otherwise.
@@ -234,28 +252,30 @@
virtual bool IsUp (uint32_t interface) const = 0;
/**
+ * \brief Set the interface into the "up" state.
+ *
+ * In this state, it is considered valid during IPv6 forwarding.
* \param interface Interface number of IPv6 interface
- *
- * Set the interface into the "up" state. In this state, it is
- * considered valid during IPv6 forwarding.
*/
virtual void SetUp (uint32_t interface) = 0;
/**
- * \param interface Interface number of IPv6 interface
+ * \brief Set the interface into the "down" state.
*
- * Set the interface into the "down" state. In this state, it is
- * ignored during IPv6 forwarding.
+ * In this state, it is ignored during IPv6 forwarding.
+ * \param interface Interface number of IPv6 interface
*/
virtual void SetDown (uint32_t interface) = 0;
/**
+ * \brief If the specified IPv6 interface has forwarding enabled.
* \param interface Interface number of IPv6 interface
* \returns true if IPv6 forwarding enabled for input datagrams on this device
*/
virtual bool IsForwarding (uint32_t interface) const = 0;
/**
+ * \brief Set forwarding on specified IPv6 interface.
* \param interface Interface number of IPv6 interface
* \param val Value to set the forwarding flag
*
--- a/src/node/mac48-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/mac48-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -78,6 +78,7 @@
*/
static Mac48Address ConvertFrom (const Address &address);
/**
+ * \param address address to test
* \returns true if the address matches, false otherwise.
*/
static bool IsMatchingType (const Address &address);
@@ -102,12 +103,14 @@
static Mac48Address GetBroadcast (void);
/**
+ * \param address base IPv4 address
* \returns a multicast address
*/
static Mac48Address GetMulticast (Ipv4Address address);
/**
* \brief Get multicast address from IPv6 address.
+ * \param address base IPv6 address
* \returns a multicast address
*/
static Mac48Address GetMulticast (Ipv6Address address);
--- a/src/node/mac64-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/mac64-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -73,6 +73,7 @@
*/
static Mac64Address ConvertFrom (const Address &address);
/**
+ * \param address address to test
* \returns true if the address matches, false otherwise.
*/
static bool IsMatchingType (const Address &address);
--- a/src/node/net-device.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/net-device.h Thu Sep 24 10:57:41 2009 -0400
@@ -99,6 +99,7 @@
/**
* Set the address of this interface
+ * \param address address to set
*/
virtual void SetAddress (Address address) = 0;
--- a/src/node/packet-socket-address.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/packet-socket-address.h Thu Sep 24 10:57:41 2009 -0400
@@ -64,6 +64,7 @@
*/
static PacketSocketAddress ConvertFrom (const Address &address);
/**
+ * \param address address to test
* \returns true if the address matches, false otherwise.
*/
static bool IsMatchingType (const Address &address);
--- a/src/node/packetbb.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/packetbb.cc Thu Sep 24 10:57:41 2009 -0400
@@ -728,7 +728,7 @@
TypeId
PbbPacket::GetTypeId (void)
{
- static TypeId tid = TypeId ("PbbPacket")
+ static TypeId tid = TypeId ("ns3::PbbPacket")
.SetParent<Header> ()
.AddConstructor<PbbPacket> ()
;
--- a/src/node/packetbb.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/packetbb.h Thu Sep 24 10:57:41 2009 -0400
@@ -609,6 +609,7 @@
/**
* \brief Deserializes a packet from the specified buffer.
+ * \param start start offset
* \return the number of bytes deserialized
*
* If this returns a number smaller than the total number of bytes in the
--- a/src/node/queue.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/queue.h Thu Sep 24 10:57:41 2009 -0400
@@ -56,6 +56,7 @@
bool IsEmpty (void) const;
/**
* Place a packet into the rear of the Queue
+ * \param p packet to enqueue
* \return True if the operation was successful; false otherwise
*/
bool Enqueue (Ptr<Packet> p);
--- a/src/node/socket.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/socket.h Thu Sep 24 10:57:41 2009 -0400
@@ -487,8 +487,9 @@
*/
int RecvFrom (uint8_t* buf, uint32_t size, uint32_t flags,
Address &fromAddress);
- /**
- * \returns the address name this socket is associated with.
+ /**
+ * \param address the address name this socket is associated with.
+ * \returns 0 if success, -1 otherwise
*/
virtual int GetSockName (Address &address) const = 0;
--- a/src/node/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/node/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -24,6 +24,7 @@
'drop-tail-queue.cc',
'channel.cc',
'node-list.cc',
+ 'channel-list.cc',
'socket.cc',
'socket-factory.cc',
'packet-socket-factory.cc',
@@ -73,6 +74,7 @@
'ethernet-trailer.h',
'channel.h',
'node-list.h',
+ 'channel-list.h',
'socket.h',
'socket-factory.h',
'packet-socket-factory.h',
--- a/src/routing/global-routing/candidate-queue.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/global-routing/candidate-queue.h Thu Sep 24 10:57:41 2009 -0400
@@ -167,6 +167,7 @@
* Candidate Queue copy construction is disallowed (not implemented) to
* prevent the compiler from slipping in incorrect versions that don't
* properly deal with deep copies.
+ * \param sr object to copy
*/
CandidateQueue (CandidateQueue& sr);
@@ -174,6 +175,7 @@
* Candidate Queue assignment operator is disallowed (not implemented) to
* prevent the compiler from slipping in incorrect versions that don't
* properly deal with deep copies.
+ * \param sr object to assign
*/
CandidateQueue& operator= (CandidateQueue& sr);
--- a/src/routing/global-routing/global-router-interface.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/global-routing/global-router-interface.h Thu Sep 24 10:57:41 2009 -0400
@@ -401,7 +401,7 @@
/**
* @brief Set the Link State ID is defined by the OSPF spec. We always set it
* to the router ID of the router making the advertisement.
- *
+ * @param addr IPv4 address which will act as ID
* @see RoutingEnvironment::AllocateRouterId ()
* @see GlobalRouting::GetRouterId ()
*/
@@ -421,6 +421,7 @@
* @brief Set the Advertising Router as defined by the OSPF spec. We always
* set it to the router ID of the router making the advertisement.
*
+ * @param rtr ID of the router making advertisement
* @see RoutingEnvironment::AllocateRouterId ()
* @see GlobalRouting::GetRouterId ()
*/
@@ -473,7 +474,7 @@
/**
* @brief Set the SPF status of the advertisement
- *
+ * @param status SPF status to set
* @see SPFStatus
*/
void SetStatus (SPFStatus status);
--- a/src/routing/list-routing/ipv6-list-routing.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/list-routing/ipv6-list-routing.h Thu Sep 24 10:57:41 2009 -0400
@@ -28,8 +28,11 @@
* \ingroup routing
* \defgroup ipv6ListRouting Ipv6 List Routing
*/
+
/**
* \ingroup ipv6ListRouting
+ * \class Ipv6ListRouting
+ * \brief Hold list of Ipv6RoutingProtocol objects.
*
* This class is a specialization of Ipv6RoutingProtocol that allows
* other instances of Ipv6RoutingProtocol to be inserted in a
@@ -44,33 +47,46 @@
class Ipv6ListRouting : public Ipv6RoutingProtocol
{
public:
+ /**
+ * \brief Get the type ID of this class.
+ * \return type ID
+ */
static TypeId GetTypeId (void);
+ /**
+ * \brief Constructor.
+ */
Ipv6ListRouting ();
+
+ /**
+ * \brief Destructor.
+ */
virtual ~Ipv6ListRouting ();
/**
* \brief Register a new routing protocol to be used in this IPv4 stack
- *
* \param routingProtocol new routing protocol implementation object
* \param priority priority to give to this routing protocol.
* Values may range between -32768 and +32767.
*/
virtual void AddRoutingProtocol (Ptr<Ipv6RoutingProtocol> routingProtocol, int16_t priority);
+
/**
+ * \brief Get the number of routing protocols.
* \return number of routing protocols in the list
*/
virtual uint32_t GetNRoutingProtocols (void) const;
+
/**
- * Return pointer to routing protocol stored at index, with the
- * first protocol (index 0) the highest priority, the next one (index 1)
+ * \brief Get pointer to routing protocol stored at index,
+ *
+ * The first protocol (index 0) the highest priority, the next one (index 1)
* the second highest priority, and so on. The priority parameter is an
* output parameter and it returns the integer priority of the protocol.
- *
- * \return pointer to routing protocol indexed by
* \param index index of protocol to return
* \param priority output parameter, set to the priority of the protocol
- being returned
+ * being returned
+ * \return pointer to routing protocol indexed by
*/
virtual Ptr<Ipv6RoutingProtocol> GetRoutingProtocol (uint32_t index, int16_t& priority) const;
@@ -89,14 +105,32 @@
virtual void SetIpv6 (Ptr<Ipv6> ipv6);
protected:
+ /**
+ * \brief Dispose this object.
+ */
void DoDispose (void);
+
private:
typedef std::pair<int16_t, Ptr<Ipv6RoutingProtocol> > Ipv6RoutingProtocolEntry;
typedef std::list<Ipv6RoutingProtocolEntry> Ipv6RoutingProtocolList;
- Ipv6RoutingProtocolList m_routingProtocols;
+
+ /**
+ * \brief Compare two routing protocols.
+ * \param a first object to compare
+ * \param b second object to compare
+ * \return true if they are the same, false otherwise
+ */
static bool Compare (const Ipv6RoutingProtocolEntry& a, const Ipv6RoutingProtocolEntry& b);
+
+ /**
+ * \brief List of routing protocols.
+ */
+ Ipv6RoutingProtocolList m_routingProtocols;
+
+ /**
+ * \brief Ipv6 reference.
+ */
Ptr<Ipv6> m_ipv6;
-
};
} //namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/routing/nix-vector-routing/ipv4-nix-vector-routing.cc Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,840 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#include <queue>
+
+#include "ns3/log.h"
+#include "ns3/abort.h"
+#include "ns3/ipv4-list-routing.h"
+
+#include "ipv4-nix-vector-routing.h"
+
+NS_LOG_COMPONENT_DEFINE ("Ipv4NixVectorRouting");
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (Ipv4NixVectorRouting);
+
+TypeId
+Ipv4NixVectorRouting::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::Ipv4NixVectorRouting")
+ .SetParent<Ipv4RoutingProtocol> ()
+ .AddConstructor<Ipv4NixVectorRouting> ()
+ ;
+ return tid;
+}
+
+Ipv4NixVectorRouting::Ipv4NixVectorRouting ()
+:m_totalNeighbors (0)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+}
+
+Ipv4NixVectorRouting::~Ipv4NixVectorRouting ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+}
+
+void
+Ipv4NixVectorRouting::SetIpv4 (Ptr<Ipv4> ipv4)
+{
+ NS_ASSERT (ipv4 != 0);
+ NS_ASSERT (m_ipv4 == 0);
+ NS_LOG_DEBUG ("Created Ipv4NixVectorProtocol");
+
+ m_ipv4 = ipv4;
+}
+
+void
+Ipv4NixVectorRouting::DoDispose ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ m_node = 0;
+ m_ipv4 = 0;
+
+ Ipv4RoutingProtocol::DoDispose ();
+}
+
+
+void
+Ipv4NixVectorRouting::SetNode (Ptr<Node> node)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ m_node = node;
+}
+
+void
+Ipv4NixVectorRouting::FlushGlobalNixRoutingCache ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ NodeList::Iterator listEnd = NodeList::End ();
+ for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++)
+ {
+ Ptr<Node> node = *i;
+ Ptr<Ipv4NixVectorRouting> rp = node->GetObject<Ipv4NixVectorRouting> ();
+ if (!rp)
+ {
+ continue;
+ }
+ NS_LOG_LOGIC ("Flushing Nix caches.");
+ rp->FlushNixCache ();
+ rp->FlushIpv4RouteCache ();
+ }
+}
+
+void
+Ipv4NixVectorRouting::FlushNixCache ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ m_nixCache.clear ();
+}
+
+void
+Ipv4NixVectorRouting::FlushIpv4RouteCache ()
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ m_ipv4RouteCache.clear ();
+}
+
+Ptr<NixVector>
+Ipv4NixVectorRouting::GetNixVector (Ptr<Node> source, Ipv4Address dest)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ Ptr<NixVector> nixVector = CreateObject<NixVector> ();
+
+ // not in cache, must build the nix vector
+ // First, we have to figure out the nodes
+ // associated with these IPs
+ Ptr<Node> destNode = GetNodeByIp (dest);
+ if (destNode == 0)
+ {
+ NS_LOG_ERROR ("No routing path exists");
+ return 0;
+ }
+
+ // if source == dest, then we have a special case
+ // because the node is sending to itself. have to
+ // build the nix vector a little differently
+ if (source == destNode)
+ {
+ BuildNixVectorLocal(nixVector);
+ return nixVector;
+ }
+ else
+ {
+ // otherwise proceed as normal
+ // and build the nix vector
+ std::vector< Ptr<Node> > parentVector;
+ BFS (NodeList::GetNNodes (), source, destNode, parentVector);
+
+ if (BuildNixVector (parentVector, source->GetId (), destNode->GetId (), nixVector))
+ {
+ return nixVector;
+ }
+ else
+ {
+ NS_LOG_ERROR ("No routing path exists");
+ return 0;
+ }
+ }
+}
+
+Ptr<NixVector>
+Ipv4NixVectorRouting::GetNixVectorInCache (Ipv4Address address)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ NixMap_t::iterator iter = m_nixCache.find (address);
+ if (iter != m_nixCache.end ())
+ {
+ NS_LOG_LOGIC ("Found Nix-vector in cache.");
+ return iter->second;
+ }
+
+ // not in cache
+ return 0;
+}
+
+Ptr<Ipv4Route>
+Ipv4NixVectorRouting::GetIpv4RouteInCache (Ipv4Address address)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ Ipv4RouteMap_t::iterator iter = m_ipv4RouteCache.find (address);
+ if (iter != m_ipv4RouteCache.end ())
+ {
+ NS_LOG_LOGIC ("Found Ipv4Route in cache.");
+ return iter->second;
+ }
+
+ // not in cache
+ return 0;
+}
+
+bool
+Ipv4NixVectorRouting::BuildNixVectorLocal (Ptr<NixVector> nixVector)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ uint32_t numberOfDevices = m_node->GetNDevices ();
+
+ // here we are building a nix vector to
+ // ourself, so we need to find the loopback
+ // interface and add that to the nix vector
+ Ipv4Address loopback ("127.0.0.1");
+ for (uint32_t i = 0; i < numberOfDevices; i++)
+ {
+ uint32_t interfaceIndex = (m_ipv4)->GetInterfaceForDevice(m_node->GetDevice(i));
+ Ipv4InterfaceAddress ifAddr = m_ipv4->GetAddress (interfaceIndex, 0);
+ if (ifAddr.GetLocal() == loopback)
+ {
+ NS_LOG_LOGIC ("Adding loopback to nix.");
+ NS_LOG_LOGIC ("Adding Nix: " << i << " with " << nixVector->BitCount (numberOfDevices)
+ << " bits, for node " << m_node->GetId());
+ nixVector->AddNeighborIndex (i, nixVector->BitCount (numberOfDevices));
+ return true;
+ }
+ }
+ return false;
+}
+
+bool
+Ipv4NixVectorRouting::BuildNixVector (const std::vector< Ptr<Node> > & parentVector, uint32_t source, uint32_t dest, Ptr<NixVector> nixVector)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ if (source == dest)
+ {
+ return true;
+ }
+
+ if (parentVector.at (dest) == 0)
+ {
+ return false;
+ }
+
+ Ptr<Node> parentNode = parentVector.at (dest);
+
+ uint32_t numberOfDevices = parentNode->GetNDevices ();
+ uint32_t destId = 0;
+ uint32_t totalNeighbors = 0;
+
+ // scan through the net devices on the parent node
+ // and then look at the nodes adjacent to them
+ for (uint32_t i = 0; i < numberOfDevices; i++)
+ {
+ // Get a net device from the node
+ // as well as the channel, and figure
+ // out the adjacent net devices
+ Ptr<NetDevice> localNetDevice = parentNode->GetDevice (i);
+ if (localNetDevice->IsBridge ())
+ {
+ continue;
+ }
+ Ptr<Channel> channel = localNetDevice->GetChannel ();
+ if (channel == 0)
+ {
+ continue;
+ }
+
+ // this function takes in the local net dev, and channnel, and
+ // writes to the netDeviceContainer the adjacent net devs
+ NetDeviceContainer netDeviceContainer;
+ GetAdjacentNetDevices (localNetDevice, channel, netDeviceContainer);
+
+ // Finally we can get the adjacent nodes
+ // and scan through them. If we find the
+ // node that matches "dest" then we can add
+ // the index to the nix vector.
+ // the index corresponds to the neighbor index
+ uint32_t offset = 0;
+ for (NetDeviceContainer::Iterator iter = netDeviceContainer.Begin (); iter != netDeviceContainer.End (); iter++)
+ {
+ Ptr<Node> remoteNode = (*iter)->GetNode ();
+
+ if (remoteNode->GetId () == dest)
+ {
+ destId = totalNeighbors + offset;
+ }
+ offset += 1;
+ }
+
+ totalNeighbors += netDeviceContainer.GetN ();
+ }
+ NS_LOG_LOGIC ("Adding Nix: " << destId << " with "
+ << nixVector->BitCount (totalNeighbors) << " bits, for node " << parentNode->GetId());
+ nixVector->AddNeighborIndex (destId, nixVector->BitCount (totalNeighbors));
+
+ // recurse through parent vector, grabbing the path
+ // and building the nix vector
+ BuildNixVector (parentVector, source, (parentVector.at (dest))->GetId (), nixVector);
+ return true;
+}
+
+void
+Ipv4NixVectorRouting::GetAdjacentNetDevices (Ptr<NetDevice> netDevice, Ptr<Channel> channel, NetDeviceContainer & netDeviceContainer)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ for (uint32_t i = 0; i < channel->GetNDevices (); i++)
+ {
+ Ptr<NetDevice> remoteDevice = channel->GetDevice (i);
+ if (remoteDevice != netDevice)
+ {
+ Ptr<BridgeNetDevice> bd = NetDeviceIsBridged (remoteDevice);
+ // we have a bridged device, we need to add all
+ // bridged devices
+ if (bd)
+ {
+ NS_LOG_LOGIC ("Looking through bridge ports of bridge net device " << bd);
+ for (uint32_t j = 0; j < bd->GetNBridgePorts (); ++j)
+ {
+ Ptr<NetDevice> ndBridged = bd->GetBridgePort (j);
+ if (ndBridged == remoteDevice)
+ {
+ NS_LOG_LOGIC ("That bridge port is me, don't walk backward");
+ continue;
+ }
+ Ptr<Channel> chBridged = ndBridged->GetChannel ();
+ if (channel == 0)
+ {
+ continue;
+ }
+ GetAdjacentNetDevices (ndBridged, chBridged, netDeviceContainer);
+ }
+ }
+ else
+ {
+ netDeviceContainer.Add (channel->GetDevice (i));
+ }
+ }
+ }
+}
+
+Ptr<Node>
+Ipv4NixVectorRouting::GetNodeByIp (Ipv4Address dest)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ NodeContainer allNodes = NodeContainer::GetGlobal ();
+ Ptr<Node> destNode;
+
+ for (NodeContainer::Iterator i = allNodes.Begin (); i != allNodes.End (); ++i)
+ {
+ Ptr<Node> node = *i;
+ Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
+ if (ipv4->GetInterfaceForAddress (dest) != -1)
+ {
+ destNode = node;
+ break;
+ }
+ }
+
+ if (!destNode)
+ {
+ NS_LOG_ERROR ("Couldn't find dest node given the IP" << dest);
+ return 0;
+ }
+
+ return destNode;
+}
+
+uint32_t
+Ipv4NixVectorRouting::FindTotalNeighbors ()
+{
+ uint32_t numberOfDevices = m_node->GetNDevices ();
+ uint32_t totalNeighbors = 0;
+
+ // scan through the net devices on the parent node
+ // and then look at the nodes adjacent to them
+ for (uint32_t i = 0; i < numberOfDevices; i++)
+ {
+ // Get a net device from the node
+ // as well as the channel, and figure
+ // out the adjacent net devices
+ Ptr<NetDevice> localNetDevice = m_node->GetDevice (i);
+ Ptr<Channel> channel = localNetDevice->GetChannel ();
+ if (channel == 0)
+ {
+ continue;
+ }
+
+ // this function takes in the local net dev, and channnel, and
+ // writes to the netDeviceContainer the adjacent net devs
+ NetDeviceContainer netDeviceContainer;
+ GetAdjacentNetDevices (localNetDevice, channel, netDeviceContainer);
+
+ totalNeighbors += netDeviceContainer.GetN ();
+ }
+
+ return totalNeighbors;
+}
+
+Ptr<BridgeNetDevice>
+Ipv4NixVectorRouting::NetDeviceIsBridged (Ptr<NetDevice> nd) const
+{
+ NS_LOG_FUNCTION (nd);
+
+ Ptr<Node> node = nd->GetNode ();
+ uint32_t nDevices = node->GetNDevices();
+
+ //
+ // There is no bit on a net device that says it is being bridged, so we have
+ // to look for bridges on the node to which the device is attached. If we
+ // find a bridge, we need to look through its bridge ports (the devices it
+ // bridges) to see if we find the device in question.
+ //
+ for (uint32_t i = 0; i < nDevices; ++i)
+ {
+ Ptr<NetDevice> ndTest = node->GetDevice(i);
+ NS_LOG_LOGIC ("Examine device " << i << " " << ndTest);
+
+ if (ndTest->IsBridge ())
+ {
+ NS_LOG_LOGIC ("device " << i << " is a bridge net device");
+ Ptr<BridgeNetDevice> bnd = ndTest->GetObject<BridgeNetDevice> ();
+ NS_ABORT_MSG_UNLESS (bnd, "Ipv4NixVectorRouting::NetDeviceIsBridged (): GetObject for <BridgeNetDevice> failed");
+
+ for (uint32_t j = 0; j < bnd->GetNBridgePorts (); ++j)
+ {
+ NS_LOG_LOGIC ("Examine bridge port " << j << " " << bnd->GetBridgePort (j));
+ if (bnd->GetBridgePort (j) == nd)
+ {
+ NS_LOG_LOGIC ("Net device " << nd << " is bridged by " << bnd);
+ return bnd;
+ }
+ }
+ }
+ }
+ NS_LOG_LOGIC ("Net device " << nd << " is not bridged");
+ return 0;
+}
+
+uint32_t
+Ipv4NixVectorRouting::FindNetDeviceForNixIndex (uint32_t nodeIndex, Ipv4Address & gatewayIp)
+{
+ uint32_t numberOfDevices = m_node->GetNDevices ();
+ uint32_t index = 0;
+ uint32_t totalNeighbors = 0;
+
+ // scan through the net devices on the parent node
+ // and then look at the nodes adjacent to them
+ for (uint32_t i = 0; i < numberOfDevices; i++)
+ {
+ // Get a net device from the node
+ // as well as the channel, and figure
+ // out the adjacent net devices
+ Ptr<NetDevice> localNetDevice = m_node->GetDevice (i);
+ Ptr<Channel> channel = localNetDevice->GetChannel ();
+ if (channel == 0)
+ {
+ continue;
+ }
+
+ // this function takes in the local net dev, and channnel, and
+ // writes to the netDeviceContainer the adjacent net devs
+ NetDeviceContainer netDeviceContainer;
+ GetAdjacentNetDevices (localNetDevice, channel, netDeviceContainer);
+
+ // check how many neighbors we have
+ if (nodeIndex < (totalNeighbors + netDeviceContainer.GetN ()))
+ {
+ // found the proper net device
+ index = i;
+ Ptr<NetDevice> gatewayDevice = netDeviceContainer.Get (nodeIndex-totalNeighbors);
+ Ptr<Node> gatewayNode = gatewayDevice->GetNode ();
+ Ptr<Ipv4> ipv4 = gatewayNode->GetObject<Ipv4> ();
+
+ uint32_t interfaceIndex = (ipv4)->GetInterfaceForDevice(gatewayDevice);
+ Ipv4InterfaceAddress ifAddr = ipv4->GetAddress (interfaceIndex, 0);
+ gatewayIp = ifAddr.GetLocal ();
+ break;
+ }
+ totalNeighbors += netDeviceContainer.GetN ();
+ }
+
+ return index;
+}
+
+Ptr<Ipv4Route>
+Ipv4NixVectorRouting::RouteOutput (Ptr<Packet> p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ Ptr<Ipv4Route> rtentry;
+ Ptr<NixVector> nixVectorInCache;
+ Ptr<NixVector> nixVectorForPacket;
+
+ NS_LOG_DEBUG ("Dest IP from header: " << header.GetDestination ());
+ // check if cache
+ nixVectorInCache = GetNixVectorInCache(header.GetDestination ());
+
+ // not in cache
+ if (!nixVectorInCache)
+ {
+ NS_LOG_LOGIC ("Nix-vector not in cache, build: ");
+ // Build the nix-vector, given this node and the
+ // dest IP address
+ nixVectorInCache = GetNixVector (m_node, header.GetDestination ());
+
+ // cache it
+ m_nixCache.insert (NixMap_t::value_type (header.GetDestination (), nixVectorInCache));
+ }
+
+ // path exists
+ if (nixVectorInCache)
+ {
+ NS_LOG_LOGIC ("Nix-vector contents: " << *nixVectorInCache);
+
+ // create a new nix vector to be used,
+ // we want to keep the cached version clean
+ nixVectorForPacket = CreateObject<NixVector> ();
+ nixVectorForPacket = nixVectorInCache->Copy();
+
+ // Get the interface number that we go out of, by extracting
+ // from the nix-vector
+ if (m_totalNeighbors == 0)
+ {
+ m_totalNeighbors = FindTotalNeighbors ();
+ }
+
+ // Get the interface number that we go out of, by extracting
+ // from the nix-vector
+ uint32_t numberOfBits = nixVectorForPacket->BitCount (m_totalNeighbors);
+ uint32_t nodeIndex = nixVectorForPacket->ExtractNeighborIndex (numberOfBits);
+
+ // Possibly search here in a cache for this node index
+ // and look for a Ipv4Route. If we have it, don't
+ // need to do the next 3 lines.
+ rtentry = GetIpv4RouteInCache (header.GetDestination ());
+ // not in cache
+ if (!rtentry)
+ {
+ NS_LOG_LOGIC ("Ipv4Route not in cache, build: ");
+ Ipv4Address gatewayIp;
+ uint32_t index = FindNetDeviceForNixIndex (nodeIndex, gatewayIp);
+
+ uint32_t interfaceIndex = (m_ipv4)->GetInterfaceForDevice(m_node->GetDevice(index));
+ Ipv4InterfaceAddress ifAddr = m_ipv4->GetAddress (interfaceIndex, 0);
+
+ // start filling in the Ipv4Route info
+ rtentry = Create<Ipv4Route> ();
+ rtentry->SetSource (ifAddr.GetLocal ());
+
+ rtentry->SetGateway (gatewayIp);
+ rtentry->SetDestination (header.GetDestination ());
+ rtentry->SetOutputDevice (m_ipv4->GetNetDevice (interfaceIndex));
+
+ sockerr = Socket::ERROR_NOTERROR;
+
+ // add rtentry to cache
+ m_ipv4RouteCache.insert(Ipv4RouteMap_t::value_type(header.GetDestination (), rtentry));
+ }
+
+ NS_LOG_LOGIC ("Nix-vector contents: " << *nixVectorInCache << " : Remaining bits: " << nixVectorForPacket->GetRemainingBits());
+
+ // Add nix-vector in the packet class
+ // make sure the packet exists first
+ if (p)
+ {
+ NS_LOG_LOGIC ("Adding Nix-vector to packet: " << *nixVectorForPacket);
+ p->SetNixVector (nixVectorForPacket);
+ }
+ }
+ else // path doesn't exist
+ {
+ NS_LOG_ERROR ("No path to the dest: " << header.GetDestination ());
+ sockerr = Socket::ERROR_NOROUTETOHOST;
+ }
+
+ return rtentry;
+}
+
+bool
+Ipv4NixVectorRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
+ UnicastForwardCallback ucb, MulticastForwardCallback mcb,
+ LocalDeliverCallback lcb, ErrorCallback ecb)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ Ptr<Ipv4Route> rtentry;
+
+ // Get the nix-vector from the packet
+ Ptr<NixVector> nixVector = p->GetNixVector();
+
+ // make sure it exists, if not something
+ // went wrong
+ if (!nixVector)
+ {
+ NS_LOG_ERROR ("Nix-vector wasn't in the packet! Rebuild.");
+
+ Ptr<NixVector> nixVectorInCache;
+
+ NS_LOG_DEBUG ("Dest IP from header: " << header.GetDestination ());
+
+ // check if cache
+ nixVectorInCache = GetNixVectorInCache(header.GetDestination ());
+
+ // not in cache
+ if (!nixVectorInCache)
+ {
+ NS_LOG_LOGIC ("RouteInput(): Nix-vector not in cache, build: ");
+
+ // Build the nix-vector, given this node and the
+ // dest IP address
+ nixVectorInCache = GetNixVector (m_node, header.GetDestination ());
+ }
+
+ // path exists
+ if (nixVectorInCache)
+ {
+ NS_LOG_LOGIC ("Nix-vector contents: " << *nixVectorInCache);
+
+ // cache it
+ m_nixCache.insert(NixMap_t::value_type(header.GetDestination (), nixVectorInCache));
+
+ // create a new nix vector to be used,
+ // we want to keep the cached version clean
+ Ptr<NixVector> nixVectorForPacket;
+ nixVectorForPacket = CreateObject<NixVector> ();
+ nixVectorForPacket = nixVectorInCache->Copy();
+
+ // Get the interface number that we go out of, by extracting
+ // from the nix-vector
+ if (m_totalNeighbors == 0)
+ {
+ m_totalNeighbors = FindTotalNeighbors ();
+ }
+ uint32_t numberOfBits = nixVectorForPacket->BitCount (m_totalNeighbors);
+ uint32_t nodeIndex = nixVectorForPacket->ExtractNeighborIndex (numberOfBits);
+
+ rtentry = GetIpv4RouteInCache (header.GetDestination ());
+ // not in cache
+ if (!rtentry)
+ {
+ NS_LOG_LOGIC ("Ipv4Route not in cache, build: ");
+ Ipv4Address gatewayIp;
+ uint32_t index = FindNetDeviceForNixIndex (nodeIndex, gatewayIp);
+
+ uint32_t interfaceIndex = (m_ipv4)->GetInterfaceForDevice(m_node->GetDevice(index));
+ Ipv4InterfaceAddress ifAddr = m_ipv4->GetAddress (interfaceIndex, 0);
+
+ // start filling in the Ipv4Route info
+ rtentry = Create<Ipv4Route> ();
+ rtentry->SetSource (ifAddr.GetLocal ());
+
+ rtentry->SetGateway (Ipv4Address(gatewayIp));
+ rtentry->SetDestination (header.GetDestination ());
+ rtentry->SetOutputDevice (m_ipv4->GetNetDevice (interfaceIndex));
+
+ // add rtentry to cache
+ m_ipv4RouteCache.insert(Ipv4RouteMap_t::value_type(header.GetDestination (), rtentry));
+ }
+
+ NS_LOG_LOGIC ("Nix-vector contents: " << *nixVectorInCache << " : Remaining bits: " << nixVectorForPacket->GetRemainingBits());
+
+ // Add nix-vector in the packet class
+ // have to copy the packet first b/c
+ // it is const
+ Ptr<Packet> newPacket = Create<Packet> ();
+ newPacket = p->Copy();
+
+ NS_LOG_LOGIC ("Adding Nix-vector to packet: " << *nixVectorForPacket);
+ newPacket->SetNixVector(nixVectorForPacket);
+
+ // call the unicast callback
+ // local deliver is handled by Ipv4StaticRoutingImpl
+ // so this code is never even called if the packet is
+ // destined for this node.
+ ucb (rtentry, newPacket, header);
+ return true;
+ }
+ else // path doesn't exist
+ {
+ NS_LOG_ERROR ("No path to the dest: " << header.GetDestination ());
+ return false;
+ }
+ }
+ else
+ {
+ // Get the interface number that we go out of, by extracting
+ // from the nix-vector
+ if (m_totalNeighbors == 0)
+ {
+ m_totalNeighbors = FindTotalNeighbors ();
+ }
+ uint32_t numberOfBits = nixVector->BitCount (m_totalNeighbors);
+ uint32_t nodeIndex = nixVector->ExtractNeighborIndex (numberOfBits);
+
+ rtentry = GetIpv4RouteInCache (header.GetDestination ());
+ // not in cache
+ if (!rtentry)
+ {
+ NS_LOG_LOGIC ("Ipv4Route not in cache, build: ");
+ Ipv4Address gatewayIp;
+ uint32_t index = FindNetDeviceForNixIndex (nodeIndex, gatewayIp);
+ uint32_t interfaceIndex = (m_ipv4)->GetInterfaceForDevice(m_node->GetDevice(index));
+ Ipv4InterfaceAddress ifAddr = m_ipv4->GetAddress (interfaceIndex, 0);
+
+ // start filling in the Ipv4Route info
+ rtentry = Create<Ipv4Route> ();
+ rtentry->SetSource (ifAddr.GetLocal ());
+
+ rtentry->SetGateway (gatewayIp);
+ rtentry->SetDestination (header.GetDestination ());
+ rtentry->SetOutputDevice (m_ipv4->GetNetDevice (interfaceIndex));
+
+ // add rtentry to cache
+ m_ipv4RouteCache.insert(Ipv4RouteMap_t::value_type(header.GetDestination (), rtentry));
+ }
+
+ NS_LOG_LOGIC ("At Node " << m_node->GetId() << ", Extracting " << numberOfBits <<
+ " bits from Nix-vector: " << nixVector << " : " << *nixVector);
+
+ // call the unicast callback
+ // local deliver is handled by Ipv4StaticRoutingImpl
+ // so this code is never even called if the packet is
+ // destined for this node.
+ ucb (rtentry, p, header);
+
+ return true;
+ }
+}
+
+// virtual functions from Ipv4RoutingProtocol
+void
+Ipv4NixVectorRouting::NotifyInterfaceUp (uint32_t i)
+{
+ FlushGlobalNixRoutingCache ();
+}
+void
+Ipv4NixVectorRouting::NotifyInterfaceDown (uint32_t i)
+{
+ FlushGlobalNixRoutingCache ();
+}
+void
+Ipv4NixVectorRouting::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address)
+{
+ FlushGlobalNixRoutingCache ();
+}
+void
+Ipv4NixVectorRouting::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address)
+{
+ FlushGlobalNixRoutingCache ();
+}
+
+bool
+Ipv4NixVectorRouting::BFS (uint32_t numberOfNodes, Ptr<Node> source, Ptr<Node> dest, std::vector< Ptr<Node> > & parentVector)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+
+ NS_LOG_LOGIC ("Going from Node " << source->GetId() << " to Node " << dest->GetId());
+ std::queue< Ptr<Node> > greyNodeList; // discovered nodes with unexplored children
+
+ // reset the parent vector
+ parentVector.clear ();
+ parentVector.reserve (sizeof (Ptr<Node>)*numberOfNodes);
+ parentVector.insert (parentVector.begin (), sizeof (Ptr<Node>)*numberOfNodes, 0); // initialize to 0
+
+ // Add the source node to the queue, set its parent to itself
+ greyNodeList.push (source);
+ parentVector.at (source->GetId()) = source;
+
+ // BFS loop
+ while (greyNodeList.size () != 0)
+ {
+ Ptr<Node> currNode = greyNodeList.front ();
+ Ptr<Ipv4> ipv4 = currNode->GetObject<Ipv4> ();
+
+ if (currNode == dest)
+ {
+ NS_LOG_LOGIC ("Made it to Node " << currNode->GetId());
+ return true;
+ }
+
+
+ // Iterate over the current node's adjacent vertices
+ // and push them into the queue
+ for (uint32_t i = 0; i < (currNode->GetNDevices ()); i++)
+ {
+ // Get a net device from the node
+ // as well as the channel, and figure
+ // out the adjacent net device
+ Ptr<NetDevice> localNetDevice = currNode->GetDevice (i);
+
+ // make sure that we can go this way
+ if (ipv4)
+ {
+ uint32_t interfaceIndex = (ipv4)->GetInterfaceForDevice(currNode->GetDevice(i));
+ if (!(ipv4->IsUp (interfaceIndex)))
+ {
+ NS_LOG_LOGIC ("Ipv4Interface is down");
+ continue;
+ }
+ }
+ if (!(localNetDevice->IsLinkUp ()))
+ {
+ NS_LOG_LOGIC ("Link is down.");
+ continue;
+ }
+ Ptr<Channel> channel = localNetDevice->GetChannel ();
+ if (channel == 0)
+ {
+ continue;
+ }
+
+ // this function takes in the local net dev, and channnel, and
+ // writes to the netDeviceContainer the adjacent net devs
+ NetDeviceContainer netDeviceContainer;
+ GetAdjacentNetDevices (localNetDevice, channel, netDeviceContainer);
+
+ // Finally we can get the adjacent nodes
+ // and scan through them. We push them
+ // to the greyNode queue, if they aren't
+ // already there.
+ for (NetDeviceContainer::Iterator iter = netDeviceContainer.Begin (); iter != netDeviceContainer.End (); iter++)
+ {
+ Ptr<Node> remoteNode = (*iter)->GetNode ();
+
+ // check to see if this node has been pushed before
+ // by checking to see if it has a parent
+ // if it doesn't (null or 0), then set its parent and
+ // push to the queue
+ if (parentVector.at (remoteNode->GetId ()) == 0)
+ {
+ parentVector.at (remoteNode->GetId ()) = currNode;
+ greyNodeList.push (remoteNode);
+ }
+ }
+ }
+
+ // Pop off the head grey node. We have all its children.
+ // It is now black.
+ greyNodeList.pop ();
+ }
+
+ // Didn't find the dest...
+ return false;
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/routing/nix-vector-routing/ipv4-nix-vector-routing.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+#ifndef __IPV4_NIX_VECTOR_ROUTING_H__
+#define __IPV4_NIX_VECTOR_ROUTING_H__
+
+#include <map>
+
+#include "ns3/channel.h"
+#include "ns3/node-container.h"
+#include "ns3/node-list.h"
+#include "ns3/net-device-container.h"
+#include "ns3/ipv4-routing-protocol.h"
+#include "ns3/ipv4-route.h"
+#include "ns3/bridge-net-device.h"
+
+namespace ns3 {
+
+typedef std::map<Ipv4Address, Ptr<NixVector> > NixMap_t;
+typedef std::map<Ipv4Address, Ptr<Ipv4Route> > Ipv4RouteMap_t;
+
+class Ipv4NixVectorRouting : public Ipv4RoutingProtocol
+{
+ public:
+ Ipv4NixVectorRouting ();
+ ~Ipv4NixVectorRouting ();
+ /**
+ * @brief The Interface ID of the Global Router interface.
+ *
+ * @see Object::GetObject ()
+ */
+ static TypeId GetTypeId (void);
+ /**
+ * @brief Set the Node pointer of the node for which this
+ * routing protocol is to be placed
+ *
+ * @param node Node pointer
+ */
+ void SetNode (Ptr<Node>);
+
+ /**
+ * @brief Called when run-time link topology change occurs
+ * which iterates through the node list and flushes any
+ * nix vector caches
+ *
+ */
+ void FlushGlobalNixRoutingCache (void);
+
+ private:
+ /* flushes the cache which stores nix-vector based on
+ * destination IP */
+ void FlushNixCache (void);
+
+ /* flushes the cache which stores the Ipv4 route
+ * based on the destination IP */
+ void FlushIpv4RouteCache (void);
+
+ /* upon a run-time topology change caches are
+ * flushed and the total number of neighbors is
+ * reset to zero */
+ void ResetTotalNeighbors (void);
+
+ /* takes in the source node and dest IP and calls GetNodeByIp,
+ * BFS, and BuildNixVector to finally return the built
+ * nix-vector */
+ Ptr<NixVector> GetNixVector (Ptr<Node>, Ipv4Address);
+
+ /* checks the cache based on dest IP for the nix-vector */
+ Ptr<NixVector> GetNixVectorInCache (Ipv4Address);
+
+ /* checks the cache based on dest IP for the Ipv4Route */
+ Ptr<Ipv4Route> GetIpv4RouteInCache (Ipv4Address);
+
+ /* given a net-device returns all the adjacent net-devices,
+ * essentially getting the neighbors on that channel */
+ void GetAdjacentNetDevices (Ptr<NetDevice>, Ptr<Channel>, NetDeviceContainer &);
+
+ /* iterates through the node list and finds the one
+ * corresponding to the given Ipv4Address */
+ Ptr<Node> GetNodeByIp (Ipv4Address);
+
+ /* Recurses the parent vector, created by BFS and actually builds the nixvector */
+ bool BuildNixVector (const std::vector< Ptr<Node> > & parentVector, uint32_t source, uint32_t dest, Ptr<NixVector> nixVector);
+
+ /* special variation of BuildNixVector for when a node is sending to itself */
+ bool BuildNixVectorLocal (Ptr<NixVector> nixVector);
+
+ /* simple iterates through the nodes net-devices and determines
+ * how many neighbors it has */
+ uint32_t FindTotalNeighbors (void);
+
+ /* determine if the netdevice is bridged */
+ Ptr<BridgeNetDevice> NetDeviceIsBridged (Ptr<NetDevice> nd) const;
+
+
+ /* Nix index is with respect to the neighbors. The net-device index must be
+ * derived from this */
+ uint32_t FindNetDeviceForNixIndex (uint32_t nodeIndex, Ipv4Address & gatewayIp);
+
+ /* Breadth first search algorithm
+ * Param1: Vector containing all nodes in the graph
+ * Param2: Source Node
+ * Param3: Dest Node
+ * Param4: (returned) Parent vector for retracing routes
+ * Returns: false if dest not found, true o.w.
+ */
+ bool BFS (uint32_t numberOfNodes,
+ Ptr<Node> source,
+ Ptr<Node> dest,
+ std::vector< Ptr<Node> > & parentVector);
+
+ void DoDispose (void);
+
+ /* From Ipv4RoutingProtocol */
+ virtual Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr);
+ virtual bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
+ UnicastForwardCallback ucb, MulticastForwardCallback mcb,
+ LocalDeliverCallback lcb, ErrorCallback ecb);
+ virtual void NotifyInterfaceUp (uint32_t interface);
+ virtual void NotifyInterfaceDown (uint32_t interface);
+ virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address);
+ virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
+ virtual void SetIpv4 (Ptr<Ipv4> ipv4);
+
+
+ /* cache stores nix-vectors based on destination ip */
+ NixMap_t m_nixCache;
+
+ /* cache stores Ipv4Routes based on destination ip */
+ Ipv4RouteMap_t m_ipv4RouteCache;
+
+ Ptr<Ipv4> m_ipv4;
+ Ptr<Node> m_node;
+
+ /* total neighbors used for nix-vector to determine
+ * number of bits */
+ uint32_t m_totalNeighbors;
+};
+} // namepace ns3
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/routing/nix-vector-routing/nix-vector-routing.h Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 The Georgia Institute of Technology
+ *
+ * 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
+ *
+ * Authors: Josh Pelkey <jpelkey@gatech.edu>
+ */
+
+/**
+ * \ingroup routing
+ * \defgroup nixvectorrouting Nix-vector Routing
+ *
+ * \section model Model
+ *
+ * Nix-vector routing is a simulation specific routing protocol and is
+ * intended for large network topologies. The on-demand nature of this
+ * protocol as well as the low-memory footprint of the nix-vector provides
+ * improved performance in terms of memory usage and simulation run time
+ * when dealing with a large number of nodes.
+ *
+ * Currently, the ns-3 model of nix-vector routing supports IPv4 p2p links
+ * as well as CSMA links. It does not (yet) provide support for
+ * efficient adaptation to link failures. It simply flushes all nix-vector
+ * routing caches. Finally, IPv6 is not supported.
+ *
+ * \section api API and Usage
+ *
+ * Nix-vector routing has been rolled into a helper class. In order to
+ * utilize these helper functions, users must include ns3/helper-module.h.
+ * The Nix-vector routing protocol must be added to a list of routing
+ * protocols. It is important that list routing is utilized.
+ *
+ * Example:
+ *
+ * Ipv4NixVectorHelper nixRouting;
+ * Ipv4StaticRoutingHelper staticRouting;
+ *
+ * Ipv4ListRoutingHelper list;
+ * list.Add (staticRouting, 0);
+ * list.Add (nixRouting, 10);
+ *
+ * InternetStackHelper stack;
+ * stack.SetRoutingHelper (list);
+ * stack.Install (allNodes);
+ *
+ * \section impl Implementation
+ *
+ * ns-3 nix-vector-routing performs on-demand route computation using
+ * a breadth-first search and an efficient route-storage data structure
+ * known as a nix-vector. When a packet is generated at a node for
+ * transmission, the route is calculated, and the nix-vector is built.
+ * The nix-vector stores an index for each hop along the path, which
+ * corresponds to the neighbor-index. This index is used to determine
+ * which net-device and gateway should be used. To route a packet, the
+ * nix-vector must be transmitted with the packet. At each hop, the
+ * current node extracts the appropriate neighbor-index from the
+ * nix-vector and transmits the packet through the corresponding
+ * net-device. This continues until the packet reaches the destination.
+ * */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/routing/nix-vector-routing/waf Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,1 @@
+exec "`dirname "$0"`"/../../../waf "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/routing/nix-vector-routing/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -0,0 +1,15 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ module = bld.create_ns3_module('nix-vector-routing', ['internet-stack', 'contrib'])
+ module.includes = '.'
+ module.source = [
+ 'ipv4-nix-vector-routing.cc',
+ ]
+
+ headers = bld.new_task_gen('ns3header')
+ headers.module = 'nix-vector-routing'
+ headers.source = [
+ 'ipv4-nix-vector-routing.h',
+ ]
+
--- a/src/routing/static-routing/ipv4-routing-table-entry.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/static-routing/ipv4-routing-table-entry.h Thu Sep 24 10:57:41 2009 -0400
@@ -193,6 +193,7 @@
*/
uint32_t GetNOutputInterfaces (void) const;
/**
+ * \param n interface index
* \return A specified output interface.
*/
uint32_t GetOutputInterface (uint32_t n) const;
--- a/src/routing/static-routing/ipv6-routing-table-entry.cc Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/static-routing/ipv6-routing-table-entry.cc Thu Sep 24 10:57:41 2009 -0400
@@ -18,8 +18,9 @@
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
*/
+#include "ns3/assert.h"
+
#include "ipv6-routing-table-entry.h"
-#include "ns3/assert.h"
namespace ns3
{
--- a/src/routing/static-routing/ipv6-static-routing.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/routing/static-routing/ipv6-static-routing.h Thu Sep 24 10:57:41 2009 -0400
@@ -21,8 +21,9 @@
#ifndef IPV6_STATIC_ROUTING_H
#define IPV6_STATIC_ROUTING_H
+#include <stdint.h>
+
#include <list>
-#include <stdint.h>
#include "ns3/ptr.h"
#include "ns3/ipv6-address.h"
@@ -57,7 +58,7 @@
public:
/**
* \brief The interface Id associated with this class.
- * \return type identificator
+ * \return type identifier
*/
static TypeId GetTypeId ();
--- a/src/simulator/nstime.h Tue Sep 15 16:25:49 2009 -0400
+++ b/src/simulator/nstime.h Thu Sep 24 10:57:41 2009 -0400
@@ -535,6 +535,7 @@
* Time t = Seconds (2.0);
* Simulator::Schedule (NanoSeconds (5.0), ...);
* \endcode
+ * \param seconds seconds value
*/
Time Seconds (double seconds);
@@ -546,6 +547,7 @@
* Time t = MilliSeconds (2);
* Simulator::Schedule (MilliSeconds (5), ...);
* \endcode
+ * \param ms milliseconds value
*/
Time MilliSeconds (uint64_t ms);
/**
@@ -556,6 +558,7 @@
* Time t = MicroSeconds (2);
* Simulator::Schedule (MicroSeconds (5), ...);
* \endcode
+ * \param us microseconds value
*/
Time MicroSeconds (uint64_t us);
/**
@@ -566,6 +569,7 @@
* Time t = NanoSeconds (2);
* Simulator::Schedule (NanoSeconds (5), ...);
* \endcode
+ * \param ns nanoseconds value
*/
Time NanoSeconds (uint64_t ns);
/**
@@ -576,6 +580,7 @@
* Time t = PicoSeconds (2);
* Simulator::Schedule (PicoSeconds (5), ...);
* \endcode
+ * \param ps picoseconds value
*/
Time PicoSeconds (uint64_t ps);
/**
@@ -586,6 +591,7 @@
* Time t = FemtoSeconds (2);
* Simulator::Schedule (FemtoSeconds (5), ...);
* \endcode
+ * \param fs femtoseconds value
*/
Time FemtoSeconds (uint64_t fs);
--- a/src/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/src/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -27,6 +27,7 @@
'applications/onoff',
'applications/packet-sink',
'applications/udp-echo',
+ 'routing/nix-vector-routing',
'routing/olsr',
'routing/global-routing',
'routing/static-routing',
@@ -43,6 +44,8 @@
'applications/radvd',
'test/ns3tcp',
'test/ns3wifi',
+ 'contrib/flow-monitor',
+ 'contrib/net-anim',
)
def set_options(opt):
--- a/wscript Tue Sep 15 16:25:49 2009 -0400
+++ b/wscript Thu Sep 24 10:57:41 2009 -0400
@@ -569,7 +569,7 @@
if Options.options.check:
Options.options.compile_targets += ',run-tests'
if env['ENABLE_PYTHON_BINDINGS']:
- Options.options.compile_targets += ',ns3module'
+ Options.options.compile_targets += ',ns3module,pybindgen-command'
_run_check(bld)
if Options.options.doxygen_no_build: