From 6493da4fd5e88830c4a49c3359dc47d475a88701 Mon Sep 17 00:00:00 2001 From: Antti Makela Date: Sat, 22 Aug 2009 14:58:27 -0700 Subject: [PATCH 01/43] [bug 634] patch to grab prefix length from Ipv4Mask --- src/node/ipv4-address.cc | 14 ++++++++++++++ src/node/ipv4-address.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index 28d26838d..d55e187f8 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -133,6 +133,20 @@ Ipv4Mask::GetOnes (void) return ones; } +uint16_t +Ipv4Mask::GetPrefixLength (void) const +{ + uint16_t tmp = 0; + uint32_t mask = m_mask; + while (mask != 0 ) + { + mask = mask << 1; + tmp++; + } + return tmp; +} + + Ipv4Address::Ipv4Address () : m_address (0x66666666) {} diff --git a/src/node/ipv4-address.h b/src/node/ipv4-address.h index ad6a0c5e9..1f3a9cfb7 100644 --- a/src/node/ipv4-address.h +++ b/src/node/ipv4-address.h @@ -237,6 +237,10 @@ public: * \param os The output stream to which this Ipv4Address is printed */ void Print (std::ostream &os) const; + /** + * \return the prefix length of mask (the yy in x.x.x.x/yy notation) + */ + uint16_t GetPrefixLength (void) const; /** * \return the 255.0.0.0 mask corresponding to a typical loopback address */ From 18c4ed4f1020cfbb223b66485d0214a18582d15e Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sat, 22 Aug 2009 15:32:30 -0700 Subject: [PATCH 02/43] allow Ipv4Mask constructor to accept a string /32, /24 etc. in constructor --- examples/static-routing-slash32.cc | 4 ++-- src/node/ipv4-address.cc | 12 +++++++++++- src/node/ipv4-address.h | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/static-routing-slash32.cc b/examples/static-routing-slash32.cc index dc6d62499..e2978d1cb 100644 --- a/examples/static-routing-slash32.cc +++ b/examples/static-routing-slash32.cc @@ -87,12 +87,12 @@ main (int argc, char *argv[]) int32_t ifIndexA = ipv4A->AddInterface (deviceA); int32_t ifIndexC = ipv4C->AddInterface (deviceC); - Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("255.255.255.255")); + Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("/32")); ipv4A->AddAddress (ifIndexA, ifInAddrA); ipv4A->SetMetric (ifIndexA, 1); ipv4A->SetUp (ifIndexA); - Ipv4InterfaceAddress ifInAddrC = Ipv4InterfaceAddress (Ipv4Address ("192.168.1.1"), Ipv4Mask ("255.255.255.255")); + Ipv4InterfaceAddress ifInAddrC = Ipv4InterfaceAddress (Ipv4Address ("192.168.1.1"), Ipv4Mask ("/32")); ipv4C->AddAddress (ifIndexC, ifInAddrC); ipv4C->SetMetric (ifIndexC, 1); ipv4C->SetUp (ifIndexC); diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index d55e187f8..7424369f8 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -28,6 +28,7 @@ namespace ns3 { #define ASCII_DOT (0x2e) #define ASCII_ZERO (0x30) +#define ASCII_SLASH (0x2f) static uint32_t AsciiToIpv4Host (char const *address) @@ -63,9 +64,18 @@ Ipv4Mask::Ipv4Mask () Ipv4Mask::Ipv4Mask (uint32_t mask) : m_mask (mask) {} + Ipv4Mask::Ipv4Mask (char const *mask) { - m_mask = AsciiToIpv4Host (mask); + if (*mask == ASCII_SLASH) + { + m_mask = static_cast (atoi (++mask)); + NS_ASSERT (m_mask <= 32); + } + else + { + m_mask = AsciiToIpv4Host (mask); + } } bool diff --git a/src/node/ipv4-address.h b/src/node/ipv4-address.h index 1f3a9cfb7..5ce91964f 100644 --- a/src/node/ipv4-address.h +++ b/src/node/ipv4-address.h @@ -198,11 +198,26 @@ private: * \ingroup address * * \brief a class to represent an Ipv4 address mask + * + * The constructor takes arguments according to a few formats. + * Ipv4Mask ("255.255.255.255"), Ipv4Mask ("/32"), and Ipv4Mask (0xffffffff) + * are all equivalent. */ class Ipv4Mask { public: + /** + * Will initialize to a garbage value (0x66666666) + */ Ipv4Mask (); + /** + * param mask bitwise integer representation of the mask + * + * For example, the integer input 0xffffff00 yields a 24-bit mask + */ Ipv4Mask (uint32_t mask); + /** + * \param mask String constant either in "255.255.255.0" or "/24" format + */ Ipv4Mask (char const *mask); /** * \param a first address to compare From 2276ac9097ee421c68af62d3b99961275726de41 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sat, 22 Aug 2009 15:35:15 -0700 Subject: [PATCH 03/43] coding style cleanup --- src/node/ipv4-address.cc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index 7424369f8..b3a3943f7 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -34,21 +34,23 @@ static uint32_t AsciiToIpv4Host (char const *address) { uint32_t host = 0; - while (true) { - uint8_t byte = 0; - while (*address != ASCII_DOT && - *address != 0) { - byte *= 10; - byte += *address - ASCII_ZERO; + while (true) + { + uint8_t byte = 0; + while (*address != ASCII_DOT && *address != 0) + { + byte *= 10; + byte += *address - ASCII_ZERO; + address++; + } + host <<= 8; + host |= byte; + if (*address == 0) + { + break; + } address++; } - host <<= 8; - host |= byte; - if (*address == 0) { - break; - } - address++; - } return host; } From 40359e3f555c48eda295eaddb15b32cd34d82d8c Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sat, 22 Aug 2009 15:38:32 -0700 Subject: [PATCH 04/43] Rescan bindings --- bindings/python/ns3_module_core.py | 8 +- bindings/python/ns3_module_node.py | 5 + bindings/python/ns3_module_olsr.py | 4 +- bindings/python/ns3_module_wifi.py | 184 +++++++++++++++++++---------- 4 files changed, 131 insertions(+), 70 deletions(-) diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index 9b0535a14..aba99b33b 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -2199,7 +2199,7 @@ def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): cls.add_method('ConnectWithoutContext', 'void', [param('ns3::CallbackBase const &', 'cb')]) - ## traced-value.h: void ns3::TracedValue::Connect(ns3::CallbackBase const & cb, std::string path) [member function] + ## traced-value.h: void ns3::TracedValue::Connect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] cls.add_method('Connect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) @@ -2207,7 +2207,7 @@ def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): cls.add_method('DisconnectWithoutContext', 'void', [param('ns3::CallbackBase const &', 'cb')]) - ## traced-value.h: void ns3::TracedValue::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function] + ## traced-value.h: void ns3::TracedValue::Disconnect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] cls.add_method('Disconnect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) @@ -2375,7 +2375,7 @@ def register_functions(root_module): 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', @@ -2395,7 +2395,7 @@ def register_functions(root_module): 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', diff --git a/bindings/python/ns3_module_node.py b/bindings/python/ns3_module_node.py index a3a3110f2..78f0f3a59 100644 --- a/bindings/python/ns3_module_node.py +++ b/bindings/python/ns3_module_node.py @@ -650,6 +650,11 @@ def register_Ns3Ipv4Mask_methods(root_module, cls): 'ns3::Ipv4Mask', [], is_static=True) + ## ipv4-address.h: uint16_t ns3::Ipv4Mask::GetPrefixLength() const [member function] + cls.add_method('GetPrefixLength', + 'uint16_t', + [], + is_const=True) ## ipv4-address.h: static ns3::Ipv4Mask ns3::Ipv4Mask::GetZero() [member function] cls.add_method('GetZero', 'ns3::Ipv4Mask', diff --git a/bindings/python/ns3_module_olsr.py b/bindings/python/ns3_module_olsr.py index 62c38491e..a2c1ff949 100644 --- a/bindings/python/ns3_module_olsr.py +++ b/bindings/python/ns3_module_olsr.py @@ -102,13 +102,13 @@ def register_types_ns3_olsr(module): module.add_container('std::vector< ns3::olsr::MessageHeader::Hello::LinkMessage >', 'ns3::olsr::MessageHeader::Hello::LinkMessage', container_type='vector') module.add_container('std::vector< ns3::olsr::MessageHeader::Hna::Association >', 'ns3::olsr::MessageHeader::Hna::Association', container_type='vector') typehandlers.add_type_alias('std::vector< ns3::olsr::DuplicateTuple, std::allocator< ns3::olsr::DuplicateTuple > >', 'ns3::olsr::DuplicateSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::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::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::MessageHeader, std::allocator< ns3::olsr::MessageHeader > >', 'ns3::olsr::MessageList') typehandlers.add_type_alias('std::vector< ns3::olsr::IfaceAssocTuple, std::allocator< ns3::olsr::IfaceAssocTuple > >', 'ns3::olsr::IfaceAssocSet') - typehandlers.add_type_alias('std::vector< ns3::olsr::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >', 'ns3::olsr::NeighborSet') typehandlers.add_type_alias('std::vector< ns3::olsr::TwoHopNeighborTuple, std::allocator< ns3::olsr::TwoHopNeighborTuple > >', 'ns3::olsr::TwoHopNeighborSet') - typehandlers.add_type_alias('std::vector< ns3::olsr::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') def register_methods(root_module): diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py index 06aa9f6e5..211a8fe2f 100644 --- a/bindings/python/ns3_module_wifi.py +++ b/bindings/python/ns3_module_wifi.py @@ -10,7 +10,7 @@ def register_types(module): ## wifi-phy-standard.h: ns3::WifiPhyStandard [enumeration] module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211_10Mhz', 'WIFI_PHY_STANDARD_80211_5Mhz', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_UNKNOWN']) ## qos-utils.h: ns3::AccessClass [enumeration] - module.add_enum('AccessClass', ['AC_VO', 'AC_VI', 'AC_BE', 'AC_BK', 'AC_UNDEF']) + module.add_enum('AccessClass', ['AC_VO', 'AC_VI', 'AC_BE', 'AC_BK', 'AC_BE_NQOS', 'AC_UNDEF']) ## edca-txop-n.h: ns3::TypeOfStation [enumeration] module.add_enum('TypeOfStation', ['STA', 'AP', 'ADHOC_STA']) ## capability-information.h: ns3::CapabilityInformation [class] @@ -123,10 +123,10 @@ def register_types(module): module.add_class('ConstantRateWifiManager', parent=root_module['ns3::WifiRemoteStationManager']) ## propagation-delay-model.h: ns3::ConstantSpeedPropagationDelayModel [class] module.add_class('ConstantSpeedPropagationDelayModel', parent=root_module['ns3::PropagationDelayModel']) - ## dca-txop.h: ns3::DcaTxop [class] - module.add_class('DcaTxop', parent=root_module['ns3::Object']) + ## dcf.h: ns3::Dcf [class] + module.add_class('Dcf', parent=root_module['ns3::Object']) ## edca-txop-n.h: ns3::EdcaTxopN [class] - module.add_class('EdcaTxopN', parent=root_module['ns3::Object']) + module.add_class('EdcaTxopN', parent=root_module['ns3::Dcf']) ## error-rate-model.h: ns3::ErrorRateModel [class] module.add_class('ErrorRateModel', parent=root_module['ns3::Object']) ## propagation-loss-model.h: ns3::FixedRssLossModel [class] @@ -173,6 +173,8 @@ def register_types(module): module.add_class('YansWifiChannel', parent=root_module['ns3::WifiChannel']) ## aarf-wifi-manager.h: ns3::AarfWifiManager [class] module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager']) + ## dca-txop.h: ns3::DcaTxop [class] + module.add_class('DcaTxop', parent=root_module['ns3::Dcf']) typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >', 'ns3::MinstrelRate') typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >', 'ns3::SampleRate') typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >', 'ns3::Thresholds') @@ -279,7 +281,7 @@ def register_methods(root_module): register_Ns3ArfWifiManager_methods(root_module, root_module['ns3::ArfWifiManager']) register_Ns3ConstantRateWifiManager_methods(root_module, root_module['ns3::ConstantRateWifiManager']) register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, root_module['ns3::ConstantSpeedPropagationDelayModel']) - register_Ns3DcaTxop_methods(root_module, root_module['ns3::DcaTxop']) + register_Ns3Dcf_methods(root_module, root_module['ns3::Dcf']) register_Ns3EdcaTxopN_methods(root_module, root_module['ns3::EdcaTxopN']) register_Ns3ErrorRateModel_methods(root_module, root_module['ns3::ErrorRateModel']) register_Ns3FixedRssLossModel_methods(root_module, root_module['ns3::FixedRssLossModel']) @@ -304,6 +306,7 @@ def register_methods(root_module): register_Ns3YansErrorRateModel_methods(root_module, root_module['ns3::YansErrorRateModel']) register_Ns3YansWifiChannel_methods(root_module, root_module['ns3::YansWifiChannel']) register_Ns3AarfWifiManager_methods(root_module, root_module['ns3::AarfWifiManager']) + register_Ns3DcaTxop_methods(root_module, root_module['ns3::DcaTxop']) return def register_Ns3CapabilityInformation_methods(root_module, cls): @@ -2290,6 +2293,11 @@ def register_Ns3WifiMac_methods(root_module, cls): cls.add_method('ConfigureStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')]) + ## wifi-mac.h: void ns3::WifiMac::ConfigureDcf(ns3::Ptr dcf, uint32_t cwmin, uint32_t cwmax, ns3::AccessClass ac) [member function] + cls.add_method('ConfigureDcf', + 'void', + [param('ns3::Ptr< ns3::Dcf >', 'dcf'), param('uint32_t', 'cwmin'), param('uint32_t', 'cwmax'), param('ns3::AccessClass', 'ac')], + visibility='protected') ## wifi-mac.h: void ns3::WifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('FinishConfigureStandard', 'void', @@ -3683,78 +3691,46 @@ def register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, cls): is_const=True) return -def register_Ns3DcaTxop_methods(root_module, cls): - ## dca-txop.h: static ns3::TypeId ns3::DcaTxop::GetTypeId() [member function] +def register_Ns3Dcf_methods(root_module, cls): + ## dcf.h: ns3::Dcf::Dcf(ns3::Dcf const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Dcf const &', 'arg0')]) + ## dcf.h: ns3::Dcf::Dcf() [constructor] + cls.add_constructor([]) + ## dcf.h: static ns3::TypeId ns3::Dcf::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## dca-txop.h: ns3::DcaTxop::DcaTxop() [constructor] - cls.add_constructor([]) - ## dca-txop.h: void ns3::DcaTxop::SetLow(ns3::Ptr low) [member function] - cls.add_method('SetLow', - 'void', - [param('ns3::Ptr< ns3::MacLow >', 'low')]) - ## dca-txop.h: void ns3::DcaTxop::SetManager(ns3::DcfManager * manager) [member function] - cls.add_method('SetManager', - 'void', - [param('ns3::DcfManager *', 'manager')]) - ## dca-txop.h: void ns3::DcaTxop::SetWifiRemoteStationManager(ns3::Ptr remoteManager) [member function] - cls.add_method('SetWifiRemoteStationManager', - 'void', - [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'remoteManager')]) - ## dca-txop.h: void ns3::DcaTxop::SetTxOkCallback(ns3::Callback callback) [member function] - cls.add_method('SetTxOkCallback', - 'void', - [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## dca-txop.h: void ns3::DcaTxop::SetTxFailedCallback(ns3::Callback callback) [member function] - cls.add_method('SetTxFailedCallback', - 'void', - [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## dca-txop.h: void ns3::DcaTxop::SetMaxQueueSize(uint32_t size) [member function] - cls.add_method('SetMaxQueueSize', - 'void', - [param('uint32_t', 'size')]) - ## dca-txop.h: void ns3::DcaTxop::SetMaxQueueDelay(ns3::Time delay) [member function] - cls.add_method('SetMaxQueueDelay', - 'void', - [param('ns3::Time', 'delay')]) - ## dca-txop.h: void ns3::DcaTxop::SetMinCw(uint32_t minCw) [member function] + ## dcf.h: void ns3::Dcf::SetMinCw(uint32_t minCw) [member function] cls.add_method('SetMinCw', 'void', - [param('uint32_t', 'minCw')]) - ## dca-txop.h: void ns3::DcaTxop::SetMaxCw(uint32_t maxCw) [member function] + [param('uint32_t', 'minCw')], + is_pure_virtual=True, is_virtual=True) + ## dcf.h: void ns3::Dcf::SetMaxCw(uint32_t maxCw) [member function] cls.add_method('SetMaxCw', 'void', - [param('uint32_t', 'maxCw')]) - ## dca-txop.h: void ns3::DcaTxop::SetAifsn(uint32_t aifsn) [member function] + [param('uint32_t', 'maxCw')], + is_pure_virtual=True, is_virtual=True) + ## dcf.h: void ns3::Dcf::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', - [param('uint32_t', 'aifsn')]) - ## dca-txop.h: uint32_t ns3::DcaTxop::GetMinCw() const [member function] + [param('uint32_t', 'aifsn')], + is_pure_virtual=True, is_virtual=True) + ## dcf.h: uint32_t ns3::Dcf::GetMinCw() const [member function] cls.add_method('GetMinCw', 'uint32_t', [], - is_const=True) - ## dca-txop.h: uint32_t ns3::DcaTxop::GetMaxCw() const [member function] + is_pure_virtual=True, is_const=True, is_virtual=True) + ## dcf.h: uint32_t ns3::Dcf::GetMaxCw() const [member function] cls.add_method('GetMaxCw', 'uint32_t', [], - is_const=True) - ## dca-txop.h: uint32_t ns3::DcaTxop::GetAifsn() const [member function] + is_pure_virtual=True, is_const=True, is_virtual=True) + ## dcf.h: uint32_t ns3::Dcf::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], - is_const=True) - ## dca-txop.h: void ns3::DcaTxop::Queue(ns3::Ptr packet, ns3::WifiMacHeader const & hdr) [member function] - cls.add_method('Queue', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) - ## dca-txop.h: void ns3::DcaTxop::DoDispose() [member function] - cls.add_method('DoDispose', - 'void', - [], - visibility='private', is_virtual=True) + is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3EdcaTxopN_methods(root_module, cls): @@ -3814,30 +3790,33 @@ def register_Ns3EdcaTxopN_methods(root_module, cls): ## edca-txop-n.h: void ns3::EdcaTxopN::SetMinCw(uint32_t minCw) [member function] cls.add_method('SetMinCw', 'void', - [param('uint32_t', 'minCw')]) + [param('uint32_t', 'minCw')], + is_virtual=True) ## edca-txop-n.h: void ns3::EdcaTxopN::SetMaxCw(uint32_t maxCw) [member function] cls.add_method('SetMaxCw', 'void', - [param('uint32_t', 'maxCw')]) + [param('uint32_t', 'maxCw')], + is_virtual=True) ## edca-txop-n.h: void ns3::EdcaTxopN::SetAifsn(uint32_t aifsn) [member function] cls.add_method('SetAifsn', 'void', - [param('uint32_t', 'aifsn')]) + [param('uint32_t', 'aifsn')], + is_virtual=True) ## edca-txop-n.h: uint32_t ns3::EdcaTxopN::GetMinCw() const [member function] cls.add_method('GetMinCw', 'uint32_t', [], - is_const=True) + is_const=True, is_virtual=True) ## edca-txop-n.h: uint32_t ns3::EdcaTxopN::GetMaxCw() const [member function] cls.add_method('GetMaxCw', 'uint32_t', [], - is_const=True) + is_const=True, is_virtual=True) ## edca-txop-n.h: uint32_t ns3::EdcaTxopN::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], - is_const=True) + is_const=True, is_virtual=True) ## edca-txop-n.h: ns3::Ptr ns3::EdcaTxopN::Low() [member function] cls.add_method('Low', 'ns3::Ptr< ns3::MacLow >', @@ -5395,6 +5374,83 @@ def register_Ns3AarfWifiManager_methods(root_module, cls): visibility='private', is_virtual=True) return +def register_Ns3DcaTxop_methods(root_module, cls): + ## dca-txop.h: static ns3::TypeId ns3::DcaTxop::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## dca-txop.h: ns3::DcaTxop::DcaTxop() [constructor] + cls.add_constructor([]) + ## dca-txop.h: void ns3::DcaTxop::SetLow(ns3::Ptr low) [member function] + cls.add_method('SetLow', + 'void', + [param('ns3::Ptr< ns3::MacLow >', 'low')]) + ## dca-txop.h: void ns3::DcaTxop::SetManager(ns3::DcfManager * manager) [member function] + cls.add_method('SetManager', + 'void', + [param('ns3::DcfManager *', 'manager')]) + ## dca-txop.h: void ns3::DcaTxop::SetWifiRemoteStationManager(ns3::Ptr remoteManager) [member function] + cls.add_method('SetWifiRemoteStationManager', + 'void', + [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'remoteManager')]) + ## dca-txop.h: void ns3::DcaTxop::SetTxOkCallback(ns3::Callback callback) [member function] + cls.add_method('SetTxOkCallback', + 'void', + [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) + ## dca-txop.h: void ns3::DcaTxop::SetTxFailedCallback(ns3::Callback callback) [member function] + cls.add_method('SetTxFailedCallback', + 'void', + [param('ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) + ## dca-txop.h: void ns3::DcaTxop::SetMaxQueueSize(uint32_t size) [member function] + cls.add_method('SetMaxQueueSize', + 'void', + [param('uint32_t', 'size')]) + ## dca-txop.h: void ns3::DcaTxop::SetMaxQueueDelay(ns3::Time delay) [member function] + cls.add_method('SetMaxQueueDelay', + 'void', + [param('ns3::Time', 'delay')]) + ## dca-txop.h: void ns3::DcaTxop::SetMinCw(uint32_t minCw) [member function] + cls.add_method('SetMinCw', + 'void', + [param('uint32_t', 'minCw')], + is_virtual=True) + ## dca-txop.h: void ns3::DcaTxop::SetMaxCw(uint32_t maxCw) [member function] + cls.add_method('SetMaxCw', + 'void', + [param('uint32_t', 'maxCw')], + is_virtual=True) + ## dca-txop.h: void ns3::DcaTxop::SetAifsn(uint32_t aifsn) [member function] + cls.add_method('SetAifsn', + 'void', + [param('uint32_t', 'aifsn')], + is_virtual=True) + ## dca-txop.h: uint32_t ns3::DcaTxop::GetMinCw() const [member function] + cls.add_method('GetMinCw', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## dca-txop.h: uint32_t ns3::DcaTxop::GetMaxCw() const [member function] + cls.add_method('GetMaxCw', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## dca-txop.h: uint32_t ns3::DcaTxop::GetAifsn() const [member function] + cls.add_method('GetAifsn', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## dca-txop.h: void ns3::DcaTxop::Queue(ns3::Ptr packet, ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('Queue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')]) + ## dca-txop.h: void ns3::DcaTxop::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) + return + def register_functions(root_module): module = root_module ## ssid.h: extern ns3::Ptr ns3::MakeSsidChecker() [free function] From d2acbc3eba007ecd9fdd60e8ab8601c0dbf6b2cc Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 23 Aug 2009 14:00:50 -0700 Subject: [PATCH 05/43] missing include --- src/node/ipv4-address.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/ipv4-address.cc b/src/node/ipv4-address.cc index b3a3943f7..02db1da3f 100644 --- a/src/node/ipv4-address.cc +++ b/src/node/ipv4-address.cc @@ -18,6 +18,7 @@ * Author: Mathieu Lacage */ +#include #include "ns3/log.h" #include "ipv4-address.h" #include "ns3/assert.h" From 1f8767ac28b4b730872b785a710375c5c077304a Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Sat, 22 Aug 2009 14:36:55 -0700 Subject: [PATCH 06/43] second phase of IPv6 checkins from Univ. of Strasbourg team --- AUTHORS | 2 +- CHANGES.html | 12 + RELEASE_NOTES | 21 +- examples/icmpv6-redirect.cc | 176 ++ examples/ping6.cc | 111 + examples/radvd-two-prefix.cc | 216 ++ examples/radvd.cc | 156 ++ examples/simple-routing-ping6.cc | 110 + examples/wscript | 20 + src/applications/ping6/ping6.cc | 236 +++ src/applications/ping6/ping6.h | 171 ++ src/applications/ping6/waf | 1 + src/applications/ping6/wscript | 13 + src/applications/radvd/radvd-interface.cc | 292 +++ src/applications/radvd/radvd-interface.h | 420 ++++ src/applications/radvd/radvd-prefix.cc | 112 ++ src/applications/radvd/radvd-prefix.h | 180 ++ src/applications/radvd/radvd.cc | 273 +++ src/applications/radvd/radvd.h | 130 ++ src/applications/radvd/wscript | 17 + src/helper/internet-stack-helper.cc | 93 +- src/helper/internet-stack-helper.h | 50 +- src/helper/ipv6-address-helper.cc | 167 ++ src/helper/ipv6-address-helper.h | 96 + src/helper/ipv6-interface-container.cc | 109 + src/helper/ipv6-interface-container.h | 111 + src/helper/ipv6-list-routing-helper.cc | 46 + src/helper/ipv6-list-routing-helper.h | 64 + src/helper/ipv6-routing-helper.cc | 28 + src/helper/ipv6-routing-helper.h | 54 + src/helper/ipv6-static-routing-helper.cc | 200 ++ src/helper/ipv6-static-routing-helper.h | 79 + src/helper/ping6-helper.cc | 72 + src/helper/ping6-helper.h | 103 + src/helper/wscript | 12 + src/internet-stack/icmpv6-header.cc | 1773 ++++++++++++++++ src/internet-stack/icmpv6-header.h | 1785 +++++++++++++++++ src/internet-stack/icmpv6-l4-protocol.cc | 1205 +++++++++++ src/internet-stack/icmpv6-l4-protocol.h | 472 +++++ .../ipv6-autoconfigured-prefix.cc | 201 ++ .../ipv6-autoconfigured-prefix.h | 279 +++ src/internet-stack/ipv6-end-point-demux.cc | 318 +++ src/internet-stack/ipv6-end-point-demux.h | 160 ++ src/internet-stack/ipv6-end-point.cc | 128 ++ src/internet-stack/ipv6-end-point.h | 193 ++ src/internet-stack/ipv6-interface.cc | 453 +++++ src/internet-stack/ipv6-interface.h | 322 +++ src/internet-stack/ipv6-l3-protocol.cc | 911 +++++++++ src/internet-stack/ipv6-l3-protocol.h | 486 +++++ src/internet-stack/ipv6-l4-protocol.cc | 52 + src/internet-stack/ipv6-l4-protocol.h | 106 + .../ipv6-raw-socket-factory-impl.cc | 16 + .../ipv6-raw-socket-factory-impl.h | 25 + src/internet-stack/ipv6-raw-socket-impl.cc | 338 ++++ src/internet-stack/ipv6-raw-socket-impl.h | 255 +++ src/internet-stack/ipv6-test.cc | 145 ++ src/internet-stack/ndisc-cache.cc | 513 +++++ src/internet-stack/ndisc-cache.h | 449 +++++ src/internet-stack/wscript | 13 + src/node/inet6-socket-address.cc | 16 +- src/node/ipv6-address.cc | 218 +- src/node/ipv6-address.h | 2 +- src/node/ipv6-header.cc | 19 +- src/node/ipv6-header.h | 30 +- src/node/ipv6-interface-address.cc | 170 ++ src/node/ipv6-interface-address.h | 209 ++ src/node/ipv6-raw-socket-factory.cc | 37 + src/node/ipv6-raw-socket-factory.h | 52 + src/node/ipv6-route.cc | 147 ++ src/node/ipv6-route.h | 227 +++ src/node/ipv6-routing-protocol.cc | 39 + src/node/ipv6-routing-protocol.h | 170 ++ src/node/ipv6.cc | 60 + src/node/ipv6.h | 289 +++ src/node/wscript | 16 +- src/routing/list-routing/ipv6-list-routing.cc | 423 ++++ src/routing/list-routing/ipv6-list-routing.h | 105 + src/routing/list-routing/wscript | 2 + .../ipv6-routing-table-entry.cc | 331 +++ .../static-routing/ipv6-routing-table-entry.h | 372 ++++ .../static-routing/ipv6-static-routing.cc | 793 ++++++++ .../static-routing/ipv6-static-routing.h | 303 +++ src/routing/static-routing/wscript | 4 + src/wscript | 2 + 84 files changed, 18413 insertions(+), 174 deletions(-) create mode 100644 examples/icmpv6-redirect.cc create mode 100644 examples/ping6.cc create mode 100644 examples/radvd-two-prefix.cc create mode 100644 examples/radvd.cc create mode 100644 examples/simple-routing-ping6.cc create mode 100644 src/applications/ping6/ping6.cc create mode 100644 src/applications/ping6/ping6.h create mode 100644 src/applications/ping6/waf create mode 100644 src/applications/ping6/wscript create mode 100644 src/applications/radvd/radvd-interface.cc create mode 100644 src/applications/radvd/radvd-interface.h create mode 100644 src/applications/radvd/radvd-prefix.cc create mode 100644 src/applications/radvd/radvd-prefix.h create mode 100644 src/applications/radvd/radvd.cc create mode 100644 src/applications/radvd/radvd.h create mode 100644 src/applications/radvd/wscript create mode 100644 src/helper/ipv6-address-helper.cc create mode 100644 src/helper/ipv6-address-helper.h create mode 100644 src/helper/ipv6-interface-container.cc create mode 100644 src/helper/ipv6-interface-container.h create mode 100644 src/helper/ipv6-list-routing-helper.cc create mode 100644 src/helper/ipv6-list-routing-helper.h create mode 100644 src/helper/ipv6-routing-helper.cc create mode 100644 src/helper/ipv6-routing-helper.h create mode 100644 src/helper/ipv6-static-routing-helper.cc create mode 100644 src/helper/ipv6-static-routing-helper.h create mode 100644 src/helper/ping6-helper.cc create mode 100644 src/helper/ping6-helper.h create mode 100644 src/internet-stack/icmpv6-header.cc create mode 100644 src/internet-stack/icmpv6-header.h create mode 100644 src/internet-stack/icmpv6-l4-protocol.cc create mode 100644 src/internet-stack/icmpv6-l4-protocol.h create mode 100644 src/internet-stack/ipv6-autoconfigured-prefix.cc create mode 100644 src/internet-stack/ipv6-autoconfigured-prefix.h create mode 100644 src/internet-stack/ipv6-end-point-demux.cc create mode 100644 src/internet-stack/ipv6-end-point-demux.h create mode 100644 src/internet-stack/ipv6-end-point.cc create mode 100644 src/internet-stack/ipv6-end-point.h create mode 100644 src/internet-stack/ipv6-interface.cc create mode 100644 src/internet-stack/ipv6-interface.h create mode 100644 src/internet-stack/ipv6-l3-protocol.cc create mode 100644 src/internet-stack/ipv6-l3-protocol.h create mode 100644 src/internet-stack/ipv6-l4-protocol.cc create mode 100644 src/internet-stack/ipv6-l4-protocol.h create mode 100644 src/internet-stack/ipv6-raw-socket-factory-impl.cc create mode 100644 src/internet-stack/ipv6-raw-socket-factory-impl.h create mode 100644 src/internet-stack/ipv6-raw-socket-impl.cc create mode 100644 src/internet-stack/ipv6-raw-socket-impl.h create mode 100644 src/internet-stack/ipv6-test.cc create mode 100644 src/internet-stack/ndisc-cache.cc create mode 100644 src/internet-stack/ndisc-cache.h create mode 100644 src/node/ipv6-interface-address.cc create mode 100644 src/node/ipv6-interface-address.h create mode 100644 src/node/ipv6-raw-socket-factory.cc create mode 100644 src/node/ipv6-raw-socket-factory.h create mode 100644 src/node/ipv6-route.cc create mode 100644 src/node/ipv6-route.h create mode 100644 src/node/ipv6-routing-protocol.cc create mode 100644 src/node/ipv6-routing-protocol.h create mode 100644 src/node/ipv6.cc create mode 100644 src/node/ipv6.h create mode 100644 src/routing/list-routing/ipv6-list-routing.cc create mode 100644 src/routing/list-routing/ipv6-list-routing.h create mode 100644 src/routing/static-routing/ipv6-routing-table-entry.cc create mode 100644 src/routing/static-routing/ipv6-routing-table-entry.h create mode 100644 src/routing/static-routing/ipv6-static-routing.cc create mode 100644 src/routing/static-routing/ipv6-static-routing.h diff --git a/AUTHORS b/AUTHORS index 5b22c6f68..6cb66345f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -26,6 +26,6 @@ George F. Riley (riley@ece.gatech.edu) Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu) Kulin Shah (m.kulin@gmail.com) Mauro Tortonesi (mauro.tortonesi@unife.it) -Sebastien Vincent (vincent@lsiit.u-strasbg.fr) +Sebastien Vincent (vincent@clarinet.u-strasbg.fr) Guillaume Vu-Brugier (gvubrugier@gmail.com) Florian Westphal (fw@strlen.de) diff --git a/CHANGES.html b/CHANGES.html index fccd13632..493a8e5f9 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -52,6 +52,18 @@ us a note on ns-developers mailing list.

New API:

    +
  • IPv6 additions +

    Add an IPv6 protocol and ICMPv6 capability. +

      +
    • new classes Ipv6, Ipv6Interface, Ipv6L3Protocol, Ipv6L4Protocol +
    • Ipv6RawSocket (no UDP or TCP capability yet) +
    • a set of classes to implement Icmpv6, including neighbor discovery, +router solicitation, DAD +
    • new applications Ping6 and Radvd +
    • routing objects Ipv6Route and Ipv6MulticastRoute +
    • routing protocols Ipv6ListRouting and Ipv6StaticRouting +
    • examples: icmpv6-redirect.cc, ping6.cc, radvd.cc, radvd-two-prefix.cc, simple-routing-ping6.cc +

Changes to existing API:

diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 651628914..84482252f 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -30,13 +30,26 @@ http://www.nsnam.org/wiki/index.php/Installation New user-visible features ------------------------- - - Add an implementation of the minstrel rate control algorithm - (Duy Nguyen for gsoc) - + a) Add an implementation of the minstrel rate control algorithm + (Duy Nguyen for gsoc) + + b) IPv6 models: + - IPv6 interface; + - IPv6 layer; + - IPv6 raw socket; + - Static IPv6 routing; + - ICMPv6 layer; + - Some ICMPv6 error messages (destination unreachable, ...); + - Neighbor Discovery Protocol (NS/NA, RS/RA, redirection); + - Ping6 application (send Echo request); + - Radvd application (send RA); + - Examples (ping6, simple-routing-ping6, radvd, radvd-two-prefix, + icmpv6-redirect). + API changes from ns-3.5 ----------------------- -API changes for this release are documented in the file CHANGES.html. +API changes for this release are documented in the file CHANGES.html. XXX Known issues diff --git a/examples/icmpv6-redirect.cc b/examples/icmpv6-redirect.cc new file mode 100644 index 000000000..c70150445 --- /dev/null +++ b/examples/icmpv6-redirect.cc @@ -0,0 +1,176 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: David Gross + */ + +// Network topology +// +// STA2 +// | +// | +// R1 R2 +// | | +// | | +// ------------ +// | +// | +// STA 1 +// +// - Initial configuration : +// - STA1 default route : R1 +// - R1 static route to STA2 : R2 +// - STA2 default route : R2 +// - STA1 send Echo Request to STA2 using its default route to R1 +// - R1 receive Echo Request from STA1, and forward it to R2 +// - R1 send an ICMPv6 Redirection to STA1 with Target STA2 and Destination R2 +// - Next Echo Request from STA1 to STA2 are directly sent to R2 + +#include +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" + +#include "ns3/ipv6-routing-table-entry.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("Icmpv6RedirectExample"); + +class StackHelper +{ + public: + /** + * \brief Print the routing table. + * \param n the node + */ + inline void PrintRoutingTable (Ptr& n) + { + Ptr routing = 0; + Ipv6StaticRoutingHelper routingHelper; + Ptr ipv6 = n->GetObject (); + uint32_t nbRoutes = 0; + Ipv6RoutingTableEntry route; + + routing = routingHelper.GetStaticRouting (ipv6); + + std::cout << "Routing table of " << n << " : " << std::endl; + std::cout << "Destination\t\t\t\t" << "Gateway\t\t\t\t\t" << "Interface\t" << std::endl; + + nbRoutes = routing->GetNRoutes (); + for(uint32_t i = 0 ; i < nbRoutes ; i++) + { + route = routing->GetRoute (i); + std::cout << route.GetDest () << "\t" + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" << std::endl; + } + } + + inline void AddHostRouteTo (Ptr& n, Ipv6Address dst, Ipv6Address nextHop, uint32_t interface) + { + Ptr routing = 0; + Ipv6StaticRoutingHelper routingHelper; + Ptr ipv6 = n->GetObject (); + + routing = routingHelper.GetStaticRouting (ipv6); + + routing->AddHostRouteTo (dst, nextHop, interface); + } +}; + + +int main (int argc, char **argv) +{ +#if 0 + LogComponentEnable ("Icmpv6RedirectExample", LOG_LEVEL_INFO); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_INFO); + LogComponentEnable("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable("NdiscCache", LOG_LEVEL_ALL); +#endif + + CommandLine cmd; + cmd.Parse (argc, argv); + + NS_LOG_INFO ("Create nodes."); + Ptr sta1 = CreateObject (); + Ptr r1 = CreateObject (); + Ptr r2 = CreateObject (); + Ptr sta2 = CreateObject (); + NodeContainer net1(sta1, r1, r2); + NodeContainer net2(r2, sta2); + NodeContainer all(sta1, r1, r2, sta2); + + StackHelper stackHelper; + + InternetStackHelper internetv6; + internetv6.Install (all); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue(5000000)); + csma.SetChannelAttribute ("Delay", TimeValue(MilliSeconds (2))); + NetDeviceContainer ndc1 = csma.Install (net1); + NetDeviceContainer ndc2 = csma.Install (net2); + + NS_LOG_INFO ("Assign IPv6 Addresses."); + Ipv6AddressHelper ipv6; + + ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64); + Ipv6InterfaceContainer iic1 = ipv6.Assign (ndc1); + iic1.SetRouter (2, true); + iic1.SetRouter (1, true); + + ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64); + Ipv6InterfaceContainer iic2 = ipv6.Assign (ndc2); + iic2.SetRouter (0, true); + + stackHelper.AddHostRouteTo (r1, iic2.GetAddress (1, 1), iic1.GetAddress (2, 1), iic1.GetInterfaceIndex (1)); + + Simulator::Schedule(Seconds(0.0), &StackHelper::PrintRoutingTable, &stackHelper, r1); + Simulator::Schedule(Seconds(3.0), &StackHelper::PrintRoutingTable, &stackHelper, sta1); + + NS_LOG_INFO ("Create Applications."); + uint32_t packetSize = 1024; + uint32_t maxPacketCount = 5; + Time interPacketInterval = Seconds (1.); + Ping6Helper ping6; + + ping6.SetLocal (iic1.GetAddress(0, 1)); + ping6.SetRemote (iic2.GetAddress(1, 1)); + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue(interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (sta1); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); + + std::ofstream ascii; + ascii.open ("icmpv6-redirect.tr"); + CsmaHelper::EnablePcapAll ("icmpv6-redirect", true); + CsmaHelper::EnableAsciiAll (ascii); + + /* Now, do the actual simulation. */ + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff --git a/examples/ping6.cc b/examples/ping6.cc new file mode 100644 index 000000000..56ff13f95 --- /dev/null +++ b/examples/ping6.cc @@ -0,0 +1,111 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +// Network topology +// +// n0 n1 +// | | +// ================= +// LAN +// +// - ICMPv6 echo request flows from n0 to n1 and back with ICMPv6 echo reply +// - DropTail queues +// - Tracing of queues and packet receptions to file "ping6.tr" + +#include +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("Ping6Example"); + +int main (int argc, char **argv) +{ +#if 0 + LogComponentEnable ("Ping6Example", LOG_LEVEL_INFO); + LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); +#endif + + CommandLine cmd; + cmd.Parse (argc, argv); + + NS_LOG_INFO ("Create nodes."); + NodeContainer n; + n.Create (4); + + /* Install IPv4/IPv6 stack */ + InternetStackHelper internetv6; + internetv6.SetIpv4StackInstall (false); + internetv6.Install (n); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); + NetDeviceContainer d = csma.Install (n); + + Ipv6AddressHelper ipv6; + NS_LOG_INFO ("Assign IPv6 Addresses."); + Ipv6InterfaceContainer i = ipv6.Assign (d); + + NS_LOG_INFO ("Create Applications."); + + /* Create a Ping6 application to send ICMPv6 echo request from node zero to + * all-nodes (ff02::1). + */ + uint32_t packetSize = 1024; + uint32_t maxPacketCount = 5; + Time interPacketInterval = Seconds (1.); + Ping6Helper ping6; + +/* + ping6.SetLocal (i.GetAddress (0, 1)); + ping6.SetRemote (i.GetAddress (1, 1)); +*/ + ping6.SetIfIndex (i.GetInterfaceIndex (0)); + ping6.SetRemote (Ipv6Address::GetAllNodesMulticast ()); + + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue (interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (n.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (10.0)); + + std::ofstream ascii; + ascii.open ("ping6.tr"); + CsmaHelper::EnablePcapAll (std::string ("ping6"), true); + CsmaHelper::EnableAsciiAll (ascii); + + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff --git a/examples/radvd-two-prefix.cc b/examples/radvd-two-prefix.cc new file mode 100644 index 000000000..bd8f0e56d --- /dev/null +++ b/examples/radvd-two-prefix.cc @@ -0,0 +1,216 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: David Gross + * Sebastien Vincent + */ + +// Network topology +// // +// // n0 R n1 +// // | _ | +// // ====|_|==== +// // router +// // - R sends RA to n0's subnet (2001:1::/64 and 2001:ABCD::/64); +// // - R interface to n0 has two addresses with following prefixes 2001:1::/64 and 2001:ABCD::/64; +// // - R sends RA to n1's subnet (2001:2::/64); +// // - n0 ping6 n1. +// // +// // - Tracing of queues and packet receptions to file "radvd-two-prefix.tr" + +#include +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" + +#include "ns3/ipv6-routing-table-entry.h" +#include "ns3/radvd.h" +#include "ns3/radvd-interface.h" +#include "ns3/radvd-prefix.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("RadvdExample"); + +class StackHelper +{ + public: + + /** + * \brief Add an address to a IPv6 node. + * \param n node + * \param interface interface index + * \param address IPv6 address to add + */ + inline void AddAddress (Ptr& n, uint32_t interface, Ipv6Address address) + { + Ptr ipv6 = n->GetObject (); + ipv6->AddAddress (interface, address); + } + + /** + * \brief Print the routing table. + * \param n the node + */ + inline void PrintRoutingTable (Ptr& n) + { + Ptr routing = 0; + Ipv6StaticRoutingHelper routingHelper; + Ptr ipv6 = n->GetObject (); + uint32_t nbRoutes = 0; + Ipv6RoutingTableEntry route; + + routing = routingHelper.GetStaticRouting (ipv6); + + std::cout << "Routing table of " << n << " : " << std::endl; + std::cout << "Destination\t\t\t\t" << "Gateway\t\t\t\t\t" << "Interface\t" << std::endl; + + nbRoutes = routing->GetNRoutes (); + for (uint32_t i = 0 ; i < nbRoutes ; i++) + { + route = routing->GetRoute (i); + std::cout << route.GetDest () << "\t" + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" << std::endl; + } + } +}; + +int main (int argc, char** argv) +{ +#if 0 + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); +#endif + + CommandLine cmd; + cmd.Parse (argc, argv); + + NS_LOG_INFO ("Create nodes."); + Ptr n0 = CreateObject (); + Ptr r = CreateObject (); + Ptr n1 = CreateObject (); + + NodeContainer net1 (n0, r); + NodeContainer net2 (r, n1); + NodeContainer all (n0, r, n1); + StackHelper stackHelper; + + NS_LOG_INFO ("Create IPv6 Internet Stack"); + InternetStackHelper internetv6; + internetv6.Install (all); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); + NetDeviceContainer d1 = csma.Install (net1); /* n0 - R */ + NetDeviceContainer d2 = csma.Install (net2); /* R - n1 */ + + NS_LOG_INFO ("Create networks and assign IPv6 Addresses."); + Ipv6AddressHelper ipv6; + + /* first subnet */ + ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64); + NetDeviceContainer tmp; + tmp.Add (d1.Get (0)); /* n0 */ + Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */ + + NetDeviceContainer tmp2; + tmp2.Add (d1.Get (1)); /* R */ + Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */ + iicr1.SetRouter (0, true); + iic1.Add (iicr1); + + /* add another IPv6 address for second prefix advertised on first subnet */ + stackHelper.AddAddress (r, iic1.GetInterfaceIndex (1), Ipv6Address ("2001:ABCD::2")); + + /* second subnet R - n1 */ + ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64); + NetDeviceContainer tmp3; + tmp3.Add (d2.Get (0)); /* R */ + Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */ + iicr2.SetRouter (0, true); + + NetDeviceContainer tmp4; + tmp4.Add (d2.Get (1)); /* n1 */ + Ipv6InterfaceContainer iic2 = ipv6.AssignWithoutAddress (tmp4); + iic2.Add (iicr2); + + /* radvd configuration */ + Ipv6Address prefix ("2001:1::0"); /* create the prefix */ + Ipv6Address prefixBis ("2001:ABCD::0"); /* create the prefix */ + Ipv6Address prefix2 ("2001:2::0"); /* create the prefix */ + uint32_t indexRouter = iic1.GetInterfaceIndex (1); /* R interface (n0 - R) */ + uint32_t indexRouter2 = iic2.GetInterfaceIndex (1); /* R interface (R - n1) */ + Ptr radvd = CreateObject (); + Ptr routerInterface = Create (indexRouter, 2000, 1000); + Ptr routerPrefix = Create (prefix, 64, 3, 5); + Ptr routerPrefixBis = Create (prefixBis, 64, 3, 5); + Ptr routerInterface2 = Create (indexRouter2, 2000, 1000); + Ptr routerPrefix2 = Create (prefix2, 64, 3, 5); + + /* first interface advertise two prefixes (2001:1::/64 and 2001:ABCD::/64) */ + /* prefix is added in the inverse order in packet */ + routerInterface->AddPrefix (routerPrefix); + routerInterface->AddPrefix (routerPrefixBis); + routerInterface2->AddPrefix (routerPrefix2); + radvd->AddConfiguration (routerInterface); + radvd->AddConfiguration (routerInterface2); + + r->AddApplication (radvd); + radvd->Start (Seconds (1.0)); + radvd->Stop (Seconds (2.0)); + + /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via R */ + uint32_t packetSize = 1024; + uint32_t maxPacketCount = 8; + Time interPacketInterval = Seconds (1.); + Ping6Helper ping6; + + /* ping6.SetLocal (iic1.GetAddress (0, 1)); */ + ping6.SetRemote (Ipv6Address ("2001:2::200:ff:fe00:4")); /* should be n1 address after autoconfiguration */ + ping6.SetIfIndex (iic1.GetInterfaceIndex (0)); + + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue (interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (net1.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (9.0)); + + /* RA should be received, two prefixes + routes + default route should be present */ + Simulator::Schedule (Seconds (2.0), &StackHelper::PrintRoutingTable, &stackHelper, n0); + /* at the end, RA addresses and routes should be cleared */ + Simulator::Schedule (Seconds (10.0), &StackHelper::PrintRoutingTable, &stackHelper, n0); + + std::ofstream ascii; + ascii.open ("radvd-two-prefix.tr"); + CsmaHelper::EnablePcapAll (std::string ("radvd-two-prefix"), true); + CsmaHelper::EnableAsciiAll (ascii); + + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff --git a/examples/radvd.cc b/examples/radvd.cc new file mode 100644 index 000000000..e6be2af22 --- /dev/null +++ b/examples/radvd.cc @@ -0,0 +1,156 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: David Gross + * Sebastien Vincent + */ + +// Network topology +// // +// // n0 R n1 +// // | _ | +// // ====|_|==== +// // router +// // - R sends RA to n0's subnet (2001:1::/64); +// // - R sends RA to n1's subnet (2001:2::/64); +// // - n0 ping6 n1. +// // +// // - Tracing of queues and packet receptions to file "radvd.tr" + +#include +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" + +#include "ns3/radvd.h" +#include "ns3/radvd-interface.h" +#include "ns3/radvd-prefix.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("RadvdExample"); + +int main (int argc, char** argv) +{ +#if 0 + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); +#endif + + CommandLine cmd; + cmd.Parse (argc, argv); + + NS_LOG_INFO ("Create nodes."); + Ptr n0 = CreateObject (); + Ptr r = CreateObject (); + Ptr n1 = CreateObject (); + + NodeContainer net1 (n0, r); + NodeContainer net2 (r, n1); + NodeContainer all (n0, r, n1); + + NS_LOG_INFO ("Create IPv6 Internet Stack"); + InternetStackHelper internetv6; + internetv6.Install (all); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); + NetDeviceContainer d1 = csma.Install (net1); /* n0 - R */ + NetDeviceContainer d2 = csma.Install (net2); /* R - n1 */ + + NS_LOG_INFO ("Create networks and assign IPv6 Addresses."); + Ipv6AddressHelper ipv6; + + /* first subnet */ + ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64); + NetDeviceContainer tmp; + tmp.Add (d1.Get (0)); /* n0 */ + Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */ + + NetDeviceContainer tmp2; + tmp2.Add (d1.Get (1)); /* R */ + Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */ + iicr1.SetRouter (0, true); + iic1.Add (iicr1); + + /* second subnet R - n1 */ + ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64); + NetDeviceContainer tmp3; + tmp3.Add (d2.Get (0)); /* R */ + Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */ + iicr2.SetRouter (0, true); + + NetDeviceContainer tmp4; + tmp4.Add (d2.Get (1)); /* n1 */ + Ipv6InterfaceContainer iic2 = ipv6.AssignWithoutAddress (tmp4); + iic2.Add (iicr2); + + /* radvd configuration */ + Ipv6Address prefix ("2001:1::0"); /* create the prefix */ + Ipv6Address prefix2 ("2001:2::0"); /* create the prefix */ + uint32_t indexRouter = iic1.GetInterfaceIndex (1); /* R interface (n0 - R) */ + uint32_t indexRouter2 = iic2.GetInterfaceIndex (1); /* R interface (R - n1) */ + Ptr radvd = CreateObject (); + Ptr routerInterface = Create (indexRouter, 5000, 1000); + Ptr routerPrefix = Create (prefix, 64, 3, 5); + Ptr routerInterface2 = Create (indexRouter2, 5000, 1000); + Ptr routerPrefix2 = Create (prefix2, 64, 3, 5); + + routerInterface->AddPrefix (routerPrefix); + routerInterface2->AddPrefix (routerPrefix2); + radvd->AddConfiguration (routerInterface); + radvd->AddConfiguration (routerInterface2); + + r->AddApplication (radvd); + radvd->Start (Seconds (1.0)); + radvd->Stop (Seconds (10.0)); + + /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via R */ + uint32_t packetSize = 1024; + uint32_t maxPacketCount = 5; + Time interPacketInterval = Seconds (1.); + Ping6Helper ping6; + + /* ping6.SetLocal (iic1.GetAddress (0, 1)); */ + ping6.SetRemote (Ipv6Address ("2001:2::200:ff:fe00:4")); /* should be n1 address after autoconfiguration */ + ping6.SetIfIndex (iic1.GetInterfaceIndex (0)); + + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue (interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (net1.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (7.0)); + + std::ofstream ascii; + ascii.open ("radvd.tr"); + CsmaHelper::EnablePcapAll (std::string ("radvd"), true); + CsmaHelper::EnableAsciiAll (ascii); + + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff --git a/examples/simple-routing-ping6.cc b/examples/simple-routing-ping6.cc new file mode 100644 index 000000000..329a71c39 --- /dev/null +++ b/examples/simple-routing-ping6.cc @@ -0,0 +1,110 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: David Gross + * Sebastien Vincent + */ + +// Network topology +// // +// // n0 r n1 +// // | _ | +// // ====|_|==== +// // router +// // +// // - Tracing of queues and packet receptions to file "simple-routing-ping6.tr" + +#include +#include "ns3/core-module.h" +#include "ns3/simulator-module.h" +#include "ns3/helper-module.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("SimpleRoutingUdp6Example"); + +int +main (int argc, char** argv) +{ +#if 0 + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); +#endif + + CommandLine cmd; + cmd.Parse (argc, argv); + + NS_LOG_INFO ("Create nodes."); + Ptr n0 = CreateObject (); + Ptr r = CreateObject (); + Ptr n1 = CreateObject (); + + NodeContainer net1 (n0, r); + NodeContainer net2 (r, n1); + NodeContainer all (n0, r, n1); + + NS_LOG_INFO ("Create IPv6 Internet Stack"); + InternetStackHelper internetv6; + internetv6.Install (all); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); + NetDeviceContainer d1 = csma.Install (net1); + NetDeviceContainer d2 = csma.Install (net2); + + NS_LOG_INFO ("Create networks and assign IPv6 Addresses."); + Ipv6AddressHelper ipv6; + ipv6.NewNetwork (Ipv6Address ("2001:1::"), 64); + Ipv6InterfaceContainer i1 = ipv6.Assign (d1); + i1.SetRouter (1, true); + ipv6.NewNetwork (Ipv6Address ("2001:2::"), 64); + Ipv6InterfaceContainer i2 = ipv6.Assign (d2); + i2.SetRouter (0, true); + + /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via r */ + uint32_t packetSize = 1024; + uint32_t maxPacketCount = 5; + Time interPacketInterval = Seconds (1.); + Ping6Helper ping6; + + ping6.SetLocal (i1.GetAddress (0, 1)); + ping6.SetRemote (i2.GetAddress (1, 1)); + /* ping6.SetRemote (Ipv6Address::GetAllNodesMulticast ()); */ + + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue (interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (net1.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (20.0)); + + std::ofstream ascii; + ascii.open ("simple-routing-ping6.tr"); + CsmaHelper::EnablePcapAll (std::string ("simple-routing-ping6"), true); + CsmaHelper::EnableAsciiAll (ascii); + + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff --git a/examples/wscript b/examples/wscript index ca0e171c4..86cd89734 100644 --- a/examples/wscript +++ b/examples/wscript @@ -147,6 +147,26 @@ def build(bld): ['point-to-point', 'internet-stack']) obj.source = 'test-ipv6.cc' + obj = bld.create_ns3_program('ping6', + ['csma', 'internet-stack']) + obj.source = 'ping6.cc' + + obj = bld.create_ns3_program('simple-routing-ping6', + ['csma', 'internet-stack']) + obj.source = 'simple-routing-ping6.cc' + + obj = bld.create_ns3_program('icmpv6-redirect', + ['csma', 'internet-stack']) + obj.source = 'icmpv6-redirect.cc' + + obj = bld.create_ns3_program('radvd', + ['csma', 'internet-stack']) + obj.source = 'radvd.cc' + + obj = bld.create_ns3_program('radvd-two-prefix', + ['csma', 'internet-stack']) + obj.source = 'radvd-two-prefix.cc' + env = bld.env_of_name('default') if env['ENABLE_EMU']: obj = bld.create_ns3_program('emu-udp-echo', ['emu', 'internet-stack']) diff --git a/src/applications/ping6/ping6.cc b/src/applications/ping6/ping6.cc new file mode 100644 index 000000000..202d3b982 --- /dev/null +++ b/src/applications/ping6/ping6.cc @@ -0,0 +1,236 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/log.h" +#include "ns3/nstime.h" +#include "ns3/simulator.h" +#include "ns3/socket-factory.h" +#include "ns3/packet.h" +#include "ns3/socket.h" +#include "ns3/uinteger.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-address.h" +#include "ns3/inet6-socket-address.h" +#include "ns3/icmpv6-header.h" +#include "ns3/ipv6-raw-socket-factory.h" +#include "ns3/ipv6-header.h" + +#include "ping6.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ping6Application"); + +NS_OBJECT_ENSURE_REGISTERED (Ping6); + +TypeId Ping6::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ping6") + .SetParent() + .AddConstructor() + .AddAttribute ("MaxPackets", + "The maximum number of packets the application will send", + UintegerValue (100), + MakeUintegerAccessor (&Ping6::m_count), + MakeUintegerChecker()) + .AddAttribute ("Interval", + "The time to wait between packets", + TimeValue (Seconds (1.0)), + MakeTimeAccessor (&Ping6::m_interval), + MakeTimeChecker ()) + .AddAttribute ("RemoteIpv6", + "The Ipv6Address of the outbound packets", + Ipv6AddressValue (), + MakeIpv6AddressAccessor (&Ping6::m_peerAddress), + MakeIpv6AddressChecker ()) + .AddAttribute ("LocalIpv6", + "Local Ipv6Address of the sender", + Ipv6AddressValue (), + MakeIpv6AddressAccessor (&Ping6::m_localAddress), + MakeIpv6AddressChecker ()) + .AddAttribute ("PacketSize", + "Size of packets generated", + UintegerValue (100), + MakeUintegerAccessor (&Ping6::m_size), + MakeUintegerChecker()) + ; + return tid; +} + +Ping6::Ping6 () +{ + NS_LOG_FUNCTION_NOARGS (); + m_sent = 0; + m_socket = 0; + m_seq = 0; + m_sendEvent = EventId (); +} + +Ping6::~Ping6 () +{ + NS_LOG_FUNCTION_NOARGS (); + m_socket = 0; +} + +void Ping6::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + Application::DoDispose (); +} + +void Ping6::StartApplication () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (!m_socket) + { + TypeId tid = TypeId::LookupByName ("ns3::Ipv6RawSocketFactory"); + m_socket = Socket::CreateSocket (GetNode (), tid); + + NS_ASSERT (m_socket); + + m_socket->Bind (Inet6SocketAddress (m_localAddress, 0)); + m_socket->Connect (Inet6SocketAddress (m_peerAddress, 0)); + m_socket->SetAttribute ("Protocol", UintegerValue (58)); /* ICMPv6 */ + m_socket->SetRecvCallback (MakeCallback (&Ping6::HandleRead, this)); + } + + ScheduleTransmit (Seconds (0.)); +} + +void Ping6::SetLocal (Ipv6Address ipv6) +{ + NS_LOG_FUNCTION (this << ipv6); + m_localAddress = ipv6; +} + +void Ping6::SetRemote (Ipv6Address ipv6) +{ + NS_LOG_FUNCTION (this << ipv6); + m_peerAddress = ipv6; +} + +void Ping6::StopApplication () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (m_socket) + { + m_socket->SetRecvCallback (MakeNullCallback >()); + } + + Simulator::Cancel (m_sendEvent); +} + +void Ping6::SetIfIndex (uint32_t ifIndex) +{ + m_ifIndex = ifIndex; +} + +void Ping6::ScheduleTransmit (Time dt) +{ + NS_LOG_FUNCTION (this << dt); + m_sendEvent = Simulator::Schedule (dt, &Ping6::Send, this); +} + +void Ping6::Send () +{ + NS_LOG_FUNCTION_NOARGS (); + NS_ASSERT (m_sendEvent.IsExpired ()); + Ptr p = 0; + uint8_t data[4]; + Ipv6Address src; + Ptr ipv6 = GetNode ()->GetObject (); + + if (m_ifIndex > 0) + { + /* hack to have ifIndex in Ipv6RawSocketImpl + * maybe add a SetIfIndex in Ipv6RawSocketImpl directly + */ + src = GetNode ()->GetObject ()->GetAddress (m_ifIndex, 0).GetAddress (); + } + else + { + src = m_localAddress; + } + + data[0] = 0xDE; + data[1] = 0xAD; + data[2] = 0xBE; + data[3] = 0xEF; + + p = Create(data, sizeof (data)); + Icmpv6Echo req (1); + + req.SetId (0xBEEF); + req.SetSeq (m_seq); + m_seq++; + + /* we do not calculate pseudo header checksum here, because we are not sure about + * source IPv6 address. Checksum is calculated in Ipv6RawSocketImpl. + */ + + p->AddHeader (req); + m_socket->Bind (Inet6SocketAddress (src, 0)); + m_socket->Send (p, 0); + ++m_sent; + + NS_LOG_INFO ("Sent " << p->GetSize () << " bytes to " << m_peerAddress); + + if (m_sent < m_count) + { + ScheduleTransmit (m_interval); + } +} + +void Ping6::HandleRead (Ptr socket) +{ + NS_LOG_FUNCTION (this << socket); + + Ptr packet=0; + Address from; + while (packet = socket->RecvFrom (from)) + { + if (Inet6SocketAddress::IsMatchingType (from)) + { + Ipv6Header hdr; + Icmpv6Echo reply (0); + Inet6SocketAddress address = Inet6SocketAddress::ConvertFrom (from); + + packet->RemoveHeader (hdr); + + switch (*packet->PeekData ()) + { + case Icmpv6Header::ICMPV6_ECHO_REPLY: + packet->RemoveHeader (reply); + + NS_LOG_INFO ("Received Echo Reply size = " << std::dec << packet->GetSize () << " bytes from " << address.GetIpv6 () << " id = " << (uint16_t)reply.GetId () << " seq = " << (uint16_t)reply.GetSeq ()); + break; + default: + /* other type, discard */ + break; + } + } + } +} + +} /* namespace ns3 */ + diff --git a/src/applications/ping6/ping6.h b/src/applications/ping6/ping6.h new file mode 100644 index 000000000..bbf105c4c --- /dev/null +++ b/src/applications/ping6/ping6.h @@ -0,0 +1,171 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef PING6_H +#define PING6_H + +#include "ns3/application.h" +#include "ns3/event-id.h" +#include "ns3/ptr.h" +#include "ns3/ipv6-address.h" + +namespace ns3 +{ + +class Packet; +class Socket; + +/** + * \class Ping6 + * \brief A ping6 application. + */ +class Ping6 : public Application +{ + public: + /** + * \brief Get the type ID. + * \return type ID + */ + static TypeId GetTypeId (); + + /** + * \brief Constructor. + */ + Ping6 (); + + /** + * \brief Destructor. + */ + virtual ~Ping6 (); + + /** + * \brief Set the local address. + * \param ipv6 the local IPv6 address + */ + void SetLocal (Ipv6Address ipv6); + + /** + * \brief Set the remote peer. + * \param ipv6 IPv6 address of the peer + */ + void SetRemote (Ipv6Address ipv6); + + /** + * \brief Set the out interface index. + * This is to send to link-local (unicast or multicast) address + * when a node has multiple interfaces. + * \param ifIndex interface index + */ + void SetIfIndex (uint32_t ifIndex); + + protected: + /** + * \brief Dispose this object; + */ + virtual void DoDispose (); + + private: + /** + * \brief Start the application. + */ + virtual void StartApplication (); + + /** + * \brief Stop the application. + */ + virtual void StopApplication (); + + /** + * \brief Schedule sending a packet. + * \param dt interval between packet + */ + void ScheduleTransmit (Time dt); + + /** + * \brief Send a packet. + */ + void Send (); + + /** + * \brief Receive method. + * \param socket socket that receive a packet + */ + void HandleRead (Ptr socket); + + /** + * \brief Peer IPv6 address. + */ + Ipv6Address m_address; + + /** + * \brief Number of "Echo request" packets that will be sent. + */ + uint32_t m_count; + + /** + * \brief Number of packets sent. + */ + uint32_t m_sent; + + /** + * \brief Size of the packet. + */ + uint32_t m_size; + + /** + * \brief Intervall between packets sent. + */ + Time m_interval; + + /** + * \brief Local address. + */ + Ipv6Address m_localAddress; + + /** + * \brief Peer address. + */ + Ipv6Address m_peerAddress; + + /** + * \brief Local socket. + */ + Ptr m_socket; + + /** + * \brief Sequence number. + */ + uint16_t m_seq; + + /** + * \brief Event ID. + */ + EventId m_sendEvent; + + /** + * \brief Out interface (i.e. for link-local communication). + */ + uint32_t m_ifIndex; +}; + +} /* namespace ns3 */ + +#endif /* PING6_H */ + diff --git a/src/applications/ping6/waf b/src/applications/ping6/waf new file mode 100644 index 000000000..4283ec141 --- /dev/null +++ b/src/applications/ping6/waf @@ -0,0 +1 @@ +exec "`dirname "$0"`"/../../../waf "$@" diff --git a/src/applications/ping6/wscript b/src/applications/ping6/wscript new file mode 100644 index 000000000..2aebe2afd --- /dev/null +++ b/src/applications/ping6/wscript @@ -0,0 +1,13 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + module = bld.create_ns3_module('ping6', ['internet-stack']) + module.source = [ + 'ping6.cc', + ] + headers = bld.new_task_gen('ns3header') + headers.module = 'ping6' + headers.source = [ + 'ping6.h', + ] + diff --git a/src/applications/radvd/radvd-interface.cc b/src/applications/radvd/radvd-interface.cc new file mode 100644 index 000000000..b5009ecea --- /dev/null +++ b/src/applications/radvd/radvd-interface.cc @@ -0,0 +1,292 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "radvd-interface.h" + +namespace ns3 +{ + +RadvdInterface::RadvdInterface (uint32_t interface) + : m_interface (interface) +{ + /* initialize default value as specified in radvd.conf manpage */ + m_sendAdvert = true; + m_maxRtrAdvInterval = 600000; + m_minRtrAdvInterval = (uint32_t)(double)(0.33 * m_maxRtrAdvInterval); + m_minDelayBetweenRAs = 3000; + m_managedFlag = false; + m_otherConfigFlag = false; + m_linkMtu = 0; /* 0 means not sending MTU option in RA */ + m_reachableTime = 0; /* means unspecified for the router */ + m_retransTimer = 0; /* means unspecified for the router */ + m_curHopLimit = 64; + m_defaultLifeTime = 3 * m_maxRtrAdvInterval; + m_defaultPreference = 1; + m_sourceLLAddress = true; + m_homeAgentFlag = false; + m_homeAgentInfo = false; + m_homeAgentLifeTime = 0; + m_homeAgentPreference = 0; + m_mobRtrSupportFlag = false; + m_intervalOpt = false; +} + +RadvdInterface::RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval) + : m_interface (interface) +{ + NS_ASSERT (maxRtrAdvInterval > minRtrAdvInterval); + m_sendAdvert = true; + m_maxRtrAdvInterval = maxRtrAdvInterval; + m_minRtrAdvInterval = minRtrAdvInterval; + m_minDelayBetweenRAs = 3000; + m_managedFlag = false; + m_otherConfigFlag = false; + m_linkMtu = 0; /* 0 means not sending MTU option in RA */ + m_reachableTime = 0; /* means unspecified for the router */ + m_retransTimer = 0; /* means unspecified for the router */ + m_curHopLimit = 64; + m_defaultLifeTime = 3 * m_maxRtrAdvInterval; + m_defaultPreference = 1; + m_sourceLLAddress = true; + m_homeAgentFlag = false; + m_homeAgentInfo = false; + m_homeAgentLifeTime = 0; + m_homeAgentPreference = 0; + m_mobRtrSupportFlag = false; + m_intervalOpt = false; +} + +RadvdInterface::~RadvdInterface () +{ + /* clear prefixes */ + for (RadvdPrefixListI it = m_prefixes.begin () ; it != m_prefixes.end () ; ++it) + { + (*it) = 0; + } + m_prefixes.clear (); +} + +void RadvdInterface::AddPrefix (Ptr routerPrefix) +{ + m_prefixes.push_back (routerPrefix); +} + + +uint32_t RadvdInterface::GetInterface () const +{ + return m_interface; +} + +std::list > RadvdInterface::GetPrefixes () const +{ + return m_prefixes; +} + +bool RadvdInterface::IsSendAdvert () const +{ + return m_sendAdvert; +} + +void RadvdInterface::SetSendAdvert (bool sendAdvert) +{ + m_sendAdvert = sendAdvert; +} + +uint32_t RadvdInterface::GetMaxRtrAdvInterval () const +{ + return m_maxRtrAdvInterval; +} + +void RadvdInterface::SetMaxRtrAdvInterval (uint32_t maxRtrAdvInterval) +{ + m_maxRtrAdvInterval = maxRtrAdvInterval; +} + +uint32_t RadvdInterface::GetMinRtrAdvInterval () const +{ + return m_minRtrAdvInterval; +} + +void RadvdInterface::SetMinRtrAdvInterval (uint32_t minRtrAdvInterval) +{ + m_minRtrAdvInterval = minRtrAdvInterval; +} + +uint32_t RadvdInterface::GetMinDelayBetweenRAs () const +{ + return m_minDelayBetweenRAs; +} + +void RadvdInterface::SetMinDelayBetweenRAs (uint32_t minDelayBetweenRAs) +{ + m_minDelayBetweenRAs = minDelayBetweenRAs; +} + +bool RadvdInterface::IsManagedFlag () const +{ + return m_managedFlag; +} + +void RadvdInterface::SetManagedFlag (bool managedFlag) +{ + m_managedFlag = managedFlag; +} + +bool RadvdInterface::IsOtherConfigFlag () const +{ + return m_otherConfigFlag; +} + +void RadvdInterface::SetOtherConfigFlag (bool otherConfigFlag) +{ + m_otherConfigFlag = otherConfigFlag; +} + +uint32_t RadvdInterface::GetLinkMtu () const +{ + return m_linkMtu; +} + +void RadvdInterface::SetLinkMtu (uint32_t linkMtu) +{ + m_linkMtu = linkMtu; +} + +uint32_t RadvdInterface::GetReachableTime () const +{ + return m_reachableTime; +} + +void RadvdInterface::SetReachableTime (uint32_t reachableTime) +{ + m_reachableTime = reachableTime; +} + +uint32_t RadvdInterface::GetDefaultLifeTime () const +{ + return m_defaultLifeTime; +} + +void RadvdInterface::SetDefaultLifeTime (uint32_t defaultLifeTime) +{ + m_defaultLifeTime = defaultLifeTime; +} + +uint32_t RadvdInterface::GetRetransTimer () const +{ + return m_retransTimer; +} + +void RadvdInterface::SetRetransTimer (uint32_t retransTimer) +{ + m_retransTimer = retransTimer; +} + +uint8_t RadvdInterface::GetCurHopLimit () const +{ + return m_curHopLimit; +} + +void RadvdInterface::SetCurHopLimit (uint8_t curHopLimit) +{ + m_curHopLimit = curHopLimit; +} + +uint8_t RadvdInterface::GetDefaultPreference () const +{ + return m_defaultPreference; +} + +void RadvdInterface::SetDefaultPreference (uint8_t defaultPreference) +{ + m_defaultPreference = defaultPreference; +} + +bool RadvdInterface::IsSourceLLAddress () const +{ + return m_sourceLLAddress; +} + +void RadvdInterface::SetSourceLLAddress (bool sourceLLAddress) +{ + m_sourceLLAddress = sourceLLAddress; +} + +bool RadvdInterface::IsHomeAgentFlag () const +{ + return m_homeAgentFlag; +} + +void RadvdInterface::SetHomeAgentFlag (bool homeAgentFlag) +{ + m_homeAgentFlag = homeAgentFlag; +} + +bool RadvdInterface::IsHomeAgentInfo () const +{ + return m_homeAgentInfo; +} + +void RadvdInterface::SetHomeAgentInfo (bool homeAgentInfo) +{ + m_homeAgentInfo = homeAgentInfo; +} + +uint32_t RadvdInterface::GetHomeAgentLifeTime () const +{ + return m_homeAgentLifeTime; +} + +void RadvdInterface::SetHomeAgentLifeTime (uint32_t homeAgentLifeTime) +{ + m_homeAgentLifeTime = homeAgentLifeTime; +} + +uint32_t RadvdInterface::GetHomeAgentPreference () const +{ + return m_homeAgentPreference; +} + +void RadvdInterface::SetHomeAgentPreference (uint32_t homeAgentPreference) +{ + m_homeAgentPreference = homeAgentPreference; +} + +bool RadvdInterface::IsMobRtrSupportFlag () const +{ + return m_mobRtrSupportFlag; +} + +void RadvdInterface::SetMobRtrSupportFlag (bool mobRtrSupportFlag) +{ + m_mobRtrSupportFlag = mobRtrSupportFlag; +} + +bool RadvdInterface::IsIntervalOpt () const +{ + return m_intervalOpt; +} + +void RadvdInterface::SetIntervalOpt (bool intervalOpt) +{ + m_intervalOpt = intervalOpt; +} +} /* namespace ns3 */ + diff --git a/src/applications/radvd/radvd-interface.h b/src/applications/radvd/radvd-interface.h new file mode 100644 index 000000000..e5381f494 --- /dev/null +++ b/src/applications/radvd/radvd-interface.h @@ -0,0 +1,420 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef RADVD_INTERFACE_H +#define RADVD_INTERFACE_H + +#include + +#include "radvd-prefix.h" + +namespace ns3 +{ + +/** + * \class RadvdInterface + * \brief Radvd interface configuration. + */ +class RadvdInterface : public RefCountBase +{ + public: + /** + * \brief Constructor. + * \param interface interface index + */ + RadvdInterface (uint32_t interface); + + /** + * \brief Constructor. + * \param interface interface index + * \param maxRtrAdvInterval maximum RA interval + * \param minRtrAdvInterval minimum RA interval + */ + RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval); + + /** + * \brief Destructor. + */ + ~RadvdInterface (); + + /** + * \brief Get interface index for this configuration. + * \return interface index + */ + uint32_t GetInterface () const; + + /** + * \brief Get list of prefixes advertised for this interface. + * \return list of IPv6 prefixes + */ + std::list > GetPrefixes () const; + + /** + * \brief Add a prefix to advertise on interface. + * \param routerPrefix prefix to advertise + */ + void AddPrefix (Ptr routerPrefix); + + /** + * \brief Is send advert enabled (periodic RA and reply to RS) ? + * \return send advert flag + */ + bool IsSendAdvert () const; + + /** + * \brief Set send advert flag. + * \return sendAdvert value + */ + void SetSendAdvert (bool sendAdvert); + + /** + * \brief Get maximum RA interval. + * \return RA interval + */ + uint32_t GetMaxRtrAdvInterval () const; + + /** + * \brief Get maximum RA interval. + * \param maxRtrAdvInterval RA interval + */ + void SetMaxRtrAdvInterval (uint32_t maxRtrAdvInterval); + + /** + * \brief Get minimum RA interval. + * \return RA interval + */ + uint32_t GetMinRtrAdvInterval () const; + + /** + * \brief Get minimum RA interval. + * \param minRtrAdvInterval RA interval + */ + void SetMinRtrAdvInterval (uint32_t minRtrAdvInterval); + + /** + * \brief Get minimum delay between RAs. + * \return minimum delay + */ + uint32_t GetMinDelayBetweenRAs () const; + + /** + * \brief Set minimum delay between RAs. + * \param minDelayBetweenRAs minimum delay + */ + void SetMinDelayBetweenRAs (uint32_t minDelayBetweenRAs); + + /** + * \brief Is managed flag enabled ? + * \return managed flag + */ + bool IsManagedFlag () const; + + /** + * \brief Set managed flag + * \param managedFlag value + */ + void SetManagedFlag (bool managedFlag); + + /** + * \brief Is "other config" flag enabled ? + * \return other config flag + */ + bool IsOtherConfigFlag () const; + + /** + * \brief Set "other config" flag + * \param otherConfigFlag value + */ + void SetOtherConfigFlag (bool otherConfigFlag); + + /** + * \brief Get link MTU. + * \return link MTU + */ + uint32_t GetLinkMtu () const; + + /** + * \brief Set link MTU. + * \param linkMtu link MTU + */ + void SetLinkMtu (uint32_t linkMtu); + + /** + * \brief Get reachable time. + * \return reachable time + */ + uint32_t GetReachableTime () const; + + /** + * \brief Set reachable time. + * \param reachableTime reachable time + */ + void SetReachableTime (uint32_t reachableTime); + + /** + * \brief Get default lifetime. + * \return default lifetime + */ + uint32_t GetDefaultLifeTime () const; + + /** + * \brief Set default lifetime. + * \param defaultLifeTime default lifetime + */ + void SetDefaultLifeTime (uint32_t defaultLifeTime); + + /** + * \brief Get retransmission timer. + * \return retransmission timer + */ + uint32_t GetRetransTimer () const; + + /** + * \brief Set retransmission timer. + * \param retransTimer retransmission timer + */ + void SetRetransTimer (uint32_t retransTimer); + + /** + * \brief Get current hop limit. + * \return current hop limit for the link + */ + uint8_t GetCurHopLimit () const; + + /** + * \brief Set current hop limit. + * \param curHopLimit current hop limit for the link + */ + void SetCurHopLimit (uint8_t curHopLimit); + + /** + * \brief Get default preference. + * \return default preference + */ + uint8_t GetDefaultPreference () const; + + /** + * \brief Set default preference. + * \param defaultPreference default preference + */ + void SetDefaultPreference (uint8_t defaultPreference); + + /** + * \brief Is source LLA option should be included in RA ? + * \return true if source address is added in RA, false otherwise + */ + bool IsSourceLLAddress () const; + + /** + * \brief Set flag to add or not LLA to RA. + * \param sourceLLAddress value + */ + void SetSourceLLAddress (bool sourceLLAddress); + + /** + * \brief Is "home agent" flag enabled ? + * \return "home agent" flag + */ + bool IsHomeAgentFlag () const; + + /** + * \brief Set "home agent" flag. + * \param homeAgentFlag value + */ + void SetHomeAgentFlag (bool homeAgentFlag); + + /** + * \brief Is Home Agent Information option should be included in RA ? + * \return true if HA information option is added in RA, false otherwise + */ + bool IsHomeAgentInfo () const; + + /** + * \brief Set flag to add or not HA information option to RA. + * \param homeAgentFlag value + */ + void SetHomeAgentInfo (bool homeAgentFlag); + + /** + * \brief Get home agent lifetime. + * \return home agent lifetime + */ + uint32_t GetHomeAgentLifeTime () const; + + /** + * \brief Set home agent lifetime. + * \param homeAgentLifeTime home agent lifetime + */ + void SetHomeAgentLifeTime (uint32_t homeAgentLifeTime); + + /** + * \brief Get home agent preference. + * \return home agent preference + */ + uint32_t GetHomeAgentPreference () const; + + /** + * \brief Set home agent preference. + * \param homeAgentPreference home agent preference + */ + void SetHomeAgentPreference (uint32_t homeAgentPreference); + + /** + * \brief Is "mobile router support" flag enabled ? + * \return "mobile router support" flag + */ + bool IsMobRtrSupportFlag () const; + + /** + * \brief Set "mobile router support" flag. + * \param mobRtrSupportFlag value + */ + void SetMobRtrSupportFlag (bool mobRtrSupportFlag); + + /** + * \brief Is advertisement interval option should be included in RA ? + * \return true if advertisement interval option is added in RA, false otherwise + */ + bool IsIntervalOpt () const; + + /** + * \brief Set flag to add or not advertisement interval to RA. + * \param intervalOpt value + */ + void SetIntervalOpt (bool intervalOpt); + + private: + typedef std::list > RadvdPrefixList; + typedef std::list >::iterator RadvdPrefixListI; + + /** + * \brief Interface to advertise RA. + */ + uint32_t m_interface; + + /** + * \brief List of prefixes to advertise. + */ + RadvdPrefixList m_prefixes; + + /** + * \brief Flag whether or not router sends periodic RA and respond to RS. + */ + bool m_sendAdvert; + + /** + * \brief Maximum RA interval in milliseconds. + */ + uint32_t m_maxRtrAdvInterval; + + /** + * \brief Minimum RA interval in milliseconds. + */ + uint32_t m_minRtrAdvInterval; + + /** + * \brief Minimum delay between RA in milliseconds. + */ + uint32_t m_minDelayBetweenRAs; + + /** + * \brief Managed flag. If true host use the stateful protocol for address autoconfiguration. + */ + bool m_managedFlag; + + /** + * \brief Other configuration flag. If true host use stateful protocol for other (non-address) information. + */ + bool m_otherConfigFlag; + + /** + * \brief Link MTU to use. + */ + uint32_t m_linkMtu; + + /** + * \brief Reachable time in milliseconds. + */ + uint32_t m_reachableTime; + + /** + * \brief Retransmission timer in milliseconds. + */ + uint32_t m_retransTimer; + + /** + * \brief Current hop limit (TTL). + */ + uint32_t m_curHopLimit; + + /** + * \brief Default life time in seconds. + */ + uint32_t m_defaultLifeTime; + + /** + * \brief Preference associated with default router. + * 0 = low + * 1 = medium + * 2 = high + */ + uint8_t m_defaultPreference; + + /** + * \brief Flag to add link-layer address in RA. + */ + bool m_sourceLLAddress; + + /** + * \brief Flag to add HA (home agent) flag in RA. + */ + bool m_homeAgentFlag; + + /** + * \brief Flag to add Home Agent Information option (Mobile IPv6). + * Currently not implemented. + */ + bool m_homeAgentInfo; + + /** + * \brief Home agent lifetime in seconds. Ignored if home agent info is not set. + */ + uint32_t m_homeAgentLifeTime; + + /** + * \brief Home agent preference. Ignored if home agent info is not set. + */ + uint32_t m_homeAgentPreference; + + /** + * \brief Flag for HA to signals it supports Mobile Router registrations (NEMO Basic). + */ + bool m_mobRtrSupportFlag; + + /** + * \brief Flag to add Advertisement Interval option in RA. + */ + bool m_intervalOpt; +}; + +} /* namespace ns3 */ + +#endif /* RADVD_INTERFACE_H */ + diff --git a/src/applications/radvd/radvd-prefix.cc b/src/applications/radvd/radvd-prefix.cc new file mode 100644 index 000000000..3ed9442e1 --- /dev/null +++ b/src/applications/radvd/radvd-prefix.cc @@ -0,0 +1,112 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "radvd-prefix.h" + +namespace ns3 +{ + +RadvdPrefix::RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime, uint32_t validLifeTime, bool onLinkFlag, bool autonomousFlag, bool routerAddrFlag) + : m_network (network), + m_prefixLength (prefixLength), + m_preferredLifeTime (preferredLifeTime), + m_validLifeTime (validLifeTime), + m_onLinkFlag (onLinkFlag), + m_autonomousFlag (autonomousFlag), + m_routerAddrFlag (routerAddrFlag) +{ +} + +RadvdPrefix::~RadvdPrefix () +{ +} + +Ipv6Address RadvdPrefix::GetNetwork () const +{ + return m_network; +} + +void RadvdPrefix::SetNetwork (Ipv6Address network) +{ + m_network = network; +} + +uint8_t RadvdPrefix::GetPrefixLength () const +{ + return m_prefixLength; +} + +void RadvdPrefix::SetPrefixLength (uint8_t prefixLength) +{ + m_prefixLength = prefixLength; +} + +uint32_t RadvdPrefix::GetValidLifeTime () const +{ + return m_validLifeTime; +} + +void RadvdPrefix::SetValidLifeTime (uint32_t validLifeTime) +{ + m_validLifeTime = validLifeTime; +} + +uint32_t RadvdPrefix::GetPreferredLifeTime () const +{ + return m_preferredLifeTime; +} + +void RadvdPrefix::SetPreferredLifeTime (uint32_t preferredLifeTime) +{ + m_preferredLifeTime = preferredLifeTime; +} + +bool RadvdPrefix::IsOnLinkFlag () const +{ + return m_onLinkFlag; +} + +void RadvdPrefix::SetOnLinkFlag (bool onLinkFlag) +{ + m_onLinkFlag = onLinkFlag; +} + +bool RadvdPrefix::IsAutonomousFlag () const +{ + return m_autonomousFlag; +} + +void RadvdPrefix::SetAutonomousFlag (bool autonomousFlag) +{ + m_autonomousFlag = autonomousFlag; +} + +bool RadvdPrefix::IsRouterAddrFlag () const +{ + return m_routerAddrFlag; +} + +void RadvdPrefix::SetRouterAddrFlag (bool routerAddrFlag) +{ + m_routerAddrFlag = routerAddrFlag; +} + +} /* namespace ns3 */ + diff --git a/src/applications/radvd/radvd-prefix.h b/src/applications/radvd/radvd-prefix.h new file mode 100644 index 000000000..168648bd1 --- /dev/null +++ b/src/applications/radvd/radvd-prefix.h @@ -0,0 +1,180 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef RADVD_PREFIX_H +#define RADVD_PREFIX_H + +#include + +#include "ns3/ipv6-address.h" + +namespace ns3 +{ + +/** + * \class RadvdPrefix + * \brief Router prefix for radvd application. + */ +class RadvdPrefix : public RefCountBase +{ + public: + /** + * \brief Constructor. + * \param network network prefix advertised + * \param prefixLength prefix length ( 0 < x <= 128) + * \param preferredLifeTime preferred life time in seconds (default 7 days) + * \param validLifeTime valid life time in seconds (default 30 days) + * \param onLinkFlag on link flag + * \param autonomousFlag autonomous link flag + * \param routerAddrFlag router address flag (for Mobile IPv6) + */ + RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime = 604800, uint32_t validLifeTime = 2592000, bool onLinkFlag = true, bool autonomousFlag = true, bool routerAddrFlag = false); + + /** + * \brief Destructor. + */ + ~RadvdPrefix (); + + /** + * \brief Get network prefix. + * \return network prefix + */ + Ipv6Address GetNetwork () const; + + /** + * \brief Set network prefix. + * \param network network prefix + */ + void SetNetwork (Ipv6Address network); + + /** + * \brief Get prefix length. + * \return prefix length + */ + uint8_t GetPrefixLength () const; + + /** + * \brief Set prefix length. + * \param prefixLength prefix length + */ + void SetPrefixLength (uint8_t prefixLength); + + /** + * \brief Get preferred lifetime. + * \return lifetime + */ + uint32_t GetPreferredLifeTime () const; + + /** + * \brief Set preferred lifetime. + * \param preferredLifeTime lifetime + */ + void SetPreferredLifeTime (uint32_t preferredLifeTime); + + /** + * \brief Get valid lifetime. + * \return lifetime + */ + uint32_t GetValidLifeTime () const; + + /** + * \brief Set valid lifetime. + * \param validLifeTime lifetime + */ + void SetValidLifeTime (uint32_t validLifeTime); + + /** + * \brief Is on-link flag ? + * \return true if on-link is activated, false otherwise + */ + bool IsOnLinkFlag () const; + + /** + * \brief Set on-link flag. + * \param onLinkFlag value + */ + void SetOnLinkFlag (bool onLinkFlag); + + /** + * \brief Is autonomous flag ? + * \return true if autonomous is activated, false otherwise + */ + bool IsAutonomousFlag () const; + + /** + * \brief Set autonomous flag. + * \param autonomousFlag value + */ + void SetAutonomousFlag (bool autonomousFlag); + + /** + * \brief Is router address flag ? + * \return true if router address is activated, false otherwise + */ + bool IsRouterAddrFlag () const; + + /** + * \brief Set router address flag. + * \param routerAddrFlag value + */ + void SetRouterAddrFlag (bool routerAddrFlag); + + private: + /** + * \brief Network prefix. + */ + Ipv6Address m_network; + + /** + * \brief Prefix length. + */ + uint8_t m_prefixLength; + + /** + * \brief Preferred time. + */ + uint32_t m_preferredLifeTime; + + /** + * \brief Valid time. + */ + uint32_t m_validLifeTime; + + /** + * \brief On link flag, indicates that this prefix can be used for on-link determination. + */ + bool m_onLinkFlag; + + /** + * \brief Autonomous flag, it is used for autonomous address configuration (RFC 2462). + */ + bool m_autonomousFlag; + + /** + * \brief Router address flag, indicates that router address is sent instead + * of network prefix as is required by Mobile IPv6. + */ + bool m_routerAddrFlag; +}; + +} /* namespace ns3 */ + +#endif /* RADVD_PREFIX_H */ + diff --git a/src/applications/radvd/radvd.cc b/src/applications/radvd/radvd.cc new file mode 100644 index 000000000..e4f3f3796 --- /dev/null +++ b/src/applications/radvd/radvd.cc @@ -0,0 +1,273 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 Telecom Bretagne + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + * Mehdi Benamor + */ + +#include "ns3/log.h" +#include "ns3/ipv6-address.h" +#include "ns3/nstime.h" +#include "ns3/simulator.h" +#include "ns3/packet.h" +#include "ns3/net-device.h" +#include "ns3/uinteger.h" +#include "ns3/random-variable.h" +#include "ns3/inet6-socket-address.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-raw-socket-factory.h" +#include "ns3/ipv6-header.h" +#include "ns3/icmpv6-header.h" + +#include "radvd.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("RadvdApplication"); + +NS_OBJECT_ENSURE_REGISTERED (Radvd); + +TypeId Radvd::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Radvd") + .SetParent () + .AddConstructor () + ; + return tid; +} + +Radvd::Radvd () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Radvd::~Radvd () +{ + NS_LOG_FUNCTION_NOARGS (); + for (RadvdInterfaceListI it = m_configurations.begin () ; it != m_configurations.end () ; ++it) + { + *it = 0; + } + m_configurations.clear (); + m_socket = 0; +} + +void Radvd::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + Application::DoDispose (); +} + +void Radvd::StartApplication () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (!m_socket) + { + TypeId tid = TypeId::LookupByName ("ns3::Ipv6RawSocketFactory"); + m_socket = Socket::CreateSocket (GetNode (), tid); + + NS_ASSERT (m_socket); + +/* m_socket->Bind (Inet6SocketAddress (m_localAddress, 0)); */ +/* m_socket->Connect (Inet6SocketAddress (Ipv6Address::GetAllNodesMulticast (), 0)); */ + m_socket->SetAttribute ("Protocol", UintegerValue (58)); /* ICMPv6 */ + m_socket->SetRecvCallback (MakeCallback (&Radvd::HandleRead, this)); + } + + for (RadvdInterfaceListCI it = m_configurations.begin () ; it != m_configurations.end () ; it++) + { + m_eventIds[(*it)->GetInterface ()] = EventId (); + ScheduleTransmit (Seconds (0.), (*it), m_eventIds[(*it)->GetInterface ()]); + } +} + +void Radvd::StopApplication () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (m_socket) + { + m_socket->SetRecvCallback (MakeNullCallback > ()); + } + + for (EventIdMapI it = m_eventIds.begin () ; it != m_eventIds.end () ; ++it) + { + Simulator::Cancel ((*it).second); + } + m_eventIds.clear (); +} + +void Radvd::AddConfiguration (Ptr routerInterface) +{ + m_configurations.push_back (routerInterface); +} + +void Radvd::ScheduleTransmit (Time dt, Ptr config, EventId& eventId) +{ + NS_LOG_FUNCTION (this << dt); + eventId = Simulator::Schedule (dt, &Radvd::Send, this, config, Ipv6Address::GetAllNodesMulticast ()); +} + +void Radvd::Send (Ptr config, Ipv6Address dst) +{ + NS_LOG_FUNCTION (this << dst); + NS_ASSERT (m_eventIds[config->GetInterface ()].IsExpired ()); + Icmpv6RA raHdr; + Icmpv6OptionLinkLayerAddress llaHdr; + Icmpv6OptionMtu mtuHdr; + Icmpv6OptionPrefixInformation prefixHdr; + + if (m_eventIds.size () == 0) + { + return; + } + + std::list > prefixes = config->GetPrefixes (); + Ptr p = Create (); + Ptr ipv6 = GetNode ()->GetObject (); + + /* set RA header information */ + raHdr.SetFlagM (config->IsManagedFlag ()); + raHdr.SetFlagO (config->IsOtherConfigFlag ()); + raHdr.SetFlagH (config->IsHomeAgentFlag ()); + raHdr.SetCurHopLimit (config->GetCurHopLimit ()); + raHdr.SetLifeTime (config->GetDefaultLifeTime ()); + raHdr.SetReachableTime (config->GetReachableTime ()); + raHdr.SetRetransmissionTime (config->GetRetransTimer ()); + + if (config->IsSourceLLAddress ()) + { + /* Get L2 address from NetDevice */ + Address addr = ipv6->GetNetDevice (config->GetInterface ())->GetAddress (); + llaHdr = Icmpv6OptionLinkLayerAddress (true, addr); + p->AddHeader (llaHdr); + } + + if (config->GetLinkMtu ()) + { + NS_ASSERT (config->GetLinkMtu () >= 1280); + mtuHdr = Icmpv6OptionMtu (config->GetLinkMtu ()); + p->AddHeader (mtuHdr); + } + + /* add list of prefixes */ + for (std::list >::const_iterator jt = prefixes.begin () ; jt != prefixes.end () ; jt++) + { + uint8_t flags = 0; + prefixHdr = Icmpv6OptionPrefixInformation (); + prefixHdr.SetPrefix ((*jt)->GetNetwork ()); + prefixHdr.SetPrefixLength ((*jt)->GetPrefixLength ()); + prefixHdr.SetValidTime ((*jt)->GetValidLifeTime ()); + prefixHdr.SetPreferredTime ((*jt)->GetPreferredLifeTime ()); + + if ((*jt)->IsOnLinkFlag ()) + { + flags += 1 << 7; + } + + if ((*jt)->IsAutonomousFlag ()) + { + flags += 1 << 6; + } + + if ((*jt)->IsRouterAddrFlag ()) + { + flags += 1 << 5; + } + + prefixHdr.SetFlags (flags); + + p->AddHeader (prefixHdr); + } + + Ipv6Address src = ipv6->GetAddress (config->GetInterface (), 0).GetAddress (); + m_socket->Bind (Inet6SocketAddress (src, 0)); + m_socket->Connect (Inet6SocketAddress (dst, 0)); + + /* as we know interface index that will be used to send RA and + * we always send RA with router's link-local address, we can + * calculate checksum here. + */ + raHdr.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + raHdr.GetSerializedSize (), 58 /* ICMPv6 */); + p->AddHeader (raHdr); + + /* send RA */ + NS_LOG_LOGIC ("Send RA"); + m_socket->Send (p, 0); + + UniformVariable rnd; + uint32_t delay = rnd.GetValue (config->GetMinRtrAdvInterval (), config->GetMaxRtrAdvInterval ()); + Time t = MilliSeconds (delay); + ScheduleTransmit (t, config, m_eventIds[config->GetInterface ()]); +} + +void Radvd::HandleRead (Ptr socket) +{ + NS_LOG_FUNCTION (this << socket); + Ptr packet = 0; + Address from; + + while (packet = socket->RecvFrom (from)) + { + if (Inet6SocketAddress::IsMatchingType (from)) + { + Ipv6Header hdr; + Icmpv6RS rsHdr; + Inet6SocketAddress address = Inet6SocketAddress::ConvertFrom (from); + uint32_t delay = 0; + UniformVariable rnd; + Time t; + + packet->RemoveHeader (hdr); + + switch (*packet->PeekData ()) + { + case Icmpv6Header::ICMPV6_ND_ROUTER_SOLICITATION: + /* send RA in response of a RS */ + packet->RemoveHeader (rsHdr); + NS_LOG_INFO ("Received ICMPv6 Router Solicitation from " << hdr.GetSourceAddress () << " code = " << (uint32_t)rsHdr.GetCode ()); + + delay = rnd.GetValue (0, 500); /* default value for MAX_RA_DELAY_TIME */ + t = Simulator::Now () + MilliSeconds (delay); + +#if 0 + NS_LOG_INFO ("schedule new RA : " << t.GetTimeStep () << " next scheduled RA" << (int64_t)m_sendEvent.GetTs ()); + + if (t.GetTimeStep () < (int64_t)m_sendEvent.GetTs ()) + { + /* send multicast RA */ + /* maybe replace this by a unicast RA (it is a SHOULD in the RFC) */ + NS_LOG_INFO ("Respond to RS"); + /* XXX advertise just the prefix for the interface not all */ + t = MilliSeconds (delay); + /* XXX schedule packet send */ + /* ScheduleTransmit (t); */ + } +#endif + break; + default: + break; + } + } + } +} + +} /* namespace ns3 */ + diff --git a/src/applications/radvd/radvd.h b/src/applications/radvd/radvd.h new file mode 100644 index 000000000..0b3273ede --- /dev/null +++ b/src/applications/radvd/radvd.h @@ -0,0 +1,130 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 Telecom Bretagne + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + * Mehdi Benamor + */ + +#ifndef RADVD_H +#define RADVD_H + +#include + +#include "ns3/application.h" +#include "ns3/socket.h" + +#include "radvd-interface.h" + +namespace ns3 +{ + +/** + * \class Radvd + * \brief Router advertisement daemon. + */ +class Radvd : public Application +{ + public: + /** + * \brief Get the type ID. + * \return type ID + */ + static TypeId GetTypeId (void); + + /** + * \brief Constructor. + */ + Radvd (); + + /** + * \brief Destructor. + */ + virtual ~Radvd (); + + /** + * \brief Add configuration for an interface; + * \param routerInterface configuration + */ + void AddConfiguration (Ptr routerInterface); + + protected: + /** + * \brief Dispose the instance. + */ + virtual void DoDispose (); + + private: + typedef std::list > RadvdInterfaceList; + typedef std::list >::iterator RadvdInterfaceListI; + typedef std::list >::const_iterator RadvdInterfaceListCI; + + typedef std::map EventIdMap; + typedef std::map::iterator EventIdMapI; + typedef std::map::const_iterator EventIdMapCI; + + /** + * \brief Start the application. + */ + virtual void StartApplication (); + + /** + * \brief Stop the application. + */ + virtual void StopApplication (); + + /** + * \brief Schedule sending a packet. + * \param dt interval between packet + * \param config interface configuration + * \param eventId event ID associated + */ + void ScheduleTransmit (Time dt, Ptr config, EventId& eventId); + + /** + * \brief Send a packet. + * \param config interface configuration + * \param dst destination address (default ff02::1) + */ + void Send (Ptr config, Ipv6Address dst = Ipv6Address::GetAllNodesMulticast ()); + + /** + * \brief Handle received packet, especially router solicitation + * \param socket socket to read data from + */ + void HandleRead (Ptr socket); + + /** + * \brief Raw socket to send RA. + */ + Ptr m_socket; + + /** + * \brief List of configuration for interface. + */ + RadvdInterfaceList m_configurations; + + /** + * \brief Event ID map. + */ + EventIdMap m_eventIds; +}; + +} /* namespace ns3 */ + +#endif /* RADVD_H */ + diff --git a/src/applications/radvd/wscript b/src/applications/radvd/wscript new file mode 100644 index 000000000..63cdcd903 --- /dev/null +++ b/src/applications/radvd/wscript @@ -0,0 +1,17 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + module = bld.create_ns3_module('radvd', ['internet-stack']) + module.source = [ + 'radvd.cc', + 'radvd-interface.cc', + 'radvd-prefix.cc', + ] + headers = bld.new_task_gen('ns3header') + headers.module = 'radvd' + headers.source = [ + 'radvd.h', + 'radvd-interface.h', + 'radvd-prefix.h', + ] + diff --git a/src/helper/internet-stack-helper.cc b/src/helper/internet-stack-helper.cc index 87dc99f44..4a074ba2d 100644 --- a/src/helper/internet-stack-helper.cc +++ b/src/helper/internet-stack-helper.cc @@ -153,6 +153,7 @@ #include "ns3/object.h" #include "ns3/names.h" #include "ns3/ipv4.h" +#include "ns3/ipv6.h" #include "ns3/packet-socket-factory.h" #include "ns3/config.h" #include "ns3/simulator.h" @@ -167,6 +168,8 @@ #include "ipv4-list-routing-helper.h" #include "ipv4-static-routing-helper.h" #include "ipv4-global-routing-helper.h" +#include "ipv6-list-routing-helper.h" +#include "ipv6-static-routing-helper.h" #include namespace ns3 { @@ -176,19 +179,28 @@ std::string InternetStackHelper::m_pcapBaseFilename; bool InternetStackHelper::m_isInitialized = false; InternetStackHelper::InternetStackHelper () + : m_ipv4Enabled (true), + m_ipv6Enabled (true) { SetTcp ("ns3::TcpL4Protocol"); static Ipv4StaticRoutingHelper staticRouting; static Ipv4GlobalRoutingHelper globalRouting; static Ipv4ListRoutingHelper listRouting; + static Ipv6ListRoutingHelper listRoutingv6; + static Ipv6StaticRoutingHelper staticRoutingv6; if (m_isInitialized == false) { // Only add these once listRouting.Add (staticRouting, 0); listRouting.Add (globalRouting, -10); + + /* IPv6 */ + listRoutingv6.Add (staticRoutingv6, 0); + /* TODO add IPv6 global routing */ m_isInitialized = true; } SetRoutingHelper (listRouting); + SetRoutingHelper (listRoutingv6); } void @@ -197,10 +209,27 @@ InternetStackHelper::SetRoutingHelper (const Ipv4RoutingHelper &routing) m_routing = &routing; } +void +InternetStackHelper::SetRoutingHelper (const Ipv6RoutingHelper &routing) +{ + m_routingv6 = &routing; +} + +void +InternetStackHelper::SetIpv4StackInstall (bool enable) +{ + m_ipv4Enabled = enable; +} + +void InternetStackHelper::SetIpv6StackInstall (bool enable) +{ + m_ipv6Enabled = enable; +} + void InternetStackHelper::Cleanup (void) { - uint32_t illegal = std::numeric_limits::max(); + uint32_t illegal = std::numeric_limits::max (); for (std::vector::iterator i = m_traces.begin (); i != m_traces.end (); i++) @@ -244,7 +273,7 @@ void InternetStackHelper::CreateAndAggregateObjectFromTypeId (Ptr node, const std::string typeId) { ObjectFactory factory; - factory.SetTypeId(typeId); + factory.SetTypeId (typeId); Ptr protocol = factory.Create (); node->AggregateObject (protocol); } @@ -252,24 +281,45 @@ InternetStackHelper::CreateAndAggregateObjectFromTypeId (Ptr node, const s void InternetStackHelper::Install (Ptr node) const { - if (node->GetObject () != 0) + if (m_ipv4Enabled) { - NS_FATAL_ERROR ("InternetStackHelper::Install(): Aggregating " - "an InternetStack to a node with an existing Ipv4 object"); - return; + if (node->GetObject () != 0) + { + NS_FATAL_ERROR ("InternetStackHelper::Install (): Aggregating " + "an InternetStack to a node with an existing Ipv4 object"); + return; + } + + CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol"); + CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol"); + CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol"); + CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol"); + node->AggregateObject (m_tcpFactory.Create ()); + Ptr factory = CreateObject (); + node->AggregateObject (factory); + // Set routing + Ptr ipv4 = node->GetObject (); + Ptr ipv4Routing = m_routing->Create (node); + ipv4->SetRoutingProtocol (ipv4Routing); } - CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol"); - CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol"); - CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol"); - CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol"); - node->AggregateObject (m_tcpFactory.Create ()); - Ptr factory = CreateObject (); - node->AggregateObject (factory); - // Set routing - Ptr ipv4 = node->GetObject (); - Ptr ipv4Routing = m_routing->Create (node); - ipv4->SetRoutingProtocol (ipv4Routing); + if (m_ipv6Enabled) + { + /* IPv6 stack */ + if (node->GetObject () != 0) + { + NS_FATAL_ERROR ("InternetStackHelper::Install (): Aggregating " + "an InternetStack to a node with an existing Ipv6 object"); + return; + } + + CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol"); + CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol"); + /* TODO add UdpL4Protocol / TcpL4Protocol for IPv6 */ + Ptr ipv6 = node->GetObject (); + Ptr ipv6Routing = m_routingv6->Create (node); + ipv6->SetRoutingProtocol (ipv6Routing); + } } void @@ -293,6 +343,9 @@ InternetStackHelper::EnableAscii (std::ostream &os, NodeContainer n) oss << "/NodeList/" << node->GetId () << "/$ns3::ArpL3Protocol/Drop"; Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, writer)); oss.str (""); + oss << "/NodeList/" << node->GetId () << "/$ns3::Ipv6L3Protocol/Drop"; + Config::Connect (oss.str (), MakeBoundCallback (&InternetStackHelper::AsciiDropEvent, writer)); + oss.str (""); } } @@ -312,6 +365,12 @@ InternetStackHelper::EnablePcapAll (std::string filename) MakeCallback (&InternetStackHelper::LogTxIp)); Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx", MakeCallback (&InternetStackHelper::LogRxIp)); + + /* IPv6 */ + Config::Connect ("/NodeList/*/$ns3::Ipv6L3Protocol/Tx", + MakeCallback (&InternetStackHelper::LogTxIp)); + Config::Connect ("/NodeList/*/$ns3::Ipv6L3Protocol/Rx", + MakeCallback (&InternetStackHelper::LogRxIp)); } uint32_t diff --git a/src/helper/internet-stack-helper.h b/src/helper/internet-stack-helper.h index 734096e43..b66c1645f 100644 --- a/src/helper/internet-stack-helper.h +++ b/src/helper/internet-stack-helper.h @@ -31,6 +31,7 @@ namespace ns3 { class Node; class Ipv4RoutingHelper; +class Ipv6RoutingHelper; /** * \brief aggregate IP/TCP/UDP functionality to existing Nodes. @@ -59,9 +60,15 @@ public: * ns3::Ipv4::SetRoutingProtocol. */ void SetRoutingHelper (const Ipv4RoutingHelper &routing); + + /** + * \brief Set IPv6 routing helper. + * \param routing IPv6 routing helper + */ + void SetRoutingHelper (const Ipv6RoutingHelper &routing); /** - * Aggregate implementations of the ns3::Ipv4, ns3::Udp, and ns3::Tcp classes + * Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes * onto the provided node. This method will assert if called on a node that * already has an Ipv4 object aggregated to it. * @@ -70,7 +77,7 @@ public: void Install (std::string nodeName) const; /** - * Aggregate implementations of the ns3::Ipv4, ns3::Udp, and ns3::Tcp classes + * Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes * onto the provided node. This method will assert if called on a node that * already has an Ipv4 object aggregated to it. * @@ -80,7 +87,7 @@ public: /** * For each node in the input container, aggregate implementations of the - * ns3::Ipv4, ns3::Udp, and, ns3::Tcp classes. The program will assert + * ns3::Ipv4, ns3::Ipv6, ns3::Udp, and, ns3::Tcp classes. The program will assert * if this method is called on a container with a node that already has * an Ipv4 object aggregated to it. * @@ -90,11 +97,11 @@ public: void Install (NodeContainer c) const; /** - * Aggregate ip, udp, and tcp stacks to all nodes in the simulation + * Aggregate IPv4, IPv6, UDP, and TCP stacks to all nodes in the simulation */ void InstallAll (void) const; - /** + /** * \brief set the Tcp stack which will not need any other parameter. * * This function sets up the tcp stack to the given TypeId. It should not be @@ -128,6 +135,7 @@ public: * Enable ascii output on these drop traces, for each node in the NodeContainer.. * /NodeList/[i]/$ns3ArpL3Protocol/Drop * /NodeList/[i]/$ns3Ipv4L3Protocol/Drop + * /NodeList/[i]/$ns3Ipv6L3Protocol/Drop */ static void EnableAscii (std::ostream &os, NodeContainer n); @@ -137,12 +145,14 @@ public: * Enable ascii output on these drop traces, for all nodes. * /NodeList/[i]/$ns3ArpL3Protocol/Drop * /NodeList/[i]/$ns3Ipv4L3Protocol/Drop + * /NodeList/[i]/$ns3Ipv6L3Protocol/Drop */ static void EnableAsciiAll (std::ostream &os); /** * Enable pcap output on each protocol instance which is of the - * ns3::Ipv4L3Protocol type. Both Tx and Rx events will be logged. + * ns3::Ipv4L3Protocol or ns3::Ipv6L3Protocol type. Both Tx and + * Rx events will be logged. * * \param filename filename prefix to use for pcap files. * @@ -155,9 +165,27 @@ public: */ static void EnablePcapAll (std::string filename); + /** + * \brief Enable/disable IPv4 stack install. + * \param enable enable state + */ + void SetIpv4StackInstall (bool enable); + + /** + * \brief Enable/disable IPv6 stack install. + * \param enable enable state + */ + void SetIpv6StackInstall (bool enable); + private: ObjectFactory m_tcpFactory; const Ipv4RoutingHelper *m_routing; + + /** + * \brief IPv6 routing helper. + */ + const Ipv6RoutingHelper *m_routingv6; + static void CreateAndAggregateObjectFromTypeId (Ptr node, const std::string typeId); static void Cleanup (void); static void LogRxIp (std::string context, Ptr packet, uint32_t deviceId); @@ -173,6 +201,16 @@ private: static uint32_t GetNodeIndex (std::string context); static std::vector m_traces; static bool m_isInitialized; + + /** + * \brief IPv4 install state (enabled/disabled) ? + */ + bool m_ipv4Enabled; + + /** + * \brief IPv6 install state (enabled/disabled) ? + */ + bool m_ipv6Enabled; }; } // namespace ns3 diff --git a/src/helper/ipv6-address-helper.cc b/src/helper/ipv6-address-helper.cc new file mode 100644 index 000000000..d13ba1800 --- /dev/null +++ b/src/helper/ipv6-address-helper.cc @@ -0,0 +1,167 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/assert.h" +#include "ns3/log.h" +#include "ns3/ptr.h" +#include "ns3/node.h" +#include "ns3/net-device.h" +#include "ns3/mac48-address.h" +#include "ns3/ipv6.h" + +#include "ipv6-address-helper.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6AddressHelper"); + +Ipv6AddressHelper::Ipv6AddressHelper () +{ + NS_LOG_FUNCTION_NOARGS (); + m_network = Ipv6Address ("2001::"); + m_prefix = Ipv6Prefix (64); +} + +Ipv6Address Ipv6AddressHelper::NewAddress (Address addr) +{ + NS_LOG_FUNCTION (this << addr); + + switch (addr.GetLength ()) + { + case 6: + return Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), m_network); + default: + return Ipv6Address ("::"); + } + /* never reached */ + return Ipv6Address ("::"); +} + +void Ipv6AddressHelper::NewNetwork (Ipv6Address network, Ipv6Prefix prefix) +{ + NS_LOG_FUNCTION (this << network << prefix); + + m_network = network; + m_prefix = prefix; +} + +Ipv6InterfaceContainer Ipv6AddressHelper::Assign (const NetDeviceContainer &c) +{ + NS_LOG_FUNCTION_NOARGS (); + Ipv6InterfaceContainer retval; + + for (uint32_t i = 0; i < c.GetN (); ++i) + { + Ptr device = c.Get (i); + + Ptr node = device->GetNode (); + NS_ASSERT_MSG (node, "Ipv6AddressHelper::Allocate (): Bad node"); + + Ptr ipv6 = node->GetObject (); + NS_ASSERT_MSG (ipv6, "Ipv6AddressHelper::Allocate (): Bad ipv6"); + int32_t ifIndex = 0; + + ifIndex = ipv6->GetInterfaceForDevice (device); + if (ifIndex == -1) + { + ifIndex = ipv6->AddInterface (device); + } + NS_ASSERT_MSG (ifIndex >= 0, "Ipv6AddressHelper::Allocate (): " + "Interface index not found"); + + Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (NewAddress (device->GetAddress ()), m_prefix); + ipv6->SetMetric (ifIndex, 1); + ipv6->SetUp (ifIndex); + ipv6->AddAddress (ifIndex, ipv6Addr); + + retval.Add (ipv6, ifIndex); + } + return retval; +} + +Ipv6InterfaceContainer Ipv6AddressHelper::Assign (const NetDeviceContainer &c, std::vector withConfiguration) +{ + NS_LOG_FUNCTION_NOARGS (); + Ipv6InterfaceContainer retval; + for (uint32_t i = 0; i < c.GetN (); ++i) + { + Ptr device = c.Get (i); + + Ptr node = device->GetNode (); + NS_ASSERT_MSG (node, "Ipv6AddressHelper::Allocate (): Bad node"); + + Ptr ipv6 = node->GetObject (); + NS_ASSERT_MSG (ipv6, "Ipv6AddressHelper::Allocate (): Bad ipv6"); + + int32_t ifIndex = ipv6->GetInterfaceForDevice (device); + if (ifIndex == -1) + { + ifIndex = ipv6->AddInterface (device); + } + NS_ASSERT_MSG (ifIndex >= 0, "Ipv6AddressHelper::Allocate (): " + "Interface index not found"); + + ipv6->SetMetric (ifIndex, 1); + ipv6->SetUp (ifIndex); + + if (withConfiguration.at (i)) + { + Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (NewAddress (device->GetAddress ()), m_prefix); + ipv6->AddAddress (ifIndex, ipv6Addr); + } + + retval.Add (ipv6, ifIndex); + } + return retval; +} + +Ipv6InterfaceContainer Ipv6AddressHelper::AssignWithoutAddress (const NetDeviceContainer &c) +{ + NS_LOG_FUNCTION_NOARGS (); + Ipv6InterfaceContainer retval; + for (uint32_t i = 0; i < c.GetN (); ++i) + { + Ptr device = c.Get (i); + + Ptr node = device->GetNode (); + NS_ASSERT_MSG (node, "Ipv6AddressHelper::Allocate (): Bad node"); + + Ptr ipv6 = node->GetObject (); + NS_ASSERT_MSG (ipv6, "Ipv6AddressHelper::Allocate (): Bad ipv6"); + + int32_t ifIndex = ipv6->GetInterfaceForDevice (device); + if (ifIndex == -1) + { + ifIndex = ipv6->AddInterface (device); + } + NS_ASSERT_MSG (ifIndex >= 0, "Ipv6AddressHelper::Allocate (): " + "Interface index not found"); + + ipv6->SetMetric (ifIndex, 1); + ipv6->SetUp (ifIndex); + + retval.Add (ipv6, ifIndex); + } + return retval; +} + +} /* namespace ns3 */ + diff --git a/src/helper/ipv6-address-helper.h b/src/helper/ipv6-address-helper.h new file mode 100644 index 000000000..5f0c147db --- /dev/null +++ b/src/helper/ipv6-address-helper.h @@ -0,0 +1,96 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_ADDRESS_STATIC_HELPER_H +#define IPV6_ADDRESS_STATIC_HELPER_H + +#include + +#include "ns3/ipv6-address.h" +#include "net-device-container.h" +#include "ipv6-interface-container.h" + +namespace ns3 +{ + +/** + * \class Ipv6AddressHelper + * \brief Helper class to assign IPv6 address statically. + */ +class Ipv6AddressHelper +{ + public: + /** + * \brief Constructor. + */ + Ipv6AddressHelper (); + + /** + * \brief Allocate a new network. + * \param network The IPv6 network + * \param prefix The prefix + */ + void NewNetwork (Ipv6Address network, Ipv6Prefix prefix); + + /** + * \brief Allocate a new address. + * \param addr L2 address (currenty only ethernet address is supported) + * \return newly created Ipv6Address + */ + Ipv6Address NewAddress (Address addr); + + /** + * \brief Allocate an Ipv6InterfaceContainer. + * \param c netdevice container + * \return newly created Ipv6InterfaceContainer + */ + Ipv6InterfaceContainer Assign (const NetDeviceContainer &c); + + /** + * \brief Allocate an Ipv6InterfaceContainer. + * \param c netdevice container + * \param withConfiguration true : interface statically configured, false : no static configuration + * \return newly created Ipv6InterfaceContainer + */ + Ipv6InterfaceContainer Assign (const NetDeviceContainer &c, std::vector withConfiguration); + + /** + * \brief Allocate an Ipv6InterfaceContainer without static IPv6 configuration. + * \param c netdevice container + * \return newly created Ipv6InterfaceContainer + */ + Ipv6InterfaceContainer AssignWithoutAddress (const NetDeviceContainer &c); + + private: + /** + * \brief The IPv6 network. + */ + Ipv6Address m_network; + + /** + * \brief IPv6 The prefix (mask). + */ + Ipv6Prefix m_prefix; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_ADDRESS_STATIC_HELPER_H */ + diff --git a/src/helper/ipv6-interface-container.cc b/src/helper/ipv6-interface-container.cc new file mode 100644 index 000000000..1ab219936 --- /dev/null +++ b/src/helper/ipv6-interface-container.cc @@ -0,0 +1,109 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/node-list.h" +#include "ns3/names.h" + +#include "ipv6-interface-container.h" +#include "ipv6-static-routing-helper.h" + +namespace ns3 +{ + +Ipv6InterfaceContainer::Ipv6InterfaceContainer () +{ +} + +uint32_t Ipv6InterfaceContainer::GetN () const +{ + return m_interfaces.size (); +} + +uint32_t Ipv6InterfaceContainer::GetInterfaceIndex (uint32_t i) const +{ + return m_interfaces[i].second; +} + +Ipv6Address Ipv6InterfaceContainer::GetAddress (uint32_t i, uint32_t j) const +{ + Ptr ipv6 = m_interfaces[i].first; + uint32_t interface = m_interfaces[i].second; + return ipv6->GetAddress (interface, j).GetAddress (); +} + +void Ipv6InterfaceContainer::Add (Ptr ipv6, uint32_t interface) +{ + m_interfaces.push_back (std::make_pair (ipv6, interface)); +} + +void Ipv6InterfaceContainer::Add (std::string ipv6Name, uint32_t interface) +{ + Ptr ipv6 = Names::Find (ipv6Name); + m_interfaces.push_back (std::make_pair (ipv6, interface)); +} + +void Ipv6InterfaceContainer::Add (Ipv6InterfaceContainer& c) +{ + for (InterfaceVector::const_iterator it = c.m_interfaces.begin () ; it != c.m_interfaces.end () ; it++) + { + m_interfaces.push_back (*it); + } +} + +void Ipv6InterfaceContainer::SetRouter (uint32_t i, bool router) +{ + Ptr ipv6 = m_interfaces[i].first; + ipv6->SetForwarding (m_interfaces[i].second, router); + + if (router) + { + uint32_t other; + /* assume first global address is index 1 (0 is link-local) */ + Ipv6Address routerAddress = ipv6->GetAddress (m_interfaces[i].second, 1).GetAddress (); + + for (other = 0 ; other < m_interfaces.size () ; other++) + { + if (other != i) + { + Ptr routing = 0; + Ipv6StaticRoutingHelper routingHelper; + + ipv6 = m_interfaces[other].first; + routing = routingHelper.GetStaticRouting (ipv6); + routing->SetDefaultRoute (routerAddress, m_interfaces[other].second); + } + } + } +} + +void Ipv6InterfaceContainer::SetDefaultRoute (uint32_t i, uint32_t router) +{ + Ptr ipv6 = m_interfaces[i].first; + Ptr ipv6Router = m_interfaces[router].first; + Ipv6Address routerAddress = ipv6Router->GetAddress (m_interfaces[router].second, 1).GetAddress (); + Ptr routing = 0; + Ipv6StaticRoutingHelper routingHelper; + + routing = routingHelper.GetStaticRouting (ipv6); + routing->SetDefaultRoute (routerAddress, m_interfaces[i].second); +} + +} /* namespace ns3 */ + diff --git a/src/helper/ipv6-interface-container.h b/src/helper/ipv6-interface-container.h new file mode 100644 index 000000000..875aeae8a --- /dev/null +++ b/src/helper/ipv6-interface-container.h @@ -0,0 +1,111 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_INTERFACE_CONTAINER_H +#define IPV6_INTERFACE_CONTAINER_H + +#include +#include +#include "ns3/ipv6.h" +#include "ns3/ipv6-address.h" + +namespace ns3 +{ + +/** + * \class Ipv6InterfaceContainer + * \brief keep track of a set of IPv6 interfaces. + */ +class Ipv6InterfaceContainer +{ + public: + /** + * \brief Constructor. + */ + Ipv6InterfaceContainer (); + + /** + * \brief Get the number of interfaces. + * \return the number of interfaces stored in this Ipv6InterfaceContainer. + */ + uint32_t GetN (void) const; + + /** + * \brief Get the interface index for the specified node index. + * \param i index of the node + * \return interface index + */ + uint32_t GetInterfaceIndex (uint32_t i) const; + + /** + * \brief Get the address for the specified index. + * \param i interface index + * \param j address index, generally index 0 is the link-local address + * \return IPv6 address + */ + Ipv6Address GetAddress (uint32_t i, uint32_t j) const; + + /** + * \brief Add a couple IPv6/interface. + * \param ipv6 IPv6 address + * \param interface interface index + */ + void Add (Ptr ipv6, uint32_t interface); + + /** + * \brief Fusion with another Ipv6InterfaceContainer. + * \param c container + */ + void Add (Ipv6InterfaceContainer& c); + + /** + * \brief Add a couple of name/interface. + * \param ipv6Name name of a node + * \param interface interface index to add + */ + void Add (std::string ipv6Name, uint32_t interface); + + /** + * \brief Set the state of the stack (act as a router or not) for the specified index. + * \param i index + * \param router true : is a router, false : is an host + */ + void SetRouter (uint32_t i, bool router); + + /** + * \brief Set the default route for the specified index. + * \param i index + * \param router the default router + */ + void SetDefaultRoute (uint32_t i, uint32_t router); + + private: + typedef std::vector, uint32_t> > InterfaceVector; + + /** + * \brief List of IPv6 stack and interfaces index. + */ + InterfaceVector m_interfaces; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_INTERFACE_CONTAINER_H */ + diff --git a/src/helper/ipv6-list-routing-helper.cc b/src/helper/ipv6-list-routing-helper.cc new file mode 100644 index 000000000..c62d20d58 --- /dev/null +++ b/src/helper/ipv6-list-routing-helper.cc @@ -0,0 +1,46 @@ +/* -*- 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 + */ +#include "ipv6-list-routing-helper.h" +#include "ns3/ipv6-list-routing.h" +#include "ns3/node.h" + +namespace ns3 { + +Ipv6ListRoutingHelper::Ipv6ListRoutingHelper () +{} +void +Ipv6ListRoutingHelper::Add (const Ipv6RoutingHelper &routing, int16_t priority) +{ + m_list.push_back (std::make_pair (&routing,priority)); +} +Ptr +Ipv6ListRoutingHelper::Create (Ptr node) const +{ + Ptr list = CreateObject (); + for (std::list >::const_iterator i = m_list.begin (); + i != m_list.end (); ++i) + { + Ptr prot = i->first->Create (node); + list->AddRoutingProtocol (prot,i->second); + } + return list; +} + +} // namespace ns3 diff --git a/src/helper/ipv6-list-routing-helper.h b/src/helper/ipv6-list-routing-helper.h new file mode 100644 index 000000000..5eda5d9e3 --- /dev/null +++ b/src/helper/ipv6-list-routing-helper.h @@ -0,0 +1,64 @@ +/* -*- 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 + */ +#ifndef IPV6_LIST_ROUTING_HELPER_H +#define IPV6_LIST_ROUTING_HELPER_H + +#include "ipv6-routing-helper.h" +#include +#include + +namespace ns3 { + +/** + * \brief Helper class that adds ns3::Ipv6ListRouting objects + * + * This class is expected to be used in conjunction with + * ns3::InternetStackHelper::SetRoutingHelper + */ +class Ipv6ListRoutingHelper : public Ipv6RoutingHelper +{ +public: + Ipv6ListRoutingHelper (); + /** + * \param routing a routing helper + * \param priority the priority of the associated helper + * + * Store in the internal list a reference to the input routing helper + * and associated priority. These helpers will be used later by + * the ns3::Ipv6ListRoutingHelper::Create method to create + * an ns3::Ipv6ListRouting object and add in it routing protocols + * created with the helpers. + */ + void Add (const Ipv6RoutingHelper &routing, int16_t priority); + /** + * \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 Create (Ptr node) const; +private: + std::list > m_list; +}; + +} // namespace ns3 + +#endif /* IPV6_LIST_ROUTING_HELPER_H */ + diff --git a/src/helper/ipv6-routing-helper.cc b/src/helper/ipv6-routing-helper.cc new file mode 100644 index 000000000..200b5fde9 --- /dev/null +++ b/src/helper/ipv6-routing-helper.cc @@ -0,0 +1,28 @@ +/* -*- 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 + */ + +#include "ipv6-routing-helper.h" + +namespace ns3 { + +Ipv6RoutingHelper::~Ipv6RoutingHelper () +{} + +} // namespace ns3 diff --git a/src/helper/ipv6-routing-helper.h b/src/helper/ipv6-routing-helper.h new file mode 100644 index 000000000..2341928f4 --- /dev/null +++ b/src/helper/ipv6-routing-helper.h @@ -0,0 +1,54 @@ +/* -*- 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 + */ +#ifndef IPV6_ROUTING_HELPER_H +#define IPV6_ROUTING_HELPER_H + +#include "ns3/ptr.h" + +namespace ns3 { + +class Ipv6RoutingProtocol; +class Node; + +/** + * \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 + * ns3::Ipv6RoutingHelper which can be used by + * ns3::InternetStackHelper::SetRoutingHelper and + * ns3::InternetStackHelper::Install. + */ +class Ipv6RoutingHelper +{ +public: + virtual ~Ipv6RoutingHelper (); + /** + * \param node the node within which the new routing protocol will run + * \returns a newly-created routing protocol + */ + virtual Ptr Create (Ptr node) const = 0; +}; + +} // namespace ns3 + + +#endif /* IPV6_ROUTING_HELPER_H */ + diff --git a/src/helper/ipv6-static-routing-helper.cc b/src/helper/ipv6-static-routing-helper.cc new file mode 100644 index 000000000..278217691 --- /dev/null +++ b/src/helper/ipv6-static-routing-helper.cc @@ -0,0 +1,200 @@ +/* -*- 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 +#include "ns3/log.h" +#include "ns3/ptr.h" +#include "ns3/names.h" +#include "ns3/node.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-route.h" +#include "ns3/ipv6-list-routing.h" +#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"); + +namespace ns3 { + +Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper () +{} +Ptr +Ipv6StaticRoutingHelper::Create (Ptr node) const +{ + return CreateObject (); +} + +Ptr +Ipv6StaticRoutingHelper::GetStaticRouting (Ptr ipv6) const +{ + NS_LOG_FUNCTION (this); + Ptr ipv6rp = ipv6->GetRoutingProtocol (); + NS_ASSERT_MSG (ipv6rp, "No routing protocol associated with Ipv6"); + if (DynamicCast (ipv6rp)) + { + NS_LOG_LOGIC ("Static routing found as the main IPv4 routing protocol."); + return DynamicCast (ipv6rp); + } + if (DynamicCast (ipv6rp)) + { + Ptr lrp = DynamicCast (ipv6rp); + int16_t priority; + for (uint32_t i = 0; i < lrp->GetNRoutingProtocols (); i++) + { + NS_LOG_LOGIC ("Searching for static routing in list"); + Ptr temp = lrp->GetRoutingProtocol (i, priority); + if (DynamicCast (temp)) + { + NS_LOG_LOGIC ("Found static routing in list"); + return DynamicCast (temp); + } + } + } + NS_LOG_LOGIC ("Static routing not found"); + return 0; +} + +void +Ipv6StaticRoutingHelper::AddMulticastRoute ( + Ptr n, + Ipv6Address source, + Ipv6Address group, + Ptr input, + NetDeviceContainer output) +{ + Ptr ipv6 = n->GetObject (); + + // We need to convert the NetDeviceContainer to an array of interface + // numbers + std::vector outputInterfaces; + for (NetDeviceContainer::Iterator i = output.Begin (); i != output.End (); ++i) + { + Ptr nd = *i; + int32_t interface = ipv6->GetInterfaceForDevice (nd); + NS_ASSERT_MSG (interface >= 0, + "Ipv6StaticRoutingHelper::AddMulticastRoute (): " + "Expected an interface associated with the device nd"); + outputInterfaces.push_back (interface); + } + + int32_t inputInterface = ipv6->GetInterfaceForDevice (input); + NS_ASSERT_MSG (inputInterface >= 0, + "Ipv6StaticRoutingHelper::AddMulticastRoute (): " + "Expected an interface associated with the device input"); + Ipv6StaticRoutingHelper helper; + Ptr ipv6StaticRouting = helper.GetStaticRouting (ipv6); + if (!ipv6StaticRouting) + { + NS_ASSERT_MSG (ipv6StaticRouting, + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an Ipv6StaticRouting associated with this node"); + } + ipv6StaticRouting->AddMulticastRoute (source, group, inputInterface, outputInterfaces); +} + +void +Ipv6StaticRoutingHelper::AddMulticastRoute ( + Ptr n, + Ipv6Address source, + Ipv6Address group, + std::string inputName, + NetDeviceContainer output) +{ + Ptr input = Names::Find (inputName); + AddMulticastRoute (n, source, group, input, output); +} + +void +Ipv6StaticRoutingHelper::AddMulticastRoute ( + std::string nName, + Ipv6Address source, + Ipv6Address group, + Ptr input, + NetDeviceContainer output) +{ + Ptr n = Names::Find (nName); + AddMulticastRoute (n, source, group, input, output); +} + +void +Ipv6StaticRoutingHelper::AddMulticastRoute ( + std::string nName, + Ipv6Address source, + Ipv6Address group, + std::string inputName, + NetDeviceContainer output) +{ + Ptr input = Names::Find (inputName); + Ptr n = Names::Find (nName); + AddMulticastRoute (n, source, group, input, output); +} + +#if 0 +void +Ipv6StaticRoutingHelper::SetDefaultMulticastRoute ( + Ptr n, + Ptr nd) +{ + Ptr ipv6 = n->GetObject (); + int32_t interfaceSrc = ipv6->GetInterfaceForDevice (nd); + NS_ASSERT_MSG (interfaceSrc >= 0, + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an interface associated with the device"); + Ipv6StaticRoutingHelper helper; + Ptr ipv6StaticRouting = helper.GetStaticRouting (ipv6); + if (!ipv6StaticRouting) + { + NS_ASSERT_MSG (ipv6StaticRouting, + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an Ipv6StaticRouting associated with this node"); + } + ipv6StaticRouting->SetDefaultMulticastRoute (interfaceSrc); +} + +void +Ipv6StaticRoutingHelper::SetDefaultMulticastRoute ( + Ptr n, + std::string ndName) +{ + Ptr nd = Names::Find (ndName); + SetDefaultMulticastRoute (n, nd); +} + +void +Ipv6StaticRoutingHelper::SetDefaultMulticastRoute ( + std::string nName, + Ptr nd) +{ + Ptr n = Names::Find (nName); + SetDefaultMulticastRoute (n, nd); +} + +void +Ipv6StaticRoutingHelper::SetDefaultMulticastRoute ( + std::string nName, + std::string ndName) +{ + Ptr n = Names::Find (nName); + Ptr nd = Names::Find (ndName); + SetDefaultMulticastRoute (n, nd); +} +#endif + +}; // namespace ns3 diff --git a/src/helper/ipv6-static-routing-helper.h b/src/helper/ipv6-static-routing-helper.h new file mode 100644 index 000000000..6b43fe494 --- /dev/null +++ b/src/helper/ipv6-static-routing-helper.h @@ -0,0 +1,79 @@ +/* -*- 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 IPV6_STATIC_ROUTING_HELPER_H +#define IPV6_STATIC_ROUTING_HELPER_H + +#include "ns3/ipv6.h" +#include "ns3/ipv6-static-routing.h" +#include "ns3/ptr.h" +#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" + +namespace ns3 { + +/** + * \brief Helper class that adds ns3::Ipv6StaticRouting objects + * + * This class is expected to be used in conjunction with + * ns3::InternetStackHelper::SetRoutingHelper + */ +class Ipv6StaticRoutingHelper : public Ipv6RoutingHelper +{ +public: + Ipv6StaticRoutingHelper (); + + /** + * \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 Create (Ptr node) const; + + Ptr GetStaticRouting (Ptr ipv6) const; + + void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, + Ptr input, NetDeviceContainer output); + void AddMulticastRoute (std::string n, Ipv6Address source, Ipv6Address group, + Ptr input, NetDeviceContainer output); + void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, + std::string inputName, NetDeviceContainer output); + void AddMulticastRoute (std::string nName, Ipv6Address source, Ipv6Address group, + std::string inputName, NetDeviceContainer output); + +#if 0 + /** + * \brief Add a default route to the static routing protocol to forward + * packets out a particular interface + */ + void SetDefaultMulticastRoute (Ptr n, Ptr nd); + void SetDefaultMulticastRoute (Ptr n, std::string ndName); + void SetDefaultMulticastRoute (std::string nName, Ptr nd); + void SetDefaultMulticastRoute (std::string nName, std::string ndName); +#endif +}; + +} // namespace ns3 + +#endif /* IPV6_STATIC_ROUTING_HELPER_H */ + diff --git a/src/helper/ping6-helper.cc b/src/helper/ping6-helper.cc new file mode 100644 index 000000000..8f4787c71 --- /dev/null +++ b/src/helper/ping6-helper.cc @@ -0,0 +1,72 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/ping6.h" +#include "ns3/uinteger.h" + +#include "ping6-helper.h" + +namespace ns3 +{ + +Ping6Helper::Ping6Helper () + : m_ifIndex (0) +{ + m_factory.SetTypeId (Ping6::GetTypeId ()); +} + +void Ping6Helper::SetLocal (Ipv6Address ip) +{ + m_localIp = ip; +} + +void Ping6Helper::SetRemote (Ipv6Address ip) +{ + m_remoteIp = ip; +} + +void Ping6Helper::SetAttribute (std::string name, const AttributeValue& value) +{ + m_factory.Set (name, value); +} + +ApplicationContainer Ping6Helper::Install (NodeContainer c) +{ + ApplicationContainer apps; + for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) + { + Ptr node = *i; + Ptr client = m_factory.Create (); + client->SetLocal (m_localIp); + client->SetRemote (m_remoteIp); + client->SetIfIndex (m_ifIndex); + node->AddApplication (client); + apps.Add (client); + } + return apps; +} + +void Ping6Helper::SetIfIndex (uint32_t ifIndex) +{ + m_ifIndex = ifIndex; +} + +} /* namespace ns3 */ + diff --git a/src/helper/ping6-helper.h b/src/helper/ping6-helper.h new file mode 100644 index 000000000..e1365fbd7 --- /dev/null +++ b/src/helper/ping6-helper.h @@ -0,0 +1,103 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef PING6_HELPER_H +#define PING6_HELPER_H + +#include +#include "application-container.h" +#include "node-container.h" +#include "ns3/object-factory.h" +#include "ns3/ipv6-address.h" + +namespace ns3 { + +/** + * \class Ping6Helper + * \brief Ping6 application helper. + */ +class Ping6Helper +{ + public: + /** + * \brief Constructor. + */ + Ping6Helper (); + + /** + * \brief Set the local IPv6 address. + * \param ip local IPv6 address + */ + void SetLocal (Ipv6Address ip); + + /** + * \brief Set the remote IPv6 address. + * \param ip remote IPv6 address + */ + void SetRemote (Ipv6Address ip); + + /** + * \brief Set some attributes. + * \param name attribute name + * \param value attribute value + */ + void SetAttribute (std::string name, const AttributeValue& value); + + /** + * \brief Install the application in Nodes. + * \param c list of Nodes + * \return application container + */ + ApplicationContainer Install (NodeContainer c); + + /** + * \brief Set the out interface index. + * This is to send to link-local (unicast or multicast) address + * when a node has multiple interfaces. + * \param ifIndex interface index + */ + void SetIfIndex (uint32_t ifIndex); + + private: + /** + * \brief An object factory. + */ + ObjectFactory m_factory; + + /** + * \brief The local IPv6 address. + */ + Ipv6Address m_localIp; + + /** + * \brief The remote IPv6 address. + */ + Ipv6Address m_remoteIp; + + /** + * \brief Out interface index. + */ + uint32_t m_ifIndex; +}; + +} /* namespace ns3 */ + +#endif /* PING6_HELPER_H */ + diff --git a/src/helper/wscript b/src/helper/wscript index 5775fea3a..7a7ca59ff 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -28,6 +28,12 @@ def build(bld): 'ipv4-global-routing-helper.cc', 'ipv4-list-routing-helper.cc', 'ipv4-routing-helper.cc', + 'ipv6-address-helper.cc', + 'ipv6-interface-container.cc', + 'ipv6-static-routing-helper.cc', + 'ipv6-list-routing-helper.cc', + 'ipv6-routing-helper.cc', + 'ping6-helper.cc', ] headers = bld.new_task_gen('ns3header') @@ -58,6 +64,12 @@ def build(bld): 'ipv4-global-routing-helper.h', 'ipv4-list-routing-helper.h', 'ipv4-routing-helper.h', + 'ipv6-address-helper.h', + 'ipv6-interface-container.h', + 'ipv6-static-routing-helper.h', + 'ipv6-list-routing-helper.h', + 'ipv6-routing-helper.h', + 'ping6-helper.h', ] env = bld.env_of_name('default') diff --git a/src/internet-stack/icmpv6-header.cc b/src/internet-stack/icmpv6-header.cc new file mode 100644 index 000000000..b7e8d76d8 --- /dev/null +++ b/src/internet-stack/icmpv6-header.cc @@ -0,0 +1,1773 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + * Mehdi Benamor + * David Gross + */ + +#include "ns3/assert.h" +#include "ns3/address-utils.h" +#include "icmpv6-header.h" +#include "ns3/log.h" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6Header); + +NS_LOG_COMPONENT_DEFINE ("Icmpv6Header"); + +TypeId Icmpv6Header::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6Header") + .SetParent
() + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6Header::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6Header::Icmpv6Header () + : m_calcChecksum (true), + m_checksum (0), + m_type (0), + m_code (0) +{ +} + +Icmpv6Header::~Icmpv6Header () +{ +} + +uint8_t Icmpv6Header::GetType () const +{ + return m_type; +} + +void Icmpv6Header::SetType (uint8_t type) +{ + m_type = type; +} + +uint8_t Icmpv6Header::GetCode () const +{ + return m_code; +} + +void Icmpv6Header::SetCode (uint8_t code) +{ + m_code = code; +} + +uint16_t Icmpv6Header::GetChecksum () const +{ + return m_checksum; +} + +void Icmpv6Header::SetChecksum (uint16_t checksum) +{ + m_checksum = checksum; +} + +void Icmpv6Header::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)m_type << " code = " << (uint32_t)m_code << " checksum = " << (uint32_t)m_checksum << ")"; +} + +uint32_t Icmpv6Header::GetSerializedSize () const +{ + return 4; +} + +uint32_t Icmpv6Header::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + + m_type = i.ReadU8 (); + m_code = i.ReadU8 (); + m_checksum = i.ReadNtohU16 (); +#if 0 + i.ReadU32 (); /* padding */ +#endif + return GetSerializedSize (); +} + +void Icmpv6Header::Serialize (Buffer::Iterator start) const +{ + Buffer::Iterator i = start; + + i.WriteU8 (m_type); + i.WriteU8 (m_code); + i.WriteU16 (0); +#if 0 + i.WriteU32 (0); /* padding */ +#endif + + if (m_calcChecksum) + { + i = start; + uint16_t checksum = i.CalculateIpChecksum (i.GetSize (), m_checksum); + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +void Icmpv6Header::CalculatePseudoHeaderChecksum (Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol) +{ + Buffer buf = Buffer (40); + uint8_t tmp[16]; + Buffer::Iterator it; + + buf.AddAtStart (40); + it = buf.Begin (); + + src.Serialize (tmp); + it.Write (tmp, 16); /* source IPv6 address */ + dst.Serialize (tmp); + it.Write (tmp, 16); /* destination IPv6 address */ + it.WriteU16 (0); /* length */ + it.WriteU8 (length >> 8); /* length */ + it.WriteU8 (length & 0xff); /* length */ + it.WriteU16 (0); /* zero */ + it.WriteU8 (0); /* zero */ + it.WriteU8 (protocol); /* next header */ + + it = buf.Begin (); + m_checksum = ~(it.CalculateIpChecksum (40)); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6NS); + +Icmpv6NS::Icmpv6NS () +{ + SetType (ICMPV6_ND_NEIGHBOR_SOLICITATION); + SetCode (0); + SetReserved (0); + m_checksum = 0; +} + +TypeId Icmpv6NS::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6NS") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6NS::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6NS::Icmpv6NS (Ipv6Address target) +{ + SetType (ICMPV6_ND_NEIGHBOR_SOLICITATION); + SetCode (0); + SetReserved (0); + SetIpv6Target (target); + m_checksum = 0; + + /* test */ + /* + m_reserved = 0xdeadbeef; + */ +} + +Icmpv6NS::~Icmpv6NS () +{ +} + +uint32_t Icmpv6NS::GetReserved () const +{ + return m_reserved; +} + +void Icmpv6NS::SetReserved (uint32_t reserved) +{ + m_reserved = reserved; +} + +Ipv6Address Icmpv6NS::GetIpv6Target () const +{ + return m_target; +} + +void Icmpv6NS::SetIpv6Target (Ipv6Address target) +{ + m_target = target; +} + +void Icmpv6NS::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " (NS) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6NS::GetSerializedSize () const +{ + return 24; +} + +void Icmpv6NS::Serialize (Buffer::Iterator start) const +{ + NS_LOG_FUNCTION_NOARGS (); + uint8_t buff_target[16]; + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteU16 (0); + i.WriteHtonU32 (m_reserved); + m_target.Serialize (buff_target); + i.Write (buff_target, 16); + + if (m_calcChecksum) + { + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), m_checksum); + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +uint32_t Icmpv6NS::Deserialize (Buffer::Iterator start) +{ + uint8_t buf[16]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + m_reserved = i.ReadNtohU32 (); + i.Read (buf, 16); + m_target.Set (buf); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6NA); + +TypeId Icmpv6NA::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6NA") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6NA::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6NA::Icmpv6NA () +{ + SetType (ICMPV6_ND_NEIGHBOR_ADVERTISEMENT); + SetCode (0); + SetReserved (0); + SetFlagR (0); + SetFlagS (0); + SetFlagO (0); + m_checksum = 0; +} + +Icmpv6NA::~Icmpv6NA () +{ +} + +uint32_t Icmpv6NA::GetReserved () const +{ + return m_reserved; +} + +void Icmpv6NA::SetReserved (uint32_t reserved) +{ + m_reserved = reserved; +} + +Ipv6Address Icmpv6NA::GetIpv6Target () const +{ + return m_target; +} + +bool Icmpv6NA::GetFlagR () const +{ + return m_flagR; +} + +void Icmpv6NA::SetFlagR (bool r) +{ + m_flagR = r; +} + +bool Icmpv6NA::GetFlagS () const +{ + return m_flagS; +} + +void Icmpv6NA::SetFlagS (bool s) +{ + m_flagS = s; +} + +bool Icmpv6NA::GetFlagO () const +{ + return m_flagO; +} + +void Icmpv6NA::SetFlagO (bool o) +{ + m_flagO = o; +} + +void Icmpv6NA::SetIpv6Target (Ipv6Address target) +{ + m_target = target; +} + +void Icmpv6NA::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " (NA) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6NA::GetSerializedSize () const +{ + return 24; +} + +void Icmpv6NA::Serialize (Buffer::Iterator start) const +{ + uint8_t buff_target[16]; + uint16_t checksum = 0; + Buffer::Iterator i = start; + uint32_t reserved = m_reserved; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteU16 (0); + + if (m_flagR) + { + reserved |= (uint32_t)(1 << 31); + } + + if (m_flagS) + { + reserved |= (uint32_t)(1<< 30); + } + + if (m_flagO) + { + reserved |= (uint32_t)(1<< 29); + } + + i.WriteHtonU32 (reserved); + m_target.Serialize (buff_target); + i.Write (buff_target, 16); + + if (m_calcChecksum) + { + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +uint32_t Icmpv6NA::Deserialize (Buffer::Iterator start) +{ + uint8_t buf[16]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + m_reserved = i.ReadNtohU32 (); + + m_flagR = false; + m_flagS = false; + m_flagO = false; + + if (m_reserved & (1 << 31)) + { + m_flagR = true; + } + + if (m_reserved & (1 << 30)) + { + m_flagS = true; + } + + if (m_reserved & (1 << 29)) + { + m_flagO = true; + } + + i.Read (buf, 16); + m_target.Set (buf); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6RA); + +TypeId Icmpv6RA::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6RA") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6RA::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6RA::Icmpv6RA () +{ + SetType (ICMPV6_ND_ROUTER_ADVERTISEMENT); + SetCode (0); + SetFlags (0); + SetFlagM (0); + SetFlagO (0); + SetFlagH (0); + SetCurHopLimit (0); + SetLifeTime (0); + SetRetransmissionTime (0); + SetReachableTime (0); +} + +Icmpv6RA::~Icmpv6RA () +{ +} + +void Icmpv6RA::SetCurHopLimit (uint8_t m) +{ + m_curHopLimit = m; +} + +uint8_t Icmpv6RA::GetCurHopLimit () const +{ + return m_curHopLimit; +} + +uint16_t Icmpv6RA::GetLifeTime () const +{ + return m_LifeTime; +} + +uint32_t Icmpv6RA::GetReachableTime () const +{ + return m_ReachableTime; +} + +uint32_t Icmpv6RA::GetRetransmissionTime () const +{ + return m_RetransmissionTimer; +} + +void Icmpv6RA::SetLifeTime (uint16_t l) +{ + m_LifeTime = l; +} + +void Icmpv6RA::SetReachableTime (uint32_t r) +{ + m_ReachableTime = r; +} + +void Icmpv6RA::SetRetransmissionTime (uint32_t r) +{ + m_RetransmissionTimer = r; +} + +bool Icmpv6RA::GetFlagM () const +{ + return m_flagM; +} + +void Icmpv6RA::SetFlagM (bool m) +{ + m_flagM = m; +} + +bool Icmpv6RA::GetFlagO () const +{ + return m_flagO; +} + +void Icmpv6RA::SetFlagO (bool o) +{ + m_flagO = o; +} + +bool Icmpv6RA::GetFlagH () const +{ + return m_flagH; +} + +void Icmpv6RA::SetFlagH (bool h) +{ + m_flagH = h; +} + +uint8_t Icmpv6RA::GetFlags () const +{ + return m_flags; +} + +void Icmpv6RA::SetFlags (uint8_t f) +{ + m_flags = f; +} + +void Icmpv6RA::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " (RA) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6RA::GetSerializedSize () const +{ + return 16; +} + +void Icmpv6RA::Serialize (Buffer::Iterator start) const +{ + uint16_t checksum = 0; + Buffer::Iterator i = start; + uint8_t flags = 0; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + i.WriteU8 (m_curHopLimit); + + if (m_flagM) + { + flags |= (uint8_t)(1<< 7); + } + + if (m_flagO) + { + flags |= (uint8_t)(1<< 6); + } + + if (m_flagH) + { + flags |= (uint8_t)(1<< 5); + } + i.WriteU8 (flags); + i.WriteHtonU16 (GetLifeTime ()); + i.WriteHtonU32 (GetReachableTime ()); + i.WriteHtonU32 (GetRetransmissionTime ()); + + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); +} + +uint32_t Icmpv6RA::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + SetCurHopLimit (i.ReadU8 ()); + m_flags = i.ReadU8 (); + m_flagM = false; + m_flagO = false; + m_flagH = false; + + if (m_flags & (1 << 7)) + { + m_flagM = true; + } + + if (m_flags & (1 << 6)) + { + m_flagO = true; + } + + if (m_flags & (1 << 5)) + { + m_flagH = true; + } + SetLifeTime (i.ReadNtohU16 ()); + SetReachableTime (i.ReadNtohU32 ()); + SetRetransmissionTime (i.ReadNtohU32 ()); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6RS); + +TypeId Icmpv6RS::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6RS") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6RS::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6RS::Icmpv6RS () +{ + SetType (ICMPV6_ND_ROUTER_SOLICITATION); + SetCode (0); + SetReserved (0); +} + +Icmpv6RS::~Icmpv6RS () +{ +} + +uint32_t Icmpv6RS::GetReserved () const +{ + return m_reserved; +} + +void Icmpv6RS::SetReserved (uint32_t reserved) +{ + m_reserved = reserved; +} + +void Icmpv6RS::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (RS) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6RS::GetSerializedSize () const +{ + return 8; +} + +void Icmpv6RS::Serialize (Buffer::Iterator start) const +{ + NS_LOG_FUNCTION_NOARGS (); + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteU16 (0); + i.WriteHtonU32 (m_reserved); + + if (m_calcChecksum) + { + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +uint32_t Icmpv6RS::Deserialize (Buffer::Iterator start) +{ + NS_LOG_FUNCTION_NOARGS (); + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + m_reserved = i.ReadNtohU32 (); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6Redirection); + +TypeId Icmpv6Redirection::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6Redirection") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6Redirection::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6Redirection::Icmpv6Redirection () + : m_target (Ipv6Address ("")), + m_destination (Ipv6Address ("")), + m_reserved (0) +{ + SetType (ICMPV6_ND_REDIRECTION); + SetCode (0); + m_checksum = 0; +} + +Icmpv6Redirection::~Icmpv6Redirection () +{ +} + +void Icmpv6Redirection::SetReserved (uint32_t reserved) +{ + m_reserved = reserved; +} + +uint32_t Icmpv6Redirection::GetReserved () const +{ + return m_reserved; +} + +Ipv6Address Icmpv6Redirection::GetTarget () const +{ + return m_target; +} + +void Icmpv6Redirection::SetTarget (Ipv6Address target) +{ + m_target = target; +} + +Ipv6Address Icmpv6Redirection::GetDestination () const +{ + return m_destination; +} + +void Icmpv6Redirection::SetDestination (Ipv6Address destination) +{ + m_destination = destination; +} + +void Icmpv6Redirection::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (Redirection) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " target = " << m_target << " destination = " << m_destination << ")"; +} + +uint32_t Icmpv6Redirection::GetSerializedSize () const +{ + return 40; +} + +void Icmpv6Redirection::Serialize (Buffer::Iterator start) const +{ + uint8_t buff[16]; + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteU16 (checksum); + i.WriteU32 (m_reserved); + + m_target.Serialize (buff); + i.Write (buff, 16); + + m_destination.Serialize (buff); + i.Write (buff, 16); + + if (m_calcChecksum) + { + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +uint32_t Icmpv6Redirection::Deserialize (Buffer::Iterator start) +{ + uint8_t buff[16]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + SetReserved (i.ReadU32 ()); + + i.Read (buff, 16); + m_target.Set (buff); + + i.Read (buff, 16); + m_destination.Set (buff); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6Echo); + +TypeId Icmpv6Echo::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6Echo") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6Echo::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6Echo::Icmpv6Echo () +{ + SetType (Icmpv6Header::ICMPV6_ECHO_REQUEST); + SetCode (0); + m_checksum = 0; + SetId (0); + SetSeq (0); +} + +Icmpv6Echo::Icmpv6Echo (bool request) +{ + SetType (request ? Icmpv6Header::ICMPV6_ECHO_REQUEST : Icmpv6Header::ICMPV6_ECHO_REPLY); + SetCode (0); + m_checksum = 0; + SetId (0); + SetSeq (0); +} + +Icmpv6Echo::~Icmpv6Echo () +{ +} + +uint16_t Icmpv6Echo::GetId () const +{ + return m_id; +} + +void Icmpv6Echo::SetId (uint16_t id) +{ + m_id = id; +} + +uint16_t Icmpv6Echo::GetSeq () const +{ + return m_seq; +} + +void Icmpv6Echo::SetSeq (uint16_t seq) +{ + m_seq = seq; +} + +void Icmpv6Echo::Print (std::ostream& os) const +{ + os << "( type = " << (GetType () == 128 ? "128 (Request)" : "129 (Reply)") << + " code = " << (uint32_t)GetCode () << + " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6Echo::GetSerializedSize () const +{ + return 8; +} + +void Icmpv6Echo::Serialize (Buffer::Iterator start) const +{ + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + + i.WriteHtonU16 (m_id); + i.WriteHtonU16 (m_seq); + + if (m_calcChecksum) + { + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + i = start; + i.Next (2); + i.WriteU16 (checksum); + } +} + +uint32_t Icmpv6Echo::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + + m_id = i.ReadNtohU16 (); + m_seq = i.ReadNtohU16 (); + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6DestinationUnreachable); + +TypeId Icmpv6DestinationUnreachable::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6DestinationUnreachable") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6DestinationUnreachable::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6DestinationUnreachable::Icmpv6DestinationUnreachable () + : m_packet (0) +{ + SetType (ICMPV6_ERROR_DESTINATION_UNREACHABLE); +} + +Icmpv6DestinationUnreachable::~Icmpv6DestinationUnreachable () +{ +} + +Ptr Icmpv6DestinationUnreachable::GetPacket () const +{ + return m_packet; +} + +void Icmpv6DestinationUnreachable::SetPacket (Ptr p) +{ + NS_ASSERT (p->GetSize () <= 1280); + m_packet = p; +} + +void Icmpv6DestinationUnreachable::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6DestinationUnreachable::GetSerializedSize () const +{ + return 8 + m_packet->GetSize (); +} + +void Icmpv6DestinationUnreachable::Serialize (Buffer::Iterator start) const +{ + const uint8_t *packet = m_packet->PeekData (); + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + i.WriteHtonU32 (0); + + i.Write (packet, m_packet->GetSize ()); + + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); +} + +uint32_t Icmpv6DestinationUnreachable::Deserialize (Buffer::Iterator start) +{ + uint16_t length = start.GetSize () - 8; + uint8_t data[length]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + i.ReadNtohU32 (); + i.Read (data, length); + m_packet = Create (data, length); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6TooBig); + +TypeId Icmpv6TooBig::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6TooBig") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6TooBig::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6TooBig::Icmpv6TooBig () + : m_packet (0), + m_mtu (0) +{ + SetType (ICMPV6_ERROR_PACKET_TOO_BIG); +} + +Icmpv6TooBig::~Icmpv6TooBig () +{ +} + +Ptr Icmpv6TooBig::GetPacket () const +{ + return m_packet; +} + +void Icmpv6TooBig::SetPacket (Ptr p) +{ + NS_ASSERT (p->GetSize () <= 1280); + m_packet = p; +} + +uint32_t Icmpv6TooBig::GetMtu () const +{ + return m_mtu; +} + +void Icmpv6TooBig::SetMtu (uint32_t mtu) +{ + m_mtu = mtu; +} + +void Icmpv6TooBig::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (Too Big) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " mtu = " << (uint32_t)GetMtu () << ")"; +} + +uint32_t Icmpv6TooBig::GetSerializedSize () const +{ + return 8 + m_packet->GetSize (); +} + +void Icmpv6TooBig::Serialize (Buffer::Iterator start) const +{ + const uint8_t *packet = m_packet->PeekData (); + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + i.WriteHtonU32 (GetMtu ()); + + i.Write (packet, m_packet->GetSize ()); + + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); +} + +uint32_t Icmpv6TooBig::Deserialize (Buffer::Iterator start) +{ + uint16_t length = start.GetSize () - 8; + uint8_t data[length]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + SetMtu (i.ReadNtohU32 ()); + i.Read (data, length); + m_packet = Create (data, length); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6TimeExceeded); + +TypeId Icmpv6TimeExceeded::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6TimeExceeded") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6TimeExceeded::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6TimeExceeded::Icmpv6TimeExceeded () + : m_packet (0) +{ + SetType (ICMPV6_ERROR_TIME_EXCEEDED); +} + +Icmpv6TimeExceeded::~Icmpv6TimeExceeded () +{ +} + +Ptr Icmpv6TimeExceeded::GetPacket () const +{ + return m_packet; +} + +void Icmpv6TimeExceeded::SetPacket (Ptr p) +{ + NS_ASSERT (p->GetSize () <= 1280); + m_packet = p; +} + +void Icmpv6TimeExceeded::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << ")"; +} + +uint32_t Icmpv6TimeExceeded::GetSerializedSize () const +{ + return 8 + m_packet->GetSize (); +} + +void Icmpv6TimeExceeded::Serialize (Buffer::Iterator start) const +{ + const uint8_t *packet = m_packet->PeekData (); + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + i.WriteHtonU32 (0); + + i.Write (packet, m_packet->GetSize ()); + + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); +} + +uint32_t Icmpv6TimeExceeded::Deserialize (Buffer::Iterator start) +{ + uint16_t length = start.GetSize () - 8; + uint8_t data[length]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + i.ReadNtohU32 (); + i.Read (data, length); + m_packet = Create (data, length); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6ParameterError); + +TypeId Icmpv6ParameterError::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6ParameterError") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6ParameterError::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6ParameterError::Icmpv6ParameterError () + : m_packet (0), + m_ptr (0) +{ + SetType (ICMPV6_ERROR_PARAMETER_ERROR); +} + +Icmpv6ParameterError::~Icmpv6ParameterError () +{ +} + +Ptr Icmpv6ParameterError::GetPacket () const +{ + return m_packet; +} + +void Icmpv6ParameterError::SetPacket (Ptr p) +{ + NS_ASSERT (p->GetSize () <= 1280); + m_packet = p; +} + +uint32_t Icmpv6ParameterError::GetPtr () const +{ + return m_ptr; +} + +void Icmpv6ParameterError::SetPtr (uint32_t ptr) +{ + m_ptr = ptr; +} + +void Icmpv6ParameterError::Print (std::ostream& os) +{ + os << "( type = " << (uint32_t)GetType () << " (Destination Unreachable) code = " << (uint32_t)GetCode () << " checksum = " << (uint32_t)GetChecksum () << " ptr = " << (uint32_t)GetPtr () << ")"; +} + +uint32_t Icmpv6ParameterError::GetSerializedSize () const +{ + return 8 + m_packet->GetSize (); +} + +void Icmpv6ParameterError::Serialize (Buffer::Iterator start) const +{ + const uint8_t *packet = m_packet->PeekData (); + uint16_t checksum = 0; + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetCode ()); + i.WriteHtonU16 (0); + i.WriteHtonU32 (GetPtr ()); + + i.Write (packet, m_packet->GetSize ()); + + i = start; + checksum = i.CalculateIpChecksum (i.GetSize (), GetChecksum ()); + + i = start; + i.Next (2); + i.WriteU16 (checksum); +} + +uint32_t Icmpv6ParameterError::Deserialize (Buffer::Iterator start) +{ + uint16_t length = start.GetSize () - 8; + uint8_t data[length]; + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + SetCode (i.ReadU8 ()); + m_checksum = i.ReadU16 (); + SetPtr (i.ReadNtohU32 ()); + i.Read (data, length); + m_packet = Create (data, length); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionHeader); + +TypeId Icmpv6OptionHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6OptionHeader") + .SetParent
() + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6OptionHeader::GetInstanceTypeId () const +{ + return GetTypeId (); +} + + +Icmpv6OptionHeader::Icmpv6OptionHeader () +{ + /* TODO */ + m_type = 0; + m_len = 0; +} + +Icmpv6OptionHeader::~Icmpv6OptionHeader () +{ +} + +uint8_t Icmpv6OptionHeader::GetType () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_type; +} + +void Icmpv6OptionHeader::SetType (uint8_t type) +{ + NS_LOG_FUNCTION_NOARGS (); + m_type = type; +} + +uint8_t Icmpv6OptionHeader::GetLength () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_len; +} + +void Icmpv6OptionHeader::SetLength (uint8_t len) +{ + NS_LOG_FUNCTION_NOARGS (); + m_len = len; +} + +void Icmpv6OptionHeader::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << ")"; +} + +uint32_t Icmpv6OptionHeader::GetSerializedSize () const +{ + return m_len*8; +} + +uint32_t Icmpv6OptionHeader::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + return GetSerializedSize (); +} + +void Icmpv6OptionHeader::Serialize (Buffer::Iterator start) const +{ + Buffer::Iterator i = start; +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionMtu); + +TypeId Icmpv6OptionMtu::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6OptionMtu") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6OptionMtu::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6OptionMtu::Icmpv6OptionMtu () +{ + SetType (Icmpv6Header::ICMPV6_OPT_MTU); + SetLength (1); + SetReserved (0); +} + +Icmpv6OptionMtu::Icmpv6OptionMtu (uint32_t mtu) + : m_mtu (mtu) +{ + SetType (Icmpv6Header::ICMPV6_OPT_MTU); + SetLength (1); + SetReserved (0); +} + +Icmpv6OptionMtu::~Icmpv6OptionMtu () +{ +} + +uint16_t Icmpv6OptionMtu::GetReserved () const +{ + return m_reserved; +} + +void Icmpv6OptionMtu::SetReserved (uint16_t reserved) +{ + m_reserved = reserved; +} + +uint32_t Icmpv6OptionMtu::GetMtu () const +{ + return m_mtu; +} + +void Icmpv6OptionMtu::SetMtu (uint32_t mtu) +{ + m_mtu = mtu; +} + +void Icmpv6OptionMtu::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << " MTU = " << m_mtu << ")"; +} + +uint32_t Icmpv6OptionMtu::GetSerializedSize () const +{ + return 8; /* m_len = 1 so the real size is multiple by 8 */ +} + +void Icmpv6OptionMtu::Serialize (Buffer::Iterator start) const +{ + Buffer::Iterator i = start; + i.WriteU8 (GetType ()); + i.WriteU8 (GetLength ()); + i.WriteHtonU16 (GetReserved ()); + i.WriteHtonU32 (GetMtu ()); +} + +uint32_t Icmpv6OptionMtu::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + SetType (i.ReadU8 ()); + SetLength (i.ReadU8 ()); + SetReserved (i.ReadNtohU16 ()); + SetMtu (i.ReadNtohU32 ()); + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionPrefixInformation); + +TypeId Icmpv6OptionPrefixInformation::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6OptionPrefixInformation") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6OptionPrefixInformation::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation () +{ + SetType (Icmpv6Header::ICMPV6_OPT_PREFIX); + SetLength (4); + SetPrefix (Ipv6Address ("::")); + SetPrefixLength (0); + SetValidTime (0); + SetPreferredTime (0); + SetFlags (0); + SetReserved (0); +} + +Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation (Ipv6Address prefix, uint8_t prefixlen) +{ + SetType (Icmpv6Header::ICMPV6_OPT_PREFIX); + SetLength (4); + SetPrefix (prefix); + SetPrefixLength (prefixlen); + SetValidTime (0); + SetPreferredTime (0); + SetFlags (0); + SetReserved (0); +} + +Icmpv6OptionPrefixInformation::~Icmpv6OptionPrefixInformation () +{ +} + +uint8_t Icmpv6OptionPrefixInformation::GetPrefixLength () const +{ + return m_prefixLength; +} + +void Icmpv6OptionPrefixInformation::SetPrefixLength (uint8_t prefixLength) +{ + NS_ASSERT (prefixLength <= 128); + m_prefixLength = prefixLength; +} + +uint8_t Icmpv6OptionPrefixInformation::GetFlags () const +{ + return m_flags; +} + +void Icmpv6OptionPrefixInformation::SetFlags (uint8_t flags) +{ + m_flags = flags; +} + +uint32_t Icmpv6OptionPrefixInformation::GetValidTime () const +{ + return m_validTime; +} + +void Icmpv6OptionPrefixInformation::SetValidTime (uint32_t validTime) +{ + m_validTime = validTime; +} + +uint32_t Icmpv6OptionPrefixInformation::GetPreferredTime () const +{ + return m_preferredTime; +} + +void Icmpv6OptionPrefixInformation::SetPreferredTime (uint32_t preferredTime) +{ + m_preferredTime = preferredTime; +} + +uint32_t Icmpv6OptionPrefixInformation::GetReserved () const +{ + return m_preferredTime; +} + +void Icmpv6OptionPrefixInformation::SetReserved (uint32_t reserved) +{ + m_reserved = reserved; +} + +Ipv6Address Icmpv6OptionPrefixInformation::GetPrefix () const +{ + return m_prefix; +} + +void Icmpv6OptionPrefixInformation::SetPrefix (Ipv6Address prefix) +{ + m_prefix = prefix; +} + +void Icmpv6OptionPrefixInformation::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << " prefix " << m_prefix << ")"; +} + +uint32_t Icmpv6OptionPrefixInformation::GetSerializedSize () const +{ + return 32; +} + +void Icmpv6OptionPrefixInformation::Serialize (Buffer::Iterator start) const +{ + Buffer::Iterator i = start; + uint8_t buf[16]; + + memset (buf, 0x00, sizeof (buf)); + + i.WriteU8 (GetType ()); + i.WriteU8 (GetLength ()); + i.WriteU8 (m_prefixLength); + i.WriteU8 (m_flags); + i.WriteHtonU32 (m_validTime); + i.WriteHtonU32 (m_preferredTime); + i.WriteHtonU32 (m_reserved); + m_prefix.GetBytes (buf); + i.Write (buf, 16); +} + +uint32_t Icmpv6OptionPrefixInformation::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + uint8_t buf[16]; + + SetType (i.ReadU8 ()); + SetLength (i.ReadU8 ()); + SetPrefixLength (i.ReadU8 ()); + SetFlags (i.ReadU8 ()); + SetValidTime (i.ReadNtohU32 ()); + SetPreferredTime (i.ReadNtohU32 ()); + SetReserved (i.ReadNtohU32 ()); + i.Read (buf, 16); + + Ipv6Address prefix (buf); + SetPrefix (prefix); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionLinkLayerAddress); + +TypeId Icmpv6OptionLinkLayerAddress::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6OptionLinkLayerAddress") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6OptionLinkLayerAddress::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress (bool source) +{ + SetType (source ? Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE : Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET); +} + +Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress () +{ + SetType (Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE); +} + +Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress (bool source, Address addr) +{ + SetType (source ? Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE : Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET); + SetAddress (addr); + SetLength (GetSerializedSize () / 8); +} + +Icmpv6OptionLinkLayerAddress::~Icmpv6OptionLinkLayerAddress () +{ +} + +Address Icmpv6OptionLinkLayerAddress::GetAddress () const +{ + return m_addr; +} + +void Icmpv6OptionLinkLayerAddress::SetAddress (Address addr) +{ + m_addr = addr; +} + +void Icmpv6OptionLinkLayerAddress::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << " L2 Address = " << m_addr << ")"; +} + +uint32_t Icmpv6OptionLinkLayerAddress::GetSerializedSize () const +{ + /* TODO add padding */ + uint8_t nb = 2 + m_addr.GetLength (); + return nb; +} + +void Icmpv6OptionLinkLayerAddress::Serialize (Buffer::Iterator start) const +{ + NS_LOG_FUNCTION_NOARGS (); + Buffer::Iterator i = start; + uint8_t mac[32]; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetLength ()); + m_addr.CopyTo (mac); + i.Write (mac, m_addr.GetLength ()); + + /* XXX if size of the option is not a multiple of 8, add padding */ +} + +uint32_t Icmpv6OptionLinkLayerAddress::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + uint8_t mac[32]; + + SetType (i.ReadU8 ()); + SetLength (i.ReadU8 ()); + i.Read (mac, (GetLength () * 8) - 2); + + m_addr.CopyFrom (mac, (GetLength () * 8)-2); + + return GetSerializedSize (); +} + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionRedirected); + +TypeId Icmpv6OptionRedirected::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6OptionRedirected") + .SetParent () + .AddConstructor () + ; + return tid; +} + +TypeId Icmpv6OptionRedirected::GetInstanceTypeId () const +{ + return GetTypeId (); +} + +Icmpv6OptionRedirected::Icmpv6OptionRedirected () + : m_packet (0) +{ + SetType (Icmpv6Header::ICMPV6_OPT_REDIRECTED); +} + +Icmpv6OptionRedirected::~Icmpv6OptionRedirected () +{ + m_packet = 0; +} + +Ptr Icmpv6OptionRedirected::GetPacket () const +{ + return m_packet; +} + +void Icmpv6OptionRedirected::SetPacket (Ptr packet) +{ + NS_ASSERT (packet->GetSize () <= 1280); + m_packet = packet; + SetLength (1 + (m_packet->GetSize () / 8)); +} + +void Icmpv6OptionRedirected::Print (std::ostream& os) const +{ + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << ")"; +} + +uint32_t Icmpv6OptionRedirected::GetSerializedSize () const +{ + return 8 + m_packet->GetSize (); +} + +void Icmpv6OptionRedirected::Serialize (Buffer::Iterator start) const +{ + NS_LOG_FUNCTION_NOARGS (); + Buffer::Iterator i = start; + + i.WriteU8 (GetType ()); + i.WriteU8 (GetLength ()); + // Reserved + i.WriteU16 (0); + i.WriteU32 (0); + + i.Write (m_packet->PeekData (), m_packet->GetSize ()); +} + +uint32_t Icmpv6OptionRedirected::Deserialize (Buffer::Iterator start) +{ + Buffer::Iterator i = start; + + SetType (i.ReadU8 ()); + uint8_t length = i.ReadU8 (); + SetLength (length); + i.ReadU16 (); + i.ReadU32 (); + + uint32_t len2 = (GetLength () - 1) * 8; + uint8_t buff[len2]; + i.Read (buff, len2); + m_packet = Create (buff, len2); + + return GetSerializedSize (); +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/icmpv6-header.h b/src/internet-stack/icmpv6-header.h new file mode 100644 index 000000000..f867afedc --- /dev/null +++ b/src/internet-stack/icmpv6-header.h @@ -0,0 +1,1785 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + * Mehdi Benamor + * David Gross + */ + +#ifndef ICMPV6_HEADER_H +#define ICMPV6_HEADER_H + +#include "ns3/header.h" +#include "ns3/ipv6-address.h" +#include "ns3/packet.h" + +namespace ns3 +{ + +/** + * \class Icmpv6Header + * \brief ICMPv6 header. + */ +class Icmpv6Header : public Header +{ + public: + /** + * \enum Type_e + * \brief ICMPv6 type code. + */ + enum Type_e + { + ICMPV6_ERROR_DESTINATION_UNREACHABLE = 1, + ICMPV6_ERROR_PACKET_TOO_BIG, + ICMPV6_ERROR_TIME_EXCEEDED, + ICMPV6_ERROR_PARAMETER_ERROR, + ICMPV6_ECHO_REQUEST=128, + ICMPV6_ECHO_REPLY, + ICMPV6_SUBSCRIBE_REQUEST, + ICMPV6_SUBSCRIBE_REPORT, + ICMPV6_SUBSCRIVE_END, + ICMPV6_ND_ROUTER_SOLICITATION, + ICMPV6_ND_ROUTER_ADVERTISEMENT, + ICMPV6_ND_NEIGHBOR_SOLICITATION, + ICMPV6_ND_NEIGHBOR_ADVERTISEMENT, + ICMPV6_ND_REDIRECTION, + ICMPV6_ROUTER_RENUMBER, + ICMPV6_INFORMATION_REQUEST, + ICMPV6_INFORMATION_RESPONSE, + ICMPV6_INVERSE_ND_SOLICITATION, + ICMPV6_INVERSE_ND_ADVERSTISEMENT, + ICMPV6_MLDV2_SUBSCRIBE_REPORT, + ICMPV6_MOBILITY_HA_DISCOVER_REQUEST, + ICMPV6_MOBILITY_HA_DISCOVER_RESPONSE, + ICMPV6_MOBILITY_MOBILE_PREFIX_SOLICITATION, + ICMPV6_SECURE_ND_CERTIFICATE_PATH_SOLICITATION, + ICMPV6_SECURE_ND_CERTIFICATE_PATH_ADVERTISEMENT, + ICMPV6_EXPERIMENTAL_MOBILITY + }; + + /** + * \enum OptionType_e + * \brief ICMPv6 Option type code. + */ + enum OptionType_e + { + ICMPV6_OPT_LINK_LAYER_SOURCE = 1, + ICMPV6_OPT_LINK_LAYER_TARGET, + ICMPV6_OPT_PREFIX, + ICMPV6_OPT_REDIRECTED, + ICMPV6_OPT_MTU + }; + + /** + * \enum ErrorDestinationUnreachable_e + * \brief ICMPv6 error code : Destination Unreachable + */ + enum ErrorDestinationUnreachable_e + { + ICMPV6_NO_ROUTE = 0, + ICMPV6_ADM_PROHIBITED, + ICMPV6_NOT_NEIGHBOUR, + ICMPV6_ADDR_UNREACHABLE, + ICMPV6_PORT_UNREACHABLE + }; + + /** + * \enum ErrorTimeExceeded_e + * \brief ICMPv6 error code : Time Exceeded + */ + enum ErrorTimeExceeded_e + { + ICMPV6_HOPLIMIT = 0, + ICMPV6_FRAGTIME + }; + + /** + * \enum ErrorParameterError_e + * \brief ICMPv6 error code : Parameter Error + */ + enum ErrorParameterError_e + { + ICMPV6_MALFORMED_HEADER = 0, + ICMPV6_UNKNOWN_NEXT_HEADER, + ICMPV6_UNKNOWN_OPTION + }; + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Constructor. + */ + Icmpv6Header (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6Header (); + + /** + * \brief Get the type field. + * \return type of ICMPv6 message + */ + uint8_t GetType () const; + + /** + * \brief Set the type. + * \param type type to set + */ + void SetType (uint8_t type); + + /** + * \brief Get the code field. + * \return code of ICMPv6 message + */ + uint8_t GetCode () const; + + /** + * \brief Set the code field. + * \param code code to set + */ + void SetCode (uint8_t code); + + /** + * \brief Get the checksum. + * \return checksum + */ + uint16_t GetChecksum () const; + + /** + * \brief Set the checksum. + * \param checksum to set + */ + void SetChecksum (uint16_t checksum); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + /** + * \brief Calculate pseudo header checksum for IPv6. + * \param src source address + * \param dst destination address + * \param length length + * \param protocol the protocol number to use in the + * underlying IPv6 packet. + */ + void CalculatePseudoHeaderChecksum (Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol); + + protected: + /** + * \brief Checksum enable or not. + */ + bool m_calcChecksum; + + /** + * \brief The checksum. + */ + uint16_t m_checksum; + + private: + /** + * \brief The type. + */ + uint8_t m_type; + + /** + * \brief The code. + */ + uint8_t m_code; +}; + +/** + * \class Icmpv6OptionHeader + * \brief ICMPv6 option header. + */ +class Icmpv6OptionHeader : public Header +{ + public: + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Constructor. + */ + Icmpv6OptionHeader (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6OptionHeader (); + + /** + * \brief Get the type of the option. + * \return type + */ + uint8_t GetType () const; + + /** + * \brief Set the type of the option. + * \param type the type to set + */ + void SetType (uint8_t type); + + /** + * \brief Get the length of the option in 8 bytes unit. + * \return length of the option + */ + uint8_t GetLength () const; + + /** + * \brief Set the length of the option. + * \param len length value to set + */ + void SetLength (uint8_t len); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The type. + */ + uint8_t m_type; + + /** + * \brief The length. + */ + uint8_t m_len; +}; + +/** + * \class Icmpv6NS + * \brief ICMPv6 Neighbor Solicitation header. + */ +class Icmpv6NS : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + * \param target target IPv6 address + */ + Icmpv6NS (Ipv6Address target); + + /** + * \brief Constructor. + */ + Icmpv6NS (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6NS (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the reserved field. + * \return reserved value + */ + uint32_t GetReserved () const; + + /** + * \brief Set the reserved field. + * \param reserved the reserved value + */ + void SetReserved (uint32_t reserved); + + /** + * \brief Get the IPv6 target field. + * \return IPv6 address + */ + Ipv6Address GetIpv6Target () const; + + /** + * \brief Set the IPv6 target field. + * \param target IPv6 address + */ + void SetIpv6Target (Ipv6Address target); + + /** + * \brief Get the IPv6 target field. + * \return IPv6 address + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + + /** + * \brief The reserved value. + */ + uint32_t m_reserved; + + /** + * \brief The IPv6 target address. + */ + Ipv6Address m_target; +}; + +/** + * \class Icmpv6NA + * \brief ICMPv6 Neighbor Advertisement header. + */ +class Icmpv6NA : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6NA (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6NA (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the reserved field. + * \return reserved value + */ + uint32_t GetReserved () const; + + /** + * \brief Set the reserved field. + * \param reserved the reserved value + */ + void SetReserved (uint32_t reserved); + + /** + * \brief Get the IPv6 target field. + * \return IPv6 address + */ + Ipv6Address GetIpv6Target () const; + + /** + * \brief Set the IPv6 target field. + * \param target IPv6 address + */ + void SetIpv6Target (Ipv6Address target); + + /** + * \brief Get the R flag. + * \return R flag + */ + bool GetFlagR () const; + + /** + * \brief Set the R flag. + * \param r value + */ + void SetFlagR (bool r); + + /** + * \brief Get the S flag. + * \return S flag + */ + bool GetFlagS () const; + + /** + * \brief Set the S flag. + * \param s value + */ + void SetFlagS (bool s); + + /** + * \brief Get the O flag. + * \return O flag + */ + bool GetFlagO () const; + + /** + * \brief Set the O flag. + * \param o value + */ + void SetFlagO (bool o); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The R flag. + */ + bool m_flagR; + + /** + * \brief The O flag. + */ + bool m_flagS; + + /** + * \brief The M flag. + */ + bool m_flagO; + + /** + * \brief The reserved value. + */ + uint32_t m_reserved; + + /** + * \brief The IPv6 target address. + */ + Ipv6Address m_target; +}; + +/** + * \class Icmpv6RA + * \brief ICMPv6 Router Advertisement header. + */ +class Icmpv6RA : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6RA (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6RA (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Set the IPv6 maximum number of jumps. + * \param m maximum jumps + */ + void SetCurHopLimit (uint8_t m); + + /** + * \brief Get the IPv6 maximum number of jumps. + * \return maximum jumps + */ + uint8_t GetCurHopLimit () const; + + /** + * \brief Set the node Life time (Neighbor Discovery). + * \param l life time + */ + void SetLifeTime (uint16_t l); + + /** + * \brief Get the node Life time (Neighbor Discovery). + * \return life time + */ + uint16_t GetLifeTime () const; + + /** + * \brief Set the node Reachable time (Neighbor Discovery). + * \param r Reachable time + */ + void SetReachableTime (uint32_t r); + + /** + * \brief Get the node Reachable time (Neighbor Discovery). + * \return reachable time + */ + uint32_t GetReachableTime () const; + + /** + * \brief Set the node Retransmission time (Neighbor Discovery). + * \param r Retransmission time + */ + void SetRetransmissionTime (uint32_t r); + + /** + * \brief Get the node Retransmission time (Neighbor Discovery). + * \return retransmission time + */ + uint32_t GetRetransmissionTime () const; + + /** + * \brief Get the M flag. + * \return M flag + */ + bool GetFlagM () const; + + /** + * \brief Set the M flag. + * \param m value + */ + void SetFlagM (bool m); + + /** + * \brief Get the O flag. + * \return O flag + */ + bool GetFlagO () const; + + /** + * \brief Set the O flag. + * \param o value + */ + void SetFlagO (bool o); + + /** + * \brief Get the H flag. + * \return H flag + */ + bool GetFlagH () const; + + /** + * \brief Set the H flag. + * \param h value + */ + void SetFlagH (bool h); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Getflags. + * \return the flags value + */ + uint8_t GetFlags () const; + + /** + * \brief Setflags. + * \param f the flags value + */ + void SetFlags (uint8_t f); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The M flag. + */ + bool m_flagM; + + /** + * \brief The O flag. + */ + bool m_flagO; + + /** + * \brief The H flag. + */ + bool m_flagH; + + /** + * \brief The flags field value. + */ + uint8_t m_flags; + + /** + * \brief The lifetime value. + */ + uint16_t m_LifeTime; + + /** + * \brief The reachable time value. + */ + uint32_t m_ReachableTime; + + /** + * \brief The retransmission timer. + */ + uint32_t m_RetransmissionTimer; + + /** + * \brief The max jumps. + */ + uint8_t m_curHopLimit; +}; + +/** + * \class Icmpv6RS + * \brief ICMPv6 Router Solicitation header. + */ +class Icmpv6RS : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6RS (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6RS (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the reserved field. + * \return reserved value + */ + uint32_t GetReserved () const; + + /** + * \brief Set the reserved field. + * \param reserved the reserved value + */ + void SetReserved (uint32_t reserved); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The reserved value. + */ + uint32_t m_reserved; +}; + +/** + * \class Icmpv6Redirection + * \brief ICMPv6 Redirection header. + */ +class Icmpv6Redirection : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6Redirection (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6Redirection (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the IPv6 target address. + * \return the IPv6 target address + */ + Ipv6Address GetTarget () const; + + /** + * \brief Set the IPv6 target address. + * \param target IPv6 target address + */ + void SetTarget (Ipv6Address target); + + /** + * \brief Get the IPv6 destination address. + * \return the IPv6 destination address + */ + Ipv6Address GetDestination () const; + + /** + * \brief Set the IPv6 destination address. + * \param destination IPv6 destination address + */ + void SetDestination (Ipv6Address destination); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + /** + * \brief Get the reserved field. + * \return reserved value + */ + uint32_t GetReserved () const; + + /** + * \brief Set the reserved field. + * \param reserved the reserved value + */ + void SetReserved (uint32_t reserved); + + private: + /** + * \brief IPv6 target address. + */ + Ipv6Address m_target; + + /** + * \brief IPv6 destination address. + */ + Ipv6Address m_destination; + + /** + * \brief Reserved value. + */ + uint32_t m_reserved; +}; + +/** + * \class Icmpv6Echo + * \brief ICMPv6 Echo message. + */ +class Icmpv6Echo : public Icmpv6Header +{ + public: + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Default constructor. + */ + Icmpv6Echo (); + + /** + * \brief Constructor. + * \param request request or reply message + */ + Icmpv6Echo (bool request); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6Echo (); + + /** + * \brief Get the ID of the packet. + * \return id + */ + uint16_t GetId () const; + + /** + * \brief Set the ID of the packet. + * \param id id to set + */ + void SetId (uint16_t id); + + /** + * \brief Get the sequence number. + * \return sequence number + */ + uint16_t GetSeq () const; + + /** + * \brief Set the sequence number. + * \param seq sequence to set + */ + void SetSeq (uint16_t seq); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief ID of the packet (to distinguish response between many ping program). + */ + uint16_t m_id; + + /** + * \brief Sequence number (to distinguish response). + */ + uint16_t m_seq; +}; + +/** + * \class Icmpv6DestinationUnreachable + * \brief ICMPv6 Error Destination Unreachable header. + */ +class Icmpv6DestinationUnreachable : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6DestinationUnreachable (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6DestinationUnreachable (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the incorrect packet. + * \return the incorrect packet + */ + Ptr GetPacket () const; + + /** + * \brief Set the incorrect packet. + * \param p the incorrect packet + */ + void SetPacket (Ptr p); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The incorrect Packet. + */ + Ptr m_packet; +}; + +/** + * \class Icmpv6TooBig + * \brief ICMPv6 Error Too Big header. + */ +class Icmpv6TooBig : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6TooBig (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6TooBig (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the incorrect packet. + * \return the incorrect packet + */ + Ptr GetPacket () const; + + /** + * \brief Set the incorrect packet. + * \param p the incorrect packet + */ + void SetPacket (Ptr p); + + /** + * \brief Get the MTU field. + * \return MTU value + */ + uint32_t GetMtu () const; + + /** + * \brief Set the MTU. + * \param mtu the MTU + */ + void SetMtu (uint32_t mtu); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + + /** + * \brief the incorrect packet. + */ + Ptr m_packet; + + /** + * \brief The MTU value. + */ + uint32_t m_mtu; +}; + +/** + * \class Icmpv6TimeExceeded + * \brief ICMPv6 Error Time Exceeded header. + */ +class Icmpv6TimeExceeded : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6TimeExceeded (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6TimeExceeded (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the incorrect packet. + * \return the incorrect packet + */ + Ptr GetPacket () const; + + /** + * \brief Set the incorrect packet. + * \param p the incorrect packet + */ + void SetPacket (Ptr p); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + + /** + * \brief The incorrect packet. + */ + Ptr m_packet; +}; + +/** + * \class Icmpv6ParameterError + * \brief ICMPv6 Error Parameter Error header. + */ +class Icmpv6ParameterError : public Icmpv6Header +{ + public: + /** + * \brief Constructor. + */ + Icmpv6ParameterError (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6ParameterError (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the incorrect packet. + * \return the incorrect packet + */ + Ptr GetPacket () const; + + /** + * \brief Set the incorrect packet. + * \param p the incorrect packet + */ + void SetPacket (Ptr p); + + /** + * \brief Get the pointer field. + * \return pointer value + */ + uint32_t GetPtr () const; + + /** + * \brief Set the pointer field. + * \param ptr byte where the error is located in the incorrect packet + */ + void SetPtr (uint32_t ptr); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os); + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + + /** + * \brief The incorrect packet. + */ + Ptr m_packet; + + /** + * \brief The pointer field. + */ + uint32_t m_ptr; +}; + +/** + * \class Icmpv6OptionMtu + * \brief ICMPv6 MTU option. + */ +class Icmpv6OptionMtu : public Icmpv6OptionHeader +{ + public: + /** + * \brief Constructor. + */ + Icmpv6OptionMtu (); + + /** + * \brief Constructor. + * \param mtu MTU used. + */ + Icmpv6OptionMtu (uint32_t mtu); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6OptionMtu (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the reserved field. + * \return the reserved value + */ + uint16_t GetReserved () const; + + /** + * \brief Set the reserved field. + * \param reserved the reserved value + */ + void SetReserved (uint16_t reserved); + + /** + * \brief Get the MTU. + * \return the MTU value + */ + uint32_t GetMtu () const; + + /** + * \brief Set the MTU. + * \param mtu the MTU to set + */ + void SetMtu (uint32_t mtu); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The reserved value + */ + uint16_t m_reserved; + + /** + * \brief The MTU value. + */ + uint32_t m_mtu; +}; + +/** + * \class Icmpv6OptionPrefixInformation + * \brief ICMPv6 Option Prefix Information. + */ +class Icmpv6OptionPrefixInformation : public Icmpv6OptionHeader +{ + public: + /** + * \brief Constructor. + */ + Icmpv6OptionPrefixInformation (); + + /** + * \brief Constructor. + * \param network prefix + * \param prefixlen prefix length + */ + Icmpv6OptionPrefixInformation (Ipv6Address network, uint8_t prefixlen); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6OptionPrefixInformation (); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Get the prefix length. + * \return prefix length + */ + uint8_t GetPrefixLength () const; + + /** + * \brief Set the prefix length. + * \param prefixLength the prefix length + */ + void SetPrefixLength (uint8_t prefixLength); + + /** + * \brief Get the flags. + * \return the flags. + */ + uint8_t GetFlags () const; + + /** + * \brief Set the flags. + * \param flags the flags to set + */ + void SetFlags (uint8_t flags); + + /** + * \brief Get the valid time of the information. + * \return valid time + */ + uint32_t GetValidTime () const; + + /** + * \brief Set the valid time of the information. + * \param validTime valid time + */ + void SetValidTime (uint32_t validTime); + + /** + * \brief Get the preferred time of the information. + * \return preferred time + */ + uint32_t GetPreferredTime () const; + + /** + * \brief Set the preferred time of the information. + * \param preferredTime preferred time + */ + void SetPreferredTime (uint32_t preferredTime); + + /** + * \brief Get the reserved field. + * \return the reserved field (should be 0x00000000) + */ + uint32_t GetReserved () const; + + /** + * \brief Set the reserved field (normally it will be 0x00000000). + * \param reserved reserved value + */ + void SetReserved (uint32_t reserved); + + /** + * \brief Get the IPv6 prefix. + * \return IPv6 prefix + */ + Ipv6Address GetPrefix () const; + + /** + * \brief Set the IPv6 prefix. + * \param prefix the IPv6 prefix + */ + void SetPrefix (Ipv6Address prefix); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The prefix value. + */ + Ipv6Address m_prefix; + + /** + * \brief The length of the prefix. + */ + uint8_t m_prefixLength; + + /** + * \brief The flags. + */ + uint8_t m_flags; + + /** + * \brief The valid time. + */ + uint32_t m_validTime; + + /** + * \brief The preferred time. + */ + uint32_t m_preferredTime; + + /** + * \brief The reserved field. + */ + uint32_t m_reserved; +}; + +/** + * \class Icmpv6OptionLinkLayerAddress + * \brief ICMPv6 link-layer address option. + */ +class Icmpv6OptionLinkLayerAddress : public Icmpv6OptionHeader +{ + public: + /** + * \brief Constructor. + * \param source source hardware address or target hardware address for the option + */ + Icmpv6OptionLinkLayerAddress (bool source); + + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId (void) const; + + /** + * \brief Constructor. + * \param source source hardware address or target hardware address for the option + * \param addr hardware address + */ + Icmpv6OptionLinkLayerAddress (bool source, Address addr); + + /** + * \brief Constructor. + */ + Icmpv6OptionLinkLayerAddress (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6OptionLinkLayerAddress (); + + /** + * \brief Get the hardware address. + * \return the hardware address + */ + Address GetAddress () const; + + /** + * \brief Set the hardware address. + * \param addr the address to set + */ + void SetAddress (Address addr); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The hardware address. + */ + Address m_addr; +}; + +/** + * \class Icmpv6OptionRedirected + * \brief ICMPv6 redirected option. + */ +class Icmpv6OptionRedirected : public Icmpv6OptionHeader +{ + public: + /** + * \brief Get the UID of this class. + * \return UID + */ + static TypeId GetTypeId (); + + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; + + /** + * \brief Constructor. + */ + Icmpv6OptionRedirected (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6OptionRedirected (); + + /** + * \brief Get the redirected packet. + * \return the redirected packet + */ + Ptr GetPacket () const; + + /** + * \brief Set the redirected packet. + * \param packet the redirected packet + */ + void SetPacket (Ptr packet); + + /** + * \brief Print informations. + * \param os output stream + */ + virtual void Print (std::ostream& os) const; + + /** + * \brief Get the serialized size. + * \return serialized size + */ + virtual uint32_t GetSerializedSize () const; + + /** + * \brief Serialize the packet. + * \param start start offset + */ + virtual void Serialize (Buffer::Iterator start) const; + + /** + * \brief Deserialize the packet. + * \param start start offset + * \return length of packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); + + private: + /** + * \brief The redirected packet. + */ + Ptr m_packet; +}; + +} /* namespace ns3 */ + +#endif /* ICMPV6_HEADER_H */ + diff --git a/src/internet-stack/icmpv6-l4-protocol.cc b/src/internet-stack/icmpv6-l4-protocol.cc new file mode 100644 index 000000000..1917c5926 --- /dev/null +++ b/src/internet-stack/icmpv6-l4-protocol.cc @@ -0,0 +1,1205 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + * David Gross + * Mehdi Benamor + */ + +#include "ns3/log.h" +#include "ns3/assert.h" +#include "ns3/packet.h" +#include "ns3/node.h" +#include "ns3/ipv6-routing-protocol.h" +#include "ns3/ipv6-route.h" + +#include "ipv6-raw-socket-factory-impl.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" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Icmpv6L4Protocol); + +NS_LOG_COMPONENT_DEFINE ("Icmpv6L4Protocol"); + +const uint8_t Icmpv6L4Protocol::PROT_NUMBER = 58; + +const uint8_t Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERT_INTERVAL = 16; +const uint8_t Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERTISEMENTS = 3; +const uint8_t Icmpv6L4Protocol::MAX_FINAL_RTR_ADVERTISEMENTS = 3; +const uint8_t Icmpv6L4Protocol::MIN_DELAY_BETWEEN_RAS = 3; +const uint32_t Icmpv6L4Protocol::MAX_RA_DELAY_TIME = 500; /* millisecond */ + +const uint8_t Icmpv6L4Protocol::MAX_RTR_SOLICITATION_DELAY = 1; +const uint8_t Icmpv6L4Protocol::RTR_SOLICITATION_INTERVAL = 4; +const uint8_t Icmpv6L4Protocol::MAX_RTR_SOLICITATIONS = 3; + +const uint8_t Icmpv6L4Protocol::MAX_MULTICAST_SOLICIT = 3; +const uint8_t Icmpv6L4Protocol::MAX_UNICAST_SOLICIT = 3; +const uint8_t Icmpv6L4Protocol::MAX_ANYCAST_DELAY_TIME = 1; +const uint8_t Icmpv6L4Protocol::MAX_NEIGHBOR_ADVERTISEMENT = 3; +const uint32_t Icmpv6L4Protocol::REACHABLE_TIME = 30000; +const uint32_t Icmpv6L4Protocol::RETRANS_TIMER = 1000; +const uint8_t Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME = 5; +const double Icmpv6L4Protocol::MIN_RANDOM_FACTOR = 0.5; +const double Icmpv6L4Protocol::MAX_RANDOM_FACTOR = 1.5; + +TypeId Icmpv6L4Protocol::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Icmpv6L4Protocol") + .SetParent () + .AddConstructor () + ; + return tid; +} + +Icmpv6L4Protocol::Icmpv6L4Protocol () + : m_node (0) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Icmpv6L4Protocol::~Icmpv6L4Protocol () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void Icmpv6L4Protocol::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + for (CacheList::const_iterator it = m_cacheList.begin () ; it != m_cacheList.end () ; it++) + { + Ptr cache = *it; + cache->Dispose (); + cache = 0; + } + m_cacheList.clear (); + + m_node = 0; + Ipv6L4Protocol::DoDispose (); +} + +void Icmpv6L4Protocol::NotifyNewAggregate () +{ + NS_LOG_FUNCTION_NOARGS (); + if (m_node == 0) + { + Ptr node = this->GetObject (); + if (node != 0) + { + Ptr ipv6 = this->GetObject (); + if (ipv6 != 0) + { + this->SetNode (node); + ipv6->Insert (this); + Ptr rawFactory = CreateObject (); + ipv6->AggregateObject (rawFactory); + } + } + } + Object::NotifyNewAggregate (); +} + +void Icmpv6L4Protocol::SetNode (Ptr node) +{ + NS_LOG_FUNCTION (this << node); + m_node = node; +} + +uint16_t Icmpv6L4Protocol::GetStaticProtocolNumber () +{ + NS_LOG_FUNCTION_NOARGS (); + return PROT_NUMBER; +} + +int Icmpv6L4Protocol::GetProtocolNumber () const +{ + NS_LOG_FUNCTION_NOARGS (); + return PROT_NUMBER; +} + +int Icmpv6L4Protocol::GetVersion () const +{ + NS_LOG_FUNCTION_NOARGS (); + return 1; +} + +void Icmpv6L4Protocol::DoDAD (Ipv6Address target, Ptr interface) +{ + NS_LOG_FUNCTION (this << target << interface); + Ipv6Address addr; + + Ptr ipv6 = m_node->GetObject (); + NS_ASSERT (ipv6); + + /* TODO : disable multicast loopback to prevent NS probing to be received by the sender */ + + Ptr p = ForgeNS ("::" ,Ipv6Address::MakeSolicitedAddress (target), target, interface->GetDevice ()->GetAddress ()); + + /* update last packet UID */ + interface->SetNsDadUid (target, p->GetUid ()); + interface->Send (p, Ipv6Address::MakeSolicitedAddress (target)); +} + +enum Ipv6L4Protocol::RxStatus_e Icmpv6L4Protocol::Receive (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Ptr p = packet->Copy (); + Ptr ipv6 = m_node->GetObject (); + + switch (*p->PeekData ()) /* very ugly! try to find something better in the future */ + { + case Icmpv6Header::ICMPV6_ND_ROUTER_SOLICITATION: + if (ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->GetDevice ()))) + { + HandleRS (p, src, dst, interface); + } + break; + case Icmpv6Header::ICMPV6_ND_ROUTER_ADVERTISEMENT: + if (!ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->GetDevice ()))) + { + HandleRA (p, src, dst, interface); + } + break; + case Icmpv6Header::ICMPV6_ND_NEIGHBOR_SOLICITATION: + HandleNS (p, src, dst, interface); + break; + case Icmpv6Header::ICMPV6_ND_NEIGHBOR_ADVERTISEMENT: + HandleNA (p, src, dst, interface); + break; + case Icmpv6Header::ICMPV6_ND_REDIRECTION: + HandleRedirection (p, src, dst, interface); + break; + case Icmpv6Header::ICMPV6_ECHO_REQUEST: + HandleEchoRequest (p, src, dst, interface); + break; + case Icmpv6Header::ICMPV6_ECHO_REPLY: + break; + case Icmpv6Header::ICMPV6_ERROR_DESTINATION_UNREACHABLE: + break; + case Icmpv6Header::ICMPV6_ERROR_PACKET_TOO_BIG: + break; + case Icmpv6Header::ICMPV6_ERROR_TIME_EXCEEDED: + break; + case Icmpv6Header::ICMPV6_ERROR_PARAMETER_ERROR: + break; + default: + NS_LOG_LOGIC ("Unknown ICMPv6 message type=" << (uint8_t)*p->PeekData ()); + break; + } + + return Ipv6L4Protocol::RX_OK; +} + +void Icmpv6L4Protocol::HandleEchoRequest (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Icmpv6Echo request; + packet->RemoveHeader (request); + + /* if we send message from ff02::* (link-local multicast), we use our link-local address */ + SendEchoReply (dst.IsMulticast () ? interface->GetLinkLocalAddress ().GetAddress () : dst, src, request.GetId (), request.GetSeq (), packet); +} + +void Icmpv6L4Protocol::HandleRA (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Ptr p = packet->Copy (); + Icmpv6RA raHeader; + Ptr ipv6 = m_node->GetObject (); + Icmpv6OptionPrefixInformation prefixHdr; + Icmpv6OptionMtu mtuHdr; + Icmpv6OptionLinkLayerAddress llaHdr; + uint8_t type = 0; + bool next = true; + bool hasLla = false; + bool hasMtu = false; + + p->RemoveHeader (raHeader); + + while (next == true) + { + type = *p->PeekData (); + + switch (type) + { + case Icmpv6Header::ICMPV6_OPT_PREFIX: + p->RemoveHeader (prefixHdr); + ipv6->AddAutoconfiguredAddress (ipv6->GetInterfaceForDevice (interface->GetDevice ()), prefixHdr.GetPrefix (), prefixHdr.GetPrefixLength (), + prefixHdr.GetFlags (), prefixHdr.GetValidTime (), prefixHdr.GetPreferredTime (), src); + break; + case Icmpv6Header::ICMPV6_OPT_MTU: + /* take in account the first MTU option */ + if (!hasMtu) + { + p->RemoveHeader (mtuHdr); + hasMtu = true; + /* XXX case of multiple prefix on single interface */ + /* interface->GetDevice ()->SetMtu (m.GetMtu ()); */ + } + break; + case Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE: + /* take in account the first LLA option */ + if (!hasLla) + { + p->RemoveHeader (llaHdr); + ReceiveLLA (llaHdr, src, dst, interface); + hasLla = true; + } + break; + default: + /* unknow option, quit */ + next = false; + } + } +} + +void Icmpv6L4Protocol::ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << lla << src << dst << interface); + Address hardwareAddress; + NdiscCache::Entry* entry = NULL; + Ptr cache = FindCache (interface->GetDevice ()); + + /* check if we have this address in our cache */ + entry = cache->Lookup (src); + + if (!entry) + { + entry = cache->Add (src); + entry->SetRouter (true); + entry->SetMacAddress (lla.GetAddress ()); + entry->MarkReachable (); + entry->StartReachableTimer (); + } + else + { + std::list > waiting; + if (entry->IsIncomplete ()) + { + entry->StopRetransmitTimer (); + // mark it to reachable + waiting = entry->MarkReachable (lla.GetAddress ()); + entry->StopReachableTimer (); + entry->StartReachableTimer (); + // send out waiting packet + for (std::list >::const_iterator it = waiting.begin (); it != waiting.end (); it++) + { + cache->GetInterface ()->Send (*it, src); + } + entry->ClearWaitingPacket (); + } + else + { + if (entry->GetMacAddress ()!=lla.GetAddress ()) + { + entry->SetMacAddress (lla.GetAddress ()); + entry->MarkStale (); + entry->SetRouter (true); + } + else + { + if (!entry->IsReachable ()) + { + entry->StopProbeTimer (); + entry->StopDelayTimer (); + waiting = entry->MarkReachable (lla.GetAddress ()); + if (entry->IsProbe ()) + { + for (std::list >::const_iterator it = waiting.begin (); it != waiting.end (); it++) + { + cache->GetInterface ()->Send (*it, src); + } + } + entry->StopReachableTimer (); + entry->StartReachableTimer (); + } + } + } + } +} + +void Icmpv6L4Protocol::HandleRS (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Ptr ipv6 = m_node->GetObject (); + Icmpv6RS rsHeader; + packet->RemoveHeader (rsHeader); + Address hardwareAddress; + Icmpv6OptionLinkLayerAddress lla (1); + NdiscCache::Entry* entry = NULL; + Ptr cache = FindCache (interface->GetDevice ()); + + if (src != Ipv6Address::GetAny ()) + { + /* XXX search all options following the RS header */ + /* test if the next option is SourceLinkLayerAddress */ + if (*packet->PeekData () != Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE) + { + return; + } + packet->RemoveHeader (lla); + NS_LOG_LOGIC ("Cache updated by RS"); + + entry = cache->Lookup (src); + if (!entry) + { + entry = cache->Add (src); + entry->SetRouter (false); + entry->MarkStale (lla.GetAddress ()); + } + else if (entry->GetMacAddress () != lla.GetAddress ()) + { + entry->MarkStale (lla.GetAddress ()); + } + } +} + +void Icmpv6L4Protocol::HandleNS (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Icmpv6NS nsHeader ("::"); + Ipv6InterfaceAddress ifaddr; + uint32_t nb = interface->GetNAddresses (); + uint32_t i = 0; + bool found = false; + + packet->RemoveHeader (nsHeader); + + Ipv6Address target = nsHeader.GetIpv6Target (); + + for (i = 0 ; i < nb ; i++) + { + ifaddr = interface->GetAddress (i); + + if (ifaddr.GetAddress () == target) + { + found = true; + break; + } + } + + if (!found) + { + NS_LOG_LOGIC ("Not a NS for us"); + return; + } + + if (packet->GetUid () == ifaddr.GetNsDadUid ()) + { + /* don't process our own DAD probe */ + NS_LOG_LOGIC ("Hey we receive our DAD probe!"); + return; + } + + Icmpv6OptionLinkLayerAddress lla (1); + Address hardwareAddress; + NdiscCache::Entry* entry = 0; + Ptr cache = FindCache (interface->GetDevice ()); + uint8_t flags = 0; + + /* XXX search all options following the NS header */ + + if (src != Ipv6Address::GetAny ()) + { + if (*packet->PeekData () != Icmpv6Header::ICMPV6_OPT_LINK_LAYER_SOURCE) + { + return; + } + + /* Get LLA */ + packet->RemoveHeader (lla); + + entry = cache->Lookup (src); + if (!entry) + { + entry = cache->Add (src); + entry->SetRouter (false); + entry->MarkStale (lla.GetAddress ()); + } + else if (entry->GetMacAddress () != lla.GetAddress ()) + { + entry->MarkStale (lla.GetAddress ()); + } + + flags = 3; /* S + O flags */ + } + else + { + /* it means someone do a DAD */ + flags = 1; /* O flag */ + } + + /* send a NA to src */ + Ptr ipv6 = m_node->GetObject (); + + if (ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->GetDevice ()))) + { + flags += 4; /* R flag */ + } + + hardwareAddress = interface->GetDevice ()->GetAddress (); + Ptr p = ForgeNA (target.IsLinkLocal () ? interface->GetLinkLocalAddress ().GetAddress () : ifaddr.GetAddress (), src.IsAny () ? Ipv6Address::GetAllNodesMulticast () : src, &hardwareAddress, flags ); + interface->Send (p, src.IsAny () ? Ipv6Address::GetAllNodesMulticast () : src); + + /* not a NS for us discard it */ +} + +Ptr Icmpv6L4Protocol::ForgeRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress) +{ + NS_LOG_FUNCTION (this << src << dst << hardwareAddress); + Ptr p = Create (); + Ipv6Header ipHeader; + Icmpv6RS rs; + Icmpv6OptionLinkLayerAddress llOption (1, hardwareAddress); /* we give our mac address in response */ + + NS_LOG_LOGIC ("Send RS ( from " << src << " to " << dst << ")"); + p->AddHeader (llOption); + + rs.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + rs.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (rs); + + ipHeader.SetSourceAddress (src); + ipHeader.SetDestinationAddress (dst); + ipHeader.SetNextHeader (PROT_NUMBER); + ipHeader.SetPayloadLength (p->GetSize ()); + ipHeader.SetHopLimit (255); + + p->AddHeader (ipHeader); + + return p; +} + +Ptr Icmpv6L4Protocol::ForgeEchoRequest (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr data) +{ + NS_LOG_FUNCTION (this << src << dst << id << seq << data); + Ptr p = data->Copy (); + Ipv6Header ipHeader; + Icmpv6Echo req (1); + + req.SetId (id); + req.SetSeq (seq); + + p->AddHeader (req); + + return p; +} + +void Icmpv6L4Protocol::HandleNA (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + Icmpv6NA naHeader; + Icmpv6OptionLinkLayerAddress lla (1); + + packet->RemoveHeader (naHeader); + Ipv6Address target = naHeader.GetIpv6Target (); + + Address hardwareAddress; + NdiscCache::Entry* entry = 0; + Ptr cache = FindCache (interface->GetDevice ()); + std::list > waiting; + + /* check if we have something in our cache */ + entry = cache->Lookup (target); + + if (!entry) + { + /* ouch!! we are victim of a DAD */ + Ipv6InterfaceAddress ifaddr; + bool found = false; + uint32_t i = 0; + uint32_t nb = 0; + + for (i = 0 ; i < nb ; i++) + { + if (ifaddr.GetAddress () == target) + { + found = true; + break; + } + } + + if (found) + { + if (ifaddr.GetState () == Ipv6InterfaceAddress::TENTATIVE || ifaddr.GetState () == Ipv6InterfaceAddress::TENTATIVE_OPTIMISTIC) + { + interface->SetState (ifaddr.GetAddress (), Ipv6InterfaceAddress::INVALID); + } + } + /* we have not initiated any communication with the target so... discard the NA */ + return; + } + + /* XXX search all options following the NA header */ + /* Get LLA */ + if (*packet->PeekData () != Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET) + { + return; + } + packet->RemoveHeader (lla); + + if (entry->IsIncomplete ()) + { + /* we receive a NA so stop the retransmission timer */ + entry->StopRetransmitTimer (); + + if (naHeader.GetFlagS ()) + { + /* mark it to reachable */ + waiting = entry->MarkReachable (lla.GetAddress ()); + entry->StopReachableTimer (); + entry->StartReachableTimer (); + /* send out waiting packet */ + for (std::list >::const_iterator it = waiting.begin (); it != waiting.end (); it++) + { + cache->GetInterface ()->Send (*it, src); + } + entry->ClearWaitingPacket (); + } + else + { + entry->MarkStale (lla.GetAddress ()); + } + + if (naHeader.GetFlagR ()) + { + entry->SetRouter (true); + } + } + else + { + /* we receive a NA so stop the probe timer or delay timer if any */ + entry->StopProbeTimer (); + entry->StopDelayTimer (); + + /* if the Flag O is clear and mac address differs from the cache */ + if (!naHeader.GetFlagO () && lla.GetAddress ()!=entry->GetMacAddress ()) + { + if (entry->IsReachable ()) + { + entry->MarkStale (); + } + return; + } + else + { + if ((!naHeader.GetFlagO () && lla.GetAddress () == entry->GetMacAddress ()) || naHeader.GetFlagO ()) /* XXX lake "no target link-layer address option supplied" */ + { + entry->SetMacAddress (lla.GetAddress ()); + + if (naHeader.GetFlagS ()) + { + if (!entry->IsReachable ()) + { + if (entry->IsProbe ()) + { + waiting = entry->MarkReachable (lla.GetAddress ()); + for (std::list >::const_iterator it = waiting.begin (); it != waiting.end (); it++) + { + cache->GetInterface ()->Send (*it, src); + } + entry->ClearWaitingPacket (); + } + else + { + entry->MarkReachable (lla.GetAddress ()); + } + } + entry->StopReachableTimer (); + entry->StartReachableTimer (); + } + else if (lla.GetAddress ()!=entry->GetMacAddress ()) + { + entry->MarkStale (); + } + entry->SetRouter (naHeader.GetFlagR ()); + } + } + } +} + +void Icmpv6L4Protocol::HandleRedirection (Ptr packet, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface) +{ + NS_LOG_FUNCTION (this << packet << src << dst << interface); + bool hasLla = false; + Ptr p = packet->Copy (); + Icmpv6OptionLinkLayerAddress llOptionHeader (0); + + Icmpv6Redirection redirectionHeader; + p->RemoveHeader (redirectionHeader); + + /* little ugly try to find a better way */ + if (*p->PeekData () == Icmpv6Header::ICMPV6_OPT_LINK_LAYER_TARGET) + { + hasLla = true; + p->RemoveHeader (llOptionHeader); + } + + Icmpv6OptionRedirected redirectedOptionHeader; + p->RemoveHeader (redirectedOptionHeader); + + Ipv6Address redirTarget = redirectionHeader.GetTarget (); + Ipv6Address redirDestination = redirectionHeader.GetDestination (); + + if (hasLla) + { + /* update the cache if needed */ + NdiscCache::Entry* entry = NULL; + Ptr cache = FindCache (interface->GetDevice ()); + + entry = cache->Lookup (redirTarget); + if (!entry) + { + entry = cache->Add (redirTarget); + /* destination and target different => necessarily a router */ + entry->SetRouter (!redirTarget.IsEqual (redirDestination) ? true : false); + entry->SetMacAddress (llOptionHeader.GetAddress ()); + entry->MarkStale (); + } + else + { + if (entry->IsIncomplete () || entry->GetMacAddress () != llOptionHeader.GetAddress ()) + { + /* update entry to STALE */ + if (entry->GetMacAddress ()!=llOptionHeader.GetAddress ()) + { + entry->SetMacAddress (llOptionHeader.GetAddress ()); + entry->MarkStale (); + } + } + else + { + /* stay unchanged */ + } + } + } + + /* add redirection in routing table */ + Ptr ipv6 = m_node->GetObject (); + + if (redirTarget.IsEqual (redirDestination)) + { + ipv6->GetRoutingProtocol ()->NotifyAddRoute (redirDestination, Ipv6Prefix (128), Ipv6Address ("::"), ipv6->GetInterfaceForAddress (dst)); + } + else + { + uint32_t ifIndex = ipv6->GetInterfaceForAddress (dst); + ipv6->GetRoutingProtocol ()->NotifyAddRoute (redirDestination, Ipv6Prefix (128), redirTarget, ifIndex); + } +} + +void Icmpv6L4Protocol::SendMessage (Ptr packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl) +{ + NS_LOG_FUNCTION (this << packet << src << dst << (uint32_t)ttl); + Ptr ipv6 = m_node->GetObject (); + SocketIpTtlTag tag; + NS_ASSERT (ipv6 != 0); + + tag.SetTtl (ttl); + packet->AddPacketTag (tag); + ipv6->Send (packet, src, dst, PROT_NUMBER, 0); +} + +void Icmpv6L4Protocol::SendMessage (Ptr packet, Ipv6Address dst, Icmpv6Header& icmpv6Hdr, uint8_t ttl) +{ + NS_LOG_FUNCTION (this << packet << dst << icmpv6Hdr << (uint32_t)ttl); + Ptr ipv6 = m_node->GetObject (); + NS_ASSERT (ipv6 != 0 && ipv6->GetRoutingProtocol () != 0); + Ipv6Header header; + SocketIpTtlTag tag; + Socket::SocketErrno err; + Ptr route; + uint32_t oif = 0; //specify non-zero if bound to a source address + + header.SetDestinationAddress (dst); + route = ipv6->GetRoutingProtocol ()->RouteOutput (packet, header, oif, err); + + if (route != 0) + { + NS_LOG_LOGIC ("Route exists"); + tag.SetTtl (ttl); + packet->AddPacketTag (tag); + Ipv6Address src = route->GetSource (); + + icmpv6Hdr.CalculatePseudoHeaderChecksum (src, dst, packet->GetSize () + icmpv6Hdr.GetSerializedSize (), PROT_NUMBER); + packet->AddHeader (icmpv6Hdr); + ipv6->Send (packet, src, dst, PROT_NUMBER, route); + } + else + { + NS_LOG_WARN ("drop icmp message"); + } +} + +void Icmpv6L4Protocol::SendNA (Ipv6Address src, Ipv6Address dst, Address* hardwareAddress, uint8_t flags) +{ + NS_LOG_FUNCTION (this << src << dst << hardwareAddress << flags); + Ptr p = Create (); + Icmpv6NA na; + Icmpv6OptionLinkLayerAddress llOption (0, *hardwareAddress); /* not a source link layer */ + + NS_LOG_LOGIC ("Send NA ( from " << src << " to " << dst << " target " << src << ")"); + na.SetIpv6Target (src); + + if ((flags & 1)) + { + na.SetFlagO (true); + } + if ((flags & 2) && src != Ipv6Address::GetAny ()) + { + na.SetFlagS (true); + } + if ((flags & 4)) + { + na.SetFlagR (true); + } + + p->AddHeader (llOption); + na.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + na.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (na); + + SendMessage (p, src, dst, 255); +} + +void Icmpv6L4Protocol::SendEchoReply (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr data) +{ + NS_LOG_FUNCTION (this << src << dst << id << seq << data); + Ptr p = data->Copy (); + Icmpv6Echo reply (0); /* echo reply */ + + reply.SetId (id); + reply.SetSeq (seq); + + reply.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + reply.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (reply); + SendMessage (p, src, dst, 64); +} + +void Icmpv6L4Protocol::SendNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress) +{ + NS_LOG_FUNCTION (this << src << dst << target << hardwareAddress); + Ptr p = Create (); + /* Ipv6Header ipHeader; */ + Icmpv6NS ns (target); + Icmpv6OptionLinkLayerAddress llOption (1, hardwareAddress); /* we give our mac address in response */ + + /* if the source is unspec, multicast the NA to all-nodes multicast */ + if (src == Ipv6Address::GetAny ()) + { + dst = Ipv6Address::GetAllNodesMulticast (); + } + + NS_LOG_LOGIC ("Send NS ( from " << src << " to " << dst << " target " << target <<")"); + + p->AddHeader (llOption); + ns.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + ns.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (ns); + SendMessage (p, src, dst, 255); +} + +void Icmpv6L4Protocol::SendRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress) +{ + NS_LOG_FUNCTION (this << src << dst << hardwareAddress); + Ptr p = Create (); + Icmpv6RS rs; + Icmpv6OptionLinkLayerAddress llOption (1, hardwareAddress); /* we give our mac address in response */ + + /* if the source is unspec, multicast the NA to all-nodes multicast */ + if (src != Ipv6Address::GetAny ()) + { + p->AddHeader (llOption); + } + + NS_LOG_LOGIC ("Send RS ( from " << src << " to " << dst << ")"); + + rs.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + rs.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (rs); + SendMessage (p, src, dst, 255); +} + +void Icmpv6L4Protocol::SendErrorDestinationUnreachable (Ptr malformedPacket, Ipv6Address dst, uint8_t code) +{ + NS_LOG_FUNCTION (this << malformedPacket << dst << (uint32_t)code); + Ptr p = Create (); + uint32_t malformedPacketSize = malformedPacket->GetSize (); + Icmpv6DestinationUnreachable header; + + NS_LOG_LOGIC ("Send Destination Unreachable ( to " << dst << " code " << (uint32_t)code << " )"); + + /* 48 = sizeof IPv6 header + sizeof ICMPv6 error header */ + if (malformedPacketSize <= 1280 - 48) + { + header.SetPacket (malformedPacket); + } + else + { + Ptr fragment = malformedPacket->CreateFragment (0, 1280 - 48); + header.SetPacket (fragment); + } + + header.SetCode (code); + SendMessage (p, dst, header, 255); +} + +void Icmpv6L4Protocol::SendErrorTooBig (Ptr malformedPacket, Ipv6Address dst, uint32_t mtu) +{ + NS_LOG_FUNCTION (this << malformedPacket << dst << mtu); + Ptr p = Create (); + uint32_t malformedPacketSize = malformedPacket->GetSize (); + Icmpv6TooBig header; + + NS_LOG_LOGIC ("Send Too Big ( to " << dst << " )"); + + /* 48 = sizeof IPv6 header + sizeof ICMPv6 error header */ + if (malformedPacketSize <= 1280 - 48) + { + header.SetPacket (malformedPacket); + } + else + { + Ptr fragment = malformedPacket->CreateFragment (0, 1280 - 48); + header.SetPacket (fragment); + } + + header.SetCode (0); + header.SetMtu (mtu); + SendMessage (p, dst, header, 255); +} + +void Icmpv6L4Protocol::SendErrorTimeExceeded (Ptr malformedPacket, Ipv6Address dst, uint8_t code) +{ + NS_LOG_FUNCTION (this<< malformedPacket << dst << code); + Ptr p = Create (); + uint32_t malformedPacketSize = malformedPacket->GetSize (); + Icmpv6TimeExceeded header; + + NS_LOG_LOGIC ("Send Time Exceeded ( to " << dst << " code " << (uint32_t)code << " )"); + + /* 48 = sizeof IPv6 header + sizeof ICMPv6 error header */ + if (malformedPacketSize <= 1280 - 48) + { + header.SetPacket (malformedPacket); + } + else + { + Ptr fragment = malformedPacket->CreateFragment (0, 1280 - 48); + header.SetPacket (fragment); + } + + header.SetCode (code); + SendMessage (p, dst, header, 255); +} + +void Icmpv6L4Protocol::SendErrorParameterError (Ptr malformedPacket, Ipv6Address dst, uint8_t code, uint32_t ptr) +{ + NS_LOG_FUNCTION (this << malformedPacket << dst << code << ptr); + Ptr p = Create (); + uint32_t malformedPacketSize = malformedPacket->GetSize (); + Icmpv6ParameterError header; + + NS_LOG_LOGIC ("Send Parameter Error ( to " << dst << " code " << (uint32_t)code << " )"); + + /* 48 = sizeof IPv6 header + sizeof ICMPv6 error header */ + if (malformedPacketSize <= 1280 -48 ) + { + header.SetPacket (malformedPacket); + } + else + { + Ptr fragment = malformedPacket->CreateFragment (0, 1280 - 48); + header.SetPacket (fragment); + } + + header.SetCode (code); + header.SetPtr (ptr); + SendMessage (p, dst, header, 255); +} + +void Icmpv6L4Protocol::SendRedirection (Ptr redirectedPacket, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget) +{ + NS_LOG_FUNCTION (this << redirectedPacket << dst << redirTarget << redirDestination << redirHardwareTarget); + uint32_t llaSize = 0; + Ptr p = Create (); + uint32_t redirectedPacketSize = redirectedPacket->GetSize (); + Icmpv6OptionLinkLayerAddress llOption (0); + + NS_LOG_LOGIC ("Send Redirection ( to " << dst << " target " << redirTarget << " destination " << redirDestination << " )"); + + Icmpv6OptionRedirected redirectedOptionHeader; + + if ((redirectedPacketSize % 8) != 0) + { + redirectedPacket->AddPaddingAtEnd (8 - (redirectedPacketSize % 8)); + } + + if (redirHardwareTarget.GetLength ()) + { + llOption.SetAddress (redirHardwareTarget); + llaSize = llOption.GetSerializedSize (); + } + + /* 56 = sizeof IPv6 header + sizeof ICMPv6 error header + sizeof redirected option */ + if (redirectedPacketSize <= (1280 - 56 - llaSize)) + { + redirectedOptionHeader.SetPacket (redirectedPacket); + } + else + { + Ptr fragment = redirectedPacket->CreateFragment (0, 1280 - 56 - llaSize); + redirectedOptionHeader.SetPacket (fragment); + } + + p->AddHeader (redirectedOptionHeader); + + if (llaSize) + { + p->AddHeader (llOption); + } + + Icmpv6Redirection redirectionHeader; + redirectionHeader.SetTarget (redirTarget); + redirectionHeader.SetDestination (redirDestination); + SendMessage (p, dst, redirectionHeader, 64); +} + +Ptr Icmpv6L4Protocol::ForgeNA (Ipv6Address src, Ipv6Address dst, Address* hardwareAddress, uint8_t flags) +{ + NS_LOG_FUNCTION (this << src << dst << hardwareAddress << (uint32_t)flags); + Ptr p = Create (); + Ipv6Header ipHeader; + Icmpv6NA na; + Icmpv6OptionLinkLayerAddress llOption (0, *hardwareAddress); /* we give our mac address in response */ + + NS_LOG_LOGIC ("Send NA ( from " << src << " to " << dst << ")"); + + /* forge the entire NA packet from IPv6 header to ICMPv6 link-layer option, so that the packet does not pass by Icmpv6L4Protocol::Lookup again */ + + p->AddHeader (llOption); + na.SetIpv6Target (src); + + if ((flags & 1)) + { + na.SetFlagO (true); + } + if ((flags & 2) && src != Ipv6Address::GetAny ()) + { + na.SetFlagS (true); + } + if ((flags & 4)) + { + na.SetFlagR (true); + } + + na.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + na.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (na); + + ipHeader.SetSourceAddress (src); + ipHeader.SetDestinationAddress (dst); + ipHeader.SetNextHeader (PROT_NUMBER); + ipHeader.SetPayloadLength (p->GetSize ()); + ipHeader.SetHopLimit (255); + + p->AddHeader (ipHeader); + + return p; +} + +Ptr Icmpv6L4Protocol::ForgeNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress) +{ + NS_LOG_FUNCTION (this << src << dst << target << hardwareAddress); + Ptr p = Create (); + Ipv6Header ipHeader; + Icmpv6NS ns (target); + Icmpv6OptionLinkLayerAddress llOption (1, hardwareAddress); /* we give our mac address in response */ + + /* if the source is unspec, multicast the NA to all-nodes multicast */ + if (src == Ipv6Address::GetAny ()) + { + dst = Ipv6Address::GetAllNodesMulticast (); + } + + NS_LOG_LOGIC ("Send NS ( from " << src << " to " << dst << " target " << target <<")"); + + p->AddHeader (llOption); + ns.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + ns.GetSerializedSize (), PROT_NUMBER); + p->AddHeader (ns); + + ipHeader.SetSourceAddress (src); + ipHeader.SetDestinationAddress (dst); + ipHeader.SetNextHeader (PROT_NUMBER); + ipHeader.SetPayloadLength (p->GetSize ()); + ipHeader.SetHopLimit (255); + + p->AddHeader (ipHeader); + + return p; +} + +Ptr Icmpv6L4Protocol::FindCache (Ptr device) +{ + NS_LOG_FUNCTION (this << device); + + for (CacheList::const_iterator i = m_cacheList.begin () ; i != m_cacheList.end () ; i++) + { + if ((*i)->GetDevice () == device) + { + return *i; + } + } + + NS_ASSERT (false); + /* quiet compiler */ + return 0; +} + +Ptr Icmpv6L4Protocol::CreateCache (Ptr device, Ptr interface) +{ + Ptr ipv6 = m_node->GetObject (); + Ptr cache = CreateObject (); + cache->SetDevice (device, interface); + + /* XXX : make a list of callback in net-device.cc + * else we override IPv4 flushing ARP table... + */ +/* device->SetLinkChangeCallback (MakeCallback (&NdiscCache::Flush, cache)); */ + m_cacheList.push_back (cache); + return cache; +} + +bool Icmpv6L4Protocol::Lookup (Ptr p, Ipv6Address dst, Ptr device, Ptr cache, Address* hardwareDestination) +{ + NS_LOG_FUNCTION (this << p << dst << device << hardwareDestination); + + if (!cache) + { + /* try to find the cache */ + cache = FindCache (device); + } + + NdiscCache::Entry* entry = cache->Lookup (dst); + if (entry) + { + if (entry->IsReachable () || entry->IsDelay ()) + { + /* XXX check reachability time */ + /* send packet */ + *hardwareDestination = entry->GetMacAddress (); + return true; + } + else if (entry->IsStale ()) + { + /* *hardwareDestination = entry->GetMacAddress (); */ + /* start delay timer */ + entry->StartDelayTimer (); + entry->MarkDelay (); + *hardwareDestination = entry->GetMacAddress (); + return true; + } + else /* PROBE */ + { + /* queue packet */ + entry->AddWaitingPacket (p); + return false; + } + } + else + { + /* we contact this node for the first time + * add it to the cache and send an NS + */ + Ipv6Address addr; + NdiscCache::Entry* entry = cache->Add (dst); + entry->MarkIncomplete (p); + entry->SetRouter (false); + + if (dst.IsLinkLocal ()) + { + addr = cache->GetInterface ()->GetLinkLocalAddress ().GetAddress (); + } + else if (cache->GetInterface ()->GetNAddresses () == 1) /* an interface have at least one address (link-local) */ + { + /* try to resolve global address without having global address so return! */ + cache->Remove (entry); + return false; + } + else + { + /* find source address that match destination */ + addr = cache->GetInterface ()->GetAddressMatchingDestination (dst).GetAddress (); + } + + SendNS (addr, Ipv6Address::MakeSolicitedAddress (dst), dst, cache->GetDevice ()->GetAddress ()); + + /* start retransmit timer */ + entry->StartRetransmitTimer (); + return false; + } + + return false; +} + +void Icmpv6L4Protocol::FunctionDadTimeout (Ptr icmpv6, Ipv6Interface* interface, Ipv6Address addr) +{ + NS_LOG_FUNCTION_NOARGS (); + NS_LOG_LOGIC (interface << " " << addr); + Ipv6InterfaceAddress ifaddr; + bool found = false; + uint32_t i = 0; + uint32_t nb = interface->GetNAddresses (); + + for (i = 0 ; i < nb ; i++) + { + ifaddr = interface->GetAddress (i); + + if (ifaddr.GetAddress () == addr) + { + found = true; + break; + } + } + + /* for the moment, this function is always called, if we was victim of a DAD the address is INVALID + * and we do not set it to PREFERRED + */ + if (found && ifaddr.GetState () != Ipv6InterfaceAddress::INVALID) + { + interface->SetState (ifaddr.GetAddress (), Ipv6InterfaceAddress::PREFERRED); + NS_LOG_LOGIC ("DAD OK, interface in state PREFERRED"); + + /* send an RS if our interface is not forwarding (router) and if address is a link-local ones + * (because we will send RS with it) + */ + Ptr ipv6 = icmpv6->m_node->GetObject (); + + if (!ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->GetDevice ())) && addr.IsLinkLocal ()) + { + /* XXX because all nodes start at the same time, there will be many of RS arround 1 second of simulation time + * TODO Add random delays before sending RS + */ + Simulator::Schedule (Seconds (0.0), &Icmpv6L4Protocol::SendRS, PeekPointer (icmpv6), ifaddr.GetAddress (), Ipv6Address::GetAllRoutersMulticast (), interface->GetDevice ()->GetAddress ()); + } + } +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/icmpv6-l4-protocol.h b/src/internet-stack/icmpv6-l4-protocol.h new file mode 100644 index 000000000..a1976df33 --- /dev/null +++ b/src/internet-stack/icmpv6-l4-protocol.h @@ -0,0 +1,472 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + * David Gross + * Mehdi Benamor + */ + +#ifndef ICMPV6_L4_PROTOCOL_H +#define ICMPV6_L4_PROTOCOL_H + +#include +#include "ns3/ipv6-address.h" +#include "ns3/ptr.h" +#include "ns3/socket.h" +#include "ns3/buffer.h" +#include "icmpv6-header.h" +#include "ipv6-l4-protocol.h" +#include "ndisc-cache.h" +#include "ipv6-l3-protocol.h" + +namespace ns3 +{ + +class NetDevice; +class Node; +class Packet; +class TraceContext; + +/** + * \class Icmpv6L4Protocol + * \brief An implementation of the ICMPv6 protocol. + */ +class Icmpv6L4Protocol : public Ipv6L4Protocol +{ + public: + /** + * \brief Interface ID + */ + static TypeId GetTypeId (); + + /** + * \brief ICMPv6 protocol number (58). + */ + static const uint8_t PROT_NUMBER; + + /** + * \brief Neighbor Discovery router constants : max initial RA initial interval. + */ + static const uint8_t MAX_INITIAL_RTR_ADVERT_INTERVAL; + + /** + * \brief Neighbor Discovery router constants : max initial RA transmission. + */ + static const uint8_t MAX_INITIAL_RTR_ADVERTISEMENTS; + + /** + * \brief Neighbor Discovery router constants : max final RA transmission. + */ + static const uint8_t MAX_FINAL_RTR_ADVERTISEMENTS; + + /** + * \brief Neighbor Discovery router constants : min delay between RA. + */ + static const uint8_t MIN_DELAY_BETWEEN_RAS; + + /** + * \brief Neighbor Discovery router constants : max delay between RA. + */ + static const uint32_t MAX_RA_DELAY_TIME; + + /** + * \brief Neighbor Discovery host constants : max RS delay. + */ + static const uint8_t MAX_RTR_SOLICITATION_DELAY; + + /** + * \brief Neighbor Discovery host constants : RS interval. + */ + static const uint8_t RTR_SOLICITATION_INTERVAL; + + /** + * \brief Neighbor Discovery host constants : max RS transmission. + */ + static const uint8_t MAX_RTR_SOLICITATIONS; + + /** + * \brief Neighbor Discovery node constants : max multicast solicitations. + */ + static const uint8_t MAX_MULTICAST_SOLICIT; + + /** + * \brief Neighbor Discovery node constants : max unicast solicitations. + */ + static const uint8_t MAX_UNICAST_SOLICIT; + + /** + * \brief Neighbor Discovery node constants : max anycast delay. + */ + static const uint8_t MAX_ANYCAST_DELAY_TIME; + + /** + * \brief Neighbor Discovery node constants : max NA transmission. + */ + static const uint8_t MAX_NEIGHBOR_ADVERTISEMENT; + + /** + * \brief Neighbor Discovery node constants : reachable time. + */ + static const uint32_t REACHABLE_TIME; + + /** + * \brief Neighbor Discovery node constants : retransmission timer. + */ + static const uint32_t RETRANS_TIMER; + + /** + * \brief Neighbor Discovery node constants : delay for the first probe. + */ + static const uint8_t DELAY_FIRST_PROBE_TIME; + + /** + * \brief Neighbor Discovery node constants : min random factor. + */ + static const double MIN_RANDOM_FACTOR; + + /** + * \brief Neighbor Discovery node constants : max random factor. + */ + static const double MAX_RANDOM_FACTOR; + + /** + * \brief Get ICMPv6 protocol number. + * \return protocol number + */ + static uint16_t GetStaticProtocolNumber (); + + /** + * \brief Constructor. + */ + Icmpv6L4Protocol (); + + /** + * \brief Destructor. + */ + virtual ~Icmpv6L4Protocol (); + + /** + * \brief Set the node. + * \param node the node to set + */ + void SetNode (Ptr node); + + /** + * \brief This method is called by AddAgregate and completes the aggregation + * by setting the node in the ICMPv6 stack and adding ICMPv6 factory to + * IPv6 stack connected to the node. + */ + void NotifyNewAggregate (); + + /** + * \brief Get the protocol number. + * \return protocol number + */ + virtual int GetProtocolNumber () const; + + /** + * \brief Get the version of the protocol. + * \return version + */ + virtual int GetVersion () const; + + /** + * \brief Send a packet via ICMPv6, note that packet already contains ICMPv6 header. + * \param packet the packet to send which contains ICMPv6 header + * \param src source address + * \param dst destination address + * \param ttl next hop limit + */ + void SendMessage (Ptr packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl); + + /** + * \brief Send a packet via ICMPv6. + * \param packet the packet to send + * \param dst destination address + * \param icmpv6Hdr ICMPv6 header (needed to calculate checksum + * after source address is determined by routing stuff + * \param ttl next hop limit + */ + void SendMessage (Ptr packet, Ipv6Address dst, Icmpv6Header& icmpv6Hdr, uint8_t ttl); + + /** + * \brief Do the Duplication Address Detection (DAD). + * \param target target address + * \param interface interface + */ + void DoDAD (Ipv6Address target, Ptr interface); + + /** + * \brief Send a Neighbor Adverstisement. + * \param src source IPv6 address + * \param dst destination IPv6 address + * \param hardwareAddress our MAC address + * \param flags to set (4 = flag R, 2 = flag S, 3 = flag O) + */ + void SendNA (Ipv6Address src, Ipv6Address dst, Address* hardwareAddress, uint8_t flags); + + /** + * \brief Send a Echo Reply. + * \param src source IPv6 address + * \param dst destination IPv6 address + * \param id id of the packet + * \param seq sequence number + * \param data auxiliary data + * \todo Change data to be a char[], change it too in icmpv6-header. + */ + void SendEchoReply (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr data); + + /** + * \brief Send a Neighbor Solicitation. + * \param src source IPv6 address + * \param dst destination IPv6 addresss + * \param target target IPv6 address + * \param hardwareAddress our mac address + */ + void SendNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress); + + /** + * \brief Send an error Destination Unreachable. + * \param malformedPacket the malformed packet + * \param dst destination IPv6 address + * \param code code of the error + */ + void SendErrorDestinationUnreachable (Ptr malformedPacket, Ipv6Address dst, uint8_t code); + + /** + * \brief Send an error Too Big. + * \param malformedPacket the malformed packet + * \param dst destination IPv6 address + * \param mtu the mtu + */ + void SendErrorTooBig (Ptr malformedPacket, Ipv6Address dst, uint32_t mtu); + + /** + * \brief Send an error Time Exceeded. + * \param malformedPacket the malformed packet + * \param dst destination IPv6 address + * \param code code of the error + */ + void SendErrorTimeExceeded (Ptr malformedPacket, Ipv6Address dst, uint8_t code); + + /** + * \brief Send an error Parameter Error. + * \param malformedPacket the malformed packet + * \param dst destination IPv6 address + * \param code code of the error + * \param ptr byte of p where the error is located + */ + void SendErrorParameterError (Ptr malformedPacket, Ipv6Address dst, uint8_t code, uint32_t ptr); + + /** + * \brief Send an ICMPv6 Redirection. + * \param redirectedPacket the redirected packet + * \param dst destination IPv6 address + * \param redirTarget IPv6 target address for Icmpv6Redirection + * \param redirDestination IPv6 destination address for Icmpv6Redirection + * \param redirHardwareTarget L2 target address for Icmpv6OptionRdirected + */ + void SendRedirection (Ptr redirectedPacket, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget); + + /** + * \brief Forge a Neighbor Solicitation. + * \param src source IPv6 address + * \param dst destination IPv6 addresss + * \param target target IPv6 address + * \param hardwareAddress our mac address + * \return NS packet (with IPv6 header) + */ + Ptr ForgeNS (Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress); + + /** + * \brief Forge a Neighbor Advertisement. + * \param src source IPv6 address + * \param dst destination IPv6 addresss + * \param hardwareAddress our mac address + * \param flags flags (bitfield => R (4), S (2), O (1)) + * \return NA packet (with IPv6 header) + */ + Ptr ForgeNA (Ipv6Address src, Ipv6Address dst, Address* hardwareAddress, uint8_t flags); + + /** + * \brief Forge a Router Solicitation. + * \param src source IPv6 address + * \param dst destination IPv6 addresss + * \param hardwareAddress our mac address + * \return RS packet (with IPv6 header) + */ + Ptr ForgeRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress); + + /** + * \brief Forge an Echo Request. + * \param src source address + * \param dst destination address + * \param id ID of the packet + * \param seq sequence number + * \param data the data + * \return Echo Request packet (without IPv6 header) + */ + Ptr ForgeEchoRequest (Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr data); + + /** + * \brief Receive method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + virtual enum Ipv6L4Protocol::RxStatus_e Receive (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Do the Duplication Address Detection. + * It consists in sending a NS with our IPv6 as target. If + * we received a NA with matched target address, we could not use the address, + * else the address pass from TENTATIVE to PERMANENT. + * \param addr IPv6 address to test + * \param interface interface + */ + void DoDad (Ipv6Address addr, Ptr interface); + + /** + * \brief Function called when DAD timeout. + * \param icmpv6 Icmpv6L4Protocol instance + * \param interface the interface + * \param addr the IPv6 address + */ + static void FunctionDadTimeout (Ptr icmpv6, Ipv6Interface* interface, Ipv6Address addr); + + /** + * \brief Lookup in the ND cache for the IPv6 address (similar as ARP protocol). + * \param p the packet + * \param dst destination address + * \param device device + * \param cache the neighbor cache + * \param hardwareDestination hardware address + * \return true if the address is in the ND cache, the hardwareDestination is updated. + */ + bool Lookup (Ptr p, Ipv6Address dst, Ptr device, Ptr cache, Address* hardwareDestination); + + /** + * \brief Send a Router Solicitation. + * \param src link-local source address + * \param dst destination address (usealy ff02::2 i.e all-routers) + * \param hardwareAddress link-layer address (SHOULD be included if src is not :: + */ + void SendRS (Ipv6Address src, Ipv6Address dst, Address hardwareAddress); + + /** + * \brief Create a neighbor cache. + * \param device thet NetDevice + * \param interface the IPv6 interface + * \return a smart pointer of NdCache or 0 if problem + */ + Ptr CreateCache (Ptr device, Ptr interface); + + protected: + /** + * \brief Dispose this object. + */ + virtual void DoDispose (); + + private: + + typedef std::list > CacheList; + + /** + * \brief The node. + */ + Ptr m_node; + + /** + * \brief A list of cache by device. + */ + CacheList m_cacheList; + + /** + * \brief Receive Neighbor Solicitation method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleNS (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Receive Router Solicitation method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleRS (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Receive Router Advertisement method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleRA (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Receive Echo Request method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleEchoRequest (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Receive Neighbor Advertisement method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleNA (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Receive Redirection method. + * \param p the packet + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void HandleRedirection (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Link layer address option processing. + * \param lla LLA option + * \param src source address + * \param dst destination address + * \param interface the interface from which the packet is coming + */ + void ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, Ipv6Address const &src, Ipv6Address const &dst, Ptr interface); + + /** + * \brief Get the cache corresponding to the device. + * \param device the device + */ + Ptr FindCache (Ptr device); +}; + +} /* namespace ns3 */ + +#endif /* ICMPV6_L4_PROTOCOL_H */ + diff --git a/src/internet-stack/ipv6-autoconfigured-prefix.cc b/src/internet-stack/ipv6-autoconfigured-prefix.cc new file mode 100644 index 000000000..7782a40c0 --- /dev/null +++ b/src/internet-stack/ipv6-autoconfigured-prefix.cc @@ -0,0 +1,201 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Telecom Bretagne + * + * 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: Mehdi Benamor + */ + +#include +#include "ns3/log.h" +#include "ns3/packet.h" +#include "ns3/node.h" + +#include "ipv6-autoconfigured-prefix.h" + +NS_LOG_COMPONENT_DEFINE ("Ipv6AutoconfiguredPrefix"); + +namespace ns3 +{ + uint32_t Ipv6AutoconfiguredPrefix::m_prefixId = 0; + + Ipv6AutoconfiguredPrefix::Ipv6AutoconfiguredPrefix (Ptr node, uint32_t interface, Ipv6Address prefix, Ipv6Prefix mask, uint32_t preferredLifeTime, uint32_t validLifeTime, Ipv6Address router) + { + m_node = node; + m_interface = interface; + m_validLifeTime = validLifeTime; + m_preferredLifeTime = preferredLifeTime; + m_id = m_prefixId; + m_prefixId ++; + m_preferred = false; + m_valid = false; + m_prefix = prefix; + m_mask = mask; + m_defaultGatewayRouter = router; + } + + Ipv6AutoconfiguredPrefix::~Ipv6AutoconfiguredPrefix () + { + } + + void Ipv6AutoconfiguredPrefix::SetDefaultGatewayRouter (Ipv6Address router) + { + m_defaultGatewayRouter = router; + } + + Ipv6Address Ipv6AutoconfiguredPrefix::GetDefaultGatewayRouter () const + { + return m_defaultGatewayRouter; + } + + void Ipv6AutoconfiguredPrefix::SetInterface (uint32_t interface) + { + m_interface = interface; + } + + uint32_t Ipv6AutoconfiguredPrefix::GetInterface () const + { + return m_interface; + } + + void Ipv6AutoconfiguredPrefix::SetPreferredLifeTime (uint32_t t) + { + m_preferredLifeTime = t; + } + + uint32_t Ipv6AutoconfiguredPrefix::GetPreferredLifeTime () const + { + return m_preferredLifeTime; + } + + void Ipv6AutoconfiguredPrefix::SetValidLifeTime (uint32_t t) + { + m_validLifeTime = t; + } + + uint32_t Ipv6AutoconfiguredPrefix::GetValidLifeTime () const + { + return m_validLifeTime; + } + + void Ipv6AutoconfiguredPrefix::MarkPreferredTime () + { + m_preferred = true; + } + + void Ipv6AutoconfiguredPrefix::MarkValidTime () + { + m_preferred = false; + m_valid = true; + } + + void Ipv6AutoconfiguredPrefix::FunctionPreferredTimeout () + { + NS_LOG_INFO ("Preferred Time expired for " << m_prefix); + m_preferred = false; + MarkValidTime (); + StartValidTimer (); + } + + void Ipv6AutoconfiguredPrefix::FunctionValidTimeout () + { + NS_LOG_INFO ("Valid Time expired for " << m_prefix); + m_valid = false; + RemoveMe (); + } + + void Ipv6AutoconfiguredPrefix::StartPreferredTimer () + { + NS_LOG_INFO ("Start PreferredTimer for " << m_prefix); + m_preferredTimer.SetFunction (&Ipv6AutoconfiguredPrefix::FunctionPreferredTimeout, this); + m_preferredTimer.SetDelay (Seconds (m_preferredLifeTime)); + m_preferredTimer.Schedule (); + } + + void Ipv6AutoconfiguredPrefix::StartValidTimer () + { + NS_LOG_INFO ("Start ValidTimer for " << m_prefix); + m_validTimer.SetFunction (&Ipv6AutoconfiguredPrefix::FunctionValidTimeout, this); + m_validTimer.SetDelay (Seconds (m_validLifeTime - m_preferredLifeTime)); + m_validTimer.Schedule (); + } + + void Ipv6AutoconfiguredPrefix::StopPreferredTimer () + { + NS_LOG_INFO ("Stop PreferredTimer for " << m_prefix); + m_preferredTimer.Cancel (); + } + + void Ipv6AutoconfiguredPrefix::StopValidTimer () + { + NS_LOG_INFO ("Stop ValidTimer for " << m_prefix); + m_validTimer.Cancel (); + } + + void Ipv6AutoconfiguredPrefix::RemoveMe () + { + NS_LOG_INFO ("The prefix " << m_prefix << " will be removed on interface " << m_interface); + Ptr ipv6 = m_node->GetObject (); + ipv6->RemoveAutoconfiguredAddress (m_interface, m_prefix, m_mask, m_defaultGatewayRouter); + } + + void Ipv6AutoconfiguredPrefix::SetPreferred () + { + m_preferred = true; + } + + void Ipv6AutoconfiguredPrefix::SetValid () + { + m_preferred = false; + m_valid = true; + } + + uint32_t Ipv6AutoconfiguredPrefix::GetId () const + { + return m_id; + } + + bool Ipv6AutoconfiguredPrefix::IsPreferred () const + { + return m_preferred; + } + + bool Ipv6AutoconfiguredPrefix::IsValid () const + { + return m_valid; + } + + Ipv6Address Ipv6AutoconfiguredPrefix::GetPrefix () const + { + return m_prefix; + } + + void Ipv6AutoconfiguredPrefix::SetPrefix (Ipv6Address prefix) + { + m_prefix = prefix; + } + + Ipv6Prefix Ipv6AutoconfiguredPrefix::GetMask () const + { + return m_mask; + } + + void Ipv6AutoconfiguredPrefix::SetMask (Ipv6Prefix mask) + { + m_mask = mask; + } + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-autoconfigured-prefix.h b/src/internet-stack/ipv6-autoconfigured-prefix.h new file mode 100644 index 000000000..05576e75d --- /dev/null +++ b/src/internet-stack/ipv6-autoconfigured-prefix.h @@ -0,0 +1,279 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Telecom Bretagne + * + * 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: Mehdi Benamor + */ + +#ifndef IPV6_AUTOCONFIGURED_PREFIX_H +#define IPV6_AUTOCONFIGURED_PREFIX_H + +#include +#include +#include + +#include "ns3/timer.h" +#include "ns3/ipv6-address.h" +#include "ipv6-l3-protocol.h" +#include "ipv6-interface.h" + +namespace ns3 +{ + +/** + * \class Ipv6AutoconfiguredPrefix + * \brief Router prefix information. + */ +class Ipv6AutoconfiguredPrefix : public Object +{ + public: + /** + * \brief Constructor. + * \param node node + * \param interface interface index + * \param prefix IPv6 address + * \param mask bitmask prefix + * \param preferredLifeTime the preferred life time + * \param validLifeTime the valid life time + * \param router if it the prefix that configure the default gateway + */ + Ipv6AutoconfiguredPrefix (Ptr node, uint32_t interface, Ipv6Address prefix, Ipv6Prefix mask, uint32_t preferredLifeTime, uint32_t validLifeTime, Ipv6Address router = Ipv6Address ("::")); + + /** + * \brief Destructor. + */ + ~Ipv6AutoconfiguredPrefix (); + + /** + * \brief Set the default gateway router. + * \param router IPv6 link-local address of the default router + */ + void SetDefaultGatewayRouter (Ipv6Address router); + + /** + * \brief Get the default gateway address. + * \return IPv6 link-local address of the default router + */ + Ipv6Address GetDefaultGatewayRouter () const; + + /** + * \brief Get the interface index. + * \return interface index + */ + uint32_t GetInterface () const; + + /** + * \brief Set the interface. + * \param interface interface index to set + */ + void SetInterface (uint32_t interface); + + /** + * \brief Get the prefix preferred life time. + * \return preferred life time + */ + uint32_t GetPreferredLifeTime () const; + + /** + * \brief Set the prefix preferred life time. + * \param p the prefix preferred life time + */ + void SetPreferredLifeTime (uint32_t p); + + /** + * \brief Get the prefix valid life time. + * \return valid life time + */ + uint32_t GetValidLifeTime (void) const; + + /** + * \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 + * \return true if prefix is in preferred state, false otherwise + */ + bool IsPreferred () const; + + /** + * \brief Test if the prefix is valid. + * \return true if prefix is in valid state, false otherwise + */ + bool IsValid () const; + + /** + * \brief Set the prefix as preferred + */ + void SetPreferred (); + + /** + * \brief Set the prefix as valid + */ + void SetValid (); + + /** + * \brief Start the preferred timer + */ + void StartPreferredTimer (); + + /** + * \brief Start the valid timer + */ + void StartValidTimer (); + + /** + * \brief Stop the preferred timer + */ + void StopPreferredTimer (); + + /** + * \brief Stop the valid timer + */ + void StopValidTimer (); + + /** + * \brief Set the prefix as preferred + */ + void MarkPreferredTime (); + + /** + * \brief Set the prefix as valid + */ + void MarkValidTime (); + + /** + * \brief Signal that the preferred time expired and start the valid timer + */ + void FunctionPreferredTimeout (); + + /** + * \brief Signal that the valid time expired + */ + void FunctionValidTimeout (); + + /** + * \brief Remove this prefix from the prefix list + */ + void RemoveMe (); + + /** + * \brief Get the prefix identificator + * \return id of the prefix. + */ + uint32_t GetId () const; + + /** + * \brief Get the prefix address + * \return prefix address + */ + Ipv6Address GetPrefix () const; + + /** + * \brief Set the prefix address + * \param prefix prefix address to set + */ + void SetPrefix (Ipv6Address prefix); + + /** + * \brief Get the bitmask prefix. + * \return bitmask prefix + */ + Ipv6Prefix GetMask () const; + + /** + * \brief Set the bitmask prefix. + * \param mask prefix + */ + void SetMask (Ipv6Prefix mask); + + private: + /** + * \brief a static identifier. + */ + static uint32_t m_prefixId; + + /** + * \brief the identifier of this prefix. + */ + uint32_t m_id; + + /** + * \brief The node. + */ + Ptr m_node; + + /** + * \brief The prefix IP6 address. + */ + Ipv6Address m_prefix; + + /** + * \brief The prefix bitmask (length). + */ + Ipv6Prefix m_mask; + + /** + * \brief Default gateway router + * If the RA received also configured the default gateway, + * this variable has the link-local address. Otherwise this + * is "::" + */ + Ipv6Address m_defaultGatewayRouter; + + /** + * \brief The interface index (which is stored the address + * corresponding of the prefix). + */ + uint32_t m_interface; + + /** + * \brief the valid life time. + */ + uint32_t m_validLifeTime; + + /** + * \brief the preferred life time. + */ + uint32_t m_preferredLifeTime; + + /** + * \brief true if the prefix is preferred. + */ + bool m_preferred; + + /** + * \brief true if the prefix is valid. + */ + bool m_valid; + + /** + * \brief the timer for preferred life time. + */ + Timer m_preferredTimer; + + /** + * \brief the timer for valid life time. + */ + Timer m_validTimer; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_AUTOCONFIGURED_PREFIX_H */ + diff --git a/src/internet-stack/ipv6-end-point-demux.cc b/src/internet-stack/ipv6-end-point-demux.cc new file mode 100644 index 000000000..4cdbe0a56 --- /dev/null +++ b/src/internet-stack/ipv6-end-point-demux.cc @@ -0,0 +1,318 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ipv6-end-point-demux.h" +#include "ipv6-end-point.h" +#include "ns3/log.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6EndPointDemux"); + +Ipv6EndPointDemux::Ipv6EndPointDemux () + : m_ephemeral (49152) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Ipv6EndPointDemux::~Ipv6EndPointDemux () +{ + NS_LOG_FUNCTION_NOARGS (); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + Ipv6EndPoint *endPoint = *i; + delete endPoint; + } + m_endPoints.clear (); +} + +bool Ipv6EndPointDemux::LookupPortLocal (uint16_t port) +{ + NS_LOG_FUNCTION (this << port); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + if ((*i)->GetLocalPort () == port) + { + return true; + } + } + return false; +} + +bool Ipv6EndPointDemux::LookupLocal (Ipv6Address addr, uint16_t port) +{ + NS_LOG_FUNCTION (this << addr << port); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + if ((*i)->GetLocalPort () == port && + (*i)->GetLocalAddress () == addr) + { + return true; + } + } + return false; +} + +Ipv6EndPoint* Ipv6EndPointDemux::Allocate () +{ + NS_LOG_FUNCTION_NOARGS (); + uint16_t port = AllocateEphemeralPort (); + if (port == 0) + { + NS_LOG_WARN ("Ephemeral port allocation failed."); + return 0; + } + Ipv6EndPoint *endPoint = new Ipv6EndPoint (Ipv6Address::GetAny (), port); + m_endPoints.push_back (endPoint); + NS_LOG_DEBUG ("Now have >>" << m_endPoints.size () << "<< endpoints."); + return endPoint; +} + +Ipv6EndPoint* Ipv6EndPointDemux::Allocate (Ipv6Address address) +{ + NS_LOG_FUNCTION (this << address); + uint16_t port = AllocateEphemeralPort (); + if (port == 0) + { + NS_LOG_WARN ("Ephemeral port allocation failed."); + return 0; + } + Ipv6EndPoint *endPoint = new Ipv6EndPoint (address, port); + m_endPoints.push_back (endPoint); + NS_LOG_DEBUG ("Now have >>" << m_endPoints.size () << "<< endpoints."); + return endPoint; +} + +Ipv6EndPoint* Ipv6EndPointDemux::Allocate (uint16_t port) +{ + NS_LOG_FUNCTION (this << port); + + return Allocate (Ipv6Address::GetAny (), port); +} + +Ipv6EndPoint* Ipv6EndPointDemux::Allocate (Ipv6Address address, uint16_t port) +{ + NS_LOG_FUNCTION (this << address << port); + if (LookupLocal (address, port)) + { + NS_LOG_WARN ("Duplicate address/port; failing."); + return 0; + } + Ipv6EndPoint *endPoint = new Ipv6EndPoint (address, port); + m_endPoints.push_back (endPoint); + NS_LOG_DEBUG ("Now have >>" << m_endPoints.size () << "<< endpoints."); + return endPoint; +} + +Ipv6EndPoint* Ipv6EndPointDemux::Allocate (Ipv6Address localAddress, uint16_t localPort, + Ipv6Address peerAddress, uint16_t peerPort) +{ + NS_LOG_FUNCTION (this << localAddress << localPort << peerAddress << peerPort); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + if ((*i)->GetLocalPort () == localPort && + (*i)->GetLocalAddress () == localAddress && + (*i)->GetPeerPort () == peerPort && + (*i)->GetPeerAddress () == peerAddress) + { + NS_LOG_WARN ("No way we can allocate this end-point."); + /* no way we can allocate this end-point. */ + return 0; + } + } + Ipv6EndPoint *endPoint = new Ipv6EndPoint (localAddress, localPort); + endPoint->SetPeer (peerAddress, peerPort); + m_endPoints.push_back (endPoint); + + NS_LOG_DEBUG ("Now have >>" << m_endPoints.size () << "<< endpoints."); + + return endPoint; +} + +void Ipv6EndPointDemux::DeAllocate (Ipv6EndPoint *endPoint) +{ + NS_LOG_FUNCTION_NOARGS (); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + if (*i == endPoint) + { + delete endPoint; + m_endPoints.erase (i); + break; + } + } +} + +/* + * If we have an exact match, we return it. + * Otherwise, if we find a generic match, we return it. + * Otherwise, we return 0. + */ +Ipv6EndPointDemux::EndPoints Ipv6EndPointDemux::Lookup (Ipv6Address daddr, uint16_t dport, + Ipv6Address saddr, uint16_t sport, + Ptr incomingInterface) +{ + NS_LOG_FUNCTION (this << daddr << dport << saddr << sport << incomingInterface); + + EndPoints retval1; /* Matches exact on local port, wildcards on others */ + EndPoints retval2; /* Matches exact on local port/adder, wildcards on others */ + EndPoints retval3; /* Matches all but local address */ + EndPoints retval4; /* Exact match on all 4 */ + + NS_LOG_DEBUG ("Looking up endpoint for destination address " << daddr); + for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) + { + Ipv6EndPoint* endP = *i; + NS_LOG_DEBUG ("Looking at endpoint dport=" << endP->GetLocalPort () + << " daddr=" << endP->GetLocalAddress () + << " sport=" << endP->GetPeerPort () + << " saddr=" << endP->GetPeerAddress ()); + if (endP->GetLocalPort () != dport) + { + NS_LOG_LOGIC ("Skipping endpoint " << &endP + << " because endpoint dport " + << endP->GetLocalPort () + << " does not match packet dport " << dport); + continue; + } + +/* Ipv6Address incomingInterfaceAddr = incomingInterface->GetAddress (); */ + NS_LOG_DEBUG ("dest addr " << daddr); + + bool localAddressMatchesWildCard = endP->GetLocalAddress () == Ipv6Address::GetAny (); + bool localAddressMatchesExact = endP->GetLocalAddress () == daddr; + bool localAddressMatchesAllRouters = endP->GetLocalAddress () == Ipv6Address::GetAllRoutersMulticast (); + + /* if no match here, keep looking */ + if (!(localAddressMatchesExact || localAddressMatchesWildCard)) + continue; + bool remotePeerMatchesExact = endP->GetPeerPort () == sport; + bool remotePeerMatchesWildCard = endP->GetPeerPort () == 0; + bool remoteAddressMatchesExact = endP->GetPeerAddress () == saddr; + bool remoteAddressMatchesWildCard = endP->GetPeerAddress () == Ipv6Address::GetAny (); + + /* If remote does not match either with exact or wildcard,i + skip this one */ + if (!(remotePeerMatchesExact || remotePeerMatchesWildCard)) + continue; + if (!(remoteAddressMatchesExact || remoteAddressMatchesWildCard)) + continue; + + /* Now figure out which return list to add this one to */ + if (localAddressMatchesWildCard && + remotePeerMatchesWildCard && + remoteAddressMatchesWildCard) + { /* Only local port matches exactly */ + retval1.push_back (endP); + } + if ((localAddressMatchesExact || (localAddressMatchesAllRouters))&& + remotePeerMatchesWildCard && + remoteAddressMatchesWildCard) + { /* Only local port and local address matches exactly */ + retval2.push_back (endP); + } + if (localAddressMatchesWildCard && + remotePeerMatchesExact && + remoteAddressMatchesExact) + { /* All but local address */ + retval3.push_back (endP); + } + if (localAddressMatchesExact && + remotePeerMatchesExact && + remoteAddressMatchesExact) + { /* All 4 match */ + retval4.push_back (endP); + } + } + + /* Here we find the most exact match */ + if (!retval4.empty ()) return retval4; + if (!retval3.empty ()) return retval3; + if (!retval2.empty ()) return retval2; + return retval1; /* might be empty if no matches */ +} + +Ipv6EndPoint* Ipv6EndPointDemux::SimpleLookup (Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport) +{ + uint32_t genericity = 3; + Ipv6EndPoint *generic = 0; + + for (EndPointsI i = m_endPoints.begin () ; i != m_endPoints.end () ; i++) + { + uint32_t tmp = 0; + + if ((*i)->GetLocalPort () != dport) + { + continue; + } + + if ((*i)->GetLocalAddress () == dst && (*i)->GetPeerPort () == sport && + (*i)->GetPeerAddress () == src) + { + /* this is an exact match. */ + return *i; + } + + if ((*i)->GetLocalAddress () == Ipv6Address::GetAny ()) + { + tmp ++; + } + + if ((*i)->GetPeerAddress () == Ipv6Address::GetAny ()) + { + tmp ++; + } + + if (tmp < genericity) + { + generic = (*i); + genericity = tmp; + } + } + return generic; +} + +uint16_t Ipv6EndPointDemux::AllocateEphemeralPort () +{ + NS_LOG_FUNCTION_NOARGS (); + uint16_t port = m_ephemeral; + do + { + port++; + if (port == 65535) + { + port = 49152; + } + if (!LookupPortLocal (port)) + { + return port; + } + } while (port != m_ephemeral); + return 0; +} + +Ipv6EndPointDemux::EndPoints Ipv6EndPointDemux::GetEndPoints () const +{ + return m_endPoints; +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-end-point-demux.h b/src/internet-stack/ipv6-end-point-demux.h new file mode 100644 index 000000000..a8bfe1a46 --- /dev/null +++ b/src/internet-stack/ipv6-end-point-demux.h @@ -0,0 +1,160 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_END_POINT_DEMUX_H +#define IPV6_END_POINT_DEMUX_H + +#include +#include +#include "ns3/ipv6-address.h" +#include "ipv6-interface.h" + +namespace ns3 +{ + +class Ipv6EndPoint; + +/** + * \class Ipv6EndPointDemux + * \brief Demultiplexor for end points. + */ +class Ipv6EndPointDemux +{ + public: + typedef std::listEndPoints; + typedef std::list::iterator EndPointsI; + + /** + * \brief Constructor. + */ + Ipv6EndPointDemux (); + + /** + * \brief Destructor. + */ + ~Ipv6EndPointDemux (); + + /** + * \brief Lookup for port local. + * \param port port to test + * \return true if a port local is in EndPoints, false otherwise + */ + bool LookupPortLocal (uint16_t port); + + /** + * \brief Lookup for address and port. + * \param addr address to test + * \param port port to test + * \return true if there is a match in EndPoints, false otherwise + */ + bool LookupLocal (Ipv6Address addr, uint16_t port); + + /** + * \brief lookup for a match with all the parameters. + * \param dst destination address to test + * \param dport destination port to test + * \param src source address to test + * \param sport source port to test + * \param incomingInterface the incoming interface + * \return list en IPv6EndPoints (could be 0 element) + */ + EndPoints Lookup (Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport, Ptr incomingInterface); + + /** + * \brief Simple lookup for a four-tuple match. + * \param dst destination address to test + * \param dport destination port to test + * \param src source address to test + * \param sport source port to test + * \return match or 0 if not found + */ + Ipv6EndPoint* SimpleLookup (Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport); + + /** + * \brief Allocate a Ipv6EndPoint. + * \return an empty Ipv6EndPoint instance + */ + Ipv6EndPoint *Allocate (void); + + /** + * \brief Allocate a Ipv6EndPoint. + * \return an empty Ipv6EndPoint instance + */ + Ipv6EndPoint *Allocate (Ipv6Address address); + + /** + * \brief Allocate a Ipv6EndPoint. + * \param port local port + * \return an Ipv6EndPoint instance + */ + Ipv6EndPoint *Allocate (uint16_t port); + + /** + * \brief Allocate a Ipv6EndPoint. + * \param address local address + * \param port local port + * \return an Ipv6EndPoint instance + */ + Ipv6EndPoint *Allocate (Ipv6Address address, uint16_t port); + + /** + * \brief Allocate a Ipv6EndPoint. + * \param localAddress local address + * \param localPort local port + * \param peerAddress peer address + * \param peerPort peer port + * \return an Ipv6EndPoint instance + */ + Ipv6EndPoint *Allocate (Ipv6Address localAddress, uint16_t localPort, Ipv6Address peerAddress, uint16_t peerPort); + + /** + * \brief Remove a end point. + * \param endPoint the end point to remove + */ + void DeAllocate (Ipv6EndPoint *endPoint); + + /** + * \brief Get the entire list of end points registered. + * \return list of Ipv6EndPoint + */ + EndPoints GetEndPoints () const; + + private: + /** + * \brief Allocate a ephemeral port. + * \return a port + */ + uint16_t AllocateEphemeralPort (); + + /** + * \brief The ephemeral port. + */ + uint16_t m_ephemeral; + + /** + * \brief A list of IPv6 end points. + */ + EndPoints m_endPoints; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_END_POINT_DEMUX_H */ + diff --git a/src/internet-stack/ipv6-end-point.cc b/src/internet-stack/ipv6-end-point.cc new file mode 100644 index 000000000..54d77c0ed --- /dev/null +++ b/src/internet-stack/ipv6-end-point.cc @@ -0,0 +1,128 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ipv6-end-point.h" +#include "ns3/packet.h" +#include "ns3/log.h" +#include "ns3/simulator.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6EndPoint"); + +Ipv6EndPoint::Ipv6EndPoint (Ipv6Address addr, uint16_t port) + : m_localAddr (addr), + m_localPort (port), + m_peerAddr (Ipv6Address::GetAny ()), + m_peerPort (0) +{ +} + +Ipv6EndPoint::~Ipv6EndPoint () +{ + if (!m_destroyCallback.IsNull ()) + { + m_destroyCallback (); + } +} + +Ipv6Address Ipv6EndPoint::GetLocalAddress () +{ + return m_localAddr; +} + +void Ipv6EndPoint::SetLocalAddress (Ipv6Address addr) +{ + m_localAddr = addr; +} + +uint16_t Ipv6EndPoint::GetLocalPort () +{ + return m_localPort; +} + +void Ipv6EndPoint::SetLocalPort (uint16_t port) +{ + m_localPort = port; +} + +Ipv6Address Ipv6EndPoint::GetPeerAddress () +{ + return m_peerAddr; +} + +uint16_t Ipv6EndPoint::GetPeerPort () +{ + return m_peerPort; +} + +void Ipv6EndPoint::SetPeer (Ipv6Address addr, uint16_t port) +{ + m_peerAddr = addr; + m_peerPort = port; +} + +void Ipv6EndPoint::SetRxCallback (Callback, Ipv6Address, uint16_t> callback) +{ + m_rxCallback = callback; +} + +void Ipv6EndPoint::SetIcmpCallback (Callback callback) +{ + m_icmpCallback = callback; +} + +void Ipv6EndPoint::SetDestroyCallback (Callback callback) +{ + m_destroyCallback = callback; +} + +void Ipv6EndPoint::ForwardUp (Ptr p, Ipv6Address addr, uint16_t port) +{ + if (!m_rxCallback.IsNull ()) + { + m_rxCallback (p, addr, port); + } +} + +void Ipv6EndPoint::ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + uint8_t code, uint32_t info) +{ + if (!m_icmpCallback.IsNull ()) + { + Simulator::ScheduleNow (&Ipv6EndPoint::DoForwardIcmp, this, + src, ttl, type, code, info); + } +} + +void Ipv6EndPoint::DoForwardUp (Ptr p, Ipv6Address saddr, uint16_t sport) +{ + m_rxCallback (p, saddr, sport); +} + +void Ipv6EndPoint::DoForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + uint8_t code, uint32_t info) +{ + m_icmpCallback (src, ttl, type, code, info); +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-end-point.h b/src/internet-stack/ipv6-end-point.h new file mode 100644 index 000000000..98de8d4eb --- /dev/null +++ b/src/internet-stack/ipv6-end-point.h @@ -0,0 +1,193 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_END_POINT_H +#define IPV6_END_POINT_H + +#include +#include "ns3/ipv6-address.h" +#include "ns3/callback.h" + +namespace ns3 +{ + +class Header; +class Packet; + +/** + * \class Ipv6EndPoint + * \brief An IPv6 end point, four tuples identification. + */ +class Ipv6EndPoint +{ + public: + /** + * \brief Constructor. + * \param addr the IPv6 address + * \param port the port + */ + Ipv6EndPoint (Ipv6Address addr, uint16_t port); + + /** + * \brief Destructor. + */ + ~Ipv6EndPoint (); + + /** + * \brief Get the local address. + * \return the local address + */ + Ipv6Address GetLocalAddress (); + + /** + * \brief Set the local address. + * \param addr the address to set + */ + void SetLocalAddress (Ipv6Address addr); + + /** + * \brief Get the local port. + * \return the local port + */ + uint16_t GetLocalPort (); + + /** + * \brief Set the local port. + * \param port the port to set + */ + void SetLocalPort (uint16_t port); + + /** + * \brief Get the peer address. + * \return the peer address + */ + Ipv6Address GetPeerAddress (); + + /** + * \brief Get the peer port. + * \return the peer port + */ + uint16_t GetPeerPort (); + + /** + * \brief Set the peer informations (address and port). + * \param addr peer address + * \param port peer port + */ + void SetPeer (Ipv6Address addr, uint16_t port); + + /** + * \brief Set the reception callback. + * \param callback callback function + */ + void SetRxCallback (Callback, Ipv6Address, uint16_t> callback); + + /** + * \brief Set the ICMP callback. + * \param callback callback function + */ + void SetIcmpCallback (Callback callback); + + /** + * \brief Set the default destroy callback. + * \param callback callback function + */ + void SetDestroyCallback (Callback callback); + + /** + * \brief Forward the packet to the upper level. + * \param p the packet + * \param addr source address + * \param port source port + */ + void ForwardUp (Ptr p, Ipv6Address addr, uint16_t port); + + /** + * \brief Function called from an L4Protocol implementation + * to notify an endpoint of an icmp message reception. + * \param src source IPv6 address + * \param ttl time-to-live + * \param type ICMPv6 type + * \param code ICMPv6 code + * \param info ICMPv6 info + */ + void ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + uint8_t code, uint32_t info); + + private: + /** + * \brief ForwardUp wrapper. + * \param p packet + * \param saddr source IPv6 address + * \param sport source port + */ + void DoForwardUp (Ptr p, Ipv6Address saddr, uint16_t sport); + + /** + * \brief ForwardIcmp wrapper. + * \param src source IPv6 address + * \param ttl time-to-live + * \param type ICMPv6 type + * \param code ICMPv6 code + * \param info ICMPv6 info + */ + void DoForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + uint8_t code, uint32_t info); + + /** + * \brief The local address. + */ + Ipv6Address m_localAddr; + + /** + * \brief The local port. + */ + uint16_t m_localPort; + + /** + * \brief The peer address. + */ + Ipv6Address m_peerAddr; + + /** + * \brief The peer port. + */ + uint16_t m_peerPort; + + /** + * \brief The RX callback. + */ + Callback, Ipv6Address, uint16_t> m_rxCallback; + + /** + * \brief The ICMPv6 callback. + */ + Callback m_icmpCallback; + + /** + * \brief The destroy callback. + */ + Callback m_destroyCallback; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_END_POINT_H */ + diff --git a/src/internet-stack/ipv6-interface.cc b/src/internet-stack/ipv6-interface.cc new file mode 100644 index 000000000..9c07ec984 --- /dev/null +++ b/src/internet-stack/ipv6-interface.cc @@ -0,0 +1,453 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ipv6-interface.h" +#include "ns3/net-device.h" +#include "loopback-net-device.h" +#include "ns3/log.h" +#include "ns3/node.h" +#include + +#include "icmpv6-l4-protocol.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6Interface"); + +TypeId Ipv6Interface::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6Interface") + .SetParent () + ; + return tid; +} + +Ipv6Interface::Ipv6Interface () + : m_ifup (false), + m_forwarding (true), + m_metric (1), + m_node (0), + m_device (0), + m_curHopLimit (0), + m_baseReachableTime (0), + m_reachableTime (0), + m_retransTimer (0) +{ + NS_LOG_FUNCTION (this); +} + +Ipv6Interface::~Ipv6Interface () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void Ipv6Interface::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + Object::DoDispose (); +} + +void Ipv6Interface::DoSetup () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (m_node == 0 || m_device == 0) + { + return; + } + + if (!m_device->NeedsArp ()) + { + return; + } + + /* set up link-local address */ + if (!DynamicCast (m_device)) /* no autoconf for ip6-localhost */ + { + Address addr = GetDevice ()->GetAddress (); + + if (Mac48Address::IsMatchingType (addr)) + { + Ipv6InterfaceAddress ifaddr = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac48Address::ConvertFrom (addr)), Ipv6Prefix (64)); + AddAddress (ifaddr); + } + else + { + NS_ASSERT_MSG (false, "IPv6 autoconf for this kind of address not implemented."); + } + } + + Ptr icmpv6 = m_node->GetObject ()->GetIcmpv6 (); + m_ndCache = icmpv6->CreateCache (m_device, this); +} + +void Ipv6Interface::SetNode (Ptr node) +{ + NS_LOG_FUNCTION (this << node); + m_node = node; + DoSetup (); +} + +void Ipv6Interface::SetDevice (Ptr device) +{ + NS_LOG_FUNCTION (this << device); + m_device = device; + DoSetup (); +} + +Ptr Ipv6Interface::GetDevice () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_device; +} + +void Ipv6Interface::SetMetric (uint16_t metric) +{ + NS_LOG_FUNCTION (this << metric); + m_metric = metric; +} + +uint16_t Ipv6Interface::GetMetric () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_metric; +} + +bool Ipv6Interface::IsUp () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_ifup; +} + +bool Ipv6Interface::IsDown () const +{ + NS_LOG_FUNCTION_NOARGS (); + return !m_ifup; +} + +void Ipv6Interface::SetUp () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (m_ifup) + { + return; + } + m_ifup = true; +} + +void Ipv6Interface::SetDown () +{ + NS_LOG_FUNCTION_NOARGS (); + m_ifup = false; + m_addresses.clear (); +} + +bool Ipv6Interface::IsForwarding () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_forwarding; +} + +void Ipv6Interface::SetForwarding (bool forwarding) +{ + NS_LOG_FUNCTION (this << forwarding); + m_forwarding = forwarding; +} + +bool Ipv6Interface::AddAddress (Ipv6InterfaceAddress iface) +{ + NS_LOG_FUNCTION_NOARGS (); + Ipv6Address addr = iface.GetAddress (); + + /* DAD handling */ + if (!addr.IsAny ()) + { + for (Ipv6InterfaceAddressListCI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if ((*it).GetAddress () == addr) + { + return false; + } + } + + m_addresses.push_back (iface); + + if (!addr.IsAny () || !addr.IsLocalhost ()) + { + /* DAD handling */ + Ptr icmpv6 = m_node->GetObject ()->GetIcmpv6 (); + + if (icmpv6) + { + Simulator::Schedule (Seconds (0.), &Icmpv6L4Protocol::DoDAD, icmpv6, addr, this); + Simulator::Schedule (Seconds (1.), &Icmpv6L4Protocol::FunctionDadTimeout, icmpv6, this, addr); + } + } + return true; + } + + /* bad address */ + return false; +} + +Ipv6InterfaceAddress Ipv6Interface::GetLinkLocalAddress () const +{ + /* IPv6 interface has always at least one IPv6 link-local address */ + NS_LOG_FUNCTION_NOARGS (); + + for (Ipv6InterfaceAddressListCI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if ((*it).GetAddress ().IsLinkLocal ()) + { + return (*it); + } + } + NS_ASSERT_MSG (false, "No link-local address on interface " << this); + Ipv6InterfaceAddress addr; + return addr; /* quiet compiler */ +} + +Ipv6InterfaceAddress Ipv6Interface::GetAddress (uint32_t index) const +{ + NS_LOG_FUNCTION (this << index); + uint32_t i = 0; + + if (m_addresses.size () > index) + { + for (Ipv6InterfaceAddressListCI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if (i == index) + { + return (*it); + } + i++; + } + } + + NS_ASSERT_MSG (false, "Address " << index << " not found"); + Ipv6InterfaceAddress addr; + return addr; /* quiet compiler */ +} + +uint32_t Ipv6Interface::GetNAddresses () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_addresses.size (); +} + +Ipv6InterfaceAddress Ipv6Interface::RemoveAddress (uint32_t index) +{ + NS_LOG_FUNCTION (this << index); + uint32_t i = 0; + + if (m_addresses.size () < index) + { + NS_ASSERT_MSG (false, "Try to remove index that don't exist in Ipv6Interface::RemoveAddress"); + } + + for (Ipv6InterfaceAddressListI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if (i == index) + { + Ipv6InterfaceAddress iface = (*it); + m_addresses.erase (it); + return iface; + } + + i++; + } + + NS_ASSERT_MSG (false, "Address " << index << " not found"); + Ipv6InterfaceAddress addr; + return addr; /* quiet compiler */ +} + +Ipv6InterfaceAddress Ipv6Interface::GetAddressMatchingDestination (Ipv6Address dst) +{ + NS_LOG_FUNCTION (this << dst); + + for (Ipv6InterfaceAddressList::const_iterator it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + Ipv6InterfaceAddress ifaddr = (*it); + + if (ifaddr.GetPrefix ().IsMatch (ifaddr.GetAddress (), dst)) + { + return ifaddr; + } + } + +/* NS_ASSERT_MSG (false, "Not matching address."); */ + Ipv6InterfaceAddress ret; + return ret; /* quiet compiler */ +} + +void Ipv6Interface::Send (Ptr p, Ipv6Address dest) +{ + NS_LOG_FUNCTION (this << p << dest); + Ptr ipv6 = m_node->GetObject (); + + if (!IsUp ()) + { + return; + } + + /* check if destination is localhost (::1) */ + if (DynamicCast (m_device)) + { + /* XXX additional checks needed here (such as whether multicast + * goes to loopback)? + */ + m_device->Send (p, m_device->GetBroadcast (), Ipv6L3Protocol::PROT_NUMBER); + return; + } + + /* check if destination is for one of our interface */ + for (Ipv6InterfaceAddressListCI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if (dest == (*it).GetAddress ()) + { + ipv6->Receive (m_device, p, Ipv6L3Protocol::PROT_NUMBER, + m_device->GetBroadcast (), + m_device->GetBroadcast (), + NetDevice::PACKET_HOST // note: linux uses PACKET_LOOPBACK here + ); + return; + } + } + + /* other address */ + if (m_device->NeedsArp ()) + { + NS_LOG_LOGIC ("Needs ARP" << " " << dest); + Ptr icmpv6 = ipv6->GetIcmpv6 (); + Address hardwareDestination; + bool found = false; + + NS_ASSERT (icmpv6); + + if (dest.IsMulticast ()) + { + NS_LOG_LOGIC ("IsMulticast"); + NS_ASSERT_MSG (m_device->IsMulticast (), "Ipv6Interface::SendTo (): Sending multicast packet over non-multicast device"); + + hardwareDestination = m_device->GetMulticast (dest); + found = true; + } + else + { + NS_LOG_LOGIC ("NDISC Lookup"); + found = icmpv6->Lookup (p, dest, GetDevice (), m_ndCache, &hardwareDestination); + } + + if (found) + { + NS_LOG_LOGIC ("Address Resolved. Send."); + m_device ->Send (p, hardwareDestination, Ipv6L3Protocol::PROT_NUMBER); + } + } + else + { + NS_LOG_LOGIC ("Doesn't need ARP"); + m_device->Send (p, m_device->GetBroadcast (), Ipv6L3Protocol::PROT_NUMBER); + } +} + +void Ipv6Interface::SetCurHopLimit (uint8_t curHopLimit) +{ + NS_LOG_FUNCTION (this << curHopLimit); + m_curHopLimit = curHopLimit; +} + +uint8_t Ipv6Interface::GetCurHopLimit () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_curHopLimit; +} + +void Ipv6Interface::SetBaseReachableTime (uint16_t baseReachableTime) +{ + NS_LOG_FUNCTION (this << baseReachableTime); + m_baseReachableTime = baseReachableTime; +} + +uint16_t Ipv6Interface::GetBaseReachableTime () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_baseReachableTime; +} + +void Ipv6Interface::SetReachableTime (uint16_t reachableTime) +{ + NS_LOG_FUNCTION (this << reachableTime); + m_reachableTime = reachableTime; +} + +uint16_t Ipv6Interface::GetReachableTime () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_reachableTime; +} + +void Ipv6Interface::SetRetransTimer (uint16_t retransTimer) +{ + NS_LOG_FUNCTION (this << retransTimer); + m_retransTimer = retransTimer; +} + +uint16_t Ipv6Interface::GetRetransTimer () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_retransTimer; +} + +void Ipv6Interface::SetState (Ipv6Address address, Ipv6InterfaceAddress::State_e state) +{ + NS_LOG_FUNCTION (this << address << state); + + for (Ipv6InterfaceAddressListI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if ((*it).GetAddress () == address) + { + (*it).SetState (state); + return; + } + } + /* not found, maybe address has expired */ +} + +void Ipv6Interface::SetNsDadUid (Ipv6Address address, uint32_t uid) +{ + NS_LOG_FUNCTION (this << address << uid); + + for (Ipv6InterfaceAddressListI it = m_addresses.begin () ; it != m_addresses.end () ; ++it) + { + if ((*it).GetAddress () == address) + { + (*it).SetNsDadUid (uid); + return; + } + } + /* not found, maybe address has expired */ +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-interface.h b/src/internet-stack/ipv6-interface.h new file mode 100644 index 000000000..ee93ef845 --- /dev/null +++ b/src/internet-stack/ipv6-interface.h @@ -0,0 +1,322 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_INTERFACE_H +#define IPV6_INTERFACE_H + +#include + +#include "ns3/ipv6-address.h" +#include "ns3/ipv6-interface-address.h" +#include "ns3/ptr.h" +#include "ns3/object.h" +#include "ns3/timer.h" + +#include "ndisc-cache.h" + +namespace ns3 +{ + +class NetDevice; +class Packet; +class Node; + +/** + * \class Ipv6Interface + * \brief The IPv6 representation of a network interface + * + * By default IPv6 interfaces are created in the "down" state + * with IP "fe80::1" and a /64 prefix. Before becoming useable, + * the user must invoke SetUp on them once the final IPv6 address + * and mask has been set. + */ +class Ipv6Interface : public Object +{ + public: + /** + * \brief Get the type ID + * \return type ID + */ + static TypeId GetTypeId (); + + /** + * \brief Constructs an Ipv6Interface. + */ + Ipv6Interface (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6Interface (); + + /** + * \brief Set node associated with interface. + * \param node node + */ + void SetNode (Ptr node); + + /** + * \brief Set the NetDevice. + * \param device NetDevice + */ + void SetDevice (Ptr device); + + /** + * \brief Get the NetDevice. + * \return the NetDevice associated with this interface + */ + virtual Ptr GetDevice () const; + + /** + * \brief Set the metric. + * \param metric configured routing metric (cost) of this interface + */ + void SetMetric (uint16_t metric); + + /** + * \brief Get the metric + * \return the metric + */ + uint16_t GetMetric () const; + + /** + * \brief Is the interface UP ? + * \return true if interface is enabled, false otherwise. + */ + bool IsUp () const; + + /** + * \brief Is the interface DOWN ? + * \return true if interface is disabled, false otherwise. + */ + bool IsDown () const; + + /** + * \brief Enable this interface. + */ + void SetUp (); + + /** + * \brief Disable this interface. + */ + void SetDown (); + + /** + * \brief If the interface allows forwarding packets. + * \return true if forwarding is enabled, false otherwise + */ + bool IsForwarding () const; + + /** + * \brief Set forwarding enabled or not. + * \param forward forwarding state + */ + void SetForwarding (bool forward); + + /** + * \brief Set the current hop limit. + * \param curHopLimit the value to set + */ + void SetCurHopLimit (uint8_t curHopLimit); + + /** + * \brief Get the current hop limit value. + * \return current hop limit + */ + uint8_t GetCurHopLimit () const; + + /** + * \brief Set the base reachable time. + * \param baseReachableTime the value to set + */ + void SetBaseReachableTime (uint16_t baseReachableTime); + + /** + * \brief Get the base reachable time. + * \return base reachable time + */ + uint16_t GetBaseReachableTime () const; + + /** + * \brief Set the reachable time. + * \param reachableTime value to set + */ + void SetReachableTime (uint16_t reachableTime); + + /** + * \brief Get the reachable time. + * \return reachable time + */ + uint16_t GetReachableTime () const; + + /** + * \brief Set the retransmission timer. + * \param retransTimer value to set + */ + void SetRetransTimer (uint16_t retransTimer); + + /** + * \brief Get the retransmission timer. + * \return retransmission timer + */ + uint16_t GetRetransTimer () const; + + /** + * \brief Send a packet through this interface. + * \param p packet to send + * \param dest next hop address of packet. + * + * \note This method will eventually call the private SendTo + * method which must be implemented by subclasses. + */ + void Send (Ptr p, Ipv6Address dest); + + /** + * \brief Add an IPv6 address. + * \param iface address to add + * \return true if address was added, false otherwise + */ + bool AddAddress (Ipv6InterfaceAddress iface); + + /** + * \brief Get link-local address from IPv6 interface. + * \return link-local Ipv6InterfaceAddress, assert if not found + */ + Ipv6InterfaceAddress GetLinkLocalAddress () const; + + /** + * \brief Get an address from IPv6 interface. + * \param index index + * \return Ipv6InterfaceAddress address whose index is i + */ + Ipv6InterfaceAddress GetAddress (uint32_t index) const; + + /** + * \brief Get an address which is in the same network prefix as destination. + * \param dst destination address + * \return Corresponding Ipv6InterfaceAddress or assert if not found + */ + Ipv6InterfaceAddress GetAddressMatchingDestination (Ipv6Address dst); + + /** + * \brief Get number of addresses on this IPv6 interface. + * \return number of address + */ + uint32_t GetNAddresses (void) const; + + /** + * \brief Remove an address from interface. + * \param index index to remove + * \return Ipv6InterfaceAddress address whose index is index + */ + Ipv6InterfaceAddress RemoveAddress (uint32_t index); + + /** + * \brief Update state of an interface address. + * \param address IPv6 address + * \param state new state + */ + void SetState (Ipv6Address address, Ipv6InterfaceAddress::State_e state); + + /** + * \brief Update NS DAD packet UID of an interface address. + * \param address IPv6 address + * \param uid packet UID + */ + void SetNsDadUid (Ipv6Address address, uint32_t uid); + + protected: + /** + * \brief Dispose this object. + */ + virtual void DoDispose (); + + private: + typedef std::list Ipv6InterfaceAddressList; + typedef std::list::iterator Ipv6InterfaceAddressListI; + typedef std::list::const_iterator Ipv6InterfaceAddressListCI; + + /** + * \brief Initialize interface. + */ + void DoSetup (); + + /** + * \brief The addresses assigned to this interface. + */ + Ipv6InterfaceAddressList m_addresses; + + /** + * \brief The state of this interface. + */ + bool m_ifup; + + /** + * \brief Forwarding state. + */ + bool m_forwarding; + + /** + * \brief The metric. + */ + uint16_t m_metric; + + /** + * \brief Node associated with this interface. + */ + Ptr m_node; + + /** + * \brief NetDevice associated with this interface. + */ + Ptr m_device; + + /** + * \brief Neighbor cache. + */ + Ptr m_ndCache; + + /** + * \brief Current hop limit. + */ + uint8_t m_curHopLimit; + + /** + * \brief Base value used for computing the random reachable time value (in millisecond). + */ + uint16_t m_baseReachableTime; + + /** + * \brief Reachable time (in millisecond). + * The time a neighbor is considered reachable after receiving a reachability confirmation. + */ + uint16_t m_reachableTime; + + /** + * \brief Retransmission timer (in millisecond). + * Time between retransmission of NS. + */ + uint16_t m_retransTimer; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_INTERFACE_H */ + diff --git a/src/internet-stack/ipv6-l3-protocol.cc b/src/internet-stack/ipv6-l3-protocol.cc new file mode 100644 index 000000000..4293fa0fa --- /dev/null +++ b/src/internet-stack/ipv6-l3-protocol.cc @@ -0,0 +1,911 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/log.h" +#include "ns3/node.h" +#include "ns3/uinteger.h" +#include "ns3/vector.h" +#include "ns3/callback.h" +#include "ns3/trace-source-accessor.h" +#include "ns3/object-vector.h" +#include "ns3/ipv6-routing-protocol.h" +#include "ns3/ipv6-route.h" + +#include "loopback-net-device.h" +#include "ipv6-l3-protocol.h" +#include "ipv6-l4-protocol.h" +#include "ipv6-interface.h" +#include "ipv6-raw-socket-impl.h" +#include "ipv6-autoconfigured-prefix.h" +#include "icmpv6-l4-protocol.h" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Ipv6L3Protocol); + +NS_LOG_COMPONENT_DEFINE ("Ipv6L3Protocol"); + +const uint16_t Ipv6L3Protocol::PROT_NUMBER = 0x86DD; + +TypeId Ipv6L3Protocol::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6L3Protocol") + .SetParent () + .AddConstructor () + .AddAttribute ("DefaultTtl", "The TTL value set by default on all outgoing packets generated on this node.", + UintegerValue (64), + MakeUintegerAccessor (&Ipv6L3Protocol::m_defaultTtl), + MakeUintegerChecker ()) + .AddTraceSource ("Tx", "Send IPv6 packet to outgoing interface.", + MakeTraceSourceAccessor (&Ipv6L3Protocol::m_txTrace)) + .AddTraceSource ("Rx", "Receive IPv6 packet from incoming interface.", + MakeTraceSourceAccessor (&Ipv6L3Protocol::m_rxTrace)) + .AddTraceSource ("Drop", "Drop IPv6 packet", + MakeTraceSourceAccessor (&Ipv6L3Protocol::m_dropTrace)) + .AddAttribute ("InterfaceList", "The set of IPv6 interfaces associated to this IPv6 stack.", + ObjectVectorValue (), + MakeObjectVectorAccessor (&Ipv6L3Protocol::m_interfaces), + MakeObjectVectorChecker ()) + ; + return tid; +} + +Ipv6L3Protocol::Ipv6L3Protocol () + : m_nInterfaces (0) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Ipv6L3Protocol::~Ipv6L3Protocol () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void Ipv6L3Protocol::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + + /* clear protocol and interface list */ + for (L4List_t::iterator it = m_protocols.begin () ; it != m_protocols.end () ; ++it) + { + *it = 0; + } + m_protocols.clear (); + + /* remove interfaces */ + for (Ipv6InterfaceList::iterator it = m_interfaces.begin () ; it != m_interfaces.end (); ++it) + { + *it = 0; + } + m_interfaces.clear (); + + /* remove raw sockets */ + for (SocketList::iterator it = m_sockets.begin () ; it != m_sockets.end () ; ++it) + { + *it = 0; + } + m_sockets.clear (); + + /* remove list of prefix */ + for (Ipv6AutoconfiguredPrefixListI it = m_prefixes.begin () ; it != m_prefixes.end () ; ++it) + { + (*it)->StopValidTimer (); + (*it)->StopPreferredTimer (); + (*it) = 0; + } + m_prefixes.clear (); + + + m_node = 0; + m_routingProtocol = 0; + Object::DoDispose (); +} + +void Ipv6L3Protocol::SetRoutingProtocol (Ptr routingProtocol) +{ + NS_LOG_FUNCTION (this << routingProtocol); + m_routingProtocol = routingProtocol; + m_routingProtocol->SetIpv6 (this); +} + +Ptr Ipv6L3Protocol::GetRoutingProtocol () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_routingProtocol; +} + +uint32_t Ipv6L3Protocol::AddInterface (Ptr device) +{ + NS_LOG_FUNCTION (this << device); + Ptr node = GetObject (); + Ptr interface = CreateObject (); + + node->RegisterProtocolHandler (MakeCallback (&Ipv6L3Protocol::Receive, this), Ipv6L3Protocol::PROT_NUMBER, device); + interface->SetNode (m_node); + interface->SetDevice (device); + interface->SetForwarding (m_ipForward); + return AddIpv6Interface (interface); +} + +uint32_t Ipv6L3Protocol::AddIpv6Interface (Ptr interface) +{ + NS_LOG_FUNCTION (this << interface); + uint32_t index = m_nInterfaces; + + m_interfaces.push_back (interface); + m_nInterfaces++; + return index; +} + +Ptr Ipv6L3Protocol::GetInterface (uint32_t index) const +{ + NS_LOG_FUNCTION (this << index); + uint32_t tmp = 0; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end () ; it++) + { + if (index == tmp) + { + return *it; + } + tmp++; + } + return 0; +} + +uint32_t Ipv6L3Protocol::GetNInterfaces () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_nInterfaces; +} + +int32_t Ipv6L3Protocol::GetInterfaceForAddress (Ipv6Address address) const +{ + NS_LOG_FUNCTION (this << address); + int32_t index = 0; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end () ; it++) + { + uint32_t j = 0; + uint32_t max = (*it)->GetNAddresses (); + + for (j = 0 ; j < max ; j++) + { + if ((*it)->GetAddress (j).GetAddress () == address) + { + return index; + } + } + index++; + } + return -1; +} + +int32_t Ipv6L3Protocol::GetInterfaceForPrefix (Ipv6Address address, Ipv6Prefix mask) const +{ + NS_LOG_FUNCTION (this << address << mask); + int32_t index = 0; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end () ; it++) + { + uint32_t j = 0; + for (j = 0 ; j < (*it)->GetNAddresses () ; j++) + { + if ((*it)->GetAddress (j).GetAddress ().CombinePrefix (mask) == address.CombinePrefix (mask)) + { + return index; + } + } + index++; + } + return -1; +} + +Ptr Ipv6L3Protocol::GetNetDevice (uint32_t i) +{ + NS_LOG_FUNCTION (this << i); + return GetInterface (i)->GetDevice (); +} + +int32_t Ipv6L3Protocol::GetInterfaceForDevice (Ptr device) const +{ + NS_LOG_FUNCTION (this << device); + int32_t index = 0; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end () ; it++) + { + if ((*it)->GetDevice () == device) + { + return index; + } + index++; + } + return -1; +} + +void Ipv6L3Protocol::AddAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, uint8_t flags, uint32_t validTime, uint32_t preferredTime, Ipv6Address defaultRouter) +{ + NS_LOG_FUNCTION (this << interface << network << mask << (uint32_t)flags << validTime << preferredTime); + Ipv6InterfaceAddress address; + + Address addr = GetInterface (interface)->GetDevice ()->GetAddress (); + + if (flags & (1<< 6)) /* auto flag */ + { + /* XXX : add other L2 address case */ + if (Mac48Address::IsMatchingType (addr)) + { + address = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network)); + } + else + { + NS_FATAL_ERROR ("Unknown method to make autoconfigured address for this kind of device."); + return; + } + + /* see if we have already the prefix */ + for (Ipv6AutoconfiguredPrefixListI it = m_prefixes.begin () ; it != m_prefixes.end () ; ++it) + { + if ((*it)->GetInterface () == interface && (*it)->GetPrefix () == network && (*it)->GetMask () == mask) + { + (*it)->StopPreferredTimer (); + (*it)->StopValidTimer (); + (*it)->StartPreferredTimer (); + + /* Suppose a link with two prefixes advertised, + * when first prefix (which is the default route) expires, + * the second ones router has to be default router + */ + GetRoutingProtocol ()->NotifyAddRoute (Ipv6Address::GetAny (), Ipv6Prefix ((uint8_t)0), defaultRouter, interface, network); + return; + } + } + + /* no prefix found, add autoconfigured address and the prefix */ + NS_LOG_INFO ("Autoconfigured address is :" << address.GetAddress ()); + AddAddress (interface, address); + + /* add default router + * check to know if default route already exists is done + * in Ipv6StaticRouting class + * + * If default route is already set, this function does nothing. + */ + GetRoutingProtocol ()->NotifyAddRoute (Ipv6Address::GetAny (), Ipv6Prefix ((uint8_t)0), defaultRouter, interface, network); + + Ptr aPrefix = CreateObject (m_node, interface, network, mask, preferredTime, validTime, defaultRouter); + aPrefix->StartPreferredTimer (); + + m_prefixes.push_back (aPrefix); + } +} + +void Ipv6L3Protocol::RemoveAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, Ipv6Address defaultRouter) +{ + NS_LOG_FUNCTION (this << interface << network << mask); + Ptr iface = GetInterface (interface); + Address addr = iface->GetDevice ()->GetAddress (); + uint32_t max = iface->GetNAddresses (); + uint32_t i = 0; + Ipv6Address toFound = Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network); + + for (i = 0 ; i < max ; i++) + { + if (iface->GetAddress (i).GetAddress () == toFound) + { + RemoveAddress (interface, i); + break; + } + } + + /* remove from list of autoconfigured address */ + for (Ipv6AutoconfiguredPrefixListI it = m_prefixes.begin () ; it != m_prefixes.end () ; ++it) + { + if ((*it)->GetInterface () == interface && (*it)->GetPrefix () == network && (*it)->GetMask () == mask) + { + *it = 0; + m_prefixes.erase (it); + break; + } + } + + GetRoutingProtocol ()->NotifyRemoveRoute (Ipv6Address::GetAny (), Ipv6Prefix ((uint8_t)0), defaultRouter, interface); +} + +bool Ipv6L3Protocol::AddAddress (uint32_t i, Ipv6InterfaceAddress address) +{ + NS_LOG_FUNCTION (this << i << address); + Ptr interface = GetInterface (i); + bool ret = interface->AddAddress (address); + + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyAddAddress (i, address); + } + return ret; +} + +uint32_t Ipv6L3Protocol::GetNAddresses (uint32_t i) const +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + return interface->GetNAddresses (); +} + +Ipv6InterfaceAddress Ipv6L3Protocol::GetAddress (uint32_t i, uint32_t addressIndex) const +{ + NS_LOG_FUNCTION (this << i << addressIndex); + Ptr interface = GetInterface (i); + return interface->GetAddress (addressIndex); +} + +bool Ipv6L3Protocol::RemoveAddress (uint32_t i, uint32_t addressIndex) +{ + NS_LOG_FUNCTION (this << i << addressIndex); + Ptr interface = GetInterface (i); + Ipv6InterfaceAddress address = interface->RemoveAddress (addressIndex); + + if (address != Ipv6InterfaceAddress ()) + { + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyRemoveAddress (i, address); + } + return true; + } + return false; +} + +void Ipv6L3Protocol::SetMetric (uint32_t i, uint16_t metric) +{ + NS_LOG_FUNCTION (this << i << metric); + Ptr interface = GetInterface (i); + interface->SetMetric (metric); +} + +uint16_t Ipv6L3Protocol::GetMetric (uint32_t i) const +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + return interface->GetMetric (); +} + +uint16_t Ipv6L3Protocol::GetMtu (uint32_t i) const +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + return interface->GetDevice ()->GetMtu (); +} + +bool Ipv6L3Protocol::IsUp (uint32_t i) const +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + return interface->IsUp (); +} + +void Ipv6L3Protocol::SetUp (uint32_t i) +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + + interface->SetUp (); + + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyInterfaceUp (i); + } +} + +void Ipv6L3Protocol::SetDown (uint32_t i) +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + + interface->SetDown (); + + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyInterfaceDown (i); + } +} + +void Ipv6L3Protocol::SetupLoopback () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr interface = CreateObject (); + Ptr device = 0; + uint32_t i = 0; + + /* see if we have already an loopback NetDevice */ + for (i = 0 ; i < m_node->GetNDevices () ; i++) + { + if (device = DynamicCast (m_node->GetDevice (i))) + { + break; + } + } + + if (device == 0) + { + device = CreateObject (); + m_node->AddDevice (device); + } + + interface->SetDevice (device); + interface->SetNode (m_node); + Ipv6InterfaceAddress ifaceAddr = Ipv6InterfaceAddress (Ipv6Address::GetLoopback (), Ipv6Prefix (128)); + interface->AddAddress (ifaceAddr); + uint32_t index = AddIpv6Interface (interface); + Ptr node = GetObject (); + node->RegisterProtocolHandler (MakeCallback (&Ipv6L3Protocol::Receive, this), Ipv6L3Protocol::PROT_NUMBER, device); + interface->SetUp (); + + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyInterfaceUp (index); + } +} + +bool Ipv6L3Protocol::IsForwarding (uint32_t i) const +{ + NS_LOG_FUNCTION (this << i); + Ptr interface = GetInterface (i); + + NS_LOG_LOGIC ("Forwarding state: " << interface->IsForwarding ()); + return interface->IsForwarding (); +} + +void Ipv6L3Protocol::SetForwarding (uint32_t i, bool val) +{ + NS_LOG_FUNCTION (this << i << val); + Ptr interface = GetInterface (i); + interface->SetForwarding (val); +} + +void Ipv6L3Protocol::SetIpForward (bool forward) +{ + NS_LOG_FUNCTION (this << forward); + m_ipForward = forward; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end (); it++) + { + (*it)->SetForwarding (forward); + } +} + +bool Ipv6L3Protocol::GetIpForward () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_ipForward; +} + +void Ipv6L3Protocol::NotifyNewAggregate () +{ + NS_LOG_FUNCTION_NOARGS (); + + if (m_node == 0) + { + Ptr node = this->GetObject (); + // verify that it's a valid node and that + // the node has not been set before + if (node != 0) + { + this->SetNode (node); + } + } + Object::NotifyNewAggregate (); +} + +void Ipv6L3Protocol::SetNode (Ptr node) +{ + NS_LOG_FUNCTION (this << node); + m_node = node; + /* add LoopbackNetDevice if needed, and an Ipv6Interface on top of it */ + SetupLoopback (); +} + +void Ipv6L3Protocol::Insert (Ptr protocol) +{ + NS_LOG_FUNCTION (this << protocol); + m_protocols.push_back (protocol); +} + +void Ipv6L3Protocol::Remove (Ptr protocol) +{ + NS_LOG_FUNCTION (this << protocol); + m_protocols.remove (protocol); +} + +Ptr Ipv6L3Protocol::GetProtocol (int protocolNumber) const +{ + NS_LOG_FUNCTION (this << protocolNumber); + + for (L4List_t::const_iterator i = m_protocols.begin () ; i != m_protocols.end () ; ++i) + { + if ((*i)->GetProtocolNumber () == protocolNumber) + { + return *i; + } + } + return 0; +} + +Ptr Ipv6L3Protocol::CreateRawSocket () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr sock = CreateObject (); + sock->SetNode (m_node); + m_sockets.push_back (sock); + return sock; +} + +void Ipv6L3Protocol::DeleteRawSocket (Ptr socket) +{ + NS_LOG_FUNCTION (this << socket); + + for (SocketList::iterator it = m_sockets.begin () ; it != m_sockets.end () ; ++it) + { + if ((*it) == socket) + { + m_sockets.erase (it); + return; + } + } +} + +Ptr Ipv6L3Protocol::GetIcmpv6 () const +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr protocol = GetProtocol (Icmpv6L4Protocol::GetStaticProtocolNumber ()); + + if (protocol) + { + return protocol->GetObject (); + } + else + { + return 0; + } +} + +void Ipv6L3Protocol::SetDefaultTtl (uint8_t ttl) +{ + NS_LOG_FUNCTION (this << ttl); + m_defaultTtl = ttl; +} + +void Ipv6L3Protocol::Send (Ptr packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr route) +{ + NS_LOG_FUNCTION (this << packet << source << destination << (uint32_t)protocol << route); + Ipv6Header hdr; + uint8_t ttl = m_defaultTtl; + SocketIpTtlTag tag; + bool found = packet->RemovePacketTag (tag); + + if (found) + { + ttl = tag.GetTtl (); + } + + /* Handle 3 cases: + * 1) Packet is passed in with a route entry + * 2) Packet is passed in with a route entry but route->GetGateway is not set (e.g., same network) + * 3) route is NULL (e.g., a raw socket call or ICMPv6) + */ + + /* 1) */ + if (route && route->GetGateway () != Ipv6Address::GetZero ()) + { + NS_LOG_LOGIC ("Ipv6L3Protocol::Send case 1: passed in with a route"); + hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl); + SendRealOut (route, packet, hdr); + return; + } + + /* 2) */ + if (route && route->GetGateway () == Ipv6Address::GetZero ()) + { + NS_LOG_LOGIC ("Ipv6L3Protocol::Send case 1: probably sent to machine on same IPv6 network"); + /* NS_FATAL_ERROR ("This case is not yet implemented"); */ + hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl); + SendRealOut (route, packet, hdr); + return; + } + + /* 3) */ + NS_LOG_LOGIC ("Ipv6L3Protocol::Send case 3: passed in with no route " << destination); + Socket::SocketErrno err; + uint32_t oif = 0; + Ptr newRoute = 0; + + hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl); + + if (!source.IsAny ()) + { + int32_t index = GetInterfaceForAddress (source); + NS_ASSERT (index >= 0); + oif = index; + } + + newRoute = m_routingProtocol->RouteOutput (packet, hdr, oif, err); + + if (newRoute) + { + SendRealOut (newRoute, packet, hdr); + } + else + { + NS_LOG_WARN ("No route to host, drop!"); + m_dropTrace (packet); + } +} + +void Ipv6L3Protocol::Receive (Ptr device, Ptr p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType) +{ + NS_LOG_FUNCTION (this << device << p << protocol << from << to << packetType); + NS_LOG_LOGIC ("Packet from " << from << " received on node " << m_node->GetId ()); + uint32_t interface = 0; + Ptr packet = p->Copy (); + Ptr ipv6Interface = 0; + + for (Ipv6InterfaceList::const_iterator it = m_interfaces.begin () ; it != m_interfaces.end () ; it++) + { + ipv6Interface = *it; + + if (ipv6Interface->GetDevice () == device) + { + if (ipv6Interface->IsUp ()) + { + m_rxTrace (packet, interface); + break; + } + else + { + NS_LOG_LOGIC ("Dropping received packet-- interface is down"); + m_dropTrace (packet); + return; + } + } + interface++; + } + + Ipv6Header hdr; + packet->RemoveHeader (hdr); + + /* forward up to IPv6 raw sockets */ + for (SocketList::iterator it = m_sockets.begin () ; it != m_sockets.end () ; ++it) + { + Ptr socket = *it; + socket->ForwardUp (packet, hdr, device); + } + + m_routingProtocol->RouteInput (packet, hdr, device, + MakeCallback (&Ipv6L3Protocol::IpForward, this), + MakeCallback (&Ipv6L3Protocol::IpMulticastForward, this), + MakeCallback (&Ipv6L3Protocol::LocalDeliver, this), + MakeCallback (&Ipv6L3Protocol::RouteInputError, this) + ); +} + +void Ipv6L3Protocol::SendRealOut (Ptr route, Ptr packet, Ipv6Header const& ipHeader) +{ + NS_LOG_FUNCTION (this << route << packet << ipHeader); + + packet->AddHeader (ipHeader); + + if (!route) + { + NS_LOG_LOGIC ("No route to host, drop!."); + return; + } + + Ptr dev = route->GetOutputDevice (); + int32_t interface = GetInterfaceForDevice (dev); + NS_ASSERT (interface >= 0); + + Ptr 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 ()); + m_txTrace (packet, interface); + outInterface->Send (packet, route->GetGateway ()); + } + else + { + NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << route->GetGateway ()); + m_dropTrace (packet); + } + } + else + { + if (outInterface->IsUp ()) + { + NS_LOG_LOGIC ("Send to destination " << ipHeader.GetDestinationAddress ()); + m_txTrace (packet, interface); + outInterface->Send (packet, ipHeader.GetDestinationAddress ()); + } + else + { + NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << ipHeader.GetDestinationAddress ()); + m_dropTrace (packet); + } + } +} + +void Ipv6L3Protocol::IpForward (Ptr rtentry, Ptr p, const Ipv6Header& header) +{ + NS_LOG_FUNCTION (this << rtentry << p << header); + NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ()); + + // Forwarding + Ipv6Header ipHeader = header; + Ptr packet = p->Copy (); + ipHeader.SetHopLimit (ipHeader.GetHopLimit () - 1); + + if (ipHeader.GetSourceAddress ().IsLinkLocal ()) + { + /* no forward for link-local address */ + return; + } + + if (ipHeader.GetHopLimit () == 0) + { + // Do not reply to ICMPv6 or to multicast IPv6 address + if (ipHeader.GetNextHeader () != Icmpv6L4Protocol::PROT_NUMBER && + ipHeader.GetDestinationAddress ().IsMulticast () == false) + { + packet->AddHeader (ipHeader); + GetIcmpv6 ()->SendErrorTimeExceeded (packet, ipHeader.GetSourceAddress (), Icmpv6Header::ICMPV6_HOPLIMIT); + } + NS_LOG_WARN ("TTL exceeded. Drop."); + m_dropTrace (packet); + return; + } + + /* ICMPv6 Redirect */ + + /* if we forward to a machine on the same network as the source, + * we send him an ICMPv6 redirect message to notify him that a short route + * exists. + */ + if ((!rtentry->GetGateway ().IsAny () && rtentry->GetGateway ().CombinePrefix (Ipv6Prefix (64)) == header.GetSourceAddress ().CombinePrefix (Ipv6Prefix (64))) || + (rtentry->GetDestination ().CombinePrefix (Ipv6Prefix (64)) == header.GetSourceAddress ().CombinePrefix (Ipv6Prefix (64)))) + { + NS_LOG_LOGIC ("ICMPv6 redirect!"); + Ptr icmpv6 = GetIcmpv6 (); + Address hardwareTarget; + Ipv6Address dst = header.GetDestinationAddress (); + Ipv6Address src = header.GetSourceAddress (); + Ipv6Address target = rtentry->GetGateway (); + Ptr copy = p->Copy (); + + if (target.IsAny ()) + { + target = dst; + } + + copy->AddHeader (header); + + if (icmpv6->Lookup (copy, target, rtentry->GetOutputDevice (), 0, &hardwareTarget)) + { + icmpv6->SendRedirection (copy, src, target, dst, hardwareTarget); + } + else + { + icmpv6->SendRedirection (copy, src, target, dst, Address ()); + } + } + + SendRealOut (rtentry, packet, ipHeader); +} + +void Ipv6L3Protocol::IpMulticastForward (Ptr mrtentry, Ptr p, const Ipv6Header& header) +{ + NS_LOG_FUNCTION (this << mrtentry << p << header); + NS_LOG_LOGIC ("Multicast forwarding logic for node: " << m_node->GetId ()); + + // The output interfaces we could forward this onto are encoded + // in the OutputTtl of the Ipv6MulticastRoute + for (uint32_t i = 0 ; i < Ipv6MulticastRoute::MAX_INTERFACES ; i++) + { + if (mrtentry->GetOutputTtl (i) < Ipv6MulticastRoute::MAX_TTL) + { + Ptr packet = p->Copy (); + Ipv6Header h = header; + h.SetHopLimit (header.GetHopLimit () - 1); + if (h.GetHopLimit () == 0) + { + NS_LOG_WARN ("TTL exceeded. Drop."); + m_dropTrace (packet); + return; + } + + NS_LOG_LOGIC ("Forward multicast via interface " << i); + Ptr rtentry = Create (); + rtentry->SetSource (h.GetSourceAddress ()); + rtentry->SetDestination (h.GetDestinationAddress ()); + rtentry->SetGateway (Ipv6Address::GetAny ()); + rtentry->SetOutputDevice (GetNetDevice (i)); + SendRealOut (rtentry, packet, h); + return; + } + } +} + +void Ipv6L3Protocol::LocalDeliver (Ptr packet, Ipv6Header const& ip, uint32_t iif) +{ + NS_LOG_FUNCTION (this << packet << ip << iif); + Ptr p = packet->Copy (); + Ptr protocol = GetProtocol (ip.GetNextHeader ()); + + if (protocol) + { + Ptr copy = p->Copy (); + enum Ipv6L4Protocol::RxStatus_e status = protocol->Receive (p, ip.GetSourceAddress (), ip.GetDestinationAddress (), GetInterface (iif)); + + switch (status) + { + case Ipv6L4Protocol::RX_OK: + break; + case Ipv6L4Protocol::RX_CSUM_FAILED: + break; + case Ipv6L4Protocol::RX_ENDPOINT_UNREACH: + if (ip.GetDestinationAddress ().IsMulticast ()) + { + /* do not rely on multicast address */ + break; + } + + copy->AddHeader (ip); + GetIcmpv6 ()->SendErrorDestinationUnreachable (copy, ip.GetSourceAddress (), Icmpv6Header::ICMPV6_PORT_UNREACHABLE); + } + } +} + +void Ipv6L3Protocol::RouteInputError (Ptr p, const Ipv6Header& ipHeader, Socket::SocketErrno sockErrno) +{ + NS_LOG_FUNCTION (this << p << ipHeader << sockErrno); + NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno); + m_dropTrace (p); +} + +Ipv6Header Ipv6L3Protocol::BuildHeader (Ipv6Address src, Ipv6Address dst, uint8_t protocol, uint16_t payloadSize, uint8_t ttl) +{ + NS_LOG_FUNCTION (this << src << dst << (uint32_t)protocol << (uint32_t)payloadSize << (uint32_t)ttl); + Ipv6Header hdr; + + hdr.SetSourceAddress (src); + hdr.SetDestinationAddress (dst); + hdr.SetNextHeader (protocol); + hdr.SetPayloadLength (payloadSize); + hdr.SetHopLimit (ttl); + return hdr; +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-l3-protocol.h b/src/internet-stack/ipv6-l3-protocol.h new file mode 100644 index 000000000..0d213c793 --- /dev/null +++ b/src/internet-stack/ipv6-l3-protocol.h @@ -0,0 +1,486 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_L3_PROTOCOL_H +#define IPV6_L3_PROTOCOL_H + +#include + +#include "ns3/traced-callback.h" + +#include "ns3/net-device.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-address.h" +#include "ns3/ipv6-header.h" + +namespace ns3 +{ + +class Node; +class Ipv6Interface; +class Ipv6L4Protocol; +class Ipv6Route; +class Ipv6MulticastRoute; +class Ipv6RawSocketImpl; +class Icmpv6L4Protocol; +class Ipv6AutoconfiguredPrefix; + +/** + * \class Ipv6L3Protocol + * \brief IPv6 layer implementation. + */ +class Ipv6L3Protocol : public Ipv6 +{ + public: + /** + * \brief Get the type ID of this class. + * \return type ID + */ + static TypeId GetTypeId (); + + /** + * \brief The protocol number for IPv6 (0x86DD). + */ + static const uint16_t PROT_NUMBER; + + /** + * \brief Constructor. + */ + Ipv6L3Protocol (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6L3Protocol (); + + /** + * \brief Set node for this stack. + * \param node node to set + */ + void SetNode (Ptr node); + + /** + * \brief Add an L4 protocol. + * \param protocol L4 protocol + */ + void Insert (Ptr protocol); + + /** + * \brief Remove an L4 protocol. + * \param protocol L4 protocol to remove + */ + void Remove (Ptr protocol); + + /** + * \brief Get L4 protocol by protocol number. + * \param protocolNumber protocol number + * \return corresponding Ipv6L4Protocol or 0 if not found + */ + Ptr GetProtocol (int protocolNumber) const; + + /** + * \brief Create raw IPv6 socket. + * \return newly raw socket + */ + Ptr CreateRawSocket (); + + /** + * \brief Remove raw IPv6 socket. + * \param socket socket to remove + */ + void DeleteRawSocket (Ptr socket); + + /** + * \brief Set the default TTL. + * \param ttl TTL to set + */ + void SetDefaultTtl (uint8_t ttl); + + /** + * \brief Receive method when a packet arrive in the stack. + * This method removes IPv6 header and forward up to L4 protocol. + * + * \param device network device + * \param p the packet + * \param protocol next header value + * \param from address of the correspondant + * \param to address of the destination + * \param packetType type of the packet + */ + void Receive (Ptr device, Ptr p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType); + + /** + * \brief Higher-level layers call this method to send a packet + * down the stack to the MAC and PHY layers. + * + * \param packet packet to send + * \param source source address of packet + * \param destination address of packet + * \param protocol number of packet + * \param route route to take + */ + void Send (Ptr packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr route); + + /** + * \brief Set routing protocol for this stack. + * \param routingProtocol IPv6 routing protocol to set + */ + void SetRoutingProtocol (Ptr routingProtocol); + + /** + * \brief Get current routing protocol used. + * \return routing protocol + */ + Ptr GetRoutingProtocol () const; + + /** + * \brief Add IPv6 interface for a device. + * \param device net device + * \return interface index + */ + uint32_t AddInterface (Ptr device); + + /** + * \brief Get an interface. + * \param i interface index + * \return IPv6 interface pointer + */ + Ptr GetInterface (uint32_t i) const; + + /** + * \brief Get current number of interface on this stack. + * \return number of interface registered + */ + uint32_t GetNInterfaces () const; + + /** + * \brief Get interface index which has specified IPv6 address + * \param addr IPv6 address + * \return interface index or -1 if not found + */ + int32_t GetInterfaceForAddress (Ipv6Address addr) const; + + /** + * \brief Get interface index which match specified address/prefix. + * \param addr IPv6 address + * \param mask IPv6 prefix (mask) + * \return interface index or -1 if not found + */ + int32_t GetInterfaceForPrefix (Ipv6Address addr, Ipv6Prefix mask) const; + + /** + * \brief Get interface index which is on a specified net device. + * \param device net device + */ + int32_t GetInterfaceForDevice (Ptr device) const; + + /** + * \brief Add an address on interface. + * \param i interface index + * \param address to add + */ + bool AddAddress (uint32_t i, Ipv6InterfaceAddress address); + + /** + * \brief Get an address. + * \param interfaceIndex interface index + * \param addressIndex address index on the interface + * \return Ipv6InterfaceAddress or assert if not found + */ + Ipv6InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const; + + /** + * \brief Get number of address for an interface. + * \return number of address + */ + uint32_t GetNAddresses (uint32_t interface) const; + + /** + * \brief Remove an address from an interface. + * \param interfaceIndex interface index + * \param addressIndex address index on the interface + */ + bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex); + + /** + * \brief Set metric for an interface. + * \param i index + * \param metric + */ + void SetMetric (uint32_t i, uint16_t metric); + + /** + * \brief Get metric for an interface. + * \param i index + * \return metric + */ + uint16_t GetMetric (uint32_t i) const; + + /** + * \brief Get MTU for an interface. + * \param i index + * \return MTU + */ + uint16_t GetMtu (uint32_t i) const; + + /** + * \brief Is specified interface up ? + * \param i interface index + */ + bool IsUp (uint32_t i) const; + + /** + * \brief Set an interface up. + * \param i interface index + */ + void SetUp (uint32_t i); + + /** + * \brief set an interface down. + * \param i interface index + */ + void SetDown (uint32_t i); + + /** + * \brief Is interface allows forwarding ? + * \param i interface index + */ + bool IsForwarding (uint32_t i) const; + + /** + * \brief Enable or disable forwarding on interface + * \param i interface index + * \param val true = enable forwarding, false = disable + */ + void SetForwarding (uint32_t i, bool val); + + /** + * \brief Get device by index. + * \param i device index on this stack + * \return NetDevice pointer + */ + Ptr GetNetDevice (uint32_t i); + + /** + * \brief Get ICMPv6 protocol. + * \return Icmpv6L4Protocol pointer + */ + Ptr GetIcmpv6 () const; + + /** + * \brief Add an autoconfigured address with RA information. + * \param interface interface index + * \param network network prefix + * \param mask network mask + * \param flags flags of the prefix information option (home agent, ...) + * \param validTime valid time of the prefix + * \param preferredTime preferred time of the prefix + * \param defaultRouter default router address + */ + void AddAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, uint8_t flags, uint32_t validTime, uint32_t preferredTime, Ipv6Address defaultRouter = Ipv6Address::GetZero ()); + + /** + * \brief Remove an autoconfigured address. + * + * Typically it is used when an autoconfigured address expires. + * \param interface interface index + * \param network network prefix + * \param mask network mask + * \param defaultRouter gateway + */ + void RemoveAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, Ipv6Address defaultRouter); + + protected: + /** + * \brief Dispose object. + */ + virtual void DoDispose (); + + /** + * \brief Notify other components connected to the node that a new stack member is now connected. + * + * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. + */ + virtual void NotifyNewAggregate (); + + private: + /* for unit-tests */ + friend class Ipv6L3ProtocolTest; + + typedef std::list > Ipv6InterfaceList; + typedef std::list > SocketList; + typedef std::list > L4List_t; + + typedef std::list< Ptr > Ipv6AutoconfiguredPrefixList; + typedef std::list< Ptr >::iterator Ipv6AutoconfiguredPrefixListI; + + /** + * \brief Callback to trace TX (transmission) packets. + */ + TracedCallback, uint32_t> m_txTrace; + + /** + * \brief Callback to trace RX (reception) packets. + */ + TracedCallback, uint32_t> m_rxTrace; + + /** + * \brief Callback to trace drop packets. + */ + TracedCallback > m_dropTrace; + + /** + * \brief Copy constructor. + * \param o object to copy + */ + Ipv6L3Protocol (const Ipv6L3Protocol& o); + + /** + * \brief Copy constructor. + * \param o object to copy + */ + Ipv6L3Protocol &operator = (const Ipv6L3Protocol& o); + + /** + * \brief Construct an IPv6 header. + * \param src source IPv6 address + * \param dst destination IPv6 address + * \param protocol L4 protocol + * \param payloadSize payload size + * \param ttl TTL + * \return newly created IPv6 header + */ + Ipv6Header BuildHeader (Ipv6Address src, Ipv6Address dst, uint8_t protocol, + uint16_t payloadSize, uint8_t ttl); + + /** + * \brief Send packet with route. + * \param route route + * \param packet packet to send + * \param ipHeader IPv6 header to add to the packet + */ + void SendRealOut (Ptr route, Ptr packet, Ipv6Header const& ipHeader); + + /** + * \brief Forward a packet. + * \param rtentry route + * \param p packet to forward + * \param header IPv6 header to add to the packet + */ + void IpForward (Ptr rtentry, Ptr p, const Ipv6Header& header); + + /** + * \brief Forward a packet in multicast. + * \param mrtentry route + * \param p packet to forward + * \param header IPv6 header to add to the packet + */ + void IpMulticastForward (Ptr mrtentry, Ptr p, const Ipv6Header& header); + + /** + * \brief Deliver a packet. + * \param p packet delivered + * \param ip IPv6 header + * \param iif input interface packet was received + */ + void LocalDeliver (Ptr p, Ipv6Header const& ip, uint32_t iif); + + /** + * \brief Fallback when no route is found. + * \param p packet + * \param ipHeader IPv6 header + * \param sockErrno error number + */ + void RouteInputError (Ptr p, const Ipv6Header& ipHeader, Socket::SocketErrno sockErrno); + + /** + * \brief Add an IPv6 interface to the stack. + * \param interface interface to add + * \return index of newly added interface + */ + uint32_t AddIpv6Interface (Ptr interface); + + /** + * \brief Setup loopback interface. + */ + void SetupLoopback (); + + /** + * \brief Set IPv6 forwarding state. + * \param forward IPv6 forwarding enabled or not + */ + virtual void SetIpForward (bool forward); + + /** + * \brief Get IPv6 forwarding state. + * \return forwarding state (enabled or not) + */ + virtual bool GetIpForward () const; + + /** + * \brief Node attached to stack. + */ + Ptr m_node; + + /** + * \brief Forwarding packets (i.e. router mode) state. + */ + bool m_ipForward; + + /** + * \brief List of transport protocol. + */ + L4List_t m_protocols; + + /** + * \brief List of IPv6 interfaces. + */ + Ipv6InterfaceList m_interfaces; + + /** + * \brief Number of IPv6 interfaces managed by the stack. + */ + uint32_t m_nInterfaces; + + /** + * \brief Default TTL for outgoing packets. + */ + uint8_t m_defaultTtl; + + /** + * \brief Routing protocol. + */ + Ptr m_routingProtocol; + + /** + * \brief List of IPv6 raw sockets. + */ + SocketList m_sockets; + + /** + * \brief List of IPv6 prefix received from RA. + */ + Ipv6AutoconfiguredPrefixList m_prefixes; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_L3_PROTOCOL_H */ + diff --git a/src/internet-stack/ipv6-l4-protocol.cc b/src/internet-stack/ipv6-l4-protocol.cc new file mode 100644 index 000000000..91a421316 --- /dev/null +++ b/src/internet-stack/ipv6-l4-protocol.cc @@ -0,0 +1,52 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ipv6-l4-protocol.h" +#include "ns3/uinteger.h" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Ipv6L4Protocol); + +TypeId Ipv6L4Protocol::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6L4Protocol") + .SetParent () + .AddAttribute ("ProtocolNumber", "The IPv6 protocol number.", + UintegerValue (0), + MakeUintegerAccessor (&Ipv6L4Protocol::GetProtocolNumber), + MakeUintegerChecker ()) + ; + return tid; +} + +Ipv6L4Protocol::~Ipv6L4Protocol () +{ +} + +void Ipv6L4Protocol::ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, + uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, + Ipv6Address payloadSource, Ipv6Address payloadDestination, + const uint8_t* payload) +{} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-l4-protocol.h b/src/internet-stack/ipv6-l4-protocol.h new file mode 100644 index 000000000..f743a139a --- /dev/null +++ b/src/internet-stack/ipv6-l4-protocol.h @@ -0,0 +1,106 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_L4_PROTOCOL_H +#define IPV6_L4_PROTOCOL_H + +#include "ns3/object.h" +#include "ipv6-interface.h" + +namespace ns3 +{ + +class Packet; +class Ipv6Address; +class TraceContext; + +/** + * \class Ipv6L4Protocol + * \brief IPv6 L4 protocol abstract class + */ +class Ipv6L4Protocol : public Object +{ + public: + /** + * \enum RxStatus_e + * \brief Status of receive. + */ + enum RxStatus_e + { + RX_OK, + RX_CSUM_FAILED, + RX_ENDPOINT_UNREACH + }; + + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (void); + + /** + * \brief Destructor. + */ + virtual ~Ipv6L4Protocol (); + + /** + * \brief Get the protocol number. + * \return protocol number + */ + virtual int GetProtocolNumber () const = 0; + + /** + * \brief Receive method. + * + * Called from lower-level layers to send the packet up + * in the stack. + * \param p packet to forward up + * \param src source address of packet received + * \param dst address of packet received + * \param incomingInterface the Ipv6Interface on which the packet arrived + * \return status (OK, destination unreachable or checksum failed) + */ + virtual enum RxStatus_e Receive (Ptr p, Ipv6Address const &src, Ipv6Address const &dst, Ptr incomingInterface) = 0; + + /** + * \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 + * \param icmpCode the 'code' field of the ICMPv6 message + * \param icmpInfo extra information dependent on the ICMPv6 message + * generated by Icmpv6L4Protocol + * \param payloadSource the source address of the packet which triggered + * the ICMPv6 message + * \param payloadDestination the destination address of the packet which + * triggered the ICMPv6 message. + * \param payload the first 8 bytes of the UDP header of the packet + * 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); + +}; + +} /* namespace ns3 */ + +#endif /* IPV6_L4_PROTOCOL_H */ + diff --git a/src/internet-stack/ipv6-raw-socket-factory-impl.cc b/src/internet-stack/ipv6-raw-socket-factory-impl.cc new file mode 100644 index 000000000..b880fb779 --- /dev/null +++ b/src/internet-stack/ipv6-raw-socket-factory-impl.cc @@ -0,0 +1,16 @@ +#include "ipv6-raw-socket-factory-impl.h" +#include "ipv6-l3-protocol.h" +#include "ns3/socket.h" + +namespace ns3 +{ + +Ptr Ipv6RawSocketFactoryImpl::CreateSocket () +{ + Ptr ipv6 = GetObject (); + Ptr socket = ipv6->CreateRawSocket (); + return socket; +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-raw-socket-factory-impl.h b/src/internet-stack/ipv6-raw-socket-factory-impl.h new file mode 100644 index 000000000..0fc03901d --- /dev/null +++ b/src/internet-stack/ipv6-raw-socket-factory-impl.h @@ -0,0 +1,25 @@ +#ifndef IPV6_RAW_SOCKET_FACTORY_IMPL_H +#define IPV6_RAW_SOCKET_FACTORY_IMPL_H + +#include "ns3/ipv6-raw-socket-factory.h" + +namespace ns3 +{ + +/** + * \class Ipv6RawSocketFactoryImpl + * \brief Implementation of IPv6 raw socket factory. + */ +class Ipv6RawSocketFactoryImpl : public Ipv6RawSocketFactory +{ +public: + /** + * \brief Create a raw IPv6 socket. + */ + virtual Ptr CreateSocket (); +}; + +} /* namespace ns3 */ + +#endif /* IPV6_RAW_SOCKET_FACTORY_IMPL_H */ + diff --git a/src/internet-stack/ipv6-raw-socket-impl.cc b/src/internet-stack/ipv6-raw-socket-impl.cc new file mode 100644 index 000000000..19ee54aa3 --- /dev/null +++ b/src/internet-stack/ipv6-raw-socket-impl.cc @@ -0,0 +1,338 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/inet6-socket-address.h" +#include "ns3/node.h" +#include "ns3/packet.h" +#include "ns3/uinteger.h" +#include "ns3/log.h" +#include "ns3/ipv6-route.h" +#include "ns3/ipv6-routing-protocol.h" + +#include "ipv6-l3-protocol.h" + +#include "icmpv6-header.h" +#include "icmpv6-l4-protocol.h" +#include "ipv6-raw-socket-impl.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6RawSocketImpl"); + + +NS_OBJECT_ENSURE_REGISTERED (Ipv6RawSocketImpl); + +TypeId Ipv6RawSocketImpl::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6RawSocketImpl") + .SetParent () + .AddAttribute ("Protocol", "Protocol number to match.", + UintegerValue (0), + MakeUintegerAccessor (&Ipv6RawSocketImpl::m_protocol), + MakeUintegerChecker ()) + .AddAttribute ("IcmpFilter", "Any ICMPv6 header whose type field matches a bit in this filter is dropped.", + UintegerValue (0), + MakeUintegerAccessor (&Ipv6RawSocketImpl::m_icmpFilter), + MakeUintegerChecker ()) + ; + return tid; +} + +Ipv6RawSocketImpl::Ipv6RawSocketImpl () +{ + NS_LOG_FUNCTION_NOARGS (); + m_err = Socket::ERROR_NOTERROR; + m_node = 0; + m_src = Ipv6Address::GetAny (); + m_dst = Ipv6Address::GetAny (); + m_protocol = 0; + m_shutdownSend = false; + m_shutdownRecv = false; +} + +Ipv6RawSocketImpl::~Ipv6RawSocketImpl () +{ +} + +void Ipv6RawSocketImpl::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + m_node = 0; + Socket::DoDispose (); +} + +void Ipv6RawSocketImpl::SetNode (Ptr node) +{ + NS_LOG_FUNCTION (this << node); + m_node = node; +} + +Ptr Ipv6RawSocketImpl::GetNode () const +{ + return m_node; +} + +enum Socket::SocketErrno Ipv6RawSocketImpl::GetErrno () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_err; +} + +int Ipv6RawSocketImpl::Bind (const Address& address) +{ + NS_LOG_FUNCTION (this << address); + + if (!Inet6SocketAddress::IsMatchingType (address)) + { + m_err = Socket::ERROR_INVAL; + return -1; + } + Inet6SocketAddress ad = Inet6SocketAddress::ConvertFrom (address); + m_src = ad.GetIpv6 (); + return 0; +} + +int Ipv6RawSocketImpl::Bind () +{ + NS_LOG_FUNCTION_NOARGS (); + m_src = Ipv6Address::GetAny (); + return 0; +} + +int Ipv6RawSocketImpl::GetSockName (Address& address) const +{ + NS_LOG_FUNCTION_NOARGS (); + address = Inet6SocketAddress (m_src, 0); + return 0; +} + +int Ipv6RawSocketImpl::Close () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr ipv6 = m_node->GetObject (); + + if (ipv6) + { + ipv6->DeleteRawSocket (this); + } + return 0; +} + +int Ipv6RawSocketImpl::ShutdownSend () +{ + NS_LOG_FUNCTION_NOARGS (); + m_shutdownSend = true; + return 0; +} + +int Ipv6RawSocketImpl::ShutdownRecv () +{ + NS_LOG_FUNCTION_NOARGS (); + m_shutdownRecv = true; + return 0; +} + +int Ipv6RawSocketImpl::Connect (const Address& address) +{ + NS_LOG_FUNCTION (this << address); + + if (!Inet6SocketAddress::IsMatchingType (address)) + { + m_err = Socket::ERROR_INVAL; + return -1; + } + + Inet6SocketAddress ad = Inet6SocketAddress::ConvertFrom (address); + m_dst = ad.GetIpv6 (); + return 0; +} + +int Ipv6RawSocketImpl::Listen () +{ + NS_LOG_FUNCTION_NOARGS (); + m_err = Socket::ERROR_OPNOTSUPP; + return -1; +} + +int Ipv6RawSocketImpl::Send (Ptr p, uint32_t flags) +{ + NS_LOG_FUNCTION (this << p << flags); + Inet6SocketAddress to = Inet6SocketAddress (m_dst, m_protocol); + return SendTo (p, flags, to); +} + +int Ipv6RawSocketImpl::SendTo (Ptr p, uint32_t flags, const Address& toAddress) +{ + NS_LOG_FUNCTION (this << p << flags << toAddress); + + if (!Inet6SocketAddress::IsMatchingType (toAddress)) + { + m_err = Socket::ERROR_INVAL; + return -1; + } + + if (m_shutdownSend) + { + return 0; + } + + Inet6SocketAddress ad = Inet6SocketAddress::ConvertFrom (toAddress); + Ptr ipv6 = m_node->GetObject (); + Ipv6Address dst = ad.GetIpv6 (); + + if (ipv6->GetRoutingProtocol ()) + { + Ipv6Header hdr; + hdr.SetDestinationAddress (dst); + SocketErrno err = ERROR_NOTERROR; + Ptr route = 0; + uint32_t oif = 0; /* specify non-zero if bound to a source address */ + + if (!m_src.IsAny ()) + { + int32_t index = ipv6->GetInterfaceForAddress (m_src); + NS_ASSERT (index >= 0); + oif = index; + } + + route = ipv6->GetRoutingProtocol ()->RouteOutput (p, hdr, oif, err); + + if (route) + { + NS_LOG_LOGIC ("Route exists"); + if (m_protocol == Icmpv6L4Protocol::GetStaticProtocolNumber ()) + { + /* calculate checksum here for ICMPv6 echo request (sent by ping6) + * as we cannot determine source IPv6 address at application level + */ + if (*p->PeekData () == Icmpv6Header::ICMPV6_ECHO_REQUEST) + { + Icmpv6Echo hdr (1); + p->RemoveHeader (hdr); + hdr.CalculatePseudoHeaderChecksum (route->GetSource (), dst, p->GetSize () + hdr.GetSerializedSize (), Icmpv6L4Protocol::GetStaticProtocolNumber ()); + p->AddHeader (hdr); + } + } + + ipv6->Send (p, route->GetSource (), dst, m_protocol, route); + } + else + { + NS_LOG_DEBUG ("No route, dropped!"); + } + } + return 0; +} + +Ptr Ipv6RawSocketImpl::Recv (uint32_t maxSize, uint32_t flags) +{ + NS_LOG_FUNCTION (this << maxSize << flags); + Address tmp; + return RecvFrom (maxSize, flags, tmp); +} + +Ptr Ipv6RawSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, Address& fromAddress) +{ + NS_LOG_FUNCTION (this << maxSize << flags << fromAddress); + + if (m_data.empty ()) + { + return 0; + } + + /* get packet */ + struct Data data = m_data.front (); + m_data.pop_front (); + + if (data.packet->GetSize () > maxSize) + { + Ptr first = data.packet->CreateFragment (0, maxSize); + data.packet->RemoveAtStart (maxSize); + m_data.push_front (data); + return first; + } + + fromAddress = Inet6SocketAddress (data.fromIp, data.fromProtocol); + return data.packet; +} + +uint32_t Ipv6RawSocketImpl::GetTxAvailable () const +{ + NS_LOG_FUNCTION_NOARGS (); + return 0xffffffff; +} + +uint32_t Ipv6RawSocketImpl::GetRxAvailable () const +{ + NS_LOG_FUNCTION_NOARGS (); + uint32_t rx = 0; + + for (std::list::const_iterator it = m_data.begin () ; it != m_data.end () ; ++it) + { + rx+= (it->packet)->GetSize (); + } + + return rx; +} + +bool Ipv6RawSocketImpl::ForwardUp (Ptr p, Ipv6Header hdr, Ptr device) +{ + NS_LOG_FUNCTION (this << *p << hdr << device); + + if (m_shutdownRecv) + { + return false; + } + + if ((m_src == Ipv6Address::GetAny () || hdr.GetDestinationAddress () == m_src) && + (m_dst == Ipv6Address::GetAny () || hdr.GetSourceAddress () == m_dst) && + hdr.GetNextHeader () == m_protocol) + { + Ptr copy = p->Copy (); + + if (m_protocol == Icmpv6L4Protocol::GetStaticProtocolNumber ()) + { + /* filter */ + Icmpv6Header icmpHeader; + copy->PeekHeader (icmpHeader); + uint8_t type = icmpHeader.GetType (); + + if ((1 << type) & m_icmpFilter) + { + /* packet filtered */ + return false; + } + } + + copy->AddHeader (hdr); + struct Data data; + data.packet = copy; + data.fromIp = hdr.GetSourceAddress (); + data.fromProtocol = hdr.GetNextHeader (); + m_data.push_back (data); + NotifyDataRecv (); + return true; + } + return false; +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ipv6-raw-socket-impl.h b/src/internet-stack/ipv6-raw-socket-impl.h new file mode 100644 index 000000000..6f30948cf --- /dev/null +++ b/src/internet-stack/ipv6-raw-socket-impl.h @@ -0,0 +1,255 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_RAW_SOCKET_IMPL_H +#define IPV6_RAW_SOCKET_IMPL_H + +#include + +#include "ns3/socket.h" +#include "ns3/ipv6-address.h" +#include "ns3/ipv6-header.h" + +namespace ns3 +{ + +class NetDevice; +class Node; + +/** + * \class Ipv6RawSocketImpl + * \brief IPv6 raw socket. + */ +class Ipv6RawSocketImpl : public Socket +{ + public: + /** + * \brief Get the type ID of this class. + * \return type ID + */ + static TypeId GetTypeId (); + + /** + * \brief Constructor. + */ + Ipv6RawSocketImpl (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6RawSocketImpl (); + + /** + * \brief Set the node. + * \param node node to set + */ + void SetNode (Ptr node); + + /** + * \brief Get last error number. + * \return error number + */ + virtual enum Socket::SocketErrno GetErrno () const; + + /** + * \brief Get node. + * \return node associated with this raw socket. + */ + virtual Ptr GetNode () const; + + /** + * \brief Bind the socket to address. + * \param address bind to this address + * \return 0 if success, -1 otherwise + */ + virtual int Bind (const Address& address); + + /** + * \brief Bind socket. + * \return 0 if success, -1 otherwise + */ + virtual int Bind (); + + /** + * \brief Get socket address. + * \param address socket address if method success + * \return 0 if success, -1 otherwise + */ + virtual int GetSockName (Address& address) const; + + /** + * \brief Close the socket. + * \return 0 if success, -1 otherwise + */ + virtual int Close (); + + /** + * \brief Shutdown send capability. + * \return 0 if success, -1 otherwise + */ + virtual int ShutdownSend (); + + /** + * \brief Shutdown receive capability. + * \return 0 if success, -1 otherwise + */ + virtual int ShutdownRecv (); + + /** + * \brief Connect to address. + * \param address address + * \return 0 if success, -1 otherwise + */ + virtual int Connect (const Address& address); + + /** + * \brief Listen. + * \return 0 if success, -1 otherwise + */ + virtual int Listen (); + + /** + * \brief Get TX size available. + * \return TX size + */ + virtual uint32_t GetTxAvailable () const; + + /** + * \brief Get RX size available. + * \return RX size + */ + virtual uint32_t GetRxAvailable () const; + + /** + * \brief Send a packet. + * \param p packet to send + * \param flags additionnal flags + * \return 0 if success, -1 otherwise + */ + virtual int Send (Ptr p, uint32_t flags); + + /** + * \brief Send a packet. + * \param p packet to send + * \param flags additionnal flags + * \param toAddress destination address + * \return 0 if success, -1 otherwise + */ + virtual int SendTo (Ptr p, uint32_t flags, const Address& toAddress); + + /** + * \brief Receive packet. + * \param maxSize maximum size + * \param flags additionnal flags + * \return packet received + */ + virtual Ptr Recv (uint32_t maxSize, uint32_t flags); + + /** + * \brief Receive packet. + * \param maxSize maximum size + * \param flags additionnal flags + * \param fromAddress source address + * \return packet received + */ + virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, Address& fromAddress); + + /** + * \brief Set protocol field. + * \param protocol protocol to set + */ + void SetProtocol (uint16_t protocol); + + /** + * \brief Forward up to receive method. + * \param p packet + * \param hdr IPv6 header + * \param device device + * \return true if forwarded, false otherwise + */ + bool ForwardUp (Ptr p, Ipv6Header hdr, Ptr device); + + private: + /** + * \struct Data + * \brief IPv6 raw data and additionnal information. + */ + struct Data + { + Ptr packet; /**< Packet data */ + Ipv6Address fromIp; /**< Source address */ + uint16_t fromProtocol; /**< Protocol used */ + }; + + /** + * \brief Dispose object. + */ + virtual void DoDispose (); + + /** + * \brief Last error number. + */ + enum Socket::SocketErrno m_err; + + /** + * \brief Node. + */ + Ptr m_node; + + /** + * \brief Source address. + */ + Ipv6Address m_src; + + /** + * \brief Destination address. + */ + Ipv6Address m_dst; + + /** + * \brief Protocol. + */ + uint16_t m_protocol; + + /** + * \brief Packet waiting to be processed. + */ + std::list m_data; + + /** + * \brief Flag to shutdown send capability. + */ + bool m_shutdownSend; + + /** + * \brief Flag to shutdown receive capability. + */ + bool m_shutdownRecv; + + /** + * \brief ICMPv6 filter. + */ + uint32_t m_icmpFilter; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_RAW_SOCKET_IMPL_H */ + diff --git a/src/internet-stack/ipv6-test.cc b/src/internet-stack/ipv6-test.cc new file mode 100644 index 000000000..4f3de3892 --- /dev/null +++ b/src/internet-stack/ipv6-test.cc @@ -0,0 +1,145 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifdef RUN_SELF_TESTS + +#include "ns3/simulator.h" +#include "ns3/test.h" +#include "ns3/log.h" +#include "ns3/inet6-socket-address.h" +#include "ns3/node.h" +#include "ns3/csma-net-device.h" + +#include "icmpv6-l4-protocol.h" +#include "ipv6-interface.h" + +namespace ns3 +{ + +/** + * \class Ipv6L3ProtocolTest + * \brief Ipv6L3Protocol unit tests. + */ +class Ipv6L3ProtocolTest : public Test +{ + public: + /** + * \brief Constructor. + */ + Ipv6L3ProtocolTest (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6L3ProtocolTest (); + + /** + * \brief Run unit tests for this class. + * \return true if all tests have passed, false otherwise + */ + virtual bool RunTests (); +}; + +Ipv6L3ProtocolTest::Ipv6L3ProtocolTest () : Test ("Ipv6L3Protocol") +{ +} + +Ipv6L3ProtocolTest::~Ipv6L3ProtocolTest () +{ +} + +bool Ipv6L3ProtocolTest::RunTests () +{ + bool result = true; + Ptr node = CreateObject (); + Ptr ipv6 = CreateObject (); + Ptr icmpv6 = CreateObject (); + Ptr interface = CreateObject (); + Ptr interface2 = CreateObject (); + Ptr device = CreateObject (); + Ptr device2 = CreateObject (); + uint32_t index = 0; + + /* init */ + node->AggregateObject (ipv6); + node->AggregateObject (icmpv6); + ipv6->Insert (icmpv6); + + /* first real interface (loopback is also installed) */ + node->AddDevice (device); + interface->SetDevice (device); + interface->SetNode (node); + index = ipv6->AddIpv6Interface (interface); + NS_TEST_ASSERT_EQUAL (index, 1); + + /* second interface */ + node->AddDevice (device2); + interface2->SetDevice (device2); + interface2->SetNode (node); + index = ipv6->AddIpv6Interface (interface2); + NS_TEST_ASSERT_EQUAL (index, 2); + + Ipv6InterfaceAddress ifaceAddr = interface->GetLinkLocalAddress (); + NS_TEST_ASSERT_EQUAL (ifaceAddr.GetAddress ().IsLinkLocal (), true); + + interface->SetUp (); + NS_TEST_ASSERT_EQUAL (interface->GetNAddresses (), 1); /* interface has always a link-local address */ + + interface2->SetUp (); + + Ipv6InterfaceAddress ifaceAddr1 = Ipv6InterfaceAddress ("2001:1234:5678:9000::1", Ipv6Prefix (64)); + interface->AddAddress (ifaceAddr1); + Ipv6InterfaceAddress ifaceAddr2 = Ipv6InterfaceAddress ("2001:ffff:5678:9000::1", Ipv6Prefix (64)); + interface->AddAddress (ifaceAddr2); + + Ipv6InterfaceAddress ifaceAddr3 = Ipv6InterfaceAddress ("2001:ffff:5678:9001::2", Ipv6Prefix (64)); + interface2->AddAddress (ifaceAddr3); + + uint32_t num = interface->GetNAddresses (); + NS_TEST_ASSERT_EQUAL (num, 3); /* 2 global addresses + link-local ones */ + + num = interface2->GetNAddresses (); + NS_TEST_ASSERT_EQUAL (num, 2); /* 1 global addresses + link-local ones */ + + interface->RemoveAddress (2); + num = interface->GetNAddresses (); + NS_TEST_ASSERT_EQUAL (num, 2); + + Ipv6InterfaceAddress output = interface->GetAddress (1); + NS_TEST_ASSERT_EQUAL (ifaceAddr1, output); + + index = ipv6->GetInterfaceForPrefix ("2001:1234:5678:9000::0", Ipv6Prefix (64)); + NS_TEST_ASSERT_EQUAL (index, 1); /* link-local address is always index 0 */ + + index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9001::2"); + NS_TEST_ASSERT_EQUAL (index, 2); + + index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9000::1"); /* address we just remove */ + NS_TEST_ASSERT_EQUAL (index, (uint32_t)-1); + + return result; +} + +static Ipv6L3ProtocolTest gIpv6L3ProtocolTest; + +} /* namespace ns3 */ + +#endif /* RUN_SELF_TESTS */ + diff --git a/src/internet-stack/ndisc-cache.cc b/src/internet-stack/ndisc-cache.cc new file mode 100644 index 000000000..db3405be9 --- /dev/null +++ b/src/internet-stack/ndisc-cache.cc @@ -0,0 +1,513 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/log.h" +#include "ns3/uinteger.h" +#include "ns3/node.h" + +#include "ipv6-l3-protocol.h" +#include "icmpv6-l4-protocol.h" +#include "ndisc-cache.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("NdiscCache"); + +TypeId NdiscCache::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::NdiscCache") + .SetParent () + .AddAttribute ("UnresolvedQueueSize", + "Size of the queue for packets pending an NA reply.", + UintegerValue (DEFAULT_UNRES_QLEN), + MakeUintegerAccessor (&NdiscCache::m_unresQlen), + MakeUintegerChecker ()) + ; + return tid; +} + +NdiscCache::NdiscCache () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +NdiscCache::~NdiscCache () +{ + NS_LOG_FUNCTION_NOARGS (); + Flush (); +} + +void NdiscCache::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + Flush (); + m_device = 0; + m_interface = 0; + Object::DoDispose (); +} + +void NdiscCache::SetDevice (Ptr device, Ptr interface) +{ + NS_LOG_FUNCTION (this << device << interface); + m_device = device; + m_interface = interface; +} + +Ptr NdiscCache::GetInterface () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_interface; +} + +Ptr NdiscCache::GetDevice () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_device; +} + +NdiscCache::Entry* NdiscCache::Lookup (Ipv6Address dst) +{ + NS_LOG_FUNCTION (this << dst); + + if (m_ndCache.find (dst) != m_ndCache.end ()) + { + NdiscCache::Entry* entry = m_ndCache[dst]; + return entry; + } + return 0; +} + +NdiscCache::Entry* NdiscCache::Add (Ipv6Address to) +{ + NS_LOG_FUNCTION (this << to); + NS_ASSERT (m_ndCache.find (to) == m_ndCache.end ()); + + NdiscCache::Entry* entry = new NdiscCache::Entry (this); + entry->SetIpv6Address (to); + m_ndCache[to] = entry; + return entry; +} + +void NdiscCache::Remove (NdiscCache::Entry* entry) +{ + NS_LOG_FUNCTION_NOARGS (); + + for (CacheI i = m_ndCache.begin () ; i != m_ndCache.end () ; i++) + { + if ((*i).second == entry) + { + m_ndCache.erase (i); + entry->ClearWaitingPacket (); + delete entry; + return; + } + } +} + +void NdiscCache::Flush () +{ + NS_LOG_FUNCTION_NOARGS (); + + for (CacheI i = m_ndCache.begin () ; i != m_ndCache.end () ; i++) + { + delete (*i).second; /* delete the pointer NdiscCache::Entry */ + } + + m_ndCache.erase (m_ndCache.begin (), m_ndCache.end ()); +} + +void NdiscCache::SetUnresQlen (uint32_t unresQlen) +{ + NS_LOG_FUNCTION (this << unresQlen); + m_unresQlen = unresQlen; +} + +uint32_t NdiscCache::GetUnresQlen () +{ + NS_LOG_FUNCTION_NOARGS (); + return m_unresQlen; +} + +NdiscCache::Entry::Entry (NdiscCache* nd) + : m_ndCache (nd), + m_waiting (), + m_router (false), + m_nsRetransmit (0) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void NdiscCache::Entry::SetRouter (bool router) +{ + NS_LOG_FUNCTION (this << router); + m_router = router; +} + +bool NdiscCache::Entry::IsRouter () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_router; +} + +void NdiscCache::Entry::AddWaitingPacket (Ptr p) +{ + NS_LOG_FUNCTION (this << p); + + if (m_waiting.size () >= m_ndCache->GetUnresQlen ()) + { + /* we store only m_unresQlen packet => first packet in first packet remove */ + /* XXX report packet as 'dropped' */ + m_waiting.remove (0); + } + m_waiting.push_back (p); +} + +void NdiscCache::Entry::ClearWaitingPacket () +{ + NS_LOG_FUNCTION_NOARGS (); + /* XXX report packets as 'dropped' */ + m_waiting.clear (); +} + +void NdiscCache::Entry::FunctionReachableTimeout () +{ + NS_LOG_FUNCTION_NOARGS (); + this->MarkStale (); +} + +void NdiscCache::Entry::FunctionRetransmitTimeout () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr icmpv6 = m_ndCache->GetDevice ()->GetNode ()->GetObject ()->GetIcmpv6 (); + Ipv6Address addr; + + /* determine source address */ + if (m_ipv6Address.IsLinkLocal ()) + { + addr = m_ndCache->GetInterface ()->GetLinkLocalAddress ().GetAddress ();; + } + else if (!m_ipv6Address.IsAny ()) + { + addr = m_ndCache->GetInterface ()->GetAddressMatchingDestination (m_ipv6Address).GetAddress (); + + if (addr.IsAny ()) /* maybe address has expired */ + { + /* delete the entry */ + m_ndCache->Remove (this); + return; + } + } + + if (GetNSRetransmit () < icmpv6->MAX_MULTICAST_SOLICIT) + { + IncNSRetransmit (); + + icmpv6->SendNS (addr, Ipv6Address::MakeSolicitedAddress (m_ipv6Address), m_ipv6Address, m_ndCache->GetDevice ()->GetAddress ()); + /* arm the timer again */ + StartRetransmitTimer (); + } + else + { + Ptr malformedPacket = m_waiting.front (); + if (malformedPacket == 0) + { + malformedPacket = Create (); + } + + icmpv6->SendErrorDestinationUnreachable (malformedPacket, addr, Icmpv6Header::ICMPV6_ADDR_UNREACHABLE); + + /* delete the entry */ + m_ndCache->Remove (this); + } +} + +void NdiscCache::Entry::FunctionDelayTimeout () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr ipv6 = m_ndCache->GetDevice ()->GetNode ()->GetObject (); + Ptr icmpv6 = ipv6->GetIcmpv6 (); + Ipv6Address addr; + + this->MarkProbe (); + + if (m_ipv6Address.IsLinkLocal ()) + { + addr = m_ndCache->GetInterface ()->GetLinkLocalAddress ().GetAddress (); + } + else if (!m_ipv6Address.IsAny ()) + { + addr = m_ndCache->GetInterface ()->GetAddressMatchingDestination (m_ipv6Address).GetAddress (); + if (addr.IsAny ()) /* maybe address has expired */ + { + /* delete the entry */ + m_ndCache->Remove (this); + return; + } + } + else + { + /* should not happen */ + return; + } + + Ptr p = icmpv6->ForgeNS (addr, m_ipv6Address, m_ipv6Address, m_ndCache->GetDevice ()->GetAddress ()); + m_ndCache->GetDevice ()->Send (p, this->GetMacAddress (), Ipv6L3Protocol::PROT_NUMBER); + + ResetNSRetransmit (); + IncNSRetransmit (); + StartProbeTimer (); +} + +void NdiscCache::Entry::FunctionProbeTimeout () +{ + NS_LOG_FUNCTION_NOARGS (); + Ptr ipv6 = m_ndCache->GetDevice ()->GetNode ()->GetObject (); + Ptr icmpv6 = ipv6->GetIcmpv6 (); + + if (GetNSRetransmit () < icmpv6->MAX_UNICAST_SOLICIT) + { + Ipv6Address addr; + + if (m_ipv6Address.IsLinkLocal ()) + { + addr = m_ndCache->GetInterface ()->GetLinkLocalAddress ().GetAddress (); + } + else if (!m_ipv6Address.IsAny ()) + { + addr = m_ndCache->GetInterface ()->GetAddressMatchingDestination (m_ipv6Address).GetAddress (); + if (addr.IsAny ()) /* maybe address has expired */ + { + /* delete the entry */ + m_ndCache->Remove (this); + return; + } + } + else + { + /* should not happen */ + return; + } + + IncNSRetransmit (); + /* icmpv6->SendNS (m_ndCache->GetInterface ()->GetLinkLocalAddress (), m_ipv6Address, m_ipv6Address, m_ndCache->GetDevice ()->GetAddress ()); */ + Ptr p = icmpv6->ForgeNS (addr, m_ipv6Address, m_ipv6Address, m_ndCache->GetDevice ()->GetAddress ()); + m_ndCache->GetDevice ()->Send (p, this->GetMacAddress (), Ipv6L3Protocol::PROT_NUMBER); + + /* arm the timer again */ + StartProbeTimer (); + } + else + { + /* delete the entry */ + m_ndCache->Remove (this); + } +} + +void NdiscCache::Entry::SetIpv6Address (Ipv6Address ipv6Address) +{ + NS_LOG_FUNCTION (this << ipv6Address); + m_ipv6Address = ipv6Address; +} + +uint8_t NdiscCache::Entry::GetNSRetransmit () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_nsRetransmit; +} + +void NdiscCache::Entry::IncNSRetransmit () +{ + NS_LOG_FUNCTION_NOARGS (); + m_nsRetransmit++; +} + +void NdiscCache::Entry::ResetNSRetransmit () +{ + NS_LOG_FUNCTION_NOARGS (); + m_nsRetransmit = 0; +} + +Time NdiscCache::Entry::GetLastReachabilityConfirmation () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_lastReachabilityConfirmation; +} + +void NdiscCache::Entry::UpdateLastReachabilityconfirmation () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void NdiscCache::Entry::StartReachableTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_reachableTimer.SetFunction (&NdiscCache::Entry::FunctionReachableTimeout, this); + m_reachableTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::REACHABLE_TIME)); + m_reachableTimer.Schedule (); +} + +void NdiscCache::Entry::StopReachableTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_reachableTimer.Cancel (); +} + +void NdiscCache::Entry::StartProbeTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_probeTimer.SetFunction (&NdiscCache::Entry::FunctionProbeTimeout, this); + m_probeTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); + m_probeTimer.Schedule (); +} + +void NdiscCache::Entry::StopProbeTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_probeTimer.Cancel (); + ResetNSRetransmit (); +} + + +void NdiscCache::Entry::StartDelayTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_delayTimer.SetFunction (&NdiscCache::Entry::FunctionDelayTimeout, this); + m_delayTimer.SetDelay (Seconds (Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME)); + m_delayTimer.Schedule (); +} + +void NdiscCache::Entry::StopDelayTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_delayTimer.Cancel (); + ResetNSRetransmit (); +} + +void NdiscCache::Entry::StartRetransmitTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_retransTimer.SetFunction (&NdiscCache::Entry::FunctionRetransmitTimeout, this); + m_retransTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); + m_retransTimer.Schedule (); +} + +void NdiscCache::Entry::StopRetransmitTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_retransTimer.Cancel (); + ResetNSRetransmit (); +} + +void NdiscCache::Entry::MarkIncomplete (Ptr p) +{ + NS_LOG_FUNCTION (this << p); + m_state = INCOMPLETE; + + if (p) + { + m_waiting.push_back (p); + } +} + +std::list > NdiscCache::Entry::MarkReachable (Address mac) +{ + NS_LOG_FUNCTION (this << mac); + m_state = REACHABLE; + m_macAddress = mac; + return m_waiting; +} + +void NdiscCache::Entry::MarkProbe () +{ + NS_LOG_FUNCTION_NOARGS (); + m_state = PROBE; +} + +void NdiscCache::Entry::MarkStale () +{ + NS_LOG_FUNCTION_NOARGS (); + m_state = STALE; +} + +void NdiscCache::Entry::MarkReachable () +{ + NS_LOG_FUNCTION_NOARGS (); + m_state = REACHABLE; +} + +std::list > NdiscCache::Entry::MarkStale (Address mac) +{ + NS_LOG_FUNCTION (this << mac); + m_state = STALE; + m_macAddress = mac; + return m_waiting; +} + +void NdiscCache::Entry::MarkDelay () +{ + NS_LOG_FUNCTION_NOARGS (); + m_state = DELAY; +} + +bool NdiscCache::Entry::IsStale () const +{ + NS_LOG_FUNCTION_NOARGS (); + return (m_state == STALE); +} + +bool NdiscCache::Entry::IsReachable () const +{ + NS_LOG_FUNCTION_NOARGS (); + return (m_state == REACHABLE); +} + +bool NdiscCache::Entry::IsDelay () const +{ + NS_LOG_FUNCTION_NOARGS (); + return (m_state == DELAY); +} + +bool NdiscCache::Entry::IsIncomplete () const +{ + NS_LOG_FUNCTION_NOARGS (); + return (m_state == INCOMPLETE); +} + +bool NdiscCache::Entry::IsProbe () const +{ + NS_LOG_FUNCTION_NOARGS (); + return (m_state == PROBE); +} + +Address NdiscCache::Entry::GetMacAddress () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_macAddress; +} + +void NdiscCache::Entry::SetMacAddress (Address mac) +{ + NS_LOG_FUNCTION (this << mac); + m_macAddress = mac; +} + +} /* namespace ns3 */ + diff --git a/src/internet-stack/ndisc-cache.h b/src/internet-stack/ndisc-cache.h new file mode 100644 index 000000000..20016b5c4 --- /dev/null +++ b/src/internet-stack/ndisc-cache.h @@ -0,0 +1,449 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef NDISC_CACHE_H +#define NDISC_CACHE_H + +#include + +#include + +#include "ns3/packet.h" +#include "ns3/nstime.h" +#include "ns3/net-device.h" +#include "ns3/ipv6-address.h" +#include "ns3/ptr.h" +#include "ns3/timer.h" + +#include "sgi-hashmap.h" +#include "ipv6-interface.h" + +namespace ns3 +{ + +class NetDevice; +class Ipv6Interface; + +/** + * \class NdiscCache + * \brief IPv6 Neighbor Discovery cache. + */ +class NdiscCache : public Object +{ + public: + class Entry; + + /** + * \brief Get the type ID + * \return type ID + */ + static TypeId GetTypeId (); + + /** + * \brief Default value for unres qlen. + */ + static const uint32_t DEFAULT_UNRES_QLEN = 3; + + /** + * \brief Constructor. + */ + NdiscCache (); + + /** + * \brief Destructor. + */ + ~NdiscCache (); + + /** + * \brief Get the NetDevice associated with this cache. + * \return NetDevice + */ + Ptr GetDevice () const; + + /** + * \brief Get the Ipv6Interface associated with this cache. + */ + Ptr GetInterface () const; + + /** + * \brief Lookup in the cache. + * \param dst destination address + * \return the entry if found, 0 otherwise + */ + NdiscCache::Entry* Lookup (Ipv6Address dst); + + /** + * \brief Add an entry. + * \param to address to add + * \return an new Entry + */ + NdiscCache::Entry* Add (Ipv6Address to); + + /** + * \brief Delete an entry. + * \param entry pointer to delete from the list. + */ + void Remove (NdiscCache::Entry* entry); + + /** + * \brief Flush the cache. + */ + void Flush (); + + /** + * \brief Set the max number of waiting packet. + * \param unresQlen value to set + */ + void SetUnresQlen (uint32_t unresQlen); + + /** + * \brief Get the max number of waiting packet. + * \return max number + */ + uint32_t GetUnresQlen (); + + /** + * \brief Set the device and interface. + * \param device the device + * \param interface the IPv6 interface + */ + void SetDevice (Ptr device, Ptr interface); + + /** + * \class Entry + * \brief A record that holds information about an NdiscCache entry. + */ + class Entry + { + public: + /** + * \brief Constructor. + * \param nd The NdiscCache this entry belongs to. + */ + Entry (NdiscCache* nd); + + /** + * \brief Changes the state to this entry to INCOMPLETE. + * \param p packet that wait to be sent + */ + void MarkIncomplete (Ptr p); + + /** + * \brief Changes the state to this entry to REACHABLE. + * \param mac MAC address + * \return the list of packet waiting + */ + std::list > MarkReachable (Address mac); + + /** + * \brief Changes the state to this entry to PROBE. + */ + void MarkProbe (); + + /** + * \brief Changes the state to this entry to STALE. + * \param mac L2 address + * \return the list of packet waiting + */ + std::list > MarkStale (Address mac); + + /** + * \brief Changes the state to this entry to STALE. + */ + void MarkStale (); + + /** + * \brief Changes the state to this entry to REACHABLE. + */ + void MarkReachable (); + + /** + * \brief Change the state to this entry to DELAY. + */ + void MarkDelay (); + + /** + * \brief Add a packet (or replace old value) in the queue. + * \param p packet to add + */ + void AddWaitingPacket (Ptr p); + + /** + * \brief Clear the waiting packet list. + */ + void ClearWaitingPacket (); + + /** + * \brief Is the entry STALE + * \return true if the entry is in STALE state, false otherwise + */ + bool IsStale () const; + + /** + * \brief Is the entry REACHABLE + * \return true if the entry is in REACHABLE state, false otherwise + */ + bool IsReachable () const; + + /** + * \brief Is the entry DELAY + * \return true if the entry is in DELAY state, false otherwise + */ + bool IsDelay () const; + + /** + * \brief Is the entry INCOMPLETE + * \return true if the entry is in INCOMPLETE state, false otherwise + */ + bool IsIncomplete () const; + + /** + * \brief Is the entry PROBE + * \return true if the entry is in PROBE state, false otherwise + */ + bool IsProbe () const; + + /** + * \brief Get the MAC address of this entry. + * \return the L2 address + */ + Address GetMacAddress () const; + + /** + * \brief Set the MAC address of this entry. + * \param mac the MAC address to set + */ + void SetMacAddress (Address mac); + + /** + * \brief If the entry is a host or a router. + * \return true if the node is a router, 0 if it is a host + */ + bool IsRouter () const; + + /** + * \brief Set the node type. + * \param router true is a router, false means a host + */ + void SetRouter (bool router); + + /** + * \brief Get the number of NS retransmit. + * \return number of NS that have been retransmit + */ + uint8_t GetNSRetransmit () const; + + /** + * \brief Increment NS retransmit. + */ + void IncNSRetransmit (); + + /** + * \brief Reset NS retransmit (=0). + */ + void ResetNSRetransmit (); + + /** + * \brief Get the time of last reachability confirmation. + * \return time + */ + Time GetLastReachabilityConfirmation () const; + + /** + * \brief Update the time of last reachability confirmation. + */ + void UpdateLastReachabilityconfirmation (); + + /** + * \brief Start the reachable timer. + */ + void StartReachableTimer (); + + /** + * \brief Stop the reachable timer. + */ + void StopReachableTimer (); + + /** + * \brief Start retransmit timer. + */ + void StartRetransmitTimer (); + + /** + * \brief Stop retransmit timer. + */ + void StopRetransmitTimer (); + + /** + * \brief Start probe timer. + */ + void StartProbeTimer (); + + /** + * \brief Stop probe timer. + */ + void StopProbeTimer (); + + /** + * \brief Start delay timer. + */ + void StartDelayTimer (); + + /** + * \brief Stop delay timer. + */ + void StopDelayTimer (); + + /** + * \brief Function called when reachable timer timeout. + */ + void FunctionReachableTimeout (); + + /** + * \brief Function called when retransmit timer timeout. + * It verify that the NS retransmit has reached the max so discard the entry + * otherwise it retransmit a NS. + */ + void FunctionRetransmitTimeout (); + + /** + * \brief Function called when probe timer timeout. + */ + void FunctionProbeTimeout (); + + /** + * \brief Function called when delay timer timeout. + */ + void FunctionDelayTimeout (); + + /** + * \brief Set the IPv6 address. + * \param ipv6Address IPv6 address + */ + void SetIpv6Address (Ipv6Address ipv6Address); + + private: + /** + * \brief The IPv6 address. + */ + Ipv6Address m_ipv6Address; + + /** + * \brief The Entry state enumeration. + */ + enum NdiscCacheEntryState_e + { + INCOMPLETE, /**< No mapping between IPv6 and L2 addresses */ + REACHABLE, /**< Mapping exists between IPv6 and L2 addresses */ + STALE, /**< Mapping is stale */ + DELAY, /**< Try to wait contact from remote host */ + PROBE /**< Try to contact IPv6 address to know again its L2 address */ + }; + + /** + * \brief The state of the entry. + */ + NdiscCacheEntryState_e m_state; + + /** + * \brief the NdiscCache associated. + */ + NdiscCache* m_ndCache; + + /** + * \brief The MAC address. + */ + Address m_macAddress; + + /** + * \brief The list of packet waiting. + */ + std::list > m_waiting; + + /** + * \brief Type of node (router or host). + */ + bool m_router; + + /** + * \brief Reachable timer (used for NUD in REACHABLE state). + */ + Timer m_reachableTimer; + + /** + * \brief Retransmission timer (used for NUD in INCOMPLETE state). + */ + Timer m_retransTimer; + + /** + * \brief Probe timer (used for NUD in PROBE state). + */ + Timer m_probeTimer; + + /** + * \brief Delay timer (used for NUD when in DELAY state). + */ + Timer m_delayTimer; + + /** + * \brief Last time we see a reachability confirmation. + */ + Time m_lastReachabilityConfirmation; + + /** + * \brief Number of NS retransmission. + */ + uint8_t m_nsRetransmit; + }; + + private: + typedef sgi::hash_map Cache; + typedef sgi::hash_map::iterator CacheI; + + /** + * \brief Dispose this object. + */ + void DoDispose (); + + /** + * \brief The NetDevice. + */ + Ptr m_device; + + /** + * \brief the interface. + */ + Ptr m_interface; + + /** + * A list of Entry. + */ + Cache m_ndCache; + + /** + * \brief Max number of packet stored in m_waiting. + */ + uint32_t m_unresQlen; +}; + +} /* namespace ns3 */ + +#endif /* NDISC_CACHE_H */ + diff --git a/src/internet-stack/wscript b/src/internet-stack/wscript index 9d4ea3118..0f1396be4 100644 --- a/src/internet-stack/wscript +++ b/src/internet-stack/wscript @@ -99,6 +99,18 @@ def build(bld): 'icmpv4.cc', 'icmpv4-l4-protocol.cc', 'loopback-net-device.cc', + 'ipv6-interface.cc', + 'ndisc-cache.cc', + 'icmpv6-header.cc', + 'ipv6-l3-protocol.cc', + 'ipv6-end-point.cc', + 'ipv6-end-point-demux.cc', + 'ipv6-l4-protocol.cc', + 'ipv6-raw-socket-factory-impl.cc', + 'ipv6-raw-socket-impl.cc', + 'ipv6-autoconfigured-prefix.cc', + 'icmpv6-l4-protocol.cc', + 'ipv6-test.cc' ] headers = bld.new_task_gen('ns3header') @@ -108,6 +120,7 @@ def build(bld): 'tcp-header.h', 'sequence-number.h', 'icmpv4.h', + 'icmpv6-header.h', ] if bld.env['NSC_ENABLED']: diff --git a/src/node/inet6-socket-address.cc b/src/node/inet6-socket-address.cc index 90618f325..f15d64dd4 100644 --- a/src/node/inet6-socket-address.cc +++ b/src/node/inet6-socket-address.cc @@ -24,31 +24,31 @@ namespace ns3 { Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6, uint16_t port) -: m_ipv6(ipv6), + : m_ipv6(ipv6), m_port(port) { } Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6) -: m_ipv6(ipv6), + : m_ipv6(ipv6), m_port(0) { } - Inet6SocketAddress::Inet6SocketAddress (const char* ipv6, uint16_t port) -: m_ipv6(Ipv6Address(ipv6)), +Inet6SocketAddress::Inet6SocketAddress (const char* ipv6, uint16_t port) + : m_ipv6(Ipv6Address(ipv6)), m_port(port) { } - Inet6SocketAddress::Inet6SocketAddress (const char* ipv6) -: m_ipv6(Ipv6Address(ipv6)), +Inet6SocketAddress::Inet6SocketAddress (const char* ipv6) + : m_ipv6(Ipv6Address(ipv6)), m_port(0) { } - Inet6SocketAddress::Inet6SocketAddress (uint16_t port) -: m_ipv6(Ipv6Address::GetAny()), +Inet6SocketAddress::Inet6SocketAddress (uint16_t port) + : m_ipv6(Ipv6Address::GetAny()), m_port(port) { } diff --git a/src/node/ipv6-address.cc b/src/node/ipv6-address.cc index ef99226df..87f1caa6c 100644 --- a/src/node/ipv6-address.cc +++ b/src/node/ipv6-address.cc @@ -74,13 +74,13 @@ extern "C" a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24)); b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24)); c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24)); - mix(a,b,c); + mix(a, b, c); k += 12; len -= 12; } /*------------------------------------- handle the last 11 bytes */ c += length; - switch(len) /* all the case statements fall through */ + switch (len) /* all the case statements fall through */ { case 11: c+=((ub4)k[10]<<24); case 10: c+=((ub4)k[9]<<16); @@ -96,7 +96,7 @@ extern "C" case 1 : a+=k[0]; /* case 0: nothing left to add */ } - mix(a,b,c); + mix(a, b, c); /*-------------------------------------------- report the result */ return c; } @@ -119,7 +119,7 @@ static int AsciiToIpv6Host (char const *address, uint8_t addr[16]) int ch, seen_xdigits; unsigned int val; - memset((tp = tmp), '\0', 16 /* NS_IN6ADDRSZ*/); + memset ((tp = tmp), '\0', 16 /* NS_IN6ADDRSZ*/); endp = tp + 16 /*NS_IN6ADDRSZ*/; colonp = NULL; /* Leading :: requires some special handling. */ @@ -133,8 +133,8 @@ static int AsciiToIpv6Host (char const *address, uint8_t addr[16]) { const char *pch; - if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) - pch = strchr((xdigits = xdigits_u), ch); + if ((pch = strchr ((xdigits = xdigits_l), ch)) == NULL) + pch = strchr ((xdigits = xdigits_u), ch); if (pch != NULL) { val <<= 4; @@ -184,7 +184,7 @@ static int AsciiToIpv6Host (char const *address, uint8_t addr[16]) if (colonp != NULL) { /* - * Since some memmove()'s erroneously fail to handle + * Since some memmove ()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ const int n = tp - colonp; @@ -202,24 +202,24 @@ static int AsciiToIpv6Host (char const *address, uint8_t addr[16]) if (tp != endp) return (0); - /* memcpy(dst, tmp, NS_IN6ADDRSZ); */ - memcpy(addr, tmp, 16); + /* memcpy (dst, tmp, NS_IN6ADDRSZ); */ + memcpy (addr, tmp, 16); return (1); } Ipv6Address::Ipv6Address () { - memset(m_address, 0x00, 16); + memset (m_address, 0x00, 16); } Ipv6Address::Ipv6Address (Ipv6Address const& addr) { - memcpy(m_address, addr.m_address, 16); + memcpy (m_address, addr.m_address, 16); } Ipv6Address::Ipv6Address (Ipv6Address const* addr) { - memcpy(m_address, addr->m_address, 16); + memcpy (m_address, addr->m_address, 16); } Ipv6Address::Ipv6Address (char const* address) @@ -230,7 +230,7 @@ Ipv6Address::Ipv6Address (char const* address) Ipv6Address::Ipv6Address (uint8_t address[16]) { /* 128 bit => 16 bytes */ - memcpy(m_address, address, 16); + memcpy (m_address, address, 16); } Ipv6Address::~Ipv6Address () @@ -246,12 +246,12 @@ void Ipv6Address::Set (char const* address) void Ipv6Address::Set (uint8_t address[16]) { /* 128 bit => 16 bytes */ - memcpy(m_address, address, 16); + memcpy (m_address, address, 16); } void Ipv6Address::Serialize (uint8_t buf[16]) const { - memcpy(buf, m_address, 16); + memcpy (buf, m_address, 16); } Ipv6Address Ipv6Address::Deserialize (const uint8_t buf[16]) @@ -266,16 +266,16 @@ Ipv6Address Ipv6Address::MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Addre uint8_t buf[16]; uint8_t buf2[16]; - addr.CopyTo(buf); - prefix.GetBytes(buf2); + addr.CopyTo (buf); + prefix.GetBytes (buf2); - memcpy(buf2 + 8, buf, 3); + memcpy (buf2 + 8, buf, 3); buf2[11] = 0xff; buf2[12] = 0xfe; - memcpy(buf2 + 13, buf + 3, 3); + memcpy (buf2 + 13, buf + 3, 3); buf2[8] |= 0x02; - ret.Set(buf2); + ret.Set (buf2); return ret; } @@ -285,18 +285,18 @@ Ipv6Address Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac48Address addr) uint8_t buf[16]; uint8_t buf2[16]; - addr.CopyTo(buf); + addr.CopyTo (buf); - memset(buf2, 0x00, sizeof(buf2)); + memset (buf2, 0x00, sizeof (buf2)); buf2[0] = 0xfe; buf2[1] = 0x80; - memcpy(buf2 + 8, buf, 3); + memcpy (buf2 + 8, buf, 3); buf2[11] = 0xff; buf2[12] = 0xfe; - memcpy(buf2 + 13, buf + 3, 3); + memcpy (buf2 + 13, buf + 3, 3); buf2[8] |= 0x02; - ret.Set(buf2); + ret.Set (buf2); return ret; } @@ -306,9 +306,9 @@ Ipv6Address Ipv6Address::MakeSolicitedAddress (Ipv6Address addr) uint8_t buf2[16]; Ipv6Address ret; - addr.Serialize(buf2); + addr.Serialize (buf2); - memset(buf, 0x00, sizeof(buf)); + memset (buf, 0x00, sizeof (buf)); buf[0] = 0xff; buf[1] = 0x02; buf[11] = 0x01; @@ -317,40 +317,40 @@ Ipv6Address Ipv6Address::MakeSolicitedAddress (Ipv6Address addr) buf[14] = buf2[14]; buf[15] = buf2[15]; - ret.Set(buf); + ret.Set (buf); return ret; } void Ipv6Address::Print (std::ostream& os) const { - os << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[0] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[1] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[2] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[3] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[4] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[5] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[6] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[7] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[8] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[9] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[10] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[11] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[12] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[13] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[14] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_address[15] - << std::dec << std::setfill(' '); + os << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[0] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[1] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[2] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[3] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[4] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[5] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[6] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[7] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[8] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[9] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[10] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[11] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[12] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[13] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[14] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[15] + << std::dec << std::setfill (' '); } bool Ipv6Address::IsLocalhost () const { - static Ipv6Address localhost("::1"); + static Ipv6Address localhost ("::1"); return (*this == localhost); } bool Ipv6Address::IsMulticast () const { - if(m_address[0] == 0xff) + if (m_address[0] == 0xff) { return true; } @@ -364,15 +364,15 @@ Ipv6Address Ipv6Address::CombinePrefix (Ipv6Prefix const & prefix) uint8_t pref[16]; unsigned int i = 0; - memcpy(addr, m_address, 16); - ((Ipv6Prefix)prefix).GetBytes(pref); + memcpy (addr, m_address, 16); + ((Ipv6Prefix)prefix).GetBytes (pref); /* a little bit ugly... */ - for(i = 0 ; i < 16 ; i++) + for (i = 0 ; i < 16 ; i++) { addr[i] = addr[i] & pref[i]; } - ipv6.Set(addr); + ipv6.Set (addr); return ipv6; } @@ -380,9 +380,9 @@ bool Ipv6Address::IsSolicitedMulticast () const { uint8_t buf[16]; - Serialize(buf); + Serialize (buf); - if(buf[0] == 0xff && + if (buf[0] == 0xff && buf[1] == 0x02 && buf[11] == 0x01 && buf[12] == 0xff) @@ -394,31 +394,31 @@ bool Ipv6Address::IsSolicitedMulticast () const bool Ipv6Address::IsAllNodesMulticast () const { - static Ipv6Address allnodes("ff02::1"); + static Ipv6Address allnodes ("ff02::1"); return (*this == allnodes); } bool Ipv6Address::IsAllRoutersMulticast () const { - static Ipv6Address allrouters("ff02::2"); + static Ipv6Address allrouters ("ff02::2"); return (*this == allrouters); } bool Ipv6Address::IsAllHostsMulticast () const { - static Ipv6Address allhosts("ff02::3"); + static Ipv6Address allhosts ("ff02::3"); return (*this == allhosts); } bool Ipv6Address::IsAny () const { - static Ipv6Address any("::"); + static Ipv6Address any ("::"); return (*this == any); } bool Ipv6Address::IsMatchingType (const Address& address) { - return address.CheckCompatible(GetType(), 16); + return address.CheckCompatible (GetType (), 16); } Ipv6Address::operator Address () const @@ -430,7 +430,7 @@ Address Ipv6Address::ConvertTo (void) const { uint8_t buf[16]; Serialize (buf); - return Address(GetType(), buf, 16); + return Address (GetType (), buf, 16); } Ipv6Address Ipv6Address::ConvertFrom (const Address &address) @@ -443,55 +443,55 @@ Ipv6Address Ipv6Address::ConvertFrom (const Address &address) uint8_t Ipv6Address::GetType (void) { - static uint8_t type = Address::Register(); + static uint8_t type = Address::Register (); return type; } Ipv6Address Ipv6Address::GetZero () { - Ipv6Address zero("::"); + Ipv6Address zero ("::"); return zero; } Ipv6Address Ipv6Address::GetAny () { - Ipv6Address any("::"); + Ipv6Address any ("::"); return any; } Ipv6Address Ipv6Address::GetAllNodesMulticast () { - Ipv6Address nmc("ff02::1"); + Ipv6Address nmc ("ff02::1"); return nmc; } Ipv6Address Ipv6Address::GetAllRoutersMulticast () { - Ipv6Address rmc("ff02::2"); + Ipv6Address rmc ("ff02::2"); return rmc; } Ipv6Address Ipv6Address::GetAllHostsMulticast () { - Ipv6Address hmc("ff02::3"); + Ipv6Address hmc ("ff02::3"); return hmc; } Ipv6Address Ipv6Address::GetLoopback () { - static Ipv6Address loopback("::1"); + static Ipv6Address loopback ("::1"); return loopback; } void Ipv6Address::GetBytes (uint8_t buf[16]) const { - memcpy(buf, m_address, 16); + memcpy (buf, m_address, 16); } bool Ipv6Address::IsLinkLocal () const { - Ipv6Address linkLocal("fe80::0"); - if(!IsMulticast() && ((Ipv6Address*)this)->CombinePrefix(Ipv6Prefix(64))==linkLocal) + Ipv6Address linkLocal ("fe80::0"); + if (!IsMulticast () && ((Ipv6Address*)this)->CombinePrefix (Ipv6Prefix (64))==linkLocal) { return true; } @@ -500,7 +500,7 @@ bool Ipv6Address::IsLinkLocal () const bool Ipv6Address::IsEqual (const Ipv6Address& other) const { - if(!memcmp(m_address, other.m_address, 16)) + if (!memcmp (m_address, other.m_address, 16)) { return true; } @@ -509,7 +509,7 @@ bool Ipv6Address::IsEqual (const Ipv6Address& other) const std::ostream& operator << (std::ostream& os, Ipv6Address const& address) { - address.Print(os); + address.Print (os); return os; } @@ -523,17 +523,17 @@ std::istream& operator >> (std::istream& is, Ipv6Address& address) Ipv6Prefix::Ipv6Prefix () { - memset(m_prefix, 0x00, 16); + memset (m_prefix, 0x00, 16); } Ipv6Prefix::Ipv6Prefix (char const* prefix) { - AsciiToIpv6Host(prefix, m_prefix); + AsciiToIpv6Host (prefix, m_prefix); } Ipv6Prefix::Ipv6Prefix (uint8_t prefix[16]) { - memcpy(m_prefix, prefix, 16); + memcpy (m_prefix, prefix, 16); } Ipv6Prefix::Ipv6Prefix (uint8_t prefix) @@ -542,24 +542,24 @@ Ipv6Prefix::Ipv6Prefix (uint8_t prefix) unsigned int mod=0; unsigned int i=0; - memset(m_prefix, 0x00, 16); + memset (m_prefix, 0x00, 16); - NS_ASSERT(prefix <= 128); + NS_ASSERT (prefix <= 128); nb = prefix / 8; mod = prefix % 8; - memset(m_prefix, 0xff, nb); + memset (m_prefix, 0xff, nb); - if(mod) + if (mod) { m_prefix[nb] = 0xff << (8-mod); } - if(nb < 16) + if (nb < 16) { nb++; - for(i = nb; i < 16 ; i++) + for (i = nb; i < 16 ; i++) { m_prefix[i] = 0x00; } @@ -568,12 +568,12 @@ Ipv6Prefix::Ipv6Prefix (uint8_t prefix) Ipv6Prefix::Ipv6Prefix (Ipv6Prefix const& prefix) { - memcpy(m_prefix, prefix.m_prefix, 16); + memcpy (m_prefix, prefix.m_prefix, 16); } Ipv6Prefix::Ipv6Prefix (Ipv6Prefix const* prefix) { - memcpy(m_prefix, prefix->m_prefix, 16); + memcpy (m_prefix, prefix->m_prefix, 16); } Ipv6Prefix::~Ipv6Prefix () @@ -587,13 +587,13 @@ bool Ipv6Prefix::IsMatch (Ipv6Address a, Ipv6Address b) const uint8_t addrB[16]; unsigned int i = 0; - a.GetBytes(addrA); - b.GetBytes(addrB); + a.GetBytes (addrA); + b.GetBytes (addrB); /* a little bit ugly... */ - for(i = 0 ; i < 16 ; i++) + for (i = 0 ; i < 16 ; i++) { - if((addrA[i] & m_prefix[i]) != (addrB[i] & m_prefix[i])) + if ((addrA[i] & m_prefix[i]) != (addrB[i] & m_prefix[i])) { return false; } @@ -603,44 +603,44 @@ bool Ipv6Prefix::IsMatch (Ipv6Address a, Ipv6Address b) const void Ipv6Prefix::Print (std::ostream &os) const { - os << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[0] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[1] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[2] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[3] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[4] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[5] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[6] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[7] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[8] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[9] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[10] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[11] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[12] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[13] << ":" - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[14] - << std::hex << std::setw(2) << std::setfill('0') << (unsigned int) m_prefix[15]; + os << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[0] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[1] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[2] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[3] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[4] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[5] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[6] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[7] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[8] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[9] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[10] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[11] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[12] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[13] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[14] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[15]; } Ipv6Prefix Ipv6Prefix::GetLoopback () { - Ipv6Prefix prefix((uint8_t)128); + Ipv6Prefix prefix ((uint8_t)128); return prefix; } Ipv6Prefix Ipv6Prefix::GetZero () { - Ipv6Prefix prefix((uint8_t)0); + Ipv6Prefix prefix ((uint8_t)0); return prefix; } void Ipv6Prefix::GetBytes (uint8_t buf[16]) const { - memcpy(buf, m_prefix, 16); + memcpy (buf, m_prefix, 16); } bool Ipv6Prefix::IsEqual (const Ipv6Prefix& other) const { - if(!memcmp(m_prefix, other.m_prefix, 16)) + if (!memcmp (m_prefix, other.m_prefix, 16)) { return true; } @@ -671,13 +671,13 @@ bool operator != (Ipv6Prefix const &a, Ipv6Prefix const &b) return !a.IsEqual (b); } -size_t Ipv6AddressHash::operator() (Ipv6Address const &x) const +size_t Ipv6AddressHash::operator () (Ipv6Address const &x) const { uint8_t buf[16]; - x.GetBytes(buf); + x.GetBytes (buf); - return lookuphash(buf, sizeof(buf), 0); + return lookuphash (buf, sizeof (buf), 0); } ATTRIBUTE_HELPER_CPP (Ipv6Address); diff --git a/src/node/ipv6-address.h b/src/node/ipv6-address.h index 4a705a730..6633f2fc7 100644 --- a/src/node/ipv6-address.h +++ b/src/node/ipv6-address.h @@ -415,7 +415,7 @@ inline bool operator < (const Ipv6Address& a, const Ipv6Address& b) class Ipv6AddressHash : public std::unary_function { public: - size_t operator() (Ipv6Address const &x) const; + size_t operator () (Ipv6Address const &x) const; }; bool operator == (Ipv6Prefix const &a, Ipv6Prefix const &b); diff --git a/src/node/ipv6-header.cc b/src/node/ipv6-header.cc index 4f9494458..886243d7f 100644 --- a/src/node/ipv6-header.cc +++ b/src/node/ipv6-header.cc @@ -31,16 +31,15 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (Ipv6Header); Ipv6Header::Ipv6Header () -: m_version (6), + : m_version (6), m_trafficClass (0), m_flowLabel (1), m_payloadLength (0), m_nextHeader (0), m_hopLimit (0) { - - SetSourceAddress (Ipv6Address("::")); - SetDestinationAddress(Ipv6Address ("::")); + SetSourceAddress (Ipv6Address ("::")); + SetDestinationAddress (Ipv6Address ("::")); } void Ipv6Header::SetTrafficClass (uint8_t traffic) @@ -157,8 +156,8 @@ void Ipv6Header::Serialize (Buffer::Iterator start) const i.WriteU8(m_nextHeader); i.WriteU8(m_hopLimit); - WriteTo(i, m_sourceAddress); - WriteTo(i, m_destinationAddress); + WriteTo (i, m_sourceAddress); + WriteTo (i, m_destinationAddress); } uint32_t Ipv6Header::Deserialize (Buffer::Iterator start) @@ -169,7 +168,7 @@ uint32_t Ipv6Header::Deserialize (Buffer::Iterator start) vTcFl = i.ReadNtohU32(); m_version = vTcFl >> 28; - NS_ASSERT((m_version) == 6); + NS_ASSERT ((m_version) == 6); m_trafficClass = (uint8_t)((vTcFl >> 20) & 0x000000ff); m_flowLabel = vTcFl & 0xfff00000; @@ -177,10 +176,10 @@ uint32_t Ipv6Header::Deserialize (Buffer::Iterator start) m_nextHeader = i.ReadU8(); m_hopLimit = i.ReadU8(); - ReadFrom(i, m_sourceAddress); - ReadFrom(i, m_destinationAddress); + ReadFrom (i, m_sourceAddress); + ReadFrom (i, m_destinationAddress); - return GetSerializedSize(); + return GetSerializedSize (); } } /* namespace ns3 */ diff --git a/src/node/ipv6-header.h b/src/node/ipv6-header.h index 90243ac77..a2b226dad 100644 --- a/src/node/ipv6-header.h +++ b/src/node/ipv6-header.h @@ -39,21 +39,21 @@ class Ipv6Header : public Header */ enum NextHeader_e { - IPV6_EXT_HOP_BY_HOP=0, - IPV6_IPV4=4, - IPV6_TCP=6, - IPV6_UDP=17, - IPV6_IPV6=41, - IPV6_EXT_ROUTING=43, - IPV6_EXT_FRAGMENTATION=44, - IPV6_EXT_CONFIDENTIALITY=50, - IPV6_EXT_AUTHENTIFICATION, - IPV6_ICMPV6=58, - IPV6_EXT_END, - IPV6_EXT_DESTINATION, - IPV6_SCTP=135, - IPV6_EXT_MOBILITY=135, - IPV6_UDP_LITE, + IPV6_EXT_HOP_BY_HOP = 0, + IPV6_IPV4 = 4, + IPV6_TCP = 6, + IPV6_UDP = 17, + IPV6_IPV6 = 41, + IPV6_EXT_ROUTING = 43, + IPV6_EXT_FRAGMENTATION = 44, + IPV6_EXT_CONFIDENTIALITY = 50, + IPV6_EXT_AUTHENTIFICATION = 51, + IPV6_ICMPV6 = 58, + IPV6_EXT_END = 59, + IPV6_EXT_DESTINATION = 60, + IPV6_SCTP = 135, + IPV6_EXT_MOBILITY = 135, + IPV6_UDP_LITE = 136, }; /** diff --git a/src/node/ipv6-interface-address.cc b/src/node/ipv6-interface-address.cc new file mode 100644 index 000000000..ee2cc45d8 --- /dev/null +++ b/src/node/ipv6-interface-address.cc @@ -0,0 +1,170 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include + +#include "ns3/log.h" +#include "ns3/assert.h" +#include "ipv6-interface-address.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6InterfaceAddress"); + +Ipv6InterfaceAddress::Ipv6InterfaceAddress () + : m_address (Ipv6Address ()), + m_prefix (Ipv6Prefix ()), + m_state (TENTATIVE_OPTIMISTIC), + m_scope (HOST), + m_nsDadUid (0) +{ + NS_LOG_FUNCTION (this); +} + +Ipv6InterfaceAddress::Ipv6InterfaceAddress (Ipv6Address address) +{ + NS_LOG_FUNCTION (this << address); + m_prefix = Ipv6Prefix (64); + SetAddress (address); + SetState (TENTATIVE_OPTIMISTIC); + m_nsDadUid = 0; +} + +Ipv6InterfaceAddress::Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix) +{ + NS_LOG_FUNCTION (this << address << prefix); + m_prefix = prefix; + SetAddress (address); + SetState (TENTATIVE_OPTIMISTIC); + m_nsDadUid = 0; +} + +Ipv6InterfaceAddress::Ipv6InterfaceAddress (const Ipv6InterfaceAddress& o) + : m_address (o.m_address), + m_prefix (o.m_prefix), + m_state (o.m_state), + m_scope (o.m_scope), + m_nsDadUid (o.m_nsDadUid) +{} + +Ipv6InterfaceAddress::~Ipv6InterfaceAddress () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Ipv6Address Ipv6InterfaceAddress::GetAddress () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_address; +} + +void Ipv6InterfaceAddress::SetAddress (Ipv6Address address) +{ + NS_LOG_FUNCTION (this << address); + m_address = address; + + if (address.IsLocalhost ()) + { + m_scope = HOST; + /* localhost address is always /128 prefix */ + m_prefix = Ipv6Prefix (128); + } + if (address.IsLinkLocal ()) + { + m_scope = LINKLOCAL; + /* link-local address is always /64 prefix */ + m_prefix = Ipv6Prefix (64); + } + else + { + m_scope = GLOBAL; + } +} + +Ipv6Prefix Ipv6InterfaceAddress::GetPrefix () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_prefix; +} + +void Ipv6InterfaceAddress::SetState (Ipv6InterfaceAddress::State_e state) +{ + NS_LOG_FUNCTION (this << state); + m_state = state; +} + +Ipv6InterfaceAddress::State_e Ipv6InterfaceAddress::GetState () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_state; +} + +void Ipv6InterfaceAddress::SetScope (Ipv6InterfaceAddress::Scope_e scope) +{ + NS_LOG_FUNCTION (this << scope); + m_scope = scope; +} + +Ipv6InterfaceAddress::Scope_e Ipv6InterfaceAddress::GetScope () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_scope; +} + +std::ostream& operator<< (std::ostream& os, const Ipv6InterfaceAddress &addr) +{ + os << "address=" << addr.GetAddress () << "; prefix=" << + addr.GetPrefix () << "; scope=" << addr.GetScope (); + return os; +} + +uint32_t Ipv6InterfaceAddress::GetNsDadUid () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_nsDadUid; +} + +void Ipv6InterfaceAddress::SetNsDadUid (uint32_t nsDadUid) +{ + NS_LOG_FUNCTION (this << nsDadUid); + m_nsDadUid = nsDadUid; +} + +#if 0 +void Ipv6InterfaceAddress::StartDadTimer (Ptr interface) +{ + NS_LOG_FUNCTION (this << interface); + m_dadTimer.SetFunction (&Icmpv6L4Protocol::FunctionDadTimeout); + m_dadTimer.SetArguments (interface, m_address); + m_dadTimer.Schedule (Seconds (1)); + m_dadId = Simulator::Schedule (Seconds (1.), &Icmpv6L4Protocol::FunctionDadTimeout, interface, m_address); +} + +void Ipv6InterfaceAddress::StopDadTimer () +{ + NS_LOG_FUNCTION_NOARGS (); + m_dadTimer.Cancel (); + Simulator::Cancel (m_dadId); +} +#endif + +} /* namespace ns3 */ + diff --git a/src/node/ipv6-interface-address.h b/src/node/ipv6-interface-address.h new file mode 100644 index 000000000..1e6d0bb6e --- /dev/null +++ b/src/node/ipv6-interface-address.h @@ -0,0 +1,209 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_INTERFACE_ADDRESS_H +#define IPV6_INTERFACE_ADDRESS_H + +#include + +#include "ipv6-address.h" + +namespace ns3 +{ + +/** + * \ingroup address + * \class Ipv6InterfaceAddress + * \brief IPv6 address associated with an interface. + */ +class Ipv6InterfaceAddress +{ + public: + /** + * \enum State_e + * \brief State of an address associated with an interface. + */ + enum State_e + { + TENTATIVE, /**< Address is tentative, no packet can be sent unless DAD finished */ + DEPRECATED, /**< Address is deprecated and should not be used */ + PREFERRED, /**< Preferred address */ + PERMANENT, /**< Permanent address */ + HOMEADDRESS, /**< Address is a HomeAddress */ + TENTATIVE_OPTIMISTIC, /**< Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished */ + INVALID, /**< Invalid state (after a DAD failed) */ + }; + + /** + * \enum Scope_e + * \brief Scope of address. + */ + enum Scope_e + { + HOST, /**< Localhost (::1/128) */ + LINKLOCAL, /**< Link-local address (fe80::/64) */ + GLOBAL, /**< Global address (2000::/3) */ + }; + + /** + * \brief Default constructor. + */ + Ipv6InterfaceAddress (); + + /** + * \brief Constructor. Prefix is 64 by default. + * \param address the IPv6 address to set + */ + Ipv6InterfaceAddress (Ipv6Address address); + + /** + * \brief Constructor. + * \param address IPv6 address to set + * \param prefix IPv6 prefix + */ + Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix); + + /** + * \brief Copy constructor. + * \param o object to copy + */ + Ipv6InterfaceAddress (const Ipv6InterfaceAddress& o); + + /** + * \brief Destructor. + */ + ~Ipv6InterfaceAddress (); + + /** + * \brief Set IPv6 address (and scope). + * \param address IPv6 address to set + */ + void SetAddress (Ipv6Address address); + + /** + * \brief Get the IPv6 address. + * \return IPv6 address + */ + Ipv6Address GetAddress () const; + + /** + * \brief Get the IPv6 prefix. + * \return IPv6 prefix + */ + Ipv6Prefix GetPrefix () const; + + /** + * \brief Set the state. + * \param state the state + */ + void SetState (Ipv6InterfaceAddress::State_e state); + + /** + * \brief Get the address state. + * \return address state + */ + Ipv6InterfaceAddress::State_e GetState () const; + + /** + * \brief Set the scope. + * \param scope the scope of address + */ + void SetScope (Ipv6InterfaceAddress::Scope_e scope); + + /** + * \brief Get address scope. + * \return scope + */ + Ipv6InterfaceAddress::Scope_e GetScope () const; + + /** + * \brief Set the latest DAD probe packet UID. + * \param uid packet uid + */ + void SetNsDadUid (uint32_t uid); + + /** + * \brief Get the latest DAD probe packet UID. + * \return uid + */ + uint32_t GetNsDadUid () const; + +#if 0 + /** + * \brief Start the DAD timer. + * \param interface interface + */ + void StartDadTimer (Ptr interface); + + /** + * \brief Stop the DAD timer. + */ + void StopDadTimer (); +#endif + + private: + /** + * \brief The IPv6 address. + */ + Ipv6Address m_address; + + /** + * \brief The IPv6 prefix. + */ + Ipv6Prefix m_prefix; + + /** + * \brief State of the address. + */ + State_e m_state; + + /** + * \brief Scope of the address. + */ + Scope_e m_scope; + + friend bool operator == (Ipv6InterfaceAddress const& a, Ipv6InterfaceAddress const& b); + friend bool operator != (Ipv6InterfaceAddress const& a, Ipv6InterfaceAddress const& b); + + /** + * \brief Last DAD probe packet UID. + */ + uint32_t m_nsDadUid; +}; + +std::ostream& operator<< (std::ostream& os, const Ipv6InterfaceAddress &addr); + +/* follow Ipv6InterfaceAddress 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.m_state == b.m_state && a.m_scope == b.m_scope); +} + +inline bool operator != (const Ipv6InterfaceAddress& a, const Ipv6InterfaceAddress& b) +{ + return (a.m_address != b.m_address || a.m_prefix != b.m_prefix || + a.m_state != b.m_state || a.m_scope != b.m_scope); +} + +} /* namespace ns3 */ + +#endif /* IPV6_INTERFACE_ADDRESS_H */ + diff --git a/src/node/ipv6-raw-socket-factory.cc b/src/node/ipv6-raw-socket-factory.cc new file mode 100644 index 000000000..c15caf12f --- /dev/null +++ b/src/node/ipv6-raw-socket-factory.cc @@ -0,0 +1,37 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 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 + */ + +#include "ipv6-raw-socket-factory.h" +#include "ns3/uinteger.h" + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (Ipv6RawSocketFactory); + +TypeId Ipv6RawSocketFactory::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6RawSocketFactory") + .SetParent () + ; + return tid; +} + +} // namespace ns3 + diff --git a/src/node/ipv6-raw-socket-factory.h b/src/node/ipv6-raw-socket-factory.h new file mode 100644 index 000000000..66361fb6e --- /dev/null +++ b/src/node/ipv6-raw-socket-factory.h @@ -0,0 +1,52 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 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 + */ + +#ifndef IPV6_RAW_SOCKET_FACTORY_H +#define IPV6_RAW_SOCKET_FACTORY_H + +#include "socket-factory.h" + +namespace ns3 +{ + +class Socket; + +/** + * \ingroup socket + * + * \brief API to create IPv6 RAW socket instances + * + * This abstract class defines the API for IPv6 RAW socket factory. + * + */ +class Ipv6RawSocketFactory : public SocketFactory +{ + public: + /** + * \brief Get the type ID of this class. + * \return type ID + */ + static TypeId GetTypeId (void); +}; + +} // namespace ns3 + +#endif /* IPV6_RAW_SOCKET_FACTORY_H */ + diff --git a/src/node/ipv6-route.cc b/src/node/ipv6-route.cc new file mode 100644 index 000000000..8ce5fc57c --- /dev/null +++ b/src/node/ipv6-route.cc @@ -0,0 +1,147 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include + +#include "net-device.h" + +#include "ipv6-route.h" + +namespace ns3 +{ + +Ipv6Route::Ipv6Route () +{ +} + +Ipv6Route::~Ipv6Route () +{ +} + +void Ipv6Route::SetDestination (Ipv6Address dest) +{ + m_dest = dest; +} + +Ipv6Address +Ipv6Route::GetDestination () const +{ + return m_dest; +} + +void Ipv6Route::SetSource (Ipv6Address src) +{ + m_source = src; +} + +Ipv6Address Ipv6Route::GetSource () const +{ + return m_source; +} + +void Ipv6Route::SetGateway (Ipv6Address gw) +{ + m_gateway = gw; +} + +Ipv6Address Ipv6Route::GetGateway () const +{ + return m_gateway; +} + +void Ipv6Route::SetOutputDevice (Ptr outputDevice) +{ + m_outputDevice = outputDevice; +} + +Ptr Ipv6Route::GetOutputDevice () const +{ + return m_outputDevice; +} + +std::ostream& operator<< (std::ostream& os, Ipv6Route const& route) +{ + os << "source=" << route.GetSource () << " dest="<< route.GetDestination () <<" gw=" << route.GetGateway (); + return os; +} + +Ipv6MulticastRoute::Ipv6MulticastRoute () +{ + uint32_t initial_ttl = MAX_TTL; + + /* Initialize array to MAX_TTL, which means that all interfaces are "off" */ + for (uint32_t i = 0; i < MAX_INTERFACES; i++) + { + m_ttls.push_back (initial_ttl); + } +} + +Ipv6MulticastRoute::~Ipv6MulticastRoute () +{ +} + +void Ipv6MulticastRoute::SetGroup (const Ipv6Address group) +{ + m_group = group; +} + +Ipv6Address Ipv6MulticastRoute::GetGroup () const +{ + return m_group; +} + +void Ipv6MulticastRoute::SetOrigin (const Ipv6Address origin) +{ + m_origin = origin; +} + +Ipv6Address Ipv6MulticastRoute::GetOrigin () const +{ + return m_origin; +} + +void Ipv6MulticastRoute::SetParent (uint32_t parent) +{ + m_parent = parent; +} + +uint32_t Ipv6MulticastRoute::GetParent () const +{ + return m_parent; +} + +void Ipv6MulticastRoute::SetOutputTtl (uint32_t oif, uint32_t ttl) +{ + m_ttls[oif] = ttl; +} + +uint32_t Ipv6MulticastRoute::GetOutputTtl (uint32_t oif) const +{ + return m_ttls[oif]; +} + +std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoute const& route) +{ + os << "origin=" << route.GetOrigin () << " group="<< route.GetGroup () <<" parent=" << route.GetParent (); + return os; +} + +} /* namespace ns3 */ + diff --git a/src/node/ipv6-route.h b/src/node/ipv6-route.h new file mode 100644 index 000000000..1269f1c22 --- /dev/null +++ b/src/node/ipv6-route.h @@ -0,0 +1,227 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_ROUTE_H +#define IPV6_ROUTE_H + +#include +#include +#include + +#include "ns3/ref-count-base.h" +#include "ipv6-address.h" + +namespace ns3 +{ + +class NetDevice; + +/** + * \ingroup ipv6Routing + * \class Ipv6Route + * \brief IPv6 route cache entry. + */ +class Ipv6Route : public RefCountBase +{ + public: + /** + * \brief Constructor. + */ + Ipv6Route (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6Route (); + + /** + * \brief Set destination address. + * \param dest IPv6 destination address + */ + void SetDestination (Ipv6Address dest); + + /** + * \brief Get destination address. + * \return destination address + */ + Ipv6Address GetDestination () const; + + /** + * \brief Set source address. + * \param src IPv6 source address + */ + void SetSource (Ipv6Address src); + + /** + * \brief Get source address. + * \return source address + */ + Ipv6Address GetSource () const; + + /** + * \brief Set gateway address. + * \param gw IPv6 gateway address + */ + void SetGateway (Ipv6Address gw); + + /** + * \brief Get gateway address. + * \return gateway address + */ + Ipv6Address GetGateway () const; + + /** + * \brief Set output device for outgoing packets. + * \param outputDevice output device + */ + void SetOutputDevice (Ptr outputDevice); + + /** + * \brief Get output device. + * \return output device + */ + Ptr GetOutputDevice () const; + + private: + /** + * \brief Destination address. + */ + Ipv6Address m_dest; + + /** + * \brief source address. + */ + Ipv6Address m_source; + + /** + * \brief Gateway address. + */ + Ipv6Address m_gateway; + + /** + * \brief Output device. + */ + Ptr m_outputDevice; +}; + +std::ostream& operator<< (std::ostream& os, Ipv6Route const& route); + +/** + * \ingroup ipv6Routing + * \class Ipv6MulticastRoute + * \brief IPv6 multicast route entry. + */ +class Ipv6MulticastRoute : public RefCountBase +{ + public: + /** + * \brief Maximum number of multicast interfaces on a router. + */ + static const uint32_t MAX_INTERFACES = 16; + + /** + * \brief Maximum Time-To-Live (TTL). + */ + static const uint32_t MAX_TTL = 255; + + /** + * \brief Constructor. + */ + Ipv6MulticastRoute (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6MulticastRoute (); + + /** + * \brief Set IPv6 group. + * \param group Ipv6Address of the multicast group + */ + void SetGroup (const Ipv6Address group); + + /** + * \brief Get IPv6 group. + * \return Ipv6Address of the multicast group + */ + Ipv6Address GetGroup (void) const; + + /** + * \brief Set origin address. + * \param origin Ipv6Address of the origin address + */ + void SetOrigin (const Ipv6Address origin); + + /** + * \brief Get source address. + * \return Ipv6Address of the origin address + */ + Ipv6Address GetOrigin (void) const; + + /** + * \param iif Parent (input interface) for this route + */ + void SetParent (uint32_t iif); + /** + * \return Parent (input interface) for this route + */ + uint32_t GetParent (void) const; + + /** + * \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. + * \param oif outgoing interface + * \return TTL for this route + */ + uint32_t GetOutputTtl (uint32_t oif) const; + + private: + /** + * \brief IPv6 group. + */ + Ipv6Address m_group; + + /** + * \brief IPv6 origin (source). + */ + Ipv6Address m_origin; + + /** + * \brief Source interface. + */ + uint32_t m_parent; + + /** + * \brief TTLs; + */ + std::vector m_ttls; +}; + +std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoute const& route); + +} /* namespace ns3 */ + +#endif /* IPV6_ROUTE_H */ + diff --git a/src/node/ipv6-routing-protocol.cc b/src/node/ipv6-routing-protocol.cc new file mode 100644 index 000000000..539b3b76b --- /dev/null +++ b/src/node/ipv6-routing-protocol.cc @@ -0,0 +1,39 @@ +/* -*- 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 + */ + +/* 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" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Ipv6RoutingProtocol); + +TypeId Ipv6RoutingProtocol::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6RoutingProtocol") + .SetParent () + ; + return tid; +} + +} /* namespace ns3 */ + diff --git a/src/node/ipv6-routing-protocol.h b/src/node/ipv6-routing-protocol.h new file mode 100644 index 000000000..d449e094c --- /dev/null +++ b/src/node/ipv6-routing-protocol.h @@ -0,0 +1,170 @@ +/* -*- 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 + */ + +/* taken from src/node/ipv4-routing-protocol.h and adapted to IPv6 */ + +#ifndef IPV6_ROUTING_PROTOCOL_H +#define IPV6_ROUTING_PROTOCOL_H + +#include "ns3/packet.h" +#include "ns3/callback.h" +#include "ns3/object.h" +#include "ns3/socket.h" +#include "ipv6-header.h" +#include "ipv6-interface-address.h" +#include "ipv6.h" + +namespace ns3 { + +class Ipv6MulticastRoute; +class Ipv6Route; +class NetDevice; + +/** + * \ingroup node + * \defgroup ipv6Routing Ipv6 Routing + * + * Abstract base class for Ipv6 routing protocols. Defines two + * virtual functions for packet routing and forwarding. The first, + * RouteOutput (), is used for locally originated packets, and the second, + * RouteInput (), is used for forwarding and/or delivering received packets. + * Also defines the signatures of four callbacks used in RouteInput (). + * + */ +class Ipv6RoutingProtocol : public Object +{ +public: + static TypeId GetTypeId (void); + + typedef Callback, Ptr, const Ipv6Header &> UnicastForwardCallback; + typedef Callback, Ptr, const Ipv6Header &> MulticastForwardCallback; + typedef Callback, const Ipv6Header &, uint32_t > LocalDeliverCallback; + typedef Callback, const Ipv6Header &, Socket::SocketErrno > ErrorCallback; + + /** + * \brief Query routing cache for an existing route, for an outbound packet + * + * This lookup is used by transport protocols. It does not cause any + * packet to be forwarded, and is synchronous. Can be used for + * multicast or unicast. The Linux equivalent is ip_route_output () + * + * \param p packet to be routed. Note that this method may modify the packet. + * Callers may also pass in a null pointer. + * \param header input parameter (used to form key to search for the route) + * \param oif Output interface index. May be zero, or may be bound via + * socket options to a particular output interface. + * \param sockerr Output parameter; socket errno + * + * \returns a code that indicates what happened in the lookup + */ + virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) = 0; + + /** + * \brief Route an input packet (to be forwarded or locally delivered) + * + * This lookup is used in the forwarding process. The packet is + * handed over to the Ipv6RoutingProtocol, and will get forwarded onward + * by one of the callbacks. The Linux equivalent is ip_route_input (). + * There are four valid outcomes, and a matching callbacks to handle each. + * + * \param p received packet + * \param header input parameter used to form a search key for a route + * \param idev Pointer to ingress network device + * \param ucb Callback for the case in which the packet is to be forwarded + * as unicast + * \param mcb Callback for the case in which the packet is to be forwarded + * as multicast + * \param lcb Callback for the case in which the packet is to be locally + * delivered + * \param ecb Callback to call if there is an error in forwarding + * \returns true if the Ipv6RoutingProtocol takes responsibility for + * forwarding or delivering the packet, false otherwise + */ + virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) = 0; + + /** + * \param interface the index of the interface we are being notified about + * + * Protocols are expected to implement this method to be notified of the state change of + * an interface in a node. + */ + virtual void NotifyInterfaceUp (uint32_t interface) = 0; + /** + * \param interface the index of the interface we are being notified about + * + * Protocols are expected to implement this method to be notified of the state change of + * an interface in a node. + */ + 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 + * + * 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. + */ + 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 + * + * 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. + */ + virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) = 0; + + /** + * \brief Notify a new route. + * + * Typically this is used to add another route from IPv6 stack (i.e. ICMPv6 + * redirect case, ...). + * \param dst destination address + * \param mask destination mask + * \param nextHop nextHop for this destination + * \param interface output interface + * \param prefixToUse prefix to use as source with this route + */ + virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) = 0; + + /** + * \brief Notify route removing. + * \param dst destination address + * \param mask destination mask + * \param nextHop nextHop for this destination + * \param interface output interface + */ + virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface) = 0; + + /** + * \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) = 0; +}; + +} //namespace ns3 + +#endif /* IPV6_ROUTING_PROTOCOL_H */ + diff --git a/src/node/ipv6.cc b/src/node/ipv6.cc new file mode 100644 index 000000000..c21ef2383 --- /dev/null +++ b/src/node/ipv6.cc @@ -0,0 +1,60 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 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 + */ + +/* taken from src/node/ipv4.h and adapted to IPv6 */ + +#include "ns3/assert.h" +#include "ns3/node.h" +#include "ns3/boolean.h" +#include "ipv6.h" + +namespace ns3 +{ + +NS_OBJECT_ENSURE_REGISTERED (Ipv6); + +TypeId Ipv6::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::Ipv6") + .SetParent () + .AddAttribute ("IpForward", "Globally enable or disable IP forwarding for all current and future IPv6 devices.", + BooleanValue (false), + MakeBooleanAccessor (&Ipv6::SetIpForward, + &Ipv6::GetIpForward), + MakeBooleanChecker ()) +#if 0 + .AddAttribute ("MtuDiscover", "If enabled, every outgoing IPv6 packet will have the DF flag set.", + BooleanValue (false), + MakeBooleanAccessor (&UdpSocket::SetMtuDiscover, + &UdpSocket::GetMtuDiscover), + MakeBooleanChecker ()) +#endif + ; + return tid; +} + +Ipv6::Ipv6 () +{} + +Ipv6::~Ipv6 () +{} + +} /* namespace ns3 */ + diff --git a/src/node/ipv6.h b/src/node/ipv6.h new file mode 100644 index 000000000..495bf4379 --- /dev/null +++ b/src/node/ipv6.h @@ -0,0 +1,289 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 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 + */ + +/* taken from src/node/ipv4.h and adapted to IPv6 */ + +#ifndef IPV6_H +#define IPV6_H + +#include +#include "ns3/object.h" +#include "ns3/socket.h" +#include "ns3/callback.h" +#include "ipv6-address.h" +#include "ipv6-interface-address.h" + +namespace ns3 { + +class Node; +class NetDevice; +class Packet; +class Ipv6RoutingProtocol; + +/** + * \ingroup node + * \defgroup ipv6 Ipv6 + */ + +/** + * \ingroup ipv6 + * \brief Access to the IPv6 forwarding table, interfaces, and configuration + * + * This class defines the API to manipulate the following aspects of + * the IPv6 implementation: + * -# set/get an Ipv6RoutingProtocol + * -# register a NetDevice for use by the IPv6 layer (basically, to + * create IPv6-related state such as addressing and neighbor cache that + * is associated with a NetDevice) + * -# manipulate the status of the NetDevice from the IPv6 perspective, + * such as marking it as Up or Down, + * -# adding, deleting, and getting addresses associated to the IPv6 + * interfaces. + * -# exporting IPv6 configuration attributes + * + * Each NetDevice has conceptually a single IPv6 interface associated + * with it (the corresponding structure in the Linux IPv6 implementation + * is struct in_device). Each interface may have one or more IPv6 + * addresses associated with it. Each IPv6 address may have different + * subnet mask, scope, etc., so all of this per-address information + * is stored in an Ipv6InterfaceAddress class (the corresponding + * structure in Linux is struct in6_ifaddr) + * + * IPv6 attributes such as whether IP forwarding is enabled and disabled + * are also stored in this class + * + * TO DO: Add API to allow access to the IPv6 neighbor table + * + * \see Ipv6RoutingProtocol + * \see Ipv6InterfaceAddress + */ +class Ipv6 : public Object +{ +public: + static TypeId GetTypeId (void); + + /** + * \brief Constructor. + */ + Ipv6 (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6 (); + + /** + * \brief Register a new routing protocol to be used by this IPv6 stack + * + * This call will replace any routing protocol that has been previously + * registered. If you want to add multiple routing protocols, you must + * add them to a Ipv6ListRoutingProtocol directly. + * + * \param routingProtocol smart pointer to Ipv6RoutingProtocol object + */ + virtual void SetRoutingProtocol (Ptr routingProtocol) = 0; + + /** + * \brief Get the routing protocol to be used by this IPv6 stack + * + * \returns smart pointer to Ipv6RoutingProtocol object, or null pointer if none + */ + virtual Ptr 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. + * + * 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. + */ + virtual uint32_t AddInterface (Ptr device) = 0; + + /** + * \returns the number of interfaces added by the user. + */ + virtual uint32_t GetNInterfaces (void) const = 0; + + /** + * \brief Return the interface number of the interface that has been + * assigned the specified IP address. + * + * \param address The IP address being searched for + * \returns The interface number of the IPv6 interface with the given + * address or -1 if not found. + * + * Each IP interface has one or more IP addresses associated with it. + * This method searches the list of interfaces for one that holds a + * particular address. This call takes an IP address as a parameter and + * returns the interface number of the first interface that has been assigned + * that address, or -1 if not found. There must be an exact match. + */ + virtual int32_t GetInterfaceForAddress (Ipv6Address address) const = 0; + + /** + * \brief Return the interface number of first interface found that + * has an IPv6 address within the prefix specified by the input + * address and mask parameters + * + * \param address The IP address assigned to the interface of interest. + * \param mask The IP prefix to use in the mask + * \returns The interface number of the IPv6 interface with the given + * address or -1 if not found. + * + * Each IP interface has one or more IP addresses associated with it. + * This method searches the list of interfaces for the first one found + * that holds an address that is included within the prefix + * formed by the input address and mask parameters. The value -1 is + * returned if no match is found. + */ + virtual int32_t GetInterfaceForPrefix (Ipv6Address address, + Ipv6Prefix mask) const = 0; + + /** + * \param interface The interface number of an IPv6 interface. + * \returns The NetDevice associated with the IPv6 interface number. + */ + virtual Ptr GetNetDevice (uint32_t interface) = 0; + + /** + * \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 device) const = 0; + + /** + * \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 + */ + virtual bool AddAddress (uint32_t interface, Ipv6InterfaceAddress address) = 0; + + /** + * \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; + + /** + * Because addresses can be removed, the addressIndex is not guaranteed + * to be static across calls to this method. + * + * \param interface Interface number of an IPv6 interface + * \param addressIndex index of Ipv6InterfaceAddress + * \returns the Ipv6InterfaceAddress associated to the interface and addresIndex + */ + virtual Ipv6InterfaceAddress GetAddress (uint32_t interface, uint32_t addressIndex) const = 0; + + /** + * 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 + * call RemoveAddress (i, 0); 5 times. + * + * \param interface Interface number of an IPv6 interface + * \param addressIndex index of Ipv6InterfaceAddress to remove + * \returns true if the operation succeeded + */ + virtual bool RemoveAddress (uint32_t interface, uint32_t addressIndex) = 0; + + /** + * \param interface The interface number of an IPv6 interface + * \param metric routing metric (cost) associated to the underlying + * IPv6 interface + */ + virtual void SetMetric (uint32_t interface, uint16_t metric) = 0; + + /** + * \param interface The interface number of an IPv6 interface + * \returns routing metric (cost) associated to the underlying + * IPv6 interface + */ + virtual uint16_t GetMetric (uint32_t interface) const = 0; + + /** + * \param interface Interface number of IPv6 interface + * \returns the Maximum Transmission Unit (in bytes) associated + * to the underlying IPv6 interface + */ + virtual uint16_t GetMtu (uint32_t interface) const = 0; + + /** + * \param interface Interface number of IPv6 interface + * \returns true if the underlying interface is in the "up" state, + * false otherwise. + */ + virtual bool IsUp (uint32_t interface) const = 0; + + /** + * \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 + * + * Set the interface into the "down" state. In this state, it is + * ignored during IPv6 forwarding. + */ + virtual void SetDown (uint32_t interface) = 0; + + /** + * \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; + + /** + * \param interface Interface number of IPv6 interface + * \param val Value to set the forwarding flag + * + * If set to true, IPv6 forwarding is enabled for input datagrams on this device + */ + virtual void SetForwarding (uint32_t interface, bool val) = 0; + + /** + * \brief Any interface magic number. + */ + static const uint32_t IF_ANY = 0xffffffff; + +private: + // Indirect the IPv6 attributes through private pure virtual methods + /** + * \brief Set IPv6 forwarding state. + * \param forward IPv6 forwarding enabled or not + */ + virtual void SetIpForward (bool forward) = 0; + + /** + * \brief Get IPv6 forwarding state. + * \return forwarding state (enabled or not) + */ + virtual bool GetIpForward (void) const = 0; +}; + +} // namespace ns3 + +#endif /* IPV6_H */ + diff --git a/src/node/wscript b/src/node/wscript index 4c1dc1e1e..1430e63ef 100644 --- a/src/node/wscript +++ b/src/node/wscript @@ -33,13 +33,18 @@ def build(bld): 'tcp-socket.cc', 'tcp-socket-factory.cc', 'ipv4.cc', + 'ipv4-raw-socket-factory.cc', 'application.cc', 'simple-channel.cc', 'simple-net-device.cc', 'inet6-socket-address.cc', 'ipv6-address.cc', 'ipv6-header.cc', - 'ipv4-raw-socket-factory.cc', + 'ipv6-interface-address.cc', + 'ipv6-route.cc', + 'ipv6.cc', + 'ipv6-raw-socket-factory.cc', + 'ipv6-routing-protocol.cc', ] headers = bld.new_task_gen('ns3header') @@ -56,7 +61,7 @@ def build(bld): 'ipv4-address-generator.h', 'ipv4-header.h', 'net-device.h', - 'address-utils.h', + 'address-utils.h', 'ipv4-route.h', 'ipv4-routing-protocol.h', 'queue.h', @@ -74,11 +79,16 @@ def build(bld): 'tcp-socket.h', 'tcp-socket-factory.h', 'ipv4.h', + 'ipv4-raw-socket-factory.h', 'application.h', 'simple-channel.h', 'simple-net-device.h', 'inet6-socket-address.h', 'ipv6-address.h', 'ipv6-header.h', - 'ipv4-raw-socket-factory.h', + 'ipv6-interface-address.h', + 'ipv6-route.h', + 'ipv6.h', + 'ipv6-raw-socket-factory.h', + 'ipv6-routing-protocol.h', ] diff --git a/src/routing/list-routing/ipv6-list-routing.cc b/src/routing/list-routing/ipv6-list-routing.cc new file mode 100644 index 000000000..83748dcdd --- /dev/null +++ b/src/routing/list-routing/ipv6-list-routing.cc @@ -0,0 +1,423 @@ +/* -*- 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/log.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-route.h" +#include "ns3/node.h" +#include "ns3/ipv6-static-routing.h" +#include "ipv6-list-routing.h" + +NS_LOG_COMPONENT_DEFINE ("Ipv6ListRouting"); + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (Ipv6ListRouting); + +TypeId +Ipv6ListRouting::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::Ipv6ListRouting") + .SetParent () + .AddConstructor () + ; + return tid; +} + + +Ipv6ListRouting::Ipv6ListRouting () + : m_ipv6 (0) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Ipv6ListRouting::~Ipv6ListRouting () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void +Ipv6ListRouting::DoDispose (void) +{ + NS_LOG_FUNCTION_NOARGS (); + for (Ipv6RoutingProtocolList::iterator rprotoIter = m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); rprotoIter++) + { + // Note: Calling dispose on these protocols causes memory leak + // The routing protocols should not maintain a pointer to + // this object, so Dispose () shouldn't be necessary. + (*rprotoIter).second = 0; + } + m_routingProtocols.clear (); + m_ipv6 = 0; +} + +Ptr +Ipv6ListRouting::RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, enum Socket::SocketErrno &sockerr) +{ + NS_LOG_FUNCTION (this << header.GetDestinationAddress () << header.GetSourceAddress () << oif); + Ptr route; + + for (Ipv6RoutingProtocolList::const_iterator i = m_routingProtocols.begin (); + i != m_routingProtocols.end (); i++) + { + NS_LOG_LOGIC ("Checking protocol " << (*i).second->GetInstanceTypeId () << " with priority " << (*i).first); + NS_LOG_LOGIC ("Requesting source address for destination " << header.GetDestinationAddress ()); + route = (*i).second->RouteOutput (p, header, oif, sockerr); + if (route) + { + NS_LOG_LOGIC ("Found route " << route); + sockerr = Socket::ERROR_NOTERROR; + return route; + } + } + NS_LOG_LOGIC ("Done checking " << GetTypeId ()); + NS_LOG_LOGIC (""); + sockerr = Socket::ERROR_NOROUTETOHOST; + return 0; +} + +// Patterned after Linux ip_route_input and ip_route_input_slow +bool +Ipv6ListRouting::RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) +{ + bool retVal = false; + NS_LOG_FUNCTION (p << header << idev); + NS_LOG_LOGIC ("RouteInput logic for node: " << m_ipv6->GetObject ()->GetId ()); + + NS_ASSERT (m_ipv6 != 0); + // Check if input device supports IP + NS_ASSERT (m_ipv6->GetInterfaceForDevice (idev) >= 0); + uint32_t iif = m_ipv6->GetInterfaceForDevice (idev); + Ipv6Address dst = header.GetDestinationAddress (); + + // Multicast recognition; handle local delivery here + // + if (dst.IsMulticast ()) + { +#ifdef NOTYET + if (m_ipv6->MulticastCheckGroup (iif, dst)) +#endif + if (true) + { + NS_LOG_LOGIC ("Multicast packet for me-- local deliver"); + Ptr packetCopy = p->Copy (); + // Here may want to disable lcb callback in recursive RouteInput + // call below + lcb (packetCopy, header, iif); + // Fall through-- we may also need to forward this + retVal = true; + } + + /* do not forward link-local multicast address */ + if (dst == Ipv6Address::GetAllNodesMulticast () || dst == Ipv6Address::GetAllRoutersMulticast () || dst == Ipv6Address::GetAllHostsMulticast ()) + { + return retVal; + } + + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + NS_LOG_LOGIC ("Multicast packet for me-- trying to forward"); + if ((*rprotoIter).second->RouteInput (p, header, idev, ucb, mcb, lcb, ecb)) + { + retVal = true; + } + } + return retVal; + } + + // TODO: Configurable option to enable RFC 1222 Strong End System Model + // Right now, we will be permissive and allow a source to send us + // a packet to one of our other interface addresses; that is, the + // destination unicast address does not match one of the iif addresses, + // but we check our other interfaces. This could be an option + // (to remove the outer loop immediately below and just check iif). + for (uint32_t j = 0; j < m_ipv6->GetNInterfaces (); j++) + { + for (uint32_t i = 0; i < m_ipv6->GetNAddresses (j); i++) + { + Ipv6InterfaceAddress iaddr = m_ipv6->GetAddress (j, i); + Ipv6Address addr = iaddr.GetAddress (); + if (addr.IsEqual (header.GetDestinationAddress ())) + { + if (j == iif) + { + NS_LOG_LOGIC ("For me (destination " << addr << " match)"); + } + else + { + NS_LOG_LOGIC ("For me (destination " << addr << " match) on another interface " << header.GetDestinationAddress ()); + } + lcb (p, header, iif); + return true; + } + NS_LOG_LOGIC ("Address "<< addr << " not a match"); + } + } + // Check if input device supports IP forwarding + if (m_ipv6->IsForwarding (iif) == false) + { + NS_LOG_LOGIC ("Forwarding disabled for this interface"); + ecb (p, header, Socket::ERROR_NOROUTETOHOST); + return false; + } + // Next, try to find a route + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + if ((*rprotoIter).second->RouteInput (p, header, idev, ucb, mcb, lcb, ecb)) + { + return true; + } + } + // No routing protocol has found a route. + return retVal; +} + +void +Ipv6ListRouting::NotifyInterfaceUp (uint32_t interface) +{ + NS_LOG_FUNCTION (this << interface); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyInterfaceUp (interface); + } +} +void +Ipv6ListRouting::NotifyInterfaceDown (uint32_t interface) +{ + NS_LOG_FUNCTION (this << interface); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyInterfaceDown (interface); + } +} +void +Ipv6ListRouting::NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) +{ + NS_LOG_FUNCTION (this << interface << address); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyAddAddress (interface, address); + } +} +void +Ipv6ListRouting::NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) +{ + NS_LOG_FUNCTION (this << interface << address); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyRemoveAddress (interface, address); + } +} + +void Ipv6ListRouting::NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + NS_LOG_FUNCTION (this << dst << mask << nextHop << interface); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyAddRoute (dst, mask, nextHop, interface, prefixToUse); + } +} + +void Ipv6ListRouting::NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface) +{ + NS_LOG_FUNCTION (this << dst << mask << nextHop << interface); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->NotifyRemoveRoute (dst, mask, nextHop, interface); + } +} + +void +Ipv6ListRouting::SetIpv6 (Ptr ipv6) +{ + NS_LOG_FUNCTION (this << ipv6); + NS_ASSERT (m_ipv6 == 0); + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = + m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); + rprotoIter++) + { + (*rprotoIter).second->SetIpv6 (ipv6); + } + m_ipv6 = ipv6; +} + +void +Ipv6ListRouting::AddRoutingProtocol (Ptr routingProtocol, int16_t priority) +{ + NS_LOG_FUNCTION (this << routingProtocol->GetInstanceTypeId () << priority); + m_routingProtocols.push_back (std::make_pair (priority, routingProtocol)); + m_routingProtocols.sort ( Compare ); + if (m_ipv6 != 0) + { + routingProtocol->SetIpv6 (m_ipv6); + } +} + +uint32_t +Ipv6ListRouting::GetNRoutingProtocols (void) const +{ + NS_LOG_FUNCTION (this); + return m_routingProtocols.size (); +} + +Ptr +Ipv6ListRouting::GetRoutingProtocol (uint32_t index, int16_t& priority) const +{ + NS_LOG_FUNCTION (index); + if (index > m_routingProtocols.size ()) + { + NS_FATAL_ERROR ("Ipv6ListRouting::GetRoutingProtocol (): index " << index << " out of range"); + } + uint32_t i = 0; + for (Ipv6RoutingProtocolList::const_iterator rprotoIter = m_routingProtocols.begin (); + rprotoIter != m_routingProtocols.end (); rprotoIter++, i++) + { + if (i == index) + { + priority = (*rprotoIter).first; + return (*rprotoIter).second; + } + } + return 0; +} + +bool +Ipv6ListRouting::Compare (const Ipv6RoutingProtocolEntry& a, const Ipv6RoutingProtocolEntry& b) +{ + return a.first > b.first; +} + + +} // namespace ns3 + +#ifdef RUN_SELF_TESTS + +#include "ns3/test.h" +#include "ipv6-list-routing.h" +#include "ns3/ipv6-routing-protocol.h" + +namespace ns3 { + +class Ipv6ARouting : public Ipv6RoutingProtocol { +public: + Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} + void NotifyInterfaceUp (uint32_t interface) {} + void NotifyInterfaceDown (uint32_t interface) {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface) {} + void SetIpv6 (Ptr ipv6) {} +}; + +class Ipv6BRouting : public Ipv6RoutingProtocol { +public: + Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} + void NotifyInterfaceUp (uint32_t interface) {} + void NotifyInterfaceDown (uint32_t interface) {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface) {} + void SetIpv6 (Ptr ipv6) {} +}; + +class Ipv6ListRoutingTest: public Test { +public: + virtual bool RunTests (void); + Ipv6ListRoutingTest (); +}; + +Ipv6ListRoutingTest::Ipv6ListRoutingTest () + : Test ("Ipv6ListRouting") {} + +bool +Ipv6ListRoutingTest::RunTests (void) +{ + bool result = true; + Ptr lr = CreateObject (); + Ptr aRouting = CreateObject (); + Ptr bRouting = CreateObject (); + // The Ipv6ARouting should be added with higher priority (larger integer + // value) and will be fetched first below + lr->AddRoutingProtocol (aRouting, 10); + lr->AddRoutingProtocol (bRouting, 5); + int16_t first = 3; + int16_t second = 3; + uint32_t num = lr->GetNRoutingProtocols (); + NS_TEST_ASSERT_EQUAL (num, 2); + Ptr firstRp = lr->GetRoutingProtocol (0, first); + NS_TEST_ASSERT_EQUAL (10, first); + NS_TEST_ASSERT_EQUAL (firstRp, aRouting); + Ptr secondRp = lr->GetRoutingProtocol (1, second); + NS_TEST_ASSERT_EQUAL (5, second); + NS_TEST_ASSERT_EQUAL (secondRp, bRouting); + + // Test negative values + lr = CreateObject (); + // The Ipv6BRouting should be added with higher priority (larger integer value) + lr->AddRoutingProtocol (aRouting, -10); + lr->AddRoutingProtocol (bRouting, -5); + num = lr->GetNRoutingProtocols (); + NS_TEST_ASSERT_EQUAL (num, 2); + firstRp = lr->GetRoutingProtocol (0, first); + NS_TEST_ASSERT_EQUAL (-5, first); + NS_TEST_ASSERT_EQUAL (firstRp, bRouting); + + return result; +} + +static Ipv6ListRoutingTest gIpv6ListRoutingTest; + +} // namespace ns3 + +#endif /* RUN_SELF_TESTS */ diff --git a/src/routing/list-routing/ipv6-list-routing.h b/src/routing/list-routing/ipv6-list-routing.h new file mode 100644 index 000000000..54fd4b0a4 --- /dev/null +++ b/src/routing/list-routing/ipv6-list-routing.h @@ -0,0 +1,105 @@ +/* -*- 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 IPV6_LIST_ROUTING_H +#define IPV6_LIST_ROUTING_H + +#include +#include "ns3/ipv6-routing-protocol.h" + +namespace ns3 { + +/** + * \ingroup routing + * \defgroup ipv6ListRouting Ipv6 List Routing + */ +/** + * \ingroup ipv6ListRouting + * + * This class is a specialization of Ipv6RoutingProtocol that allows + * other instances of Ipv6RoutingProtocol to be inserted in a + * prioritized list. Routing protocols in the list are consulted one + * by one, from highest to lowest priority, until a routing protocol + * is found that will take the packet (this corresponds to a non-zero + * return value to RouteOutput, or a return value of true to RouteInput). + * The order by which routing protocols with the same priority value + * are consulted is undefined. + * + */ +class Ipv6ListRouting : public Ipv6RoutingProtocol +{ +public: + static TypeId GetTypeId (void); + + Ipv6ListRouting (); + 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 routingProtocol, int16_t priority); + /** + * \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) + * 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 + */ + virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; + + // Below are from Ipv6RoutingProtocol + virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr); + + virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr 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, Ipv6InterfaceAddress address); + virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address); + virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); + virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface); + virtual void SetIpv6 (Ptr ipv6); + +protected: + void DoDispose (void); +private: + typedef std::pair > Ipv6RoutingProtocolEntry; + typedef std::list Ipv6RoutingProtocolList; + Ipv6RoutingProtocolList m_routingProtocols; + static bool Compare (const Ipv6RoutingProtocolEntry& a, const Ipv6RoutingProtocolEntry& b); + Ptr m_ipv6; + +}; + +} //namespace ns3 + +#endif /* IPV6_LIST_ROUTING_H */ + diff --git a/src/routing/list-routing/wscript b/src/routing/list-routing/wscript index 870c94a07..9829768de 100644 --- a/src/routing/list-routing/wscript +++ b/src/routing/list-routing/wscript @@ -4,10 +4,12 @@ def build(bld): module = bld.create_ns3_module('list-routing', ['node']) module.source = [ 'ipv4-list-routing.cc', + 'ipv6-list-routing.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'list-routing' headers.source = [ 'ipv4-list-routing.h', + 'ipv6-list-routing.h', ] diff --git a/src/routing/static-routing/ipv6-routing-table-entry.cc b/src/routing/static-routing/ipv6-routing-table-entry.cc new file mode 100644 index 000000000..157fc9714 --- /dev/null +++ b/src/routing/static-routing/ipv6-routing-table-entry.cc @@ -0,0 +1,331 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ipv6-routing-table-entry.h" +#include "ns3/assert.h" + +namespace ns3 +{ + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry () +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const& route) + : m_dest (route.m_dest), + m_destNetworkPrefix (route.m_destNetworkPrefix), + m_gateway (route.m_gateway), + m_interface (route.m_interface), + m_prefixToUse (route.m_prefixToUse) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const* route) + : m_dest (route->m_dest), + m_destNetworkPrefix (route->m_destNetworkPrefix), + m_gateway (route->m_gateway), + m_interface (route->m_interface), + m_prefixToUse (route->m_prefixToUse) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Address gateway, uint32_t interface) + : m_dest (dest), + m_destNetworkPrefix (Ipv6Prefix::GetZero ()), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address dest, uint32_t interface) + : m_dest (dest), + m_destNetworkPrefix (Ipv6Prefix (128)), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse) + : m_dest (network), + m_destNetworkPrefix (networkPrefix), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (prefixToUse) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address gateway, uint32_t interface) + : m_dest (network), + m_destNetworkPrefix (networkPrefix), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (Ipv6Address::GetZero ()) +{ +} + + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface, Ipv6Address prefixToUse) + : m_dest (network), + m_destNetworkPrefix (networkPrefix), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (prefixToUse) +{ +} + +Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface) + : m_dest (network), + m_destNetworkPrefix (networkPrefix), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) +{ +} + +Ipv6RoutingTableEntry::~Ipv6RoutingTableEntry () +{ +} + +bool Ipv6RoutingTableEntry::IsHost () const +{ + static Ipv6Prefix prefix (128); + if (m_destNetworkPrefix.IsEqual (prefix)) + { + return true; + } + return false; +} + +Ipv6Address Ipv6RoutingTableEntry::GetDest () const +{ + return m_dest; +} + +Ipv6Address Ipv6RoutingTableEntry::GetPrefixToUse () const +{ + return m_prefixToUse; +} + +void Ipv6RoutingTableEntry::SetPrefixToUse (Ipv6Address prefix) +{ + m_prefixToUse = prefix; +} + +bool Ipv6RoutingTableEntry::IsNetwork () const +{ + return !IsHost (); +} + +bool Ipv6RoutingTableEntry::IsDefault () const +{ + if (m_dest.IsEqual (Ipv6Address::GetZero ())) + { + return true; + } + return false; +} + +Ipv6Address Ipv6RoutingTableEntry::GetDestNetwork () const +{ + return m_dest; +} + +Ipv6Prefix Ipv6RoutingTableEntry::GetDestNetworkPrefix () const +{ + return m_destNetworkPrefix; +} + +bool Ipv6RoutingTableEntry::IsGateway () const +{ + if (m_gateway.IsEqual (Ipv6Address::GetZero ())) + { + return false; + } + return true; +} + +Ipv6Address Ipv6RoutingTableEntry::GetGateway () const +{ + return m_gateway; +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + return Ipv6RoutingTableEntry (dest, Ipv6Prefix (128), nextHop, interface, prefixToUse); +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateHostRouteTo (Ipv6Address dest, uint32_t interface) +{ + return Ipv6RoutingTableEntry (dest, interface); +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface) +{ + return Ipv6RoutingTableEntry (network, networkPrefix, nextHop, interface); +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + return Ipv6RoutingTableEntry (network, networkPrefix, nextHop, interface, prefixToUse); +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface) +{ + return Ipv6RoutingTableEntry (network, networkPrefix, interface, network); +} + +Ipv6RoutingTableEntry Ipv6RoutingTableEntry::CreateDefaultRoute (Ipv6Address nextHop, uint32_t interface) +{ + return Ipv6RoutingTableEntry (Ipv6Address::GetZero (), nextHop, interface); +} + +uint32_t Ipv6RoutingTableEntry::GetInterface () const +{ + return m_interface; +} + +std::ostream& operator<< (std::ostream& os, Ipv6RoutingTableEntry const& route) +{ + if (route.IsDefault ()) + { + NS_ASSERT (route.IsGateway ()); + os << "default out =" << route.GetInterface () << ", next hop =" << route.GetGateway (); + } + else if (route.IsHost ()) + { + if (route.IsGateway ()) + { + os << "host ="<< route.GetDest () << + ", out =" << route.GetInterface () << + ", next hop =" << route.GetGateway (); + } + else + { + os << "host =" << route.GetDest () << + ", out =" << route.GetInterface (); + } + } + else if (route.IsNetwork ()) + { + if (route.IsGateway ()) + { + os << "network =" << route.GetDestNetwork () << + ", mask =" << route.GetDestNetworkPrefix () << + ",out =" << route.GetInterface () << + ", next hop =" << route.GetGateway (); + } + else + { + os << "network =" << route.GetDestNetwork () << + ", mask =" << route.GetDestNetworkPrefix () << + ",out =" << route.GetInterface (); + } + } + else + { + NS_ASSERT (false); + } + return os; +} + +Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry () +{ +} + +Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const & route) + : m_origin (route.m_origin), + m_group (route.m_group), + m_inputInterface (route.m_inputInterface), + m_outputInterfaces (route.m_outputInterfaces) +{ +} + +Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const* route) + : m_origin (route->m_origin), + m_group (route->m_group), + m_inputInterface (route->m_inputInterface), + m_outputInterfaces (route->m_outputInterfaces) +{ +} + +Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces) + : m_origin (origin), + m_group (group), + m_inputInterface (inputInterface), + m_outputInterfaces (outputInterfaces) +{ +} + +Ipv6Address Ipv6MulticastRoutingTableEntry::GetOrigin () const +{ + return m_origin; +} + +Ipv6Address Ipv6MulticastRoutingTableEntry::GetGroup () const +{ + return m_group; +} + +uint32_t Ipv6MulticastRoutingTableEntry::GetInputInterface () const +{ + return m_inputInterface; +} + +uint32_t Ipv6MulticastRoutingTableEntry::GetNOutputInterfaces () const +{ + return m_outputInterfaces.size (); +} + +uint32_t Ipv6MulticastRoutingTableEntry::GetOutputInterface (uint32_t n) const +{ + NS_ASSERT_MSG (n < m_outputInterfaces.size (), "Ipv6MulticastRoutingTableEntry::GetOutputInterface () : index out of bounds"); + + return m_outputInterfaces[n]; +} + +std::vector Ipv6MulticastRoutingTableEntry::GetOutputInterfaces () const +{ + return m_outputInterfaces; +} + +Ipv6MulticastRoutingTableEntry Ipv6MulticastRoutingTableEntry::CreateMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces) +{ + return Ipv6MulticastRoutingTableEntry (origin, group, inputInterface, outputInterfaces); +} + +std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoutingTableEntry const& route) +{ + os << "origin =" << route.GetOrigin () << + ", group =" << route.GetGroup () << + ", input interface =" << route.GetInputInterface () << + ", output interfaces ="; + + for (uint32_t i = 0; i < route.GetNOutputInterfaces (); ++i) + { + os << route.GetOutputInterface (i) << " "; + } + + return os; +} + +} /* namespace ns3 */ + diff --git a/src/routing/static-routing/ipv6-routing-table-entry.h b/src/routing/static-routing/ipv6-routing-table-entry.h new file mode 100644 index 000000000..ba20c81b7 --- /dev/null +++ b/src/routing/static-routing/ipv6-routing-table-entry.h @@ -0,0 +1,372 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_ROUTING_TABLE_ENTRY_H +#define IPV6_ROUTING_TABLE_ENTRY_H + +#include +#include +#include + +#include "ns3/ipv6-address.h" + +namespace ns3 +{ + +/** + * \class Ipv6RoutingTableEntry + * \brief A record of an IPv6 route. + */ +class Ipv6RoutingTableEntry +{ + public: + /** + * \brief Constructor. + */ + Ipv6RoutingTableEntry (); + + /** + * \brief Copy constructor. + * \param route the route to copy + */ + Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const & route); + + /** + * \brief Copy constructor. + * \param route the route to copy + */ + Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const* route); + + /** + * \brief Destructor + */ + ~Ipv6RoutingTableEntry (); + + /** + * \brief Is the route entry correspond to a host ? + * \return true if the route is a host, false otherwise + */ + bool IsHost () const; + + /** + * \brief Get the destination. + * \return the IPv6 address of the destination of this route + */ + Ipv6Address GetDest () const; + + /** + * \brief Get the prefix to use (for multihomed link). + * \return prefix address to use + */ + Ipv6Address GetPrefixToUse () const; + + /** + * \brief Set the prefix to use. + * \param prefix prefix to use + */ + void SetPrefixToUse (Ipv6Address prefix); + + /** + * \brief Is the route entry correspond to a network ? + * \return true if the route is a network, false otherwise + */ + bool IsNetwork () const; + + /** + * \brief Get the destination network. + * \return the destination network + */ + Ipv6Address GetDestNetwork () const; + + /** + * \brief Get the destination prefix. + * \return the destination prefix + */ + Ipv6Prefix GetDestNetworkPrefix () const; + + /** + * \brief Is it the default route ? + * \return true if this route is a default route, false otherwise + */ + bool IsDefault () const; + + /** + * \brief Is it the gateway ? + * \return true if this route is a gateway, false otherwise + */ + bool IsGateway () const; + + /** + * \brief Get the gateway. + * \return the IPv6 address of the gateway + */ + Ipv6Address GetGateway () const; + + /** + * \brief Get the interface index. + * \return the index of the interface + */ + uint32_t GetInterface () const; + + /** + * \brief Create a route to a host. + * \param dest destination address + * \param nextHop next hop address to route the packet + * \param interface interface index + * \param prefixToUse prefix that should be used for source address for this destination + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address ()); + + /** + * \brief Create a route to a host. + * \param dest destination address + * \param interface interface index + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateHostRouteTo (Ipv6Address dest, uint32_t interface); + + /** + * \brief Create a route to a network. + * \param network network address + * \param networkPrefix network prefix + * \param nextHop next hop address to route the packet + * \param interface interface index + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface); + + /** + * \brief Create a route to a network. + * \param network network address + * \param networkPrefix network prefix + * \param nextHop next hop address to route the packet + * \param interface interface index + * \param prefixToUse prefix that should be used for source address for this destination + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse); + + /** + * \brief Create a route to a network. + * \param network network address + * \param networkPrefix network prefix + * \param interface interface index + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface); + + /** + * \brief Create a default route. + * \param nextHop next hop address to route the packet + * \param interface interface index + * \return IPv6Route object + */ + static Ipv6RoutingTableEntry CreateDefaultRoute (Ipv6Address nextHop, uint32_t interface); + + private: + /** + * \brief Constructor. + * \param network network address + * \param prefix network prefix + * \param gateway the gateway + * \param interface the interface index + */ + Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface); + + /** + * \brief Constructor. + * \param network network address + * \param prefix network prefix + * \param interface the interface index + * \param prefixToUse prefix to use + */ + Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, uint32_t interface, Ipv6Address prefixToUse); + + /** + * \brief Constructor. + * \param network network address + * \param prefix network prefix + * \param gateway the gateway + * \param interface the interface index + * \param prefixToUse prefix to use + */ + Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse); + + /** + * \brief Constructor. + * \param dest destination address + * \param prefix destiation prefix + * \param interface interface index + */ + Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Prefix prefix, uint32_t interface); + + /** + * \brief Constructor. + * \param dest destination address + * \param gateway the gateway + * \param interface interface index + */ + Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Address gateway, uint32_t interface); + + /** + * \brief Constructor. + * \param dest destination address + * \param interface interface index + */ + Ipv6RoutingTableEntry (Ipv6Address dest, uint32_t interface); + + /** + * \brief IPv6 address of the destination. + */ + Ipv6Address m_dest; + + /** + * \brief IPv6 prefix of the destination + */ + Ipv6Prefix m_destNetworkPrefix; + + /** + * \brief IPv6 address of the gateway. + */ + Ipv6Address m_gateway; + + /** + * \brief The interface index. + */ + uint32_t m_interface; + + /** + * \brief Prefix to use. + */ + Ipv6Address m_prefixToUse; + +}; + +std::ostream& operator<< (std::ostream& os, Ipv6RoutingTableEntry const& route); + +/** + * \class Ipv6MulticastRoutingTableEntry + * \brief A record of an IPv6 multicast route. + */ +class Ipv6MulticastRoutingTableEntry +{ + public: + /** + * \brief Constructor. + */ + Ipv6MulticastRoutingTableEntry (); + + /** + * \brief Copy constructor. + * \param route the route to copy + */ + Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const & route); + + /** + * \brief Copy constructor. + * \param route the route to copy + */ + Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const* route); + + /** + * \brief Get the source of this route + * \return IPv6 address of the source of this route + */ + Ipv6Address GetOrigin () const; + + /** + * \brief Get the group. + * \return IPv6 address of the multicast group of this route + */ + Ipv6Address GetGroup () const; + + /** + * \brief Get the input interface address. + * \return input interface index + */ + uint32_t GetInputInterface () const; + + /** + * \brief Get the number of output interfaces of this route. + * \return number of output interfaces of this route. + */ + uint32_t GetNOutputInterfaces () const; + + /** + * \brief Get a specified output interface. + * \param n index + * \return a specified output interface + */ + uint32_t GetOutputInterface (uint32_t n) const; + + /** + * \brief Get all of the output interfaces of this route. + * \return a vector of all output interfaces of this route + */ + std::vector GetOutputInterfaces () const; + + /** + * \brief Create a multicast route. + * \param origin IPv6 address of the origin source + * \param group Ipv6Address of the group + * \param inputInterface interface number + * \param outputInterfaces list of output interface number + * \return a multicast route + */ + static Ipv6MulticastRoutingTableEntry CreateMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces); + + private: + /** + * \brief Constructor. + * \param origin IPv6 address of the source + * \param group IPv6 address of the group + * \param inputInterface interface number + * \param outputInterfaces list of output interface number + */ + Ipv6MulticastRoutingTableEntry (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces); + + /** + * \brief The IPv6 address of the source. + */ + Ipv6Address m_origin; + + /** + * \brief The IPv6 address of the group. + */ + Ipv6Address m_group; + + /** + * \brief The input interface. + */ + uint32_t m_inputInterface; + + /** + * \brief The output interfaces. + */ + std::vector m_outputInterfaces; +}; + +std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoutingTableEntry const& route); + +} /* namespace ns3 */ + +#endif /* IPV6_ROUTING_TABLE_ENTRY_H */ + diff --git a/src/routing/static-routing/ipv6-static-routing.cc b/src/routing/static-routing/ipv6-static-routing.cc new file mode 100644 index 000000000..1c8937f0b --- /dev/null +++ b/src/routing/static-routing/ipv6-static-routing.cc @@ -0,0 +1,793 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#include "ns3/log.h" +#include "ns3/packet.h" +#include "ns3/ipv6-route.h" +#include "ns3/net-device.h" + +#include "ipv6-static-routing.h" +#include "ipv6-routing-table-entry.h" + +namespace ns3 +{ + +NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRouting"); + +TypeId Ipv6StaticRouting::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::Ipv6StaticRouting") + .SetParent () + .AddConstructor () + ; + return tid; +} + +Ipv6StaticRouting::Ipv6StaticRouting () + : m_defaultRoute (0), + m_ipv6 (0) +{ + NS_LOG_FUNCTION_NOARGS (); +} + +Ipv6StaticRouting::~Ipv6StaticRouting () +{ + NS_LOG_FUNCTION_NOARGS (); +} + +void Ipv6StaticRouting::SetIpv6 (Ptr ipv6) +{ + NS_LOG_FUNCTION (this << ipv6); + NS_ASSERT (m_ipv6 == 0 && ipv6 != 0); + uint32_t i = 0; + m_ipv6 = ipv6; + + for (i = 0 ; i < m_ipv6->GetNInterfaces () ; i++) + { + if (m_ipv6->IsUp (i)) + { + NotifyInterfaceUp (i); + } + else + { + NotifyInterfaceDown (i); + } + } +} + +void Ipv6StaticRouting::AddHostRouteTo (Ipv6Address dst, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + NS_LOG_FUNCTION (this << dst << nextHop << interface << prefixToUse); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateHostRouteTo (dst, nextHop, interface, prefixToUse); + m_hostRoutes.push_back (route); +} + +void Ipv6StaticRouting::AddHostRouteTo (Ipv6Address dst, uint32_t interface) +{ + NS_LOG_FUNCTION (this << dst << interface); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateHostRouteTo (dst, interface); + m_hostRoutes.push_back (route); +} + +void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface) +{ + NS_LOG_FUNCTION (this << network << networkPrefix << nextHop << interface); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkPrefix, nextHop, interface); + m_networkRoutes.push_back (route); +} + +void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + NS_LOG_FUNCTION (this << network << networkPrefix << nextHop << interface << prefixToUse); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkPrefix, nextHop, interface, prefixToUse); + m_networkRoutes.push_back (route); +} + + +void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface) +{ + NS_LOG_FUNCTION (this << network << networkPrefix << interface); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkPrefix, interface); + m_networkRoutes.push_back (route); +} + +void Ipv6StaticRouting::SetDefaultRoute (Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + NS_LOG_FUNCTION (this << nextHop << interface << prefixToUse); + Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry (); + *route = Ipv6RoutingTableEntry::CreateDefaultRoute (nextHop, interface); + route->SetPrefixToUse (prefixToUse); + delete m_defaultRoute; + m_defaultRoute = route; +} + +void Ipv6StaticRouting::RemoveDefaultRoute () +{ + NS_LOG_FUNCTION_NOARGS (); + if (m_defaultRoute) + { + delete m_defaultRoute; + m_defaultRoute = 0; + } +} + +void Ipv6StaticRouting::AddMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces) +{ + NS_LOG_FUNCTION (this << origin << group << inputInterface); + Ipv6MulticastRoutingTableEntry* route = new Ipv6MulticastRoutingTableEntry (); + *route = Ipv6MulticastRoutingTableEntry::CreateMulticastRoute (origin, group, inputInterface, outputInterfaces); + m_multicastRoutes.push_back (route); +} + +void Ipv6StaticRouting::SetDefaultMulticastRoute (uint32_t outputInterface) +{ + NS_LOG_FUNCTION (this << outputInterface); + Ipv6RoutingTableEntry *route = new Ipv6RoutingTableEntry (); + Ipv6Address network = Ipv6Address ("ff00::"); /* RFC 3513 */ + Ipv6Prefix networkMask = Ipv6Prefix (8); + *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkMask, outputInterface); + m_networkRoutes.push_back (route); +} + +uint32_t Ipv6StaticRouting::GetNMulticastRoutes () const +{ + NS_LOG_FUNCTION_NOARGS (); + return m_multicastRoutes.size (); +} + +Ipv6MulticastRoutingTableEntry Ipv6StaticRouting::GetMulticastRoute (uint32_t index) const +{ + NS_LOG_FUNCTION (this << index); + NS_ASSERT_MSG (index < m_multicastRoutes.size (), "Ipv6StaticRouting::GetMulticastRoute () : Index out of range"); + + if (index < m_multicastRoutes.size ()) + { + uint32_t tmp = 0; + for (MulticastRoutesCI i = m_multicastRoutes.begin () ; i != m_multicastRoutes.end () ; i++) + { + if (tmp == index) + { + return *i; + } + tmp++; + } + } + return 0; +} + +bool Ipv6StaticRouting::RemoveMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface) +{ + NS_LOG_FUNCTION (this << origin << group << inputInterface); + for (MulticastRoutesI i = m_multicastRoutes.begin (); i != m_multicastRoutes.end (); i++) + { + Ipv6MulticastRoutingTableEntry *route = *i; + if (origin == route->GetOrigin () && + group == route->GetGroup () && + inputInterface == route->GetInputInterface ()) + { + delete *i; + m_multicastRoutes.erase (i); + return true; + } + } + return false; +} + +void Ipv6StaticRouting::RemoveMulticastRoute (uint32_t index) +{ + NS_LOG_FUNCTION (this << index); + uint32_t tmp = 0; + + for (MulticastRoutesI i = m_multicastRoutes.begin () ; i != m_multicastRoutes.end () ; i++) + { + if (tmp == index) + { + delete *i; + m_multicastRoutes.erase (i); + return; + } + tmp++; + } +} + +bool Ipv6StaticRouting::HasNetworkDest (Ipv6Address network, uint32_t interfaceIndex) +{ + NS_LOG_FUNCTION (this << network << interfaceIndex); + + /* in the network table */ + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j++) + { + NS_ASSERT ((*j)->IsNetwork ()); + Ipv6Prefix prefix = (*j)->GetDestNetworkPrefix (); + Ipv6Address entry = (*j)->GetDestNetwork (); + + if (prefix.IsMatch (network, entry) && (*j)->GetInterface () == interfaceIndex) + { + return true; + } + } + + /* beuh!!! not route at all */ + return false; +} + +Ptr Ipv6StaticRouting::LookupStatic (Ipv6Address dst, uint32_t interface) +{ + NS_LOG_FUNCTION (this << dst << interface); + Ptr rtentry = 0; + + /* when sending on link-local multicast, there have to be interface specified */ + if (dst == Ipv6Address::GetAllNodesMulticast () || dst.IsSolicitedMulticast () || + dst == Ipv6Address::GetAllRoutersMulticast () || dst == Ipv6Address::GetAllHostsMulticast ()) + { + NS_ASSERT_MSG (interface > 0, "Try to send on link-local multicast address, and no interface index is given!"); + rtentry = Create (); + rtentry->SetSource (SourceAddressSelection (interface, dst)); + rtentry->SetDestination (dst); + rtentry->SetGateway (Ipv6Address::GetZero ()); + rtentry->SetOutputDevice (m_ipv6->GetNetDevice (interface)); + return rtentry; + } + + /* is the destination in hosts table */ + for (HostRoutesCI i = m_hostRoutes.begin () ; i != m_hostRoutes.end () ; i++) + { + NS_ASSERT ((*i)->IsHost ()); + if ((*i)->GetDest ().IsEqual (dst)) + { + if (!interface || interface == (*i)->GetInterface ()) + { + NS_LOG_LOGIC ("Found global host route " << *i); + Ipv6RoutingTableEntry* route = (*i); + rtentry = Create (); + uint32_t interfaceIdx = route->GetInterface (); + rtentry->SetDestination (route->GetDest ()); + + if (route->GetGateway ().IsAny ()) + { + rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetDest ())); + } + else + { + rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetGateway ())); + } + + rtentry->SetGateway (route->GetGateway ()); + rtentry->SetOutputDevice (m_ipv6->GetNetDevice (interfaceIdx)); + return rtentry; + } + } + } + + /* or in the network table */ + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j++) + { + NS_ASSERT ((*j)->IsNetwork ()); + Ipv6Prefix prefix = (*j)->GetDestNetworkPrefix (); + Ipv6Address entry = (*j)->GetDestNetwork (); + + if (prefix.IsMatch (dst, entry)) + { + /* if interface is given, check the route will output on this interface */ + if (!interface || interface == (*j)->GetInterface ()) + { + NS_LOG_LOGIC ("Found global network route " << *j); + Ipv6RoutingTableEntry* route = (*j); + rtentry = Create(); + uint32_t interfaceIdx = route->GetInterface (); + rtentry->SetDestination (route->GetDest ()); + + if (route->GetGateway ().IsAny ()) + { + rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetDest ())); + } + else + { + rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetGateway ())); + } + + rtentry->SetGateway (route->GetGateway ()); + rtentry->SetOutputDevice (m_ipv6->GetNetDevice (interfaceIdx)); + return rtentry; + } + } + } + + /* not found, return the default route if any */ + if (m_defaultRoute != 0) + { + NS_ASSERT (m_defaultRoute->IsDefault ()); + NS_LOG_LOGIC ("Found global network route via default route " << m_defaultRoute); + Ipv6RoutingTableEntry* route = m_defaultRoute; + rtentry = Create(); + uint32_t interfaceIdx = route->GetInterface (); + rtentry->SetDestination (route->GetDest ()); + rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetPrefixToUse ().IsAny () ? route->GetGateway () : route->GetPrefixToUse ())); + rtentry->SetGateway (route->GetGateway ()); + rtentry->SetOutputDevice (m_ipv6->GetNetDevice (interfaceIdx)); + return rtentry; + } + + /* beuh!!! not route at all */ + return 0; +} + +void Ipv6StaticRouting::DoDispose () +{ + NS_LOG_FUNCTION_NOARGS (); + for (HostRoutesI i = m_hostRoutes.begin () ; i != m_hostRoutes.end () ; i = m_hostRoutes.erase (i)) + { + delete (*i); + } + m_hostRoutes.clear (); + + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j = m_networkRoutes.erase (j)) + { + delete (*j); + } + m_networkRoutes.clear (); + + if (m_defaultRoute != 0) + { + delete m_defaultRoute; + m_defaultRoute = 0; + } + + for (MulticastRoutesI i = m_multicastRoutes.begin () ; i != m_multicastRoutes.end () ; i = m_multicastRoutes.erase (i)) + { + delete (*i); + } + m_multicastRoutes.clear (); + + m_ipv6 = 0; + Ipv6RoutingProtocol::DoDispose (); +} + +Ptr Ipv6StaticRouting::LookupStatic (Ipv6Address origin, Ipv6Address group, uint32_t interface) +{ + NS_LOG_FUNCTION (this << origin << group << interface); + Ptr mrtentry = 0; + + for (MulticastRoutesI i = m_multicastRoutes.begin () ; i != m_multicastRoutes.end () ; i++) + { + Ipv6MulticastRoutingTableEntry* route = *i; + + /* + We've been passed an origin address, a multicast group address and an + interface index. We have to decide if the current route in the list is + a match. + + The first case is the restrictive case where the origin, group and index + matches. This picks up exact routes during forwarded and exact routes from + the local node (in which case the ifIndex is a wildcard). + */ + + if (origin == route->GetOrigin () && group == route->GetGroup ()) + { + /* skipping SSM case */ + NS_LOG_LOGIC ("Find source specific multicast route" << *i); + } + + if (group == route->GetGroup ()) + { + if (interface == Ipv6::IF_ANY || interface == route->GetInputInterface ()) + { + NS_LOG_LOGIC ("Found multicast route" << *i); + mrtentry = Create(); + mrtentry->SetGroup (route->GetGroup ()); + mrtentry->SetOrigin (route->GetOrigin ()); + mrtentry->SetParent (route->GetInputInterface ()); + for (uint32_t j = 0 ; j < route->GetNOutputInterfaces () ; j++) + { + if (route->GetOutputInterface (j)) + { + NS_LOG_LOGIC ("Setting output interface index " << route->GetOutputInterface (j)); + mrtentry->SetOutputTtl (route->GetOutputInterface (j), Ipv6MulticastRoute::MAX_TTL - 1); + } + } + return mrtentry; + } + } + } + return mrtentry; +} + +uint32_t Ipv6StaticRouting::GetNRoutes () +{ + NS_LOG_FUNCTION_NOARGS (); + uint32_t n = 0; + if (m_defaultRoute != 0) + { + n++; + } + n += m_hostRoutes.size (); + n += m_networkRoutes.size (); + return n; +} + +Ipv6RoutingTableEntry Ipv6StaticRouting::GetDefaultRoute () +{ + NS_LOG_FUNCTION_NOARGS (); + if (m_defaultRoute != 0) + { + return *m_defaultRoute; + } + else + { + return Ipv6RoutingTableEntry (); + } +} + +Ipv6RoutingTableEntry Ipv6StaticRouting::GetRoute (uint32_t index) +{ + NS_LOG_FUNCTION (this << index); + + if (index == 0 && m_defaultRoute != 0) + { + return *m_defaultRoute; + } + + if (index > 0 && m_defaultRoute != 0) + { + index--; + } + + if (index < m_hostRoutes.size ()) + { + uint32_t tmp = 0; + for (HostRoutesCI i = m_hostRoutes.begin () ; i != m_hostRoutes.end () ; i++) + { + if (tmp == index) + { + return *i; + } + tmp++; + } + } + + index -= m_hostRoutes.size (); + uint32_t tmp = 0; + + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j++) + { + if (tmp == index) + { + return *j; + } + tmp++; + } + NS_ASSERT (false); + // quiet compiler. + return 0; +} + +void Ipv6StaticRouting::RemoveRoute (uint32_t index) +{ + NS_LOG_FUNCTION (this << index); + if (index == 0 && m_defaultRoute != 0) + { + delete m_defaultRoute; + m_defaultRoute = 0; + } + + if (index > 0 && m_defaultRoute != 0) + { + index--; + } + + if (index < m_hostRoutes.size ()) + { + uint32_t tmp = 0; + for (HostRoutesI i = m_hostRoutes.begin () ; i != m_hostRoutes.end () ; i++) + { + if (tmp == index) + { + delete *i; + m_hostRoutes.erase (i); + return; + } + tmp++; + } + } + index -= m_hostRoutes.size (); + uint32_t tmp = 0; + + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j++) + { + if (tmp == index) + { + delete *j; + m_networkRoutes.erase (j); + return; + } + tmp++; + } + NS_ASSERT (false); +} + +void Ipv6StaticRouting::RemoveRoute (Ipv6Address network, Ipv6Prefix prefix, uint32_t ifIndex) +{ + NS_LOG_FUNCTION (this << network << prefix << ifIndex); + for (NetworkRoutesI i = m_networkRoutes.begin () ; i != m_networkRoutes.end () ; i++) + { + if (network == (*i)->GetDest () and (*i)->GetInterface () == ifIndex) + { + delete *i; + m_networkRoutes.erase (i); + return; + } + } +} + +Ptr Ipv6StaticRouting::RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) +{ + NS_LOG_FUNCTION (this << header << oif); + Ipv6Address destination = header.GetDestinationAddress (); + Ptr rtentry = 0; + + if (destination.IsMulticast ()) + { + // Note: Multicast routes for outbound packets are stored in the + // normal unicast table. An implication of this is that it is not + // possible to source multicast datagrams on multiple interfaces. + // This is a well-known property of sockets implementation on + // many Unix variants. + // So, we just log it and fall through to LookupStatic () + NS_LOG_LOGIC ("RouteOutput ()::Multicast destination"); + } + + rtentry = LookupStatic (destination, oif); + if (rtentry) + { + sockerr = Socket::ERROR_NOTERROR; + } + else + { + sockerr = Socket::ERROR_NOROUTETOHOST; + } + return rtentry; +} + +bool Ipv6StaticRouting::RouteInput (Ptr p, const Ipv6Header &ipHeader, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) +{ + NS_LOG_FUNCTION (this << p << ipHeader << ipHeader.GetSourceAddress () << ipHeader.GetDestinationAddress () << idev); + + if (ipHeader.GetDestinationAddress ().IsMulticast ()) + { + NS_LOG_LOGIC ("Multicast destination"); + Ptr mrtentry = LookupStatic (ipHeader.GetSourceAddress (), + ipHeader.GetDestinationAddress (), m_ipv6->GetInterfaceForDevice (idev)); + + if (mrtentry) + { + NS_LOG_LOGIC ("Multicast route found"); + mcb (mrtentry, p, ipHeader); // multicast forwarding callback + return true; + } + else + { + NS_LOG_LOGIC ("Multicast route not found"); + return false; // Let other routing protocols try to handle this + } + } +// +// This is a unicast packet. Check to see if we have a route for it. +// + NS_LOG_LOGIC ("Unicast destination"); + Ptr rtentry = LookupStatic (ipHeader.GetDestinationAddress ()); + + if (rtentry != 0) + { + NS_LOG_LOGIC ("Found unicast destination- calling unicast callback"); + ucb (rtentry, p, ipHeader); // unicast forwarding callback + return true; + } + else + { + NS_LOG_LOGIC ("Did not find unicast destination- returning false"); + return false; // Let other routing protocols try to handle this + } +} + +void Ipv6StaticRouting::NotifyInterfaceUp (uint32_t i) +{ + for (uint32_t j = 0 ; j < m_ipv6->GetNAddresses (i) ; j++) + { + if (m_ipv6->GetAddress (i, j).GetAddress () != Ipv6Address () && + m_ipv6->GetAddress (i, j).GetPrefix () != Ipv6Prefix ()) + { + if (m_ipv6->GetAddress (i, j).GetPrefix () == Ipv6Prefix (128)) + { + /* host route */ + AddHostRouteTo (m_ipv6->GetAddress (i, j).GetAddress (), i); + } + else + { + AddNetworkRouteTo (m_ipv6->GetAddress (i, j).GetAddress ().CombinePrefix (m_ipv6->GetAddress (i, j).GetPrefix ()), + m_ipv6->GetAddress (i, j).GetPrefix (), i); + } + } + } +} + +void Ipv6StaticRouting::NotifyInterfaceDown (uint32_t i) +{ + /* remove all static routes that are going through this interface */ + for (uint32_t j = 0 ; j < GetNRoutes () ; j++) + { + Ipv6RoutingTableEntry route = GetRoute (j); + + if (route.GetInterface () == i) + { + RemoveRoute (j); + } + } +} + +void Ipv6StaticRouting::NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) +{ + if (!m_ipv6->IsUp (interface)) + { + return; + } + + Ipv6Address networkAddress = address.GetAddress ().CombinePrefix (address.GetPrefix ()); + Ipv6Prefix networkMask = address.GetPrefix (); + + if (address.GetAddress () != Ipv6Address () && address.GetPrefix () != Ipv6Prefix ()) + { + AddNetworkRouteTo (networkAddress, networkMask, interface); + } +} + +void Ipv6StaticRouting::NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) +{ + if (!m_ipv6->IsUp (interface)) + { + return; + } + + Ipv6Address networkAddress = address.GetAddress ().CombinePrefix (address.GetPrefix ()); + Ipv6Prefix networkMask = address.GetPrefix (); + + // Remove all static routes that are going through this interface + // which reference this network + for (uint32_t j = 0 ; j < GetNRoutes () ; j++) + { + Ipv6RoutingTableEntry route = GetRoute (j); + + if (route.GetInterface () == interface && + route.IsNetwork () && + route.GetDestNetwork () == networkAddress && + route.GetDestNetworkPrefix () == networkMask) + { + RemoveRoute (j); + } + } +} + +void Ipv6StaticRouting::NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) +{ + NS_LOG_INFO (this << dst << mask << nextHop << interface << prefixToUse); + if (mask == Ipv6Prefix (128)) + { + AddHostRouteTo (dst, nextHop, interface); + } + else if (dst != Ipv6Address::GetZero ()) + { + AddNetworkRouteTo (dst, mask, nextHop, interface); + } + else /* default route */ + { + /* this case is mainly used by configuring default route following RA processing, + * in case of multipe prefix in RA, the first will configured default route + */ + if (!m_defaultRoute) + { + SetDefaultRoute (nextHop, interface, prefixToUse); + } + } +} + +void Ipv6StaticRouting::NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface) +{ + NS_LOG_FUNCTION (this << dst << mask << nextHop << interface); + if (mask == Ipv6Prefix (128)) + { + for (HostRoutesI j = m_hostRoutes.begin () ; j != m_hostRoutes.end () ; j++) + { + Ipv6Prefix prefix = (*j)->GetDestNetworkPrefix (); + Ipv6Address entry = (*j)->GetDestNetwork (); + + if (dst == entry && prefix == mask && (*j)->GetInterface () == interface) + { + delete (*j); + m_hostRoutes.erase (j); + } + } + } + else if (dst != Ipv6Address::GetZero ()) + { + for (NetworkRoutesI j = m_networkRoutes.begin () ; j != m_networkRoutes.end () ; j++) + { + Ipv6Prefix prefix = (*j)->GetDestNetworkPrefix (); + Ipv6Address entry = (*j)->GetDestNetwork (); + + if (dst == entry && prefix == mask && (*j)->GetInterface () == interface) + { + delete (*j); + m_networkRoutes.erase (j); + } + } + } + else + { + /* default route case */ + if (!m_defaultRoute) + { + return; + } + + if (m_defaultRoute->GetInterface () == interface && m_defaultRoute->GetGateway () == nextHop) + { + NS_LOG_LOGIC ("Remove default route (maybe because autoconfigured address expired)"); + delete m_defaultRoute; + m_defaultRoute = 0; + } + } +} + +Ipv6Address Ipv6StaticRouting::SourceAddressSelection (uint32_t interface, Ipv6Address dest) +{ + NS_LOG_FUNCTION (this << interface << dest); + Ipv6Address ret; + + /* first address of an IPv6 interface is link-local ones */ + ret = m_ipv6->GetAddress (interface, 0).GetAddress (); + + if (dest == Ipv6Address::GetAllNodesMulticast () || dest == Ipv6Address::GetAllRoutersMulticast () || dest == Ipv6Address::GetAllHostsMulticast ()) + { + return ret; + } + + /* useally IPv6 interfaces have one link-local address and one global address */ + + for (uint32_t i = 1 ; i < m_ipv6->GetNAddresses (interface) ; i++) + { + Ipv6InterfaceAddress test = m_ipv6->GetAddress (interface, i); + + if (test.GetAddress ().CombinePrefix (test.GetPrefix ()) == dest.CombinePrefix (test.GetPrefix ())) + { + return test.GetAddress (); + } + } + + return ret; +} + +} /* namespace ns3 */ + diff --git a/src/routing/static-routing/ipv6-static-routing.h b/src/routing/static-routing/ipv6-static-routing.h new file mode 100644 index 000000000..b786a0ff5 --- /dev/null +++ b/src/routing/static-routing/ipv6-static-routing.h @@ -0,0 +1,303 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007-2009 Strasbourg University + * + * 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: Sebastien Vincent + */ + +#ifndef IPV6_STATIC_ROUTING_H +#define IPV6_STATIC_ROUTING_H + +#include +#include + +#include "ns3/ptr.h" +#include "ns3/ipv6-address.h" +#include "ns3/ipv6.h" +#include "ns3/ipv6-header.h" +#include "ns3/ipv6-routing-protocol.h" + +namespace ns3 +{ + +class Packet; +class NetDevice; +class Ipv6Interface; +class Ipv6Route; +class Node; +class Ipv6RoutingTableEntry; +class Ipv6MulticastRoutingTableEntry; + +/** + * \ingroup routing + * \defgroup ipv6StaticRouting Ipv6StaticRouting + * \class Ipv6StaticRouting + * \brief Static routing protocol for IP version 6 stack. + * \see Ipv6RoutingProtocol + * \see Ipv6ListRouting + */ +class Ipv6StaticRouting : public Ipv6RoutingProtocol +{ + public: + /** + * \brief The interface Id associated with this class. + * \return type identificator + */ + static TypeId GetTypeId (); + + /** + * \brief Constructor. + */ + Ipv6StaticRouting (); + + /** + * \brief Destructor. + */ + virtual ~Ipv6StaticRouting (); + + /** + * \brief Add route to host. + * \param dest destination address + * \param nextHop next hop address to route the packet + * \param interface interface index + * \param prefixToUse prefix that should be used for source address for this destination + */ + void AddHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address ("::")); + + /** + * \brief Add route to host. + * \param dest destination address. + * \param interface interface index + */ + void AddHostRouteTo (Ipv6Address dest, uint32_t interface); + + /** + * \brief Add route to network. + * \param network network address + * \param networkPrefix network prefix* + * \param nextHop next hop address to route the packet + * \param interface interface index + */ + void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface); + + /** + * \brief Add route to network. + * \param network network address + * \param networkPrefix network prefix* + * \param nextHop next hop address to route the packet + * \param interface interface index + * \param prefixToUse prefix that should be used for source address for this destination + */ + void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse); + + /** + * \brief Add route to network. + * \param network network address + * \param networkPrefix network prefix + * \param interface interface index + */ + void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface); + + /** + * \brief Set the default route. + * \param nextHop next hop address to route the packet + * \param interface interface index + * \param prefixToUse prefix to use (i.e for multihoming) + */ + void SetDefaultRoute (Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address ("::")); + + /** + * \brief Remove the default route. + */ + void RemoveDefaultRoute (); + + /** + * \brief Get the number or entries in the routing table. + * \return number of entries + */ + uint32_t GetNRoutes (); + + /** + * \brief Get the default route. + * \return default Ipv6Route + */ + Ipv6RoutingTableEntry GetDefaultRoute (); + + /** + * \brief Get a specified route. + * \param i index + * \return the route whose index is i + */ + Ipv6RoutingTableEntry GetRoute (uint32_t i); + + /** + * \brief Remove a route from the routing table. + * \param i index + */ + void RemoveRoute (uint32_t i); + + /** + * \brief Remove a route from the routing table. + * \param network IPv6 network + * \param prefix IPv6 prefix + * \param ifIndex interface index + */ + void RemoveRoute (Ipv6Address network, Ipv6Prefix prefix, uint32_t ifIndex); + + /** + * \brief Add a multicast route for a given multicast source and group. + * \param origin IPv6 address of the source + * \param group the multicast group address. + * \param inputInterface the interface index + * \param outputInterfaces the list of output interface indices over which the packet + * should be sent (excluding the inputInterface). + */ + void AddMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces); + + /** + * \brief Set the default multicast route. + * \param outputInterface default output interface + */ + void SetDefaultMulticastRoute (uint32_t outputInterface); + + /** + * \brief Get the number of entries in the multicast routing table. + * \return number of entries + */ + uint32_t GetNMulticastRoutes () const; + + /** + * \brief Get the specified multicast route. + * \param i index + * \return the route whose index is i + */ + Ipv6MulticastRoutingTableEntry GetMulticastRoute (uint32_t i) const; + + /** + * \brief Get the default multicast IPv6 route. + * \return default Ipv6MulticastRoute + */ + Ipv6MulticastRoutingTableEntry GetDefaultMulticastRoute () const; + + /** + * \brief Remove a static multicast route. + * \param origin IPv6 address of the source + * \param group the multicast group address. + * \param inputInterface the input interface index + */ + bool RemoveMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface); + + /** + * \brief Remove a multicast route. + * \param i index of route to remove + */ + void RemoveMulticastRoute (uint32_t i); + + /** + * \brief If the destination is already present in network destination list. + * \param dest destination address + * \param interfaceIndex interface index + * \return true if dest is already in list, false otherwise + */ + bool HasNetworkDest (Ipv6Address dest, uint32_t interfaceIndex); + + virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr); + + virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr 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, Ipv6InterfaceAddress address); + virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address); + virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); + virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface); + virtual void SetIpv6 (Ptr ipv6); + + protected: + /** + * \brief Dispose this object. + */ + void DoDispose (); + + private: + typedef std::list HostRoutes; + typedef std::list::const_iterator HostRoutesCI; + typedef std::list::iterator HostRoutesI; + typedef std::list NetworkRoutes; + typedef std::list::const_iterator NetworkRoutesCI; + typedef std::list::iterator NetworkRoutesI; + + typedef std::list MulticastRoutes; + typedef std::list::const_iterator MulticastRoutesCI; + typedef std::list::iterator MulticastRoutesI; + + /** + * \brief Lookup in the forwarding table for destination. + * \param dest destination address + * \param interface output interface if any (put 0 otherwise) + * \return Ipv6Route to route the packet to reach dest address + */ + Ptr LookupStatic (Ipv6Address dest, uint32_t interface = 0); + + /** + * \brief Lookup in the multicast forwarding table for destination. + * \param origin source address + * \param group group multicast address + * \param ifIndex interface index + * \return Ipv6MulticastRoute to route the packet to reach dest address + */ + Ptr LookupStatic (Ipv6Address origin, Ipv6Address group, uint32_t ifIndex); + + /** + * \brief Choose the source address to use with destination address. + * \param interface interface index + * \param dest IPv6 destination address + * \return IPv6 source address to use + */ + Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest); + + /** + * \brief the forwarding table for hosts. + */ + HostRoutes m_hostRoutes; + + /** + * \brief the forwarding table for network. + */ + NetworkRoutes m_networkRoutes; + + /** + * \brief the default route. + */ + Ipv6RoutingTableEntry *m_defaultRoute; + + /** + * \brief the forwarding table for multicast. + */ + MulticastRoutes m_multicastRoutes; + + /** + * \brief Ipv6 reference. + */ + Ptr m_ipv6; +}; + +} /* namespace ns3 */ + +#endif /* IPV6_STATIC_ROUTING_H */ + diff --git a/src/routing/static-routing/wscript b/src/routing/static-routing/wscript index 306eae889..1fdd54f85 100644 --- a/src/routing/static-routing/wscript +++ b/src/routing/static-routing/wscript @@ -5,11 +5,15 @@ def build(bld): module.source = [ 'ipv4-static-routing.cc', 'ipv4-routing-table-entry.cc', + 'ipv6-static-routing.cc', + 'ipv6-routing-table-entry.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'static-routing' headers.source = [ 'ipv4-static-routing.h', 'ipv4-routing-table-entry.h', + 'ipv6-static-routing.h', + 'ipv6-routing-table-entry.h', ] diff --git a/src/wscript b/src/wscript index 3042c2356..fcc57038a 100644 --- a/src/wscript +++ b/src/wscript @@ -36,6 +36,8 @@ all_modules = ( 'helper', 'contrib/stats', 'applications/v4ping', + 'applications/ping6', + 'applications/radvd', ) def set_options(opt): From a508d4dd35b65ecc769a532e53fbf23307578c6c Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 23 Aug 2009 20:54:31 -0700 Subject: [PATCH 07/43] fix build issue on radvd casts --- src/applications/radvd/radvd-interface.h | 20 ++++++++++---------- src/applications/radvd/radvd.cc | 8 ++++---- src/applications/radvd/radvd.h | 5 +++++ 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/applications/radvd/radvd-interface.h b/src/applications/radvd/radvd-interface.h index e5381f494..8713731ce 100644 --- a/src/applications/radvd/radvd-interface.h +++ b/src/applications/radvd/radvd-interface.h @@ -44,8 +44,8 @@ class RadvdInterface : public RefCountBase /** * \brief Constructor. * \param interface interface index - * \param maxRtrAdvInterval maximum RA interval - * \param minRtrAdvInterval minimum RA interval + * \param maxRtrAdvInterval maximum RA interval (ms) + * \param minRtrAdvInterval minimum RA interval (ms) */ RadvdInterface (uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval); @@ -86,37 +86,37 @@ class RadvdInterface : public RefCountBase /** * \brief Get maximum RA interval. - * \return RA interval + * \return RA interval (ms) */ uint32_t GetMaxRtrAdvInterval () const; /** * \brief Get maximum RA interval. - * \param maxRtrAdvInterval RA interval + * \param maxRtrAdvInterval RA interval (ms) */ void SetMaxRtrAdvInterval (uint32_t maxRtrAdvInterval); /** - * \brief Get minimum RA interval. - * \return RA interval + * \brief Get minimum RA interval + * \return RA interval (ms) */ uint32_t GetMinRtrAdvInterval () const; /** - * \brief Get minimum RA interval. - * \param minRtrAdvInterval RA interval + * \brief Get minimum RA interval + * \param minRtrAdvInterval RA interval (ms). */ void SetMinRtrAdvInterval (uint32_t minRtrAdvInterval); /** * \brief Get minimum delay between RAs. - * \return minimum delay + * \return minimum delay (ms) */ uint32_t GetMinDelayBetweenRAs () const; /** * \brief Set minimum delay between RAs. - * \param minDelayBetweenRAs minimum delay + * \param minDelayBetweenRAs minimum delay (ms) */ void SetMinDelayBetweenRAs (uint32_t minDelayBetweenRAs); diff --git a/src/applications/radvd/radvd.cc b/src/applications/radvd/radvd.cc index e4f3f3796..c984d0c14 100644 --- a/src/applications/radvd/radvd.cc +++ b/src/applications/radvd/radvd.cc @@ -213,7 +213,7 @@ void Radvd::Send (Ptr config, Ipv6Address dst) m_socket->Send (p, 0); UniformVariable rnd; - uint32_t delay = rnd.GetValue (config->GetMinRtrAdvInterval (), config->GetMaxRtrAdvInterval ()); + uint64_t delay = static_cast (rnd.GetValue (config->GetMinRtrAdvInterval (), config->GetMaxRtrAdvInterval ()) + 0.5); Time t = MilliSeconds (delay); ScheduleTransmit (t, config, m_eventIds[config->GetInterface ()]); } @@ -231,7 +231,7 @@ void Radvd::HandleRead (Ptr socket) Ipv6Header hdr; Icmpv6RS rsHdr; Inet6SocketAddress address = Inet6SocketAddress::ConvertFrom (from); - uint32_t delay = 0; + uint64_t delay = 0; UniformVariable rnd; Time t; @@ -244,13 +244,13 @@ void Radvd::HandleRead (Ptr socket) packet->RemoveHeader (rsHdr); NS_LOG_INFO ("Received ICMPv6 Router Solicitation from " << hdr.GetSourceAddress () << " code = " << (uint32_t)rsHdr.GetCode ()); - delay = rnd.GetValue (0, 500); /* default value for MAX_RA_DELAY_TIME */ + delay = static_cast (rnd.GetValue (0, MAX_RA_DELAY_TIME) + 0.5); t = Simulator::Now () + MilliSeconds (delay); #if 0 NS_LOG_INFO ("schedule new RA : " << t.GetTimeStep () << " next scheduled RA" << (int64_t)m_sendEvent.GetTs ()); - if (t.GetTimeStep () < (int64_t)m_sendEvent.GetTs ()) + if (t.GetTimeStep () < static_cast (m_sendEvent.GetTs ())) { /* send multicast RA */ /* maybe replace this by a unicast RA (it is a SHOULD in the RFC) */ diff --git a/src/applications/radvd/radvd.h b/src/applications/radvd/radvd.h index 0b3273ede..b8d5852e8 100644 --- a/src/applications/radvd/radvd.h +++ b/src/applications/radvd/radvd.h @@ -56,6 +56,11 @@ class Radvd : public Application */ virtual ~Radvd (); + /** + * \brief Default value for maximum delay of RA (ms) + */ + static const uint32_t MAX_RA_DELAY_TIME = 500; + /** * \brief Add configuration for an interface; * \param routerInterface configuration From 53f3c0654dfc377652cdb31121a4845b4db2d008 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Mon, 24 Aug 2009 13:09:32 +0200 Subject: [PATCH 08/43] new trace sources for WifiRemoteStationManager --- .../wifi/wifi-remote-station-manager.cc | 64 +++++++++++++++-- .../wifi/wifi-remote-station-manager.h | 72 ++++++++++++++++++- 2 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/devices/wifi/wifi-remote-station-manager.cc b/src/devices/wifi/wifi-remote-station-manager.cc index 01c204b09..1e09f5f62 100644 --- a/src/devices/wifi/wifi-remote-station-manager.cc +++ b/src/devices/wifi/wifi-remote-station-manager.cc @@ -159,6 +159,18 @@ WifiRemoteStationManager::GetTypeId (void) WifiModeValue (), MakeWifiModeAccessor (&WifiRemoteStationManager::m_nonUnicastMode), MakeWifiModeChecker ()) + .AddTraceSource ("MacTxRtsFailed", + "The transmission of a RTS by the MAC layer has failed", + MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxRtsFailed)) + .AddTraceSource ("MacTxDataFailed", + "The transmission of a data packet by the MAC layer has failed", + MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxDataFailed)) + .AddTraceSource ("MacTxFinalRtsFailed", + "The transmission of a RTS has exceeded the maximum number of attempts", + MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalRtsFailed)) + .AddTraceSource ("MacTxFinalDataFailed", + "The transmission of a data packet has exceeded the maximum number of attempts", + MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalDataFailed)) ; return tid; } @@ -175,7 +187,7 @@ WifiRemoteStationManager::DoDispose (void) { for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) { - delete (*i).second; + delete (*i); } m_stations.clear (); delete m_nonUnicast; @@ -237,14 +249,15 @@ WifiRemoteStationManager::Lookup (Mac48Address address) } for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) { - if ((*i).first == address) + if ((*i)->GetAddress () == address) { - return (*i).second; + return (*i); } } WifiRemoteStation *station = CreateStation (); + station->SetAddress(address); station->Reset (); - m_stations.push_back (std::make_pair (address, station)); + m_stations.push_back (station); return station; } @@ -264,7 +277,7 @@ WifiRemoteStationManager::Reset (void) { for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) { - delete i->second; + delete (*i); } m_stations.clear (); m_basicModes.clear (); @@ -318,6 +331,33 @@ WifiRemoteStationManager::GetNonUnicastMode (void) const return m_nonUnicastMode; } + +void +WifiRemoteStationManager::NotifyTxRtsFailed (Mac48Address address) +{ + m_macTxRtsFailed (address); +} + +void +WifiRemoteStationManager::NotifyTxDataFailed (Mac48Address address) +{ + m_macTxDataFailed (address); +} + +void +WifiRemoteStationManager::NotifyTxFinalRtsFailed (Mac48Address address) +{ + m_macTxFinalRtsFailed (address); +} + +void +WifiRemoteStationManager::NotifyTxFinalDataFailed (Mac48Address address) +{ + m_macTxFinalDataFailed (address); +} + + + } // namespace ns3 /*************************************************************** @@ -564,6 +604,16 @@ WifiRemoteStation::GetAvgSlrc () const { return m_avgSlrc; } +void +WifiRemoteStation::SetAddress(Mac48Address address) +{ + m_address = address; +} +Mac48Address +WifiRemoteStation::GetAddress() +{ + return m_address; +} uint32_t WifiRemoteStation::GetNSupportedModes (void) const { @@ -698,6 +748,7 @@ void WifiRemoteStation::ReportRtsFailed (void) { m_ssrc++; + GetManager ()->NotifyTxRtsFailed (m_address); DoReportRtsFailed (); } @@ -705,6 +756,7 @@ void WifiRemoteStation::ReportDataFailed (void) { m_slrc++; + GetManager ()->NotifyTxDataFailed (m_address); DoReportDataFailed (); } @@ -727,6 +779,7 @@ void WifiRemoteStation::ReportFinalRtsFailed (void) { m_ssrc = 0; + GetManager ()->NotifyTxFinalRtsFailed (m_address); DoReportFinalRtsFailed (); } @@ -734,6 +787,7 @@ void WifiRemoteStation::ReportFinalDataFailed (void) { m_slrc = 0; + GetManager ()->NotifyTxFinalDataFailed (m_address); DoReportFinalDataFailed (); } diff --git a/src/devices/wifi/wifi-remote-station-manager.h b/src/devices/wifi/wifi-remote-station-manager.h index a7d698a3c..c6531d441 100644 --- a/src/devices/wifi/wifi-remote-station-manager.h +++ b/src/devices/wifi/wifi-remote-station-manager.h @@ -88,7 +88,7 @@ protected: friend class WifiRemoteStation; virtual void DoDispose (void); private: - typedef std::vector > Stations; + typedef std::vector Stations; virtual class WifiRemoteStation *CreateStation (void) = 0; Stations m_stations; WifiMode m_defaultTxMode; @@ -100,6 +100,63 @@ private: uint32_t m_rtsCtsThreshold; uint32_t m_fragmentationThreshold; WifiMode m_nonUnicastMode; + + + /** + * Public method used to fire a MacTxRtsFailed trace. + * Implemented for encapsulation purposes. + */ + void NotifyTxRtsFailed (Mac48Address address); + + /** + * Public method used to fire a MacTxDataFailed trace. + * Implemented for encapsulation purposes. + */ + void NotifyTxDataFailed (Mac48Address address); + + /** + * Public method used to fire a MacTxFinalRtsFailed trace. + * Implemented for encapsulation purposes. + */ + void NotifyTxFinalRtsFailed (Mac48Address address); + + /** + * Public method used to fire a MacTxFinalDataFailed trace. + * Implemented for encapsulation purposes. + */ + void NotifyTxFinalDataFailed (Mac48Address address); + + + /** + * The trace source fired when the transmission of a RTS has failed + * + * \see class CallBackTraceSource + */ + TracedCallback m_macTxRtsFailed; + + /** + * The trace source fired when the transmission of a data packet has failed + * + * \see class CallBackTraceSource + */ + TracedCallback m_macTxDataFailed; + + /** + * The trace source fired when the transmission of a RTS has + * exceeded the maximum number of attempts + * + * \see class CallBackTraceSource + */ + TracedCallback m_macTxFinalRtsFailed; + + /** + * The trace source fired when the transmission of a data packet has + * exceeded the maximum number of attempts + * + * \see class CallBackTraceSource + */ + TracedCallback m_macTxFinalDataFailed; + }; } // namespace ns3 @@ -264,6 +321,18 @@ public: * \return exponentially weighted average SLRC, this is used by Airtime link metric of 802.11s */ double GetAvgSlrc () const; + /** + * set the address of the remote stationt represented by this instance of WifiRemoteStation + * + * @param address the MAC address of the remote station + */ + void SetAddress(Mac48Address address); + /** + * get the address of the remote stationt represented by this instance of WifiRemoteStation + * + * @return the MAC address of the remote station + */ + Mac48Address GetAddress(); private: virtual Ptr GetManager (void) const = 0; virtual WifiMode DoGetDataMode (uint32_t size) = 0; @@ -294,6 +363,7 @@ private: TracedValue m_slrc; double m_avgSlrcCoefficient; double m_avgSlrc; + Mac48Address m_address; }; } // namespace ns3 From 2dcc93a0ae15b00faf8c21be3701b858d51bfa42 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Mon, 24 Aug 2009 13:32:06 +0200 Subject: [PATCH 09/43] added AthstatsWifiTraceSink and AthstatsHelper --- examples/wifi-ap.cc | 8 + src/helper/athstats-helper.cc | 309 ++++++++++++++++++++++++++++++++++ src/helper/athstats-helper.h | 226 +++++++++++++++++++++++++ src/helper/wscript | 2 + 4 files changed, 545 insertions(+) create mode 100644 src/helper/athstats-helper.cc create mode 100644 src/helper/athstats-helper.h diff --git a/examples/wifi-ap.cc b/examples/wifi-ap.cc index 39d91ee7d..f7f169ab8 100644 --- a/examples/wifi-ap.cc +++ b/examples/wifi-ap.cc @@ -26,6 +26,7 @@ #include "ns3/mobility-module.h" #include "ns3/contrib-module.h" #include "ns3/wifi-module.h" +#include "ns3/athstats-helper.h" #include @@ -110,6 +111,9 @@ AdvancePosition (Ptr node) int main (int argc, char *argv[]) { + CommandLine cmd; + cmd.Parse (argc, argv); + Packet::EnablePrinting (); // enable rts cts all the time. @@ -175,6 +179,10 @@ int main (int argc, char *argv[]) Config::Connect ("/NodeList/*/DeviceList/*/Phy/State/RxError", MakeCallback (&PhyRxErrorTrace)); Config::Connect ("/NodeList/*/DeviceList/*/Phy/State/Tx", MakeCallback (&PhyTxTrace)); Config::Connect ("/NodeList/*/DeviceList/*/Phy/State/State", MakeCallback (&PhyStateTrace)); + + AthstatsHelper athstats; + athstats.EnableAthstats("athstats-sta", stas); + athstats.EnableAthstats("athstats-ap", ap); Simulator::Run (); diff --git a/src/helper/athstats-helper.cc b/src/helper/athstats-helper.cc new file mode 100644 index 000000000..ff3acccee --- /dev/null +++ b/src/helper/athstats-helper.cc @@ -0,0 +1,309 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 CTTC + * + * 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: Nicola Baldo + */ + +#include "ns3/log.h" +#include "ns3/assert.h" +#include "ns3/abort.h" +#include "ns3/simulator.h" +#include "ns3/nstime.h" +#include "ns3/config.h" +#include "athstats-helper.h" +#include +#include +#include + + +NS_LOG_COMPONENT_DEFINE("Athstats"); + +namespace ns3 { + + +AthstatsHelper::AthstatsHelper () + : m_interval (Seconds (1.0)) +{ +} + +void +AthstatsHelper::EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid) +{ + Ptr athstats = CreateObject (); + std::ostringstream oss; + oss << filename + << "_" << std::setfill ('0') << std::setw (3) << std::right << nodeid + << "_" << std::setfill ('0') << std::setw (3) << std::right << deviceid; + athstats->Open (oss.str ()); + + oss.str (""); + oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid; + std::string devicepath = oss.str (); + + Config::Connect (devicepath + "/Mac/MacTx", MakeCallback (&AthstatsWifiTraceSink::DevTxTrace, athstats)); + Config::Connect (devicepath + "/Mac/MacRx", MakeCallback (&AthstatsWifiTraceSink::DevRxTrace, athstats)); + + Config::Connect (devicepath + "/RemoteStationManager/TxRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxRtsFailedTrace, athstats)); + Config::Connect (devicepath + "/RemoteStationManager/MacTxDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxDataFailedTrace, athstats)); + Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalRtsFailedTrace, athstats)); + Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalDataFailedTrace, athstats)); + + Config::Connect (devicepath + "/Phy/State/RxOk", MakeCallback (&AthstatsWifiTraceSink::PhyRxOkTrace, athstats)); + Config::Connect (devicepath + "/Phy/State/RxError", MakeCallback (&AthstatsWifiTraceSink::PhyRxErrorTrace, athstats)); + Config::Connect (devicepath + "/Phy/State/Tx", MakeCallback (&AthstatsWifiTraceSink::PhyTxTrace, athstats)); + Config::Connect (devicepath + "/Phy/State/State", MakeCallback (&AthstatsWifiTraceSink::PhyStateTrace, athstats)); +} + +void +AthstatsHelper::EnableAthstats (std::string filename, Ptr nd) +{ + EnableAthstats (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ()); +} + + +void +AthstatsHelper::EnableAthstats (std::string filename, NetDeviceContainer d) +{ + for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) + { + Ptr dev = *i; + EnableAthstats (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ()); + } +} + + +void +AthstatsHelper::EnableAthstats (std::string filename, NodeContainer n) +{ + NetDeviceContainer devs; + for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i) + { + Ptr node = *i; + for (uint32_t j = 0; j < node->GetNDevices (); ++j) + { + devs.Add (node->GetDevice (j)); + } + } + EnableAthstats (filename, devs); +} + + + + + +NS_OBJECT_ENSURE_REGISTERED (AthstatsWifiTraceSink); + +TypeId +AthstatsWifiTraceSink::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::AthstatsWifiTraceSink") + .SetParent () + .AddConstructor () + .AddAttribute ("Interval", + "Time interval between reports", + TimeValue (Seconds(1.0)), + MakeTimeAccessor (&AthstatsWifiTraceSink::m_interval), + MakeTimeChecker ()) + ; + return tid; +} + +AthstatsWifiTraceSink::AthstatsWifiTraceSink () + : m_txCount (0), + m_rxCount (0), + m_shortRetryCount (0), + m_longRetryCount (0), + m_exceededRetryCount (0), + m_phyRxOkCount (0), + m_phyRxErrorCount (0), + m_phyTxCount (0), + m_writer (0) +{ + Simulator::ScheduleNow (&AthstatsWifiTraceSink::WriteStats, this); +} + +AthstatsWifiTraceSink::~AthstatsWifiTraceSink () +{ + NS_LOG_FUNCTION (this); + + if (m_writer != 0) + { + NS_LOG_LOGIC ("m_writer nonzero " << m_writer); + if (m_writer->is_open ()) + { + NS_LOG_LOGIC ("m_writer open. Closing " << m_writer); + m_writer->close (); + } + + NS_LOG_LOGIC ("Deleting writer " << m_writer); + delete m_writer; + + NS_LOG_LOGIC ("m_writer = 0"); + m_writer = 0; + } + else + { + NS_LOG_LOGIC ("m_writer == 0"); + } +} + +void +AthstatsWifiTraceSink::ResetCounters () +{ + m_txCount = 0; + m_rxCount = 0; + m_shortRetryCount = 0; + m_longRetryCount = 0; + m_exceededRetryCount = 0; + m_phyRxOkCount = 0; + m_phyRxErrorCount = 0; + m_phyTxCount = 0; +} + +void +AthstatsWifiTraceSink::DevTxTrace (std::string context, Ptr p) +{ + NS_LOG_FUNCTION (this << context < p) +{ + NS_LOG_FUNCTION (this << context < packet, double snr, WifiMode mode, enum WifiPreamble preamble) +{ + NS_LOG_FUNCTION (this << context <open (name.c_str (), std::ios_base::binary | std::ios_base::out); + NS_ABORT_MSG_IF (m_writer->fail (), "AthstatsWifiTraceSink::Open (): m_writer->open (" << name.c_str () << ") failed"); + + NS_ASSERT_MSG (m_writer->is_open (), "AthstatsWifiTraceSink::Open (): m_writer not open"); + + NS_LOG_LOGIC ("Writer opened successfully"); +} + + +void +AthstatsWifiTraceSink::WriteStats () +{ + NS_ABORT_MSG_UNLESS (this, "function called with null this pointer, now=" << Now () ); + // the comments below refer to how each value maps to madwifi's athstats + // I know C strings are ugly but that's the quickest way to use exactly the same format as in madwifi + char str[200]; + snprintf (str, 200, "%8u %8u %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n", + m_txCount, // /proc/net/dev transmitted packets to which we should subract mgmt frames + m_rxCount, // /proc/net/dev received packets but subracts mgmt frames from it + 0, // ast_tx_altrate, + m_shortRetryCount, // ast_tx_shortretry, + m_longRetryCount, // ast_tx_longretry, + m_exceededRetryCount, // ast_tx_xretries, + m_phyRxErrorCount, // ast_rx_crcerr, + 0, // ast_rx_badcrypt, + 0, // ast_rx_phyerr, + 0, // ast_rx_rssi, + 0 // rate + ); + + if (m_writer) + { + + *m_writer << str; + + ResetCounters (); + Simulator::Schedule (m_interval, &AthstatsWifiTraceSink::WriteStats, this); + } +} + + + + +} // namespace ns3 + + diff --git a/src/helper/athstats-helper.h b/src/helper/athstats-helper.h new file mode 100644 index 000000000..3f64bcd84 --- /dev/null +++ b/src/helper/athstats-helper.h @@ -0,0 +1,226 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 CTTC + * + * 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: Nicola Baldo + */ + +#ifndef ATHSTATS_HELPER_H +#define ATHSTATS_HELPER_H + +#include +#include "ns3/object.h" +#include "ns3/attribute.h" +#include "ns3/object-factory.h" +#include "ns3/node-container.h" +#include "ns3/net-device-container.h" +#include "ns3/nstime.h" +#include "ns3/wifi-phy.h" +#include "ns3/double.h" +#include "ns3/mac48-address.h" + +namespace ns3 { + + +class NetDevice; + +/** + * @brief create AthstatsWifiTraceSink instances and connect them to wifi devices + * + * + */ +class AthstatsHelper +{ +public: + AthstatsHelper (); + void EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid); + void EnableAthstats (std::string filename, Ptr nd); + void EnableAthstats (std::string filename, NetDeviceContainer d); + void EnableAthstats (std::string filename, NodeContainer n); + +private: + Time m_interval; +}; + + + + +/** + * @brief trace sink for wifi device that mimics madwifi's athstats tool. + * + * The AthstatsWifiTraceSink class is a trace sink to be connected to several of the traces + * available within a wifi device. The purpose of AthstatsWifiTraceSink is to + * mimic the behavior of the athstats tool distributed wih the madwifi + * driver. In particular, the reproduced behavior is that obtained + * when executing athstats without parameters: a report written in + * text format is produced every fixed interval, based on the events + * observed by the wifi device. + * + * Differences with the "real" athstats: + * + * - AthstatsWifiTraceSink is expected to write its output to a file + * (not to stdout). + * + * - only a subset of the metrics supported by athstats is supported + * by AthstatsWifiTraceSink + * + * - AthstatsWifiTraceSink does never produce a cumulative report. + */ +class AthstatsWifiTraceSink : public Object +{ +public: + static TypeId GetTypeId (void); + AthstatsWifiTraceSink (); + virtual ~AthstatsWifiTraceSink (); + + + /** + * function to be called when the net device transmittes a packet + * + * @param context + * @param p the packet being transmitted + */ + void DevTxTrace (std::string context, Ptr p); + + /** + * function to be called when the net device receives a packet + * + * @param context + * @param p the packet being received + */ + void DevRxTrace (std::string context, Ptr p); + + /** + * Function to be called when a RTS frame transmission by the considered + * device has failed + * + * @param context + * @param address the MAC address of the remote station + */ + void TxRtsFailedTrace (std::string context, Mac48Address address); + + /** + * Function to be called when a data frame transmission by the considered + * device has failed + * + * @param context + * @param address the MAC address of the remote station + */ + void TxDataFailedTrace (std::string context, Mac48Address address); + + /** + * Function to be called when the transmission of a RTS frame has + * exceeded the retry limit + * + * @param context + * @param address the MAC address of the remote station + */ + void TxFinalRtsFailedTrace (std::string context, Mac48Address address); + + /** + * Function to be called when the transmission of a data frame has + * exceeded the retry limit + * + * @param context + * @param address the MAC address of the remote station + */ + void TxFinalDataFailedTrace (std::string context, Mac48Address address); + + + /** + * Function to be called when the PHY layer of the considered + * device receives a frame + * + * @param context + * @param packet + * @param snr + * @param mode + * @param preamble + */ + void PhyRxOkTrace (std::string context, Ptr packet, double snr, WifiMode mode, enum WifiPreamble preamble); + + /** + * Function to be called when a frame reception by the PHY + * layer of the considered device resulted in an error due to a failure in the CRC check of + * the frame + * + * @param context + * @param packet + * @param snr + */ + void PhyRxErrorTrace (std::string context, Ptr packet, double snr); + + /** + * Function to be called when a frame is being transmitted by the + * PHY layer of the considered device + * + * @param context + * @param packet + * @param mode + * @param preamble + * @param txPower + */ + void PhyTxTrace (std::string context, Ptr packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower); + + /** + * Function to be called when the PHY layer of the considered device + * changes state + * + * @param context + * @param start + * @param duration + * @param state + */ + void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state); + + /** + * Open a file for output + * + * @param name the name of the file to be opened. + */ + void Open (std::string const& name); + +private: + + void WriteStats (); + void ResetCounters (); + + + uint32_t m_txCount; + uint32_t m_rxCount; + uint32_t m_shortRetryCount; + uint32_t m_longRetryCount; + uint32_t m_exceededRetryCount; + uint32_t m_phyRxOkCount; + uint32_t m_phyRxErrorCount; + uint32_t m_phyTxCount; + + std::ofstream *m_writer; + + Time m_interval; + + +}; // class AthstatsWifiTraceSink + + + + +} // namespace ns3 + + + + +#endif /* ATHSTATS_HELPER_H */ diff --git a/src/helper/wscript b/src/helper/wscript index 7a7ca59ff..3ced3f13a 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -28,6 +28,7 @@ def build(bld): 'ipv4-global-routing-helper.cc', 'ipv4-list-routing-helper.cc', 'ipv4-routing-helper.cc', + 'athstats-helper.cc', 'ipv6-address-helper.cc', 'ipv6-interface-container.cc', 'ipv6-static-routing-helper.cc', @@ -64,6 +65,7 @@ def build(bld): 'ipv4-global-routing-helper.h', 'ipv4-list-routing-helper.h', 'ipv4-routing-helper.h', + 'athstats-helper.h', 'ipv6-address-helper.h', 'ipv6-interface-container.h', 'ipv6-static-routing-helper.h', From 02bc21d977369fd7204c7a9c99bd6c41031fb98d Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Mon, 24 Aug 2009 13:35:41 +0200 Subject: [PATCH 10/43] updated release notes --- CHANGES.html | 8 ++++++++ RELEASE_NOTES | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES.html b/CHANGES.html index 493a8e5f9..aca0ba64e 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -52,6 +52,14 @@ us a note on ns-developers mailing list.

New API:

    +
  • Athstats +

    New classes AthstatsWifiTraceSink and AthstatsHelper. +

    +
  • +
  • WifiRemoteStationManager +

    New trace sources exported by WifiRemoteStationManager: MacTxRtsFailed, MacTxDataFailed, MacTxFinalRtsFailed and MacTxFinalDataFailed. +

    +
  • IPv6 additions

    Add an IPv6 protocol and ICMPv6 capability.

      diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 84482252f..4175cd258 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -45,6 +45,10 @@ New user-visible features - Radvd application (send RA); - Examples (ping6, simple-routing-ping6, radvd, radvd-two-prefix, icmpv6-redirect). + + c) added AthstatsHelper, which enables the wifi device to produce + periodic reports similar to the ones generated by madwifi's + athstats tool (Nicola Baldo) API changes from ns-3.5 From a167b1dbcf6a275235c16d6d89a47caa0435a9ad Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Mon, 24 Aug 2009 18:31:59 -0700 Subject: [PATCH 11/43] Fixed erroneous first return of Normal Variable --- src/core/random-variable.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/random-variable.cc b/src/core/random-variable.cc index 0ff630174..ce71a7e97 100644 --- a/src/core/random-variable.cc +++ b/src/core/random-variable.cc @@ -778,23 +778,19 @@ private: double m_bound; // Bound on value's difference from the mean (absolute value) bool m_nextValid; // True if next valid double m_next; // The algorithm produces two values at a time - static bool m_static_nextValid; - static double m_static_next; }; -bool NormalVariableImpl::m_static_nextValid = false; -double NormalVariableImpl::m_static_next; const double NormalVariableImpl::INFINITE_VALUE = 1e307; NormalVariableImpl::NormalVariableImpl() : m_mean(0.0), m_variance(1.0), m_bound(INFINITE_VALUE), m_nextValid(false){} -NormalVariableImpl::NormalVariableImpl(double m, double v, double b/*=INFINITE_VALUE*/) +NormalVariableImpl::NormalVariableImpl(double m, double v, double b) : m_mean(m), m_variance(v), m_bound(b), m_nextValid(false) { } NormalVariableImpl::NormalVariableImpl(const NormalVariableImpl& c) : RandomVariableBase(c), m_mean(c.m_mean), m_variance(c.m_variance), - m_bound(c.m_bound) { } + m_bound(c.m_bound), m_nextValid(false) { } double NormalVariableImpl::GetValue() { From 0b3a200f6590c5c6310142052b2799db7c987571 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Mon, 24 Aug 2009 19:03:58 -0700 Subject: [PATCH 12/43] Fixed WifiMacHeader Print Control Characters bug 661 --- src/devices/wifi/wifi-mac-header.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/devices/wifi/wifi-mac-header.cc b/src/devices/wifi/wifi-mac-header.cc index d61a64d1f..64221a9d5 100644 --- a/src/devices/wifi/wifi-mac-header.cc +++ b/src/devices/wifi/wifi-mac-header.cc @@ -896,9 +896,9 @@ WifiMacHeader::GetInstanceTypeId (void) const void WifiMacHeader::PrintFrameControl (std::ostream &os) const { - os << "ToDS=" << m_ctrlToDs << ", FromDS=" << m_ctrlFromDs - << ", MoreFrag=" << m_ctrlMoreFrag << ", Retry=" << m_ctrlRetry - << ", MoreData=" << m_ctrlMoreData + os << "ToDS=" << std::hex << (int) m_ctrlToDs << ", FromDS=" << std::hex << (int) m_ctrlFromDs + << ", MoreFrag=" << std::hex << (int) m_ctrlMoreFrag << ", Retry=" << std::hex << (int) m_ctrlRetry + << ", MoreData=" << std::hex << (int) m_ctrlMoreData << std::dec ; } @@ -935,7 +935,7 @@ WifiMacHeader::Print (std::ostream &os) const PrintFrameControl (os); os << " Duration/ID=" << m_duration << "us" << ", DA=" << m_addr1 << ", SA=" << m_addr2 - << ", BSSID=" << m_addr3 << ", FragNumber=" << m_seqFrag + << ", BSSID=" << m_addr3 << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq; break; case WIFI_MAC_MGT_ACTION: @@ -943,11 +943,11 @@ WifiMacHeader::Print (std::ostream &os) const PrintFrameControl (os); os << " Duration/ID=" << m_duration << "us" << "DA=" << m_addr1 << ", SA=" << m_addr2 << ", BSSID=" << m_addr3 - << ", FragNumber=" << m_seqFrag << ", SeqNumber=" << m_seqSeq; + << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq; case WIFI_MAC_MGT_MULTIHOP_ACTION: os << " Duration/ID=" << m_duration << "us" << "RA=" << m_addr1 << ", TA=" << m_addr2 << ", DA=" << m_addr3 - << ", FragNumber=" << m_seqFrag << ", SeqNumber=" << m_seqSeq; + << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq; case WIFI_MAC_DATA: PrintFrameControl (os); os << " Duration/ID=" << m_duration << "us"; @@ -971,7 +971,7 @@ WifiMacHeader::Print (std::ostream &os) const { NS_FATAL_ERROR ("Impossible ToDs and FromDs flags combination"); } - os << ", FragNumber=" << m_seqFrag + os << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq; break; case WIFI_MAC_DATA_CFACK: From d667ae10fc4fb5e79cc75b5ee7d4d2802ecbc32f Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Mon, 24 Aug 2009 19:11:41 -0700 Subject: [PATCH 13/43] update multi-rate-first.cc and multi-rate-second.cc --- examples/multi-rate-first.cc | 183 ++++++++++++++++++++++++---------- examples/multi-rate-second.cc | 54 +++++----- 2 files changed, 160 insertions(+), 77 deletions(-) diff --git a/examples/multi-rate-first.cc b/examples/multi-rate-first.cc index 70e52afe8..cf2beeef4 100644 --- a/examples/multi-rate-first.cc +++ b/examples/multi-rate-first.cc @@ -1,10 +1,16 @@ /** * * Instructions: - * ./waf --run multi-rate-first > m.data - * gnuplot m.data - * eog *.png + * ./waf --run multi-rate-first + * gnuplot multi-rate-first-scen*.plt * + * Output: + * multi-rate-first-scen1.eps + * multi-rate-first-scen2.eps + * multi-rate-first-scen3.eps + * multi-rate-first-scen4.eps + * + * Side Note: It may take some time. */ #include "ns3/core-module.h" @@ -15,6 +21,7 @@ #include "ns3/contrib-module.h" #include +#include NS_LOG_COMPONENT_DEFINE ("Main"); @@ -34,6 +41,7 @@ private: void AdvancePosition (Ptr node); void BackTrackPosition (Ptr node); void StationaryPosition (Ptr node); + void MultiPosition (Ptr node1, Ptr node2); Ptr SetupPacketReceive (Ptr node); uint32_t m_bytesTotal; @@ -108,6 +116,26 @@ Experiment::StationaryPosition (Ptr node) m_output.Add ((Simulator::Now()).GetSeconds(), mbs); } +void +Experiment::MultiPosition (Ptr n1, Ptr n2) +{ + Vector pos1 = GetPosition(n1); + Vector pos2 = GetPosition(n2); + double mbs = ((m_bytesTotal * 8.0) / 1000000); + m_bytesTotal = 0; + m_output.Add ((Simulator::Now()).GetSeconds(), mbs); + + if( pos1.x < 230) + { + pos1.x += 1.0; + SetPosition (n1, pos1); + } + if( pos2.x > 0) + { + pos2.x -= 1.0; + SetPosition (n2, pos2); + } +} void Experiment::ReceivePacket (Ptr socket) @@ -169,21 +197,30 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, Ptr recvSink = SetupPacketReceive (c.Get (1)); - if(positionStep == 1) + if (positionStep == 1) { Simulator::Schedule (Seconds (1.5), &Experiment::AdvancePosition, this, c.Get (1)); } - else if(positionStep == -1) + else if (positionStep == -1) { Simulator::Schedule (Seconds (1.5), &Experiment::BackTrackPosition, this, c.Get (1)); } - else if(positionStep == 0) + else if (positionStep == 0) { for(int i = 1; i <= 210; i++) { Simulator::Schedule (Seconds (i), &Experiment::StationaryPosition, this, c.Get (1)); } } + else if (positionStep == 2) + { + for(int i = 1; i <= 210; i++) + { + Simulator::Schedule (Seconds (i), &Experiment::MultiPosition, this, c.Get(0), c.Get (1)); + } + } + + Simulator::Run (); Simulator::Destroy (); @@ -192,6 +229,11 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, int main (int argc, char *argv[]) { + std::ofstream outfile ("multi-rate-first-scen1.plt"); + std::ofstream outfile2 ("multi-rate-first-scen2.plt"); + std::ofstream outfile3 ("multi-rate-first-scen3.plt"); + std::ofstream outfile4 ("multi-rate-first-scen4.plt"); + // disable fragmentation Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200")); Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200")); @@ -199,119 +241,158 @@ int main (int argc, char *argv[]) CommandLine cmd; cmd.Parse (argc, argv); - Gnuplot gnuplot = Gnuplot ("multi-rate-first.png"); + + MobilityHelper mobility; Experiment experiment; + Gnuplot gnuplot; + int myPositionStep; + Ptr positionAlloc; + Gnuplot2dDataset dataset; WifiHelper wifi = WifiHelper::Default (); NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); - Gnuplot2dDataset dataset; - int myPositionStep = 0; -/* + // Scenario 1: two nodes within transmission range about 5 meters apart + // Fix a node stationary, move the second node away from it - // Scenario 1: moving away from one another - // Initially set them 5 meters apart - // Set positionStep parameter of Experiment::Run to 1 - // Set RateErrorModel of Experiment::Run to 0 + // moving forward myPositionStep = 1; - MobilityHelper mobility; - Ptr positionAlloc = CreateObject (); + gnuplot = Gnuplot ("multi-rate-first-scen1.eps"); + + positionAlloc = CreateObject (); positionAlloc->Add (Vector (0.0, 0.0, 0.0)); positionAlloc->Add (Vector (5.0, 0.0, 0.0)); mobility.SetPositionAllocator (positionAlloc); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); wifiMac.SetType ("ns3::AdhocWifiMac"); - - gnuplot = Gnuplot ("multi-rate-first.png"); wifi.SetStandard (WIFI_PHY_STANDARD_holland); - NS_LOG_DEBUG ("minstrel"); experiment = Experiment ("minstrel"); wifi.SetRemoteStationManager ("ns3::MinstrelWifiManager"); dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - NS_LOG_DEBUG ("ideal"); experiment = Experiment ("ideal"); wifi.SetRemoteStationManager ("ns3::IdealWifiManager"); dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - gnuplot.GenerateOutput (std::cout); - */ + gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); + gnuplot.SetLegend ("Time (Seconds)", "Throughput(Mbps)"); + gnuplot.SetExtra ("set xrange [0:250]"); + gnuplot.SetTitle ("Throughput vs Time"); + gnuplot.GenerateOutput (outfile); + outfile.close (); - // Scenario 2: two nodes out of range, moving into transmission range range - // Initially set them 230 meters apart - // Set positionStep parameter of Experiment::Rung to -1 - // set RateErrorModel of Experiment::Run to 0 + // Scenario 2: two nodes out of transmission range about 230 meters apart + // Fix a node stationary, move the second node into transmission range + // moving backward myPositionStep = -1; - MobilityHelper mobility; - Ptr positionAlloc = CreateObject (); + gnuplot = Gnuplot ("multi-rate-first-scen2.eps"); + + positionAlloc = CreateObject (); positionAlloc->Add (Vector (0.0, 0.0, 0.0)); positionAlloc->Add (Vector (230.0, 0.0, 0.0)); mobility.SetPositionAllocator (positionAlloc); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); wifiMac.SetType ("ns3::AdhocWifiMac"); - - gnuplot = Gnuplot ("multi-rate-first.png"); wifi.SetStandard (WIFI_PHY_STANDARD_holland); - NS_LOG_DEBUG ("minstrel"); experiment = Experiment ("minstrel"); wifi.SetRemoteStationManager ("ns3::MinstrelWifiManager"); - dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - NS_LOG_DEBUG ("ideal"); experiment = Experiment ("ideal"); wifi.SetRemoteStationManager ("ns3::IdealWifiManager"); - dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - gnuplot.GenerateOutput (std::cout); + + gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); + gnuplot.SetLegend ("Time (Seconds)", "Throughput(Mbps)"); + gnuplot.SetExtra ("set xrange [0:250]"); + gnuplot.SetTitle ("Throughput vs Time"); + gnuplot.GenerateOutput (outfile2); + outfile2.close (); + // Scenario 3: two nodes within transmission range 25 meters part + // Set both nodes stationary + // this is more like a sanity check -/* - // Scenario 3: - // Initially set them 25 meters apart, stationary - // Set positionStep parameter of Experiment::Rung to 0 - // This is a sanity check - + // Set position stationary myPositionStep = 0; - MobilityHelper mobility; - Ptr positionAlloc = CreateObject (); + + gnuplot = Gnuplot ("multi-rate-first-scen3.eps"); + + positionAlloc = CreateObject (); positionAlloc->Add (Vector (0.0, 0.0, 0.0)); positionAlloc->Add (Vector (25.0, 0.0, 0.0)); mobility.SetPositionAllocator (positionAlloc); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); wifiMac.SetType ("ns3::AdhocWifiMac"); - - gnuplot = Gnuplot ("multi-rate-first.png"); wifi.SetStandard (WIFI_PHY_STANDARD_holland); - NS_LOG_DEBUG ("minstrel"); experiment = Experiment ("minstrel"); wifi.SetRemoteStationManager ("ns3::MinstrelWifiManager"); - dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - NS_LOG_DEBUG ("ideal"); experiment = Experiment ("ideal"); wifi.SetRemoteStationManager ("ns3::IdealWifiManager"); - dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); gnuplot.AddDataset (dataset); - gnuplot.GenerateOutput (std::cout); - */ + gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); + gnuplot.SetLegend ("Time (Seconds)", "Throughput(Mbps)"); + gnuplot.SetExtra ("set xrange [0:250]"); + gnuplot.SetTitle ("Throughput vs Time"); + gnuplot.GenerateOutput (outfile3); + outfile3.close (); + + // Scenario 4: Two nodes in opposite direction about 230 meters apart + // moving into transmission range and out of transmission range + myPositionStep = 2; + + gnuplot = Gnuplot ("multi-rate-first-scen4.eps"); + + positionAlloc = CreateObject (); + // initial position of node 1 + positionAlloc->Add (Vector (0.0, 25.0, 0.0)); + // initial position of node 2 + positionAlloc->Add (Vector (230.0, 0.0, 0.0)); + mobility.SetPositionAllocator (positionAlloc); + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); + + wifiMac.SetType ("ns3::AdhocWifiMac"); + wifi.SetStandard (WIFI_PHY_STANDARD_holland); + + experiment = Experiment ("minstrel"); + wifi.SetRemoteStationManager ("ns3::MinstrelWifiManager"); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + gnuplot.AddDataset (dataset); + + experiment = Experiment ("ideal"); + wifi.SetRemoteStationManager ("ns3::IdealWifiManager"); + dataset= experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility, myPositionStep); + gnuplot.AddDataset (dataset); + + gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); + gnuplot.SetLegend ("Time (Seconds)", "Throughput(Mbps)"); + gnuplot.SetExtra ("set xrange [0:250]"); + gnuplot.SetTitle ("Throughput vs Time"); + gnuplot.GenerateOutput (outfile4); + outfile4.close (); + return 0; } diff --git a/examples/multi-rate-second.cc b/examples/multi-rate-second.cc index 9fb14f8f4..268516b0c 100644 --- a/examples/multi-rate-second.cc +++ b/examples/multi-rate-second.cc @@ -95,13 +95,10 @@ Experiment::GenerateTraffic (Ptr socket, uint32_t pktSize, { Vector pos = GetPosition(node); - ///to offset the start time - double offSetTime = 100; - if (pktCount > 0) { ///To simulate nodes moving in and out of transmission constantly - if(pos.x <= 305 && advanceStep) + if(pos.x <= 230 && advanceStep) { ///keep moving away pos.x += .1; @@ -110,7 +107,7 @@ Experiment::GenerateTraffic (Ptr socket, uint32_t pktSize, else { if(pos.x < 150) - { + { advanceStep=true; } else @@ -128,7 +125,7 @@ Experiment::GenerateTraffic (Ptr socket, uint32_t pktSize, } else { - m_output.Add((Simulator::Now()).GetSeconds() - offSetTime , m_pktsTotal); + m_output.Add((Simulator::Now()).GetSeconds(), m_pktsTotal); } } @@ -172,32 +169,30 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, source->Connect (remote); uint32_t packetSize = 1014; uint32_t maxPacketCount = 1000; - Time interPacketInterval = Seconds (.1); + Time interPacketInterval = Seconds (1.); Ptr n1 = c.Get(0); Ptr ipv41 = n1->GetObject (); + // parameters for Ipv4::SetDown and SetUp + // The first ifIndex is 0 for loopback, then the first p2p is numbered 1, + // then the next p2p is numbered 2 - - + double downTime = 0.0; for (int i= 1; i <= 100; i++) { Simulator::Schedule (Seconds (i), &Experiment::GenerateTraffic, this, source, packetSize, maxPacketCount,interPacketInterval, c.Get(1)); - - if( i % 5 == 0 ) + if ( i % 10 == 0 ) { ///bring a network interface down - Simulator::Schedule (Seconds (i+.5), &Ipv4::SetDown, ipv41, 1); - i++; - Simulator::Schedule (Seconds (i), &Experiment::GenerateTraffic, - this, source, packetSize, maxPacketCount,interPacketInterval, c.Get(1)); + Simulator::Schedule (Seconds (i+.1), &Ipv4::SetDown, ipv41, 1); + //duration of the down time + downTime += .1; + ///bring a network interface up - Simulator::Schedule (Seconds (i+.2), &Ipv4::SetUp, ipv41, 1); - i++; - Simulator::Schedule (Seconds (i), &Experiment::GenerateTraffic, - this, source, packetSize, maxPacketCount,interPacketInterval, c.Get(1)); + Simulator::Schedule (Seconds (i + downTime), &Ipv4::SetUp, ipv41, 1); } } @@ -209,13 +204,15 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, int main (int argc, char *argv[]) { + std::ofstream outfile ("multi-rate-second.plt"); + std::vector ratesControl; - ratesControl.push_back ("Ideal"); ratesControl.push_back ("Minstrel"); + ratesControl.push_back ("Ideal"); std::vector wifiManager; - wifiManager.push_back("ns3::IdealWifiManager"); wifiManager.push_back("ns3::MinstrelWifiManager"); + wifiManager.push_back("ns3::IdealWifiManager"); // disable fragmentation Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200")); @@ -228,12 +225,13 @@ int main (int argc, char *argv[]) for (uint32_t i = 0; i < ratesControl.size(); i++) { + std::cout << ratesControl[i] << std::endl; + std::cout << wifiManager[i] << std::endl; Gnuplot2dDataset dataset (ratesControl[i]); dataset.SetStyle (Gnuplot2dDataset::LINES); Experiment experiment; - - WifiHelper wifi = WifiHelper::Default (); + WifiHelper wifi; NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); @@ -243,14 +241,18 @@ int main (int argc, char *argv[]) NS_LOG_DEBUG (ratesControl[i]); experiment = Experiment (ratesControl[i]); + wifi.SetStandard (WIFI_PHY_STANDARD_80211b); + wifi.SetRemoteStationManager (wifiManager[i]); dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel); gnuplot.AddDataset (dataset); } gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); - gnuplot.SetLegend ("Time (Seconds)", "Number of packets received"); - gnuplot.SetExtra ("set xrange [0:100]"); - gnuplot.GenerateOutput (std::cout); + gnuplot.SetLegend ("Time ", "Number of packets received"); + gnuplot.SetExtra ("set xrange [1000:1100]"); + gnuplot.SetTitle ("Number of Packets Received vs Time"); + gnuplot.GenerateOutput (outfile); + outfile.close (); return 0; } From 979b638d6a71f21ce7830a0bba16e85dc99671ec Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Tue, 25 Aug 2009 08:41:04 +0200 Subject: [PATCH 14/43] export sgi-hashmap.h --- src/{internet-stack => common}/sgi-hashmap.h | 0 src/common/wscript | 1 + src/internet-stack/arp-cache.h | 2 +- src/internet-stack/ndisc-cache.h | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename src/{internet-stack => common}/sgi-hashmap.h (100%) diff --git a/src/internet-stack/sgi-hashmap.h b/src/common/sgi-hashmap.h similarity index 100% rename from src/internet-stack/sgi-hashmap.h rename to src/common/sgi-hashmap.h diff --git a/src/common/wscript b/src/common/wscript index d6f0d8d09..2ca057376 100644 --- a/src/common/wscript +++ b/src/common/wscript @@ -37,4 +37,5 @@ def build(bld): 'tag-buffer.h', 'packet-tag-list.h', 'ascii-writer.h', + 'sgi-hashmap.h', ] diff --git a/src/internet-stack/arp-cache.h b/src/internet-stack/arp-cache.h index d9deb4bb4..dfbf80a78 100644 --- a/src/internet-stack/arp-cache.h +++ b/src/internet-stack/arp-cache.h @@ -32,7 +32,7 @@ #include "ns3/ptr.h" #include "ns3/object.h" #include "ns3/traced-callback.h" -#include "sgi-hashmap.h" +#include "ns3/sgi-hashmap.h" namespace ns3 { diff --git a/src/internet-stack/ndisc-cache.h b/src/internet-stack/ndisc-cache.h index 20016b5c4..5c7c049dd 100644 --- a/src/internet-stack/ndisc-cache.h +++ b/src/internet-stack/ndisc-cache.h @@ -31,8 +31,8 @@ #include "ns3/ipv6-address.h" #include "ns3/ptr.h" #include "ns3/timer.h" +#include "ns3/sgi-hashmap.h" -#include "sgi-hashmap.h" #include "ipv6-interface.h" namespace ns3 From 5cd80be903d22087c99901c0eb5776d9068f0fca Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Tue, 25 Aug 2009 08:52:57 +0200 Subject: [PATCH 15/43] export headers from internet-stack --- src/internet-stack/arp-l3-protocol.h | 3 +- src/internet-stack/nsc-tcp-l4-protocol.cc | 50 +++++++++++++++++------ src/internet-stack/nsc-tcp-l4-protocol.h | 44 ++++++++++---------- src/internet-stack/nsc-tcp-socket-impl.cc | 12 ------ src/internet-stack/nsc-tcp-socket-impl.h | 5 +-- src/internet-stack/tcp-l4-protocol.cc | 12 +++--- src/internet-stack/tcp-l4-protocol.h | 12 +++--- src/internet-stack/tcp-socket-impl.cc | 2 + src/internet-stack/tcp-test.cc | 11 ++--- src/internet-stack/udp-l4-protocol.h | 3 +- src/internet-stack/wscript | 10 ++++- 11 files changed, 92 insertions(+), 72 deletions(-) diff --git a/src/internet-stack/arp-l3-protocol.h b/src/internet-stack/arp-l3-protocol.h index 1256e8c40..7f0294e9f 100644 --- a/src/internet-stack/arp-l3-protocol.h +++ b/src/internet-stack/arp-l3-protocol.h @@ -26,14 +26,13 @@ #include "ns3/ptr.h" #include "ns3/traced-callback.h" -#include "ipv4-interface.h" - namespace ns3 { class ArpCache; class NetDevice; class Node; class Packet; +class Ipv4Interface; /** * \ingroup internetStack diff --git a/src/internet-stack/nsc-tcp-l4-protocol.cc b/src/internet-stack/nsc-tcp-l4-protocol.cc index f8af6ec79..1eda795b3 100644 --- a/src/internet-stack/nsc-tcp-l4-protocol.cc +++ b/src/internet-stack/nsc-tcp-l4-protocol.cc @@ -32,8 +32,10 @@ #include "ipv4-end-point.h" #include "ipv4-l3-protocol.h" #include "nsc-tcp-l4-protocol.h" +#include "nsc-tcp-socket-impl.h" #include "nsc-sysctl.h" #include "nsc-tcp-socket-factory-impl.h" +#include "sim_interface.h" #include "tcp-typedefs.h" @@ -54,13 +56,39 @@ NS_OBJECT_ENSURE_REGISTERED (NscTcpL4Protocol); /* see http://www.iana.org/assignments/protocol-numbers */ const uint8_t NscTcpL4Protocol::PROT_NUMBER = 6; -ObjectFactory -NscTcpL4Protocol::GetDefaultRttEstimatorFactory (void) +class NscInterfaceImpl : public ISendCallback, public IInterruptCallback { - ObjectFactory factory; - factory.SetTypeId (RttMeanDeviation::GetTypeId ()); - return factory; +public: + NscInterfaceImpl (Ptr prot); +private: + virtual void send_callback(const void *data, int datalen); + virtual void wakeup(); + virtual void gettime(unsigned int *, unsigned int *); +private: + Ptr m_prot; +}; + +NscInterfaceImpl::NscInterfaceImpl (Ptr prot) + : m_prot (prot) +{} + +void +NscInterfaceImpl::send_callback(const void *data, int datalen) +{ + m_prot->send_callback (data, datalen); } +void +NscInterfaceImpl::wakeup() +{ + m_prot->wakeup (); +} +void +NscInterfaceImpl::gettime(unsigned int *sec, unsigned int *usec) +{ + m_prot->gettime (sec,usec); +} + + TypeId NscTcpL4Protocol::GetTypeId (void) @@ -68,11 +96,6 @@ NscTcpL4Protocol::GetTypeId (void) static TypeId tid = TypeId ("ns3::NscTcpL4Protocol") .SetParent () .AddConstructor() - .AddAttribute ("RttEstimatorFactory", - "How RttEstimator objects are created.", - ObjectFactoryValue (GetDefaultRttEstimatorFactory ()), - MakeObjectFactoryAccessor (&NscTcpL4Protocol::m_rttFactory), - MakeObjectFactoryChecker ()) .AddAttribute ("SocketList", "The list of sockets associated to this protocol.", ObjectVectorValue (), MakeObjectVectorAccessor (&NscTcpL4Protocol::m_sockets), @@ -95,6 +118,7 @@ int external_rand() NscTcpL4Protocol::NscTcpL4Protocol () : m_endPoints (new Ipv4EndPointDemux ()), m_nscStack (0), + m_nscInterface (new NscInterfaceImpl (this)), m_softTimer (Timer::CANCEL_ON_DESTROY) { m_dlopenHandle = NULL; @@ -139,7 +163,7 @@ NscTcpL4Protocol::SetNode (Ptr node) FCreateStack create = (FCreateStack)dlsym(m_dlopenHandle, "nsc_create_stack"); NS_ASSERT(create); - m_nscStack = create(this, this, external_rand); + m_nscStack = create(m_nscInterface, m_nscInterface, external_rand); int hzval = m_nscStack->get_hz(); NS_ASSERT(hzval > 0); @@ -212,6 +236,8 @@ NscTcpL4Protocol::DoDispose (void) m_endPoints = 0; } m_node = 0; + delete m_nscInterface; + m_nscInterface = 0; Ipv4L4Protocol::DoDispose (); } @@ -220,11 +246,9 @@ NscTcpL4Protocol::CreateSocket (void) { NS_LOG_FUNCTION (this); - Ptr rtt = m_rttFactory.Create (); Ptr socket = CreateObject (); socket->SetNode (m_node); socket->SetTcp (this); - socket->SetRtt (rtt); m_sockets.push_back (socket); return socket; } diff --git a/src/internet-stack/nsc-tcp-l4-protocol.h b/src/internet-stack/nsc-tcp-l4-protocol.h index c099dfc13..91ccd5963 100644 --- a/src/internet-stack/nsc-tcp-l4-protocol.h +++ b/src/internet-stack/nsc-tcp-l4-protocol.h @@ -23,27 +23,27 @@ #include "ns3/ipv4-address.h" #include "ns3/ptr.h" #include "ns3/object-factory.h" -#include "ipv4-end-point-demux.h" -#include "ipv4-l4-protocol.h" -#include "ipv4-interface.h" - -#include "tcp-header.h" - #include "ns3/timer.h" -#include "sim_interface.h" -#include "nsc-tcp-socket-impl.h" +#include "ipv4-l4-protocol.h" + +struct INetStack; namespace ns3 { class Node; class Socket; -class TcpHeader; +class Ipv4EndPointDemux; +class Ipv4Interface; +class NscTcpSocketImpl; +class Ipv4EndPoint; +class NscInterfaceImpl; + /** * \ingroup nsctcp * * \brief Nsc wrapper glue, to interface with the Ipv4 protocol underneath. */ -class NscTcpL4Protocol : public Ipv4L4Protocol, ISendCallback, IInterruptCallback { +class NscTcpL4Protocol : public Ipv4L4Protocol { public: static const uint8_t PROT_NUMBER; static TypeId GetTypeId (void); @@ -86,6 +86,10 @@ public: Ipv4Address const &destination, Ptr incomingInterface); +protected: + virtual void DoDispose (void); + virtual void NotifyNewAggregate (); +private: // NSC callbacks. // NSC invokes these hooks to interact with the simulator. // In any case, these methods are only to be called by NSC. @@ -93,29 +97,23 @@ public: // send_callback is invoked by NSCs 'ethernet driver' to re-inject // a packet (i.e. an octet soup consisting of an IP Header, TCP Header // and user payload, if any), into ns-3. - virtual void send_callback(const void *data, int datalen); + void send_callback(const void *data, int datalen); // This is called by the NSC stack whenever something of interest // has happened, e.g. when data arrives on a socket, a listen socket // has a new connection pending, etc. - virtual void wakeup(); + void wakeup(); // This is called by the Linux stack RNG initialization. // Its also used by the cradle code to add a timestamp to // printk/printf/debug output. - virtual void gettime(unsigned int *, unsigned int *); - -protected: - virtual void DoDispose (void); - virtual void NotifyNewAggregate (); -private: - Ptr m_node; - Ipv4EndPointDemux *m_endPoints; - ObjectFactory m_rttFactory; -private: + void gettime(unsigned int *sec, unsigned int *usec); void AddInterface (void); void SoftInterrupt (void); - static ObjectFactory GetDefaultRttEstimatorFactory (void); + friend class NscInterfaceImpl; friend class NscTcpSocketImpl; + Ptr m_node; + Ipv4EndPointDemux *m_endPoints; INetStack* m_nscStack; + NscInterfaceImpl *m_nscInterface; void *m_dlopenHandle; std::string m_nscLibrary; Timer m_softTimer; diff --git a/src/internet-stack/nsc-tcp-socket-impl.cc b/src/internet-stack/nsc-tcp-socket-impl.cc index 69f4a68b7..9718b3a35 100644 --- a/src/internet-stack/nsc-tcp-socket-impl.cc +++ b/src/internet-stack/nsc-tcp-socket-impl.cc @@ -74,7 +74,6 @@ NscTcpSocketImpl::GetTypeId () m_state (CLOSED), m_closeOnEmpty (false), m_txBufferSize (0), - m_rtt (0), m_lastMeasuredRtt (Seconds(0.0)) { NS_LOG_FUNCTION (this); @@ -104,7 +103,6 @@ NscTcpSocketImpl::NscTcpSocketImpl(const NscTcpSocketImpl& sock) m_cWnd (sock.m_cWnd), m_ssThresh (sock.m_ssThresh), m_initialCWnd (sock.m_initialCWnd), - m_rtt (0), m_lastMeasuredRtt (Seconds(0.0)), m_cnTimeout (sock.m_cnTimeout), m_cnCount (sock.m_cnCount), @@ -119,11 +117,6 @@ NscTcpSocketImpl::NscTcpSocketImpl(const NscTcpSocketImpl& sock) { m_txBuffer = sock.m_txBuffer; } - //copy the rtt if necessary - if (sock.m_rtt) - { - m_rtt = sock.m_rtt->Copy(); - } //can't "copy" the endpoint just yes, must do this when we know the peer info //too; this is in SYN_ACK_TX } @@ -165,11 +158,6 @@ NscTcpSocketImpl::SetTcp (Ptr tcp) m_nscTcpSocket = tcp->m_nscStack->new_tcp_socket(); m_tcp = tcp; } -void -NscTcpSocketImpl::SetRtt (Ptr rtt) -{ - m_rtt = rtt; -} enum Socket::SocketErrno diff --git a/src/internet-stack/nsc-tcp-socket-impl.h b/src/internet-stack/nsc-tcp-socket-impl.h index fa142615c..8269dc35f 100644 --- a/src/internet-stack/nsc-tcp-socket-impl.h +++ b/src/internet-stack/nsc-tcp-socket-impl.h @@ -30,7 +30,8 @@ #include "tcp-typedefs.h" #include "pending-data.h" #include "sequence-number.h" -#include "rtt-estimator.h" + +struct INetStreamSocket; namespace ns3 { @@ -63,7 +64,6 @@ public: void SetNode (Ptr node); void SetTcp (Ptr tcp); - void SetRtt (Ptr rtt); virtual enum SocketErrno GetErrno (void) const; virtual Ptr GetNode (void) const; @@ -158,7 +158,6 @@ private: uint32_t m_initialCWnd; //Initial cWnd value // Round trip time estimation - Ptr m_rtt; Time m_lastMeasuredRtt; // Timer-related members diff --git a/src/internet-stack/tcp-l4-protocol.cc b/src/internet-stack/tcp-l4-protocol.cc index 433ea7dbd..f67234a6b 100644 --- a/src/internet-stack/tcp-l4-protocol.cc +++ b/src/internet-stack/tcp-l4-protocol.cc @@ -34,7 +34,8 @@ #include "ipv4-end-point.h" #include "ipv4-l3-protocol.h" #include "tcp-socket-factory-impl.h" - +#include "tcp-socket-impl.h" +#include "rtt-estimator.h" #include "tcp-typedefs.h" #include @@ -558,17 +559,18 @@ TcpL4Protocol::Send (Ptr packet, } void -TcpL4Protocol::SendPacket (Ptr packet, TcpHeader outgoingHeader, +TcpL4Protocol::SendPacket (Ptr packet, const TcpHeader &outgoing, Ipv4Address saddr, Ipv4Address daddr) { NS_LOG_LOGIC("TcpL4Protocol " << this - << " sending seq " << outgoingHeader.GetSequenceNumber() - << " ack " << outgoingHeader.GetAckNumber() - << " flags " << std::hex << (int)outgoingHeader.GetFlags() << std::dec + << " sending seq " << outgoing.GetSequenceNumber() + << " ack " << outgoing.GetAckNumber() + << " flags " << std::hex << (int)outgoing.GetFlags() << std::dec << " data size " << packet->GetSize()); NS_LOG_FUNCTION (this << packet << saddr << daddr); // XXX outgoingHeader cannot be logged + TcpHeader outgoingHeader = outgoing; outgoingHeader.SetLength (5); //header length in units of 32bit words /* outgoingHeader.SetUrgentPointer (0); //XXX */ if(Node::ChecksumEnabled ()) diff --git a/src/internet-stack/tcp-l4-protocol.h b/src/internet-stack/tcp-l4-protocol.h index b610471c7..67a0645ee 100644 --- a/src/internet-stack/tcp-l4-protocol.h +++ b/src/internet-stack/tcp-l4-protocol.h @@ -27,19 +27,17 @@ #include "ns3/ipv4-address.h" #include "ns3/ptr.h" #include "ns3/object-factory.h" -#include "ipv4-end-point-demux.h" #include "ipv4-l4-protocol.h" -#include "ipv4-interface.h" - -#include "tcp-socket-impl.h" -#include "tcp-header.h" -#include "tcp-typedefs.h" namespace ns3 { class Node; class Socket; class TcpHeader; +class Ipv4EndPointDemux; +class Ipv4Interface; +class TcpSocketImpl; +class Ipv4EndPoint; /** * \ingroup tcp @@ -120,7 +118,7 @@ private: ObjectFactory m_rttFactory; private: friend class TcpSocketImpl; - void SendPacket (Ptr, TcpHeader, + void SendPacket (Ptr, const TcpHeader &, Ipv4Address, Ipv4Address); static ObjectFactory GetDefaultRttEstimatorFactory (void); diff --git a/src/internet-stack/tcp-socket-impl.cc b/src/internet-stack/tcp-socket-impl.cc index bdfb06ba5..3ca7ac8f0 100644 --- a/src/internet-stack/tcp-socket-impl.cc +++ b/src/internet-stack/tcp-socket-impl.cc @@ -36,6 +36,8 @@ #include "tcp-socket-impl.h" #include "tcp-l4-protocol.h" #include "ipv4-end-point.h" +#include "tcp-header.h" +#include "rtt-estimator.h" #include diff --git a/src/internet-stack/tcp-test.cc b/src/internet-stack/tcp-test.cc index 7bf53521a..870fe050b 100644 --- a/src/internet-stack/tcp-test.cc +++ b/src/internet-stack/tcp-test.cc @@ -31,17 +31,18 @@ #include "ns3/simple-net-device.h" #include "ns3/drop-tail-queue.h" #include "ns3/config.h" +#include "ns3/ipv4-static-routing.h" +#include "ns3/ipv4-list-routing.h" +#include "ns3/node.h" +#include "ns3/inet-socket-address.h" +#include "ns3/uinteger.h" + #include "ipv4-end-point.h" #include "arp-l3-protocol.h" #include "ipv4-l3-protocol.h" #include "icmpv4-l4-protocol.h" #include "udp-l4-protocol.h" #include "tcp-l4-protocol.h" -#include "ns3/ipv4-static-routing.h" -#include "ns3/ipv4-list-routing.h" - -#include "ns3/node.h" -#include "ns3/inet-socket-address.h" #include diff --git a/src/internet-stack/udp-l4-protocol.h b/src/internet-stack/udp-l4-protocol.h index 50794d2c2..4c44280a7 100644 --- a/src/internet-stack/udp-l4-protocol.h +++ b/src/internet-stack/udp-l4-protocol.h @@ -26,7 +26,6 @@ #include "ns3/packet.h" #include "ns3/ipv4-address.h" #include "ns3/ptr.h" -#include "ipv4-end-point-demux.h" #include "ipv4-l4-protocol.h" namespace ns3 { @@ -34,6 +33,8 @@ namespace ns3 { class Node; class Socket; class Ipv4Route; +class Ipv4EndPointDemux; +class Ipv4EndPoint; /** * \ingroup udp * \brief Implementation of the UDP protocol diff --git a/src/internet-stack/wscript b/src/internet-stack/wscript index 0f1396be4..dec9a0af4 100644 --- a/src/internet-stack/wscript +++ b/src/internet-stack/wscript @@ -121,11 +121,19 @@ def build(bld): 'sequence-number.h', 'icmpv4.h', 'icmpv6-header.h', - ] + 'ipv4-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', + ] if bld.env['NSC_ENABLED']: obj.source.append ('nsc-tcp-socket-impl.cc') obj.source.append ('nsc-tcp-l4-protocol.cc') obj.source.append ('nsc-tcp-socket-factory-impl.cc') obj.source.append ('nsc-sysctl.cc') + headers.source.append('nsc-tcp-l4-protocol.h') obj.uselib = 'DL' From f5cdf259cc9f2897d4cbfd46033da0c7f188bdf5 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 31 Aug 2009 11:30:47 +0100 Subject: [PATCH 16/43] Make some copy-constructors private, remove not implemented method declarations, to make Python bindings work. --- src/internet-stack/arp-cache.h | 4 ++++ src/internet-stack/nsc-tcp-l4-protocol.h | 3 +++ src/internet-stack/pending-data.h | 1 - src/internet-stack/tcp-l4-protocol.h | 2 ++ src/routing/static-routing/ipv6-static-routing.h | 6 ------ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/internet-stack/arp-cache.h b/src/internet-stack/arp-cache.h index dfbf80a78..757ea4df2 100644 --- a/src/internet-stack/arp-cache.h +++ b/src/internet-stack/arp-cache.h @@ -48,6 +48,10 @@ class Ipv4Interface; */ class ArpCache : public Object { +private: + ArpCache (ArpCache const &); + ArpCache& operator= (ArpCache const &); + public: static TypeId GetTypeId (void); class Entry; diff --git a/src/internet-stack/nsc-tcp-l4-protocol.h b/src/internet-stack/nsc-tcp-l4-protocol.h index 91ccd5963..2095267e1 100644 --- a/src/internet-stack/nsc-tcp-l4-protocol.h +++ b/src/internet-stack/nsc-tcp-l4-protocol.h @@ -90,6 +90,9 @@ protected: virtual void DoDispose (void); virtual void NotifyNewAggregate (); private: + NscTcpL4Protocol (NscTcpL4Protocol const &); + NscTcpL4Protocol& operator= (NscTcpL4Protocol const &); + // NSC callbacks. // NSC invokes these hooks to interact with the simulator. // In any case, these methods are only to be called by NSC. diff --git a/src/internet-stack/pending-data.h b/src/internet-stack/pending-data.h index 4adec2f5c..7a4ba6d39 100644 --- a/src/internet-stack/pending-data.h +++ b/src/internet-stack/pending-data.h @@ -48,7 +48,6 @@ public: virtual ~PendingData (); // Destructor uint32_t Size () const { return size;} // Serialization - uint32_t SSize (); // Size needed for serialization uint8_t* Serialize (uint8_t*, uint32_t&); // Serialize to a buffer uint8_t* Construct (uint8_t*, uint32_t&); // Construct from buffer virtual void Clear ();// Remove all associated data diff --git a/src/internet-stack/tcp-l4-protocol.h b/src/internet-stack/tcp-l4-protocol.h index 67a0645ee..8e6087e2d 100644 --- a/src/internet-stack/tcp-l4-protocol.h +++ b/src/internet-stack/tcp-l4-protocol.h @@ -121,6 +121,8 @@ private: void SendPacket (Ptr, const TcpHeader &, Ipv4Address, Ipv4Address); static ObjectFactory GetDefaultRttEstimatorFactory (void); + TcpL4Protocol (const TcpL4Protocol &o); + TcpL4Protocol &operator = (const TcpL4Protocol &o); std::vector > m_sockets; }; diff --git a/src/routing/static-routing/ipv6-static-routing.h b/src/routing/static-routing/ipv6-static-routing.h index b786a0ff5..2593b60b2 100644 --- a/src/routing/static-routing/ipv6-static-routing.h +++ b/src/routing/static-routing/ipv6-static-routing.h @@ -186,12 +186,6 @@ class Ipv6StaticRouting : public Ipv6RoutingProtocol */ Ipv6MulticastRoutingTableEntry GetMulticastRoute (uint32_t i) const; - /** - * \brief Get the default multicast IPv6 route. - * \return default Ipv6MulticastRoute - */ - Ipv6MulticastRoutingTableEntry GetDefaultMulticastRoute () const; - /** * \brief Remove a static multicast route. * \param origin IPv6 address of the source From 43ea214b4f910f5ef72ac3c507b76241f705a181 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 31 Aug 2009 11:31:32 +0100 Subject: [PATCH 17/43] Re-scan Python bindings and use newer PyBindGen. --- bindings/python/callbacks_list.py | 1 + bindings/python/ns3_module_bridge.py | 196 +- bindings/python/ns3_module_common.py | 822 ++-- bindings/python/ns3_module_contrib.py | 262 +- bindings/python/ns3_module_core.py | 1216 +++--- bindings/python/ns3_module_csma.py | 146 +- bindings/python/ns3_module_emu.py | 172 +- bindings/python/ns3_module_global_routing.py | 114 +- bindings/python/ns3_module_helper.py | 942 +++-- bindings/python/ns3_module_internet_stack.py | 2241 ++++++++-- bindings/python/ns3_module_list_routing.py | 122 +- bindings/python/ns3_module_mobility.py | 348 +- bindings/python/ns3_module_node.py | 2628 +++++++----- bindings/python/ns3_module_olsr.py | 378 +- bindings/python/ns3_module_onoff.py | 4 +- bindings/python/ns3_module_packet_sink.py | 4 +- bindings/python/ns3_module_ping6.py | 125 + bindings/python/ns3_module_point_to_point.py | 268 +- bindings/python/ns3_module_radvd.py | 389 ++ bindings/python/ns3_module_simulator.py | 942 ++--- bindings/python/ns3_module_static_routing.py | 426 +- bindings/python/ns3_module_stats.py | 160 +- bindings/python/ns3_module_tap_bridge.py | 196 +- bindings/python/ns3_module_udp_echo.py | 30 +- bindings/python/ns3_module_v4ping.py | 14 +- .../python/ns3_module_virtual_net_device.py | 186 +- bindings/python/ns3_module_wifi.py | 3628 +++++++++-------- bindings/python/ns3modulegen_generated.py | 69 + bindings/python/wscript | 3 +- 29 files changed, 9704 insertions(+), 6328 deletions(-) create mode 100644 bindings/python/ns3_module_ping6.py create mode 100644 bindings/python/ns3_module_radvd.py diff --git a/bindings/python/callbacks_list.py b/bindings/python/callbacks_list.py index 3e1a882b1..bfe090aa6 100644 --- a/bindings/python/callbacks_list.py +++ b/bindings/python/callbacks_list.py @@ -11,5 +11,6 @@ callback_classes = [ ['bool', 'std::string', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], + ['void', 'ns3::Ptr', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ] diff --git a/bindings/python/ns3_module_bridge.py b/bindings/python/ns3_module_bridge.py index 4fdb75917..a8b911c3d 100644 --- a/bindings/python/ns3_module_bridge.py +++ b/bindings/python/ns3_module_bridge.py @@ -66,61 +66,51 @@ def register_methods(root_module): def register_Ns3BridgeChannel_methods(root_module, cls): ## bridge-channel.h: ns3::BridgeChannel::BridgeChannel(ns3::BridgeChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::BridgeChannel const &', 'arg0')]) - ## bridge-channel.h: static ns3::TypeId ns3::BridgeChannel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## bridge-channel.h: ns3::BridgeChannel::BridgeChannel() [constructor] cls.add_constructor([]) ## bridge-channel.h: void ns3::BridgeChannel::AddChannel(ns3::Ptr bridgedChannel) [member function] cls.add_method('AddChannel', 'void', [param('ns3::Ptr< ns3::Channel >', 'bridgedChannel')]) - ## bridge-channel.h: uint32_t ns3::BridgeChannel::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## bridge-channel.h: ns3::Ptr ns3::BridgeChannel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, is_virtual=True) + ## bridge-channel.h: uint32_t ns3::BridgeChannel::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## bridge-channel.h: static ns3::TypeId ns3::BridgeChannel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3BridgeNetDevice_methods(root_module, cls): ## bridge-net-device.h: ns3::BridgeNetDevice::BridgeNetDevice(ns3::BridgeNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::BridgeNetDevice const &', 'arg0')]) - ## bridge-net-device.h: static ns3::TypeId ns3::BridgeNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## bridge-net-device.h: ns3::BridgeNetDevice::BridgeNetDevice() [constructor] cls.add_constructor([]) ## bridge-net-device.h: void ns3::BridgeNetDevice::AddBridgePort(ns3::Ptr bridgePort) [member function] cls.add_method('AddBridgePort', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'bridgePort')]) - ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetNBridgePorts() const [member function] - cls.add_method('GetNBridgePorts', - 'uint32_t', + ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Address', [], - is_const=True) + is_const=True, is_virtual=True) ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetBridgePort(uint32_t n) const [member function] cls.add_method('GetBridgePort', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'n')], is_const=True) - ## bridge-net-device.h: void ns3::BridgeNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', + ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetBroadcast() const [member function] + cls.add_method('GetBroadcast', + 'ns3::Address', [], is_const=True, is_virtual=True) ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetChannel() const [member function] @@ -128,63 +118,68 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) - ## bridge-net-device.h: void ns3::BridgeNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) - ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetAddress() const [member function] - cls.add_method('GetAddress', - 'ns3::Address', + ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', [], is_const=True, is_virtual=True) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) ## bridge-net-device.h: uint16_t ns3::BridgeNetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_const=True, is_virtual=True) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## bridge-net-device.h: void ns3::BridgeNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) - ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetBroadcast() const [member function] - cls.add_method('GetBroadcast', - 'ns3::Address', - [], - is_const=True, is_virtual=True) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', - [], - is_const=True, is_virtual=True) ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) + ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv6Address', 'addr')], + is_const=True, is_virtual=True) + ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetNBridgePorts() const [member function] + cls.add_method('GetNBridgePorts', + 'uint32_t', + [], + is_const=True) + ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) + ## bridge-net-device.h: static ns3::TypeId ns3::BridgeNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBridge() const [member function] + cls.add_method('IsBridge', + 'bool', + [], + is_const=True, is_virtual=True) + ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBridge() const [member function] - cls.add_method('IsBridge', + ## bridge-net-device.h: bool ns3::BridgeNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) @@ -198,70 +193,75 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## bridge-net-device.h: void ns3::BridgeNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## bridge-net-device.h: void ns3::BridgeNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## bridge-net-device.h: void ns3::BridgeNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## bridge-net-device.h: bool ns3::BridgeNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) ## bridge-net-device.h: void ns3::BridgeNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## bridge-net-device.h: bool ns3::BridgeNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## bridge-net-device.h: void ns3::BridgeNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## bridge-net-device.h: void ns3::BridgeNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## bridge-net-device.h: void ns3::BridgeNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## bridge-net-device.h: bool ns3::BridgeNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) - ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv6Address', 'addr')], - is_const=True, is_virtual=True) ## bridge-net-device.h: void ns3::BridgeNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) - ## bridge-net-device.h: void ns3::BridgeNetDevice::ReceiveFromDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function] - cls.add_method('ReceiveFromDevice', + ## bridge-net-device.h: void ns3::BridgeNetDevice::ForwardBroadcast(ns3::Ptr incomingPort, ns3::Ptr packet, uint16_t protocol, ns3::Mac48Address src, ns3::Mac48Address dst) [member function] + cls.add_method('ForwardBroadcast', 'void', - [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')], + [param('ns3::Ptr< ns3::NetDevice >', 'incomingPort'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')], visibility='protected') ## bridge-net-device.h: void ns3::BridgeNetDevice::ForwardUnicast(ns3::Ptr incomingPort, ns3::Ptr packet, uint16_t protocol, ns3::Mac48Address src, ns3::Mac48Address dst) [member function] cls.add_method('ForwardUnicast', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'incomingPort'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')], visibility='protected') - ## bridge-net-device.h: void ns3::BridgeNetDevice::ForwardBroadcast(ns3::Ptr incomingPort, ns3::Ptr packet, uint16_t protocol, ns3::Mac48Address src, ns3::Mac48Address dst) [member function] - cls.add_method('ForwardBroadcast', - 'void', - [param('ns3::Ptr< ns3::NetDevice >', 'incomingPort'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')], + ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetLearnedState(ns3::Mac48Address source) [member function] + cls.add_method('GetLearnedState', + 'ns3::Ptr< ns3::NetDevice >', + [param('ns3::Mac48Address', 'source')], visibility='protected') ## bridge-net-device.h: void ns3::BridgeNetDevice::Learn(ns3::Mac48Address source, ns3::Ptr port) [member function] cls.add_method('Learn', 'void', [param('ns3::Mac48Address', 'source'), param('ns3::Ptr< ns3::NetDevice >', 'port')], visibility='protected') - ## bridge-net-device.h: ns3::Ptr ns3::BridgeNetDevice::GetLearnedState(ns3::Mac48Address source) [member function] - cls.add_method('GetLearnedState', - 'ns3::Ptr< ns3::NetDevice >', - [param('ns3::Mac48Address', 'source')], + ## bridge-net-device.h: void ns3::BridgeNetDevice::ReceiveFromDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function] + cls.add_method('ReceiveFromDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')], visibility='protected') return diff --git a/bindings/python/ns3_module_common.py b/bindings/python/ns3_module_common.py index 87debb26c..4175cfe55 100644 --- a/bindings/python/ns3_module_common.py +++ b/bindings/python/ns3_module_common.py @@ -148,6 +148,59 @@ def register_methods(root_module): return def register_Ns3Buffer_methods(root_module, cls): + ## buffer.h: ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] + cls.add_constructor([param('ns3::Buffer const &', 'o')]) + ## buffer.h: ns3::Buffer::Buffer() [constructor] + cls.add_constructor([]) + ## buffer.h: ns3::Buffer::Buffer(uint32_t dataSize) [constructor] + cls.add_constructor([param('uint32_t', 'dataSize')]) + ## buffer.h: bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] + cls.add_method('AddAtEnd', + 'bool', + [param('uint32_t', 'end')]) + ## buffer.h: void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] + cls.add_method('AddAtEnd', + 'void', + [param('ns3::Buffer const &', 'o')]) + ## buffer.h: bool ns3::Buffer::AddAtStart(uint32_t start) [member function] + cls.add_method('AddAtStart', + 'bool', + [param('uint32_t', 'start')]) + ## buffer.h: ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] + cls.add_method('Begin', + 'ns3::Buffer::Iterator', + [], + is_const=True) + ## buffer.h: void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] + cls.add_method('CopyData', + 'void', + [param('std::ostream *', 'os'), param('uint32_t', 'size')], + is_const=True) + ## buffer.h: ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] + cls.add_method('CreateFragment', + 'ns3::Buffer', + [param('uint32_t', 'start'), param('uint32_t', 'length')], + is_const=True) + ## buffer.h: ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] + cls.add_method('CreateFullCopy', + 'ns3::Buffer', + [], + is_const=True) + ## buffer.h: ns3::Buffer::Iterator ns3::Buffer::End() const [member function] + cls.add_method('End', + 'ns3::Buffer::Iterator', + [], + is_const=True) + ## buffer.h: int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] + cls.add_method('GetCurrentEndOffset', + 'int32_t', + [], + is_const=True) + ## buffer.h: int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] + cls.add_method('GetCurrentStartOffset', + 'int32_t', + [], + is_const=True) ## buffer.h: uint32_t ns3::Buffer::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', @@ -158,67 +211,14 @@ def register_Ns3Buffer_methods(root_module, cls): 'uint8_t const *', [], is_const=True) - ## buffer.h: bool ns3::Buffer::AddAtStart(uint32_t start) [member function] - cls.add_method('AddAtStart', - 'bool', - [param('uint32_t', 'start')]) - ## buffer.h: bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] - cls.add_method('AddAtEnd', - 'bool', - [param('uint32_t', 'end')]) - ## buffer.h: void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::Buffer const &', 'o')]) - ## buffer.h: void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'start')]) ## buffer.h: void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) - ## buffer.h: ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] - cls.add_method('CreateFragment', - 'ns3::Buffer', - [param('uint32_t', 'start'), param('uint32_t', 'length')], - is_const=True) - ## buffer.h: ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] - cls.add_method('Begin', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h: ns3::Buffer::Iterator ns3::Buffer::End() const [member function] - cls.add_method('End', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h: ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] - cls.add_method('CreateFullCopy', - 'ns3::Buffer', - [], - is_const=True) - ## buffer.h: int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] - cls.add_method('GetCurrentStartOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h: int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] - cls.add_method('GetCurrentEndOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h: void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] - cls.add_method('CopyData', + ## buffer.h: void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] + cls.add_method('RemoveAtStart', 'void', - [param('std::ostream *', 'os'), param('uint32_t', 'size')], - is_const=True) - ## buffer.h: ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] - cls.add_constructor([param('ns3::Buffer const &', 'o')]) - ## buffer.h: ns3::Buffer::Buffer() [constructor] - cls.add_constructor([]) - ## buffer.h: ns3::Buffer::Buffer(uint32_t dataSize) [constructor] - cls.add_constructor([param('uint32_t', 'dataSize')]) + [param('uint32_t', 'start')]) return def register_Ns3BufferIterator_methods(root_module, cls): @@ -226,27 +226,24 @@ def register_Ns3BufferIterator_methods(root_module, cls): cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')]) ## buffer.h: ns3::Buffer::Iterator::Iterator() [constructor] cls.add_constructor([]) - ## buffer.h: void ns3::Buffer::Iterator::Next() [member function] - cls.add_method('Next', - 'void', - []) - ## buffer.h: void ns3::Buffer::Iterator::Prev() [member function] - cls.add_method('Prev', - 'void', - []) - ## buffer.h: void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] - cls.add_method('Next', - 'void', - [param('uint32_t', 'delta')]) - ## buffer.h: void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] - cls.add_method('Prev', - 'void', - [param('uint32_t', 'delta')]) + ## buffer.h: uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] + cls.add_method('CalculateIpChecksum', + 'uint16_t', + [param('uint16_t', 'size')]) + ## buffer.h: uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] + cls.add_method('CalculateIpChecksum', + 'uint16_t', + [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) ## buffer.h: uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function] cls.add_method('GetDistanceFrom', 'uint32_t', [param('ns3::Buffer::Iterator const &', 'o')], is_const=True) + ## buffer.h: uint32_t ns3::Buffer::Iterator::GetSize() const [member function] + cls.add_method('GetSize', + 'uint32_t', + [], + is_const=True) ## buffer.h: bool ns3::Buffer::Iterator::IsEnd() const [member function] cls.add_method('IsEnd', 'bool', @@ -257,26 +254,74 @@ def register_Ns3BufferIterator_methods(root_module, cls): 'bool', [], is_const=True) - ## buffer.h: void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] - cls.add_method('WriteU8', + ## buffer.h: void ns3::Buffer::Iterator::Next() [member function] + cls.add_method('Next', 'void', - [param('uint8_t', 'data')]) - ## buffer.h: void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] - cls.add_method('WriteU8', + []) + ## buffer.h: void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] + cls.add_method('Next', 'void', - [param('uint8_t', 'data'), param('uint32_t', 'len')]) - ## buffer.h: void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', + [param('uint32_t', 'delta')]) + ## buffer.h: void ns3::Buffer::Iterator::Prev() [member function] + cls.add_method('Prev', 'void', - [param('uint16_t', 'data')]) - ## buffer.h: void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', + []) + ## buffer.h: void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] + cls.add_method('Prev', 'void', - [param('uint32_t', 'data')]) - ## buffer.h: void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] - cls.add_method('WriteU64', + [param('uint32_t', 'delta')]) + ## buffer.h: void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] + cls.add_method('Read', 'void', - [param('uint64_t', 'data')]) + [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) + ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] + cls.add_method('ReadLsbtohU16', + 'uint16_t', + []) + ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] + cls.add_method('ReadLsbtohU32', + 'uint32_t', + []) + ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] + cls.add_method('ReadLsbtohU64', + 'uint64_t', + []) + ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] + cls.add_method('ReadNtohU16', + 'uint16_t', + []) + ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] + cls.add_method('ReadNtohU32', + 'uint32_t', + []) + ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] + cls.add_method('ReadNtohU64', + 'uint64_t', + []) + ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadU16() [member function] + cls.add_method('ReadU16', + 'uint16_t', + []) + ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadU32() [member function] + cls.add_method('ReadU32', + 'uint32_t', + []) + ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadU64() [member function] + cls.add_method('ReadU64', + 'uint64_t', + []) + ## buffer.h: uint8_t ns3::Buffer::Iterator::ReadU8() [member function] + cls.add_method('ReadU8', + 'uint8_t', + []) + ## buffer.h: void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] + cls.add_method('Write', + 'void', + [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) + ## buffer.h: void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] + cls.add_method('Write', + 'void', + [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) ## buffer.h: void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function] cls.add_method('WriteHtolsbU16', 'void', @@ -301,71 +346,26 @@ def register_Ns3BufferIterator_methods(root_module, cls): cls.add_method('WriteHtonU64', 'void', [param('uint64_t', 'data')]) - ## buffer.h: void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', + ## buffer.h: void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] + cls.add_method('WriteU16', 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h: void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] - cls.add_method('Write', + [param('uint16_t', 'data')]) + ## buffer.h: void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] + cls.add_method('WriteU32', 'void', - [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) - ## buffer.h: uint8_t ns3::Buffer::Iterator::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', - []) - ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadU16() [member function] - cls.add_method('ReadU16', - 'uint16_t', - []) - ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadU32() [member function] - cls.add_method('ReadU32', - 'uint32_t', - []) - ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadU64() [member function] - cls.add_method('ReadU64', - 'uint64_t', - []) - ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] - cls.add_method('ReadNtohU16', - 'uint16_t', - []) - ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] - cls.add_method('ReadNtohU32', - 'uint32_t', - []) - ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] - cls.add_method('ReadNtohU64', - 'uint64_t', - []) - ## buffer.h: uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] - cls.add_method('ReadLsbtohU16', - 'uint16_t', - []) - ## buffer.h: uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] - cls.add_method('ReadLsbtohU32', - 'uint32_t', - []) - ## buffer.h: uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] - cls.add_method('ReadLsbtohU64', - 'uint64_t', - []) - ## buffer.h: void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', + [param('uint32_t', 'data')]) + ## buffer.h: void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] + cls.add_method('WriteU64', 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h: uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size')]) - ## buffer.h: uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) - ## buffer.h: uint32_t ns3::Buffer::Iterator::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) + [param('uint64_t', 'data')]) + ## buffer.h: void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] + cls.add_method('WriteU8', + 'void', + [param('uint8_t', 'data')]) + ## buffer.h: void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] + cls.add_method('WriteU8', + 'void', + [param('uint8_t', 'data'), param('uint32_t', 'len')]) return def register_Ns3ByteTagIterator_methods(root_module, cls): @@ -385,9 +385,9 @@ def register_Ns3ByteTagIterator_methods(root_module, cls): def register_Ns3ByteTagIteratorItem_methods(root_module, cls): ## packet.h: ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')]) - ## packet.h: ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', + ## packet.h: uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] + cls.add_method('GetEnd', + 'uint32_t', [], is_const=True) ## packet.h: uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function] @@ -395,16 +395,16 @@ def register_Ns3ByteTagIteratorItem_methods(root_module, cls): 'uint32_t', [], is_const=True) - ## packet.h: uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] - cls.add_method('GetEnd', - 'uint32_t', - [], - is_const=True) ## packet.h: void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) + ## packet.h: ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_const=True) return def register_Ns3ByteTagList_methods(root_module, cls): @@ -420,15 +420,6 @@ def register_Ns3ByteTagList_methods(root_module, cls): cls.add_method('Add', 'void', [param('ns3::ByteTagList const &', 'o')]) - ## byte-tag-list.h: void ns3::ByteTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) - ## byte-tag-list.h: ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] - cls.add_method('Begin', - 'ns3::ByteTagList::Iterator', - [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], - is_const=True) ## byte-tag-list.h: void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function] cls.add_method('AddAtEnd', 'void', @@ -437,11 +428,25 @@ def register_Ns3ByteTagList_methods(root_module, cls): cls.add_method('AddAtStart', 'void', [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')]) + ## byte-tag-list.h: ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] + cls.add_method('Begin', + 'ns3::ByteTagList::Iterator', + [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], + is_const=True) + ## byte-tag-list.h: void ns3::ByteTagList::RemoveAll() [member function] + cls.add_method('RemoveAll', + 'void', + []) return def register_Ns3ByteTagListIterator_methods(root_module, cls): ## byte-tag-list.h: ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')]) + ## byte-tag-list.h: uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] + cls.add_method('GetOffsetStart', + 'uint32_t', + [], + is_const=True) ## byte-tag-list.h: bool ns3::ByteTagList::Iterator::HasNext() const [member function] cls.add_method('HasNext', 'bool', @@ -451,28 +456,23 @@ def register_Ns3ByteTagListIterator_methods(root_module, cls): cls.add_method('Next', 'ns3::ByteTagList::Iterator::Item', []) - ## byte-tag-list.h: uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] - cls.add_method('GetOffsetStart', - 'uint32_t', - [], - is_const=True) return def register_Ns3ByteTagListIteratorItem_methods(root_module, cls): - ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::size [variable] - cls.add_instance_attribute('size', 'uint32_t', is_const=False) - ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::start [variable] - cls.add_instance_attribute('start', 'int32_t', is_const=False) - ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::end [variable] - cls.add_instance_attribute('end', 'int32_t', is_const=False) - ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::buf [variable] - cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')]) ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor] cls.add_constructor([param('ns3::TagBuffer', 'buf')]) + ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::buf [variable] + cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) + ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::end [variable] + cls.add_instance_attribute('end', 'int32_t', is_const=False) + ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::size [variable] + cls.add_instance_attribute('size', 'uint32_t', is_const=False) + ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::start [variable] + cls.add_instance_attribute('start', 'int32_t', is_const=False) + ## byte-tag-list.h: ns3::ByteTagList::Iterator::Item::tid [variable] + cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) return def register_Ns3DataRate_methods(root_module, cls): @@ -673,6 +673,40 @@ def register_Ns3Packet_methods(root_module, cls): return def register_Ns3PacketMetadata_methods(root_module, cls): + ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(uint32_t uid, uint32_t size) [constructor] + cls.add_constructor([param('uint32_t', 'uid'), param('uint32_t', 'size')]) + ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] + cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) + ## packet-metadata.h: void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] + cls.add_method('AddAtEnd', + 'void', + [param('ns3::PacketMetadata const &', 'o')]) + ## packet-metadata.h: void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] + cls.add_method('AddHeader', + 'void', + [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) + ## packet-metadata.h: void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] + cls.add_method('AddPaddingAtEnd', + 'void', + [param('uint32_t', 'end')]) + ## packet-metadata.h: void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] + cls.add_method('AddTrailer', + 'void', + [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) + ## packet-metadata.h: ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] + cls.add_method('BeginItem', + 'ns3::PacketMetadata::ItemIterator', + [param('ns3::Buffer', 'buffer')], + is_const=True) + ## packet-metadata.h: ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] + cls.add_method('CreateFragment', + 'ns3::PacketMetadata', + [param('uint32_t', 'start'), param('uint32_t', 'end')], + is_const=True) + ## packet-metadata.h: uint32_t ns3::PacketMetadata::Deserialize(ns3::Buffer::Iterator i) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'i')]) ## packet-metadata.h: static void ns3::PacketMetadata::Enable() [member function] cls.add_method('Enable', 'void', @@ -683,90 +717,56 @@ def register_Ns3PacketMetadata_methods(root_module, cls): 'void', [], is_static=True) - ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(uint32_t uid, uint32_t size) [constructor] - cls.add_constructor([param('uint32_t', 'uid'), param('uint32_t', 'size')]) - ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h: void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('AddHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h: void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('RemoveHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h: void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('AddTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h: void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('RemoveTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h: ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] - cls.add_method('CreateFragment', - 'ns3::PacketMetadata', - [param('uint32_t', 'start'), param('uint32_t', 'end')], + ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], is_const=True) - ## packet-metadata.h: void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h: void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] - cls.add_method('AddPaddingAtEnd', + ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetUid() const [member function] + cls.add_method('GetUid', + 'uint32_t', + [], + is_const=True) + ## packet-metadata.h: void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] + cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'end')]) ## packet-metadata.h: void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'start')]) - ## packet-metadata.h: void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] - cls.add_method('RemoveAtEnd', + ## packet-metadata.h: void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] + cls.add_method('RemoveHeader', 'void', - [param('uint32_t', 'end')]) - ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetUid() const [member function] - cls.add_method('GetUid', - 'uint32_t', - [], - is_const=True) - ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) + [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) + ## packet-metadata.h: void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] + cls.add_method('RemoveTrailer', + 'void', + [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) ## packet-metadata.h: void ns3::PacketMetadata::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) - ## packet-metadata.h: uint32_t ns3::PacketMetadata::Deserialize(ns3::Buffer::Iterator i) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'i')]) - ## packet-metadata.h: ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] - cls.add_method('BeginItem', - 'ns3::PacketMetadata::ItemIterator', - [param('ns3::Buffer', 'buffer')], - is_const=True) return def register_Ns3PacketMetadataItem_methods(root_module, cls): + ## packet-metadata.h: ns3::PacketMetadata::Item::Item() [constructor] + cls.add_constructor([]) + ## packet-metadata.h: ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) + ## packet-metadata.h: ns3::PacketMetadata::Item::current [variable] + cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) + ## packet-metadata.h: ns3::PacketMetadata::Item::currentSize [variable] + cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) + ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] + cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) + ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromStart [variable] + cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) ## packet-metadata.h: ns3::PacketMetadata::Item::isFragment [variable] cls.add_instance_attribute('isFragment', 'bool', is_const=False) ## packet-metadata.h: ns3::PacketMetadata::Item::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - ## packet-metadata.h: ns3::PacketMetadata::Item::currentSize [variable] - cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) - ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromStart [variable] - cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) - ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] - cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) - ## packet-metadata.h: ns3::PacketMetadata::Item::current [variable] - cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) - ## packet-metadata.h: ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) - ## packet-metadata.h: ns3::PacketMetadata::Item::Item() [constructor] - cls.add_constructor([]) return def register_Ns3PacketMetadataItemIterator_methods(root_module, cls): @@ -802,16 +802,16 @@ def register_Ns3PacketTagIterator_methods(root_module, cls): def register_Ns3PacketTagIteratorItem_methods(root_module, cls): ## packet.h: ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')]) - ## packet.h: ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) ## packet.h: void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] cls.add_method('GetTag', 'void', [param('ns3::Tag &', 'tag')], is_const=True) + ## packet.h: ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_const=True) return def register_Ns3PacketTagList_methods(root_module, cls): @@ -824,71 +824,71 @@ def register_Ns3PacketTagList_methods(root_module, cls): 'void', [param('ns3::Tag const &', 'tag')], is_const=True) - ## packet-tag-list.h: bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] - cls.add_method('Remove', - 'bool', - [param('ns3::Tag &', 'tag')]) - ## packet-tag-list.h: bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] - cls.add_method('Peek', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet-tag-list.h: void ns3::PacketTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) ## packet-tag-list.h: ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function] cls.add_method('Head', 'ns3::PacketTagList::TagData const *', [], is_const=True) + ## packet-tag-list.h: bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] + cls.add_method('Peek', + 'bool', + [param('ns3::Tag &', 'tag')], + is_const=True) + ## packet-tag-list.h: bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] + cls.add_method('Remove', + 'bool', + [param('ns3::Tag &', 'tag')]) + ## packet-tag-list.h: void ns3::PacketTagList::RemoveAll() [member function] + cls.add_method('RemoveAll', + 'void', + []) return def register_Ns3PacketTagListTagData_methods(root_module, cls): + ## packet-tag-list.h: ns3::PacketTagList::TagData::TagData() [constructor] + cls.add_constructor([]) + ## packet-tag-list.h: ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) + ## packet-tag-list.h: ns3::PacketTagList::TagData::count [variable] + cls.add_instance_attribute('count', 'uint32_t', is_const=False) ## packet-tag-list.h: ns3::PacketTagList::TagData::data [variable] cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False) ## packet-tag-list.h: ns3::PacketTagList::TagData::next [variable] cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False) ## packet-tag-list.h: ns3::PacketTagList::TagData::tid [variable] cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - ## packet-tag-list.h: ns3::PacketTagList::TagData::count [variable] - cls.add_instance_attribute('count', 'uint32_t', is_const=False) - ## packet-tag-list.h: ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) - ## packet-tag-list.h: ns3::PacketTagList::TagData::TagData() [constructor] - cls.add_constructor([]) return def register_Ns3Tag_methods(root_module, cls): - ## tag.h: ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Tag const &', 'arg0')]) ## tag.h: ns3::Tag::Tag() [constructor] cls.add_constructor([]) - ## tag.h: static ns3::TypeId ns3::Tag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## tag.h: uint32_t ns3::Tag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## tag.h: void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_pure_virtual=True, is_const=True, is_virtual=True) + ## tag.h: ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Tag const &', 'arg0')]) ## tag.h: void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_pure_virtual=True, is_virtual=True) + ## tag.h: uint32_t ns3::Tag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## tag.h: static ns3::TypeId ns3::Tag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## tag.h: void ns3::Tag::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) + ## tag.h: void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TagBuffer_methods(root_module, cls): @@ -896,41 +896,17 @@ def register_Ns3TagBuffer_methods(root_module, cls): cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')]) ## tag-buffer.h: ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor] cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')]) - ## tag-buffer.h: void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] - cls.add_method('TrimAtEnd', - 'void', - [param('uint32_t', 'trim')]) ## tag-buffer.h: void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function] cls.add_method('CopyFrom', 'void', [param('ns3::TagBuffer', 'o')]) - ## tag-buffer.h: void ns3::TagBuffer::WriteU8(uint8_t v) [member function] - cls.add_method('WriteU8', + ## tag-buffer.h: void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] + cls.add_method('Read', 'void', - [param('uint8_t', 'v')]) - ## tag-buffer.h: void ns3::TagBuffer::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', - 'void', - [param('uint16_t', 'data')]) - ## tag-buffer.h: void ns3::TagBuffer::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', - 'void', - [param('uint32_t', 'data')]) - ## tag-buffer.h: void ns3::TagBuffer::WriteU64(uint64_t v) [member function] - cls.add_method('WriteU64', - 'void', - [param('uint64_t', 'v')]) - ## tag-buffer.h: void ns3::TagBuffer::WriteDouble(double v) [member function] - cls.add_method('WriteDouble', - 'void', - [param('double', 'v')]) - ## tag-buffer.h: void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', - 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## tag-buffer.h: uint8_t ns3::TagBuffer::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', + [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) + ## tag-buffer.h: double ns3::TagBuffer::ReadDouble() [member function] + cls.add_method('ReadDouble', + 'double', []) ## tag-buffer.h: uint16_t ns3::TagBuffer::ReadU16() [member function] cls.add_method('ReadU16', @@ -944,14 +920,38 @@ def register_Ns3TagBuffer_methods(root_module, cls): cls.add_method('ReadU64', 'uint64_t', []) - ## tag-buffer.h: double ns3::TagBuffer::ReadDouble() [member function] - cls.add_method('ReadDouble', - 'double', + ## tag-buffer.h: uint8_t ns3::TagBuffer::ReadU8() [member function] + cls.add_method('ReadU8', + 'uint8_t', []) - ## tag-buffer.h: void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', + ## tag-buffer.h: void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] + cls.add_method('TrimAtEnd', 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) + [param('uint32_t', 'trim')]) + ## tag-buffer.h: void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] + cls.add_method('Write', + 'void', + [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) + ## tag-buffer.h: void ns3::TagBuffer::WriteDouble(double v) [member function] + cls.add_method('WriteDouble', + 'void', + [param('double', 'v')]) + ## tag-buffer.h: void ns3::TagBuffer::WriteU16(uint16_t data) [member function] + cls.add_method('WriteU16', + 'void', + [param('uint16_t', 'data')]) + ## tag-buffer.h: void ns3::TagBuffer::WriteU32(uint32_t data) [member function] + cls.add_method('WriteU32', + 'void', + [param('uint32_t', 'data')]) + ## tag-buffer.h: void ns3::TagBuffer::WriteU64(uint64_t v) [member function] + cls.add_method('WriteU64', + 'void', + [param('uint64_t', 'v')]) + ## tag-buffer.h: void ns3::TagBuffer::WriteU8(uint8_t v) [member function] + cls.add_method('WriteU8', + 'void', + [param('uint8_t', 'v')]) return def register_Ns3AsciiWriter_methods(root_module, cls): @@ -969,20 +969,20 @@ def register_Ns3AsciiWriter_methods(root_module, cls): return def register_Ns3Chunk_methods(root_module, cls): - ## chunk.h: ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Chunk const &', 'arg0')]) ## chunk.h: ns3::Chunk::Chunk() [constructor] cls.add_constructor([]) - ## chunk.h: static ns3::TypeId ns3::Chunk::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## chunk.h: ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Chunk const &', 'arg0')]) ## chunk.h: uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_virtual=True) + ## chunk.h: static ns3::TypeId ns3::Chunk::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## chunk.h: void ns3::Chunk::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', @@ -991,43 +991,43 @@ def register_Ns3Chunk_methods(root_module, cls): return def register_Ns3DataRateChecker_methods(root_module, cls): - ## data-rate.h: ns3::DataRateChecker::DataRateChecker(ns3::DataRateChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DataRateChecker const &', 'arg0')]) ## data-rate.h: ns3::DataRateChecker::DataRateChecker() [constructor] cls.add_constructor([]) + ## data-rate.h: ns3::DataRateChecker::DataRateChecker(ns3::DataRateChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DataRateChecker const &', 'arg0')]) return def register_Ns3DataRateValue_methods(root_module, cls): - ## data-rate.h: ns3::DataRateValue::DataRateValue(ns3::DataRateValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DataRateValue const &', 'arg0')]) ## data-rate.h: ns3::DataRateValue::DataRateValue() [constructor] cls.add_constructor([]) + ## data-rate.h: ns3::DataRateValue::DataRateValue(ns3::DataRateValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DataRateValue const &', 'arg0')]) ## data-rate.h: ns3::DataRateValue::DataRateValue(ns3::DataRate const & value) [constructor] cls.add_constructor([param('ns3::DataRate const &', 'value')]) - ## data-rate.h: void ns3::DataRateValue::Set(ns3::DataRate const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::DataRate const &', 'value')]) - ## data-rate.h: ns3::DataRate ns3::DataRateValue::Get() const [member function] - cls.add_method('Get', - 'ns3::DataRate', - [], - is_const=True) ## data-rate.h: ns3::Ptr ns3::DataRateValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## data-rate.h: std::string ns3::DataRateValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## data-rate.h: bool ns3::DataRateValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## data-rate.h: ns3::DataRate ns3::DataRateValue::Get() const [member function] + cls.add_method('Get', + 'ns3::DataRate', + [], + is_const=True) + ## data-rate.h: std::string ns3::DataRateValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## data-rate.h: void ns3::DataRateValue::Set(ns3::DataRate const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::DataRate const &', 'value')]) return def register_Ns3Header_methods(root_module, cls): @@ -1066,17 +1066,21 @@ def register_Ns3Header_methods(root_module, cls): def register_Ns3PcapWriter_methods(root_module, cls): ## pcap-writer.h: ns3::PcapWriter::PcapWriter(ns3::PcapWriter const & arg0) [copy constructor] cls.add_constructor([param('ns3::PcapWriter const &', 'arg0')]) + ## pcap-writer.h: ns3::PcapWriter::PcapWriter() [constructor] + cls.add_constructor([]) ## pcap-writer.h: static ns3::TypeId ns3::PcapWriter::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## pcap-writer.h: ns3::PcapWriter::PcapWriter() [constructor] - cls.add_constructor([]) ## pcap-writer.h: void ns3::PcapWriter::Open(std::string const & name) [member function] cls.add_method('Open', 'void', [param('std::string const &', 'name')]) + ## pcap-writer.h: void ns3::PcapWriter::SetCaptureSize(uint32_t size) [member function] + cls.add_method('SetCaptureSize', + 'void', + [param('uint32_t', 'size')]) ## pcap-writer.h: void ns3::PcapWriter::WriteEthernetHeader() [member function] cls.add_method('WriteEthernetHeader', 'void', @@ -1085,34 +1089,30 @@ def register_Ns3PcapWriter_methods(root_module, cls): cls.add_method('WriteIpHeader', 'void', []) + ## pcap-writer.h: void ns3::PcapWriter::WritePacket(ns3::Ptr packet) [member function] + cls.add_method('WritePacket', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## pcap-writer.h: void ns3::PcapWriter::WritePppHeader() [member function] + cls.add_method('WritePppHeader', + 'void', + []) ## pcap-writer.h: void ns3::PcapWriter::WriteWifiHeader() [member function] cls.add_method('WriteWifiHeader', 'void', []) + ## pcap-writer.h: void ns3::PcapWriter::WriteWifiMonitorPacket(ns3::Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, bool isTx, double signalDbm, double noiseDbm) [member function] + cls.add_method('WriteWifiMonitorPacket', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('bool', 'isTx'), param('double', 'signalDbm'), param('double', 'noiseDbm')]) + ## pcap-writer.h: void ns3::PcapWriter::WriteWifiPrismHeader() [member function] + cls.add_method('WriteWifiPrismHeader', + 'void', + []) ## pcap-writer.h: void ns3::PcapWriter::WriteWifiRadiotapHeader() [member function] cls.add_method('WriteWifiRadiotapHeader', 'void', []) - ## pcap-writer.h: void ns3::PcapWriter::WriteWifiPrismHeader() [member function] - cls.add_method('WriteWifiPrismHeader', - 'void', - []) - ## pcap-writer.h: void ns3::PcapWriter::WritePppHeader() [member function] - cls.add_method('WritePppHeader', - 'void', - []) - ## pcap-writer.h: void ns3::PcapWriter::WritePacket(ns3::Ptr packet) [member function] - cls.add_method('WritePacket', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## pcap-writer.h: void ns3::PcapWriter::WriteWifiMonitorPacket(ns3::Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, bool isTx, double signalDbm, double noiseDbm) [member function] - cls.add_method('WriteWifiMonitorPacket', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('bool', 'isTx'), param('double', 'signalDbm'), param('double', 'noiseDbm')]) - ## pcap-writer.h: void ns3::PcapWriter::SetCaptureSize(uint32_t size) [member function] - cls.add_method('SetCaptureSize', - 'void', - [param('uint32_t', 'size')]) return def register_Ns3Trailer_methods(root_module, cls): @@ -1151,34 +1151,34 @@ def register_Ns3Trailer_methods(root_module, cls): def register_Ns3ErrorModel_methods(root_module, cls): ## error-model.h: ns3::ErrorModel::ErrorModel(ns3::ErrorModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ErrorModel const &', 'arg0')]) - ## error-model.h: static ns3::TypeId ns3::ErrorModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## error-model.h: ns3::ErrorModel::ErrorModel() [constructor] cls.add_constructor([]) - ## error-model.h: bool ns3::ErrorModel::IsCorrupt(ns3::Ptr pkt) [member function] - cls.add_method('IsCorrupt', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'pkt')]) - ## error-model.h: void ns3::ErrorModel::Reset() [member function] - cls.add_method('Reset', + ## error-model.h: void ns3::ErrorModel::Disable() [member function] + cls.add_method('Disable', 'void', []) ## error-model.h: void ns3::ErrorModel::Enable() [member function] cls.add_method('Enable', 'void', []) - ## error-model.h: void ns3::ErrorModel::Disable() [member function] - cls.add_method('Disable', - 'void', - []) + ## error-model.h: static ns3::TypeId ns3::ErrorModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## error-model.h: bool ns3::ErrorModel::IsCorrupt(ns3::Ptr pkt) [member function] + cls.add_method('IsCorrupt', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'pkt')]) ## error-model.h: bool ns3::ErrorModel::IsEnabled() const [member function] cls.add_method('IsEnabled', 'bool', [], is_const=True) + ## error-model.h: void ns3::ErrorModel::Reset() [member function] + cls.add_method('Reset', + 'void', + []) ## error-model.h: bool ns3::ErrorModel::DoCorrupt(ns3::Ptr arg0) [member function] cls.add_method('DoCorrupt', 'bool', @@ -1194,11 +1194,6 @@ def register_Ns3ErrorModel_methods(root_module, cls): def register_Ns3ListErrorModel_methods(root_module, cls): ## error-model.h: ns3::ListErrorModel::ListErrorModel(ns3::ListErrorModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ListErrorModel const &', 'arg0')]) - ## error-model.h: static ns3::TypeId ns3::ListErrorModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## error-model.h: ns3::ListErrorModel::ListErrorModel() [constructor] cls.add_constructor([]) ## error-model.h: std::list > ns3::ListErrorModel::GetList() const [member function] @@ -1206,6 +1201,11 @@ def register_Ns3ListErrorModel_methods(root_module, cls): 'std::list< unsigned int >', [], is_const=True) + ## error-model.h: static ns3::TypeId ns3::ListErrorModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## error-model.h: void ns3::ListErrorModel::SetList(std::list > const & packetlist) [member function] cls.add_method('SetList', 'void', @@ -1225,42 +1225,42 @@ def register_Ns3ListErrorModel_methods(root_module, cls): 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')]) - ## error-model.h: static ns3::TypeId ns3::RateErrorModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## error-model.h: ns3::RateErrorModel::RateErrorModel() [constructor] cls.add_constructor([]) - ## error-model.h: ns3::ErrorUnit ns3::RateErrorModel::GetUnit() const [member function] - cls.add_method('GetUnit', - 'ns3::ErrorUnit', - [], - is_const=True) - ## error-model.h: void ns3::RateErrorModel::SetUnit(ns3::ErrorUnit error_unit) [member function] - cls.add_method('SetUnit', - 'void', - [param('ns3::ErrorUnit', 'error_unit')]) ## error-model.h: double ns3::RateErrorModel::GetRate() const [member function] cls.add_method('GetRate', 'double', [], is_const=True) - ## error-model.h: void ns3::RateErrorModel::SetRate(double rate) [member function] - cls.add_method('SetRate', - 'void', - [param('double', 'rate')]) + ## error-model.h: static ns3::TypeId ns3::RateErrorModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## error-model.h: ns3::ErrorUnit ns3::RateErrorModel::GetUnit() const [member function] + cls.add_method('GetUnit', + 'ns3::ErrorUnit', + [], + is_const=True) ## error-model.h: void ns3::RateErrorModel::SetRandomVariable(ns3::RandomVariable const & ranvar) [member function] cls.add_method('SetRandomVariable', 'void', [param('ns3::RandomVariable const &', 'ranvar')]) + ## error-model.h: void ns3::RateErrorModel::SetRate(double rate) [member function] + cls.add_method('SetRate', + 'void', + [param('double', 'rate')]) + ## error-model.h: void ns3::RateErrorModel::SetUnit(ns3::ErrorUnit error_unit) [member function] + cls.add_method('SetUnit', + 'void', + [param('ns3::ErrorUnit', 'error_unit')]) ## error-model.h: bool ns3::RateErrorModel::DoCorrupt(ns3::Ptr p) [member function] cls.add_method('DoCorrupt', 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## error-model.h: bool ns3::RateErrorModel::DoCorruptPkt(ns3::Ptr p) [member function] - cls.add_method('DoCorruptPkt', + ## error-model.h: bool ns3::RateErrorModel::DoCorruptBit(ns3::Ptr p) [member function] + cls.add_method('DoCorruptBit', 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) @@ -1269,8 +1269,8 @@ def register_Ns3RateErrorModel_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## error-model.h: bool ns3::RateErrorModel::DoCorruptBit(ns3::Ptr p) [member function] - cls.add_method('DoCorruptBit', + ## error-model.h: bool ns3::RateErrorModel::DoCorruptPkt(ns3::Ptr p) [member function] + cls.add_method('DoCorruptPkt', 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) diff --git a/bindings/python/ns3_module_contrib.py b/bindings/python/ns3_module_contrib.py index 9ad4041ac..ef8989f31 100644 --- a/bindings/python/ns3_module_contrib.py +++ b/bindings/python/ns3_module_contrib.py @@ -112,15 +112,6 @@ def register_Ns3DelayJitterEstimation_methods(root_module, cls): cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] cls.add_constructor([]) - ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] - cls.add_method('PrepareTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_static=True) - ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] - cls.add_method('RecordRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] cls.add_method('GetLastDelay', 'ns3::Time', @@ -131,6 +122,15 @@ def register_Ns3DelayJitterEstimation_methods(root_module, cls): 'ns3::Time', [], is_const=True) + ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] + cls.add_method('PrepareTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] + cls.add_method('RecordRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) return def register_Ns3EventGarbageCollector_methods(root_module, cls): @@ -145,14 +145,14 @@ def register_Ns3EventGarbageCollector_methods(root_module, cls): return def register_Ns3FileConfig_methods(root_module, cls): - ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) ## file-config.h: ns3::FileConfig::FileConfig() [constructor] cls.add_constructor([]) - ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', + ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) + ## file-config.h: void ns3::FileConfig::Attributes() [member function] + cls.add_method('Attributes', 'void', - [param('std::string', 'filename')], + [], is_pure_virtual=True, is_virtual=True) ## file-config.h: void ns3::FileConfig::Default() [member function] cls.add_method('Default', @@ -164,10 +164,10 @@ def register_Ns3FileConfig_methods(root_module, cls): 'void', [], is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::Attributes() [member function] - cls.add_method('Attributes', + ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', 'void', - [], + [param('std::string', 'filename')], is_pure_virtual=True, is_virtual=True) return @@ -176,11 +176,32 @@ def register_Ns3Gnuplot_methods(root_module, cls): cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) ## gnuplot.h: ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] + cls.add_method('AddDataset', + 'void', + [param('ns3::GnuplotDataset const &', 'dataset')]) + ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] + cls.add_method('AppendExtra', + 'void', + [param('std::string const &', 'extra')]) ## gnuplot.h: static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] cls.add_method('DetectTerminal', 'std::string', [param('std::string const &', 'filename')], is_static=True) + ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] + cls.add_method('GenerateOutput', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] + cls.add_method('SetExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] + cls.add_method('SetLegend', + 'void', + [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) ## gnuplot.h: void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] cls.add_method('SetTerminal', 'void', @@ -189,27 +210,6 @@ def register_Ns3Gnuplot_methods(root_module, cls): cls.add_method('SetTitle', 'void', [param('std::string const &', 'title')]) - ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] - cls.add_method('SetLegend', - 'void', - [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) - ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] - cls.add_method('AppendExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] - cls.add_method('AddDataset', - 'void', - [param('ns3::GnuplotDataset const &', 'dataset')]) - ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) return def register_Ns3GnuplotCollection_methods(root_module, cls): @@ -217,32 +217,28 @@ def register_Ns3GnuplotCollection_methods(root_module, cls): cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] cls.add_constructor([param('std::string const &', 'outputFilename')]) - ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) ## gnuplot.h: void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] cls.add_method('AddPlot', 'void', [param('ns3::Gnuplot const &', 'plot')]) - ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] - cls.add_method('GetPlot', - 'ns3::Gnuplot &', - [param('unsigned int', 'id')]) ## gnuplot.h: void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] cls.add_method('GenerateOutput', 'void', [param('std::ostream &', 'os')], is_const=True) + ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] + cls.add_method('GetPlot', + 'ns3::Gnuplot &', + [param('unsigned int', 'id')]) + ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] + cls.add_method('SetTerminal', + 'void', + [param('std::string const &', 'terminal')]) return def register_Ns3GnuplotDataset_methods(root_module, cls): ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) - ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) ## gnuplot.h: static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] cls.add_method('SetDefaultExtra', 'void', @@ -252,6 +248,10 @@ def register_Ns3GnuplotDataset_methods(root_module, cls): cls.add_method('SetExtra', 'void', [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] + cls.add_method('SetTitle', + 'void', + [param('std::string const &', 'title')]) ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], visibility='protected') @@ -262,14 +262,14 @@ def register_Ns3GtkConfigStore_methods(root_module, cls): cls.add_constructor([param('ns3::GtkConfigStore const &', 'arg0')]) ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore() [constructor] cls.add_constructor([]) - ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureAttributes() [member function] cls.add_method('ConfigureAttributes', 'void', []) + ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) return def register_Ns3NoneFileConfig_methods(root_module, cls): @@ -277,10 +277,10 @@ def register_Ns3NoneFileConfig_methods(root_module, cls): cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) ## file-config.h: ns3::NoneFileConfig::NoneFileConfig() [constructor] cls.add_constructor([]) - ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', + ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] + cls.add_method('Attributes', 'void', - [param('std::string', 'filename')], + [], is_virtual=True) ## file-config.h: void ns3::NoneFileConfig::Default() [member function] cls.add_method('Default', @@ -292,32 +292,36 @@ def register_Ns3NoneFileConfig_methods(root_module, cls): 'void', [], is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] - cls.add_method('Attributes', + ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', 'void', - [], + [param('std::string', 'filename')], is_virtual=True) return def register_Ns3ConfigStore_methods(root_module, cls): ## config-store.h: ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) - ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] + cls.add_constructor([]) + ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] + cls.add_method('ConfigureAttributes', + 'void', + []) + ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) ## config-store.h: ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) - ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] - cls.add_constructor([]) - ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::ConfigStore::Mode', 'mode')]) + ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## config-store.h: void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] cls.add_method('SetFileFormat', 'void', @@ -326,24 +330,34 @@ def register_Ns3ConfigStore_methods(root_module, cls): cls.add_method('SetFilename', 'void', [param('std::string', 'filename')]) - ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', + ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] + cls.add_method('SetMode', 'void', - []) - ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) + [param('ns3::ConfigStore::Mode', 'mode')]) return def register_Ns3FlowIdTag_methods(root_module, cls): ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) - ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] + cls.add_constructor([]) + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] + cls.add_constructor([param('uint32_t', 'flowId')]) + ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] + cls.add_method('AllocateFlowId', + 'uint32_t', [], is_static=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_virtual=True) + ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] + cls.add_method('GetFlowId', + 'uint32_t', + [], + is_const=True) ## flow-id-tag.h: ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -354,39 +368,25 @@ def register_Ns3FlowIdTag_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_virtual=True) + ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## flow-id-tag.h: void ns3::FlowIdTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] - cls.add_constructor([]) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] - cls.add_constructor([param('uint32_t', 'flowId')]) + ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_const=True, is_virtual=True) ## flow-id-tag.h: void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] cls.add_method('SetFlowId', 'void', [param('uint32_t', 'flowId')]) - ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] - cls.add_method('GetFlowId', - 'uint32_t', - [], - is_const=True) - ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] - cls.add_method('AllocateFlowId', - 'uint32_t', - [], - is_static=True) return def register_Ns3Gnuplot2dDataset_methods(root_module, cls): @@ -394,24 +394,6 @@ def register_Ns3Gnuplot2dDataset_methods(root_module, cls): cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')]) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetDefaultErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] cls.add_method('Add', 'void', @@ -428,6 +410,24 @@ def register_Ns3Gnuplot2dDataset_methods(root_module, cls): cls.add_method('AddEmptyLine', 'void', []) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetDefaultErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], + is_static=True) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetDefaultStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')]) return def register_Ns3Gnuplot2dFunction_methods(root_module, cls): @@ -446,6 +446,14 @@ def register_Ns3Gnuplot3dDataset_methods(root_module, cls): cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'z')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] + cls.add_method('AddEmptyLine', + 'void', + []) ## gnuplot.h: static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] cls.add_method('SetDefaultStyle', 'void', @@ -455,14 +463,6 @@ def register_Ns3Gnuplot3dDataset_methods(root_module, cls): cls.add_method('SetStyle', 'void', [param('std::string const &', 'style')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'z')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) return def register_Ns3Gnuplot3dFunction_methods(root_module, cls): diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index aba99b33b..835e7c4d1 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -187,11 +187,19 @@ def register_types(module): root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::BooleanValue']) ## traced-value.h: ns3::TracedValue [class] 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') typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') + typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*') + typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&') module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') + typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*') + typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&') module.add_typedef(root_module['ns3::Vector3DValue'], 'VectorValue') typehandlers.add_type_alias('ns3::Vector3DChecker', 'ns3::VectorChecker') + typehandlers.add_type_alias('ns3::Vector3DChecker*', 'ns3::VectorChecker*') + typehandlers.add_type_alias('ns3::Vector3DChecker&', 'ns3::VectorChecker&') module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') ## Register a nested module for the namespace Config @@ -335,6 +343,24 @@ def register_Ns3AttributeList_methods(root_module, cls): cls.add_constructor([]) ## attribute-list.h: ns3::AttributeList::AttributeList(ns3::AttributeList const & o) [copy constructor] cls.add_constructor([param('ns3::AttributeList const &', 'o')]) + ## attribute-list.h: bool ns3::AttributeList::DeserializeFromString(std::string value) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value')]) + ## attribute-list.h: static ns3::AttributeList * ns3::AttributeList::GetGlobal() [member function] + cls.add_method('GetGlobal', + 'ns3::AttributeList *', + [], + is_static=True) + ## attribute-list.h: void ns3::AttributeList::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## attribute-list.h: std::string ns3::AttributeList::SerializeToString() const [member function] + cls.add_method('SerializeToString', + 'std::string', + [], + is_const=True) ## attribute-list.h: void ns3::AttributeList::Set(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('Set', 'void', @@ -347,24 +373,6 @@ def register_Ns3AttributeList_methods(root_module, cls): cls.add_method('SetWithTid', 'void', [param('ns3::TypeId', 'tid'), param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## attribute-list.h: void ns3::AttributeList::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## attribute-list.h: static ns3::AttributeList * ns3::AttributeList::GetGlobal() [member function] - cls.add_method('GetGlobal', - 'ns3::AttributeList *', - [], - is_static=True) - ## attribute-list.h: std::string ns3::AttributeList::SerializeToString() const [member function] - cls.add_method('SerializeToString', - 'std::string', - [], - is_const=True) - ## attribute-list.h: bool ns3::AttributeList::DeserializeFromString(std::string value) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value')]) return def register_Ns3CallbackBase_methods(root_module, cls): @@ -400,10 +408,10 @@ def register_Ns3CallbackImplBase_methods(root_module, cls): return def register_Ns3CommandLine_methods(root_module, cls): - ## command-line.h: ns3::CommandLine::CommandLine(ns3::CommandLine const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CommandLine const &', 'arg0')]) ## command-line.h: ns3::CommandLine::CommandLine() [constructor] cls.add_constructor([]) + ## command-line.h: ns3::CommandLine::CommandLine(ns3::CommandLine const & arg0) [copy constructor] + cls.add_constructor([param('ns3::CommandLine const &', 'arg0')]) ## command-line.h: void ns3::CommandLine::AddValue(std::string const & name, std::string const & help, ns3::Callback callback) [member function] cls.add_method('AddValue', 'void', @@ -422,30 +430,11 @@ def register_Ns3GlobalValue_methods(root_module, cls): cls.add_constructor([param('ns3::GlobalValue const &', 'arg0')]) ## global-value.h: ns3::GlobalValue::GlobalValue(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr checker) [constructor] cls.add_constructor([param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) - ## global-value.h: std::string ns3::GlobalValue::GetName() const [member function] - cls.add_method('GetName', - 'std::string', + ## global-value.h: static __gnu_cxx::__normal_iterator > > ns3::GlobalValue::Begin() [member function] + cls.add_method('Begin', + '__gnu_cxx::__normal_iterator< ns3::GlobalValue * const *, std::vector< ns3::GlobalValue * > >', [], - is_const=True) - ## global-value.h: std::string ns3::GlobalValue::GetHelp() const [member function] - cls.add_method('GetHelp', - 'std::string', - [], - is_const=True) - ## global-value.h: void ns3::GlobalValue::GetValue(ns3::AttributeValue & value) const [member function] - cls.add_method('GetValue', - 'void', - [param('ns3::AttributeValue &', 'value')], - is_const=True) - ## global-value.h: ns3::Ptr ns3::GlobalValue::GetChecker() const [member function] - cls.add_method('GetChecker', - 'ns3::Ptr< ns3::AttributeChecker const >', - [], - is_const=True) - ## global-value.h: bool ns3::GlobalValue::SetValue(ns3::AttributeValue const & value) [member function] - cls.add_method('SetValue', - 'bool', - [param('ns3::AttributeValue const &', 'value')]) + is_static=True) ## global-value.h: static void ns3::GlobalValue::Bind(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('Bind', 'void', @@ -456,82 +445,101 @@ def register_Ns3GlobalValue_methods(root_module, cls): 'bool', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')], is_static=True) - ## global-value.h: static __gnu_cxx::__normal_iterator > > ns3::GlobalValue::Begin() [member function] - cls.add_method('Begin', - '__gnu_cxx::__normal_iterator< ns3::GlobalValue * const *, std::vector< ns3::GlobalValue * > >', - [], - is_static=True) ## global-value.h: static __gnu_cxx::__normal_iterator > > ns3::GlobalValue::End() [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::GlobalValue * const *, std::vector< ns3::GlobalValue * > >', [], is_static=True) + ## global-value.h: ns3::Ptr ns3::GlobalValue::GetChecker() const [member function] + cls.add_method('GetChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + [], + is_const=True) + ## global-value.h: std::string ns3::GlobalValue::GetHelp() const [member function] + cls.add_method('GetHelp', + 'std::string', + [], + is_const=True) + ## global-value.h: std::string ns3::GlobalValue::GetName() const [member function] + cls.add_method('GetName', + 'std::string', + [], + is_const=True) + ## global-value.h: void ns3::GlobalValue::GetValue(ns3::AttributeValue & value) const [member function] + cls.add_method('GetValue', + 'void', + [param('ns3::AttributeValue &', 'value')], + is_const=True) + ## global-value.h: static void ns3::GlobalValue::GetValueByName(std::string name, ns3::AttributeValue & value) [member function] + cls.add_method('GetValueByName', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], + is_static=True) ## global-value.h: static bool ns3::GlobalValue::GetValueByNameFailSafe(std::string name, ns3::AttributeValue & value) [member function] cls.add_method('GetValueByNameFailSafe', 'bool', [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], is_static=True) - ## global-value.h: static void ns3::GlobalValue::GetValueByName(std::string name, ns3::AttributeValue & value) [member function] - cls.add_method('GetValueByName', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], - is_static=True) + ## global-value.h: bool ns3::GlobalValue::SetValue(ns3::AttributeValue const & value) [member function] + cls.add_method('SetValue', + 'bool', + [param('ns3::AttributeValue const &', 'value')]) return def register_Ns3IntToType__0_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<0>::IntToType(ns3::IntToType<0> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 0 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<0>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<0>::IntToType(ns3::IntToType<0> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 0 > const &', 'arg0')]) return def register_Ns3IntToType__1_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<1>::IntToType(ns3::IntToType<1> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 1 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<1>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<1>::IntToType(ns3::IntToType<1> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 1 > const &', 'arg0')]) return def register_Ns3IntToType__2_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<2>::IntToType(ns3::IntToType<2> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 2 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<2>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<2>::IntToType(ns3::IntToType<2> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 2 > const &', 'arg0')]) return def register_Ns3IntToType__3_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<3>::IntToType(ns3::IntToType<3> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 3 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<3>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<3>::IntToType(ns3::IntToType<3> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 3 > const &', 'arg0')]) return def register_Ns3IntToType__4_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<4>::IntToType(ns3::IntToType<4> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 4 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<4>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<4>::IntToType(ns3::IntToType<4> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 4 > const &', 'arg0')]) return def register_Ns3IntToType__5_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<5>::IntToType(ns3::IntToType<5> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 5 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<5>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<5>::IntToType(ns3::IntToType<5> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 5 > const &', 'arg0')]) return def register_Ns3IntToType__6_methods(root_module, cls): - ## int-to-type.h: ns3::IntToType<6>::IntToType(ns3::IntToType<6> const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntToType< 6 > const &', 'arg0')]) ## int-to-type.h: ns3::IntToType<6>::IntToType() [constructor] cls.add_constructor([]) + ## int-to-type.h: ns3::IntToType<6>::IntToType(ns3::IntToType<6> const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntToType< 6 > const &', 'arg0')]) return def register_Ns3Names_methods(root_module, cls): - ## names.h: ns3::Names::Names(ns3::Names const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Names const &', 'arg0')]) ## names.h: ns3::Names::Names() [constructor] cls.add_constructor([]) + ## names.h: ns3::Names::Names(ns3::Names const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Names const &', 'arg0')]) ## names.h: static void ns3::Names::Add(std::string name, ns3::Ptr object) [member function] cls.add_method('Add', 'void', @@ -547,6 +555,21 @@ def register_Ns3Names_methods(root_module, cls): 'void', [param('ns3::Ptr< ns3::Object >', 'context'), param('std::string', 'name'), param('ns3::Ptr< ns3::Object >', 'object')], is_static=True) + ## names.h: static void ns3::Names::Delete() [member function] + cls.add_method('Delete', + 'void', + [], + is_static=True) + ## names.h: static std::string ns3::Names::FindName(ns3::Ptr object) [member function] + cls.add_method('FindName', + 'std::string', + [param('ns3::Ptr< ns3::Object >', 'object')], + is_static=True) + ## names.h: static std::string ns3::Names::FindPath(ns3::Ptr object) [member function] + cls.add_method('FindPath', + 'std::string', + [param('ns3::Ptr< ns3::Object >', 'object')], + is_static=True) ## names.h: static void ns3::Names::Rename(std::string oldpath, std::string newname) [member function] cls.add_method('Rename', 'void', @@ -562,46 +585,13 @@ def register_Ns3Names_methods(root_module, cls): 'void', [param('ns3::Ptr< ns3::Object >', 'context'), param('std::string', 'oldname'), param('std::string', 'newname')], is_static=True) - ## names.h: static std::string ns3::Names::FindName(ns3::Ptr object) [member function] - cls.add_method('FindName', - 'std::string', - [param('ns3::Ptr< ns3::Object >', 'object')], - is_static=True) - ## names.h: static std::string ns3::Names::FindPath(ns3::Ptr object) [member function] - cls.add_method('FindPath', - 'std::string', - [param('ns3::Ptr< ns3::Object >', 'object')], - is_static=True) - ## names.h: static void ns3::Names::Delete() [member function] - cls.add_method('Delete', - 'void', - [], - is_static=True) return def register_Ns3ObjectBase_methods(root_module, cls): - ## object-base.h: ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')]) ## object-base.h: ns3::ObjectBase::ObjectBase() [constructor] cls.add_constructor([]) - ## object-base.h: static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## object-base.h: ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## object-base.h: void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-base.h: bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttributeFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## object-base.h: ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')]) ## object-base.h: void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function] cls.add_method('GetAttribute', 'void', @@ -612,6 +602,24 @@ def register_Ns3ObjectBase_methods(root_module, cls): 'bool', [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')], is_const=True) + ## object-base.h: ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## object-base.h: static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## object-base.h: void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## object-base.h: bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttributeFailSafe', + 'bool', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## object-base.h: bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] cls.add_method('TraceConnect', 'bool', @@ -628,16 +636,16 @@ def register_Ns3ObjectBase_methods(root_module, cls): cls.add_method('TraceDisconnectWithoutContext', 'bool', [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h: void ns3::ObjectBase::NotifyConstructionCompleted() [member function] - cls.add_method('NotifyConstructionCompleted', - 'void', - [], - visibility='protected', is_virtual=True) ## object-base.h: void ns3::ObjectBase::ConstructSelf(ns3::AttributeList const & attributes) [member function] cls.add_method('ConstructSelf', 'void', [param('ns3::AttributeList const &', 'attributes')], visibility='protected') + ## object-base.h: void ns3::ObjectBase::NotifyConstructionCompleted() [member function] + cls.add_method('NotifyConstructionCompleted', + 'void', + [], + visibility='protected', is_virtual=True) return def register_Ns3ObjectFactory_methods(root_module, cls): @@ -708,80 +716,10 @@ def register_Ns3RngStream_methods(root_module, cls): cls.add_constructor([]) ## rng-stream.h: ns3::RngStream::RngStream(ns3::RngStream const & arg0) [copy constructor] cls.add_constructor([param('ns3::RngStream const &', 'arg0')]) - ## rng-stream.h: void ns3::RngStream::InitializeStream() [member function] - cls.add_method('InitializeStream', - 'void', - []) - ## rng-stream.h: void ns3::RngStream::ResetStartStream() [member function] - cls.add_method('ResetStartStream', - 'void', - []) - ## rng-stream.h: void ns3::RngStream::ResetStartSubstream() [member function] - cls.add_method('ResetStartSubstream', - 'void', - []) - ## rng-stream.h: void ns3::RngStream::ResetNextSubstream() [member function] - cls.add_method('ResetNextSubstream', - 'void', - []) - ## rng-stream.h: void ns3::RngStream::ResetNthSubstream(uint32_t N) [member function] - cls.add_method('ResetNthSubstream', - 'void', - [param('uint32_t', 'N')]) - ## rng-stream.h: void ns3::RngStream::SetAntithetic(bool a) [member function] - cls.add_method('SetAntithetic', - 'void', - [param('bool', 'a')]) - ## rng-stream.h: void ns3::RngStream::IncreasedPrecis(bool incp) [member function] - cls.add_method('IncreasedPrecis', - 'void', - [param('bool', 'incp')]) - ## rng-stream.h: bool ns3::RngStream::SetSeeds(uint32_t const * seed) [member function] - cls.add_method('SetSeeds', - 'bool', - [param('uint32_t const *', 'seed')]) ## rng-stream.h: void ns3::RngStream::AdvanceState(int32_t e, int32_t c) [member function] cls.add_method('AdvanceState', 'void', [param('int32_t', 'e'), param('int32_t', 'c')]) - ## rng-stream.h: void ns3::RngStream::GetState(uint32_t * seed) const [member function] - cls.add_method('GetState', - 'void', - [param('uint32_t *', 'seed')], - is_const=True) - ## rng-stream.h: double ns3::RngStream::RandU01() [member function] - cls.add_method('RandU01', - 'double', - []) - ## rng-stream.h: int32_t ns3::RngStream::RandInt(int32_t i, int32_t j) [member function] - cls.add_method('RandInt', - 'int32_t', - [param('int32_t', 'i'), param('int32_t', 'j')]) - ## rng-stream.h: static bool ns3::RngStream::SetPackageSeed(uint32_t seed) [member function] - cls.add_method('SetPackageSeed', - 'bool', - [param('uint32_t', 'seed')], - is_static=True) - ## rng-stream.h: static bool ns3::RngStream::SetPackageSeed(uint32_t const * seed) [member function] - cls.add_method('SetPackageSeed', - 'bool', - [param('uint32_t const *', 'seed')], - is_static=True) - ## rng-stream.h: static void ns3::RngStream::GetPackageSeed(uint32_t * seed) [member function] - cls.add_method('GetPackageSeed', - 'void', - [param('uint32_t *', 'seed')], - is_static=True) - ## rng-stream.h: static void ns3::RngStream::SetPackageRun(uint32_t run) [member function] - cls.add_method('SetPackageRun', - 'void', - [param('uint32_t', 'run')], - is_static=True) - ## rng-stream.h: static uint32_t ns3::RngStream::GetPackageRun() [member function] - cls.add_method('GetPackageRun', - 'uint32_t', - [], - is_static=True) ## rng-stream.h: static bool ns3::RngStream::CheckSeed(uint32_t const * seed) [member function] cls.add_method('CheckSeed', 'bool', @@ -792,18 +730,93 @@ def register_Ns3RngStream_methods(root_module, cls): 'bool', [param('uint32_t', 'seed')], is_static=True) + ## rng-stream.h: static uint32_t ns3::RngStream::GetPackageRun() [member function] + cls.add_method('GetPackageRun', + 'uint32_t', + [], + is_static=True) + ## rng-stream.h: static void ns3::RngStream::GetPackageSeed(uint32_t * seed) [member function] + cls.add_method('GetPackageSeed', + 'void', + [param('uint32_t *', 'seed')], + is_static=True) + ## rng-stream.h: void ns3::RngStream::GetState(uint32_t * seed) const [member function] + cls.add_method('GetState', + 'void', + [param('uint32_t *', 'seed')], + is_const=True) + ## rng-stream.h: void ns3::RngStream::IncreasedPrecis(bool incp) [member function] + cls.add_method('IncreasedPrecis', + 'void', + [param('bool', 'incp')]) + ## rng-stream.h: void ns3::RngStream::InitializeStream() [member function] + cls.add_method('InitializeStream', + 'void', + []) + ## rng-stream.h: int32_t ns3::RngStream::RandInt(int32_t i, int32_t j) [member function] + cls.add_method('RandInt', + 'int32_t', + [param('int32_t', 'i'), param('int32_t', 'j')]) + ## rng-stream.h: double ns3::RngStream::RandU01() [member function] + cls.add_method('RandU01', + 'double', + []) + ## rng-stream.h: void ns3::RngStream::ResetNextSubstream() [member function] + cls.add_method('ResetNextSubstream', + 'void', + []) + ## rng-stream.h: void ns3::RngStream::ResetNthSubstream(uint32_t N) [member function] + cls.add_method('ResetNthSubstream', + 'void', + [param('uint32_t', 'N')]) + ## rng-stream.h: void ns3::RngStream::ResetStartStream() [member function] + cls.add_method('ResetStartStream', + 'void', + []) + ## rng-stream.h: void ns3::RngStream::ResetStartSubstream() [member function] + cls.add_method('ResetStartSubstream', + 'void', + []) + ## rng-stream.h: void ns3::RngStream::SetAntithetic(bool a) [member function] + cls.add_method('SetAntithetic', + 'void', + [param('bool', 'a')]) + ## rng-stream.h: static void ns3::RngStream::SetPackageRun(uint32_t run) [member function] + cls.add_method('SetPackageRun', + 'void', + [param('uint32_t', 'run')], + is_static=True) + ## rng-stream.h: static bool ns3::RngStream::SetPackageSeed(uint32_t seed) [member function] + cls.add_method('SetPackageSeed', + 'bool', + [param('uint32_t', 'seed')], + is_static=True) + ## rng-stream.h: static bool ns3::RngStream::SetPackageSeed(uint32_t const * seed) [member function] + cls.add_method('SetPackageSeed', + 'bool', + [param('uint32_t const *', 'seed')], + is_static=True) + ## rng-stream.h: bool ns3::RngStream::SetSeeds(uint32_t const * seed) [member function] + cls.add_method('SetSeeds', + 'bool', + [param('uint32_t const *', 'seed')]) return def register_Ns3SeedManager_methods(root_module, cls): - ## random-variable.h: ns3::SeedManager::SeedManager(ns3::SeedManager const & arg0) [copy constructor] - cls.add_constructor([param('ns3::SeedManager const &', 'arg0')]) ## random-variable.h: ns3::SeedManager::SeedManager() [constructor] cls.add_constructor([]) - ## random-variable.h: static void ns3::SeedManager::SetSeed(uint32_t seed) [member function] - cls.add_method('SetSeed', - 'void', + ## random-variable.h: ns3::SeedManager::SeedManager(ns3::SeedManager const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SeedManager const &', 'arg0')]) + ## random-variable.h: static bool ns3::SeedManager::CheckSeed(uint32_t seed) [member function] + cls.add_method('CheckSeed', + 'bool', [param('uint32_t', 'seed')], is_static=True) + ## random-variable.h: static uint32_t ns3::SeedManager::GetRun() [member function] + cls.add_method('GetRun', + 'uint32_t', + [], + is_static=True) ## random-variable.h: static uint32_t ns3::SeedManager::GetSeed() [member function] cls.add_method('GetSeed', 'uint32_t', @@ -814,14 +827,9 @@ def register_Ns3SeedManager_methods(root_module, cls): 'void', [param('uint32_t', 'run')], is_static=True) - ## random-variable.h: static uint32_t ns3::SeedManager::GetRun() [member function] - cls.add_method('GetRun', - 'uint32_t', - [], - is_static=True) - ## random-variable.h: static bool ns3::SeedManager::CheckSeed(uint32_t seed) [member function] - cls.add_method('CheckSeed', - 'bool', + ## random-variable.h: static void ns3::SeedManager::SetSeed(uint32_t seed) [member function] + cls.add_method('SetSeed', + 'void', [param('uint32_t', 'seed')], is_static=True) return @@ -840,30 +848,30 @@ def register_Ns3SystemCondition_methods(root_module, cls): cls.add_constructor([param('ns3::SystemCondition const &', 'arg0')]) ## system-condition.h: ns3::SystemCondition::SystemCondition() [constructor] cls.add_constructor([]) - ## system-condition.h: void ns3::SystemCondition::SetCondition(bool condition) [member function] - cls.add_method('SetCondition', - 'void', - [param('bool', 'condition')]) - ## system-condition.h: bool ns3::SystemCondition::GetCondition() [member function] - cls.add_method('GetCondition', - 'bool', - []) - ## system-condition.h: void ns3::SystemCondition::Signal() [member function] - cls.add_method('Signal', - 'void', - []) ## system-condition.h: void ns3::SystemCondition::Broadcast() [member function] cls.add_method('Broadcast', 'void', []) - ## system-condition.h: void ns3::SystemCondition::Wait() [member function] - cls.add_method('Wait', + ## system-condition.h: bool ns3::SystemCondition::GetCondition() [member function] + cls.add_method('GetCondition', + 'bool', + []) + ## system-condition.h: void ns3::SystemCondition::SetCondition(bool condition) [member function] + cls.add_method('SetCondition', + 'void', + [param('bool', 'condition')]) + ## system-condition.h: void ns3::SystemCondition::Signal() [member function] + cls.add_method('Signal', 'void', []) ## system-condition.h: bool ns3::SystemCondition::TimedWait(uint64_t ns) [member function] cls.add_method('TimedWait', 'bool', [param('uint64_t', 'ns')]) + ## system-condition.h: void ns3::SystemCondition::Wait() [member function] + cls.add_method('Wait', + 'void', + []) return def register_Ns3SystemMutex_methods(root_module, cls): @@ -886,32 +894,32 @@ def register_Ns3SystemThread_methods(root_module, cls): cls.add_constructor([param('ns3::SystemThread const &', 'arg0')]) ## system-thread.h: ns3::SystemThread::SystemThread(ns3::Callback callback) [constructor] cls.add_constructor([param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## system-thread.h: void ns3::SystemThread::Ref() const [member function] - cls.add_method('Ref', - 'void', - [], - is_const=True) - ## system-thread.h: void ns3::SystemThread::Unref() const [member function] - cls.add_method('Unref', - 'void', - [], - is_const=True) - ## system-thread.h: void ns3::SystemThread::Start() [member function] - cls.add_method('Start', - 'void', + ## system-thread.h: bool ns3::SystemThread::Break() [member function] + cls.add_method('Break', + 'bool', []) ## system-thread.h: void ns3::SystemThread::Join() [member function] cls.add_method('Join', 'void', []) + ## system-thread.h: void ns3::SystemThread::Ref() const [member function] + cls.add_method('Ref', + 'void', + [], + is_const=True) ## system-thread.h: void ns3::SystemThread::Shutdown() [member function] cls.add_method('Shutdown', 'void', []) - ## system-thread.h: bool ns3::SystemThread::Break() [member function] - cls.add_method('Break', - 'bool', + ## system-thread.h: void ns3::SystemThread::Start() [member function] + cls.add_method('Start', + 'void', []) + ## system-thread.h: void ns3::SystemThread::Unref() const [member function] + cls.add_method('Unref', + 'void', + [], + is_const=True) return def register_Ns3SystemWallClockMs_methods(root_module, cls): @@ -919,14 +927,14 @@ def register_Ns3SystemWallClockMs_methods(root_module, cls): cls.add_constructor([param('ns3::SystemWallClockMs const &', 'arg0')]) ## system-wall-clock-ms.h: ns3::SystemWallClockMs::SystemWallClockMs() [constructor] cls.add_constructor([]) - ## system-wall-clock-ms.h: void ns3::SystemWallClockMs::Start() [member function] - cls.add_method('Start', - 'void', - []) ## system-wall-clock-ms.h: long long unsigned int ns3::SystemWallClockMs::End() [member function] cls.add_method('End', 'long long unsigned int', []) + ## system-wall-clock-ms.h: void ns3::SystemWallClockMs::Start() [member function] + cls.add_method('Start', + 'void', + []) return def register_Ns3TraceSourceAccessor_methods(root_module, cls): @@ -934,6 +942,26 @@ def register_Ns3TraceSourceAccessor_methods(root_module, cls): cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')]) ## trace-source-accessor.h: ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor] cls.add_constructor([]) + ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] + cls.add_method('Connect', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] + cls.add_method('ConnectWithoutContext', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] + cls.add_method('Disconnect', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] + cls.add_method('DisconnectWithoutContext', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) ## trace-source-accessor.h: void ns3::TraceSourceAccessor::Ref() const [member function] cls.add_method('Ref', 'void', @@ -944,26 +972,6 @@ def register_Ns3TraceSourceAccessor_methods(root_module, cls): 'void', [], is_const=True) - ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] - cls.add_method('ConnectWithoutContext', - 'bool', - [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] - cls.add_method('Connect', - 'bool', - [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] - cls.add_method('DisconnectWithoutContext', - 'bool', - [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trace-source-accessor.h: bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] - cls.add_method('Disconnect', - 'bool', - [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], - is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TriangularVariable_methods(root_module, cls): @@ -1152,18 +1160,18 @@ def register_Ns3TypeId_methods(root_module, cls): return def register_Ns3TypeIdAttributeInfo_methods(root_module, cls): - ## type-id.h: ns3::TypeId::AttributeInfo::accessor [variable] - cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) - ## type-id.h: ns3::TypeId::AttributeInfo::initialValue [variable] - cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) - ## type-id.h: ns3::TypeId::AttributeInfo::flags [variable] - cls.add_instance_attribute('flags', 'uint32_t', is_const=False) - ## type-id.h: ns3::TypeId::AttributeInfo::checker [variable] - cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) - ## type-id.h: ns3::TypeId::AttributeInfo::AttributeInfo(ns3::TypeId::AttributeInfo const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeId::AttributeInfo const &', 'arg0')]) ## type-id.h: ns3::TypeId::AttributeInfo::AttributeInfo() [constructor] cls.add_constructor([]) + ## type-id.h: ns3::TypeId::AttributeInfo::AttributeInfo(ns3::TypeId::AttributeInfo const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TypeId::AttributeInfo const &', 'arg0')]) + ## type-id.h: ns3::TypeId::AttributeInfo::accessor [variable] + cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) + ## type-id.h: ns3::TypeId::AttributeInfo::checker [variable] + cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) + ## type-id.h: ns3::TypeId::AttributeInfo::flags [variable] + cls.add_instance_attribute('flags', 'uint32_t', is_const=False) + ## type-id.h: ns3::TypeId::AttributeInfo::initialValue [variable] + cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) return def register_Ns3UniformVariable_methods(root_module, cls): @@ -1173,6 +1181,10 @@ def register_Ns3UniformVariable_methods(root_module, cls): cls.add_constructor([]) ## random-variable.h: ns3::UniformVariable::UniformVariable(double s, double l) [constructor] cls.add_constructor([param('double', 's'), param('double', 'l')]) + ## random-variable.h: uint32_t ns3::UniformVariable::GetInteger(uint32_t s, uint32_t l) [member function] + cls.add_method('GetInteger', + 'uint32_t', + [param('uint32_t', 's'), param('uint32_t', 'l')]) ## random-variable.h: double ns3::UniformVariable::GetValue() const [member function] cls.add_method('GetValue', 'double', @@ -1182,10 +1194,6 @@ def register_Ns3UniformVariable_methods(root_module, cls): cls.add_method('GetValue', 'double', [param('double', 's'), param('double', 'l')]) - ## random-variable.h: uint32_t ns3::UniformVariable::GetInteger(uint32_t s, uint32_t l) [member function] - cls.add_method('GetInteger', - 'uint32_t', - [param('uint32_t', 's'), param('uint32_t', 'l')]) return def register_Ns3UnsafeAttributeList_methods(root_module, cls): @@ -1193,15 +1201,15 @@ def register_Ns3UnsafeAttributeList_methods(root_module, cls): cls.add_constructor([]) ## attribute-list.h: ns3::UnsafeAttributeList::UnsafeAttributeList(ns3::UnsafeAttributeList const & o) [copy constructor] cls.add_constructor([param('ns3::UnsafeAttributeList const &', 'o')]) - ## attribute-list.h: void ns3::UnsafeAttributeList::Set(std::string name, ns3::AttributeValue const & param) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')]) ## attribute-list.h: ns3::AttributeList ns3::UnsafeAttributeList::GetSafe(std::string name) const [member function] cls.add_method('GetSafe', 'ns3::AttributeList', [param('std::string', 'name')], is_const=True) + ## attribute-list.h: void ns3::UnsafeAttributeList::Set(std::string name, ns3::AttributeValue const & param) [member function] + cls.add_method('Set', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')]) return def register_Ns3Vector2D_methods(root_module, cls): @@ -1257,10 +1265,10 @@ def register_Ns3ZipfVariable_methods(root_module, cls): return def register_Ns3Empty_methods(root_module, cls): - ## empty.h: ns3::empty::empty(ns3::empty const & arg0) [copy constructor] - cls.add_constructor([param('ns3::empty const &', 'arg0')]) ## empty.h: ns3::empty::empty() [constructor] cls.add_constructor([]) + ## empty.h: ns3::empty::empty(ns3::empty const & arg0) [copy constructor] + cls.add_constructor([param('ns3::empty const &', 'arg0')]) return def register_Ns3AttributeAccessor_methods(root_module, cls): @@ -1268,11 +1276,6 @@ def register_Ns3AttributeAccessor_methods(root_module, cls): cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')]) ## attribute.h: ns3::AttributeAccessor::AttributeAccessor() [constructor] cls.add_constructor([]) - ## attribute.h: bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] - cls.add_method('Set', - 'bool', - [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], - is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h: bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function] cls.add_method('Get', 'bool', @@ -1288,6 +1291,11 @@ def register_Ns3AttributeAccessor_methods(root_module, cls): 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## attribute.h: bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] + cls.add_method('Set', + 'bool', + [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], + is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeChecker_methods(root_module, cls): @@ -1300,6 +1308,21 @@ def register_Ns3AttributeChecker_methods(root_module, cls): 'bool', [param('ns3::AttributeValue const &', 'value')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## attribute.h: bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] + cls.add_method('Copy', + 'bool', + [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## attribute.h: ns3::Ptr ns3::AttributeChecker::Create() const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## attribute.h: std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] + cls.add_method('GetUnderlyingTypeInformation', + 'std::string', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h: std::string ns3::AttributeChecker::GetValueTypeName() const [member function] cls.add_method('GetValueTypeName', 'std::string', @@ -1310,21 +1333,6 @@ def register_Ns3AttributeChecker_methods(root_module, cls): 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h: std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] - cls.add_method('GetUnderlyingTypeInformation', - 'std::string', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h: ns3::Ptr ns3::AttributeChecker::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h: bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] - cls.add_method('Copy', - 'bool', - [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], - is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeValue_methods(root_module, cls): @@ -1337,23 +1345,23 @@ def register_Ns3AttributeValue_methods(root_module, cls): 'ns3::Ptr< ns3::AttributeValue >', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h: std::string ns3::AttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h: bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_pure_virtual=True, is_virtual=True) + ## attribute.h: std::string ns3::AttributeValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3BooleanChecker_methods(root_module, cls): - ## boolean.h: ns3::BooleanChecker::BooleanChecker(ns3::BooleanChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::BooleanChecker const &', 'arg0')]) ## boolean.h: ns3::BooleanChecker::BooleanChecker() [constructor] cls.add_constructor([]) + ## boolean.h: ns3::BooleanChecker::BooleanChecker(ns3::BooleanChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::BooleanChecker const &', 'arg0')]) return def register_Ns3BooleanValue_methods(root_module, cls): @@ -1391,10 +1399,10 @@ def register_Ns3BooleanValue_methods(root_module, cls): return def register_Ns3CallbackChecker_methods(root_module, cls): - ## callback.h: ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) ## callback.h: ns3::CallbackChecker::CallbackChecker() [constructor] cls.add_constructor([]) + ## callback.h: ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) return def register_Ns3CallbackValue_methods(root_module, cls): @@ -1404,25 +1412,25 @@ def register_Ns3CallbackValue_methods(root_module, cls): cls.add_constructor([]) ## callback.h: ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor] cls.add_constructor([param('ns3::CallbackBase const &', 'base')]) - ## callback.h: void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] - cls.add_method('Set', - 'void', - [param('ns3::CallbackBase', 'base')]) ## callback.h: ns3::Ptr ns3::CallbackValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## callback.h: std::string ns3::CallbackValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## callback.h: bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## callback.h: std::string ns3::CallbackValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## callback.h: void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] + cls.add_method('Set', + 'void', + [param('ns3::CallbackBase', 'base')]) return def register_Ns3ConstantVariable_methods(root_module, cls): @@ -1446,36 +1454,36 @@ def register_Ns3DeterministicVariable_methods(root_module, cls): return def register_Ns3DoubleValue_methods(root_module, cls): - ## double.h: ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) ## double.h: ns3::DoubleValue::DoubleValue() [constructor] cls.add_constructor([]) + ## double.h: ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) ## double.h: ns3::DoubleValue::DoubleValue(double const & value) [constructor] cls.add_constructor([param('double const &', 'value')]) - ## double.h: void ns3::DoubleValue::Set(double const & value) [member function] - cls.add_method('Set', - 'void', - [param('double const &', 'value')]) - ## double.h: double ns3::DoubleValue::Get() const [member function] - cls.add_method('Get', - 'double', - [], - is_const=True) ## double.h: ns3::Ptr ns3::DoubleValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## double.h: std::string ns3::DoubleValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## double.h: bool ns3::DoubleValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## double.h: double ns3::DoubleValue::Get() const [member function] + cls.add_method('Get', + 'double', + [], + is_const=True) + ## double.h: std::string ns3::DoubleValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## double.h: void ns3::DoubleValue::Set(double const & value) [member function] + cls.add_method('Set', + 'void', + [param('double const &', 'value')]) return def register_Ns3EmpiricalVariable_methods(root_module, cls): @@ -1499,16 +1507,16 @@ def register_Ns3EmptyAttributeValue_methods(root_module, cls): 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, visibility='private', is_virtual=True) - ## attribute.h: std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, visibility='private', is_virtual=True) ## attribute.h: bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], visibility='private', is_virtual=True) + ## attribute.h: std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3EnumChecker_methods(root_module, cls): @@ -1516,19 +1524,34 @@ def register_Ns3EnumChecker_methods(root_module, cls): cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')]) ## enum.h: ns3::EnumChecker::EnumChecker() [constructor] cls.add_constructor([]) - ## enum.h: void ns3::EnumChecker::AddDefault(int v, std::string name) [member function] - cls.add_method('AddDefault', - 'void', - [param('int', 'v'), param('std::string', 'name')]) ## enum.h: void ns3::EnumChecker::Add(int v, std::string name) [member function] cls.add_method('Add', 'void', [param('int', 'v'), param('std::string', 'name')]) + ## enum.h: void ns3::EnumChecker::AddDefault(int v, std::string name) [member function] + cls.add_method('AddDefault', + 'void', + [param('int', 'v'), param('std::string', 'name')]) ## enum.h: bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function] cls.add_method('Check', 'bool', [param('ns3::AttributeValue const &', 'value')], is_const=True, is_virtual=True) + ## enum.h: bool ns3::EnumChecker::Copy(ns3::AttributeValue const & src, ns3::AttributeValue & dst) const [member function] + cls.add_method('Copy', + 'bool', + [param('ns3::AttributeValue const &', 'src'), param('ns3::AttributeValue &', 'dst')], + is_const=True, is_virtual=True) + ## enum.h: ns3::Ptr ns3::EnumChecker::Create() const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## enum.h: std::string ns3::EnumChecker::GetUnderlyingTypeInformation() const [member function] + cls.add_method('GetUnderlyingTypeInformation', + 'std::string', + [], + is_const=True, is_virtual=True) ## enum.h: std::string ns3::EnumChecker::GetValueTypeName() const [member function] cls.add_method('GetValueTypeName', 'std::string', @@ -1539,21 +1562,6 @@ def register_Ns3EnumChecker_methods(root_module, cls): 'bool', [], is_const=True, is_virtual=True) - ## enum.h: std::string ns3::EnumChecker::GetUnderlyingTypeInformation() const [member function] - cls.add_method('GetUnderlyingTypeInformation', - 'std::string', - [], - is_const=True, is_virtual=True) - ## enum.h: ns3::Ptr ns3::EnumChecker::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## enum.h: bool ns3::EnumChecker::Copy(ns3::AttributeValue const & src, ns3::AttributeValue & dst) const [member function] - cls.add_method('Copy', - 'bool', - [param('ns3::AttributeValue const &', 'src'), param('ns3::AttributeValue &', 'dst')], - is_const=True, is_virtual=True) return def register_Ns3EnumValue_methods(root_module, cls): @@ -1563,30 +1571,30 @@ def register_Ns3EnumValue_methods(root_module, cls): cls.add_constructor([]) ## enum.h: ns3::EnumValue::EnumValue(int v) [constructor] cls.add_constructor([param('int', 'v')]) - ## enum.h: void ns3::EnumValue::Set(int v) [member function] - cls.add_method('Set', - 'void', - [param('int', 'v')]) - ## enum.h: int ns3::EnumValue::Get() const [member function] - cls.add_method('Get', - 'int', - [], - is_const=True) ## enum.h: ns3::Ptr ns3::EnumValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## enum.h: std::string ns3::EnumValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## enum.h: bool ns3::EnumValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## enum.h: int ns3::EnumValue::Get() const [member function] + cls.add_method('Get', + 'int', + [], + is_const=True) + ## enum.h: std::string ns3::EnumValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## enum.h: void ns3::EnumValue::Set(int v) [member function] + cls.add_method('Set', + 'void', + [param('int', 'v')]) return def register_Ns3ErlangVariable_methods(root_module, cls): @@ -1646,36 +1654,36 @@ def register_Ns3IntEmpiricalVariable_methods(root_module, cls): return def register_Ns3IntegerValue_methods(root_module, cls): - ## integer.h: ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')]) ## integer.h: ns3::IntegerValue::IntegerValue() [constructor] cls.add_constructor([]) + ## integer.h: ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')]) ## integer.h: ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor] cls.add_constructor([param('int64_t const &', 'value')]) - ## integer.h: void ns3::IntegerValue::Set(int64_t const & value) [member function] - cls.add_method('Set', - 'void', - [param('int64_t const &', 'value')]) - ## integer.h: int64_t ns3::IntegerValue::Get() const [member function] - cls.add_method('Get', - 'int64_t', - [], - is_const=True) ## integer.h: ns3::Ptr ns3::IntegerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## integer.h: std::string ns3::IntegerValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## integer.h: bool ns3::IntegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## integer.h: int64_t ns3::IntegerValue::Get() const [member function] + cls.add_method('Get', + 'int64_t', + [], + is_const=True) + ## integer.h: std::string ns3::IntegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## integer.h: void ns3::IntegerValue::Set(int64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('int64_t const &', 'value')]) return def register_Ns3LogNormalVariable_methods(root_module, cls): @@ -1697,13 +1705,21 @@ def register_Ns3NormalVariable_methods(root_module, cls): return def register_Ns3Object_methods(root_module, cls): - ## object.h: static ns3::TypeId ns3::Object::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## object.h: ns3::Object::Object() [constructor] cls.add_constructor([]) + ## object.h: void ns3::Object::AggregateObject(ns3::Ptr other) [member function] + cls.add_method('AggregateObject', + 'void', + [param('ns3::Ptr< ns3::Object >', 'other')]) + ## object.h: void ns3::Object::Dispose() [member function] + cls.add_method('Dispose', + 'void', + []) + ## object.h: ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] + cls.add_method('GetAggregateIterator', + 'ns3::Object::AggregateIterator', + [], + is_const=True) ## object.h: ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -1714,32 +1730,24 @@ def register_Ns3Object_methods(root_module, cls): 'ns3::Ptr< ns3::Object >', [param('ns3::TypeId', 'tid')], is_const=True, template_parameters=['ns3::Object'], custom_template_method_name='GetObject') - ## object.h: void ns3::Object::Dispose() [member function] - cls.add_method('Dispose', - 'void', - []) - ## object.h: void ns3::Object::AggregateObject(ns3::Ptr other) [member function] - cls.add_method('AggregateObject', - 'void', - [param('ns3::Ptr< ns3::Object >', 'other')]) - ## object.h: ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] - cls.add_method('GetAggregateIterator', - 'ns3::Object::AggregateIterator', + ## object.h: static ns3::TypeId ns3::Object::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', [], - is_const=True) - ## object.h: void ns3::Object::NotifyNewAggregate() [member function] - cls.add_method('NotifyNewAggregate', - 'void', - [], - visibility='protected', is_virtual=True) + is_static=True) + ## object.h: ns3::Object::Object(ns3::Object const & o) [copy constructor] + cls.add_constructor([param('ns3::Object const &', 'o')], + visibility='protected') ## object.h: void ns3::Object::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) - ## object.h: ns3::Object::Object(ns3::Object const & o) [copy constructor] - cls.add_constructor([param('ns3::Object const &', 'o')], - visibility='protected') + ## object.h: void ns3::Object::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) return def register_Ns3ObjectAggregateIterator_methods(root_module, cls): @@ -1759,55 +1767,50 @@ def register_Ns3ObjectAggregateIterator_methods(root_module, cls): return def register_Ns3ObjectFactoryChecker_methods(root_module, cls): - ## object-factory.h: ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) ## object-factory.h: ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] cls.add_constructor([]) + ## object-factory.h: ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) return def register_Ns3ObjectFactoryValue_methods(root_module, cls): - ## object-factory.h: ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) ## object-factory.h: ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] cls.add_constructor([]) + ## object-factory.h: ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) ## object-factory.h: ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) - ## object-factory.h: void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::ObjectFactory const &', 'value')]) - ## object-factory.h: ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] - cls.add_method('Get', - 'ns3::ObjectFactory', - [], - is_const=True) ## object-factory.h: ns3::Ptr ns3::ObjectFactoryValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## object-factory.h: std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## object-factory.h: bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## object-factory.h: ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] + cls.add_method('Get', + 'ns3::ObjectFactory', + [], + is_const=True) + ## object-factory.h: std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## object-factory.h: void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::ObjectFactory const &', 'value')]) return def register_Ns3ObjectVectorAccessor_methods(root_module, cls): - ## object-vector.h: ns3::ObjectVectorAccessor::ObjectVectorAccessor(ns3::ObjectVectorAccessor const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectVectorAccessor const &', 'arg0')]) ## object-vector.h: ns3::ObjectVectorAccessor::ObjectVectorAccessor() [constructor] cls.add_constructor([]) - ## object-vector.h: bool ns3::ObjectVectorAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] - cls.add_method('Set', - 'bool', - [param('ns3::ObjectBase *', 'object'), param('ns3::AttributeValue const &', 'value')], - is_const=True, is_virtual=True) + ## object-vector.h: ns3::ObjectVectorAccessor::ObjectVectorAccessor(ns3::ObjectVectorAccessor const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ObjectVectorAccessor const &', 'arg0')]) ## object-vector.h: bool ns3::ObjectVectorAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & value) const [member function] cls.add_method('Get', 'bool', @@ -1823,23 +1826,28 @@ def register_Ns3ObjectVectorAccessor_methods(root_module, cls): 'bool', [], is_const=True, is_virtual=True) - ## object-vector.h: bool ns3::ObjectVectorAccessor::DoGetN(ns3::ObjectBase const * object, uint32_t * n) const [member function] - cls.add_method('DoGetN', + ## object-vector.h: bool ns3::ObjectVectorAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] + cls.add_method('Set', 'bool', - [param('ns3::ObjectBase const *', 'object'), param('uint32_t *', 'n')], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + [param('ns3::ObjectBase *', 'object'), param('ns3::AttributeValue const &', 'value')], + is_const=True, is_virtual=True) ## object-vector.h: ns3::Ptr ns3::ObjectVectorAccessor::DoGet(ns3::ObjectBase const * object, uint32_t i) const [member function] cls.add_method('DoGet', 'ns3::Ptr< ns3::Object >', [param('ns3::ObjectBase const *', 'object'), param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## object-vector.h: bool ns3::ObjectVectorAccessor::DoGetN(ns3::ObjectBase const * object, uint32_t * n) const [member function] + cls.add_method('DoGetN', + 'bool', + [param('ns3::ObjectBase const *', 'object'), param('uint32_t *', 'n')], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3ObjectVectorChecker_methods(root_module, cls): - ## object-vector.h: ns3::ObjectVectorChecker::ObjectVectorChecker(ns3::ObjectVectorChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectVectorChecker const &', 'arg0')]) ## object-vector.h: ns3::ObjectVectorChecker::ObjectVectorChecker() [constructor] cls.add_constructor([]) + ## object-vector.h: ns3::ObjectVectorChecker::ObjectVectorChecker(ns3::ObjectVectorChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ObjectVectorChecker const &', 'arg0')]) ## object-vector.h: ns3::TypeId ns3::ObjectVectorChecker::GetItemTypeId() const [member function] cls.add_method('GetItemTypeId', 'ns3::TypeId', @@ -1857,36 +1865,36 @@ def register_Ns3ObjectVectorValue_methods(root_module, cls): '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >', [], is_const=True) + ## object-vector.h: ns3::Ptr ns3::ObjectVectorValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## object-vector.h: bool ns3::ObjectVectorValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) ## object-vector.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::ObjectVectorValue::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >', [], is_const=True) - ## object-vector.h: uint32_t ns3::ObjectVectorValue::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) ## object-vector.h: ns3::Ptr ns3::ObjectVectorValue::Get(uint32_t i) const [member function] cls.add_method('Get', 'ns3::Ptr< ns3::Object >', [param('uint32_t', 'i')], is_const=True) - ## object-vector.h: ns3::Ptr ns3::ObjectVectorValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', + ## object-vector.h: uint32_t ns3::ObjectVectorValue::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', [], - is_const=True, is_virtual=True) + is_const=True) ## object-vector.h: std::string ns3::ObjectVectorValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) - ## object-vector.h: bool ns3::ObjectVectorValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) return def register_Ns3ParetoVariable_methods(root_module, cls): @@ -1903,10 +1911,10 @@ def register_Ns3ParetoVariable_methods(root_module, cls): return def register_Ns3PointerChecker_methods(root_module, cls): - ## pointer.h: ns3::PointerChecker::PointerChecker(ns3::PointerChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PointerChecker const &', 'arg0')]) ## pointer.h: ns3::PointerChecker::PointerChecker() [constructor] cls.add_constructor([]) + ## pointer.h: ns3::PointerChecker::PointerChecker(ns3::PointerChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PointerChecker const &', 'arg0')]) ## pointer.h: ns3::TypeId ns3::PointerChecker::GetPointeeTypeId() const [member function] cls.add_method('GetPointeeTypeId', 'ns3::TypeId', @@ -1921,263 +1929,263 @@ def register_Ns3PointerValue_methods(root_module, cls): cls.add_constructor([]) ## pointer.h: ns3::PointerValue::PointerValue(ns3::Ptr object) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Object >', 'object')]) - ## pointer.h: void ns3::PointerValue::SetObject(ns3::Ptr object) [member function] - cls.add_method('SetObject', - 'void', - [param('ns3::Ptr< ns3::Object >', 'object')]) - ## pointer.h: ns3::Ptr ns3::PointerValue::GetObject() const [member function] - cls.add_method('GetObject', - 'ns3::Ptr< ns3::Object >', - [], - is_const=True) ## pointer.h: ns3::Ptr ns3::PointerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## pointer.h: std::string ns3::PointerValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## pointer.h: bool ns3::PointerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## pointer.h: ns3::Ptr ns3::PointerValue::GetObject() const [member function] + cls.add_method('GetObject', + 'ns3::Ptr< ns3::Object >', + [], + is_const=True) + ## pointer.h: std::string ns3::PointerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## pointer.h: void ns3::PointerValue::SetObject(ns3::Ptr object) [member function] + cls.add_method('SetObject', + 'void', + [param('ns3::Ptr< ns3::Object >', 'object')]) return def register_Ns3RandomVariableChecker_methods(root_module, cls): - ## random-variable.h: ns3::RandomVariableChecker::RandomVariableChecker(ns3::RandomVariableChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::RandomVariableChecker const &', 'arg0')]) ## random-variable.h: ns3::RandomVariableChecker::RandomVariableChecker() [constructor] cls.add_constructor([]) + ## random-variable.h: ns3::RandomVariableChecker::RandomVariableChecker(ns3::RandomVariableChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RandomVariableChecker const &', 'arg0')]) return def register_Ns3RandomVariableValue_methods(root_module, cls): - ## random-variable.h: ns3::RandomVariableValue::RandomVariableValue(ns3::RandomVariableValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::RandomVariableValue const &', 'arg0')]) ## random-variable.h: ns3::RandomVariableValue::RandomVariableValue() [constructor] cls.add_constructor([]) + ## random-variable.h: ns3::RandomVariableValue::RandomVariableValue(ns3::RandomVariableValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RandomVariableValue const &', 'arg0')]) ## random-variable.h: ns3::RandomVariableValue::RandomVariableValue(ns3::RandomVariable const & value) [constructor] cls.add_constructor([param('ns3::RandomVariable const &', 'value')]) - ## random-variable.h: void ns3::RandomVariableValue::Set(ns3::RandomVariable const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::RandomVariable const &', 'value')]) - ## random-variable.h: ns3::RandomVariable ns3::RandomVariableValue::Get() const [member function] - cls.add_method('Get', - 'ns3::RandomVariable', - [], - is_const=True) ## random-variable.h: ns3::Ptr ns3::RandomVariableValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## random-variable.h: std::string ns3::RandomVariableValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## random-variable.h: bool ns3::RandomVariableValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## random-variable.h: ns3::RandomVariable ns3::RandomVariableValue::Get() const [member function] + cls.add_method('Get', + 'ns3::RandomVariable', + [], + is_const=True) + ## random-variable.h: std::string ns3::RandomVariableValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## random-variable.h: void ns3::RandomVariableValue::Set(ns3::RandomVariable const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::RandomVariable const &', 'value')]) return def register_Ns3StringChecker_methods(root_module, cls): - ## string.h: ns3::StringChecker::StringChecker(ns3::StringChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::StringChecker const &', 'arg0')]) ## string.h: ns3::StringChecker::StringChecker() [constructor] cls.add_constructor([]) + ## string.h: ns3::StringChecker::StringChecker(ns3::StringChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::StringChecker const &', 'arg0')]) return def register_Ns3StringValue_methods(root_module, cls): - ## string.h: ns3::StringValue::StringValue(ns3::StringValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::StringValue const &', 'arg0')]) ## string.h: ns3::StringValue::StringValue() [constructor] cls.add_constructor([]) + ## string.h: ns3::StringValue::StringValue(ns3::StringValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::StringValue const &', 'arg0')]) ## string.h: ns3::StringValue::StringValue(std::string const & value) [constructor] cls.add_constructor([param('std::string const &', 'value')]) - ## string.h: void ns3::StringValue::Set(std::string const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string const &', 'value')]) - ## string.h: std::string ns3::StringValue::Get() const [member function] - cls.add_method('Get', - 'std::string', - [], - is_const=True) ## string.h: ns3::Ptr ns3::StringValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## string.h: std::string ns3::StringValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## string.h: bool ns3::StringValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## string.h: std::string ns3::StringValue::Get() const [member function] + cls.add_method('Get', + 'std::string', + [], + is_const=True) + ## string.h: std::string ns3::StringValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## string.h: void ns3::StringValue::Set(std::string const & value) [member function] + cls.add_method('Set', + 'void', + [param('std::string const &', 'value')]) return def register_Ns3TypeIdChecker_methods(root_module, cls): - ## type-id.h: ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) ## type-id.h: ns3::TypeIdChecker::TypeIdChecker() [constructor] cls.add_constructor([]) + ## type-id.h: ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) return def register_Ns3TypeIdValue_methods(root_module, cls): - ## type-id.h: ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) ## type-id.h: ns3::TypeIdValue::TypeIdValue() [constructor] cls.add_constructor([]) + ## type-id.h: ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) ## type-id.h: ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor] cls.add_constructor([param('ns3::TypeId const &', 'value')]) - ## type-id.h: void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::TypeId const &', 'value')]) - ## type-id.h: ns3::TypeId ns3::TypeIdValue::Get() const [member function] - cls.add_method('Get', - 'ns3::TypeId', - [], - is_const=True) ## type-id.h: ns3::Ptr ns3::TypeIdValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## type-id.h: std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## type-id.h: bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## type-id.h: ns3::TypeId ns3::TypeIdValue::Get() const [member function] + cls.add_method('Get', + 'ns3::TypeId', + [], + is_const=True) + ## type-id.h: std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## type-id.h: void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::TypeId const &', 'value')]) return def register_Ns3UintegerValue_methods(root_module, cls): - ## uinteger.h: ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) ## uinteger.h: ns3::UintegerValue::UintegerValue() [constructor] cls.add_constructor([]) + ## uinteger.h: ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) ## uinteger.h: ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor] cls.add_constructor([param('uint64_t const &', 'value')]) - ## uinteger.h: void ns3::UintegerValue::Set(uint64_t const & value) [member function] - cls.add_method('Set', - 'void', - [param('uint64_t const &', 'value')]) - ## uinteger.h: uint64_t ns3::UintegerValue::Get() const [member function] - cls.add_method('Get', - 'uint64_t', - [], - is_const=True) ## uinteger.h: ns3::Ptr ns3::UintegerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## uinteger.h: std::string ns3::UintegerValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## uinteger.h: bool ns3::UintegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## uinteger.h: uint64_t ns3::UintegerValue::Get() const [member function] + cls.add_method('Get', + 'uint64_t', + [], + is_const=True) + ## uinteger.h: std::string ns3::UintegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## uinteger.h: void ns3::UintegerValue::Set(uint64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('uint64_t const &', 'value')]) return def register_Ns3Vector2DChecker_methods(root_module, cls): - ## vector.h: ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')]) ## vector.h: ns3::Vector2DChecker::Vector2DChecker() [constructor] cls.add_constructor([]) + ## vector.h: ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')]) return def register_Ns3Vector2DValue_methods(root_module, cls): - ## vector.h: ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')]) ## vector.h: ns3::Vector2DValue::Vector2DValue() [constructor] cls.add_constructor([]) + ## vector.h: ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')]) ## vector.h: ns3::Vector2DValue::Vector2DValue(ns3::Vector2D const & value) [constructor] cls.add_constructor([param('ns3::Vector2D const &', 'value')]) - ## vector.h: void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Vector2D const &', 'value')]) - ## vector.h: ns3::Vector2D ns3::Vector2DValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Vector2D', - [], - is_const=True) ## vector.h: ns3::Ptr ns3::Vector2DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## vector.h: std::string ns3::Vector2DValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## vector.h: bool ns3::Vector2DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## vector.h: ns3::Vector2D ns3::Vector2DValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Vector2D', + [], + is_const=True) + ## vector.h: std::string ns3::Vector2DValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## vector.h: void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Vector2D const &', 'value')]) return def register_Ns3Vector3DChecker_methods(root_module, cls): - ## vector.h: ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')]) ## vector.h: ns3::Vector3DChecker::Vector3DChecker() [constructor] cls.add_constructor([]) + ## vector.h: ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')]) return def register_Ns3Vector3DValue_methods(root_module, cls): - ## vector.h: ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')]) ## vector.h: ns3::Vector3DValue::Vector3DValue() [constructor] cls.add_constructor([]) + ## vector.h: ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')]) ## vector.h: ns3::Vector3DValue::Vector3DValue(ns3::Vector3D const & value) [constructor] cls.add_constructor([param('ns3::Vector3D const &', 'value')]) - ## vector.h: void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Vector3D const &', 'value')]) - ## vector.h: ns3::Vector3D ns3::Vector3DValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Vector3D', - [], - is_const=True) ## vector.h: ns3::Ptr ns3::Vector3DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## vector.h: std::string ns3::Vector3DValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## vector.h: bool ns3::Vector3DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## vector.h: ns3::Vector3D ns3::Vector3DValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Vector3D', + [], + is_const=True) + ## vector.h: std::string ns3::Vector3DValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## vector.h: void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Vector3D const &', 'value')]) return def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): @@ -2195,31 +2203,31 @@ def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): cls.add_constructor([param('ns3::BooleanValue const &', 'value')]) ## traced-value.h: ns3::TracedValue::TracedValue(ns3::EnumValue const & value) [constructor] cls.add_constructor([param('ns3::EnumValue const &', 'value')]) - ## traced-value.h: void ns3::TracedValue::ConnectWithoutContext(ns3::CallbackBase const & cb) [member function] - cls.add_method('ConnectWithoutContext', - 'void', - [param('ns3::CallbackBase const &', 'cb')]) ## traced-value.h: void ns3::TracedValue::Connect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] cls.add_method('Connect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) - ## traced-value.h: void ns3::TracedValue::DisconnectWithoutContext(ns3::CallbackBase const & cb) [member function] - cls.add_method('DisconnectWithoutContext', + ## traced-value.h: void ns3::TracedValue::ConnectWithoutContext(ns3::CallbackBase const & cb) [member function] + cls.add_method('ConnectWithoutContext', 'void', [param('ns3::CallbackBase const &', 'cb')]) ## traced-value.h: void ns3::TracedValue::Disconnect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] cls.add_method('Disconnect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) - ## traced-value.h: void ns3::TracedValue::Set(unsigned int const & v) [member function] - cls.add_method('Set', + ## traced-value.h: void ns3::TracedValue::DisconnectWithoutContext(ns3::CallbackBase const & cb) [member function] + cls.add_method('DisconnectWithoutContext', 'void', - [param('unsigned int const &', 'v')]) + [param('ns3::CallbackBase const &', 'cb')]) ## traced-value.h: unsigned int ns3::TracedValue::Get() const [member function] cls.add_method('Get', 'unsigned int', [], is_const=True) + ## traced-value.h: void ns3::TracedValue::Set(unsigned int const & v) [member function] + cls.add_method('Set', + 'void', + [param('unsigned int const &', 'v')]) return def register_Ns3ConfigMatchContainer_methods(root_module, cls): @@ -2234,35 +2242,6 @@ def register_Ns3ConfigMatchContainer_methods(root_module, cls): '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >', [], is_const=True) - ## config.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::Config::MatchContainer::End() const [member function] - cls.add_method('End', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >', - [], - is_const=True) - ## config.h: uint32_t ns3::Config::MatchContainer::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) - ## config.h: ns3::Ptr ns3::Config::MatchContainer::Get(uint32_t i) const [member function] - cls.add_method('Get', - 'ns3::Ptr< ns3::Object >', - [param('uint32_t', 'i')], - is_const=True) - ## config.h: std::string ns3::Config::MatchContainer::GetMatchedPath(uint32_t i) const [member function] - cls.add_method('GetMatchedPath', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## config.h: std::string ns3::Config::MatchContainer::GetPath() const [member function] - cls.add_method('GetPath', - 'std::string', - [], - is_const=True) - ## config.h: void ns3::Config::MatchContainer::Set(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## config.h: void ns3::Config::MatchContainer::Connect(std::string name, ns3::CallbackBase const & cb) [member function] cls.add_method('Connect', 'void', @@ -2279,6 +2258,35 @@ def register_Ns3ConfigMatchContainer_methods(root_module, cls): cls.add_method('DisconnectWithoutContext', 'void', [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) + ## config.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::Config::MatchContainer::End() const [member function] + cls.add_method('End', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >', + [], + is_const=True) + ## config.h: ns3::Ptr ns3::Config::MatchContainer::Get(uint32_t i) const [member function] + cls.add_method('Get', + 'ns3::Ptr< ns3::Object >', + [param('uint32_t', 'i')], + is_const=True) + ## config.h: std::string ns3::Config::MatchContainer::GetMatchedPath(uint32_t i) const [member function] + cls.add_method('GetMatchedPath', + 'std::string', + [param('uint32_t', 'i')], + is_const=True) + ## config.h: uint32_t ns3::Config::MatchContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) + ## config.h: std::string ns3::Config::MatchContainer::GetPath() const [member function] + cls.add_method('GetPath', + 'std::string', + [], + is_const=True) + ## config.h: void ns3::Config::MatchContainer::Set(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('Set', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return def register_functions(root_module): diff --git a/bindings/python/ns3_module_csma.py b/bindings/python/ns3_module_csma.py index 9f464f0d7..e87252cd9 100644 --- a/bindings/python/ns3_module_csma.py +++ b/bindings/python/ns3_module_csma.py @@ -74,16 +74,6 @@ def register_methods(root_module): return def register_Ns3Backoff_methods(root_module, cls): - ## backoff.h: ns3::Backoff::m_minSlots [variable] - cls.add_instance_attribute('m_minSlots', 'uint32_t', is_const=False) - ## backoff.h: ns3::Backoff::m_maxSlots [variable] - cls.add_instance_attribute('m_maxSlots', 'uint32_t', is_const=False) - ## backoff.h: ns3::Backoff::m_ceiling [variable] - cls.add_instance_attribute('m_ceiling', 'uint32_t', is_const=False) - ## backoff.h: ns3::Backoff::m_maxRetries [variable] - cls.add_instance_attribute('m_maxRetries', 'uint32_t', is_const=False) - ## backoff.h: ns3::Backoff::m_slotTime [variable] - cls.add_instance_attribute('m_slotTime', 'ns3::Time', is_const=False) ## backoff.h: ns3::Backoff::Backoff(ns3::Backoff const & arg0) [copy constructor] cls.add_constructor([param('ns3::Backoff const &', 'arg0')]) ## backoff.h: ns3::Backoff::Backoff() [constructor] @@ -94,25 +84,31 @@ def register_Ns3Backoff_methods(root_module, cls): cls.add_method('GetBackoffTime', 'ns3::Time', []) - ## backoff.h: void ns3::Backoff::ResetBackoffTime() [member function] - cls.add_method('ResetBackoffTime', + ## backoff.h: void ns3::Backoff::IncrNumRetries() [member function] + cls.add_method('IncrNumRetries', 'void', []) ## backoff.h: bool ns3::Backoff::MaxRetriesReached() [member function] cls.add_method('MaxRetriesReached', 'bool', []) - ## backoff.h: void ns3::Backoff::IncrNumRetries() [member function] - cls.add_method('IncrNumRetries', + ## backoff.h: void ns3::Backoff::ResetBackoffTime() [member function] + cls.add_method('ResetBackoffTime', 'void', []) + ## backoff.h: ns3::Backoff::m_ceiling [variable] + cls.add_instance_attribute('m_ceiling', 'uint32_t', is_const=False) + ## backoff.h: ns3::Backoff::m_maxRetries [variable] + cls.add_instance_attribute('m_maxRetries', 'uint32_t', is_const=False) + ## backoff.h: ns3::Backoff::m_maxSlots [variable] + cls.add_instance_attribute('m_maxSlots', 'uint32_t', is_const=False) + ## backoff.h: ns3::Backoff::m_minSlots [variable] + cls.add_instance_attribute('m_minSlots', 'uint32_t', is_const=False) + ## backoff.h: ns3::Backoff::m_slotTime [variable] + cls.add_instance_attribute('m_slotTime', 'ns3::Time', is_const=False) return def register_Ns3CsmaDeviceRec_methods(root_module, cls): - ## csma-channel.h: ns3::CsmaDeviceRec::devicePtr [variable] - cls.add_instance_attribute('devicePtr', 'ns3::Ptr< ns3::CsmaNetDevice >', is_const=False) - ## csma-channel.h: ns3::CsmaDeviceRec::active [variable] - cls.add_instance_attribute('active', 'bool', is_const=False) ## csma-channel.h: ns3::CsmaDeviceRec::CsmaDeviceRec(ns3::CsmaDeviceRec const & arg0) [copy constructor] cls.add_constructor([param('ns3::CsmaDeviceRec const &', 'arg0')]) ## csma-channel.h: ns3::CsmaDeviceRec::CsmaDeviceRec() [constructor] @@ -123,16 +119,15 @@ def register_Ns3CsmaDeviceRec_methods(root_module, cls): cls.add_method('IsActive', 'bool', []) + ## csma-channel.h: ns3::CsmaDeviceRec::active [variable] + cls.add_instance_attribute('active', 'bool', is_const=False) + ## csma-channel.h: ns3::CsmaDeviceRec::devicePtr [variable] + cls.add_instance_attribute('devicePtr', 'ns3::Ptr< ns3::CsmaNetDevice >', is_const=False) return def register_Ns3CsmaChannel_methods(root_module, cls): ## csma-channel.h: ns3::CsmaChannel::CsmaChannel(ns3::CsmaChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::CsmaChannel const &', 'arg0')]) - ## csma-channel.h: static ns3::TypeId ns3::CsmaChannel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## csma-channel.h: ns3::CsmaChannel::CsmaChannel() [constructor] cls.add_constructor([]) ## csma-channel.h: int32_t ns3::CsmaChannel::Attach(ns3::Ptr device) [member function] @@ -147,56 +142,6 @@ def register_Ns3CsmaChannel_methods(root_module, cls): cls.add_method('Detach', 'bool', [param('uint32_t', 'deviceId')]) - ## csma-channel.h: bool ns3::CsmaChannel::Reattach(uint32_t deviceId) [member function] - cls.add_method('Reattach', - 'bool', - [param('uint32_t', 'deviceId')]) - ## csma-channel.h: bool ns3::CsmaChannel::Reattach(ns3::Ptr device) [member function] - cls.add_method('Reattach', - 'bool', - [param('ns3::Ptr< ns3::CsmaNetDevice >', 'device')]) - ## csma-channel.h: bool ns3::CsmaChannel::TransmitStart(ns3::Ptr p, uint32_t srcId) [member function] - cls.add_method('TransmitStart', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'srcId')]) - ## csma-channel.h: bool ns3::CsmaChannel::TransmitEnd() [member function] - cls.add_method('TransmitEnd', - 'bool', - []) - ## csma-channel.h: void ns3::CsmaChannel::PropagationCompleteEvent() [member function] - cls.add_method('PropagationCompleteEvent', - 'void', - []) - ## csma-channel.h: int32_t ns3::CsmaChannel::GetDeviceNum(ns3::Ptr device) [member function] - cls.add_method('GetDeviceNum', - 'int32_t', - [param('ns3::Ptr< ns3::CsmaNetDevice >', 'device')]) - ## csma-channel.h: ns3::WireState ns3::CsmaChannel::GetState() [member function] - cls.add_method('GetState', - 'ns3::WireState', - []) - ## csma-channel.h: bool ns3::CsmaChannel::IsBusy() [member function] - cls.add_method('IsBusy', - 'bool', - []) - ## csma-channel.h: bool ns3::CsmaChannel::IsActive(uint32_t deviceId) [member function] - cls.add_method('IsActive', - 'bool', - [param('uint32_t', 'deviceId')]) - ## csma-channel.h: uint32_t ns3::CsmaChannel::GetNumActDevices() [member function] - cls.add_method('GetNumActDevices', - 'uint32_t', - []) - ## csma-channel.h: uint32_t ns3::CsmaChannel::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## csma-channel.h: ns3::Ptr ns3::CsmaChannel::GetDevice(uint32_t i) const [member function] - cls.add_method('GetDevice', - 'ns3::Ptr< ns3::NetDevice >', - [param('uint32_t', 'i')], - is_const=True, is_virtual=True) ## csma-channel.h: ns3::Ptr ns3::CsmaChannel::GetCsmaDevice(uint32_t i) const [member function] cls.add_method('GetCsmaDevice', 'ns3::Ptr< ns3::CsmaNetDevice >', @@ -210,6 +155,61 @@ def register_Ns3CsmaChannel_methods(root_module, cls): cls.add_method('GetDelay', 'ns3::Time', []) + ## csma-channel.h: ns3::Ptr ns3::CsmaChannel::GetDevice(uint32_t i) const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## csma-channel.h: int32_t ns3::CsmaChannel::GetDeviceNum(ns3::Ptr device) [member function] + cls.add_method('GetDeviceNum', + 'int32_t', + [param('ns3::Ptr< ns3::CsmaNetDevice >', 'device')]) + ## csma-channel.h: uint32_t ns3::CsmaChannel::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## csma-channel.h: uint32_t ns3::CsmaChannel::GetNumActDevices() [member function] + cls.add_method('GetNumActDevices', + 'uint32_t', + []) + ## csma-channel.h: ns3::WireState ns3::CsmaChannel::GetState() [member function] + cls.add_method('GetState', + 'ns3::WireState', + []) + ## csma-channel.h: static ns3::TypeId ns3::CsmaChannel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## csma-channel.h: bool ns3::CsmaChannel::IsActive(uint32_t deviceId) [member function] + cls.add_method('IsActive', + 'bool', + [param('uint32_t', 'deviceId')]) + ## csma-channel.h: bool ns3::CsmaChannel::IsBusy() [member function] + cls.add_method('IsBusy', + 'bool', + []) + ## csma-channel.h: void ns3::CsmaChannel::PropagationCompleteEvent() [member function] + cls.add_method('PropagationCompleteEvent', + 'void', + []) + ## csma-channel.h: bool ns3::CsmaChannel::Reattach(uint32_t deviceId) [member function] + cls.add_method('Reattach', + 'bool', + [param('uint32_t', 'deviceId')]) + ## csma-channel.h: bool ns3::CsmaChannel::Reattach(ns3::Ptr device) [member function] + cls.add_method('Reattach', + 'bool', + [param('ns3::Ptr< ns3::CsmaNetDevice >', 'device')]) + ## csma-channel.h: bool ns3::CsmaChannel::TransmitEnd() [member function] + cls.add_method('TransmitEnd', + 'bool', + []) + ## csma-channel.h: bool ns3::CsmaChannel::TransmitStart(ns3::Ptr p, uint32_t srcId) [member function] + cls.add_method('TransmitStart', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'srcId')]) return def register_Ns3CsmaNetDevice_methods(root_module, cls): diff --git a/bindings/python/ns3_module_emu.py b/bindings/python/ns3_module_emu.py index 30c73588d..95699fb80 100644 --- a/bindings/python/ns3_module_emu.py +++ b/bindings/python/ns3_module_emu.py @@ -63,87 +63,31 @@ def register_methods(root_module): def register_Ns3EmuNetDevice_methods(root_module, cls): ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice(ns3::EmuNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::EmuNetDevice const &', 'arg0')]) - ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice() [constructor] cls.add_constructor([]) - ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function] - cls.add_method('SetDataRate', - 'void', - [param('ns3::DataRate', 'bps')]) - ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function] - cls.add_method('Start', - 'void', - [param('ns3::Time', 'tStart')]) - ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function] - cls.add_method('Stop', - 'void', - [param('ns3::Time', 'tStop')]) - ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr queue) [member function] - cls.add_method('SetQueue', - 'void', - [param('ns3::Ptr< ns3::Queue >', 'queue')]) - ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## emu-net-device.h: ns3::Ptr ns3::EmuNetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], - is_const=True, is_virtual=True) - ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) - ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) - ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', - [], - is_const=True, is_virtual=True) - ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) - ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', + ## emu-net-device.h: ns3::Ptr ns3::EmuNetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', [], is_const=True, is_virtual=True) ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] @@ -156,13 +100,43 @@ def register_Ns3EmuNetDevice_methods(root_module, cls): 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_const=True, is_virtual=True) + ## emu-net-device.h: ns3::Ptr ns3::EmuNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## emu-net-device.h: bool ns3::EmuNetDevice::IsBridge() const [member function] + cls.add_method('IsBridge', + 'bool', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) ## emu-net-device.h: bool ns3::EmuNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) - ## emu-net-device.h: bool ns3::EmuNetDevice::IsBridge() const [member function] - cls.add_method('IsBridge', + ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) @@ -176,31 +150,57 @@ def register_Ns3EmuNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## emu-net-device.h: ns3::Ptr ns3::EmuNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function] + cls.add_method('SetDataRate', + 'void', + [param('ns3::DataRate', 'bps')]) + ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) ## emu-net-device.h: void ns3::EmuNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## emu-net-device.h: void ns3::EmuNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## emu-net-device.h: void ns3::EmuNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr queue) [member function] + cls.add_method('SetQueue', + 'void', + [param('ns3::Ptr< ns3::Queue >', 'queue')]) + ## emu-net-device.h: void ns3::EmuNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function] + cls.add_method('Start', + 'void', + [param('ns3::Time', 'tStart')]) + ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function] + cls.add_method('Stop', + 'void', + [param('ns3::Time', 'tStop')]) ## emu-net-device.h: bool ns3::EmuNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', diff --git a/bindings/python/ns3_module_global_routing.py b/bindings/python/ns3_module_global_routing.py index 9f3bda083..9bbf85ea6 100644 --- a/bindings/python/ns3_module_global_routing.py +++ b/bindings/python/ns3_module_global_routing.py @@ -228,38 +228,38 @@ def register_Ns3GlobalRoutingLinkRecord_methods(root_module, cls): cls.add_constructor([]) ## global-router-interface.h: ns3::GlobalRoutingLinkRecord::GlobalRoutingLinkRecord(ns3::GlobalRoutingLinkRecord::LinkType linkType, ns3::Ipv4Address linkId, ns3::Ipv4Address linkData, uint16_t metric) [constructor] cls.add_constructor([param('ns3::GlobalRoutingLinkRecord::LinkType', 'linkType'), param('ns3::Ipv4Address', 'linkId'), param('ns3::Ipv4Address', 'linkData'), param('uint16_t', 'metric')]) + ## global-router-interface.h: ns3::Ipv4Address ns3::GlobalRoutingLinkRecord::GetLinkData() const [member function] + cls.add_method('GetLinkData', + 'ns3::Ipv4Address', + [], + is_const=True) ## global-router-interface.h: ns3::Ipv4Address ns3::GlobalRoutingLinkRecord::GetLinkId() const [member function] cls.add_method('GetLinkId', 'ns3::Ipv4Address', [], is_const=True) - ## global-router-interface.h: void ns3::GlobalRoutingLinkRecord::SetLinkId(ns3::Ipv4Address addr) [member function] - cls.add_method('SetLinkId', - 'void', - [param('ns3::Ipv4Address', 'addr')]) - ## global-router-interface.h: ns3::Ipv4Address ns3::GlobalRoutingLinkRecord::GetLinkData() const [member function] - cls.add_method('GetLinkData', - 'ns3::Ipv4Address', + ## global-router-interface.h: ns3::GlobalRoutingLinkRecord::LinkType ns3::GlobalRoutingLinkRecord::GetLinkType() const [member function] + cls.add_method('GetLinkType', + 'ns3::GlobalRoutingLinkRecord::LinkType', + [], + is_const=True) + ## global-router-interface.h: uint16_t ns3::GlobalRoutingLinkRecord::GetMetric() const [member function] + cls.add_method('GetMetric', + 'uint16_t', [], is_const=True) ## global-router-interface.h: void ns3::GlobalRoutingLinkRecord::SetLinkData(ns3::Ipv4Address addr) [member function] cls.add_method('SetLinkData', 'void', [param('ns3::Ipv4Address', 'addr')]) - ## global-router-interface.h: ns3::GlobalRoutingLinkRecord::LinkType ns3::GlobalRoutingLinkRecord::GetLinkType() const [member function] - cls.add_method('GetLinkType', - 'ns3::GlobalRoutingLinkRecord::LinkType', - [], - is_const=True) + ## global-router-interface.h: void ns3::GlobalRoutingLinkRecord::SetLinkId(ns3::Ipv4Address addr) [member function] + cls.add_method('SetLinkId', + 'void', + [param('ns3::Ipv4Address', 'addr')]) ## global-router-interface.h: void ns3::GlobalRoutingLinkRecord::SetLinkType(ns3::GlobalRoutingLinkRecord::LinkType linkType) [member function] cls.add_method('SetLinkType', 'void', [param('ns3::GlobalRoutingLinkRecord::LinkType', 'linkType')]) - ## global-router-interface.h: uint16_t ns3::GlobalRoutingLinkRecord::GetMetric() const [member function] - cls.add_method('GetMetric', - 'uint16_t', - [], - is_const=True) ## global-router-interface.h: void ns3::GlobalRoutingLinkRecord::SetMetric(uint16_t metric) [member function] cls.add_method('SetMetric', 'void', @@ -311,48 +311,8 @@ def register_Ns3GlobalRouter_methods(root_module, cls): def register_Ns3Ipv4GlobalRouting_methods(root_module, cls): ## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting(ns3::Ipv4GlobalRouting const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4GlobalRouting const &', 'arg0')]) - ## ipv4-global-routing.h: static ns3::TypeId ns3::Ipv4GlobalRouting::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## ipv4-global-routing.h: ns3::Ipv4GlobalRouting::Ipv4GlobalRouting() [constructor] cls.add_constructor([]) - ## ipv4-global-routing.h: ns3::Ptr ns3::Ipv4GlobalRouting::RouteOutput(ns3::Ptr 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')], - is_virtual=True) - ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], - is_virtual=True) - ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceUp(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceUp', - 'void', - [param('uint32_t', 'interface')], - is_virtual=True) - ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceDown(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceDown', - 'void', - [param('uint32_t', 'interface')], - is_virtual=True) - ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyAddAddress', - 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], - is_virtual=True) - ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyRemoveAddress', - 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], - is_virtual=True) - ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::SetIpv4(ns3::Ptr ipv4) [member function] - cls.add_method('SetIpv4', - 'void', - [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], - is_virtual=True) ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function] cls.add_method('AddHostRouteTo', 'void', @@ -377,10 +337,50 @@ def register_Ns3Ipv4GlobalRouting_methods(root_module, cls): cls.add_method('GetRoute', 'ns3::Ipv4RoutingTableEntry *', [param('uint32_t', 'i')]) + ## ipv4-global-routing.h: static ns3::TypeId ns3::Ipv4GlobalRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::RemoveRoute(uint32_t i) [member function] cls.add_method('RemoveRoute', 'void', [param('uint32_t', 'i')]) + ## ipv4-global-routing.h: bool ns3::Ipv4GlobalRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], + is_virtual=True) + ## ipv4-global-routing.h: ns3::Ptr ns3::Ipv4GlobalRouting::RouteOutput(ns3::Ptr 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')], + is_virtual=True) + ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_virtual=True) ## ipv4-global-routing.h: void ns3::Ipv4GlobalRouting::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_helper.py b/bindings/python/ns3_module_helper.py index eed28c7a9..b997f67e8 100644 --- a/bindings/python/ns3_module_helper.py +++ b/bindings/python/ns3_module_helper.py @@ -5,6 +5,8 @@ def register_types(module): ## application-container.h: ns3::ApplicationContainer [class] module.add_class('ApplicationContainer') + ## athstats-helper.h: ns3::AthstatsHelper [class] + module.add_class('AthstatsHelper', allow_subclassing=False) ## bridge-helper.h: ns3::BridgeHelper [class] module.add_class('BridgeHelper', allow_subclassing=False) ## csma-helper.h: ns3::CsmaHelper [class] @@ -21,6 +23,14 @@ def register_types(module): module.add_class('Ipv4RoutingHelper', allow_subclassing=False) ## ipv4-static-routing-helper.h: ns3::Ipv4StaticRoutingHelper [class] module.add_class('Ipv4StaticRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper']) + ## ipv6-address-helper.h: ns3::Ipv6AddressHelper [class] + module.add_class('Ipv6AddressHelper', allow_subclassing=False) + ## ipv6-interface-container.h: ns3::Ipv6InterfaceContainer [class] + module.add_class('Ipv6InterfaceContainer') + ## ipv6-routing-helper.h: ns3::Ipv6RoutingHelper [class] + 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']) ## mobility-helper.h: ns3::MobilityHelper [class] module.add_class('MobilityHelper', allow_subclassing=False) ## net-device-container.h: ns3::NetDeviceContainer [class] @@ -37,6 +47,8 @@ def register_types(module): module.add_class('PacketSinkHelper', allow_subclassing=False) ## packet-socket-helper.h: ns3::PacketSocketHelper [class] module.add_class('PacketSocketHelper', allow_subclassing=False) + ## ping6-helper.h: ns3::Ping6Helper [class] + module.add_class('Ping6Helper', allow_subclassing=False) ## point-to-point-helper.h: ns3::PointToPointHelper [class] module.add_class('PointToPointHelper', allow_subclassing=False) ## tap-bridge-helper.h: ns3::TapBridgeHelper [class] @@ -63,10 +75,14 @@ def register_types(module): 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']) + ## 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] module.add_class('NqosWifiMacHelper', allow_subclassing=False, parent=root_module['ns3::WifiMacHelper']) ## qos-wifi-mac-helper.h: ns3::QosWifiMacHelper [class] 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']) ## Register a nested module for the namespace Config @@ -120,6 +136,7 @@ def register_types_ns3_olsr(module): def register_methods(root_module): register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer']) + register_Ns3AthstatsHelper_methods(root_module, root_module['ns3::AthstatsHelper']) 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']) @@ -128,6 +145,10 @@ def register_methods(root_module): register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer']) register_Ns3Ipv4RoutingHelper_methods(root_module, root_module['ns3::Ipv4RoutingHelper']) register_Ns3Ipv4StaticRoutingHelper_methods(root_module, root_module['ns3::Ipv4StaticRoutingHelper']) + register_Ns3Ipv6AddressHelper_methods(root_module, root_module['ns3::Ipv6AddressHelper']) + 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_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']) @@ -136,6 +157,7 @@ def register_methods(root_module): register_Ns3OnOffHelper_methods(root_module, root_module['ns3::OnOffHelper']) register_Ns3PacketSinkHelper_methods(root_module, root_module['ns3::PacketSinkHelper']) register_Ns3PacketSocketHelper_methods(root_module, root_module['ns3::PacketSocketHelper']) + register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper']) register_Ns3PointToPointHelper_methods(root_module, root_module['ns3::PointToPointHelper']) register_Ns3TapBridgeHelper_methods(root_module, root_module['ns3::TapBridgeHelper']) register_Ns3UdpEchoClientHelper_methods(root_module, root_module['ns3::UdpEchoClientHelper']) @@ -148,8 +170,10 @@ def register_methods(root_module): 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_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']) return def register_Ns3ApplicationContainer_methods(root_module, cls): @@ -161,26 +185,6 @@ def register_Ns3ApplicationContainer_methods(root_module, cls): cls.add_constructor([param('ns3::Ptr< ns3::Application >', 'application')]) ## application-container.h: ns3::ApplicationContainer::ApplicationContainer(std::string name) [constructor] cls.add_constructor([param('std::string', 'name')]) - ## application-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::ApplicationContainer::Begin() const [member function] - cls.add_method('Begin', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Application > const, std::vector< ns3::Ptr< ns3::Application > > >', - [], - is_const=True) - ## application-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::ApplicationContainer::End() const [member function] - cls.add_method('End', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Application > const, std::vector< ns3::Ptr< ns3::Application > > >', - [], - is_const=True) - ## application-container.h: uint32_t ns3::ApplicationContainer::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) - ## application-container.h: ns3::Ptr ns3::ApplicationContainer::Get(uint32_t i) const [member function] - cls.add_method('Get', - 'ns3::Ptr< ns3::Application >', - [param('uint32_t', 'i')], - is_const=True) ## application-container.h: void ns3::ApplicationContainer::Add(ns3::ApplicationContainer other) [member function] cls.add_method('Add', 'void', @@ -193,6 +197,26 @@ def register_Ns3ApplicationContainer_methods(root_module, cls): cls.add_method('Add', 'void', [param('std::string', 'name')]) + ## application-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::ApplicationContainer::Begin() const [member function] + cls.add_method('Begin', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Application > const, std::vector< ns3::Ptr< ns3::Application > > >', + [], + is_const=True) + ## application-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::ApplicationContainer::End() const [member function] + cls.add_method('End', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Application > const, std::vector< ns3::Ptr< ns3::Application > > >', + [], + is_const=True) + ## application-container.h: ns3::Ptr ns3::ApplicationContainer::Get(uint32_t i) const [member function] + cls.add_method('Get', + 'ns3::Ptr< ns3::Application >', + [param('uint32_t', 'i')], + is_const=True) + ## application-container.h: uint32_t ns3::ApplicationContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) ## application-container.h: void ns3::ApplicationContainer::Start(ns3::Time start) [member function] cls.add_method('Start', 'void', @@ -203,15 +227,34 @@ def register_Ns3ApplicationContainer_methods(root_module, cls): [param('ns3::Time', 'stop')]) return +def register_Ns3AthstatsHelper_methods(root_module, cls): + ## athstats-helper.h: ns3::AthstatsHelper::AthstatsHelper(ns3::AthstatsHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AthstatsHelper const &', 'arg0')]) + ## athstats-helper.h: ns3::AthstatsHelper::AthstatsHelper() [constructor] + cls.add_constructor([]) + ## athstats-helper.h: void ns3::AthstatsHelper::EnableAthstats(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function] + cls.add_method('EnableAthstats', + 'void', + [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')]) + ## athstats-helper.h: void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::Ptr nd) [member function] + cls.add_method('EnableAthstats', + 'void', + [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')]) + ## athstats-helper.h: void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::NetDeviceContainer d) [member function] + cls.add_method('EnableAthstats', + 'void', + [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')]) + ## athstats-helper.h: void ns3::AthstatsHelper::EnableAthstats(std::string filename, ns3::NodeContainer n) [member function] + cls.add_method('EnableAthstats', + 'void', + [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')]) + return + def register_Ns3BridgeHelper_methods(root_module, cls): ## bridge-helper.h: ns3::BridgeHelper::BridgeHelper(ns3::BridgeHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::BridgeHelper const &', 'arg0')]) ## bridge-helper.h: ns3::BridgeHelper::BridgeHelper() [constructor] cls.add_constructor([]) - ## bridge-helper.h: void ns3::BridgeHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetDeviceAttribute', - 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) ## bridge-helper.h: ns3::NetDeviceContainer ns3::BridgeHelper::Install(ns3::Ptr node, ns3::NetDeviceContainer c) [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', @@ -220,6 +263,10 @@ def register_Ns3BridgeHelper_methods(root_module, cls): cls.add_method('Install', 'ns3::NetDeviceContainer', [param('std::string', 'nodeName'), param('ns3::NetDeviceContainer', 'c')]) + ## bridge-helper.h: void ns3::BridgeHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] + cls.add_method('SetDeviceAttribute', + 'void', + [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) return def register_Ns3CsmaHelper_methods(root_module, cls): @@ -227,18 +274,26 @@ def register_Ns3CsmaHelper_methods(root_module, cls): cls.add_constructor([param('ns3::CsmaHelper const &', 'arg0')]) ## csma-helper.h: ns3::CsmaHelper::CsmaHelper() [constructor] cls.add_constructor([]) - ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, 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()) [member function] - cls.add_method('SetQueue', + ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] + cls.add_method('EnableAscii', 'void', - [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()')]) - ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetDeviceAttribute', + [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], + is_static=True) + ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) - ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetChannelAttribute', + [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], + is_static=True) + ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', + 'void', + [param('std::ostream &', 'os')], + is_static=True) ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function] cls.add_method('EnablePcap', 'void', @@ -269,26 +324,6 @@ def register_Ns3CsmaHelper_methods(root_module, cls): 'void', [param('std::string', 'filename'), param('bool', 'promiscuous')], is_static=True) - ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], - is_static=True) - ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], - is_static=True) - ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', - 'void', - [param('std::ostream &', 'os')], - is_static=True) ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr node) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', @@ -342,6 +377,18 @@ def register_Ns3CsmaHelper_methods(root_module, cls): cls.add_method('InstallStar', 'void', [param('std::string', 'hubName'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')]) + ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] + cls.add_method('SetChannelAttribute', + 'void', + [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) + ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] + cls.add_method('SetDeviceAttribute', + 'void', + [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) + ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, 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()) [member function] + cls.add_method('SetQueue', + 'void', + [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_Ns3EmuHelper_methods(root_module, cls): @@ -349,14 +396,26 @@ def register_Ns3EmuHelper_methods(root_module, cls): cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')]) ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor] cls.add_constructor([]) - ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, 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()) [member function] - cls.add_method('SetQueue', + ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] + cls.add_method('EnableAscii', 'void', - [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()')]) - ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetAttribute', + [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], + is_static=True) + ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) + [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], + is_static=True) + ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', + 'void', + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', + 'void', + [param('std::ostream &', 'os')], + is_static=True) ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function] cls.add_method('EnablePcap', 'void', @@ -387,26 +446,6 @@ def register_Ns3EmuHelper_methods(root_module, cls): 'void', [param('std::string', 'filename'), param('bool', 'promiscuous')], is_static=True) - ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], - is_static=True) - ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], - is_static=True) - ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', - 'void', - [param('std::ostream &', 'os')], - is_static=True) ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr node) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', @@ -422,6 +461,14 @@ def register_Ns3EmuHelper_methods(root_module, cls): 'ns3::NetDeviceContainer', [param('ns3::NodeContainer const &', 'c')], is_const=True) + ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) + ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, 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()) [member function] + cls.add_method('SetQueue', + 'void', + [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_Ns3InternetStackHelper_methods(root_module, cls): @@ -429,10 +476,21 @@ def register_Ns3InternetStackHelper_methods(root_module, cls): cls.add_constructor([param('ns3::InternetStackHelper const &', 'arg0')]) ## internet-stack-helper.h: ns3::InternetStackHelper::InternetStackHelper() [constructor] cls.add_constructor([]) - ## internet-stack-helper.h: void ns3::InternetStackHelper::SetRoutingHelper(ns3::Ipv4RoutingHelper const & routing) [member function] - cls.add_method('SetRoutingHelper', + ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', 'void', - [param('ns3::Ipv4RoutingHelper const &', 'routing')]) + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', + 'void', + [param('std::ostream &', 'os')], + is_static=True) + ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnablePcapAll(std::string filename) [member function] + cls.add_method('EnablePcapAll', + 'void', + [param('std::string', 'filename')], + is_static=True) ## internet-stack-helper.h: void ns3::InternetStackHelper::Install(std::string nodeName) const [member function] cls.add_method('Install', 'void', @@ -453,6 +511,22 @@ def register_Ns3InternetStackHelper_methods(root_module, cls): 'void', [], is_const=True) + ## internet-stack-helper.h: void ns3::InternetStackHelper::SetIpv4StackInstall(bool enable) [member function] + cls.add_method('SetIpv4StackInstall', + 'void', + [param('bool', 'enable')]) + ## internet-stack-helper.h: void ns3::InternetStackHelper::SetIpv6StackInstall(bool enable) [member function] + cls.add_method('SetIpv6StackInstall', + 'void', + [param('bool', 'enable')]) + ## internet-stack-helper.h: void ns3::InternetStackHelper::SetRoutingHelper(ns3::Ipv4RoutingHelper const & routing) [member function] + cls.add_method('SetRoutingHelper', + 'void', + [param('ns3::Ipv4RoutingHelper const &', 'routing')]) + ## internet-stack-helper.h: void ns3::InternetStackHelper::SetRoutingHelper(ns3::Ipv6RoutingHelper const & routing) [member function] + cls.add_method('SetRoutingHelper', + 'void', + [param('ns3::Ipv6RoutingHelper const &', 'routing')]) ## internet-stack-helper.h: void ns3::InternetStackHelper::SetTcp(std::string tid) [member function] cls.add_method('SetTcp', 'void', @@ -461,21 +535,6 @@ def register_Ns3InternetStackHelper_methods(root_module, cls): cls.add_method('SetTcp', 'void', [param('std::string', 'tid'), param('std::string', 'attr'), param('ns3::AttributeValue const &', 'val')]) - ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', - 'void', - [param('std::ostream &', 'os')], - is_static=True) - ## internet-stack-helper.h: static void ns3::InternetStackHelper::EnablePcapAll(std::string filename) [member function] - cls.add_method('EnablePcapAll', - 'void', - [param('std::string', 'filename')], - is_static=True) return def register_Ns3Ipv4AddressHelper_methods(root_module, cls): @@ -483,22 +542,22 @@ def register_Ns3Ipv4AddressHelper_methods(root_module, cls): cls.add_constructor([param('ns3::Ipv4AddressHelper const &', 'arg0')]) ## ipv4-address-helper.h: ns3::Ipv4AddressHelper::Ipv4AddressHelper() [constructor] cls.add_constructor([]) - ## ipv4-address-helper.h: void ns3::Ipv4AddressHelper::SetBase(ns3::Ipv4Address network, ns3::Ipv4Mask mask, ns3::Ipv4Address base="0.0.0.1") [member function] - cls.add_method('SetBase', - 'void', - [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'mask'), param('ns3::Ipv4Address', 'base', default_value='"0.0.0.1"')]) - ## ipv4-address-helper.h: ns3::Ipv4Address ns3::Ipv4AddressHelper::NewNetwork() [member function] - cls.add_method('NewNetwork', - 'ns3::Ipv4Address', - []) - ## ipv4-address-helper.h: ns3::Ipv4Address ns3::Ipv4AddressHelper::NewAddress() [member function] - cls.add_method('NewAddress', - 'ns3::Ipv4Address', - []) ## ipv4-address-helper.h: ns3::Ipv4InterfaceContainer ns3::Ipv4AddressHelper::Assign(ns3::NetDeviceContainer const & c) [member function] cls.add_method('Assign', 'ns3::Ipv4InterfaceContainer', [param('ns3::NetDeviceContainer const &', 'c')]) + ## ipv4-address-helper.h: ns3::Ipv4Address ns3::Ipv4AddressHelper::NewAddress() [member function] + cls.add_method('NewAddress', + 'ns3::Ipv4Address', + []) + ## ipv4-address-helper.h: ns3::Ipv4Address ns3::Ipv4AddressHelper::NewNetwork() [member function] + cls.add_method('NewNetwork', + 'ns3::Ipv4Address', + []) + ## ipv4-address-helper.h: void ns3::Ipv4AddressHelper::SetBase(ns3::Ipv4Address network, ns3::Ipv4Mask mask, ns3::Ipv4Address base="0.0.0.1") [member function] + cls.add_method('SetBase', + 'void', + [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'mask'), param('ns3::Ipv4Address', 'base', default_value='"0.0.0.1"')]) return def register_Ns3Ipv4InterfaceContainer_methods(root_module, cls): @@ -510,20 +569,6 @@ def register_Ns3Ipv4InterfaceContainer_methods(root_module, cls): cls.add_method('Add', 'void', [param('ns3::Ipv4InterfaceContainer', 'other')]) - ## ipv4-interface-container.h: uint32_t ns3::Ipv4InterfaceContainer::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - 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', - [param('uint32_t', 'i'), param('uint32_t', 'j', default_value='0')], - is_const=True) - ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::SetMetric(uint32_t i, uint16_t metric) [member function] - cls.add_method('SetMetric', - 'void', - [param('uint32_t', 'i'), param('uint16_t', 'metric')]) ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(ns3::Ptr ipv4, uint32_t interface) [member function] cls.add_method('Add', 'void', @@ -532,13 +577,27 @@ def register_Ns3Ipv4InterfaceContainer_methods(root_module, cls): cls.add_method('Add', 'void', [param('std::string', 'ipv4Name'), param('uint32_t', 'interface')]) + ## 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', + [param('uint32_t', 'i'), param('uint32_t', 'j', default_value='0')], + is_const=True) + ## ipv4-interface-container.h: uint32_t ns3::Ipv4InterfaceContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) + ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::SetMetric(uint32_t i, uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint32_t', 'i'), param('uint16_t', 'metric')]) return def register_Ns3Ipv4RoutingHelper_methods(root_module, cls): - ## ipv4-routing-helper.h: ns3::Ipv4RoutingHelper::Ipv4RoutingHelper(ns3::Ipv4RoutingHelper const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4RoutingHelper const &', 'arg0')]) ## ipv4-routing-helper.h: ns3::Ipv4RoutingHelper::Ipv4RoutingHelper() [constructor] cls.add_constructor([]) + ## ipv4-routing-helper.h: ns3::Ipv4RoutingHelper::Ipv4RoutingHelper(ns3::Ipv4RoutingHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4RoutingHelper const &', 'arg0')]) ## ipv4-routing-helper.h: ns3::Ptr ns3::Ipv4RoutingHelper::Create(ns3::Ptr node) const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', @@ -551,16 +610,6 @@ def register_Ns3Ipv4StaticRoutingHelper_methods(root_module, cls): cls.add_constructor([param('ns3::Ipv4StaticRoutingHelper const &', 'arg0')]) ## ipv4-static-routing-helper.h: ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper() [constructor] cls.add_constructor([]) - ## ipv4-static-routing-helper.h: ns3::Ptr ns3::Ipv4StaticRoutingHelper::Create(ns3::Ptr node) const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', - [param('ns3::Ptr< ns3::Node >', 'node')], - is_const=True, is_virtual=True) - ## ipv4-static-routing-helper.h: ns3::Ptr ns3::Ipv4StaticRoutingHelper::GetStaticRouting(ns3::Ptr ipv4) const [member function] - cls.add_method('GetStaticRouting', - 'ns3::Ptr< ns3::Ipv4StaticRouting >', - [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], - is_const=True) ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv4Address source, ns3::Ipv4Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function] cls.add_method('AddMulticastRoute', 'void', @@ -577,6 +626,16 @@ def register_Ns3Ipv4StaticRoutingHelper_methods(root_module, cls): cls.add_method('AddMulticastRoute', 'void', [param('std::string', 'nName'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')]) + ## ipv4-static-routing-helper.h: ns3::Ptr ns3::Ipv4StaticRoutingHelper::Create(ns3::Ptr node) const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_const=True, is_virtual=True) + ## ipv4-static-routing-helper.h: ns3::Ptr ns3::Ipv4StaticRoutingHelper::GetStaticRouting(ns3::Ptr ipv4) const [member function] + cls.add_method('GetStaticRouting', + 'ns3::Ptr< ns3::Ipv4StaticRouting >', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_const=True) ## ipv4-static-routing-helper.h: void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(ns3::Ptr n, ns3::Ptr nd) [member function] cls.add_method('SetDefaultMulticastRoute', 'void', @@ -595,35 +654,140 @@ def register_Ns3Ipv4StaticRoutingHelper_methods(root_module, cls): [param('std::string', 'nName'), param('std::string', 'ndName')]) return +def register_Ns3Ipv6AddressHelper_methods(root_module, cls): + ## ipv6-address-helper.h: ns3::Ipv6AddressHelper::Ipv6AddressHelper(ns3::Ipv6AddressHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6AddressHelper const &', 'arg0')]) + ## ipv6-address-helper.h: ns3::Ipv6AddressHelper::Ipv6AddressHelper() [constructor] + cls.add_constructor([]) + ## ipv6-address-helper.h: ns3::Ipv6InterfaceContainer ns3::Ipv6AddressHelper::Assign(ns3::NetDeviceContainer const & c) [member function] + cls.add_method('Assign', + 'ns3::Ipv6InterfaceContainer', + [param('ns3::NetDeviceContainer const &', 'c')]) + ## ipv6-address-helper.h: ns3::Ipv6InterfaceContainer ns3::Ipv6AddressHelper::Assign(ns3::NetDeviceContainer const & c, std::vector > withConfiguration) [member function] + cls.add_method('Assign', + 'ns3::Ipv6InterfaceContainer', + [param('ns3::NetDeviceContainer const &', 'c'), param('std::vector< bool >', 'withConfiguration')]) + ## ipv6-address-helper.h: ns3::Ipv6InterfaceContainer ns3::Ipv6AddressHelper::AssignWithoutAddress(ns3::NetDeviceContainer const & c) [member function] + cls.add_method('AssignWithoutAddress', + 'ns3::Ipv6InterfaceContainer', + [param('ns3::NetDeviceContainer const &', 'c')]) + ## ipv6-address-helper.h: ns3::Ipv6Address ns3::Ipv6AddressHelper::NewAddress(ns3::Address addr) [member function] + cls.add_method('NewAddress', + 'ns3::Ipv6Address', + [param('ns3::Address', 'addr')]) + ## ipv6-address-helper.h: void ns3::Ipv6AddressHelper::NewNetwork(ns3::Ipv6Address network, ns3::Ipv6Prefix prefix) [member function] + cls.add_method('NewNetwork', + 'void', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'prefix')]) + return + +def register_Ns3Ipv6InterfaceContainer_methods(root_module, cls): + ## ipv6-interface-container.h: ns3::Ipv6InterfaceContainer::Ipv6InterfaceContainer(ns3::Ipv6InterfaceContainer const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6InterfaceContainer const &', 'arg0')]) + ## ipv6-interface-container.h: ns3::Ipv6InterfaceContainer::Ipv6InterfaceContainer() [constructor] + cls.add_constructor([]) + ## ipv6-interface-container.h: void ns3::Ipv6InterfaceContainer::Add(ns3::Ptr ipv6, uint32_t interface) [member function] + cls.add_method('Add', + 'void', + [param('ns3::Ptr< ns3::Ipv6 >', 'ipv6'), param('uint32_t', 'interface')]) + ## ipv6-interface-container.h: void ns3::Ipv6InterfaceContainer::Add(ns3::Ipv6InterfaceContainer & c) [member function] + cls.add_method('Add', + 'void', + [param('ns3::Ipv6InterfaceContainer &', 'c')]) + ## ipv6-interface-container.h: void ns3::Ipv6InterfaceContainer::Add(std::string ipv6Name, uint32_t interface) [member function] + cls.add_method('Add', + 'void', + [param('std::string', 'ipv6Name'), param('uint32_t', 'interface')]) + ## ipv6-interface-container.h: ns3::Ipv6Address ns3::Ipv6InterfaceContainer::GetAddress(uint32_t i, uint32_t j) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv6Address', + [param('uint32_t', 'i'), param('uint32_t', 'j')], + is_const=True) + ## ipv6-interface-container.h: uint32_t ns3::Ipv6InterfaceContainer::GetInterfaceIndex(uint32_t i) const [member function] + cls.add_method('GetInterfaceIndex', + 'uint32_t', + [param('uint32_t', 'i')], + is_const=True) + ## ipv6-interface-container.h: uint32_t ns3::Ipv6InterfaceContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) + ## ipv6-interface-container.h: void ns3::Ipv6InterfaceContainer::SetDefaultRoute(uint32_t i, uint32_t router) [member function] + cls.add_method('SetDefaultRoute', + 'void', + [param('uint32_t', 'i'), param('uint32_t', 'router')]) + ## ipv6-interface-container.h: void ns3::Ipv6InterfaceContainer::SetRouter(uint32_t i, bool router) [member function] + cls.add_method('SetRouter', + 'void', + [param('uint32_t', 'i'), param('bool', 'router')]) + return + +def register_Ns3Ipv6RoutingHelper_methods(root_module, cls): + ## ipv6-routing-helper.h: ns3::Ipv6RoutingHelper::Ipv6RoutingHelper() [constructor] + cls.add_constructor([]) + ## ipv6-routing-helper.h: ns3::Ipv6RoutingHelper::Ipv6RoutingHelper(ns3::Ipv6RoutingHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6RoutingHelper const &', 'arg0')]) + ## ipv6-routing-helper.h: ns3::Ptr ns3::Ipv6RoutingHelper::Create(ns3::Ptr node) const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::Ipv6RoutingProtocol >', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_pure_virtual=True, is_const=True, is_virtual=True) + return + +def register_Ns3Ipv6StaticRoutingHelper_methods(root_module, cls): + ## ipv6-static-routing-helper.h: ns3::Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper(ns3::Ipv6StaticRoutingHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6StaticRoutingHelper const &', 'arg0')]) + ## ipv6-static-routing-helper.h: ns3::Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper() [constructor] + cls.add_constructor([]) + ## ipv6-static-routing-helper.h: void ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv6Address source, ns3::Ipv6Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv6Address', 'source'), param('ns3::Ipv6Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')]) + ## ipv6-static-routing-helper.h: void ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(std::string n, ns3::Ipv6Address source, ns3::Ipv6Address group, ns3::Ptr input, ns3::NetDeviceContainer output) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('std::string', 'n'), param('ns3::Ipv6Address', 'source'), param('ns3::Ipv6Address', 'group'), param('ns3::Ptr< ns3::NetDevice >', 'input'), param('ns3::NetDeviceContainer', 'output')]) + ## ipv6-static-routing-helper.h: void ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(ns3::Ptr n, ns3::Ipv6Address source, ns3::Ipv6Address group, std::string inputName, ns3::NetDeviceContainer output) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('ns3::Ptr< ns3::Node >', 'n'), param('ns3::Ipv6Address', 'source'), param('ns3::Ipv6Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')]) + ## ipv6-static-routing-helper.h: void ns3::Ipv6StaticRoutingHelper::AddMulticastRoute(std::string nName, ns3::Ipv6Address source, ns3::Ipv6Address group, std::string inputName, ns3::NetDeviceContainer output) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('std::string', 'nName'), param('ns3::Ipv6Address', 'source'), param('ns3::Ipv6Address', 'group'), param('std::string', 'inputName'), param('ns3::NetDeviceContainer', 'output')]) + ## ipv6-static-routing-helper.h: ns3::Ptr ns3::Ipv6StaticRoutingHelper::Create(ns3::Ptr node) const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::Ipv6RoutingProtocol >', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_const=True, is_virtual=True) + ## ipv6-static-routing-helper.h: ns3::Ptr ns3::Ipv6StaticRoutingHelper::GetStaticRouting(ns3::Ptr ipv6) const [member function] + cls.add_method('GetStaticRouting', + 'ns3::Ptr< ns3::Ipv6StaticRouting >', + [param('ns3::Ptr< ns3::Ipv6 >', 'ipv6')], + is_const=True) + 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')]) ## mobility-helper.h: ns3::MobilityHelper::MobilityHelper() [constructor] cls.add_constructor([]) - ## mobility-helper.h: void ns3::MobilityHelper::SetPositionAllocator(ns3::Ptr allocator) [member function] - cls.add_method('SetPositionAllocator', + ## mobility-helper.h: static void ns3::MobilityHelper::EnableAscii(std::ostream & os, uint32_t nodeid) [member function] + cls.add_method('EnableAscii', 'void', - [param('ns3::Ptr< ns3::PositionAllocator >', 'allocator')]) - ## mobility-helper.h: void ns3::MobilityHelper::SetPositionAllocator(std::string type, 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(), std::string n8="", ns3::AttributeValue const & v8=ns3::EmptyAttributeValue(), std::string n9="", ns3::AttributeValue const & v9=ns3::EmptyAttributeValue()) [member function] - cls.add_method('SetPositionAllocator', + [param('std::ostream &', 'os'), param('uint32_t', 'nodeid')], + is_static=True) + ## mobility-helper.h: static void ns3::MobilityHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', 'void', - [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()'), 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()'), param('std::string', 'n8', default_value='""'), param('ns3::AttributeValue const &', 'v8', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n9', default_value='""'), param('ns3::AttributeValue const &', 'v9', default_value='ns3::EmptyAttributeValue()')]) - ## mobility-helper.h: void ns3::MobilityHelper::SetMobilityModel(std::string type, 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(), std::string n8="", ns3::AttributeValue const & v8=ns3::EmptyAttributeValue(), std::string n9="", ns3::AttributeValue const & v9=ns3::EmptyAttributeValue()) [member function] - cls.add_method('SetMobilityModel', + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## mobility-helper.h: static void ns3::MobilityHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', 'void', - [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()'), 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()'), param('std::string', 'n8', default_value='""'), param('ns3::AttributeValue const &', 'v8', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n9', default_value='""'), param('ns3::AttributeValue const &', 'v9', default_value='ns3::EmptyAttributeValue()')]) - ## mobility-helper.h: void ns3::MobilityHelper::PushReferenceMobilityModel(ns3::Ptr reference) [member function] - cls.add_method('PushReferenceMobilityModel', - 'void', - [param('ns3::Ptr< ns3::Object >', 'reference')]) - ## mobility-helper.h: void ns3::MobilityHelper::PushReferenceMobilityModel(std::string referenceName) [member function] - cls.add_method('PushReferenceMobilityModel', - 'void', - [param('std::string', 'referenceName')]) - ## mobility-helper.h: void ns3::MobilityHelper::PopReferenceMobilityModel() [member function] - cls.add_method('PopReferenceMobilityModel', - 'void', - []) + [param('std::ostream &', 'os')], + is_static=True) ## mobility-helper.h: std::string ns3::MobilityHelper::GetMobilityModelType() const [member function] cls.add_method('GetMobilityModelType', 'std::string', @@ -648,21 +812,30 @@ def register_Ns3MobilityHelper_methods(root_module, cls): cls.add_method('InstallAll', 'void', []) - ## mobility-helper.h: static void ns3::MobilityHelper::EnableAscii(std::ostream & os, uint32_t nodeid) [member function] - cls.add_method('EnableAscii', + ## mobility-helper.h: void ns3::MobilityHelper::PopReferenceMobilityModel() [member function] + cls.add_method('PopReferenceMobilityModel', 'void', - [param('std::ostream &', 'os'), param('uint32_t', 'nodeid')], - is_static=True) - ## mobility-helper.h: static void ns3::MobilityHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', + []) + ## mobility-helper.h: void ns3::MobilityHelper::PushReferenceMobilityModel(ns3::Ptr reference) [member function] + cls.add_method('PushReferenceMobilityModel', 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## mobility-helper.h: static void ns3::MobilityHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', + [param('ns3::Ptr< ns3::Object >', 'reference')]) + ## mobility-helper.h: void ns3::MobilityHelper::PushReferenceMobilityModel(std::string referenceName) [member function] + cls.add_method('PushReferenceMobilityModel', 'void', - [param('std::ostream &', 'os')], - is_static=True) + [param('std::string', 'referenceName')]) + ## mobility-helper.h: void ns3::MobilityHelper::SetMobilityModel(std::string type, 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(), std::string n8="", ns3::AttributeValue const & v8=ns3::EmptyAttributeValue(), std::string n9="", ns3::AttributeValue const & v9=ns3::EmptyAttributeValue()) [member function] + cls.add_method('SetMobilityModel', + 'void', + [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()'), 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()'), param('std::string', 'n8', default_value='""'), param('ns3::AttributeValue const &', 'v8', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n9', default_value='""'), param('ns3::AttributeValue const &', 'v9', default_value='ns3::EmptyAttributeValue()')]) + ## mobility-helper.h: void ns3::MobilityHelper::SetPositionAllocator(ns3::Ptr allocator) [member function] + cls.add_method('SetPositionAllocator', + 'void', + [param('ns3::Ptr< ns3::PositionAllocator >', 'allocator')]) + ## mobility-helper.h: void ns3::MobilityHelper::SetPositionAllocator(std::string type, 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(), std::string n8="", ns3::AttributeValue const & v8=ns3::EmptyAttributeValue(), std::string n9="", ns3::AttributeValue const & v9=ns3::EmptyAttributeValue()) [member function] + cls.add_method('SetPositionAllocator', + 'void', + [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()'), 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()'), param('std::string', 'n8', default_value='""'), param('ns3::AttributeValue const &', 'v8', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n9', default_value='""'), param('ns3::AttributeValue const &', 'v9', default_value='ns3::EmptyAttributeValue()')]) return def register_Ns3NetDeviceContainer_methods(root_module, cls): @@ -676,26 +849,6 @@ def register_Ns3NetDeviceContainer_methods(root_module, cls): cls.add_constructor([param('std::string', 'devName')]) ## net-device-container.h: ns3::NetDeviceContainer::NetDeviceContainer(ns3::NetDeviceContainer const & a, ns3::NetDeviceContainer const & b) [constructor] cls.add_constructor([param('ns3::NetDeviceContainer const &', 'a'), param('ns3::NetDeviceContainer const &', 'b')]) - ## net-device-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NetDeviceContainer::Begin() const [member function] - cls.add_method('Begin', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', - [], - is_const=True) - ## net-device-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NetDeviceContainer::End() const [member function] - cls.add_method('End', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', - [], - is_const=True) - ## net-device-container.h: uint32_t ns3::NetDeviceContainer::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) - ## net-device-container.h: ns3::Ptr ns3::NetDeviceContainer::Get(uint32_t i) const [member function] - cls.add_method('Get', - 'ns3::Ptr< ns3::NetDevice >', - [param('uint32_t', 'i')], - is_const=True) ## net-device-container.h: void ns3::NetDeviceContainer::Add(ns3::NetDeviceContainer other) [member function] cls.add_method('Add', 'void', @@ -708,6 +861,26 @@ def register_Ns3NetDeviceContainer_methods(root_module, cls): cls.add_method('Add', 'void', [param('std::string', 'deviceName')]) + ## net-device-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NetDeviceContainer::Begin() const [member function] + cls.add_method('Begin', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', + [], + is_const=True) + ## net-device-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NetDeviceContainer::End() const [member function] + cls.add_method('End', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::NetDevice > const, std::vector< ns3::Ptr< ns3::NetDevice > > >', + [], + is_const=True) + ## net-device-container.h: ns3::Ptr ns3::NetDeviceContainer::Get(uint32_t i) const [member function] + cls.add_method('Get', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'i')], + is_const=True) + ## net-device-container.h: uint32_t ns3::NetDeviceContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) return def register_Ns3NodeContainer_methods(root_module, cls): @@ -727,30 +900,6 @@ def register_Ns3NodeContainer_methods(root_module, cls): cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b'), param('ns3::NodeContainer const &', 'c'), param('ns3::NodeContainer const &', 'd')]) ## node-container.h: ns3::NodeContainer::NodeContainer(ns3::NodeContainer const & a, ns3::NodeContainer const & b, ns3::NodeContainer const & c, ns3::NodeContainer const & d, ns3::NodeContainer const & e) [constructor] cls.add_constructor([param('ns3::NodeContainer const &', 'a'), param('ns3::NodeContainer const &', 'b'), param('ns3::NodeContainer const &', 'c'), param('ns3::NodeContainer const &', 'd'), param('ns3::NodeContainer const &', 'e')]) - ## node-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NodeContainer::Begin() const [member function] - cls.add_method('Begin', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', - [], - is_const=True) - ## node-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NodeContainer::End() const [member function] - cls.add_method('End', - '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', - [], - is_const=True) - ## node-container.h: uint32_t ns3::NodeContainer::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) - ## node-container.h: ns3::Ptr ns3::NodeContainer::Get(uint32_t i) const [member function] - cls.add_method('Get', - 'ns3::Ptr< ns3::Node >', - [param('uint32_t', 'i')], - is_const=True) - ## node-container.h: void ns3::NodeContainer::Create(uint32_t n) [member function] - cls.add_method('Create', - 'void', - [param('uint32_t', 'n')]) ## node-container.h: void ns3::NodeContainer::Add(ns3::NodeContainer other) [member function] cls.add_method('Add', 'void', @@ -763,11 +912,35 @@ def register_Ns3NodeContainer_methods(root_module, cls): cls.add_method('Add', 'void', [param('std::string', 'nodeName')]) + ## node-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NodeContainer::Begin() const [member function] + cls.add_method('Begin', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', + [], + is_const=True) + ## node-container.h: void ns3::NodeContainer::Create(uint32_t n) [member function] + cls.add_method('Create', + 'void', + [param('uint32_t', 'n')]) + ## node-container.h: __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::NodeContainer::End() const [member function] + cls.add_method('End', + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', + [], + is_const=True) + ## node-container.h: ns3::Ptr ns3::NodeContainer::Get(uint32_t i) const [member function] + cls.add_method('Get', + 'ns3::Ptr< ns3::Node >', + [param('uint32_t', 'i')], + is_const=True) ## node-container.h: static ns3::NodeContainer ns3::NodeContainer::GetGlobal() [member function] cls.add_method('GetGlobal', 'ns3::NodeContainer', [], is_static=True) + ## node-container.h: uint32_t ns3::NodeContainer::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) return def register_Ns3Ns2MobilityHelper_methods(root_module, cls): @@ -803,10 +976,6 @@ def register_Ns3OnOffHelper_methods(root_module, cls): cls.add_constructor([param('ns3::OnOffHelper const &', 'arg0')]) ## on-off-helper.h: ns3::OnOffHelper::OnOffHelper(std::string protocol, ns3::Address address) [constructor] cls.add_constructor([param('std::string', 'protocol'), param('ns3::Address', 'address')]) - ## on-off-helper.h: void ns3::OnOffHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## on-off-helper.h: ns3::ApplicationContainer ns3::OnOffHelper::Install(ns3::NodeContainer c) const [member function] cls.add_method('Install', 'ns3::ApplicationContainer', @@ -822,6 +991,10 @@ def register_Ns3OnOffHelper_methods(root_module, cls): 'ns3::ApplicationContainer', [param('std::string', 'nodeName')], is_const=True) + ## on-off-helper.h: void ns3::OnOffHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return def register_Ns3PacketSinkHelper_methods(root_module, cls): @@ -829,10 +1002,6 @@ def register_Ns3PacketSinkHelper_methods(root_module, cls): cls.add_constructor([param('ns3::PacketSinkHelper const &', 'arg0')]) ## packet-sink-helper.h: ns3::PacketSinkHelper::PacketSinkHelper(std::string protocol, ns3::Address address) [constructor] cls.add_constructor([param('std::string', 'protocol'), param('ns3::Address', 'address')]) - ## packet-sink-helper.h: void ns3::PacketSinkHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## packet-sink-helper.h: ns3::ApplicationContainer ns3::PacketSinkHelper::Install(ns3::NodeContainer c) const [member function] cls.add_method('Install', 'ns3::ApplicationContainer', @@ -848,13 +1017,17 @@ def register_Ns3PacketSinkHelper_methods(root_module, cls): 'ns3::ApplicationContainer', [param('std::string', 'nodeName')], is_const=True) + ## packet-sink-helper.h: void ns3::PacketSinkHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return def register_Ns3PacketSocketHelper_methods(root_module, cls): - ## packet-socket-helper.h: ns3::PacketSocketHelper::PacketSocketHelper(ns3::PacketSocketHelper const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketSocketHelper const &', 'arg0')]) ## packet-socket-helper.h: ns3::PacketSocketHelper::PacketSocketHelper() [constructor] cls.add_constructor([]) + ## packet-socket-helper.h: ns3::PacketSocketHelper::PacketSocketHelper(ns3::PacketSocketHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketSocketHelper const &', 'arg0')]) ## packet-socket-helper.h: void ns3::PacketSocketHelper::Install(ns3::Ptr node) const [member function] cls.add_method('Install', 'void', @@ -872,23 +1045,58 @@ def register_Ns3PacketSocketHelper_methods(root_module, cls): is_const=True) return +def register_Ns3Ping6Helper_methods(root_module, cls): + ## ping6-helper.h: ns3::Ping6Helper::Ping6Helper(ns3::Ping6Helper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ping6Helper const &', 'arg0')]) + ## ping6-helper.h: ns3::Ping6Helper::Ping6Helper() [constructor] + cls.add_constructor([]) + ## ping6-helper.h: ns3::ApplicationContainer ns3::Ping6Helper::Install(ns3::NodeContainer c) [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('ns3::NodeContainer', 'c')]) + ## ping6-helper.h: void ns3::Ping6Helper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## ping6-helper.h: void ns3::Ping6Helper::SetIfIndex(uint32_t ifIndex) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t', 'ifIndex')]) + ## ping6-helper.h: void ns3::Ping6Helper::SetLocal(ns3::Ipv6Address ip) [member function] + cls.add_method('SetLocal', + 'void', + [param('ns3::Ipv6Address', 'ip')]) + ## ping6-helper.h: void ns3::Ping6Helper::SetRemote(ns3::Ipv6Address ip) [member function] + cls.add_method('SetRemote', + 'void', + [param('ns3::Ipv6Address', 'ip')]) + return + def register_Ns3PointToPointHelper_methods(root_module, cls): ## point-to-point-helper.h: ns3::PointToPointHelper::PointToPointHelper(ns3::PointToPointHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::PointToPointHelper const &', 'arg0')]) ## point-to-point-helper.h: ns3::PointToPointHelper::PointToPointHelper() [constructor] cls.add_constructor([]) - ## point-to-point-helper.h: void ns3::PointToPointHelper::SetQueue(std::string type, 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()) [member function] - cls.add_method('SetQueue', + ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] + cls.add_method('EnableAscii', 'void', - [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()')]) - ## point-to-point-helper.h: void ns3::PointToPointHelper::SetDeviceAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetDeviceAttribute', + [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], + is_static=True) + ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## point-to-point-helper.h: void ns3::PointToPointHelper::SetChannelAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetChannelAttribute', + [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], + is_static=True) + ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', + 'void', + [param('std::ostream &', 'os')], + is_static=True) ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function] cls.add_method('EnablePcap', 'void', @@ -919,26 +1127,6 @@ def register_Ns3PointToPointHelper_methods(root_module, cls): 'void', [param('std::string', 'filename')], is_static=True) - ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], - is_static=True) - ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], - is_static=True) - ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', - 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', - 'void', - [param('std::ostream &', 'os')], - is_static=True) ## point-to-point-helper.h: ns3::NetDeviceContainer ns3::PointToPointHelper::Install(ns3::NodeContainer c) [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', @@ -967,6 +1155,18 @@ def register_Ns3PointToPointHelper_methods(root_module, cls): cls.add_method('InstallStar', 'void', [param('std::string', 'hubName'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')]) + ## point-to-point-helper.h: void ns3::PointToPointHelper::SetChannelAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetChannelAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## point-to-point-helper.h: void ns3::PointToPointHelper::SetDeviceAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetDeviceAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## point-to-point-helper.h: void ns3::PointToPointHelper::SetQueue(std::string type, 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()) [member function] + cls.add_method('SetQueue', + 'void', + [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_Ns3TapBridgeHelper_methods(root_module, cls): @@ -976,10 +1176,6 @@ def register_Ns3TapBridgeHelper_methods(root_module, cls): cls.add_constructor([]) ## tap-bridge-helper.h: ns3::TapBridgeHelper::TapBridgeHelper(ns3::Ipv4Address gateway) [constructor] cls.add_constructor([param('ns3::Ipv4Address', 'gateway')]) - ## tap-bridge-helper.h: void ns3::TapBridgeHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) ## tap-bridge-helper.h: ns3::Ptr ns3::TapBridgeHelper::Install(ns3::Ptr node, ns3::Ptr nd) [member function] cls.add_method('Install', 'ns3::Ptr< ns3::NetDevice >', @@ -1000,6 +1196,10 @@ def register_Ns3TapBridgeHelper_methods(root_module, cls): cls.add_method('Install', 'ns3::Ptr< ns3::NetDevice >', [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('ns3::AttributeValue const &', 'v1')]) + ## tap-bridge-helper.h: void ns3::TapBridgeHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) return def register_Ns3UdpEchoClientHelper_methods(root_module, cls): @@ -1007,6 +1207,21 @@ def register_Ns3UdpEchoClientHelper_methods(root_module, cls): cls.add_constructor([param('ns3::UdpEchoClientHelper const &', 'arg0')]) ## udp-echo-helper.h: ns3::UdpEchoClientHelper::UdpEchoClientHelper(ns3::Ipv4Address ip, uint16_t port) [constructor] cls.add_constructor([param('ns3::Ipv4Address', 'ip'), param('uint16_t', 'port')]) + ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::Ptr node) const [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_const=True) + ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(std::string nodeName) const [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('std::string', 'nodeName')], + is_const=True) + ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::NodeContainer c) const [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('ns3::NodeContainer', 'c')], + is_const=True) ## udp-echo-helper.h: void ns3::UdpEchoClientHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] cls.add_method('SetAttribute', 'void', @@ -1023,21 +1238,6 @@ def register_Ns3UdpEchoClientHelper_methods(root_module, cls): cls.add_method('SetFill', 'void', [param('ns3::Ptr< ns3::Application >', 'app'), param('uint8_t *', 'fill'), param('uint32_t', 'fillLength'), param('uint32_t', 'dataLength')]) - ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::Ptr node) const [member function] - cls.add_method('Install', - 'ns3::ApplicationContainer', - [param('ns3::Ptr< ns3::Node >', 'node')], - is_const=True) - ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(std::string nodeName) const [member function] - cls.add_method('Install', - 'ns3::ApplicationContainer', - [param('std::string', 'nodeName')], - is_const=True) - ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::NodeContainer c) const [member function] - cls.add_method('Install', - 'ns3::ApplicationContainer', - [param('ns3::NodeContainer', 'c')], - is_const=True) return def register_Ns3UdpEchoServerHelper_methods(root_module, cls): @@ -1045,10 +1245,6 @@ def register_Ns3UdpEchoServerHelper_methods(root_module, cls): cls.add_constructor([param('ns3::UdpEchoServerHelper const &', 'arg0')]) ## udp-echo-helper.h: ns3::UdpEchoServerHelper::UdpEchoServerHelper(uint16_t port) [constructor] cls.add_constructor([param('uint16_t', 'port')]) - ## udp-echo-helper.h: void ns3::UdpEchoServerHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoServerHelper::Install(ns3::Ptr node) const [member function] cls.add_method('Install', 'ns3::ApplicationContainer', @@ -1064,6 +1260,10 @@ def register_Ns3UdpEchoServerHelper_methods(root_module, cls): 'ns3::ApplicationContainer', [param('ns3::NodeContainer', 'c')], is_const=True) + ## udp-echo-helper.h: void ns3::UdpEchoServerHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return def register_Ns3V4PingHelper_methods(root_module, cls): @@ -1071,10 +1271,6 @@ def register_Ns3V4PingHelper_methods(root_module, cls): cls.add_constructor([param('ns3::V4PingHelper const &', 'arg0')]) ## v4ping-helper.h: ns3::V4PingHelper::V4PingHelper(ns3::Ipv4Address remote) [constructor] cls.add_constructor([param('ns3::Ipv4Address', 'remote')]) - ## v4ping-helper.h: void ns3::V4PingHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) ## v4ping-helper.h: ns3::ApplicationContainer ns3::V4PingHelper::Install(ns3::NodeContainer nodes) const [member function] cls.add_method('Install', 'ns3::ApplicationContainer', @@ -1090,6 +1286,10 @@ def register_Ns3V4PingHelper_methods(root_module, cls): 'ns3::ApplicationContainer', [param('std::string', 'nodeName')], is_const=True) + ## v4ping-helper.h: void ns3::V4PingHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return def register_Ns3WifiHelper_methods(root_module, cls): @@ -1102,10 +1302,11 @@ def register_Ns3WifiHelper_methods(root_module, cls): 'ns3::WifiHelper', [], is_static=True) - ## wifi-helper.h: void ns3::WifiHelper::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', + ## wifi-helper.h: static void ns3::WifiHelper::EnableLogComponents() [member function] + cls.add_method('EnableLogComponents', '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()')]) + [], + is_static=True) ## wifi-helper.h: ns3::NetDeviceContainer ns3::WifiHelper::Install(ns3::WifiPhyHelper const & phy, ns3::WifiMacHelper const & mac, ns3::NodeContainer c) const [member function] cls.add_method('Install', 'ns3::NetDeviceContainer', @@ -1121,22 +1322,21 @@ def register_Ns3WifiHelper_methods(root_module, cls): 'ns3::NetDeviceContainer', [param('ns3::WifiPhyHelper const &', 'phy'), param('ns3::WifiMacHelper const &', 'mac'), param('std::string', 'nodeName')], is_const=True) + ## wifi-helper.h: void ns3::WifiHelper::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()')]) ## wifi-helper.h: void ns3::WifiHelper::SetStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('SetStandard', 'void', [param('ns3::WifiPhyStandard', 'standard')]) - ## wifi-helper.h: static void ns3::WifiHelper::EnableLogComponents() [member function] - cls.add_method('EnableLogComponents', - 'void', - [], - is_static=True) return def register_Ns3WifiMacHelper_methods(root_module, cls): - ## wifi-helper.h: ns3::WifiMacHelper::WifiMacHelper(ns3::WifiMacHelper const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiMacHelper const &', 'arg0')]) ## wifi-helper.h: ns3::WifiMacHelper::WifiMacHelper() [constructor] cls.add_constructor([]) + ## wifi-helper.h: ns3::WifiMacHelper::WifiMacHelper(ns3::WifiMacHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiMacHelper const &', 'arg0')]) ## wifi-helper.h: ns3::Ptr ns3::WifiMacHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiMac >', @@ -1145,10 +1345,10 @@ def register_Ns3WifiMacHelper_methods(root_module, cls): return def register_Ns3WifiPhyHelper_methods(root_module, cls): - ## wifi-helper.h: ns3::WifiPhyHelper::WifiPhyHelper(ns3::WifiPhyHelper const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiPhyHelper const &', 'arg0')]) ## wifi-helper.h: ns3::WifiPhyHelper::WifiPhyHelper() [constructor] cls.add_constructor([]) + ## wifi-helper.h: ns3::WifiPhyHelper::WifiPhyHelper(ns3::WifiPhyHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiPhyHelper const &', 'arg0')]) ## wifi-helper.h: ns3::Ptr ns3::WifiPhyHelper::Create(ns3::Ptr node, ns3::Ptr device) const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiPhy >', @@ -1161,24 +1361,24 @@ def register_Ns3YansWifiChannelHelper_methods(root_module, cls): cls.add_constructor([param('ns3::YansWifiChannelHelper const &', 'arg0')]) ## yans-wifi-helper.h: ns3::YansWifiChannelHelper::YansWifiChannelHelper() [constructor] cls.add_constructor([]) - ## yans-wifi-helper.h: static ns3::YansWifiChannelHelper ns3::YansWifiChannelHelper::Default() [member function] - cls.add_method('Default', - 'ns3::YansWifiChannelHelper', - [], - is_static=True) ## yans-wifi-helper.h: void ns3::YansWifiChannelHelper::AddPropagationLoss(std::string name, 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('AddPropagationLoss', 'void', [param('std::string', 'name'), 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()')]) - ## yans-wifi-helper.h: void ns3::YansWifiChannelHelper::SetPropagationDelay(std::string name, 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('SetPropagationDelay', - 'void', - [param('std::string', 'name'), 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()')]) ## yans-wifi-helper.h: ns3::Ptr ns3::YansWifiChannelHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::YansWifiChannel >', [], is_const=True) + ## yans-wifi-helper.h: static ns3::YansWifiChannelHelper ns3::YansWifiChannelHelper::Default() [member function] + cls.add_method('Default', + 'ns3::YansWifiChannelHelper', + [], + is_static=True) + ## yans-wifi-helper.h: void ns3::YansWifiChannelHelper::SetPropagationDelay(std::string name, 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('SetPropagationDelay', + 'void', + [param('std::string', 'name'), 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()')]) return def register_Ns3YansWifiPhyHelper_methods(root_module, cls): @@ -1191,26 +1391,26 @@ def register_Ns3YansWifiPhyHelper_methods(root_module, cls): 'ns3::YansWifiPhyHelper', [], is_static=True) - ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(ns3::Ptr channel) [member function] - cls.add_method('SetChannel', + ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] + cls.add_method('EnableAscii', 'void', - [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) - ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(std::string channelName) [member function] - cls.add_method('SetChannel', + [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], + is_static=True) + ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'channelName')]) - ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::Set(std::string name, ns3::AttributeValue const & v) [member function] - cls.add_method('Set', + [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], + is_static=True) + ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] + cls.add_method('EnableAscii', 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'v')]) - ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetErrorRateModel(std::string name, 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('SetErrorRateModel', + [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], + is_static=True) + ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAsciiAll(std::ostream & os) [member function] + cls.add_method('EnableAsciiAll', 'void', - [param('std::string', 'name'), 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()')]) - ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetPcapFormat(ns3::YansWifiPhyHelper::PcapFormat format) [member function] - cls.add_method('SetPcapFormat', - 'void', - [param('ns3::YansWifiPhyHelper::PcapFormat', 'format')]) + [param('std::ostream &', 'os')], + is_static=True) ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function] cls.add_method('EnablePcap', 'void', @@ -1235,26 +1435,26 @@ def register_Ns3YansWifiPhyHelper_methods(root_module, cls): cls.add_method('EnablePcapAll', 'void', [param('std::string', 'filename')]) - ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function] - cls.add_method('EnableAscii', + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::Set(std::string name, ns3::AttributeValue const & v) [member function] + cls.add_method('Set', 'void', - [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], - is_static=True) - ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function] - cls.add_method('EnableAscii', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'v')]) + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(ns3::Ptr channel) [member function] + cls.add_method('SetChannel', 'void', - [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], - is_static=True) - ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function] - cls.add_method('EnableAscii', + [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(std::string channelName) [member function] + cls.add_method('SetChannel', 'void', - [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], - is_static=True) - ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAsciiAll(std::ostream & os) [member function] - cls.add_method('EnableAsciiAll', + [param('std::string', 'channelName')]) + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetErrorRateModel(std::string name, 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('SetErrorRateModel', 'void', - [param('std::ostream &', 'os')], - is_static=True) + [param('std::string', 'name'), 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()')]) + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetPcapFormat(ns3::YansWifiPhyHelper::PcapFormat format) [member function] + cls.add_method('SetPcapFormat', + 'void', + [param('ns3::YansWifiPhyHelper::PcapFormat', 'format')]) ## yans-wifi-helper.h: ns3::Ptr ns3::YansWifiPhyHelper::Create(ns3::Ptr node, ns3::Ptr device) const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiPhy >', @@ -1300,6 +1500,22 @@ def register_Ns3Ipv4ListRoutingHelper_methods(root_module, cls): 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')]) + ## ipv6-list-routing-helper.h: ns3::Ipv6ListRoutingHelper::Ipv6ListRoutingHelper() [constructor] + cls.add_constructor([]) + ## ipv6-list-routing-helper.h: void ns3::Ipv6ListRoutingHelper::Add(ns3::Ipv6RoutingHelper const & routing, int16_t priority) [member function] + cls.add_method('Add', + 'void', + [param('ns3::Ipv6RoutingHelper const &', 'routing'), param('int16_t', 'priority')]) + ## ipv6-list-routing-helper.h: ns3::Ptr ns3::Ipv6ListRoutingHelper::Create(ns3::Ptr node) const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::Ipv6RoutingProtocol >', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_const=True, is_virtual=True) + return + def register_Ns3NqosWifiMacHelper_methods(root_module, cls): ## nqos-wifi-mac-helper.h: ns3::NqosWifiMacHelper::NqosWifiMacHelper(ns3::NqosWifiMacHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::NqosWifiMacHelper const &', 'arg0')]) @@ -1331,14 +1547,14 @@ def register_Ns3QosWifiMacHelper_methods(root_module, cls): 'ns3::QosWifiMacHelper', [], is_static=True) - ## qos-wifi-mac-helper.h: void ns3::QosWifiMacHelper::SetType(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('SetType', - '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()')]) ## qos-wifi-mac-helper.h: void ns3::QosWifiMacHelper::SetMsduAggregatorForAc(ns3::AccessClass accessClass, 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()) [member function] cls.add_method('SetMsduAggregatorForAc', 'void', [param('ns3::AccessClass', 'accessClass'), 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()')]) + ## qos-wifi-mac-helper.h: void ns3::QosWifiMacHelper::SetType(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('SetType', + '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()')]) ## qos-wifi-mac-helper.h: ns3::Ptr ns3::QosWifiMacHelper::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::WifiMac >', @@ -1346,6 +1562,62 @@ def register_Ns3QosWifiMacHelper_methods(root_module, cls): is_const=True, visibility='private', is_virtual=True) return +def register_Ns3AthstatsWifiTraceSink_methods(root_module, cls): + ## athstats-helper.h: ns3::AthstatsWifiTraceSink::AthstatsWifiTraceSink(ns3::AthstatsWifiTraceSink const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AthstatsWifiTraceSink const &', 'arg0')]) + ## athstats-helper.h: ns3::AthstatsWifiTraceSink::AthstatsWifiTraceSink() [constructor] + cls.add_constructor([]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::DevRxTrace(std::string context, ns3::Ptr p) [member function] + cls.add_method('DevRxTrace', + 'void', + [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::DevTxTrace(std::string context, ns3::Ptr p) [member function] + cls.add_method('DevTxTrace', + 'void', + [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')]) + ## athstats-helper.h: static ns3::TypeId ns3::AthstatsWifiTraceSink::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::Open(std::string const & name) [member function] + cls.add_method('Open', + 'void', + [param('std::string const &', 'name')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::PhyRxErrorTrace(std::string context, ns3::Ptr packet, double snr) [member function] + cls.add_method('PhyRxErrorTrace', + 'void', + [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'snr')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::PhyRxOkTrace(std::string context, ns3::Ptr packet, double snr, ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] + cls.add_method('PhyRxOkTrace', + 'void', + [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'snr'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::PhyStateTrace(std::string context, ns3::Time start, ns3::Time duration, ns3::WifiPhy::State state) [member function] + cls.add_method('PhyStateTrace', + 'void', + [param('std::string', 'context'), param('ns3::Time', 'start'), param('ns3::Time', 'duration'), param('ns3::WifiPhy::State', 'state')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::PhyTxTrace(std::string context, ns3::Ptr packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPower) [member function] + cls.add_method('PhyTxTrace', + 'void', + [param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPower')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::TxDataFailedTrace(std::string context, ns3::Mac48Address address) [member function] + cls.add_method('TxDataFailedTrace', + 'void', + [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::TxFinalDataFailedTrace(std::string context, ns3::Mac48Address address) [member function] + cls.add_method('TxFinalDataFailedTrace', + 'void', + [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::TxFinalRtsFailedTrace(std::string context, ns3::Mac48Address address) [member function] + cls.add_method('TxFinalRtsFailedTrace', + 'void', + [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) + ## athstats-helper.h: void ns3::AthstatsWifiTraceSink::TxRtsFailedTrace(std::string context, ns3::Mac48Address address) [member function] + cls.add_method('TxRtsFailedTrace', + 'void', + [param('std::string', 'context'), param('ns3::Mac48Address', 'address')]) + return + def register_functions(root_module): module = root_module register_functions_ns3_Config(module.get_submodule('Config'), root_module) diff --git a/bindings/python/ns3_module_internet_stack.py b/bindings/python/ns3_module_internet_stack.py index 567a72ac2..df38c1743 100644 --- a/bindings/python/ns3_module_internet_stack.py +++ b/bindings/python/ns3_module_internet_stack.py @@ -17,12 +17,74 @@ def register_types(module): module.add_class('Icmpv4TimeExceeded', parent=root_module['ns3::Header']) ## icmpv4.h: ns3::Icmpv4TimeExceeded [enumeration] module.add_enum('', ['TIME_TO_LIVE', 'FRAGMENT_REASSEMBLY'], outer_class=root_module['ns3::Icmpv4TimeExceeded']) + ## icmpv6-header.h: ns3::Icmpv6Header [class] + module.add_class('Icmpv6Header', parent=root_module['ns3::Header']) + ## icmpv6-header.h: ns3::Icmpv6Header::Type_e [enumeration] + module.add_enum('Type_e', ['ICMPV6_ERROR_DESTINATION_UNREACHABLE', 'ICMPV6_ERROR_PACKET_TOO_BIG', 'ICMPV6_ERROR_TIME_EXCEEDED', 'ICMPV6_ERROR_PARAMETER_ERROR', 'ICMPV6_ECHO_REQUEST', 'ICMPV6_ECHO_REPLY', 'ICMPV6_SUBSCRIBE_REQUEST', 'ICMPV6_SUBSCRIBE_REPORT', 'ICMPV6_SUBSCRIVE_END', 'ICMPV6_ND_ROUTER_SOLICITATION', 'ICMPV6_ND_ROUTER_ADVERTISEMENT', 'ICMPV6_ND_NEIGHBOR_SOLICITATION', 'ICMPV6_ND_NEIGHBOR_ADVERTISEMENT', 'ICMPV6_ND_REDIRECTION', 'ICMPV6_ROUTER_RENUMBER', 'ICMPV6_INFORMATION_REQUEST', 'ICMPV6_INFORMATION_RESPONSE', 'ICMPV6_INVERSE_ND_SOLICITATION', 'ICMPV6_INVERSE_ND_ADVERSTISEMENT', 'ICMPV6_MLDV2_SUBSCRIBE_REPORT', 'ICMPV6_MOBILITY_HA_DISCOVER_REQUEST', 'ICMPV6_MOBILITY_HA_DISCOVER_RESPONSE', 'ICMPV6_MOBILITY_MOBILE_PREFIX_SOLICITATION', 'ICMPV6_SECURE_ND_CERTIFICATE_PATH_SOLICITATION', 'ICMPV6_SECURE_ND_CERTIFICATE_PATH_ADVERTISEMENT', 'ICMPV6_EXPERIMENTAL_MOBILITY'], outer_class=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Header::OptionType_e [enumeration] + module.add_enum('OptionType_e', ['ICMPV6_OPT_LINK_LAYER_SOURCE', 'ICMPV6_OPT_LINK_LAYER_TARGET', 'ICMPV6_OPT_PREFIX', 'ICMPV6_OPT_REDIRECTED', 'ICMPV6_OPT_MTU'], outer_class=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Header::ErrorDestinationUnreachable_e [enumeration] + module.add_enum('ErrorDestinationUnreachable_e', ['ICMPV6_NO_ROUTE', 'ICMPV6_ADM_PROHIBITED', 'ICMPV6_NOT_NEIGHBOUR', 'ICMPV6_ADDR_UNREACHABLE', 'ICMPV6_PORT_UNREACHABLE'], outer_class=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Header::ErrorTimeExceeded_e [enumeration] + module.add_enum('ErrorTimeExceeded_e', ['ICMPV6_HOPLIMIT', 'ICMPV6_FRAGTIME'], outer_class=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Header::ErrorParameterError_e [enumeration] + module.add_enum('ErrorParameterError_e', ['ICMPV6_MALFORMED_HEADER', 'ICMPV6_UNKNOWN_NEXT_HEADER', 'ICMPV6_UNKNOWN_OPTION'], outer_class=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6NA [class] + module.add_class('Icmpv6NA', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6NS [class] + module.add_class('Icmpv6NS', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6OptionHeader [class] + module.add_class('Icmpv6OptionHeader', parent=root_module['ns3::Header']) + ## icmpv6-header.h: ns3::Icmpv6OptionLinkLayerAddress [class] + module.add_class('Icmpv6OptionLinkLayerAddress', parent=root_module['ns3::Icmpv6OptionHeader']) + ## icmpv6-header.h: ns3::Icmpv6OptionMtu [class] + module.add_class('Icmpv6OptionMtu', parent=root_module['ns3::Icmpv6OptionHeader']) + ## icmpv6-header.h: ns3::Icmpv6OptionPrefixInformation [class] + module.add_class('Icmpv6OptionPrefixInformation', parent=root_module['ns3::Icmpv6OptionHeader']) + ## icmpv6-header.h: ns3::Icmpv6OptionRedirected [class] + module.add_class('Icmpv6OptionRedirected', parent=root_module['ns3::Icmpv6OptionHeader']) + ## icmpv6-header.h: ns3::Icmpv6ParameterError [class] + module.add_class('Icmpv6ParameterError', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6RA [class] + module.add_class('Icmpv6RA', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6RS [class] + module.add_class('Icmpv6RS', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Redirection [class] + module.add_class('Icmpv6Redirection', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6TimeExceeded [class] + module.add_class('Icmpv6TimeExceeded', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6TooBig [class] + module.add_class('Icmpv6TooBig', parent=root_module['ns3::Icmpv6Header']) ## tcp-header.h: ns3::TcpHeader [class] module.add_class('TcpHeader', parent=root_module['ns3::Header']) ## tcp-header.h: ns3::TcpHeader::Flags_t [enumeration] module.add_enum('Flags_t', ['NONE', 'FIN', 'SYN', 'RST', 'PSH', 'ACK', 'URG'], outer_class=root_module['ns3::TcpHeader']) ## udp-header.h: ns3::UdpHeader [class] module.add_class('UdpHeader', parent=root_module['ns3::Header']) + ## arp-cache.h: ns3::ArpCache [class] + module.add_class('ArpCache', parent=root_module['ns3::Object']) + ## arp-cache.h: ns3::ArpCache::Entry [class] + module.add_class('Entry', outer_class=root_module['ns3::ArpCache']) + ## arp-l3-protocol.h: ns3::ArpL3Protocol [class] + module.add_class('ArpL3Protocol', parent=root_module['ns3::Object']) + ## icmpv6-header.h: ns3::Icmpv6DestinationUnreachable [class] + module.add_class('Icmpv6DestinationUnreachable', parent=root_module['ns3::Icmpv6Header']) + ## icmpv6-header.h: ns3::Icmpv6Echo [class] + 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-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']) + ## nsc-tcp-l4-protocol.h: ns3::NscTcpL4Protocol [class] + module.add_class('NscTcpL4Protocol', parent=root_module['ns3::Ipv4L4Protocol']) + ## 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']) ## Register a nested module for the namespace Config @@ -79,37 +141,40 @@ def register_methods(root_module): register_Ns3Icmpv4Echo_methods(root_module, root_module['ns3::Icmpv4Echo']) register_Ns3Icmpv4Header_methods(root_module, root_module['ns3::Icmpv4Header']) register_Ns3Icmpv4TimeExceeded_methods(root_module, root_module['ns3::Icmpv4TimeExceeded']) + register_Ns3Icmpv6Header_methods(root_module, root_module['ns3::Icmpv6Header']) + register_Ns3Icmpv6NA_methods(root_module, root_module['ns3::Icmpv6NA']) + register_Ns3Icmpv6NS_methods(root_module, root_module['ns3::Icmpv6NS']) + register_Ns3Icmpv6OptionHeader_methods(root_module, root_module['ns3::Icmpv6OptionHeader']) + register_Ns3Icmpv6OptionLinkLayerAddress_methods(root_module, root_module['ns3::Icmpv6OptionLinkLayerAddress']) + register_Ns3Icmpv6OptionMtu_methods(root_module, root_module['ns3::Icmpv6OptionMtu']) + register_Ns3Icmpv6OptionPrefixInformation_methods(root_module, root_module['ns3::Icmpv6OptionPrefixInformation']) + register_Ns3Icmpv6OptionRedirected_methods(root_module, root_module['ns3::Icmpv6OptionRedirected']) + register_Ns3Icmpv6ParameterError_methods(root_module, root_module['ns3::Icmpv6ParameterError']) + register_Ns3Icmpv6RA_methods(root_module, root_module['ns3::Icmpv6RA']) + register_Ns3Icmpv6RS_methods(root_module, root_module['ns3::Icmpv6RS']) + register_Ns3Icmpv6Redirection_methods(root_module, root_module['ns3::Icmpv6Redirection']) + register_Ns3Icmpv6TimeExceeded_methods(root_module, root_module['ns3::Icmpv6TimeExceeded']) + register_Ns3Icmpv6TooBig_methods(root_module, root_module['ns3::Icmpv6TooBig']) register_Ns3TcpHeader_methods(root_module, root_module['ns3::TcpHeader']) register_Ns3UdpHeader_methods(root_module, root_module['ns3::UdpHeader']) + register_Ns3ArpCache_methods(root_module, root_module['ns3::ArpCache']) + register_Ns3ArpCacheEntry_methods(root_module, root_module['ns3::ArpCache::Entry']) + register_Ns3ArpL3Protocol_methods(root_module, root_module['ns3::ArpL3Protocol']) + register_Ns3Icmpv6DestinationUnreachable_methods(root_module, root_module['ns3::Icmpv6DestinationUnreachable']) + 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_Ns3NscTcpL4Protocol_methods(root_module, root_module['ns3::NscTcpL4Protocol']) + 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']) return def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls): ## icmpv4.h: ns3::Icmpv4DestinationUnreachable::Icmpv4DestinationUnreachable(ns3::Icmpv4DestinationUnreachable const & arg0) [copy constructor] cls.add_constructor([param('ns3::Icmpv4DestinationUnreachable const &', 'arg0')]) - ## icmpv4.h: static ns3::TypeId ns3::Icmpv4DestinationUnreachable::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## icmpv4.h: ns3::Icmpv4DestinationUnreachable::Icmpv4DestinationUnreachable() [constructor] cls.add_constructor([]) - ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetNextHopMtu(uint16_t mtu) [member function] - cls.add_method('SetNextHopMtu', - 'void', - [param('uint16_t', 'mtu')]) - ## icmpv4.h: uint16_t ns3::Icmpv4DestinationUnreachable::GetNextHopMtu() const [member function] - cls.add_method('GetNextHopMtu', - 'uint16_t', - [], - is_const=True) - ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetData(ns3::Ptr data) [member function] - cls.add_method('SetData', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'data')]) - ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetHeader(ns3::Ipv4Header header) [member function] - cls.add_method('SetHeader', - 'void', - [param('ns3::Ipv4Header', 'header')]) ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::GetData(uint8_t * payload) const [member function] cls.add_method('GetData', 'void', @@ -120,6 +185,33 @@ def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls): 'ns3::Ipv4Header', [], is_const=True) + ## icmpv4.h: uint16_t ns3::Icmpv4DestinationUnreachable::GetNextHopMtu() const [member function] + cls.add_method('GetNextHopMtu', + 'uint16_t', + [], + is_const=True) + ## icmpv4.h: static ns3::TypeId ns3::Icmpv4DestinationUnreachable::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetData(ns3::Ptr data) [member function] + cls.add_method('SetData', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'data')]) + ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetHeader(ns3::Ipv4Header header) [member function] + cls.add_method('SetHeader', + 'void', + [param('ns3::Ipv4Header', 'header')]) + ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::SetNextHopMtu(uint16_t mtu) [member function] + cls.add_method('SetNextHopMtu', + 'void', + [param('uint16_t', 'mtu')]) + ## icmpv4.h: uint32_t ns3::Icmpv4DestinationUnreachable::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + visibility='private', is_virtual=True) ## icmpv4.h: ns3::TypeId ns3::Icmpv4DestinationUnreachable::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -130,26 +222,77 @@ def register_Ns3Icmpv4DestinationUnreachable_methods(root_module, cls): 'uint32_t', [], is_const=True, visibility='private', is_virtual=True) - ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_const=True, visibility='private', is_virtual=True) - ## icmpv4.h: uint32_t ns3::Icmpv4DestinationUnreachable::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - visibility='private', is_virtual=True) ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, visibility='private', is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4DestinationUnreachable::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3Icmpv4Echo_methods(root_module, cls): ## icmpv4.h: ns3::Icmpv4Echo::Icmpv4Echo(ns3::Icmpv4Echo const & arg0) [copy constructor] cls.add_constructor([param('ns3::Icmpv4Echo const &', 'arg0')]) + ## icmpv4.h: ns3::Icmpv4Echo::Icmpv4Echo() [constructor] + cls.add_constructor([]) + ## icmpv4.h: uint32_t ns3::Icmpv4Echo::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetData(uint8_t * payload) const [member function] + cls.add_method('GetData', + 'uint32_t', + [param('uint8_t *', 'payload')], + is_const=True) + ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetDataSize() const [member function] + cls.add_method('GetDataSize', + 'uint32_t', + [], + is_const=True) + ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetIdentifier() const [member function] + cls.add_method('GetIdentifier', + 'uint16_t', + [], + is_const=True) + ## icmpv4.h: ns3::TypeId ns3::Icmpv4Echo::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetSequenceNumber() const [member function] + cls.add_method('GetSequenceNumber', + 'uint16_t', + [], + is_const=True) + ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Echo::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv4.h: void ns3::Icmpv4Echo::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4Echo::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4Echo::SetData(ns3::Ptr data) [member function] + cls.add_method('SetData', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'data')]) ## icmpv4.h: void ns3::Icmpv4Echo::SetIdentifier(uint16_t id) [member function] cls.add_method('SetIdentifier', 'void', @@ -158,96 +301,27 @@ def register_Ns3Icmpv4Echo_methods(root_module, cls): cls.add_method('SetSequenceNumber', 'void', [param('uint16_t', 'seq')]) - ## icmpv4.h: void ns3::Icmpv4Echo::SetData(ns3::Ptr data) [member function] - cls.add_method('SetData', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'data')]) - ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetIdentifier() const [member function] - cls.add_method('GetIdentifier', - 'uint16_t', - [], - is_const=True) - ## icmpv4.h: uint16_t ns3::Icmpv4Echo::GetSequenceNumber() const [member function] - cls.add_method('GetSequenceNumber', - 'uint16_t', - [], - is_const=True) - ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetDataSize() const [member function] - cls.add_method('GetDataSize', - 'uint32_t', - [], - is_const=True) - ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetData(uint8_t * payload) const [member function] - cls.add_method('GetData', - 'uint32_t', - [param('uint8_t *', 'payload')], - is_const=True) - ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Echo::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## icmpv4.h: ns3::Icmpv4Echo::Icmpv4Echo() [constructor] - cls.add_constructor([]) - ## icmpv4.h: ns3::TypeId ns3::Icmpv4Echo::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## icmpv4.h: void ns3::Icmpv4Echo::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_const=True, is_virtual=True) - ## icmpv4.h: uint32_t ns3::Icmpv4Echo::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) - ## icmpv4.h: void ns3::Icmpv4Echo::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) return def register_Ns3Icmpv4Header_methods(root_module, cls): ## icmpv4.h: ns3::Icmpv4Header::Icmpv4Header(ns3::Icmpv4Header const & arg0) [copy constructor] cls.add_constructor([param('ns3::Icmpv4Header const &', 'arg0')]) + ## icmpv4.h: ns3::Icmpv4Header::Icmpv4Header() [constructor] + cls.add_constructor([]) + ## icmpv4.h: uint32_t ns3::Icmpv4Header::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## icmpv4.h: void ns3::Icmpv4Header::EnableChecksum() [member function] cls.add_method('EnableChecksum', 'void', []) - ## icmpv4.h: void ns3::Icmpv4Header::SetType(uint8_t type) [member function] - cls.add_method('SetType', - 'void', - [param('uint8_t', 'type')]) - ## icmpv4.h: void ns3::Icmpv4Header::SetCode(uint8_t code) [member function] - cls.add_method('SetCode', - 'void', - [param('uint8_t', 'code')]) - ## icmpv4.h: uint8_t ns3::Icmpv4Header::GetType() const [member function] - cls.add_method('GetType', - 'uint8_t', - [], - is_const=True) ## icmpv4.h: uint8_t ns3::Icmpv4Header::GetCode() const [member function] cls.add_method('GetCode', 'uint8_t', [], is_const=True) - ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Header::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## icmpv4.h: ns3::Icmpv4Header::Icmpv4Header() [constructor] - cls.add_constructor([]) ## icmpv4.h: ns3::TypeId ns3::Icmpv4Header::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -258,34 +332,46 @@ def register_Ns3Icmpv4Header_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## icmpv4.h: void ns3::Icmpv4Header::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_const=True, is_virtual=True) - ## icmpv4.h: uint32_t ns3::Icmpv4Header::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## icmpv4.h: uint8_t ns3::Icmpv4Header::GetType() const [member function] + cls.add_method('GetType', + 'uint8_t', + [], + is_const=True) + ## icmpv4.h: static ns3::TypeId ns3::Icmpv4Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## icmpv4.h: void ns3::Icmpv4Header::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4Header::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4Header::SetCode(uint8_t code) [member function] + cls.add_method('SetCode', + 'void', + [param('uint8_t', 'code')]) + ## icmpv4.h: void ns3::Icmpv4Header::SetType(uint8_t type) [member function] + cls.add_method('SetType', + 'void', + [param('uint8_t', 'type')]) return def register_Ns3Icmpv4TimeExceeded_methods(root_module, cls): ## icmpv4.h: ns3::Icmpv4TimeExceeded::Icmpv4TimeExceeded(ns3::Icmpv4TimeExceeded const & arg0) [copy constructor] cls.add_constructor([param('ns3::Icmpv4TimeExceeded const &', 'arg0')]) - ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetData(ns3::Ptr data) [member function] - cls.add_method('SetData', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'data')]) - ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetHeader(ns3::Ipv4Header header) [member function] - cls.add_method('SetHeader', - 'void', - [param('ns3::Ipv4Header', 'header')]) + ## icmpv4.h: ns3::Icmpv4TimeExceeded::Icmpv4TimeExceeded() [constructor] + cls.add_constructor([]) + ## icmpv4.h: uint32_t ns3::Icmpv4TimeExceeded::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## icmpv4.h: void ns3::Icmpv4TimeExceeded::GetData(uint8_t * payload) const [member function] cls.add_method('GetData', 'void', @@ -296,13 +382,6 @@ def register_Ns3Icmpv4TimeExceeded_methods(root_module, cls): 'ns3::Ipv4Header', [], is_const=True) - ## icmpv4.h: static ns3::TypeId ns3::Icmpv4TimeExceeded::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## icmpv4.h: ns3::Icmpv4TimeExceeded::Icmpv4TimeExceeded() [constructor] - cls.add_constructor([]) ## icmpv4.h: ns3::TypeId ns3::Icmpv4TimeExceeded::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -313,21 +392,912 @@ def register_Ns3Icmpv4TimeExceeded_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## icmpv4.h: void ns3::Icmpv4TimeExceeded::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_const=True, is_virtual=True) - ## icmpv4.h: uint32_t ns3::Icmpv4TimeExceeded::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## icmpv4.h: static ns3::TypeId ns3::Icmpv4TimeExceeded::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## icmpv4.h: void ns3::Icmpv4TimeExceeded::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4TimeExceeded::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetData(ns3::Ptr data) [member function] + cls.add_method('SetData', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'data')]) + ## icmpv4.h: void ns3::Icmpv4TimeExceeded::SetHeader(ns3::Ipv4Header header) [member function] + cls.add_method('SetHeader', + 'void', + [param('ns3::Ipv4Header', 'header')]) + return + +def register_Ns3Icmpv6Header_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6Header::Icmpv6Header(ns3::Icmpv6Header const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6Header const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6Header::Icmpv6Header() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: void ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(ns3::Ipv6Address src, ns3::Ipv6Address dst, uint16_t length, uint8_t protocol) [member function] + cls.add_method('CalculatePseudoHeaderChecksum', + 'void', + [param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('uint16_t', 'length'), param('uint8_t', 'protocol')]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Header::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: uint16_t ns3::Icmpv6Header::GetChecksum() const [member function] + cls.add_method('GetChecksum', + 'uint16_t', + [], + is_const=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6Header::GetCode() const [member function] + cls.add_method('GetCode', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6Header::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Header::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6Header::GetType() const [member function] + cls.add_method('GetType', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6Header::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Header::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Header::SetChecksum(uint16_t checksum) [member function] + cls.add_method('SetChecksum', + 'void', + [param('uint16_t', 'checksum')]) + ## icmpv6-header.h: void ns3::Icmpv6Header::SetCode(uint8_t code) [member function] + cls.add_method('SetCode', + 'void', + [param('uint8_t', 'code')]) + ## icmpv6-header.h: void ns3::Icmpv6Header::SetType(uint8_t type) [member function] + cls.add_method('SetType', + 'void', + [param('uint8_t', 'type')]) + return + +def register_Ns3Icmpv6NA_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6NA::Icmpv6NA(ns3::Icmpv6NA const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6NA const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6NA::Icmpv6NA() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NA::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: bool ns3::Icmpv6NA::GetFlagO() const [member function] + cls.add_method('GetFlagO', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: bool ns3::Icmpv6NA::GetFlagR() const [member function] + cls.add_method('GetFlagR', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: bool ns3::Icmpv6NA::GetFlagS() const [member function] + cls.add_method('GetFlagS', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6NA::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ipv6Address ns3::Icmpv6NA::GetIpv6Target() const [member function] + cls.add_method('GetIpv6Target', + 'ns3::Ipv6Address', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NA::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NA::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6NA::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6NA::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6NA::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6NA::SetFlagO(bool o) [member function] + cls.add_method('SetFlagO', + 'void', + [param('bool', 'o')]) + ## icmpv6-header.h: void ns3::Icmpv6NA::SetFlagR(bool r) [member function] + cls.add_method('SetFlagR', + 'void', + [param('bool', 'r')]) + ## icmpv6-header.h: void ns3::Icmpv6NA::SetFlagS(bool s) [member function] + cls.add_method('SetFlagS', + 'void', + [param('bool', 's')]) + ## icmpv6-header.h: void ns3::Icmpv6NA::SetIpv6Target(ns3::Ipv6Address target) [member function] + cls.add_method('SetIpv6Target', + 'void', + [param('ns3::Ipv6Address', 'target')]) + ## icmpv6-header.h: void ns3::Icmpv6NA::SetReserved(uint32_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint32_t', 'reserved')]) + return + +def register_Ns3Icmpv6NS_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6NS::Icmpv6NS(ns3::Icmpv6NS const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6NS const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6NS::Icmpv6NS(ns3::Ipv6Address target) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'target')]) + ## icmpv6-header.h: ns3::Icmpv6NS::Icmpv6NS() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NS::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6NS::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ipv6Address ns3::Icmpv6NS::GetIpv6Target() const [member function] + cls.add_method('GetIpv6Target', + 'ns3::Ipv6Address', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NS::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6NS::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6NS::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6NS::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6NS::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6NS::SetIpv6Target(ns3::Ipv6Address target) [member function] + cls.add_method('SetIpv6Target', + 'void', + [param('ns3::Ipv6Address', 'target')]) + ## icmpv6-header.h: void ns3::Icmpv6NS::SetReserved(uint32_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint32_t', 'reserved')]) + return + +def register_Ns3Icmpv6OptionHeader_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6OptionHeader::Icmpv6OptionHeader(ns3::Icmpv6OptionHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6OptionHeader const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6OptionHeader::Icmpv6OptionHeader() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6OptionHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6OptionHeader::GetLength() const [member function] + cls.add_method('GetLength', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6OptionHeader::GetType() const [member function] + cls.add_method('GetType', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6OptionHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionHeader::SetLength(uint8_t len) [member function] + cls.add_method('SetLength', + 'void', + [param('uint8_t', 'len')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionHeader::SetType(uint8_t type) [member function] + cls.add_method('SetType', + 'void', + [param('uint8_t', 'type')]) + return + +def register_Ns3Icmpv6OptionLinkLayerAddress_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress(ns3::Icmpv6OptionLinkLayerAddress const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6OptionLinkLayerAddress const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress(bool source) [constructor] + cls.add_constructor([param('bool', 'source')]) + ## icmpv6-header.h: ns3::Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress(bool source, ns3::Address addr) [constructor] + cls.add_constructor([param('bool', 'source'), param('ns3::Address', 'addr')]) + ## icmpv6-header.h: ns3::Icmpv6OptionLinkLayerAddress::Icmpv6OptionLinkLayerAddress() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionLinkLayerAddress::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::Address ns3::Icmpv6OptionLinkLayerAddress::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Address', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6OptionLinkLayerAddress::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionLinkLayerAddress::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6OptionLinkLayerAddress::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionLinkLayerAddress::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionLinkLayerAddress::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionLinkLayerAddress::SetAddress(ns3::Address addr) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'addr')]) + return + +def register_Ns3Icmpv6OptionMtu_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6OptionMtu::Icmpv6OptionMtu(ns3::Icmpv6OptionMtu const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6OptionMtu const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6OptionMtu::Icmpv6OptionMtu() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: ns3::Icmpv6OptionMtu::Icmpv6OptionMtu(uint32_t mtu) [constructor] + cls.add_constructor([param('uint32_t', 'mtu')]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionMtu::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6OptionMtu::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionMtu::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint16_t ns3::Icmpv6OptionMtu::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint16_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionMtu::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6OptionMtu::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionMtu::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionMtu::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionMtu::SetMtu(uint32_t mtu) [member function] + cls.add_method('SetMtu', + 'void', + [param('uint32_t', 'mtu')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionMtu::SetReserved(uint16_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint16_t', 'reserved')]) + return + +def register_Ns3Icmpv6OptionPrefixInformation_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation(ns3::Icmpv6OptionPrefixInformation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6OptionPrefixInformation const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation(ns3::Ipv6Address network, uint8_t prefixlen) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'network'), param('uint8_t', 'prefixlen')]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionPrefixInformation::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6OptionPrefixInformation::GetFlags() const [member function] + cls.add_method('GetFlags', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6OptionPrefixInformation::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionPrefixInformation::GetPreferredTime() const [member function] + cls.add_method('GetPreferredTime', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::Ipv6Address ns3::Icmpv6OptionPrefixInformation::GetPrefix() const [member function] + cls.add_method('GetPrefix', + 'ns3::Ipv6Address', + [], + is_const=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6OptionPrefixInformation::GetPrefixLength() const [member function] + cls.add_method('GetPrefixLength', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionPrefixInformation::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionPrefixInformation::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6OptionPrefixInformation::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionPrefixInformation::GetValidTime() const [member function] + cls.add_method('GetValidTime', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetFlags(uint8_t flags) [member function] + cls.add_method('SetFlags', + 'void', + [param('uint8_t', 'flags')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetPreferredTime(uint32_t preferredTime) [member function] + cls.add_method('SetPreferredTime', + 'void', + [param('uint32_t', 'preferredTime')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetPrefix(ns3::Ipv6Address prefix) [member function] + cls.add_method('SetPrefix', + 'void', + [param('ns3::Ipv6Address', 'prefix')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetPrefixLength(uint8_t prefixLength) [member function] + cls.add_method('SetPrefixLength', + 'void', + [param('uint8_t', 'prefixLength')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetReserved(uint32_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint32_t', 'reserved')]) + ## icmpv6-header.h: void ns3::Icmpv6OptionPrefixInformation::SetValidTime(uint32_t validTime) [member function] + cls.add_method('SetValidTime', + 'void', + [param('uint32_t', 'validTime')]) + return + +def register_Ns3Icmpv6OptionRedirected_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6OptionRedirected::Icmpv6OptionRedirected(ns3::Icmpv6OptionRedirected const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6OptionRedirected const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6OptionRedirected::Icmpv6OptionRedirected() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionRedirected::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6OptionRedirected::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ptr ns3::Icmpv6OptionRedirected::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet >', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6OptionRedirected::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6OptionRedirected::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionRedirected::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionRedirected::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6OptionRedirected::SetPacket(ns3::Ptr packet) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet')]) + return + +def register_Ns3Icmpv6ParameterError_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6ParameterError::Icmpv6ParameterError(ns3::Icmpv6ParameterError const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6ParameterError const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6ParameterError::Icmpv6ParameterError() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6ParameterError::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6ParameterError::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ptr ns3::Icmpv6ParameterError::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet >', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6ParameterError::GetPtr() const [member function] + cls.add_method('GetPtr', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6ParameterError::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6ParameterError::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6ParameterError::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6ParameterError::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6ParameterError::SetPacket(ns3::Ptr p) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p')]) + ## icmpv6-header.h: void ns3::Icmpv6ParameterError::SetPtr(uint32_t ptr) [member function] + cls.add_method('SetPtr', + 'void', + [param('uint32_t', 'ptr')]) + return + +def register_Ns3Icmpv6RA_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6RA::Icmpv6RA(ns3::Icmpv6RA const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6RA const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6RA::Icmpv6RA() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RA::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6RA::GetCurHopLimit() const [member function] + cls.add_method('GetCurHopLimit', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: bool ns3::Icmpv6RA::GetFlagH() const [member function] + cls.add_method('GetFlagH', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: bool ns3::Icmpv6RA::GetFlagM() const [member function] + cls.add_method('GetFlagM', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: bool ns3::Icmpv6RA::GetFlagO() const [member function] + cls.add_method('GetFlagO', + 'bool', + [], + is_const=True) + ## icmpv6-header.h: uint8_t ns3::Icmpv6RA::GetFlags() const [member function] + cls.add_method('GetFlags', + 'uint8_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6RA::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint16_t ns3::Icmpv6RA::GetLifeTime() const [member function] + cls.add_method('GetLifeTime', + 'uint16_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RA::GetReachableTime() const [member function] + cls.add_method('GetReachableTime', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RA::GetRetransmissionTime() const [member function] + cls.add_method('GetRetransmissionTime', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RA::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6RA::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6RA::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6RA::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetCurHopLimit(uint8_t m) [member function] + cls.add_method('SetCurHopLimit', + 'void', + [param('uint8_t', 'm')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetFlagH(bool h) [member function] + cls.add_method('SetFlagH', + 'void', + [param('bool', 'h')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetFlagM(bool m) [member function] + cls.add_method('SetFlagM', + 'void', + [param('bool', 'm')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetFlagO(bool o) [member function] + cls.add_method('SetFlagO', + 'void', + [param('bool', 'o')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetFlags(uint8_t f) [member function] + cls.add_method('SetFlags', + 'void', + [param('uint8_t', 'f')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetLifeTime(uint16_t l) [member function] + cls.add_method('SetLifeTime', + 'void', + [param('uint16_t', 'l')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetReachableTime(uint32_t r) [member function] + cls.add_method('SetReachableTime', + 'void', + [param('uint32_t', 'r')]) + ## icmpv6-header.h: void ns3::Icmpv6RA::SetRetransmissionTime(uint32_t r) [member function] + cls.add_method('SetRetransmissionTime', + 'void', + [param('uint32_t', 'r')]) + return + +def register_Ns3Icmpv6RS_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6RS::Icmpv6RS(ns3::Icmpv6RS const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6RS const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6RS::Icmpv6RS() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RS::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6RS::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RS::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6RS::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6RS::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6RS::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6RS::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6RS::SetReserved(uint32_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint32_t', 'reserved')]) + return + +def register_Ns3Icmpv6Redirection_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6Redirection::Icmpv6Redirection(ns3::Icmpv6Redirection const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6Redirection const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6Redirection::Icmpv6Redirection() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Redirection::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::Ipv6Address ns3::Icmpv6Redirection::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Ipv6Address', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6Redirection::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Redirection::GetReserved() const [member function] + cls.add_method('GetReserved', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Redirection::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ipv6Address ns3::Icmpv6Redirection::GetTarget() const [member function] + cls.add_method('GetTarget', + 'ns3::Ipv6Address', + [], + is_const=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6Redirection::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6Redirection::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Redirection::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Redirection::SetDestination(ns3::Ipv6Address destination) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Ipv6Address', 'destination')]) + ## icmpv6-header.h: void ns3::Icmpv6Redirection::SetReserved(uint32_t reserved) [member function] + cls.add_method('SetReserved', + 'void', + [param('uint32_t', 'reserved')]) + ## icmpv6-header.h: void ns3::Icmpv6Redirection::SetTarget(ns3::Ipv6Address target) [member function] + cls.add_method('SetTarget', + 'void', + [param('ns3::Ipv6Address', 'target')]) + return + +def register_Ns3Icmpv6TimeExceeded_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6TimeExceeded::Icmpv6TimeExceeded(ns3::Icmpv6TimeExceeded const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6TimeExceeded const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6TimeExceeded::Icmpv6TimeExceeded() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6TimeExceeded::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6TimeExceeded::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ptr ns3::Icmpv6TimeExceeded::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet >', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6TimeExceeded::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6TimeExceeded::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6TimeExceeded::SetPacket(ns3::Ptr p) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p')]) + return + +def register_Ns3Icmpv6TooBig_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6TooBig::Icmpv6TooBig(ns3::Icmpv6TooBig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6TooBig const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6TooBig::Icmpv6TooBig() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6TooBig::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6TooBig::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6TooBig::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint32_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::Ptr ns3::Icmpv6TooBig::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet >', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6TooBig::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6TooBig::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6TooBig::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6TooBig::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6TooBig::SetMtu(uint32_t mtu) [member function] + cls.add_method('SetMtu', + 'void', + [param('uint32_t', 'mtu')]) + ## icmpv6-header.h: void ns3::Icmpv6TooBig::SetPacket(ns3::Ptr p) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p')]) return def register_Ns3TcpHeader_methods(root_module, cls): @@ -335,45 +1305,18 @@ def register_Ns3TcpHeader_methods(root_module, cls): cls.add_constructor([param('ns3::TcpHeader const &', 'arg0')]) ## tcp-header.h: ns3::TcpHeader::TcpHeader() [constructor] cls.add_constructor([]) + ## tcp-header.h: uint32_t ns3::TcpHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## tcp-header.h: void ns3::TcpHeader::EnableChecksums() [member function] cls.add_method('EnableChecksums', 'void', []) - ## tcp-header.h: void ns3::TcpHeader::SetSourcePort(uint16_t port) [member function] - cls.add_method('SetSourcePort', - 'void', - [param('uint16_t', 'port')]) - ## tcp-header.h: void ns3::TcpHeader::SetDestinationPort(uint16_t port) [member function] - cls.add_method('SetDestinationPort', - 'void', - [param('uint16_t', 'port')]) - ## tcp-header.h: void ns3::TcpHeader::SetSequenceNumber(SequenceNumber sequenceNumber) [member function] - cls.add_method('SetSequenceNumber', - 'void', - [param('SequenceNumber', 'sequenceNumber')]) - ## tcp-header.h: void ns3::TcpHeader::SetAckNumber(SequenceNumber ackNumber) [member function] - cls.add_method('SetAckNumber', - 'void', - [param('SequenceNumber', 'ackNumber')]) - ## tcp-header.h: void ns3::TcpHeader::SetLength(uint8_t length) [member function] - cls.add_method('SetLength', - 'void', - [param('uint8_t', 'length')]) - ## tcp-header.h: void ns3::TcpHeader::SetFlags(uint8_t flags) [member function] - cls.add_method('SetFlags', - 'void', - [param('uint8_t', 'flags')]) - ## tcp-header.h: void ns3::TcpHeader::SetWindowSize(uint16_t windowSize) [member function] - cls.add_method('SetWindowSize', - 'void', - [param('uint16_t', 'windowSize')]) - ## tcp-header.h: void ns3::TcpHeader::SetUrgentPointer(uint16_t urgentPointer) [member function] - cls.add_method('SetUrgentPointer', - 'void', - [param('uint16_t', 'urgentPointer')]) - ## tcp-header.h: uint16_t ns3::TcpHeader::GetSourcePort() const [member function] - cls.add_method('GetSourcePort', - 'uint16_t', + ## tcp-header.h: SequenceNumber ns3::TcpHeader::GetAckNumber() const [member function] + cls.add_method('GetAckNumber', + 'SequenceNumber', [], is_const=True) ## tcp-header.h: uint16_t ns3::TcpHeader::GetDestinationPort() const [member function] @@ -381,24 +1324,44 @@ def register_Ns3TcpHeader_methods(root_module, cls): 'uint16_t', [], is_const=True) - ## tcp-header.h: SequenceNumber ns3::TcpHeader::GetSequenceNumber() const [member function] - cls.add_method('GetSequenceNumber', - 'SequenceNumber', + ## tcp-header.h: uint8_t ns3::TcpHeader::GetFlags() const [member function] + cls.add_method('GetFlags', + 'uint8_t', [], is_const=True) - ## tcp-header.h: SequenceNumber ns3::TcpHeader::GetAckNumber() const [member function] - cls.add_method('GetAckNumber', - 'SequenceNumber', + ## tcp-header.h: ns3::TypeId ns3::TcpHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', [], - is_const=True) + is_const=True, is_virtual=True) ## tcp-header.h: uint8_t ns3::TcpHeader::GetLength() const [member function] cls.add_method('GetLength', 'uint8_t', [], is_const=True) - ## tcp-header.h: uint8_t ns3::TcpHeader::GetFlags() const [member function] - cls.add_method('GetFlags', - 'uint8_t', + ## tcp-header.h: SequenceNumber ns3::TcpHeader::GetSequenceNumber() const [member function] + cls.add_method('GetSequenceNumber', + 'SequenceNumber', + [], + is_const=True) + ## tcp-header.h: uint32_t ns3::TcpHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## tcp-header.h: uint16_t ns3::TcpHeader::GetSourcePort() const [member function] + cls.add_method('GetSourcePort', + 'uint16_t', + [], + is_const=True) + ## tcp-header.h: static ns3::TypeId ns3::TcpHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## tcp-header.h: uint16_t ns3::TcpHeader::GetUrgentPointer() const [member function] + cls.add_method('GetUrgentPointer', + 'uint16_t', [], is_const=True) ## tcp-header.h: uint16_t ns3::TcpHeader::GetWindowSize() const [member function] @@ -406,50 +1369,57 @@ def register_Ns3TcpHeader_methods(root_module, cls): 'uint16_t', [], is_const=True) - ## tcp-header.h: uint16_t ns3::TcpHeader::GetUrgentPointer() const [member function] - cls.add_method('GetUrgentPointer', - 'uint16_t', - [], - is_const=True) ## tcp-header.h: void ns3::TcpHeader::InitializeChecksum(ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol) [member function] cls.add_method('InitializeChecksum', 'void', [param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol')]) - ## tcp-header.h: static ns3::TypeId ns3::TcpHeader::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', + ## tcp-header.h: bool ns3::TcpHeader::IsChecksumOk() const [member function] + cls.add_method('IsChecksumOk', + 'bool', [], - is_static=True) - ## tcp-header.h: ns3::TypeId ns3::TcpHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) + is_const=True) ## tcp-header.h: void ns3::TcpHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## tcp-header.h: uint32_t ns3::TcpHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## tcp-header.h: void ns3::TcpHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## tcp-header.h: uint32_t ns3::TcpHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) - ## tcp-header.h: bool ns3::TcpHeader::IsChecksumOk() const [member function] - cls.add_method('IsChecksumOk', - 'bool', - [], - is_const=True) + ## tcp-header.h: void ns3::TcpHeader::SetAckNumber(SequenceNumber ackNumber) [member function] + cls.add_method('SetAckNumber', + 'void', + [param('SequenceNumber', 'ackNumber')]) + ## tcp-header.h: void ns3::TcpHeader::SetDestinationPort(uint16_t port) [member function] + cls.add_method('SetDestinationPort', + 'void', + [param('uint16_t', 'port')]) + ## tcp-header.h: void ns3::TcpHeader::SetFlags(uint8_t flags) [member function] + cls.add_method('SetFlags', + 'void', + [param('uint8_t', 'flags')]) + ## tcp-header.h: void ns3::TcpHeader::SetLength(uint8_t length) [member function] + cls.add_method('SetLength', + 'void', + [param('uint8_t', 'length')]) + ## tcp-header.h: void ns3::TcpHeader::SetSequenceNumber(SequenceNumber sequenceNumber) [member function] + cls.add_method('SetSequenceNumber', + 'void', + [param('SequenceNumber', 'sequenceNumber')]) + ## tcp-header.h: void ns3::TcpHeader::SetSourcePort(uint16_t port) [member function] + cls.add_method('SetSourcePort', + 'void', + [param('uint16_t', 'port')]) + ## tcp-header.h: void ns3::TcpHeader::SetUrgentPointer(uint16_t urgentPointer) [member function] + cls.add_method('SetUrgentPointer', + 'void', + [param('uint16_t', 'urgentPointer')]) + ## tcp-header.h: void ns3::TcpHeader::SetWindowSize(uint16_t windowSize) [member function] + cls.add_method('SetWindowSize', + 'void', + [param('uint16_t', 'windowSize')]) return def register_Ns3UdpHeader_methods(root_module, cls): @@ -457,10 +1427,59 @@ def register_Ns3UdpHeader_methods(root_module, cls): cls.add_constructor([param('ns3::UdpHeader const &', 'arg0')]) ## udp-header.h: ns3::UdpHeader::UdpHeader() [constructor] cls.add_constructor([]) + ## udp-header.h: uint32_t ns3::UdpHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## udp-header.h: void ns3::UdpHeader::EnableChecksums() [member function] cls.add_method('EnableChecksums', 'void', []) + ## udp-header.h: uint16_t ns3::UdpHeader::GetDestinationPort() const [member function] + cls.add_method('GetDestinationPort', + 'uint16_t', + [], + is_const=True) + ## udp-header.h: ns3::TypeId ns3::UdpHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## udp-header.h: uint32_t ns3::UdpHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## udp-header.h: uint16_t ns3::UdpHeader::GetSourcePort() const [member function] + cls.add_method('GetSourcePort', + 'uint16_t', + [], + is_const=True) + ## udp-header.h: static ns3::TypeId ns3::UdpHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## udp-header.h: void ns3::UdpHeader::InitializeChecksum(ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol) [member function] + cls.add_method('InitializeChecksum', + 'void', + [param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol')]) + ## udp-header.h: bool ns3::UdpHeader::IsChecksumOk() const [member function] + cls.add_method('IsChecksumOk', + 'bool', + [], + is_const=True) + ## udp-header.h: void ns3::UdpHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## udp-header.h: void ns3::UdpHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) ## udp-header.h: void ns3::UdpHeader::SetDestinationPort(uint16_t port) [member function] cls.add_method('SetDestinationPort', 'void', @@ -469,55 +1488,777 @@ def register_Ns3UdpHeader_methods(root_module, cls): cls.add_method('SetSourcePort', 'void', [param('uint16_t', 'port')]) - ## udp-header.h: uint16_t ns3::UdpHeader::GetSourcePort() const [member function] - cls.add_method('GetSourcePort', - 'uint16_t', - [], - is_const=True) - ## udp-header.h: uint16_t ns3::UdpHeader::GetDestinationPort() const [member function] - cls.add_method('GetDestinationPort', - 'uint16_t', - [], - is_const=True) - ## udp-header.h: void ns3::UdpHeader::InitializeChecksum(ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol) [member function] - cls.add_method('InitializeChecksum', + return + +def register_Ns3ArpCache_methods(root_module, cls): + ## arp-cache.h: ns3::ArpCache::ArpCache() [constructor] + cls.add_constructor([]) + ## arp-cache.h: ns3::ArpCache::Entry * ns3::ArpCache::Add(ns3::Ipv4Address to) [member function] + cls.add_method('Add', + 'ns3::ArpCache::Entry *', + [param('ns3::Ipv4Address', 'to')]) + ## arp-cache.h: void ns3::ArpCache::Flush() [member function] + cls.add_method('Flush', 'void', - [param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol')]) - ## udp-header.h: static ns3::TypeId ns3::UdpHeader::GetTypeId() [member function] + []) + ## arp-cache.h: ns3::Time ns3::ArpCache::GetAliveTimeout() const [member function] + cls.add_method('GetAliveTimeout', + 'ns3::Time', + [], + is_const=True) + ## arp-cache.h: ns3::Time ns3::ArpCache::GetDeadTimeout() const [member function] + cls.add_method('GetDeadTimeout', + 'ns3::Time', + [], + is_const=True) + ## arp-cache.h: ns3::Ptr ns3::ArpCache::GetDevice() const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## arp-cache.h: ns3::Ptr ns3::ArpCache::GetInterface() const [member function] + cls.add_method('GetInterface', + 'ns3::Ptr< ns3::Ipv4Interface >', + [], + is_const=True) + ## arp-cache.h: static ns3::TypeId ns3::ArpCache::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## udp-header.h: ns3::TypeId ns3::UdpHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', + ## arp-cache.h: ns3::Time ns3::ArpCache::GetWaitReplyTimeout() const [member function] + cls.add_method('GetWaitReplyTimeout', + 'ns3::Time', [], - is_const=True, is_virtual=True) - ## udp-header.h: void ns3::UdpHeader::Print(std::ostream & os) const [member function] - cls.add_method('Print', + is_const=True) + ## arp-cache.h: ns3::ArpCache::Entry * ns3::ArpCache::Lookup(ns3::Ipv4Address destination) [member function] + cls.add_method('Lookup', + 'ns3::ArpCache::Entry *', + [param('ns3::Ipv4Address', 'destination')]) + ## arp-cache.h: void ns3::ArpCache::SetAliveTimeout(ns3::Time aliveTimeout) [member function] + cls.add_method('SetAliveTimeout', 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## udp-header.h: uint32_t ns3::UdpHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', + [param('ns3::Time', 'aliveTimeout')]) + ## arp-cache.h: void ns3::ArpCache::SetArpRequestCallback(ns3::Callback, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arpRequestCallback) [member function] + cls.add_method('SetArpRequestCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::ArpCache const >, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arpRequestCallback')]) + ## arp-cache.h: void ns3::ArpCache::SetDeadTimeout(ns3::Time deadTimeout) [member function] + cls.add_method('SetDeadTimeout', + 'void', + [param('ns3::Time', 'deadTimeout')]) + ## arp-cache.h: void ns3::ArpCache::SetDevice(ns3::Ptr device, ns3::Ptr interface) [member function] + cls.add_method('SetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')]) + ## arp-cache.h: void ns3::ArpCache::SetWaitReplyTimeout(ns3::Time waitReplyTimeout) [member function] + cls.add_method('SetWaitReplyTimeout', + 'void', + [param('ns3::Time', 'waitReplyTimeout')]) + ## arp-cache.h: void ns3::ArpCache::StartWaitReplyTimer() [member function] + cls.add_method('StartWaitReplyTimer', + 'void', + []) + ## arp-cache.h: void ns3::ArpCache::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) + return + +def register_Ns3ArpCacheEntry_methods(root_module, cls): + ## arp-cache.h: ns3::ArpCache::Entry::Entry(ns3::ArpCache::Entry const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ArpCache::Entry const &', 'arg0')]) + ## arp-cache.h: ns3::ArpCache::Entry::Entry(ns3::ArpCache * arp) [constructor] + cls.add_constructor([param('ns3::ArpCache *', 'arp')]) + ## arp-cache.h: void ns3::ArpCache::Entry::ClearRetries() [member function] + cls.add_method('ClearRetries', + 'void', + []) + ## arp-cache.h: ns3::Ptr ns3::ArpCache::Entry::DequeuePending() [member function] + cls.add_method('DequeuePending', + 'ns3::Ptr< ns3::Packet >', + []) + ## arp-cache.h: ns3::Ipv4Address ns3::ArpCache::Entry::GetIpv4Address() const [member function] + cls.add_method('GetIpv4Address', + 'ns3::Ipv4Address', + [], + is_const=True) + ## arp-cache.h: ns3::Address ns3::ArpCache::Entry::GetMacAddress() const [member function] + cls.add_method('GetMacAddress', + 'ns3::Address', + [], + is_const=True) + ## arp-cache.h: uint32_t ns3::ArpCache::Entry::GetRetries() const [member function] + cls.add_method('GetRetries', 'uint32_t', [], - is_const=True, is_virtual=True) - ## udp-header.h: void ns3::UdpHeader::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', + is_const=True) + ## arp-cache.h: void ns3::ArpCache::Entry::IncrementRetries() [member function] + cls.add_method('IncrementRetries', 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_const=True, is_virtual=True) - ## udp-header.h: uint32_t ns3::UdpHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + []) + ## arp-cache.h: bool ns3::ArpCache::Entry::IsAlive() [member function] + cls.add_method('IsAlive', + 'bool', + []) + ## arp-cache.h: bool ns3::ArpCache::Entry::IsDead() [member function] + cls.add_method('IsDead', + 'bool', + []) + ## arp-cache.h: bool ns3::ArpCache::Entry::IsExpired() const [member function] + cls.add_method('IsExpired', + 'bool', + [], + is_const=True) + ## arp-cache.h: bool ns3::ArpCache::Entry::IsWaitReply() [member function] + cls.add_method('IsWaitReply', + 'bool', + []) + ## arp-cache.h: void ns3::ArpCache::Entry::MarkAlive(ns3::Address macAddress) [member function] + cls.add_method('MarkAlive', + 'void', + [param('ns3::Address', 'macAddress')]) + ## arp-cache.h: void ns3::ArpCache::Entry::MarkDead() [member function] + cls.add_method('MarkDead', + 'void', + []) + ## arp-cache.h: void ns3::ArpCache::Entry::MarkWaitReply(ns3::Ptr waiting) [member function] + cls.add_method('MarkWaitReply', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'waiting')]) + ## arp-cache.h: void ns3::ArpCache::Entry::SetIpv4Address(ns3::Ipv4Address destination) [member function] + cls.add_method('SetIpv4Address', + 'void', + [param('ns3::Ipv4Address', 'destination')]) + ## arp-cache.h: bool ns3::ArpCache::Entry::UpdateWaitReply(ns3::Ptr waiting) [member function] + cls.add_method('UpdateWaitReply', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'waiting')]) + return + +def register_Ns3ArpL3Protocol_methods(root_module, cls): + ## arp-l3-protocol.h: ns3::ArpL3Protocol::ArpL3Protocol(ns3::ArpL3Protocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ArpL3Protocol const &', 'arg0')]) + ## arp-l3-protocol.h: ns3::ArpL3Protocol::ArpL3Protocol() [constructor] + cls.add_constructor([]) + ## arp-l3-protocol.h: ns3::Ptr ns3::ArpL3Protocol::CreateCache(ns3::Ptr device, ns3::Ptr interface) [member function] + cls.add_method('CreateCache', + 'ns3::Ptr< ns3::ArpCache >', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')]) + ## arp-l3-protocol.h: static ns3::TypeId ns3::ArpL3Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## arp-l3-protocol.h: bool ns3::ArpL3Protocol::Lookup(ns3::Ptr p, ns3::Ipv4Address destination, ns3::Ptr device, ns3::Ptr cache, ns3::Address * hardwareDestination) [member function] + cls.add_method('Lookup', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::ArpCache >', 'cache'), param('ns3::Address *', 'hardwareDestination')]) + ## arp-l3-protocol.h: void ns3::ArpL3Protocol::Receive(ns3::Ptr device, ns3::Ptr 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')]) + ## arp-l3-protocol.h: void ns3::ArpL3Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## arp-l3-protocol.h: ns3::ArpL3Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True) + ## arp-l3-protocol.h: void ns3::ArpL3Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## arp-l3-protocol.h: void ns3::ArpL3Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3Icmpv6DestinationUnreachable_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6DestinationUnreachable::Icmpv6DestinationUnreachable(ns3::Icmpv6DestinationUnreachable const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6DestinationUnreachable const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6DestinationUnreachable::Icmpv6DestinationUnreachable() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6DestinationUnreachable::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) - ## udp-header.h: bool ns3::UdpHeader::IsChecksumOk() const [member function] - cls.add_method('IsChecksumOk', - 'bool', + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6DestinationUnreachable::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: ns3::Ptr ns3::Icmpv6DestinationUnreachable::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet >', [], is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6DestinationUnreachable::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6DestinationUnreachable::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::Print(std::ostream & os) [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6DestinationUnreachable::SetPacket(ns3::Ptr p) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p')]) + return + +def register_Ns3Icmpv6Echo_methods(root_module, cls): + ## icmpv6-header.h: ns3::Icmpv6Echo::Icmpv6Echo(ns3::Icmpv6Echo const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv6Echo const &', 'arg0')]) + ## icmpv6-header.h: ns3::Icmpv6Echo::Icmpv6Echo() [constructor] + cls.add_constructor([]) + ## icmpv6-header.h: ns3::Icmpv6Echo::Icmpv6Echo(bool request) [constructor] + cls.add_constructor([param('bool', 'request')]) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Echo::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## icmpv6-header.h: uint16_t ns3::Icmpv6Echo::GetId() const [member function] + cls.add_method('GetId', + 'uint16_t', + [], + is_const=True) + ## icmpv6-header.h: ns3::TypeId ns3::Icmpv6Echo::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: uint16_t ns3::Icmpv6Echo::GetSeq() const [member function] + cls.add_method('GetSeq', + 'uint16_t', + [], + is_const=True) + ## icmpv6-header.h: uint32_t ns3::Icmpv6Echo::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## icmpv6-header.h: static ns3::TypeId ns3::Icmpv6Echo::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv6-header.h: void ns3::Icmpv6Echo::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Echo::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## icmpv6-header.h: void ns3::Icmpv6Echo::SetId(uint16_t id) [member function] + cls.add_method('SetId', + 'void', + [param('uint16_t', 'id')]) + ## icmpv6-header.h: void ns3::Icmpv6Echo::SetSeq(uint16_t seq) [member function] + cls.add_method('SetSeq', + 'void', + [param('uint16_t', 'seq')]) + return + +def register_Ns3Ipv4L3Protocol_methods(root_module, cls): + ## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True) + ## ipv4-l3-protocol.h: static ns3::TypeId ns3::Ipv4L3Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-l3-protocol.h: ns3::Ipv4L3Protocol::Ipv4L3Protocol() [constructor] + cls.add_constructor([]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] + cls.add_method('SetRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')], + is_virtual=True) + ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::GetRoutingProtocol() const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::CreateRawSocket() [member function] + cls.add_method('CreateRawSocket', + 'ns3::Ptr< ns3::Socket >', + []) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::DeleteRawSocket(ns3::Ptr socket) [member function] + cls.add_method('DeleteRawSocket', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket')]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Insert(ns3::Ptr protocol) [member function] + cls.add_method('Insert', + 'void', + [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')]) + ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::GetProtocol(int protocolNumber) const [member function] + cls.add_method('GetProtocol', + 'ns3::Ptr< ns3::Ipv4L4Protocol >', + [param('int', 'protocolNumber')], + is_const=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Remove(ns3::Ptr protocol) [member function] + cls.add_method('Remove', + 'void', + [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetDefaultTtl(uint8_t ttl) [member function] + cls.add_method('SetDefaultTtl', + 'void', + [param('uint8_t', 'ttl')]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Receive(ns3::Ptr device, ns3::Ptr 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')]) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol, ns3::Ptr route) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')]) + ## ipv4-l3-protocol.h: uint32_t ns3::Ipv4L3Protocol::AddInterface(ns3::Ptr device) [member function] + cls.add_method('AddInterface', + 'uint32_t', + [param('ns3::Ptr< ns3::NetDevice >', 'device')], + is_virtual=True) + ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::GetInterface(uint32_t i) const [member function] + cls.add_method('GetInterface', + 'ns3::Ptr< ns3::Ipv4Interface >', + [param('uint32_t', 'i')], + is_const=True) + ## ipv4-l3-protocol.h: uint32_t ns3::Ipv4L3Protocol::GetNInterfaces() const [member function] + cls.add_method('GetNInterfaces', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: int32_t ns3::Ipv4L3Protocol::GetInterfaceForAddress(ns3::Ipv4Address addr) const [member function] + cls.add_method('GetInterfaceForAddress', + 'int32_t', + [param('ns3::Ipv4Address', 'addr')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: int32_t ns3::Ipv4L3Protocol::GetInterfaceForPrefix(ns3::Ipv4Address addr, ns3::Ipv4Mask mask) const [member function] + cls.add_method('GetInterfaceForPrefix', + 'int32_t', + [param('ns3::Ipv4Address', 'addr'), param('ns3::Ipv4Mask', 'mask')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: int32_t ns3::Ipv4L3Protocol::GetInterfaceForDevice(ns3::Ptr device) const [member function] + cls.add_method('GetInterfaceForDevice', + 'int32_t', + [param('ns3::Ptr< ns3::NetDevice const >', 'device')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: bool ns3::Ipv4L3Protocol::AddAddress(uint32_t i, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('uint32_t', 'i'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-l3-protocol.h: ns3::Ipv4InterfaceAddress ns3::Ipv4L3Protocol::GetAddress(uint32_t interfaceIndex, uint32_t addressIndex) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: uint32_t ns3::Ipv4L3Protocol::GetNAddresses(uint32_t interface) const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [param('uint32_t', 'interface')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: bool ns3::Ipv4L3Protocol::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) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::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) + ## ipv4-l3-protocol.h: uint16_t ns3::Ipv4L3Protocol::GetMetric(uint32_t i) const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: uint16_t ns3::Ipv4L3Protocol::GetMtu(uint32_t i) const [member function] + cls.add_method('GetMtu', + 'uint16_t', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function] + cls.add_method('IsUp', + 'bool', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetUp(uint32_t i) [member function] + cls.add_method('SetUp', + 'void', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetDown(uint32_t i) [member function] + cls.add_method('SetDown', + 'void', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h: bool ns3::Ipv4L3Protocol::IsForwarding(uint32_t i) const [member function] + cls.add_method('IsForwarding', + 'bool', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetForwarding(uint32_t i, bool val) [member function] + cls.add_method('SetForwarding', + 'void', + [param('uint32_t', 'i'), param('bool', 'val')], + is_virtual=True) + ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::GetNetDevice(uint32_t i) [member function] + cls.add_method('GetNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SetIpForward(bool forward) [member function] + cls.add_method('SetIpForward', + 'void', + [param('bool', 'forward')], + visibility='private', is_virtual=True) + ## ipv4-l3-protocol.h: bool ns3::Ipv4L3Protocol::GetIpForward() const [member function] + cls.add_method('GetIpForward', + 'bool', + [], + is_const=True, visibility='private', is_virtual=True) + return + +def register_Ns3Ipv4L4Protocol_methods(root_module, cls): + ## ipv4-l4-protocol.h: ns3::Ipv4L4Protocol::Ipv4L4Protocol() [constructor] + cls.add_constructor([]) + ## ipv4-l4-protocol.h: ns3::Ipv4L4Protocol::Ipv4L4Protocol(ns3::Ipv4L4Protocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4L4Protocol const &', 'arg0')]) + ## ipv4-l4-protocol.h: int ns3::Ipv4L4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4-l4-protocol.h: static ns3::TypeId ns3::Ipv4L4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus ns3::Ipv4L4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Address const & source, ns3::Ipv4Address const & destination, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::Ipv4L4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address const &', 'source'), param('ns3::Ipv4Address const &', 'destination'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-l4-protocol.h: void ns3::Ipv4L4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function] + cls.add_method('ReceiveIcmp', + 'void', + [param('ns3::Ipv4Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo'), param('ns3::Ipv4Address', 'payloadSource'), param('ns3::Ipv4Address', 'payloadDestination'), param('uint8_t const *', 'payload')], + is_virtual=True) + return + +def register_Ns3NscTcpL4Protocol_methods(root_module, cls): + ## nsc-tcp-l4-protocol.h: ns3::NscTcpL4Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint8_t const', is_const=True) + ## nsc-tcp-l4-protocol.h: static ns3::TypeId ns3::NscTcpL4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## nsc-tcp-l4-protocol.h: ns3::NscTcpL4Protocol::NscTcpL4Protocol() [constructor] + cls.add_constructor([]) + ## nsc-tcp-l4-protocol.h: void ns3::NscTcpL4Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## nsc-tcp-l4-protocol.h: void ns3::NscTcpL4Protocol::SetNscLibrary(std::string const & lib) [member function] + cls.add_method('SetNscLibrary', + 'void', + [param('std::string const &', 'lib')]) + ## nsc-tcp-l4-protocol.h: std::string ns3::NscTcpL4Protocol::GetNscLibrary() const [member function] + cls.add_method('GetNscLibrary', + 'std::string', + [], + is_const=True) + ## nsc-tcp-l4-protocol.h: int ns3::NscTcpL4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_const=True, is_virtual=True) + ## nsc-tcp-l4-protocol.h: int ns3::NscTcpL4Protocol::GetVersion() const [member function] + cls.add_method('GetVersion', + 'int', + [], + is_const=True, is_virtual=True) + ## nsc-tcp-l4-protocol.h: ns3::Ptr ns3::NscTcpL4Protocol::CreateSocket() [member function] + cls.add_method('CreateSocket', + 'ns3::Ptr< ns3::Socket >', + []) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate() [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + []) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate(ns3::Ipv4Address address) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address')]) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate(uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('uint16_t', 'port')]) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate(ns3::Ipv4Address address, uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate(ns3::Ipv4Address localAddress, uint16_t localPort, ns3::Ipv4Address peerAddress, uint16_t peerPort) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'localAddress'), param('uint16_t', 'localPort'), param('ns3::Ipv4Address', 'peerAddress'), param('uint16_t', 'peerPort')]) + ## nsc-tcp-l4-protocol.h: void ns3::NscTcpL4Protocol::DeAllocate(ns3::Ipv4EndPoint * endPoint) [member function] + cls.add_method('DeAllocate', + 'void', + [param('ns3::Ipv4EndPoint *', 'endPoint')]) + ## nsc-tcp-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus ns3::NscTcpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Address const & source, ns3::Ipv4Address const & destination, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::Ipv4L4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address const &', 'source'), param('ns3::Ipv4Address const &', 'destination'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], + is_virtual=True) + ## nsc-tcp-l4-protocol.h: void ns3::NscTcpL4Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## nsc-tcp-l4-protocol.h: void ns3::NscTcpL4Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + 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) + ## tcp-l4-protocol.h: static ns3::TypeId ns3::TcpL4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## tcp-l4-protocol.h: ns3::TcpL4Protocol::TcpL4Protocol() [constructor] + cls.add_constructor([]) + ## tcp-l4-protocol.h: void ns3::TcpL4Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## tcp-l4-protocol.h: int ns3::TcpL4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_const=True, is_virtual=True) + ## tcp-l4-protocol.h: ns3::Ptr ns3::TcpL4Protocol::CreateSocket() [member function] + cls.add_method('CreateSocket', + 'ns3::Ptr< ns3::Socket >', + []) + ## tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::TcpL4Protocol::Allocate() [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + []) + ## tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::TcpL4Protocol::Allocate(ns3::Ipv4Address address) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address')]) + ## tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::TcpL4Protocol::Allocate(uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('uint16_t', 'port')]) + ## tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::TcpL4Protocol::Allocate(ns3::Ipv4Address address, uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) + ## tcp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::TcpL4Protocol::Allocate(ns3::Ipv4Address localAddress, uint16_t localPort, ns3::Ipv4Address peerAddress, uint16_t peerPort) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'localAddress'), param('uint16_t', 'localPort'), param('ns3::Ipv4Address', 'peerAddress'), param('uint16_t', 'peerPort')]) + ## tcp-l4-protocol.h: void ns3::TcpL4Protocol::DeAllocate(ns3::Ipv4EndPoint * endPoint) [member function] + cls.add_method('DeAllocate', + 'void', + [param('ns3::Ipv4EndPoint *', 'endPoint')]) + ## tcp-l4-protocol.h: void ns3::TcpL4Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address saddr, ns3::Ipv4Address daddr, uint16_t sport, uint16_t dport) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'saddr'), param('ns3::Ipv4Address', 'daddr'), param('uint16_t', 'sport'), param('uint16_t', 'dport')]) + ## tcp-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus ns3::TcpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Address const & source, ns3::Ipv4Address const & destination, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::Ipv4L4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address const &', 'source'), param('ns3::Ipv4Address const &', 'destination'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], + is_virtual=True) + ## tcp-l4-protocol.h: void ns3::TcpL4Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## tcp-l4-protocol.h: void ns3::TcpL4Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3UdpL4Protocol_methods(root_module, cls): + ## udp-l4-protocol.h: ns3::UdpL4Protocol::UdpL4Protocol(ns3::UdpL4Protocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::UdpL4Protocol const &', 'arg0')]) + ## udp-l4-protocol.h: ns3::UdpL4Protocol::UdpL4Protocol() [constructor] + cls.add_constructor([]) + ## udp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::UdpL4Protocol::Allocate() [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + []) + ## udp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::UdpL4Protocol::Allocate(ns3::Ipv4Address address) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address')]) + ## udp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::UdpL4Protocol::Allocate(uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('uint16_t', 'port')]) + ## udp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::UdpL4Protocol::Allocate(ns3::Ipv4Address address, uint16_t port) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) + ## udp-l4-protocol.h: ns3::Ipv4EndPoint * ns3::UdpL4Protocol::Allocate(ns3::Ipv4Address localAddress, uint16_t localPort, ns3::Ipv4Address peerAddress, uint16_t peerPort) [member function] + cls.add_method('Allocate', + 'ns3::Ipv4EndPoint *', + [param('ns3::Ipv4Address', 'localAddress'), param('uint16_t', 'localPort'), param('ns3::Ipv4Address', 'peerAddress'), param('uint16_t', 'peerPort')]) + ## udp-l4-protocol.h: ns3::Ptr ns3::UdpL4Protocol::CreateSocket() [member function] + cls.add_method('CreateSocket', + 'ns3::Ptr< ns3::Socket >', + []) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::DeAllocate(ns3::Ipv4EndPoint * endPoint) [member function] + cls.add_method('DeAllocate', + 'void', + [param('ns3::Ipv4EndPoint *', 'endPoint')]) + ## udp-l4-protocol.h: int ns3::UdpL4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_const=True, is_virtual=True) + ## udp-l4-protocol.h: static ns3::TypeId ns3::UdpL4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## udp-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus ns3::UdpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Address const & source, ns3::Ipv4Address const & destination, ns3::Ptr interface) [member function] + cls.add_method('Receive', + 'ns3::Ipv4L4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address const &', 'source'), param('ns3::Ipv4Address const &', 'destination'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')], + is_virtual=True) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function] + cls.add_method('ReceiveIcmp', + 'void', + [param('ns3::Ipv4Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo'), param('ns3::Ipv4Address', 'payloadSource'), param('ns3::Ipv4Address', 'payloadDestination'), param('uint8_t const *', 'payload')], + is_virtual=True) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address saddr, ns3::Ipv4Address daddr, uint16_t sport, uint16_t dport) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'saddr'), param('ns3::Ipv4Address', 'daddr'), param('uint16_t', 'sport'), param('uint16_t', 'dport')]) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address saddr, ns3::Ipv4Address daddr, uint16_t sport, uint16_t dport, ns3::Ptr route) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'saddr'), param('ns3::Ipv4Address', 'daddr'), param('uint16_t', 'sport'), param('uint16_t', 'dport'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')]) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## udp-l4-protocol.h: ns3::UdpL4Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint8_t const', is_const=True) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## udp-l4-protocol.h: void ns3::UdpL4Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3Icmpv4L4Protocol_methods(root_module, cls): + ## icmpv4-l4-protocol.h: ns3::Icmpv4L4Protocol::Icmpv4L4Protocol(ns3::Icmpv4L4Protocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Icmpv4L4Protocol const &', 'arg0')]) + ## icmpv4-l4-protocol.h: ns3::Icmpv4L4Protocol::Icmpv4L4Protocol() [constructor] + cls.add_constructor([]) + ## icmpv4-l4-protocol.h: int ns3::Icmpv4L4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_const=True, is_virtual=True) + ## icmpv4-l4-protocol.h: static uint16_t ns3::Icmpv4L4Protocol::GetStaticProtocolNumber() [member function] + cls.add_method('GetStaticProtocolNumber', + 'uint16_t', + [], + is_static=True) + ## icmpv4-l4-protocol.h: static ns3::TypeId ns3::Icmpv4L4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## icmpv4-l4-protocol.h: ns3::Ipv4L4Protocol::RxStatus ns3::Icmpv4L4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Address const & source, ns3::Ipv4Address const & destination, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::Ipv4L4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address const &', 'source'), param('ns3::Ipv4Address const &', 'destination'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], + is_virtual=True) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::SendDestUnreachFragNeeded(ns3::Ipv4Header header, ns3::Ptr orgData, uint16_t nextHopMtu) [member function] + cls.add_method('SendDestUnreachFragNeeded', + 'void', + [param('ns3::Ipv4Header', 'header'), param('ns3::Ptr< ns3::Packet const >', 'orgData'), param('uint16_t', 'nextHopMtu')]) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::SendDestUnreachPort(ns3::Ipv4Header header, ns3::Ptr orgData) [member function] + cls.add_method('SendDestUnreachPort', + 'void', + [param('ns3::Ipv4Header', 'header'), param('ns3::Ptr< ns3::Packet const >', 'orgData')]) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::SendTimeExceededTtl(ns3::Ipv4Header header, ns3::Ptr orgData) [member function] + cls.add_method('SendTimeExceededTtl', + 'void', + [param('ns3::Ipv4Header', 'header'), param('ns3::Ptr< ns3::Packet const >', 'orgData')]) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## icmpv4-l4-protocol.h: ns3::Icmpv4L4Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint8_t const', is_const=True) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + ## icmpv4-l4-protocol.h: void ns3::Icmpv4L4Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) return def register_functions(root_module): diff --git a/bindings/python/ns3_module_list_routing.py b/bindings/python/ns3_module_list_routing.py index 61f3da464..45ccab777 100644 --- a/bindings/python/ns3_module_list_routing.py +++ b/bindings/python/ns3_module_list_routing.py @@ -5,6 +5,8 @@ def register_types(module): ## ipv4-list-routing.h: ns3::Ipv4ListRouting [class] module.add_class('Ipv4ListRouting', parent=root_module['ns3::Ipv4RoutingProtocol']) + ## ipv6-list-routing.h: ns3::Ipv6ListRouting [class] + module.add_class('Ipv6ListRouting', parent=root_module['ns3::Ipv6RoutingProtocol']) ## Register a nested module for the namespace Config @@ -58,16 +60,12 @@ def register_types_ns3_olsr(module): def register_methods(root_module): register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting']) + register_Ns3Ipv6ListRouting_methods(root_module, root_module['ns3::Ipv6ListRouting']) return def register_Ns3Ipv4ListRouting_methods(root_module, cls): ## ipv4-list-routing.h: ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')]) - ## ipv4-list-routing.h: static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## ipv4-list-routing.h: ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor] cls.add_constructor([]) ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function] @@ -85,36 +83,41 @@ def register_Ns3Ipv4ListRouting_methods(root_module, cls): 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', [param('uint32_t', 'index'), param('int16_t &', 'priority')], is_const=True, is_virtual=True) - ## ipv4-list-routing.h: ns3::Ptr ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr 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')], - is_virtual=True) - ## ipv4-list-routing.h: bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], - is_virtual=True) - ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceUp', + ## ipv4-list-routing.h: static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', 'void', - [param('uint32_t', 'interface')], + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], is_virtual=True) ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyInterfaceDown(uint32_t interface) [member function] cls.add_method('NotifyInterfaceDown', 'void', [param('uint32_t', 'interface')], is_virtual=True) - ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyAddAddress', + ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + [param('uint32_t', 'interface')], is_virtual=True) ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] cls.add_method('NotifyRemoveAddress', 'void', [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], is_virtual=True) + ## ipv4-list-routing.h: bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], + is_virtual=True) + ## ipv4-list-routing.h: ns3::Ptr ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr 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')], + is_virtual=True) ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::SetIpv4(ns3::Ptr ipv4) [member function] cls.add_method('SetIpv4', 'void', @@ -127,6 +130,83 @@ def register_Ns3Ipv4ListRouting_methods(root_module, cls): visibility='protected', is_virtual=True) return +def register_Ns3Ipv6ListRouting_methods(root_module, cls): + ## ipv6-list-routing.h: ns3::Ipv6ListRouting::Ipv6ListRouting(ns3::Ipv6ListRouting const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6ListRouting const &', 'arg0')]) + ## ipv6-list-routing.h: ns3::Ipv6ListRouting::Ipv6ListRouting() [constructor] + cls.add_constructor([]) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function] + cls.add_method('AddRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv6RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')], + is_virtual=True) + ## ipv6-list-routing.h: uint32_t ns3::Ipv6ListRouting::GetNRoutingProtocols() const [member function] + cls.add_method('GetNRoutingProtocols', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv6-list-routing.h: ns3::Ptr ns3::Ipv6ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv6RoutingProtocol >', + [param('uint32_t', 'index'), param('int16_t &', 'priority')], + is_const=True, is_virtual=True) + ## ipv6-list-routing.h: static ns3::TypeId ns3::Ipv6ListRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyAddRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address::GetZero( )) [member function] + cls.add_method('NotifyAddRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address::GetZero( )')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::NotifyRemoveRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('NotifyRemoveRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-list-routing.h: bool ns3::Ipv6ListRouting::RouteInput(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_virtual=True) + ## ipv6-list-routing.h: ns3::Ptr ns3::Ipv6ListRouting::RouteOutput(ns3::Ptr p, ns3::Ipv6Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv6Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::SetIpv6(ns3::Ptr ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ptr< ns3::Ipv6 >', 'ipv6')], + is_virtual=True) + ## ipv6-list-routing.h: void ns3::Ipv6ListRouting::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) diff --git a/bindings/python/ns3_module_mobility.py b/bindings/python/ns3_module_mobility.py index 4b89e1731..ceb42c25f 100644 --- a/bindings/python/ns3_module_mobility.py +++ b/bindings/python/ns3_module_mobility.py @@ -123,10 +123,6 @@ def register_Ns3ConstantVelocityHelper_methods(root_module, cls): cls.add_constructor([param('ns3::Vector const &', 'position')]) ## constant-velocity-helper.h: ns3::ConstantVelocityHelper::ConstantVelocityHelper(ns3::Vector const & position, ns3::Vector const & vel) [constructor] cls.add_constructor([param('ns3::Vector const &', 'position'), param('ns3::Vector const &', 'vel')]) - ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::SetPosition(ns3::Vector const & position) [member function] - cls.add_method('SetPosition', - 'void', - [param('ns3::Vector const &', 'position')]) ## constant-velocity-helper.h: ns3::Vector ns3::ConstantVelocityHelper::GetCurrentPosition() const [member function] cls.add_method('GetCurrentPosition', 'ns3::Vector', @@ -137,28 +133,32 @@ def register_Ns3ConstantVelocityHelper_methods(root_module, cls): 'ns3::Vector', [], is_const=True) - ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::SetVelocity(ns3::Vector const & vel) [member function] - cls.add_method('SetVelocity', - 'void', - [param('ns3::Vector const &', 'vel')]) ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::Pause() [member function] cls.add_method('Pause', 'void', []) + ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::SetPosition(ns3::Vector const & position) [member function] + cls.add_method('SetPosition', + 'void', + [param('ns3::Vector const &', 'position')]) + ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::SetVelocity(ns3::Vector const & vel) [member function] + cls.add_method('SetVelocity', + 'void', + [param('ns3::Vector const &', 'vel')]) ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::Unpause() [member function] cls.add_method('Unpause', 'void', []) - ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::UpdateWithBounds(ns3::Rectangle const & rectangle) const [member function] - cls.add_method('UpdateWithBounds', - 'void', - [param('ns3::Rectangle const &', 'rectangle')], - is_const=True) ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::Update() const [member function] cls.add_method('Update', 'void', [], is_const=True) + ## constant-velocity-helper.h: void ns3::ConstantVelocityHelper::UpdateWithBounds(ns3::Rectangle const & rectangle) const [member function] + cls.add_method('UpdateWithBounds', + 'void', + [param('ns3::Rectangle const &', 'rectangle')], + is_const=True) return def register_Ns3Rectangle_methods(root_module, cls): @@ -197,11 +197,6 @@ def register_Ns3Rectangle_methods(root_module, cls): def register_Ns3PositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::PositionAllocator::PositionAllocator(ns3::PositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PositionAllocator const &', 'arg0')]) - ## position-allocator.h: static ns3::TypeId ns3::PositionAllocator::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## position-allocator.h: ns3::PositionAllocator::PositionAllocator() [constructor] cls.add_constructor([]) ## position-allocator.h: ns3::Vector ns3::PositionAllocator::GetNext() const [member function] @@ -209,26 +204,36 @@ def register_Ns3PositionAllocator_methods(root_module, cls): 'ns3::Vector', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## position-allocator.h: static ns3::TypeId ns3::PositionAllocator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3RandomDiscPositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::RandomDiscPositionAllocator::RandomDiscPositionAllocator(ns3::RandomDiscPositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomDiscPositionAllocator const &', 'arg0')]) + ## position-allocator.h: ns3::RandomDiscPositionAllocator::RandomDiscPositionAllocator() [constructor] + cls.add_constructor([]) + ## position-allocator.h: ns3::Vector ns3::RandomDiscPositionAllocator::GetNext() const [member function] + cls.add_method('GetNext', + 'ns3::Vector', + [], + is_const=True, is_virtual=True) ## position-allocator.h: static ns3::TypeId ns3::RandomDiscPositionAllocator::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## position-allocator.h: ns3::RandomDiscPositionAllocator::RandomDiscPositionAllocator() [constructor] - cls.add_constructor([]) - ## position-allocator.h: void ns3::RandomDiscPositionAllocator::SetTheta(ns3::RandomVariable theta) [member function] - cls.add_method('SetTheta', - 'void', - [param('ns3::RandomVariable', 'theta')]) ## position-allocator.h: void ns3::RandomDiscPositionAllocator::SetRho(ns3::RandomVariable rho) [member function] cls.add_method('SetRho', 'void', [param('ns3::RandomVariable', 'rho')]) + ## position-allocator.h: void ns3::RandomDiscPositionAllocator::SetTheta(ns3::RandomVariable theta) [member function] + cls.add_method('SetTheta', + 'void', + [param('ns3::RandomVariable', 'theta')]) ## position-allocator.h: void ns3::RandomDiscPositionAllocator::SetX(double x) [member function] cls.add_method('SetX', 'void', @@ -237,23 +242,23 @@ def register_Ns3RandomDiscPositionAllocator_methods(root_module, cls): cls.add_method('SetY', 'void', [param('double', 'y')]) - ## position-allocator.h: ns3::Vector ns3::RandomDiscPositionAllocator::GetNext() const [member function] - cls.add_method('GetNext', - 'ns3::Vector', - [], - is_const=True, is_virtual=True) return def register_Ns3RandomRectanglePositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::RandomRectanglePositionAllocator::RandomRectanglePositionAllocator(ns3::RandomRectanglePositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomRectanglePositionAllocator const &', 'arg0')]) + ## position-allocator.h: ns3::RandomRectanglePositionAllocator::RandomRectanglePositionAllocator() [constructor] + cls.add_constructor([]) + ## position-allocator.h: ns3::Vector ns3::RandomRectanglePositionAllocator::GetNext() const [member function] + cls.add_method('GetNext', + 'ns3::Vector', + [], + is_const=True, is_virtual=True) ## position-allocator.h: static ns3::TypeId ns3::RandomRectanglePositionAllocator::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## position-allocator.h: ns3::RandomRectanglePositionAllocator::RandomRectanglePositionAllocator() [constructor] - cls.add_constructor([]) ## position-allocator.h: void ns3::RandomRectanglePositionAllocator::SetX(ns3::RandomVariable x) [member function] cls.add_method('SetX', 'void', @@ -262,97 +267,53 @@ def register_Ns3RandomRectanglePositionAllocator_methods(root_module, cls): cls.add_method('SetY', 'void', [param('ns3::RandomVariable', 'y')]) - ## position-allocator.h: ns3::Vector ns3::RandomRectanglePositionAllocator::GetNext() const [member function] - cls.add_method('GetNext', - 'ns3::Vector', - [], - is_const=True, is_virtual=True) return def register_Ns3RectangleChecker_methods(root_module, cls): - ## rectangle.h: ns3::RectangleChecker::RectangleChecker(ns3::RectangleChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::RectangleChecker const &', 'arg0')]) ## rectangle.h: ns3::RectangleChecker::RectangleChecker() [constructor] cls.add_constructor([]) + ## rectangle.h: ns3::RectangleChecker::RectangleChecker(ns3::RectangleChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RectangleChecker const &', 'arg0')]) return def register_Ns3RectangleValue_methods(root_module, cls): - ## rectangle.h: ns3::RectangleValue::RectangleValue(ns3::RectangleValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::RectangleValue const &', 'arg0')]) ## rectangle.h: ns3::RectangleValue::RectangleValue() [constructor] cls.add_constructor([]) + ## rectangle.h: ns3::RectangleValue::RectangleValue(ns3::RectangleValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RectangleValue const &', 'arg0')]) ## rectangle.h: ns3::RectangleValue::RectangleValue(ns3::Rectangle const & value) [constructor] cls.add_constructor([param('ns3::Rectangle const &', 'value')]) - ## rectangle.h: void ns3::RectangleValue::Set(ns3::Rectangle const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Rectangle const &', 'value')]) - ## rectangle.h: ns3::Rectangle ns3::RectangleValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Rectangle', - [], - is_const=True) ## rectangle.h: ns3::Ptr ns3::RectangleValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## rectangle.h: std::string ns3::RectangleValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## rectangle.h: bool ns3::RectangleValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## rectangle.h: ns3::Rectangle ns3::RectangleValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Rectangle', + [], + is_const=True) + ## rectangle.h: std::string ns3::RectangleValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## rectangle.h: void ns3::RectangleValue::Set(ns3::Rectangle const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Rectangle const &', 'value')]) return def register_Ns3GridPositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::GridPositionAllocator::GridPositionAllocator(ns3::GridPositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::GridPositionAllocator const &', 'arg0')]) - ## position-allocator.h: static ns3::TypeId ns3::GridPositionAllocator::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## position-allocator.h: ns3::GridPositionAllocator::GridPositionAllocator() [constructor] cls.add_constructor([]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetMinX(double xMin) [member function] - cls.add_method('SetMinX', - 'void', - [param('double', 'xMin')]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetMinY(double yMin) [member function] - cls.add_method('SetMinY', - 'void', - [param('double', 'yMin')]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetDeltaX(double deltaX) [member function] - cls.add_method('SetDeltaX', - 'void', - [param('double', 'deltaX')]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetDeltaY(double deltaY) [member function] - cls.add_method('SetDeltaY', - 'void', - [param('double', 'deltaY')]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetN(uint32_t n) [member function] - cls.add_method('SetN', - 'void', - [param('uint32_t', 'n')]) - ## position-allocator.h: void ns3::GridPositionAllocator::SetLayoutType(ns3::GridPositionAllocator::LayoutType layoutType) [member function] - cls.add_method('SetLayoutType', - 'void', - [param('ns3::GridPositionAllocator::LayoutType', 'layoutType')]) - ## position-allocator.h: double ns3::GridPositionAllocator::GetMinX() const [member function] - cls.add_method('GetMinX', - 'double', - [], - is_const=True) - ## position-allocator.h: double ns3::GridPositionAllocator::GetMinY() const [member function] - cls.add_method('GetMinY', - 'double', - [], - is_const=True) ## position-allocator.h: double ns3::GridPositionAllocator::GetDeltaX() const [member function] cls.add_method('GetDeltaX', 'double', @@ -363,31 +324,65 @@ def register_Ns3GridPositionAllocator_methods(root_module, cls): 'double', [], is_const=True) - ## position-allocator.h: uint32_t ns3::GridPositionAllocator::GetN() const [member function] - cls.add_method('GetN', - 'uint32_t', - [], - is_const=True) ## position-allocator.h: ns3::GridPositionAllocator::LayoutType ns3::GridPositionAllocator::GetLayoutType() const [member function] cls.add_method('GetLayoutType', 'ns3::GridPositionAllocator::LayoutType', [], is_const=True) + ## position-allocator.h: double ns3::GridPositionAllocator::GetMinX() const [member function] + cls.add_method('GetMinX', + 'double', + [], + is_const=True) + ## position-allocator.h: double ns3::GridPositionAllocator::GetMinY() const [member function] + cls.add_method('GetMinY', + 'double', + [], + is_const=True) + ## position-allocator.h: uint32_t ns3::GridPositionAllocator::GetN() const [member function] + cls.add_method('GetN', + 'uint32_t', + [], + is_const=True) ## position-allocator.h: ns3::Vector ns3::GridPositionAllocator::GetNext() const [member function] cls.add_method('GetNext', 'ns3::Vector', [], is_const=True, is_virtual=True) + ## position-allocator.h: static ns3::TypeId ns3::GridPositionAllocator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## position-allocator.h: void ns3::GridPositionAllocator::SetDeltaX(double deltaX) [member function] + cls.add_method('SetDeltaX', + 'void', + [param('double', 'deltaX')]) + ## position-allocator.h: void ns3::GridPositionAllocator::SetDeltaY(double deltaY) [member function] + cls.add_method('SetDeltaY', + 'void', + [param('double', 'deltaY')]) + ## position-allocator.h: void ns3::GridPositionAllocator::SetLayoutType(ns3::GridPositionAllocator::LayoutType layoutType) [member function] + cls.add_method('SetLayoutType', + 'void', + [param('ns3::GridPositionAllocator::LayoutType', 'layoutType')]) + ## position-allocator.h: void ns3::GridPositionAllocator::SetMinX(double xMin) [member function] + cls.add_method('SetMinX', + 'void', + [param('double', 'xMin')]) + ## position-allocator.h: void ns3::GridPositionAllocator::SetMinY(double yMin) [member function] + cls.add_method('SetMinY', + 'void', + [param('double', 'yMin')]) + ## position-allocator.h: void ns3::GridPositionAllocator::SetN(uint32_t n) [member function] + cls.add_method('SetN', + 'void', + [param('uint32_t', 'n')]) return def register_Ns3ListPositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::ListPositionAllocator::ListPositionAllocator(ns3::ListPositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::ListPositionAllocator const &', 'arg0')]) - ## position-allocator.h: static ns3::TypeId ns3::ListPositionAllocator::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## position-allocator.h: ns3::ListPositionAllocator::ListPositionAllocator() [constructor] cls.add_constructor([]) ## position-allocator.h: void ns3::ListPositionAllocator::Add(ns3::Vector v) [member function] @@ -399,20 +394,35 @@ def register_Ns3ListPositionAllocator_methods(root_module, cls): 'ns3::Vector', [], is_const=True, is_virtual=True) + ## position-allocator.h: static ns3::TypeId ns3::ListPositionAllocator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3MobilityModel_methods(root_module, cls): ## mobility-model.h: ns3::MobilityModel::MobilityModel(ns3::MobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::MobilityModel const &', 'arg0')]) + ## mobility-model.h: ns3::MobilityModel::MobilityModel() [constructor] + cls.add_constructor([]) + ## mobility-model.h: double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr position) const [member function] + cls.add_method('GetDistanceFrom', + 'double', + [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], + is_const=True) + ## mobility-model.h: ns3::Vector ns3::MobilityModel::GetPosition() const [member function] + cls.add_method('GetPosition', + 'ns3::Vector', + [], + is_const=True) ## mobility-model.h: static ns3::TypeId ns3::MobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## mobility-model.h: ns3::MobilityModel::MobilityModel() [constructor] - cls.add_constructor([]) - ## mobility-model.h: ns3::Vector ns3::MobilityModel::GetPosition() const [member function] - cls.add_method('GetPosition', + ## mobility-model.h: ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] + cls.add_method('GetVelocity', 'ns3::Vector', [], is_const=True) @@ -420,16 +430,6 @@ def register_Ns3MobilityModel_methods(root_module, cls): cls.add_method('SetPosition', 'void', [param('ns3::Vector const &', 'position')]) - ## mobility-model.h: ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] - cls.add_method('GetVelocity', - 'ns3::Vector', - [], - is_const=True) - ## mobility-model.h: double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr position) const [member function] - cls.add_method('GetDistanceFrom', - 'double', - [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], - is_const=True) ## mobility-model.h: void ns3::MobilityModel::NotifyCourseChange() const [member function] cls.add_method('NotifyCourseChange', 'void', @@ -440,28 +440,28 @@ def register_Ns3MobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## mobility-model.h: void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - is_pure_virtual=True, visibility='private', is_virtual=True) ## mobility-model.h: ns3::Vector ns3::MobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## mobility-model.h: void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3RandomDirection2dMobilityModel_methods(root_module, cls): ## random-direction-2d-mobility-model.h: ns3::RandomDirection2dMobilityModel::RandomDirection2dMobilityModel(ns3::RandomDirection2dMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomDirection2dMobilityModel const &', 'arg0')]) + ## random-direction-2d-mobility-model.h: ns3::RandomDirection2dMobilityModel::RandomDirection2dMobilityModel() [constructor] + cls.add_constructor([]) ## random-direction-2d-mobility-model.h: static ns3::TypeId ns3::RandomDirection2dMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## random-direction-2d-mobility-model.h: ns3::RandomDirection2dMobilityModel::RandomDirection2dMobilityModel() [constructor] - cls.add_constructor([]) ## random-direction-2d-mobility-model.h: void ns3::RandomDirection2dMobilityModel::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -472,28 +472,28 @@ def register_Ns3RandomDirection2dMobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) - ## random-direction-2d-mobility-model.h: void ns3::RandomDirection2dMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) ## random-direction-2d-mobility-model.h: ns3::Vector ns3::RandomDirection2dMobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## random-direction-2d-mobility-model.h: void ns3::RandomDirection2dMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + visibility='private', is_virtual=True) return def register_Ns3RandomWalk2dMobilityModel_methods(root_module, cls): ## random-walk-2d-mobility-model.h: ns3::RandomWalk2dMobilityModel::RandomWalk2dMobilityModel(ns3::RandomWalk2dMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomWalk2dMobilityModel const &', 'arg0')]) + ## random-walk-2d-mobility-model.h: ns3::RandomWalk2dMobilityModel::RandomWalk2dMobilityModel() [constructor] + cls.add_constructor([]) ## random-walk-2d-mobility-model.h: static ns3::TypeId ns3::RandomWalk2dMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## random-walk-2d-mobility-model.h: ns3::RandomWalk2dMobilityModel::RandomWalk2dMobilityModel() [constructor] - cls.add_constructor([]) ## random-walk-2d-mobility-model.h: void ns3::RandomWalk2dMobilityModel::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -504,55 +504,55 @@ def register_Ns3RandomWalk2dMobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) - ## random-walk-2d-mobility-model.h: void ns3::RandomWalk2dMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) ## random-walk-2d-mobility-model.h: ns3::Vector ns3::RandomWalk2dMobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## random-walk-2d-mobility-model.h: void ns3::RandomWalk2dMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + visibility='private', is_virtual=True) return def register_Ns3RandomWaypointMobilityModel_methods(root_module, cls): ## random-waypoint-mobility-model.h: ns3::RandomWaypointMobilityModel::RandomWaypointMobilityModel(ns3::RandomWaypointMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomWaypointMobilityModel const &', 'arg0')]) + ## random-waypoint-mobility-model.h: ns3::RandomWaypointMobilityModel::RandomWaypointMobilityModel() [constructor] + cls.add_constructor([]) ## random-waypoint-mobility-model.h: static ns3::TypeId ns3::RandomWaypointMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## random-waypoint-mobility-model.h: ns3::RandomWaypointMobilityModel::RandomWaypointMobilityModel() [constructor] - cls.add_constructor([]) ## random-waypoint-mobility-model.h: ns3::Vector ns3::RandomWaypointMobilityModel::DoGetPosition() const [member function] cls.add_method('DoGetPosition', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## random-waypoint-mobility-model.h: ns3::Vector ns3::RandomWaypointMobilityModel::DoGetVelocity() const [member function] + cls.add_method('DoGetVelocity', + 'ns3::Vector', + [], + is_const=True, visibility='private', is_virtual=True) ## random-waypoint-mobility-model.h: void ns3::RandomWaypointMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] cls.add_method('DoSetPosition', 'void', [param('ns3::Vector const &', 'position')], visibility='private', is_virtual=True) - ## random-waypoint-mobility-model.h: ns3::Vector ns3::RandomWaypointMobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', - [], - is_const=True, visibility='private', is_virtual=True) return def register_Ns3ConstantAccelerationMobilityModel_methods(root_module, cls): ## constant-acceleration-mobility-model.h: ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel(ns3::ConstantAccelerationMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantAccelerationMobilityModel const &', 'arg0')]) + ## constant-acceleration-mobility-model.h: ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel() [constructor] + cls.add_constructor([]) ## constant-acceleration-mobility-model.h: static ns3::TypeId ns3::ConstantAccelerationMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## constant-acceleration-mobility-model.h: ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel() [constructor] - cls.add_constructor([]) ## constant-acceleration-mobility-model.h: void ns3::ConstantAccelerationMobilityModel::SetVelocityAndAcceleration(ns3::Vector const & velocity, ns3::Vector const & acceleration) [member function] cls.add_method('SetVelocityAndAcceleration', 'void', @@ -562,55 +562,55 @@ def register_Ns3ConstantAccelerationMobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) - ## constant-acceleration-mobility-model.h: void ns3::ConstantAccelerationMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) ## constant-acceleration-mobility-model.h: ns3::Vector ns3::ConstantAccelerationMobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## constant-acceleration-mobility-model.h: void ns3::ConstantAccelerationMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + visibility='private', is_virtual=True) return def register_Ns3ConstantPositionMobilityModel_methods(root_module, cls): ## constant-position-mobility-model.h: ns3::ConstantPositionMobilityModel::ConstantPositionMobilityModel(ns3::ConstantPositionMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantPositionMobilityModel const &', 'arg0')]) + ## constant-position-mobility-model.h: ns3::ConstantPositionMobilityModel::ConstantPositionMobilityModel() [constructor] + cls.add_constructor([]) ## constant-position-mobility-model.h: static ns3::TypeId ns3::ConstantPositionMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## constant-position-mobility-model.h: ns3::ConstantPositionMobilityModel::ConstantPositionMobilityModel() [constructor] - cls.add_constructor([]) ## constant-position-mobility-model.h: ns3::Vector ns3::ConstantPositionMobilityModel::DoGetPosition() const [member function] cls.add_method('DoGetPosition', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## constant-position-mobility-model.h: ns3::Vector ns3::ConstantPositionMobilityModel::DoGetVelocity() const [member function] + cls.add_method('DoGetVelocity', + 'ns3::Vector', + [], + is_const=True, visibility='private', is_virtual=True) ## constant-position-mobility-model.h: void ns3::ConstantPositionMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] cls.add_method('DoSetPosition', 'void', [param('ns3::Vector const &', 'position')], visibility='private', is_virtual=True) - ## constant-position-mobility-model.h: ns3::Vector ns3::ConstantPositionMobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', - [], - is_const=True, visibility='private', is_virtual=True) return def register_Ns3ConstantVelocityMobilityModel_methods(root_module, cls): ## constant-velocity-mobility-model.h: ns3::ConstantVelocityMobilityModel::ConstantVelocityMobilityModel(ns3::ConstantVelocityMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantVelocityMobilityModel const &', 'arg0')]) + ## constant-velocity-mobility-model.h: ns3::ConstantVelocityMobilityModel::ConstantVelocityMobilityModel() [constructor] + cls.add_constructor([]) ## constant-velocity-mobility-model.h: static ns3::TypeId ns3::ConstantVelocityMobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## constant-velocity-mobility-model.h: ns3::ConstantVelocityMobilityModel::ConstantVelocityMobilityModel() [constructor] - cls.add_constructor([]) ## constant-velocity-mobility-model.h: void ns3::ConstantVelocityMobilityModel::SetVelocity(ns3::Vector const & speed) [member function] cls.add_method('SetVelocity', 'void', @@ -620,26 +620,21 @@ def register_Ns3ConstantVelocityMobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) - ## constant-velocity-mobility-model.h: void ns3::ConstantVelocityMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) ## constant-velocity-mobility-model.h: ns3::Vector ns3::ConstantVelocityMobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## constant-velocity-mobility-model.h: void ns3::ConstantVelocityMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + visibility='private', is_virtual=True) return def register_Ns3HierarchicalMobilityModel_methods(root_module, cls): ## hierarchical-mobility-model.h: ns3::HierarchicalMobilityModel::HierarchicalMobilityModel(ns3::HierarchicalMobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::HierarchicalMobilityModel const &', 'arg0')]) - ## hierarchical-mobility-model.h: static ns3::TypeId ns3::HierarchicalMobilityModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## hierarchical-mobility-model.h: ns3::HierarchicalMobilityModel::HierarchicalMobilityModel() [constructor] cls.add_constructor([]) ## hierarchical-mobility-model.h: ns3::Ptr ns3::HierarchicalMobilityModel::GetChild() const [member function] @@ -652,6 +647,11 @@ def register_Ns3HierarchicalMobilityModel_methods(root_module, cls): 'ns3::Ptr< ns3::MobilityModel >', [], is_const=True) + ## hierarchical-mobility-model.h: static ns3::TypeId ns3::HierarchicalMobilityModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## hierarchical-mobility-model.h: void ns3::HierarchicalMobilityModel::SetChild(ns3::Ptr model) [member function] cls.add_method('SetChild', 'void', @@ -665,16 +665,16 @@ def register_Ns3HierarchicalMobilityModel_methods(root_module, cls): 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) - ## hierarchical-mobility-model.h: void ns3::HierarchicalMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', - 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) ## hierarchical-mobility-model.h: ns3::Vector ns3::HierarchicalMobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_const=True, visibility='private', is_virtual=True) + ## hierarchical-mobility-model.h: void ns3::HierarchicalMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] + cls.add_method('DoSetPosition', + 'void', + [param('ns3::Vector const &', 'position')], + visibility='private', is_virtual=True) return def register_functions(root_module): diff --git a/bindings/python/ns3_module_node.py b/bindings/python/ns3_module_node.py index 78f0f3a59..21d08229d 100644 --- a/bindings/python/ns3_module_node.py +++ b/bindings/python/ns3_module_node.py @@ -33,6 +33,12 @@ def register_types(module): module.add_class('Ipv6Address') ## ipv6-address.h: ns3::Ipv6Address [class] root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address']) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress [class] + module.add_class('Ipv6InterfaceAddress') + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::State_e [enumeration] + module.add_enum('State_e', ['TENTATIVE', 'DEPRECATED', 'PREFERRED', 'PERMANENT', 'HOMEADDRESS', 'TENTATIVE_OPTIMISTIC', 'INVALID'], outer_class=root_module['ns3::Ipv6InterfaceAddress']) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Scope_e [enumeration] + module.add_enum('Scope_e', ['HOST', 'LINKLOCAL', 'GLOBAL'], outer_class=root_module['ns3::Ipv6InterfaceAddress']) ## ipv6-address.h: ns3::Ipv6Prefix [class] module.add_class('Ipv6Prefix') ## mac48-address.h: ns3::Mac48Address [class] @@ -71,10 +77,14 @@ def register_types(module): module.add_class('Ipv6Header', parent=root_module['ns3::Header']) ## ipv6-header.h: ns3::Ipv6Header::NextHeader_e [enumeration] module.add_enum('NextHeader_e', ['IPV6_EXT_HOP_BY_HOP', 'IPV6_IPV4', 'IPV6_TCP', 'IPV6_UDP', 'IPV6_IPV6', 'IPV6_EXT_ROUTING', 'IPV6_EXT_FRAGMENTATION', 'IPV6_EXT_CONFIDENTIALITY', 'IPV6_EXT_AUTHENTIFICATION', 'IPV6_ICMPV6', 'IPV6_EXT_END', 'IPV6_EXT_DESTINATION', 'IPV6_SCTP', 'IPV6_EXT_MOBILITY', 'IPV6_UDP_LITE'], outer_class=root_module['ns3::Ipv6Header']) + ## ipv6-route.h: ns3::Ipv6MulticastRoute [class] + module.add_class('Ipv6MulticastRoute', parent=root_module['ns3::RefCountBase']) ## ipv6-address.h: ns3::Ipv6PrefixChecker [class] module.add_class('Ipv6PrefixChecker', parent=root_module['ns3::AttributeChecker']) ## ipv6-address.h: ns3::Ipv6PrefixValue [class] module.add_class('Ipv6PrefixValue', parent=root_module['ns3::AttributeValue']) + ## ipv6-route.h: ns3::Ipv6Route [class] + module.add_class('Ipv6Route', parent=root_module['ns3::RefCountBase']) ## llc-snap-header.h: ns3::LlcSnapHeader [class] module.add_class('LlcSnapHeader', parent=root_module['ns3::Header']) ## mac48-address.h: ns3::Mac48AddressChecker [class] @@ -125,6 +135,12 @@ def register_types(module): module.add_class('Ipv4RawSocketFactory', parent=root_module['ns3::SocketFactory']) ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol [class] module.add_class('Ipv4RoutingProtocol', parent=root_module['ns3::Object']) + ## ipv6.h: ns3::Ipv6 [class] + module.add_class('Ipv6', parent=root_module['ns3::Object']) + ## ipv6-raw-socket-factory.h: ns3::Ipv6RawSocketFactory [class] + module.add_class('Ipv6RawSocketFactory', parent=root_module['ns3::SocketFactory']) + ## ipv6-routing-protocol.h: ns3::Ipv6RoutingProtocol [class] + module.add_class('Ipv6RoutingProtocol', parent=root_module['ns3::Object']) ## net-device.h: ns3::NetDevice [class] module.add_class('NetDevice', parent=root_module['ns3::Object']) ## net-device.h: ns3::NetDevice::PacketType [enumeration] @@ -199,6 +215,7 @@ def register_methods(root_module): register_Ns3Ipv4InterfaceAddress_methods(root_module, root_module['ns3::Ipv4InterfaceAddress']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) + register_Ns3Ipv6InterfaceAddress_methods(root_module, root_module['ns3::Ipv6InterfaceAddress']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) register_Ns3Mac64Address_methods(root_module, root_module['ns3::Mac64Address']) @@ -214,8 +231,10 @@ def register_methods(root_module): register_Ns3Ipv6AddressChecker_methods(root_module, root_module['ns3::Ipv6AddressChecker']) register_Ns3Ipv6AddressValue_methods(root_module, root_module['ns3::Ipv6AddressValue']) register_Ns3Ipv6Header_methods(root_module, root_module['ns3::Ipv6Header']) + register_Ns3Ipv6MulticastRoute_methods(root_module, root_module['ns3::Ipv6MulticastRoute']) register_Ns3Ipv6PrefixChecker_methods(root_module, root_module['ns3::Ipv6PrefixChecker']) register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue']) + register_Ns3Ipv6Route_methods(root_module, root_module['ns3::Ipv6Route']) 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']) @@ -239,6 +258,9 @@ def register_methods(root_module): register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4']) register_Ns3Ipv4RawSocketFactory_methods(root_module, root_module['ns3::Ipv4RawSocketFactory']) register_Ns3Ipv4RoutingProtocol_methods(root_module, root_module['ns3::Ipv4RoutingProtocol']) + register_Ns3Ipv6_methods(root_module, root_module['ns3::Ipv6']) + register_Ns3Ipv6RawSocketFactory_methods(root_module, root_module['ns3::Ipv6RawSocketFactory']) + register_Ns3Ipv6RoutingProtocol_methods(root_module, root_module['ns3::Ipv6RoutingProtocol']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory']) @@ -329,34 +351,34 @@ def register_Ns3Inet6SocketAddress_methods(root_module, cls): cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')]) ## inet6-socket-address.h: ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor] cls.add_constructor([param('char const *', 'ipv6')]) - ## inet6-socket-address.h: uint16_t ns3::Inet6SocketAddress::GetPort() const [member function] - cls.add_method('GetPort', - 'uint16_t', - [], - is_const=True) - ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function] - cls.add_method('SetPort', - 'void', - [param('uint16_t', 'port')]) - ## inet6-socket-address.h: ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function] - cls.add_method('GetIpv6', - 'ns3::Ipv6Address', - [], - is_const=True) - ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function] - cls.add_method('SetIpv6', - 'void', - [param('ns3::Ipv6Address', 'ipv6')]) - ## inet6-socket-address.h: static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function] - cls.add_method('IsMatchingType', - 'bool', - [param('ns3::Address const &', 'addr')], - is_static=True) ## inet6-socket-address.h: static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function] cls.add_method('ConvertFrom', 'ns3::Inet6SocketAddress', [param('ns3::Address const &', 'addr')], is_static=True) + ## inet6-socket-address.h: ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function] + cls.add_method('GetIpv6', + 'ns3::Ipv6Address', + [], + is_const=True) + ## inet6-socket-address.h: uint16_t ns3::Inet6SocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet6-socket-address.h: static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'addr')], + is_static=True) + ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ipv6Address', 'ipv6')]) + ## inet6-socket-address.h: void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) return def register_Ns3InetSocketAddress_methods(root_module, cls): @@ -372,34 +394,34 @@ def register_Ns3InetSocketAddress_methods(root_module, cls): cls.add_constructor([param('char const *', 'ipv4'), param('uint16_t', 'port')]) ## inet-socket-address.h: ns3::InetSocketAddress::InetSocketAddress(char const * ipv4) [constructor] cls.add_constructor([param('char const *', 'ipv4')]) - ## inet-socket-address.h: uint16_t ns3::InetSocketAddress::GetPort() const [member function] - cls.add_method('GetPort', - 'uint16_t', - [], - is_const=True) - ## inet-socket-address.h: ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function] - cls.add_method('GetIpv4', - 'ns3::Ipv4Address', - [], - is_const=True) - ## inet-socket-address.h: void ns3::InetSocketAddress::SetPort(uint16_t port) [member function] - cls.add_method('SetPort', - 'void', - [param('uint16_t', 'port')]) - ## inet-socket-address.h: void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function] - cls.add_method('SetIpv4', - 'void', - [param('ns3::Ipv4Address', 'address')]) - ## inet-socket-address.h: static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function] - cls.add_method('IsMatchingType', - 'bool', - [param('ns3::Address const &', 'address')], - is_static=True) ## inet-socket-address.h: static ns3::InetSocketAddress ns3::InetSocketAddress::ConvertFrom(ns3::Address const & address) [member function] cls.add_method('ConvertFrom', 'ns3::InetSocketAddress', [param('ns3::Address const &', 'address')], is_static=True) + ## inet-socket-address.h: ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function] + cls.add_method('GetIpv4', + 'ns3::Ipv4Address', + [], + is_const=True) + ## inet-socket-address.h: uint16_t ns3::InetSocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet-socket-address.h: static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'address')], + is_static=True) + ## inet-socket-address.h: void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ipv4Address', 'address')]) + ## inet-socket-address.h: void ns3::InetSocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) return def register_Ns3Ipv4Address_methods(root_module, cls): @@ -506,17 +528,17 @@ def register_Ns3Ipv4Address_methods(root_module, cls): return def register_Ns3Ipv4AddressGenerator_methods(root_module, cls): - ## ipv4-address-generator.h: ns3::Ipv4AddressGenerator::Ipv4AddressGenerator(ns3::Ipv4AddressGenerator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4AddressGenerator const &', 'arg0')]) ## ipv4-address-generator.h: ns3::Ipv4AddressGenerator::Ipv4AddressGenerator() [constructor] cls.add_constructor([]) - ## ipv4-address-generator.h: static void ns3::Ipv4AddressGenerator::Init(ns3::Ipv4Address const net, ns3::Ipv4Mask const mask, ns3::Ipv4Address const addr="0.0.0.1") [member function] - cls.add_method('Init', - 'void', - [param('ns3::Ipv4Address const', 'net'), param('ns3::Ipv4Mask const', 'mask'), param('ns3::Ipv4Address const', 'addr', default_value='"0.0.0.1"')], + ## ipv4-address-generator.h: ns3::Ipv4AddressGenerator::Ipv4AddressGenerator(ns3::Ipv4AddressGenerator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4AddressGenerator const &', 'arg0')]) + ## ipv4-address-generator.h: static bool ns3::Ipv4AddressGenerator::AddAllocated(ns3::Ipv4Address const addr) [member function] + cls.add_method('AddAllocated', + 'bool', + [param('ns3::Ipv4Address const', 'addr')], is_static=True) - ## ipv4-address-generator.h: static ns3::Ipv4Address ns3::Ipv4AddressGenerator::NextNetwork(ns3::Ipv4Mask const mask) [member function] - cls.add_method('NextNetwork', + ## ipv4-address-generator.h: static ns3::Ipv4Address ns3::Ipv4AddressGenerator::GetAddress(ns3::Ipv4Mask const mask) [member function] + cls.add_method('GetAddress', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const', 'mask')], is_static=True) @@ -525,6 +547,11 @@ def register_Ns3Ipv4AddressGenerator_methods(root_module, cls): 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const', 'mask')], is_static=True) + ## ipv4-address-generator.h: static void ns3::Ipv4AddressGenerator::Init(ns3::Ipv4Address const net, ns3::Ipv4Mask const mask, ns3::Ipv4Address const addr="0.0.0.1") [member function] + cls.add_method('Init', + 'void', + [param('ns3::Ipv4Address const', 'net'), param('ns3::Ipv4Mask const', 'mask'), param('ns3::Ipv4Address const', 'addr', default_value='"0.0.0.1"')], + is_static=True) ## ipv4-address-generator.h: static void ns3::Ipv4AddressGenerator::InitAddress(ns3::Ipv4Address const addr, ns3::Ipv4Mask const mask) [member function] cls.add_method('InitAddress', 'void', @@ -535,8 +562,8 @@ def register_Ns3Ipv4AddressGenerator_methods(root_module, cls): 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const', 'mask')], is_static=True) - ## ipv4-address-generator.h: static ns3::Ipv4Address ns3::Ipv4AddressGenerator::GetAddress(ns3::Ipv4Mask const mask) [member function] - cls.add_method('GetAddress', + ## ipv4-address-generator.h: static ns3::Ipv4Address ns3::Ipv4AddressGenerator::NextNetwork(ns3::Ipv4Mask const mask) [member function] + cls.add_method('NextNetwork', 'ns3::Ipv4Address', [param('ns3::Ipv4Mask const', 'mask')], is_static=True) @@ -545,11 +572,6 @@ def register_Ns3Ipv4AddressGenerator_methods(root_module, cls): 'void', [], is_static=True) - ## ipv4-address-generator.h: static bool ns3::Ipv4AddressGenerator::AddAllocated(ns3::Ipv4Address const addr) [member function] - cls.add_method('AddAllocated', - 'bool', - [param('ns3::Ipv4Address const', 'addr')], - is_static=True) ## ipv4-address-generator.h: static void ns3::Ipv4AddressGenerator::TestMode() [member function] cls.add_method('TestMode', 'void', @@ -830,6 +852,61 @@ def register_Ns3Ipv6Address_methods(root_module, cls): [param('uint8_t *', 'address')]) return +def register_Ns3Ipv6InterfaceAddress_methods(root_module, cls): + cls.add_binary_comparison_operator('!=') + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress() [constructor] + cls.add_constructor([]) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress(ns3::Ipv6Address address) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'address')]) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress(ns3::Ipv6Address address, ns3::Ipv6Prefix prefix) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'address'), param('ns3::Ipv6Prefix', 'prefix')]) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress(ns3::Ipv6InterfaceAddress const & o) [copy constructor] + cls.add_constructor([param('ns3::Ipv6InterfaceAddress const &', 'o')]) + ## ipv6-interface-address.h: ns3::Ipv6Address ns3::Ipv6InterfaceAddress::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-interface-address.h: uint32_t ns3::Ipv6InterfaceAddress::GetNsDadUid() const [member function] + cls.add_method('GetNsDadUid', + 'uint32_t', + [], + is_const=True) + ## ipv6-interface-address.h: ns3::Ipv6Prefix ns3::Ipv6InterfaceAddress::GetPrefix() const [member function] + cls.add_method('GetPrefix', + 'ns3::Ipv6Prefix', + [], + is_const=True) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::Scope_e ns3::Ipv6InterfaceAddress::GetScope() const [member function] + cls.add_method('GetScope', + 'ns3::Ipv6InterfaceAddress::Scope_e', + [], + is_const=True) + ## ipv6-interface-address.h: ns3::Ipv6InterfaceAddress::State_e ns3::Ipv6InterfaceAddress::GetState() const [member function] + cls.add_method('GetState', + 'ns3::Ipv6InterfaceAddress::State_e', + [], + is_const=True) + ## ipv6-interface-address.h: void ns3::Ipv6InterfaceAddress::SetAddress(ns3::Ipv6Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Ipv6Address', 'address')]) + ## ipv6-interface-address.h: void ns3::Ipv6InterfaceAddress::SetNsDadUid(uint32_t uid) [member function] + cls.add_method('SetNsDadUid', + 'void', + [param('uint32_t', 'uid')]) + ## ipv6-interface-address.h: void ns3::Ipv6InterfaceAddress::SetScope(ns3::Ipv6InterfaceAddress::Scope_e scope) [member function] + cls.add_method('SetScope', + 'void', + [param('ns3::Ipv6InterfaceAddress::Scope_e', 'scope')]) + ## ipv6-interface-address.h: void ns3::Ipv6InterfaceAddress::SetState(ns3::Ipv6InterfaceAddress::State_e state) [member function] + cls.add_method('SetState', + 'void', + [param('ns3::Ipv6InterfaceAddress::State_e', 'state')]) + return + def register_Ns3Ipv6Prefix_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() @@ -987,10 +1064,10 @@ def register_Ns3Mac64Address_methods(root_module, cls): return def register_Ns3NodeList_methods(root_module, cls): - ## node-list.h: ns3::NodeList::NodeList(ns3::NodeList const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NodeList const &', 'arg0')]) ## node-list.h: ns3::NodeList::NodeList() [constructor] cls.add_constructor([]) + ## node-list.h: ns3::NodeList::NodeList(ns3::NodeList const & arg0) [copy constructor] + cls.add_constructor([param('ns3::NodeList const &', 'arg0')]) ## node-list.h: static uint32_t ns3::NodeList::Add(ns3::Ptr node) [member function] cls.add_method('Add', 'uint32_t', @@ -1006,16 +1083,16 @@ def register_Ns3NodeList_methods(root_module, cls): '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Node > const, std::vector< ns3::Ptr< ns3::Node > > >', [], is_static=True) - ## node-list.h: static ns3::Ptr ns3::NodeList::GetNode(uint32_t n) [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [param('uint32_t', 'n')], - is_static=True) ## node-list.h: static uint32_t ns3::NodeList::GetNNodes() [member function] cls.add_method('GetNNodes', 'uint32_t', [], is_static=True) + ## node-list.h: static ns3::Ptr ns3::NodeList::GetNode(uint32_t n) [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [param('uint32_t', 'n')], + is_static=True) return def register_Ns3PacketSocketAddress_methods(root_module, cls): @@ -1023,22 +1100,16 @@ def register_Ns3PacketSocketAddress_methods(root_module, cls): cls.add_constructor([param('ns3::PacketSocketAddress const &', 'arg0')]) ## packet-socket-address.h: ns3::PacketSocketAddress::PacketSocketAddress() [constructor] cls.add_constructor([]) - ## packet-socket-address.h: void ns3::PacketSocketAddress::SetProtocol(uint16_t protocol) [member function] - cls.add_method('SetProtocol', - 'void', - [param('uint16_t', 'protocol')]) - ## packet-socket-address.h: void ns3::PacketSocketAddress::SetAllDevices() [member function] - cls.add_method('SetAllDevices', - 'void', - []) - ## packet-socket-address.h: void ns3::PacketSocketAddress::SetSingleDevice(uint32_t device) [member function] - cls.add_method('SetSingleDevice', - 'void', - [param('uint32_t', 'device')]) - ## packet-socket-address.h: void ns3::PacketSocketAddress::SetPhysicalAddress(ns3::Address const address) [member function] - cls.add_method('SetPhysicalAddress', - 'void', - [param('ns3::Address const', 'address')]) + ## packet-socket-address.h: static ns3::PacketSocketAddress ns3::PacketSocketAddress::ConvertFrom(ns3::Address const & address) [member function] + cls.add_method('ConvertFrom', + 'ns3::PacketSocketAddress', + [param('ns3::Address const &', 'address')], + is_static=True) + ## packet-socket-address.h: ns3::Address ns3::PacketSocketAddress::GetPhysicalAddress() const [member function] + cls.add_method('GetPhysicalAddress', + 'ns3::Address', + [], + is_const=True) ## packet-socket-address.h: uint16_t ns3::PacketSocketAddress::GetProtocol() const [member function] cls.add_method('GetProtocol', 'uint16_t', @@ -1049,66 +1120,72 @@ def register_Ns3PacketSocketAddress_methods(root_module, cls): 'uint32_t', [], is_const=True) - ## packet-socket-address.h: bool ns3::PacketSocketAddress::IsSingleDevice() const [member function] - cls.add_method('IsSingleDevice', - 'bool', - [], - is_const=True) - ## packet-socket-address.h: ns3::Address ns3::PacketSocketAddress::GetPhysicalAddress() const [member function] - cls.add_method('GetPhysicalAddress', - 'ns3::Address', - [], - is_const=True) - ## packet-socket-address.h: static ns3::PacketSocketAddress ns3::PacketSocketAddress::ConvertFrom(ns3::Address const & address) [member function] - cls.add_method('ConvertFrom', - 'ns3::PacketSocketAddress', - [param('ns3::Address const &', 'address')], - is_static=True) ## packet-socket-address.h: static bool ns3::PacketSocketAddress::IsMatchingType(ns3::Address const & address) [member function] cls.add_method('IsMatchingType', 'bool', [param('ns3::Address const &', 'address')], is_static=True) + ## packet-socket-address.h: bool ns3::PacketSocketAddress::IsSingleDevice() const [member function] + cls.add_method('IsSingleDevice', + 'bool', + [], + is_const=True) + ## packet-socket-address.h: void ns3::PacketSocketAddress::SetAllDevices() [member function] + cls.add_method('SetAllDevices', + 'void', + []) + ## packet-socket-address.h: void ns3::PacketSocketAddress::SetPhysicalAddress(ns3::Address const address) [member function] + cls.add_method('SetPhysicalAddress', + 'void', + [param('ns3::Address const', 'address')]) + ## packet-socket-address.h: void ns3::PacketSocketAddress::SetProtocol(uint16_t protocol) [member function] + cls.add_method('SetProtocol', + 'void', + [param('uint16_t', 'protocol')]) + ## packet-socket-address.h: void ns3::PacketSocketAddress::SetSingleDevice(uint32_t device) [member function] + cls.add_method('SetSingleDevice', + 'void', + [param('uint32_t', 'device')]) return def register_Ns3Ipv4AddressChecker_methods(root_module, cls): - ## ipv4-address.h: ns3::Ipv4AddressChecker::Ipv4AddressChecker(ns3::Ipv4AddressChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4AddressChecker const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor] cls.add_constructor([]) + ## ipv4-address.h: ns3::Ipv4AddressChecker::Ipv4AddressChecker(ns3::Ipv4AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4AddressChecker const &', 'arg0')]) return def register_Ns3Ipv4AddressValue_methods(root_module, cls): - ## ipv4-address.h: ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4AddressValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4AddressValue const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4AddressValue::Ipv4AddressValue() [constructor] cls.add_constructor([]) + ## ipv4-address.h: ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4AddressValue const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Address const &', 'value')]) - ## ipv4-address.h: void ns3::Ipv4AddressValue::Set(ns3::Ipv4Address const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Ipv4Address const &', 'value')]) - ## ipv4-address.h: ns3::Ipv4Address ns3::Ipv4AddressValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Ipv4Address', - [], - is_const=True) ## ipv4-address.h: ns3::Ptr ns3::Ipv4AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## ipv4-address.h: std::string ns3::Ipv4AddressValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## ipv4-address.h: bool ns3::Ipv4AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## ipv4-address.h: ns3::Ipv4Address ns3::Ipv4AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-address.h: std::string ns3::Ipv4AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## ipv4-address.h: void ns3::Ipv4AddressValue::Set(ns3::Ipv4Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Ipv4Address const &', 'value')]) return def register_Ns3Ipv4Header_methods(root_module, cls): @@ -1116,60 +1193,22 @@ def register_Ns3Ipv4Header_methods(root_module, cls): cls.add_constructor([param('ns3::Ipv4Header const &', 'arg0')]) ## ipv4-header.h: ns3::Ipv4Header::Ipv4Header() [constructor] cls.add_constructor([]) + ## ipv4-header.h: uint32_t ns3::Ipv4Header::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## ipv4-header.h: void ns3::Ipv4Header::EnableChecksum() [member function] cls.add_method('EnableChecksum', 'void', []) - ## ipv4-header.h: void ns3::Ipv4Header::SetPayloadSize(uint16_t size) [member function] - cls.add_method('SetPayloadSize', - 'void', - [param('uint16_t', 'size')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetIdentification(uint16_t identification) [member function] - cls.add_method('SetIdentification', - 'void', - [param('uint16_t', 'identification')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetTos(uint8_t tos) [member function] - cls.add_method('SetTos', - 'void', - [param('uint8_t', 'tos')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetMoreFragments() [member function] - cls.add_method('SetMoreFragments', - 'void', - []) - ## ipv4-header.h: void ns3::Ipv4Header::SetLastFragment() [member function] - cls.add_method('SetLastFragment', - 'void', - []) - ## ipv4-header.h: void ns3::Ipv4Header::SetDontFragment() [member function] - cls.add_method('SetDontFragment', - 'void', - []) - ## ipv4-header.h: void ns3::Ipv4Header::SetMayFragment() [member function] - cls.add_method('SetMayFragment', - 'void', - []) - ## ipv4-header.h: void ns3::Ipv4Header::SetFragmentOffset(uint16_t offset) [member function] - cls.add_method('SetFragmentOffset', - 'void', - [param('uint16_t', 'offset')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetTtl(uint8_t ttl) [member function] - cls.add_method('SetTtl', - 'void', - [param('uint8_t', 'ttl')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetProtocol(uint8_t num) [member function] - cls.add_method('SetProtocol', - 'void', - [param('uint8_t', 'num')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetSource(ns3::Ipv4Address source) [member function] - cls.add_method('SetSource', - 'void', - [param('ns3::Ipv4Address', 'source')]) - ## ipv4-header.h: void ns3::Ipv4Header::SetDestination(ns3::Ipv4Address destination) [member function] - cls.add_method('SetDestination', - 'void', - [param('ns3::Ipv4Address', 'destination')]) - ## ipv4-header.h: uint16_t ns3::Ipv4Header::GetPayloadSize() const [member function] - cls.add_method('GetPayloadSize', + ## ipv4-header.h: ns3::Ipv4Address ns3::Ipv4Header::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-header.h: uint16_t ns3::Ipv4Header::GetFragmentOffset() const [member function] + cls.add_method('GetFragmentOffset', 'uint16_t', [], is_const=True) @@ -1178,13 +1217,48 @@ def register_Ns3Ipv4Header_methods(root_module, cls): 'uint16_t', [], is_const=True) + ## ipv4-header.h: ns3::TypeId ns3::Ipv4Header::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## ipv4-header.h: uint16_t ns3::Ipv4Header::GetPayloadSize() const [member function] + cls.add_method('GetPayloadSize', + 'uint16_t', + [], + is_const=True) + ## ipv4-header.h: uint8_t ns3::Ipv4Header::GetProtocol() const [member function] + cls.add_method('GetProtocol', + 'uint8_t', + [], + is_const=True) + ## ipv4-header.h: uint32_t ns3::Ipv4Header::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-header.h: ns3::Ipv4Address ns3::Ipv4Header::GetSource() const [member function] + cls.add_method('GetSource', + 'ns3::Ipv4Address', + [], + is_const=True) ## ipv4-header.h: uint8_t ns3::Ipv4Header::GetTos() const [member function] cls.add_method('GetTos', 'uint8_t', [], is_const=True) - ## ipv4-header.h: bool ns3::Ipv4Header::IsLastFragment() const [member function] - cls.add_method('IsLastFragment', + ## ipv4-header.h: uint8_t ns3::Ipv4Header::GetTtl() const [member function] + cls.add_method('GetTtl', + 'uint8_t', + [], + is_const=True) + ## ipv4-header.h: static ns3::TypeId ns3::Ipv4Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-header.h: bool ns3::Ipv4Header::IsChecksumOk() const [member function] + cls.add_method('IsChecksumOk', 'bool', [], is_const=True) @@ -1193,153 +1267,156 @@ def register_Ns3Ipv4Header_methods(root_module, cls): 'bool', [], is_const=True) - ## ipv4-header.h: uint16_t ns3::Ipv4Header::GetFragmentOffset() const [member function] - cls.add_method('GetFragmentOffset', - 'uint16_t', - [], - is_const=True) - ## ipv4-header.h: uint8_t ns3::Ipv4Header::GetTtl() const [member function] - cls.add_method('GetTtl', - 'uint8_t', - [], - is_const=True) - ## ipv4-header.h: uint8_t ns3::Ipv4Header::GetProtocol() const [member function] - cls.add_method('GetProtocol', - 'uint8_t', - [], - is_const=True) - ## ipv4-header.h: ns3::Ipv4Address ns3::Ipv4Header::GetSource() const [member function] - cls.add_method('GetSource', - 'ns3::Ipv4Address', - [], - is_const=True) - ## ipv4-header.h: ns3::Ipv4Address ns3::Ipv4Header::GetDestination() const [member function] - cls.add_method('GetDestination', - 'ns3::Ipv4Address', - [], - is_const=True) - ## ipv4-header.h: bool ns3::Ipv4Header::IsChecksumOk() const [member function] - cls.add_method('IsChecksumOk', + ## ipv4-header.h: bool ns3::Ipv4Header::IsLastFragment() const [member function] + cls.add_method('IsLastFragment', 'bool', [], is_const=True) - ## ipv4-header.h: static ns3::TypeId ns3::Ipv4Header::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## ipv4-header.h: ns3::TypeId ns3::Ipv4Header::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## ipv4-header.h: void ns3::Ipv4Header::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## ipv4-header.h: uint32_t ns3::Ipv4Header::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## ipv4-header.h: void ns3::Ipv4Header::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## ipv4-header.h: uint32_t ns3::Ipv4Header::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## ipv4-header.h: void ns3::Ipv4Header::SetDestination(ns3::Ipv4Address destination) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Ipv4Address', 'destination')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetDontFragment() [member function] + cls.add_method('SetDontFragment', + 'void', + []) + ## ipv4-header.h: void ns3::Ipv4Header::SetFragmentOffset(uint16_t offset) [member function] + cls.add_method('SetFragmentOffset', + 'void', + [param('uint16_t', 'offset')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetIdentification(uint16_t identification) [member function] + cls.add_method('SetIdentification', + 'void', + [param('uint16_t', 'identification')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetLastFragment() [member function] + cls.add_method('SetLastFragment', + 'void', + []) + ## ipv4-header.h: void ns3::Ipv4Header::SetMayFragment() [member function] + cls.add_method('SetMayFragment', + 'void', + []) + ## ipv4-header.h: void ns3::Ipv4Header::SetMoreFragments() [member function] + cls.add_method('SetMoreFragments', + 'void', + []) + ## ipv4-header.h: void ns3::Ipv4Header::SetPayloadSize(uint16_t size) [member function] + cls.add_method('SetPayloadSize', + 'void', + [param('uint16_t', 'size')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetProtocol(uint8_t num) [member function] + cls.add_method('SetProtocol', + 'void', + [param('uint8_t', 'num')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetSource(ns3::Ipv4Address source) [member function] + cls.add_method('SetSource', + 'void', + [param('ns3::Ipv4Address', 'source')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetTos(uint8_t tos) [member function] + cls.add_method('SetTos', + 'void', + [param('uint8_t', 'tos')]) + ## ipv4-header.h: void ns3::Ipv4Header::SetTtl(uint8_t ttl) [member function] + cls.add_method('SetTtl', + 'void', + [param('uint8_t', 'ttl')]) return def register_Ns3Ipv4MaskChecker_methods(root_module, cls): - ## ipv4-address.h: ns3::Ipv4MaskChecker::Ipv4MaskChecker(ns3::Ipv4MaskChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4MaskChecker const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4MaskChecker::Ipv4MaskChecker() [constructor] cls.add_constructor([]) + ## ipv4-address.h: ns3::Ipv4MaskChecker::Ipv4MaskChecker(ns3::Ipv4MaskChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4MaskChecker const &', 'arg0')]) return def register_Ns3Ipv4MaskValue_methods(root_module, cls): - ## ipv4-address.h: ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4MaskValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4MaskValue const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4MaskValue::Ipv4MaskValue() [constructor] cls.add_constructor([]) + ## ipv4-address.h: ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4MaskValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4MaskValue const &', 'arg0')]) ## ipv4-address.h: ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4Mask const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Mask const &', 'value')]) - ## ipv4-address.h: void ns3::Ipv4MaskValue::Set(ns3::Ipv4Mask const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Ipv4Mask const &', 'value')]) - ## ipv4-address.h: ns3::Ipv4Mask ns3::Ipv4MaskValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Ipv4Mask', - [], - is_const=True) ## ipv4-address.h: ns3::Ptr ns3::Ipv4MaskValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## ipv4-address.h: std::string ns3::Ipv4MaskValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## ipv4-address.h: bool ns3::Ipv4MaskValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## ipv4-address.h: ns3::Ipv4Mask ns3::Ipv4MaskValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Ipv4Mask', + [], + is_const=True) + ## ipv4-address.h: std::string ns3::Ipv4MaskValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## ipv4-address.h: void ns3::Ipv4MaskValue::Set(ns3::Ipv4Mask const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Ipv4Mask const &', 'value')]) return def register_Ns3Ipv4MulticastRoute_methods(root_module, cls): - ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_INTERFACES [variable] - cls.add_static_attribute('MAX_INTERFACES', 'uint32_t const', is_const=True) - ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_TTL [variable] - cls.add_static_attribute('MAX_TTL', 'uint32_t const', is_const=True) ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute(ns3::Ipv4MulticastRoute const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4MulticastRoute const &', 'arg0')]) ## ipv4-route.h: ns3::Ipv4MulticastRoute::Ipv4MulticastRoute() [constructor] cls.add_constructor([]) - ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetGroup(ns3::Ipv4Address const group) [member function] - cls.add_method('SetGroup', - 'void', - [param('ns3::Ipv4Address const', 'group')]) ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetGroup() const [member function] cls.add_method('GetGroup', 'ns3::Ipv4Address', [], is_const=True) - ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOrigin(ns3::Ipv4Address const origin) [member function] - cls.add_method('SetOrigin', - 'void', - [param('ns3::Ipv4Address const', 'origin')]) ## ipv4-route.h: ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetOrigin() const [member function] cls.add_method('GetOrigin', 'ns3::Ipv4Address', [], is_const=True) - ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetParent(uint32_t iif) [member function] - cls.add_method('SetParent', - 'void', - [param('uint32_t', 'iif')]) - ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetParent() const [member function] - cls.add_method('GetParent', - 'uint32_t', - [], - is_const=True) - ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOutputTtl(uint32_t oif, uint32_t ttl) [member function] - cls.add_method('SetOutputTtl', - 'void', - [param('uint32_t', 'oif'), param('uint32_t', 'ttl')]) ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetOutputTtl(uint32_t oif) const [member function] cls.add_method('GetOutputTtl', 'uint32_t', [param('uint32_t', 'oif')], is_const=True) + ## ipv4-route.h: uint32_t ns3::Ipv4MulticastRoute::GetParent() const [member function] + cls.add_method('GetParent', + 'uint32_t', + [], + is_const=True) + ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetGroup(ns3::Ipv4Address const group) [member function] + cls.add_method('SetGroup', + 'void', + [param('ns3::Ipv4Address const', 'group')]) + ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOrigin(ns3::Ipv4Address const origin) [member function] + cls.add_method('SetOrigin', + 'void', + [param('ns3::Ipv4Address const', 'origin')]) + ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetOutputTtl(uint32_t oif, uint32_t ttl) [member function] + cls.add_method('SetOutputTtl', + 'void', + [param('uint32_t', 'oif'), param('uint32_t', 'ttl')]) + ## ipv4-route.h: void ns3::Ipv4MulticastRoute::SetParent(uint32_t iif) [member function] + cls.add_method('SetParent', + 'void', + [param('uint32_t', 'iif')]) + ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_INTERFACES [variable] + cls.add_static_attribute('MAX_INTERFACES', 'uint32_t const', is_const=True) + ## ipv4-route.h: ns3::Ipv4MulticastRoute::MAX_TTL [variable] + cls.add_static_attribute('MAX_TTL', 'uint32_t const', is_const=True) return def register_Ns3Ipv4Route_methods(root_module, cls): @@ -1387,183 +1464,275 @@ def register_Ns3Ipv4Route_methods(root_module, cls): return def register_Ns3Ipv6AddressChecker_methods(root_module, cls): - ## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker() [constructor] cls.add_constructor([]) + ## ipv6-address.h: ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')]) return def register_Ns3Ipv6AddressValue_methods(root_module, cls): - ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6AddressValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv6AddressValue const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue() [constructor] cls.add_constructor([]) + ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6AddressValue const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Address const &', 'value')]) - ## ipv6-address.h: void ns3::Ipv6AddressValue::Set(ns3::Ipv6Address const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Ipv6Address const &', 'value')]) - ## ipv6-address.h: ns3::Ipv6Address ns3::Ipv6AddressValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Ipv6Address', - [], - is_const=True) ## ipv6-address.h: ns3::Ptr ns3::Ipv6AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## ipv6-address.h: std::string ns3::Ipv6AddressValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## ipv6-address.h: bool ns3::Ipv6AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## ipv6-address.h: ns3::Ipv6Address ns3::Ipv6AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-address.h: std::string ns3::Ipv6AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## ipv6-address.h: void ns3::Ipv6AddressValue::Set(ns3::Ipv6Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Ipv6Address const &', 'value')]) return def register_Ns3Ipv6Header_methods(root_module, cls): ## ipv6-header.h: ns3::Ipv6Header::Ipv6Header(ns3::Ipv6Header const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6Header const &', 'arg0')]) - ## ipv6-header.h: static ns3::TypeId ns3::Ipv6Header::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## ipv6-header.h: ns3::TypeId ns3::Ipv6Header::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## ipv6-header.h: ns3::Ipv6Header::Ipv6Header() [constructor] cls.add_constructor([]) - ## ipv6-header.h: void ns3::Ipv6Header::SetTrafficClass(uint8_t traffic) [member function] - cls.add_method('SetTrafficClass', - 'void', - [param('uint8_t', 'traffic')]) - ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetTrafficClass() const [member function] - cls.add_method('GetTrafficClass', - 'uint8_t', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetFlowLabel(uint32_t flow) [member function] - cls.add_method('SetFlowLabel', - 'void', - [param('uint32_t', 'flow')]) - ## ipv6-header.h: uint32_t ns3::Ipv6Header::GetFlowLabel() const [member function] - cls.add_method('GetFlowLabel', + ## ipv6-header.h: uint32_t ns3::Ipv6Header::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', 'uint32_t', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetPayloadLength(uint16_t len) [member function] - cls.add_method('SetPayloadLength', - 'void', - [param('uint16_t', 'len')]) - ## ipv6-header.h: uint16_t ns3::Ipv6Header::GetPayloadLength() const [member function] - cls.add_method('GetPayloadLength', - 'uint16_t', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetNextHeader(uint8_t next) [member function] - cls.add_method('SetNextHeader', - 'void', - [param('uint8_t', 'next')]) - ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetNextHeader() const [member function] - cls.add_method('GetNextHeader', - 'uint8_t', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetHopLimit(uint8_t limit) [member function] - cls.add_method('SetHopLimit', - 'void', - [param('uint8_t', 'limit')]) - ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetHopLimit() const [member function] - cls.add_method('GetHopLimit', - 'uint8_t', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetSourceAddress(ns3::Ipv6Address src) [member function] - cls.add_method('SetSourceAddress', - 'void', - [param('ns3::Ipv6Address', 'src')]) - ## ipv6-header.h: ns3::Ipv6Address ns3::Ipv6Header::GetSourceAddress() const [member function] - cls.add_method('GetSourceAddress', - 'ns3::Ipv6Address', - [], - is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::SetDestinationAddress(ns3::Ipv6Address dst) [member function] - cls.add_method('SetDestinationAddress', - 'void', - [param('ns3::Ipv6Address', 'dst')]) + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## ipv6-header.h: ns3::Ipv6Address ns3::Ipv6Header::GetDestinationAddress() const [member function] cls.add_method('GetDestinationAddress', 'ns3::Ipv6Address', [], is_const=True) - ## ipv6-header.h: void ns3::Ipv6Header::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], + ## ipv6-header.h: uint32_t ns3::Ipv6Header::GetFlowLabel() const [member function] + cls.add_method('GetFlowLabel', + 'uint32_t', + [], + is_const=True) + ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetHopLimit() const [member function] + cls.add_method('GetHopLimit', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h: ns3::TypeId ns3::Ipv6Header::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], is_const=True, is_virtual=True) + ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetNextHeader() const [member function] + cls.add_method('GetNextHeader', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h: uint16_t ns3::Ipv6Header::GetPayloadLength() const [member function] + cls.add_method('GetPayloadLength', + 'uint16_t', + [], + is_const=True) ## ipv6-header.h: uint32_t ns3::Ipv6Header::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) + ## ipv6-header.h: ns3::Ipv6Address ns3::Ipv6Header::GetSourceAddress() const [member function] + cls.add_method('GetSourceAddress', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-header.h: uint8_t ns3::Ipv6Header::GetTrafficClass() const [member function] + cls.add_method('GetTrafficClass', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h: static ns3::TypeId ns3::Ipv6Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-header.h: void ns3::Ipv6Header::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) ## ipv6-header.h: void ns3::Ipv6Header::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## ipv6-header.h: uint32_t ns3::Ipv6Header::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', + ## ipv6-header.h: void ns3::Ipv6Header::SetDestinationAddress(ns3::Ipv6Address dst) [member function] + cls.add_method('SetDestinationAddress', + 'void', + [param('ns3::Ipv6Address', 'dst')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetFlowLabel(uint32_t flow) [member function] + cls.add_method('SetFlowLabel', + 'void', + [param('uint32_t', 'flow')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetHopLimit(uint8_t limit) [member function] + cls.add_method('SetHopLimit', + 'void', + [param('uint8_t', 'limit')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetNextHeader(uint8_t next) [member function] + cls.add_method('SetNextHeader', + 'void', + [param('uint8_t', 'next')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetPayloadLength(uint16_t len) [member function] + cls.add_method('SetPayloadLength', + 'void', + [param('uint16_t', 'len')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetSourceAddress(ns3::Ipv6Address src) [member function] + cls.add_method('SetSourceAddress', + 'void', + [param('ns3::Ipv6Address', 'src')]) + ## ipv6-header.h: void ns3::Ipv6Header::SetTrafficClass(uint8_t traffic) [member function] + cls.add_method('SetTrafficClass', + 'void', + [param('uint8_t', 'traffic')]) + return + +def register_Ns3Ipv6MulticastRoute_methods(root_module, cls): + cls.add_output_stream_operator() + ## ipv6-route.h: ns3::Ipv6MulticastRoute::Ipv6MulticastRoute(ns3::Ipv6MulticastRoute const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6MulticastRoute const &', 'arg0')]) + ## ipv6-route.h: ns3::Ipv6MulticastRoute::Ipv6MulticastRoute() [constructor] + cls.add_constructor([]) + ## ipv6-route.h: ns3::Ipv6Address ns3::Ipv6MulticastRoute::GetGroup() const [member function] + cls.add_method('GetGroup', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-route.h: ns3::Ipv6Address ns3::Ipv6MulticastRoute::GetOrigin() const [member function] + cls.add_method('GetOrigin', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-route.h: uint32_t ns3::Ipv6MulticastRoute::GetOutputTtl(uint32_t oif) const [member function] + cls.add_method('GetOutputTtl', 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + [param('uint32_t', 'oif')], + is_const=True) + ## ipv6-route.h: uint32_t ns3::Ipv6MulticastRoute::GetParent() const [member function] + cls.add_method('GetParent', + 'uint32_t', + [], + is_const=True) + ## ipv6-route.h: void ns3::Ipv6MulticastRoute::SetGroup(ns3::Ipv6Address const group) [member function] + cls.add_method('SetGroup', + 'void', + [param('ns3::Ipv6Address const', 'group')]) + ## ipv6-route.h: void ns3::Ipv6MulticastRoute::SetOrigin(ns3::Ipv6Address const origin) [member function] + cls.add_method('SetOrigin', + 'void', + [param('ns3::Ipv6Address const', 'origin')]) + ## ipv6-route.h: void ns3::Ipv6MulticastRoute::SetOutputTtl(uint32_t oif, uint32_t ttl) [member function] + cls.add_method('SetOutputTtl', + 'void', + [param('uint32_t', 'oif'), param('uint32_t', 'ttl')]) + ## ipv6-route.h: void ns3::Ipv6MulticastRoute::SetParent(uint32_t iif) [member function] + cls.add_method('SetParent', + 'void', + [param('uint32_t', 'iif')]) + ## ipv6-route.h: ns3::Ipv6MulticastRoute::MAX_INTERFACES [variable] + cls.add_static_attribute('MAX_INTERFACES', 'uint32_t const', is_const=True) + ## ipv6-route.h: ns3::Ipv6MulticastRoute::MAX_TTL [variable] + cls.add_static_attribute('MAX_TTL', 'uint32_t const', is_const=True) return def register_Ns3Ipv6PrefixChecker_methods(root_module, cls): - ## ipv6-address.h: ns3::Ipv6PrefixChecker::Ipv6PrefixChecker(ns3::Ipv6PrefixChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv6PrefixChecker const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6PrefixChecker::Ipv6PrefixChecker() [constructor] cls.add_constructor([]) + ## ipv6-address.h: ns3::Ipv6PrefixChecker::Ipv6PrefixChecker(ns3::Ipv6PrefixChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6PrefixChecker const &', 'arg0')]) return def register_Ns3Ipv6PrefixValue_methods(root_module, cls): - ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6PrefixValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv6PrefixValue const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue() [constructor] cls.add_constructor([]) + ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6PrefixValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6PrefixValue const &', 'arg0')]) ## ipv6-address.h: ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6Prefix const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Prefix const &', 'value')]) - ## ipv6-address.h: void ns3::Ipv6PrefixValue::Set(ns3::Ipv6Prefix const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Ipv6Prefix const &', 'value')]) - ## ipv6-address.h: ns3::Ipv6Prefix ns3::Ipv6PrefixValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Ipv6Prefix', - [], - is_const=True) ## ipv6-address.h: ns3::Ptr ns3::Ipv6PrefixValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## ipv6-address.h: std::string ns3::Ipv6PrefixValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## ipv6-address.h: bool ns3::Ipv6PrefixValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## ipv6-address.h: ns3::Ipv6Prefix ns3::Ipv6PrefixValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Ipv6Prefix', + [], + is_const=True) + ## ipv6-address.h: std::string ns3::Ipv6PrefixValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## ipv6-address.h: void ns3::Ipv6PrefixValue::Set(ns3::Ipv6Prefix const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Ipv6Prefix const &', 'value')]) + return + +def register_Ns3Ipv6Route_methods(root_module, cls): + cls.add_output_stream_operator() + ## ipv6-route.h: ns3::Ipv6Route::Ipv6Route(ns3::Ipv6Route const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6Route const &', 'arg0')]) + ## ipv6-route.h: ns3::Ipv6Route::Ipv6Route() [constructor] + cls.add_constructor([]) + ## ipv6-route.h: ns3::Ipv6Address ns3::Ipv6Route::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-route.h: ns3::Ipv6Address ns3::Ipv6Route::GetGateway() const [member function] + cls.add_method('GetGateway', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-route.h: ns3::Ptr ns3::Ipv6Route::GetOutputDevice() const [member function] + cls.add_method('GetOutputDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## ipv6-route.h: ns3::Ipv6Address ns3::Ipv6Route::GetSource() const [member function] + cls.add_method('GetSource', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-route.h: void ns3::Ipv6Route::SetDestination(ns3::Ipv6Address dest) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Ipv6Address', 'dest')]) + ## ipv6-route.h: void ns3::Ipv6Route::SetGateway(ns3::Ipv6Address gw) [member function] + cls.add_method('SetGateway', + 'void', + [param('ns3::Ipv6Address', 'gw')]) + ## ipv6-route.h: void ns3::Ipv6Route::SetOutputDevice(ns3::Ptr outputDevice) [member function] + cls.add_method('SetOutputDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'outputDevice')]) + ## ipv6-route.h: void ns3::Ipv6Route::SetSource(ns3::Ipv6Address src) [member function] + cls.add_method('SetSource', + 'void', + [param('ns3::Ipv6Address', 'src')]) return def register_Ns3LlcSnapHeader_methods(root_module, cls): @@ -1571,10 +1740,21 @@ def register_Ns3LlcSnapHeader_methods(root_module, cls): cls.add_constructor([param('ns3::LlcSnapHeader const &', 'arg0')]) ## llc-snap-header.h: ns3::LlcSnapHeader::LlcSnapHeader() [constructor] cls.add_constructor([]) - ## llc-snap-header.h: void ns3::LlcSnapHeader::SetType(uint16_t type) [member function] - cls.add_method('SetType', - 'void', - [param('uint16_t', 'type')]) + ## llc-snap-header.h: uint32_t ns3::LlcSnapHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## llc-snap-header.h: ns3::TypeId ns3::LlcSnapHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## llc-snap-header.h: uint32_t ns3::LlcSnapHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## llc-snap-header.h: uint16_t ns3::LlcSnapHeader::GetType() [member function] cls.add_method('GetType', 'uint16_t', @@ -1584,122 +1764,86 @@ def register_Ns3LlcSnapHeader_methods(root_module, cls): 'ns3::TypeId', [], is_static=True) - ## llc-snap-header.h: ns3::TypeId ns3::LlcSnapHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## llc-snap-header.h: void ns3::LlcSnapHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## llc-snap-header.h: uint32_t ns3::LlcSnapHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## llc-snap-header.h: void ns3::LlcSnapHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## llc-snap-header.h: uint32_t ns3::LlcSnapHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## llc-snap-header.h: void ns3::LlcSnapHeader::SetType(uint16_t type) [member function] + cls.add_method('SetType', + 'void', + [param('uint16_t', 'type')]) return def register_Ns3Mac48AddressChecker_methods(root_module, cls): - ## mac48-address.h: ns3::Mac48AddressChecker::Mac48AddressChecker(ns3::Mac48AddressChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Mac48AddressChecker const &', 'arg0')]) ## mac48-address.h: ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) + ## mac48-address.h: ns3::Mac48AddressChecker::Mac48AddressChecker(ns3::Mac48AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac48AddressChecker const &', 'arg0')]) return def register_Ns3Mac48AddressValue_methods(root_module, cls): - ## mac48-address.h: ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48AddressValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Mac48AddressValue const &', 'arg0')]) ## mac48-address.h: ns3::Mac48AddressValue::Mac48AddressValue() [constructor] cls.add_constructor([]) + ## mac48-address.h: ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac48AddressValue const &', 'arg0')]) ## mac48-address.h: ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48Address const & value) [constructor] cls.add_constructor([param('ns3::Mac48Address const &', 'value')]) - ## mac48-address.h: void ns3::Mac48AddressValue::Set(ns3::Mac48Address const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Mac48Address const &', 'value')]) - ## mac48-address.h: ns3::Mac48Address ns3::Mac48AddressValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Mac48Address', - [], - is_const=True) ## mac48-address.h: ns3::Ptr ns3::Mac48AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## mac48-address.h: std::string ns3::Mac48AddressValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## mac48-address.h: bool ns3::Mac48AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## mac48-address.h: ns3::Mac48Address ns3::Mac48AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Mac48Address', + [], + is_const=True) + ## mac48-address.h: std::string ns3::Mac48AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## mac48-address.h: void ns3::Mac48AddressValue::Set(ns3::Mac48Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Mac48Address const &', 'value')]) 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')]) - ## queue.h: static ns3::TypeId ns3::Queue::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## queue.h: ns3::Queue::Queue() [constructor] cls.add_constructor([]) - ## queue.h: bool ns3::Queue::IsEmpty() const [member function] - cls.add_method('IsEmpty', - 'bool', - [], - is_const=True) - ## queue.h: bool ns3::Queue::Enqueue(ns3::Ptr p) [member function] - cls.add_method('Enqueue', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p')]) ## queue.h: ns3::Ptr ns3::Queue::Dequeue() [member function] cls.add_method('Dequeue', 'ns3::Ptr< ns3::Packet >', []) - ## queue.h: ns3::Ptr ns3::Queue::Peek() const [member function] - cls.add_method('Peek', - 'ns3::Ptr< ns3::Packet const >', - [], - is_const=True) ## queue.h: void ns3::Queue::DequeueAll() [member function] cls.add_method('DequeueAll', 'void', []) - ## queue.h: uint32_t ns3::Queue::GetNPackets() const [member function] - cls.add_method('GetNPackets', - 'uint32_t', - [], - is_const=True) + ## queue.h: bool ns3::Queue::Enqueue(ns3::Ptr p) [member function] + cls.add_method('Enqueue', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p')]) ## queue.h: uint32_t ns3::Queue::GetNBytes() const [member function] cls.add_method('GetNBytes', 'uint32_t', [], is_const=True) - ## queue.h: uint32_t ns3::Queue::GetTotalReceivedBytes() const [member function] - cls.add_method('GetTotalReceivedBytes', - 'uint32_t', - [], - is_const=True) - ## queue.h: uint32_t ns3::Queue::GetTotalReceivedPackets() const [member function] - cls.add_method('GetTotalReceivedPackets', + ## queue.h: uint32_t ns3::Queue::GetNPackets() const [member function] + cls.add_method('GetNPackets', 'uint32_t', [], is_const=True) @@ -1713,6 +1857,31 @@ def register_Ns3Queue_methods(root_module, cls): 'uint32_t', [], is_const=True) + ## queue.h: uint32_t ns3::Queue::GetTotalReceivedBytes() const [member function] + cls.add_method('GetTotalReceivedBytes', + 'uint32_t', + [], + is_const=True) + ## queue.h: uint32_t ns3::Queue::GetTotalReceivedPackets() const [member function] + cls.add_method('GetTotalReceivedPackets', + 'uint32_t', + [], + is_const=True) + ## queue.h: static ns3::TypeId ns3::Queue::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## queue.h: bool ns3::Queue::IsEmpty() const [member function] + cls.add_method('IsEmpty', + 'bool', + [], + is_const=True) + ## queue.h: ns3::Ptr ns3::Queue::Peek() const [member function] + cls.add_method('Peek', + 'ns3::Ptr< ns3::Packet const >', + [], + is_const=True) ## queue.h: void ns3::Queue::ResetStatistics() [member function] cls.add_method('ResetStatistics', 'void', @@ -1722,16 +1891,16 @@ def register_Ns3Queue_methods(root_module, cls): 'void', [param('ns3::Ptr< ns3::Packet >', 'packet')], visibility='protected') - ## queue.h: bool ns3::Queue::DoEnqueue(ns3::Ptr p) [member function] - cls.add_method('DoEnqueue', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p')], - is_pure_virtual=True, visibility='private', is_virtual=True) ## queue.h: ns3::Ptr ns3::Queue::DoDequeue() [member function] cls.add_method('DoDequeue', 'ns3::Ptr< ns3::Packet >', [], is_pure_virtual=True, visibility='private', is_virtual=True) + ## queue.h: bool ns3::Queue::DoEnqueue(ns3::Ptr p) [member function] + cls.add_method('DoEnqueue', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p')], + is_pure_virtual=True, visibility='private', is_virtual=True) ## queue.h: ns3::Ptr ns3::Queue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', @@ -1744,41 +1913,6 @@ def register_Ns3Socket_methods(root_module, cls): cls.add_constructor([param('ns3::Socket const &', 'arg0')]) ## socket.h: ns3::Socket::Socket() [constructor] cls.add_constructor([]) - ## socket.h: static ns3::Ptr ns3::Socket::CreateSocket(ns3::Ptr node, ns3::TypeId tid) [member function] - cls.add_method('CreateSocket', - 'ns3::Ptr< ns3::Socket >', - [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::TypeId', 'tid')], - is_static=True) - ## socket.h: ns3::Socket::SocketErrno ns3::Socket::GetErrno() const [member function] - cls.add_method('GetErrno', - 'ns3::Socket::SocketErrno', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## socket.h: ns3::Ptr ns3::Socket::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## socket.h: void ns3::Socket::SetConnectCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionSucceeded, ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionFailed) [member function] - cls.add_method('SetConnectCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionSucceeded'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionFailed')]) - ## socket.h: void ns3::Socket::SetAcceptCallback(ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionRequest, ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> newConnectionCreated) [member function] - cls.add_method('SetAcceptCallback', - 'void', - [param('ns3::Callback< bool, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionRequest'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'newConnectionCreated')]) - ## socket.h: void ns3::Socket::SetDataSentCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> dataSent) [member function] - cls.add_method('SetDataSentCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')]) - ## socket.h: void ns3::Socket::SetSendCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> sendCb) [member function] - cls.add_method('SetSendCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'sendCb')]) - ## socket.h: void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function] - cls.add_method('SetRecvCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arg0')]) ## socket.h: int ns3::Socket::Bind(ns3::Address const & address) [member function] cls.add_method('Bind', 'int', @@ -1794,56 +1928,77 @@ def register_Ns3Socket_methods(root_module, cls): 'int', [], is_pure_virtual=True, is_virtual=True) - ## socket.h: int ns3::Socket::ShutdownSend() [member function] - cls.add_method('ShutdownSend', - 'int', - [], - is_pure_virtual=True, is_virtual=True) - ## socket.h: int ns3::Socket::ShutdownRecv() [member function] - cls.add_method('ShutdownRecv', - 'int', - [], - is_pure_virtual=True, is_virtual=True) ## socket.h: int ns3::Socket::Connect(ns3::Address const & address) [member function] cls.add_method('Connect', 'int', [param('ns3::Address const &', 'address')], is_pure_virtual=True, is_virtual=True) - ## socket.h: int ns3::Socket::Listen() [member function] - cls.add_method('Listen', - 'int', - [], - is_pure_virtual=True, is_virtual=True) - ## socket.h: uint32_t ns3::Socket::GetTxAvailable() const [member function] - cls.add_method('GetTxAvailable', - 'uint32_t', + ## socket.h: static ns3::Ptr ns3::Socket::CreateSocket(ns3::Ptr node, ns3::TypeId tid) [member function] + cls.add_method('CreateSocket', + 'ns3::Ptr< ns3::Socket >', + [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::TypeId', 'tid')], + is_static=True) + ## socket.h: ns3::Socket::SocketErrno ns3::Socket::GetErrno() const [member function] + cls.add_method('GetErrno', + 'ns3::Socket::SocketErrno', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h: ns3::Ptr ns3::Socket::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## socket.h: int ns3::Socket::Send(ns3::Ptr p, uint32_t flags) [member function] - cls.add_method('Send', - 'int', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags')], - is_pure_virtual=True, is_virtual=True) - ## socket.h: int ns3::Socket::SendTo(ns3::Ptr p, uint32_t flags, ns3::Address const & toAddress) [member function] - cls.add_method('SendTo', - 'int', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags'), param('ns3::Address const &', 'toAddress')], - is_pure_virtual=True, is_virtual=True) ## socket.h: uint32_t ns3::Socket::GetRxAvailable() const [member function] cls.add_method('GetRxAvailable', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h: int ns3::Socket::GetSockName(ns3::Address & address) const [member function] + cls.add_method('GetSockName', + 'int', + [param('ns3::Address &', 'address')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h: uint32_t ns3::Socket::GetTxAvailable() const [member function] + cls.add_method('GetTxAvailable', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h: int ns3::Socket::Listen() [member function] + cls.add_method('Listen', + 'int', + [], + is_pure_virtual=True, is_virtual=True) ## socket.h: ns3::Ptr ns3::Socket::Recv(uint32_t maxSize, uint32_t flags) [member function] cls.add_method('Recv', 'ns3::Ptr< ns3::Packet >', [param('uint32_t', 'maxSize'), param('uint32_t', 'flags')], is_pure_virtual=True, is_virtual=True) + ## socket.h: ns3::Ptr ns3::Socket::Recv() [member function] + cls.add_method('Recv', + 'ns3::Ptr< ns3::Packet >', + []) + ## socket.h: int ns3::Socket::Recv(uint8_t * buf, uint32_t size, uint32_t flags) [member function] + cls.add_method('Recv', + 'int', + [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags')]) ## socket.h: ns3::Ptr ns3::Socket::RecvFrom(uint32_t maxSize, uint32_t flags, ns3::Address & fromAddress) [member function] cls.add_method('RecvFrom', 'ns3::Ptr< ns3::Packet >', [param('uint32_t', 'maxSize'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')], is_pure_virtual=True, is_virtual=True) + ## socket.h: ns3::Ptr ns3::Socket::RecvFrom(ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'ns3::Ptr< ns3::Packet >', + [param('ns3::Address &', 'fromAddress')]) + ## socket.h: int ns3::Socket::RecvFrom(uint8_t * buf, uint32_t size, uint32_t flags, ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'int', + [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')]) + ## socket.h: int ns3::Socket::Send(ns3::Ptr p, uint32_t flags) [member function] + cls.add_method('Send', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags')], + is_pure_virtual=True, is_virtual=True) ## socket.h: int ns3::Socket::Send(ns3::Ptr p) [member function] cls.add_method('Send', 'int', @@ -1852,36 +2007,50 @@ def register_Ns3Socket_methods(root_module, cls): cls.add_method('Send', 'int', [param('uint8_t const *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags')]) + ## socket.h: int ns3::Socket::SendTo(ns3::Ptr p, uint32_t flags, ns3::Address const & toAddress) [member function] + cls.add_method('SendTo', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags'), param('ns3::Address const &', 'toAddress')], + is_pure_virtual=True, is_virtual=True) ## socket.h: int ns3::Socket::SendTo(uint8_t const * buf, uint32_t size, uint32_t flags, ns3::Address const & address) [member function] cls.add_method('SendTo', 'int', [param('uint8_t const *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags'), param('ns3::Address const &', 'address')]) - ## socket.h: ns3::Ptr ns3::Socket::Recv() [member function] - cls.add_method('Recv', - 'ns3::Ptr< ns3::Packet >', - []) - ## socket.h: int ns3::Socket::Recv(uint8_t * buf, uint32_t size, uint32_t flags) [member function] - cls.add_method('Recv', + ## socket.h: void ns3::Socket::SetAcceptCallback(ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionRequest, ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> newConnectionCreated) [member function] + cls.add_method('SetAcceptCallback', + 'void', + [param('ns3::Callback< bool, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionRequest'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'newConnectionCreated')]) + ## socket.h: void ns3::Socket::SetConnectCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionSucceeded, ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionFailed) [member function] + cls.add_method('SetConnectCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionSucceeded'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionFailed')]) + ## socket.h: void ns3::Socket::SetDataSentCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> dataSent) [member function] + cls.add_method('SetDataSentCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')]) + ## socket.h: void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function] + cls.add_method('SetRecvCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arg0')]) + ## socket.h: void ns3::Socket::SetSendCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> sendCb) [member function] + cls.add_method('SetSendCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'sendCb')]) + ## socket.h: int ns3::Socket::ShutdownRecv() [member function] + cls.add_method('ShutdownRecv', 'int', - [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags')]) - ## socket.h: ns3::Ptr ns3::Socket::RecvFrom(ns3::Address & fromAddress) [member function] - cls.add_method('RecvFrom', - 'ns3::Ptr< ns3::Packet >', - [param('ns3::Address &', 'fromAddress')]) - ## socket.h: int ns3::Socket::RecvFrom(uint8_t * buf, uint32_t size, uint32_t flags, ns3::Address & fromAddress) [member function] - cls.add_method('RecvFrom', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h: int ns3::Socket::ShutdownSend() [member function] + cls.add_method('ShutdownSend', 'int', - [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')]) - ## socket.h: int ns3::Socket::GetSockName(ns3::Address & address) const [member function] - cls.add_method('GetSockName', - 'int', - [param('ns3::Address &', 'address')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## socket.h: void ns3::Socket::NotifyConnectionSucceeded() [member function] - cls.add_method('NotifyConnectionSucceeded', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h: void ns3::Socket::DoDispose() [member function] + cls.add_method('DoDispose', 'void', [], - visibility='protected') + visibility='protected', is_virtual=True) ## socket.h: void ns3::Socket::NotifyConnectionFailed() [member function] cls.add_method('NotifyConnectionFailed', 'void', @@ -1892,31 +2061,31 @@ def register_Ns3Socket_methods(root_module, cls): 'bool', [param('ns3::Address const &', 'from')], visibility='protected') - ## socket.h: void ns3::Socket::NotifyNewConnectionCreated(ns3::Ptr socket, ns3::Address const & from) [member function] - cls.add_method('NotifyNewConnectionCreated', + ## socket.h: void ns3::Socket::NotifyConnectionSucceeded() [member function] + cls.add_method('NotifyConnectionSucceeded', 'void', - [param('ns3::Ptr< ns3::Socket >', 'socket'), param('ns3::Address const &', 'from')], - visibility='protected') - ## socket.h: void ns3::Socket::NotifyDataSent(uint32_t size) [member function] - cls.add_method('NotifyDataSent', - 'void', - [param('uint32_t', 'size')], - visibility='protected') - ## socket.h: void ns3::Socket::NotifySend(uint32_t spaceAvailable) [member function] - cls.add_method('NotifySend', - 'void', - [param('uint32_t', 'spaceAvailable')], + [], visibility='protected') ## socket.h: void ns3::Socket::NotifyDataRecv() [member function] cls.add_method('NotifyDataRecv', 'void', [], visibility='protected') - ## socket.h: void ns3::Socket::DoDispose() [member function] - cls.add_method('DoDispose', + ## socket.h: void ns3::Socket::NotifyDataSent(uint32_t size) [member function] + cls.add_method('NotifyDataSent', 'void', - [], - visibility='protected', is_virtual=True) + [param('uint32_t', 'size')], + visibility='protected') + ## socket.h: void ns3::Socket::NotifyNewConnectionCreated(ns3::Ptr socket, ns3::Address const & from) [member function] + cls.add_method('NotifyNewConnectionCreated', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket'), param('ns3::Address const &', 'from')], + visibility='protected') + ## socket.h: void ns3::Socket::NotifySend(uint32_t spaceAvailable) [member function] + cls.add_method('NotifySend', + 'void', + [param('uint32_t', 'spaceAvailable')], + visibility='protected') return def register_Ns3SocketAddressTag_methods(root_module, cls): @@ -1924,20 +2093,16 @@ def register_Ns3SocketAddressTag_methods(root_module, cls): cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')]) ## socket.h: ns3::SocketAddressTag::SocketAddressTag() [constructor] cls.add_constructor([]) - ## socket.h: void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function] - cls.add_method('SetAddress', + ## socket.h: void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', 'void', - [param('ns3::Address', 'addr')]) + [param('ns3::TagBuffer', 'i')], + is_virtual=True) ## socket.h: ns3::Address ns3::SocketAddressTag::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True) - ## socket.h: static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## socket.h: ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -1948,31 +2113,30 @@ def register_Ns3SocketAddressTag_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_virtual=True) + ## socket.h: static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## socket.h: void ns3::SocketAddressTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) + ## socket.h: void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h: void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'addr')]) return def register_Ns3SocketFactory_methods(root_module, cls): ## socket-factory.h: ns3::SocketFactory::SocketFactory(ns3::SocketFactory const & arg0) [copy constructor] cls.add_constructor([param('ns3::SocketFactory const &', 'arg0')]) - ## socket-factory.h: static ns3::TypeId ns3::SocketFactory::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## socket-factory.h: ns3::SocketFactory::SocketFactory() [constructor] cls.add_constructor([]) ## socket-factory.h: ns3::Ptr ns3::SocketFactory::CreateSocket() [member function] @@ -1980,6 +2144,11 @@ def register_Ns3SocketFactory_methods(root_module, cls): 'ns3::Ptr< ns3::Socket >', [], is_pure_virtual=True, is_virtual=True) + ## socket-factory.h: static ns3::TypeId ns3::SocketFactory::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3SocketIpTtlTag_methods(root_module, cls): @@ -1987,20 +2156,11 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls): cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')]) ## socket.h: ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor] cls.add_constructor([]) - ## socket.h: void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function] - cls.add_method('SetTtl', + ## socket.h: void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', 'void', - [param('uint8_t', 'ttl')]) - ## socket.h: uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function] - cls.add_method('GetTtl', - 'uint8_t', - [], - is_const=True) - ## socket.h: static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + [param('ns3::TagBuffer', 'i')], + is_virtual=True) ## socket.h: ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -2011,21 +2171,30 @@ def register_Ns3SocketIpTtlTag_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_virtual=True) + ## socket.h: uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function] + cls.add_method('GetTtl', + 'uint8_t', + [], + is_const=True) + ## socket.h: static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## socket.h: void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) + ## socket.h: void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h: void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function] + cls.add_method('SetTtl', + 'void', + [param('uint8_t', 'ttl')]) return def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): @@ -2033,24 +2202,19 @@ def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')]) ## socket.h: ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor] cls.add_constructor([]) - ## socket.h: void ns3::SocketSetDontFragmentTag::Enable() [member function] - cls.add_method('Enable', + ## socket.h: void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', 'void', - []) + [param('ns3::TagBuffer', 'i')], + is_virtual=True) ## socket.h: void ns3::SocketSetDontFragmentTag::Disable() [member function] cls.add_method('Disable', 'void', []) - ## socket.h: bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function] - cls.add_method('IsEnabled', - 'bool', - [], - is_const=True) - ## socket.h: static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## socket.h: void ns3::SocketSetDontFragmentTag::Enable() [member function] + cls.add_method('Enable', + 'void', + []) ## socket.h: ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', @@ -2061,91 +2225,81 @@ def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_const=True, is_virtual=True) - ## socket.h: void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_virtual=True) + ## socket.h: static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h: bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True) ## socket.h: void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) + ## socket.h: void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) return def register_Ns3TcpSocket_methods(root_module, cls): ## tcp-socket.h: ns3::TcpSocket::TcpSocket(ns3::TcpSocket const & arg0) [copy constructor] cls.add_constructor([param('ns3::TcpSocket const &', 'arg0')]) + ## tcp-socket.h: ns3::TcpSocket::TcpSocket() [constructor] + cls.add_constructor([]) ## tcp-socket.h: static ns3::TypeId ns3::TcpSocket::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## tcp-socket.h: ns3::TcpSocket::TcpSocket() [constructor] - cls.add_constructor([]) - ## tcp-socket.h: void ns3::TcpSocket::SetSndBufSize(uint32_t size) [member function] - cls.add_method('SetSndBufSize', - 'void', - [param('uint32_t', 'size')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSndBufSize() const [member function] - cls.add_method('GetSndBufSize', + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetConnCount() const [member function] + cls.add_method('GetConnCount', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetRcvBufSize(uint32_t size) [member function] - cls.add_method('SetRcvBufSize', - 'void', - [param('uint32_t', 'size')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetRcvBufSize() const [member function] - cls.add_method('GetRcvBufSize', + ## tcp-socket.h: ns3::Time ns3::TcpSocket::GetConnTimeout() const [member function] + cls.add_method('GetConnTimeout', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetDelAckMaxCount() const [member function] + cls.add_method('GetDelAckMaxCount', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetSegSize(uint32_t size) [member function] - cls.add_method('SetSegSize', - 'void', - [param('uint32_t', 'size')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSegSize() const [member function] - cls.add_method('GetSegSize', - 'uint32_t', + ## tcp-socket.h: ns3::Time ns3::TcpSocket::GetDelAckTimeout() const [member function] + cls.add_method('GetDelAckTimeout', + 'ns3::Time', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetSSThresh(uint32_t threshold) [member function] - cls.add_method('SetSSThresh', - 'void', - [param('uint32_t', 'threshold')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSSThresh() const [member function] - cls.add_method('GetSSThresh', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetInitialCwnd(uint32_t count) [member function] - cls.add_method('SetInitialCwnd', - 'void', - [param('uint32_t', 'count')], - is_pure_virtual=True, visibility='private', is_virtual=True) ## tcp-socket.h: uint32_t ns3::TcpSocket::GetInitialCwnd() const [member function] cls.add_method('GetInitialCwnd', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetConnTimeout(ns3::Time timeout) [member function] - cls.add_method('SetConnTimeout', - 'void', - [param('ns3::Time', 'timeout')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: ns3::Time ns3::TcpSocket::GetConnTimeout() const [member function] - cls.add_method('GetConnTimeout', - 'ns3::Time', + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetRcvBufSize() const [member function] + cls.add_method('GetRcvBufSize', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSSThresh() const [member function] + cls.add_method('GetSSThresh', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSegSize() const [member function] + cls.add_method('GetSegSize', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## tcp-socket.h: uint32_t ns3::TcpSocket::GetSndBufSize() const [member function] + cls.add_method('GetSndBufSize', + 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## tcp-socket.h: void ns3::TcpSocket::SetConnCount(uint32_t count) [member function] @@ -2153,38 +2307,53 @@ def register_Ns3TcpSocket_methods(root_module, cls): 'void', [param('uint32_t', 'count')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetConnCount() const [member function] - cls.add_method('GetConnCount', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## tcp-socket.h: void ns3::TcpSocket::SetDelAckTimeout(ns3::Time timeout) [member function] - cls.add_method('SetDelAckTimeout', + ## tcp-socket.h: void ns3::TcpSocket::SetConnTimeout(ns3::Time timeout) [member function] + cls.add_method('SetConnTimeout', 'void', [param('ns3::Time', 'timeout')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: ns3::Time ns3::TcpSocket::GetDelAckTimeout() const [member function] - cls.add_method('GetDelAckTimeout', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## tcp-socket.h: void ns3::TcpSocket::SetDelAckMaxCount(uint32_t count) [member function] cls.add_method('SetDelAckMaxCount', 'void', [param('uint32_t', 'count')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## tcp-socket.h: uint32_t ns3::TcpSocket::GetDelAckMaxCount() const [member function] - cls.add_method('GetDelAckMaxCount', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetDelAckTimeout(ns3::Time timeout) [member function] + cls.add_method('SetDelAckTimeout', + 'void', + [param('ns3::Time', 'timeout')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetInitialCwnd(uint32_t count) [member function] + cls.add_method('SetInitialCwnd', + 'void', + [param('uint32_t', 'count')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetRcvBufSize(uint32_t size) [member function] + cls.add_method('SetRcvBufSize', + 'void', + [param('uint32_t', 'size')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetSSThresh(uint32_t threshold) [member function] + cls.add_method('SetSSThresh', + 'void', + [param('uint32_t', 'threshold')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetSegSize(uint32_t size) [member function] + cls.add_method('SetSegSize', + 'void', + [param('uint32_t', 'size')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## tcp-socket.h: void ns3::TcpSocket::SetSndBufSize(uint32_t size) [member function] + cls.add_method('SetSndBufSize', + 'void', + [param('uint32_t', 'size')], + is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3TcpSocketFactory_methods(root_module, cls): - ## tcp-socket-factory.h: ns3::TcpSocketFactory::TcpSocketFactory(ns3::TcpSocketFactory const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TcpSocketFactory const &', 'arg0')]) ## tcp-socket-factory.h: ns3::TcpSocketFactory::TcpSocketFactory() [constructor] cls.add_constructor([]) + ## tcp-socket-factory.h: ns3::TcpSocketFactory::TcpSocketFactory(ns3::TcpSocketFactory const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TcpSocketFactory const &', 'arg0')]) ## tcp-socket-factory.h: static ns3::TypeId ns3::TcpSocketFactory::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', @@ -2195,13 +2364,13 @@ def register_Ns3TcpSocketFactory_methods(root_module, cls): def register_Ns3UdpSocket_methods(root_module, cls): ## udp-socket.h: ns3::UdpSocket::UdpSocket(ns3::UdpSocket const & arg0) [copy constructor] cls.add_constructor([param('ns3::UdpSocket const &', 'arg0')]) + ## udp-socket.h: ns3::UdpSocket::UdpSocket() [constructor] + cls.add_constructor([]) ## udp-socket.h: static ns3::TypeId ns3::UdpSocket::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## udp-socket.h: ns3::UdpSocket::UdpSocket() [constructor] - cls.add_constructor([]) ## udp-socket.h: int ns3::UdpSocket::MulticastJoinGroup(uint32_t interface, ns3::Address const & groupAddress) [member function] cls.add_method('MulticastJoinGroup', 'int', @@ -2212,34 +2381,34 @@ def register_Ns3UdpSocket_methods(root_module, cls): 'int', [param('uint32_t', 'interface'), param('ns3::Address const &', 'groupAddress')], is_pure_virtual=True, is_virtual=True) - ## udp-socket.h: void ns3::UdpSocket::SetRcvBufSize(uint32_t size) [member function] - cls.add_method('SetRcvBufSize', - 'void', - [param('uint32_t', 'size')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## udp-socket.h: uint32_t ns3::UdpSocket::GetRcvBufSize() const [member function] - cls.add_method('GetRcvBufSize', - 'uint32_t', + ## udp-socket.h: int32_t ns3::UdpSocket::GetIpMulticastIf() const [member function] + cls.add_method('GetIpMulticastIf', + 'int32_t', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## udp-socket.h: bool ns3::UdpSocket::GetIpMulticastLoop() const [member function] + cls.add_method('GetIpMulticastLoop', + 'bool', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## udp-socket.h: uint8_t ns3::UdpSocket::GetIpMulticastTtl() const [member function] + cls.add_method('GetIpMulticastTtl', + 'uint8_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## udp-socket.h: void ns3::UdpSocket::SetIpTtl(uint8_t ipTtl) [member function] - cls.add_method('SetIpTtl', - 'void', - [param('uint8_t', 'ipTtl')], - is_pure_virtual=True, visibility='private', is_virtual=True) ## udp-socket.h: uint8_t ns3::UdpSocket::GetIpTtl() const [member function] cls.add_method('GetIpTtl', 'uint8_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastTtl(uint8_t ipTtl) [member function] - cls.add_method('SetIpMulticastTtl', - 'void', - [param('uint8_t', 'ipTtl')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## udp-socket.h: uint8_t ns3::UdpSocket::GetIpMulticastTtl() const [member function] - cls.add_method('GetIpMulticastTtl', - 'uint8_t', + ## udp-socket.h: bool ns3::UdpSocket::GetMtuDiscover() const [member function] + cls.add_method('GetMtuDiscover', + 'bool', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## udp-socket.h: uint32_t ns3::UdpSocket::GetRcvBufSize() const [member function] + cls.add_method('GetRcvBufSize', + 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastIf(int32_t ipIf) [member function] @@ -2247,38 +2416,38 @@ def register_Ns3UdpSocket_methods(root_module, cls): 'void', [param('int32_t', 'ipIf')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## udp-socket.h: int32_t ns3::UdpSocket::GetIpMulticastIf() const [member function] - cls.add_method('GetIpMulticastIf', - 'int32_t', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastLoop(bool loop) [member function] cls.add_method('SetIpMulticastLoop', 'void', [param('bool', 'loop')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## udp-socket.h: bool ns3::UdpSocket::GetIpMulticastLoop() const [member function] - cls.add_method('GetIpMulticastLoop', - 'bool', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## udp-socket.h: void ns3::UdpSocket::SetIpMulticastTtl(uint8_t ipTtl) [member function] + cls.add_method('SetIpMulticastTtl', + 'void', + [param('uint8_t', 'ipTtl')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## udp-socket.h: void ns3::UdpSocket::SetIpTtl(uint8_t ipTtl) [member function] + cls.add_method('SetIpTtl', + 'void', + [param('uint8_t', 'ipTtl')], + is_pure_virtual=True, visibility='private', is_virtual=True) ## udp-socket.h: void ns3::UdpSocket::SetMtuDiscover(bool discover) [member function] cls.add_method('SetMtuDiscover', 'void', [param('bool', 'discover')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## udp-socket.h: bool ns3::UdpSocket::GetMtuDiscover() const [member function] - cls.add_method('GetMtuDiscover', - 'bool', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## udp-socket.h: void ns3::UdpSocket::SetRcvBufSize(uint32_t size) [member function] + cls.add_method('SetRcvBufSize', + 'void', + [param('uint32_t', 'size')], + is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3UdpSocketFactory_methods(root_module, cls): - ## udp-socket-factory.h: ns3::UdpSocketFactory::UdpSocketFactory(ns3::UdpSocketFactory const & arg0) [copy constructor] - cls.add_constructor([param('ns3::UdpSocketFactory const &', 'arg0')]) ## udp-socket-factory.h: ns3::UdpSocketFactory::UdpSocketFactory() [constructor] cls.add_constructor([]) + ## udp-socket-factory.h: ns3::UdpSocketFactory::UdpSocketFactory(ns3::UdpSocketFactory const & arg0) [copy constructor] + cls.add_constructor([param('ns3::UdpSocketFactory const &', 'arg0')]) ## udp-socket-factory.h: static ns3::TypeId ns3::UdpSocketFactory::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', @@ -2287,55 +2456,64 @@ def register_Ns3UdpSocketFactory_methods(root_module, cls): return def register_Ns3AddressChecker_methods(root_module, cls): - ## address.h: ns3::AddressChecker::AddressChecker(ns3::AddressChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AddressChecker const &', 'arg0')]) ## address.h: ns3::AddressChecker::AddressChecker() [constructor] cls.add_constructor([]) + ## address.h: ns3::AddressChecker::AddressChecker(ns3::AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AddressChecker const &', 'arg0')]) return def register_Ns3AddressValue_methods(root_module, cls): - ## address.h: ns3::AddressValue::AddressValue(ns3::AddressValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AddressValue const &', 'arg0')]) ## address.h: ns3::AddressValue::AddressValue() [constructor] cls.add_constructor([]) + ## address.h: ns3::AddressValue::AddressValue(ns3::AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AddressValue const &', 'arg0')]) ## address.h: ns3::AddressValue::AddressValue(ns3::Address const & value) [constructor] cls.add_constructor([param('ns3::Address const &', 'value')]) - ## address.h: void ns3::AddressValue::Set(ns3::Address const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Address const &', 'value')]) - ## address.h: ns3::Address ns3::AddressValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Address', - [], - is_const=True) ## address.h: ns3::Ptr ns3::AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## address.h: std::string ns3::AddressValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## address.h: bool ns3::AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## address.h: ns3::Address ns3::AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Address', + [], + is_const=True) + ## address.h: std::string ns3::AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## address.h: void ns3::AddressValue::Set(ns3::Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Address const &', 'value')]) return def register_Ns3Application_methods(root_module, cls): ## application.h: ns3::Application::Application(ns3::Application const & arg0) [copy constructor] cls.add_constructor([param('ns3::Application const &', 'arg0')]) + ## application.h: ns3::Application::Application() [constructor] + cls.add_constructor([]) + ## application.h: ns3::Ptr ns3::Application::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True) ## application.h: static ns3::TypeId ns3::Application::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## application.h: ns3::Application::Application() [constructor] - cls.add_constructor([]) + ## application.h: void ns3::Application::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) ## application.h: void ns3::Application::Start(ns3::Time const & startTime) [member function] cls.add_method('Start', 'void', @@ -2352,15 +2530,6 @@ def register_Ns3Application_methods(root_module, cls): cls.add_method('Stop', 'void', [param('ns3::RandomVariable const &', 'stopVariable')]) - ## application.h: ns3::Ptr ns3::Application::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True) - ## application.h: void ns3::Application::SetNode(ns3::Ptr node) [member function] - cls.add_method('SetNode', - 'void', - [param('ns3::Ptr< ns3::Node >', 'node')]) ## application.h: void ns3::Application::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -2381,53 +2550,53 @@ def register_Ns3Application_methods(root_module, cls): def register_Ns3Channel_methods(root_module, cls): ## channel.h: ns3::Channel::Channel(ns3::Channel const & arg0) [copy constructor] cls.add_constructor([param('ns3::Channel const &', 'arg0')]) - ## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## channel.h: ns3::Channel::Channel() [constructor] cls.add_constructor([]) - ## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## channel.h: ns3::Ptr ns3::Channel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3DropTailQueue_methods(root_module, cls): ## drop-tail-queue.h: ns3::DropTailQueue::DropTailQueue(ns3::DropTailQueue const & arg0) [copy constructor] cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')]) + ## drop-tail-queue.h: ns3::DropTailQueue::DropTailQueue() [constructor] + cls.add_constructor([]) + ## drop-tail-queue.h: ns3::DropTailQueue::Mode ns3::DropTailQueue::GetMode() [member function] + cls.add_method('GetMode', + 'ns3::DropTailQueue::Mode', + []) ## drop-tail-queue.h: static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## drop-tail-queue.h: ns3::DropTailQueue::DropTailQueue() [constructor] - cls.add_constructor([]) ## drop-tail-queue.h: void ns3::DropTailQueue::SetMode(ns3::DropTailQueue::Mode mode) [member function] cls.add_method('SetMode', 'void', [param('ns3::DropTailQueue::Mode', 'mode')]) - ## drop-tail-queue.h: ns3::DropTailQueue::Mode ns3::DropTailQueue::GetMode() [member function] - cls.add_method('GetMode', - 'ns3::DropTailQueue::Mode', - []) - ## drop-tail-queue.h: bool ns3::DropTailQueue::DoEnqueue(ns3::Ptr p) [member function] - cls.add_method('DoEnqueue', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p')], - visibility='private', is_virtual=True) ## drop-tail-queue.h: ns3::Ptr ns3::DropTailQueue::DoDequeue() [member function] cls.add_method('DoDequeue', 'ns3::Ptr< ns3::Packet >', [], visibility='private', is_virtual=True) + ## drop-tail-queue.h: bool ns3::DropTailQueue::DoEnqueue(ns3::Ptr p) [member function] + cls.add_method('DoEnqueue', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p')], + visibility='private', is_virtual=True) ## drop-tail-queue.h: ns3::Ptr ns3::DropTailQueue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', @@ -2442,22 +2611,26 @@ def register_Ns3EthernetHeader_methods(root_module, cls): cls.add_constructor([param('bool', 'hasPreamble')]) ## ethernet-header.h: ns3::EthernetHeader::EthernetHeader() [constructor] cls.add_constructor([]) - ## ethernet-header.h: void ns3::EthernetHeader::SetLengthType(uint16_t size) [member function] - cls.add_method('SetLengthType', - 'void', - [param('uint16_t', 'size')]) - ## ethernet-header.h: void ns3::EthernetHeader::SetSource(ns3::Mac48Address source) [member function] - cls.add_method('SetSource', - 'void', - [param('ns3::Mac48Address', 'source')]) - ## ethernet-header.h: void ns3::EthernetHeader::SetDestination(ns3::Mac48Address destination) [member function] - cls.add_method('SetDestination', - 'void', - [param('ns3::Mac48Address', 'destination')]) - ## ethernet-header.h: void ns3::EthernetHeader::SetPreambleSfd(uint64_t preambleSfd) [member function] - cls.add_method('SetPreambleSfd', - 'void', - [param('uint64_t', 'preambleSfd')]) + ## ethernet-header.h: uint32_t ns3::EthernetHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## ethernet-header.h: ns3::Mac48Address ns3::EthernetHeader::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Mac48Address', + [], + is_const=True) + ## ethernet-header.h: uint32_t ns3::EthernetHeader::GetHeaderSize() const [member function] + cls.add_method('GetHeaderSize', + 'uint32_t', + [], + is_const=True) + ## ethernet-header.h: ns3::TypeId ns3::EthernetHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) ## ethernet-header.h: uint16_t ns3::EthernetHeader::GetLengthType() const [member function] cls.add_method('GetLengthType', 'uint16_t', @@ -2468,56 +2641,52 @@ def register_Ns3EthernetHeader_methods(root_module, cls): 'ns3::ethernet_header_t', [], is_const=True) - ## ethernet-header.h: ns3::Mac48Address ns3::EthernetHeader::GetSource() const [member function] - cls.add_method('GetSource', - 'ns3::Mac48Address', - [], - is_const=True) - ## ethernet-header.h: ns3::Mac48Address ns3::EthernetHeader::GetDestination() const [member function] - cls.add_method('GetDestination', - 'ns3::Mac48Address', - [], - is_const=True) ## ethernet-header.h: uint64_t ns3::EthernetHeader::GetPreambleSfd() const [member function] cls.add_method('GetPreambleSfd', 'uint64_t', [], is_const=True) - ## ethernet-header.h: uint32_t ns3::EthernetHeader::GetHeaderSize() const [member function] - cls.add_method('GetHeaderSize', + ## ethernet-header.h: uint32_t ns3::EthernetHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', 'uint32_t', [], + is_const=True, is_virtual=True) + ## ethernet-header.h: ns3::Mac48Address ns3::EthernetHeader::GetSource() const [member function] + cls.add_method('GetSource', + 'ns3::Mac48Address', + [], is_const=True) ## ethernet-header.h: static ns3::TypeId ns3::EthernetHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## ethernet-header.h: ns3::TypeId ns3::EthernetHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## ethernet-header.h: void ns3::EthernetHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## ethernet-header.h: uint32_t ns3::EthernetHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## ethernet-header.h: void ns3::EthernetHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## ethernet-header.h: uint32_t ns3::EthernetHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## ethernet-header.h: void ns3::EthernetHeader::SetDestination(ns3::Mac48Address destination) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Mac48Address', 'destination')]) + ## ethernet-header.h: void ns3::EthernetHeader::SetLengthType(uint16_t size) [member function] + cls.add_method('SetLengthType', + 'void', + [param('uint16_t', 'size')]) + ## ethernet-header.h: void ns3::EthernetHeader::SetPreambleSfd(uint64_t preambleSfd) [member function] + cls.add_method('SetPreambleSfd', + 'void', + [param('uint64_t', 'preambleSfd')]) + ## ethernet-header.h: void ns3::EthernetHeader::SetSource(ns3::Mac48Address source) [member function] + cls.add_method('SetSource', + 'void', + [param('ns3::Mac48Address', 'source')]) return def register_Ns3EthernetTrailer_methods(root_module, cls): @@ -2525,28 +2694,39 @@ def register_Ns3EthernetTrailer_methods(root_module, cls): cls.add_constructor([param('ns3::EthernetTrailer const &', 'arg0')]) ## ethernet-trailer.h: ns3::EthernetTrailer::EthernetTrailer() [constructor] cls.add_constructor([]) - ## ethernet-trailer.h: static void ns3::EthernetTrailer::EnableFcs(bool enable) [member function] - cls.add_method('EnableFcs', - 'void', - [param('bool', 'enable')], - is_static=True) ## ethernet-trailer.h: void ns3::EthernetTrailer::CalcFcs(ns3::Ptr p) [member function] cls.add_method('CalcFcs', 'void', [param('ns3::Ptr< ns3::Packet >', 'p')]) - ## ethernet-trailer.h: void ns3::EthernetTrailer::SetFcs(uint32_t fcs) [member function] - cls.add_method('SetFcs', - 'void', - [param('uint32_t', 'fcs')]) - ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::GetFcs() [member function] - cls.add_method('GetFcs', - 'uint32_t', - []) ## ethernet-trailer.h: bool ns3::EthernetTrailer::CheckFcs(ns3::Ptr p) const [member function] cls.add_method('CheckFcs', 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], is_const=True) + ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::Deserialize(ns3::Buffer::Iterator end) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'end')], + is_virtual=True) + ## ethernet-trailer.h: static void ns3::EthernetTrailer::EnableFcs(bool enable) [member function] + cls.add_method('EnableFcs', + 'void', + [param('bool', 'enable')], + is_static=True) + ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::GetFcs() [member function] + cls.add_method('GetFcs', + 'uint32_t', + []) + ## ethernet-trailer.h: ns3::TypeId ns3::EthernetTrailer::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::GetTrailerSize() const [member function] cls.add_method('GetTrailerSize', 'uint32_t', @@ -2557,110 +2737,57 @@ def register_Ns3EthernetTrailer_methods(root_module, cls): 'ns3::TypeId', [], is_static=True) - ## ethernet-trailer.h: ns3::TypeId ns3::EthernetTrailer::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## ethernet-trailer.h: void ns3::EthernetTrailer::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## ethernet-trailer.h: void ns3::EthernetTrailer::Serialize(ns3::Buffer::Iterator end) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'end')], is_const=True, is_virtual=True) - ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::Deserialize(ns3::Buffer::Iterator end) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'end')], - is_virtual=True) + ## ethernet-trailer.h: void ns3::EthernetTrailer::SetFcs(uint32_t fcs) [member function] + cls.add_method('SetFcs', + 'void', + [param('uint32_t', 'fcs')]) return def register_Ns3Ipv4_methods(root_module, cls): - ## ipv4.h: ns3::Ipv4::IF_ANY [variable] - cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True) ## ipv4.h: ns3::Ipv4::Ipv4(ns3::Ipv4 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4 const &', 'arg0')]) - ## ipv4.h: static ns3::TypeId ns3::Ipv4::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## ipv4.h: ns3::Ipv4::Ipv4() [constructor] cls.add_constructor([]) - ## ipv4.h: void ns3::Ipv4::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] - cls.add_method('SetRoutingProtocol', - 'void', - [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')], + ## ipv4.h: bool ns3::Ipv4::AddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], is_pure_virtual=True, is_virtual=True) - ## ipv4.h: ns3::Ptr ns3::Ipv4::GetRoutingProtocol() const [member function] - cls.add_method('GetRoutingProtocol', - 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## ipv4.h: uint32_t ns3::Ipv4::AddInterface(ns3::Ptr device) [member function] cls.add_method('AddInterface', 'uint32_t', [param('ns3::Ptr< ns3::NetDevice >', 'device')], is_pure_virtual=True, is_virtual=True) - ## ipv4.h: uint32_t ns3::Ipv4::GetNInterfaces() const [member function] - cls.add_method('GetNInterfaces', - 'uint32_t', - [], + ## ipv4.h: ns3::Ipv4InterfaceAddress ns3::Ipv4::GetAddress(uint32_t interface, uint32_t addressIndex) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_const=True, is_virtual=True) ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForAddress(ns3::Ipv4Address address) const [member function] cls.add_method('GetInterfaceForAddress', 'int32_t', [param('ns3::Ipv4Address', 'address')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForPrefix(ns3::Ipv4Address address, ns3::Ipv4Mask mask) const [member function] - cls.add_method('GetInterfaceForPrefix', - 'int32_t', - [param('ns3::Ipv4Address', 'address'), param('ns3::Ipv4Mask', 'mask')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: ns3::Ptr ns3::Ipv4::GetNetDevice(uint32_t interface) [member function] - cls.add_method('GetNetDevice', - 'ns3::Ptr< ns3::NetDevice >', - [param('uint32_t', 'interface')], - is_pure_virtual=True, is_virtual=True) ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForDevice(ns3::Ptr device) const [member function] cls.add_method('GetInterfaceForDevice', 'int32_t', [param('ns3::Ptr< ns3::NetDevice const >', 'device')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: bool ns3::Ipv4::AddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('AddAddress', - 'bool', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], - is_pure_virtual=True, is_virtual=True) - ## ipv4.h: uint32_t ns3::Ipv4::GetNAddresses(uint32_t interface) const [member function] - cls.add_method('GetNAddresses', - 'uint32_t', - [param('uint32_t', 'interface')], + ## ipv4.h: int32_t ns3::Ipv4::GetInterfaceForPrefix(ns3::Ipv4Address address, ns3::Ipv4Mask mask) const [member function] + cls.add_method('GetInterfaceForPrefix', + 'int32_t', + [param('ns3::Ipv4Address', 'address'), param('ns3::Ipv4Mask', 'mask')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: ns3::Ipv4InterfaceAddress ns3::Ipv4::GetAddress(uint32_t interface, uint32_t addressIndex) const [member function] - cls.add_method('GetAddress', - 'ns3::Ipv4InterfaceAddress', - [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: bool ns3::Ipv4::RemoveAddress(uint32_t interface, uint32_t addressIndex) [member function] - cls.add_method('RemoveAddress', - 'bool', - [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], - is_pure_virtual=True, is_virtual=True) - ## ipv4.h: void ns3::Ipv4::SetMetric(uint32_t interface, uint16_t metric) [member function] - cls.add_method('SetMetric', - 'void', - [param('uint32_t', 'interface'), param('uint16_t', 'metric')], - is_pure_virtual=True, is_virtual=True) ## ipv4.h: uint16_t ns3::Ipv4::GetMetric(uint32_t interface) const [member function] cls.add_method('GetMetric', 'uint16_t', @@ -2671,48 +2798,90 @@ def register_Ns3Ipv4_methods(root_module, cls): 'uint16_t', [param('uint32_t', 'interface')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h: uint32_t ns3::Ipv4::GetNAddresses(uint32_t interface) const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h: uint32_t ns3::Ipv4::GetNInterfaces() const [member function] + cls.add_method('GetNInterfaces', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h: ns3::Ptr ns3::Ipv4::GetNetDevice(uint32_t interface) [member function] + cls.add_method('GetNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h: ns3::Ptr ns3::Ipv4::GetRoutingProtocol() const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h: static ns3::TypeId ns3::Ipv4::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4.h: bool ns3::Ipv4::IsForwarding(uint32_t interface) const [member function] + cls.add_method('IsForwarding', + 'bool', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) ## ipv4.h: bool ns3::Ipv4::IsUp(uint32_t interface) const [member function] cls.add_method('IsUp', 'bool', [param('uint32_t', 'interface')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## ipv4.h: void ns3::Ipv4::SetUp(uint32_t interface) [member function] - cls.add_method('SetUp', - 'void', - [param('uint32_t', 'interface')], + ## ipv4.h: bool ns3::Ipv4::RemoveAddress(uint32_t interface, uint32_t addressIndex) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) ## ipv4.h: void ns3::Ipv4::SetDown(uint32_t interface) [member function] cls.add_method('SetDown', 'void', [param('uint32_t', 'interface')], is_pure_virtual=True, is_virtual=True) - ## ipv4.h: bool ns3::Ipv4::IsForwarding(uint32_t interface) const [member function] - cls.add_method('IsForwarding', - 'bool', - [param('uint32_t', 'interface')], - is_pure_virtual=True, is_const=True, is_virtual=True) ## ipv4.h: void ns3::Ipv4::SetForwarding(uint32_t interface, bool val) [member function] cls.add_method('SetForwarding', 'void', [param('uint32_t', 'interface'), param('bool', 'val')], is_pure_virtual=True, is_virtual=True) - ## ipv4.h: void ns3::Ipv4::SetIpForward(bool forward) [member function] - cls.add_method('SetIpForward', + ## ipv4.h: void ns3::Ipv4::SetMetric(uint32_t interface, uint16_t metric) [member function] + cls.add_method('SetMetric', 'void', - [param('bool', 'forward')], - is_pure_virtual=True, visibility='private', is_virtual=True) + [param('uint32_t', 'interface'), param('uint16_t', 'metric')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h: void ns3::Ipv4::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] + cls.add_method('SetRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h: void ns3::Ipv4::SetUp(uint32_t interface) [member function] + cls.add_method('SetUp', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h: ns3::Ipv4::IF_ANY [variable] + cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True) ## ipv4.h: bool ns3::Ipv4::GetIpForward() const [member function] cls.add_method('GetIpForward', 'bool', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## ipv4.h: void ns3::Ipv4::SetIpForward(bool forward) [member function] + cls.add_method('SetIpForward', + 'void', + [param('bool', 'forward')], + is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls): - ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory::Ipv4RawSocketFactory(ns3::Ipv4RawSocketFactory const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4RawSocketFactory const &', 'arg0')]) ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory::Ipv4RawSocketFactory() [constructor] cls.add_constructor([]) + ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory::Ipv4RawSocketFactory(ns3::Ipv4RawSocketFactory const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4RawSocketFactory const &', 'arg0')]) ## ipv4-raw-socket-factory.h: static ns3::TypeId ns3::Ipv4RawSocketFactory::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', @@ -2721,45 +2890,45 @@ def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls): return def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls): - ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol(ns3::Ipv4RoutingProtocol const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4RoutingProtocol const &', 'arg0')]) ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol() [constructor] cls.add_constructor([]) + ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol(ns3::Ipv4RoutingProtocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4RoutingProtocol const &', 'arg0')]) ## ipv4-routing-protocol.h: static ns3::TypeId ns3::Ipv4RoutingProtocol::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## ipv4-routing-protocol.h: ns3::Ptr ns3::Ipv4RoutingProtocol::RouteOutput(ns3::Ptr 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')], - is_pure_virtual=True, is_virtual=True) - ## ipv4-routing-protocol.h: bool ns3::Ipv4RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], - is_pure_virtual=True, is_virtual=True) - ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceUp', + ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', 'void', - [param('uint32_t', 'interface')], + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], is_pure_virtual=True, is_virtual=True) ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] cls.add_method('NotifyInterfaceDown', 'void', [param('uint32_t', 'interface')], is_pure_virtual=True, is_virtual=True) - ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyAddAddress', + ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + [param('uint32_t', 'interface')], is_pure_virtual=True, is_virtual=True) ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] cls.add_method('NotifyRemoveAddress', 'void', [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h: bool ns3::Ipv4RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h: ns3::Ptr ns3::Ipv4RoutingProtocol::RouteOutput(ns3::Ptr 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')], + is_pure_virtual=True, is_virtual=True) ## ipv4-routing-protocol.h: void ns3::Ipv4RoutingProtocol::SetIpv4(ns3::Ptr ipv4) [member function] cls.add_method('SetIpv4', 'void', @@ -2767,74 +2936,227 @@ def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls): is_pure_virtual=True, is_virtual=True) return -def register_Ns3NetDevice_methods(root_module, cls): - ## net-device.h: ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) - ## net-device.h: ns3::NetDevice::NetDevice() [constructor] +def register_Ns3Ipv6_methods(root_module, cls): + ## ipv6.h: ns3::Ipv6::Ipv6(ns3::Ipv6 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6 const &', 'arg0')]) + ## ipv6.h: ns3::Ipv6::Ipv6() [constructor] cls.add_constructor([]) - ## net-device.h: static ns3::TypeId ns3::NetDevice::GetTypeId() [member function] + ## ipv6.h: bool ns3::Ipv6::AddAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: uint32_t ns3::Ipv6::AddInterface(ns3::Ptr device) [member function] + cls.add_method('AddInterface', + 'uint32_t', + [param('ns3::Ptr< ns3::NetDevice >', 'device')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: ns3::Ipv6InterfaceAddress ns3::Ipv6::GetAddress(uint32_t interface, uint32_t addressIndex) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv6InterfaceAddress', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: int32_t ns3::Ipv6::GetInterfaceForAddress(ns3::Ipv6Address address) const [member function] + cls.add_method('GetInterfaceForAddress', + 'int32_t', + [param('ns3::Ipv6Address', 'address')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: int32_t ns3::Ipv6::GetInterfaceForDevice(ns3::Ptr device) const [member function] + cls.add_method('GetInterfaceForDevice', + 'int32_t', + [param('ns3::Ptr< ns3::NetDevice const >', 'device')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: int32_t ns3::Ipv6::GetInterfaceForPrefix(ns3::Ipv6Address address, ns3::Ipv6Prefix mask) const [member function] + cls.add_method('GetInterfaceForPrefix', + 'int32_t', + [param('ns3::Ipv6Address', 'address'), param('ns3::Ipv6Prefix', 'mask')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: uint16_t ns3::Ipv6::GetMetric(uint32_t interface) const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: uint16_t ns3::Ipv6::GetMtu(uint32_t interface) const [member function] + cls.add_method('GetMtu', + 'uint16_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: uint32_t ns3::Ipv6::GetNAddresses(uint32_t interface) const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: uint32_t ns3::Ipv6::GetNInterfaces() const [member function] + cls.add_method('GetNInterfaces', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: ns3::Ptr ns3::Ipv6::GetNetDevice(uint32_t interface) [member function] + cls.add_method('GetNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: ns3::Ptr ns3::Ipv6::GetRoutingProtocol() const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv6RoutingProtocol >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv6.h: static ns3::TypeId ns3::Ipv6::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## net-device.h: void ns3::NetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_pure_virtual=True, is_virtual=True) - ## net-device.h: uint32_t ns3::NetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', - [], + ## ipv6.h: bool ns3::Ipv6::IsForwarding(uint32_t interface) const [member function] + cls.add_method('IsForwarding', + 'bool', + [param('uint32_t', 'interface')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: ns3::Ptr ns3::NetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], + ## ipv6.h: bool ns3::Ipv6::IsUp(uint32_t interface) const [member function] + cls.add_method('IsUp', + 'bool', + [param('uint32_t', 'interface')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: void ns3::NetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], + ## ipv6.h: bool ns3::Ipv6::RemoveAddress(uint32_t interface, uint32_t addressIndex) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetDown(uint32_t interface) [member function] + cls.add_method('SetDown', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetForwarding(uint32_t interface, bool val) [member function] + cls.add_method('SetForwarding', + 'void', + [param('uint32_t', 'interface'), param('bool', 'val')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetMetric(uint32_t interface, uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint32_t', 'interface'), param('uint16_t', 'metric')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] + cls.add_method('SetRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv6RoutingProtocol >', 'routingProtocol')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetUp(uint32_t interface) [member function] + cls.add_method('SetUp', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6.h: ns3::Ipv6::IF_ANY [variable] + cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True) + ## ipv6.h: bool ns3::Ipv6::GetIpForward() const [member function] + cls.add_method('GetIpForward', + 'bool', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## ipv6.h: void ns3::Ipv6::SetIpForward(bool forward) [member function] + cls.add_method('SetIpForward', + 'void', + [param('bool', 'forward')], + is_pure_virtual=True, visibility='private', is_virtual=True) + return + +def register_Ns3Ipv6RawSocketFactory_methods(root_module, cls): + ## ipv6-raw-socket-factory.h: ns3::Ipv6RawSocketFactory::Ipv6RawSocketFactory() [constructor] + cls.add_constructor([]) + ## ipv6-raw-socket-factory.h: ns3::Ipv6RawSocketFactory::Ipv6RawSocketFactory(ns3::Ipv6RawSocketFactory const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6RawSocketFactory const &', 'arg0')]) + ## ipv6-raw-socket-factory.h: static ns3::TypeId ns3::Ipv6RawSocketFactory::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + return + +def register_Ns3Ipv6RoutingProtocol_methods(root_module, cls): + ## ipv6-routing-protocol.h: ns3::Ipv6RoutingProtocol::Ipv6RoutingProtocol() [constructor] + cls.add_constructor([]) + ## ipv6-routing-protocol.h: ns3::Ipv6RoutingProtocol::Ipv6RoutingProtocol(ns3::Ipv6RoutingProtocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6RoutingProtocol const &', 'arg0')]) + ## ipv6-routing-protocol.h: static ns3::TypeId ns3::Ipv6RoutingProtocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyAddAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyAddRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address::GetZero( )) [member function] + cls.add_method('NotifyAddRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address::GetZero( )')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyRemoveAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::NotifyRemoveRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('NotifyRemoveRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: bool ns3::Ipv6RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: ns3::Ptr ns3::Ipv6RoutingProtocol::RouteOutput(ns3::Ptr p, ns3::Ipv6Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv6Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_pure_virtual=True, is_virtual=True) + ## ipv6-routing-protocol.h: void ns3::Ipv6RoutingProtocol::SetIpv6(ns3::Ptr ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ptr< ns3::Ipv6 >', 'ipv6')], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3NetDevice_methods(root_module, cls): + ## net-device.h: ns3::NetDevice::NetDevice() [constructor] + cls.add_constructor([]) + ## net-device.h: ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] + cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) ## net-device.h: ns3::Address ns3::NetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: bool ns3::NetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_pure_virtual=True, is_virtual=True) - ## net-device.h: uint16_t ns3::NetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: bool ns3::NetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: void ns3::NetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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_pure_virtual=True, is_virtual=True) - ## net-device.h: bool ns3::NetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h: ns3::Address ns3::NetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: bool ns3::NetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', + ## net-device.h: ns3::Ptr ns3::NetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: uint32_t ns3::NetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: uint16_t ns3::NetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] @@ -2847,16 +3169,46 @@ def register_Ns3NetDevice_methods(root_module, cls): 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: ns3::Ptr ns3::NetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: static ns3::TypeId ns3::NetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## net-device.h: bool ns3::NetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: bool ns3::NetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: bool ns3::NetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: bool ns3::NetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h: bool ns3::NetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: bool ns3::NetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h: bool ns3::NetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', @@ -2867,31 +3219,41 @@ def register_Ns3NetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) - ## net-device.h: ns3::Ptr ns3::NetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: void ns3::NetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_pure_virtual=True, is_virtual=True) + ## net-device.h: void ns3::NetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_pure_virtual=True, is_virtual=True) + ## net-device.h: void ns3::NetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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_pure_virtual=True, is_virtual=True) + ## net-device.h: bool ns3::NetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_pure_virtual=True, is_virtual=True) ## net-device.h: void ns3::NetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True) - ## net-device.h: bool ns3::NetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## net-device.h: void ns3::NetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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_pure_virtual=True, is_virtual=True) ## net-device.h: void ns3::NetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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_pure_virtual=True, is_virtual=True) + ## net-device.h: void ns3::NetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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_pure_virtual=True, is_virtual=True) ## net-device.h: bool ns3::NetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', @@ -2902,53 +3264,58 @@ def register_Ns3NetDevice_methods(root_module, cls): def register_Ns3Node_methods(root_module, cls): ## node.h: ns3::Node::Node(ns3::Node const & arg0) [copy constructor] cls.add_constructor([param('ns3::Node const &', 'arg0')]) - ## node.h: static ns3::TypeId ns3::Node::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## node.h: ns3::Node::Node() [constructor] cls.add_constructor([]) ## node.h: ns3::Node::Node(uint32_t systemId) [constructor] cls.add_constructor([param('uint32_t', 'systemId')]) + ## node.h: uint32_t ns3::Node::AddApplication(ns3::Ptr application) [member function] + cls.add_method('AddApplication', + 'uint32_t', + [param('ns3::Ptr< ns3::Application >', 'application')]) + ## node.h: uint32_t ns3::Node::AddDevice(ns3::Ptr device) [member function] + cls.add_method('AddDevice', + 'uint32_t', + [param('ns3::Ptr< ns3::NetDevice >', 'device')]) + ## node.h: static bool ns3::Node::ChecksumEnabled() [member function] + cls.add_method('ChecksumEnabled', + 'bool', + [], + is_static=True) + ## node.h: ns3::Ptr ns3::Node::GetApplication(uint32_t index) const [member function] + cls.add_method('GetApplication', + 'ns3::Ptr< ns3::Application >', + [param('uint32_t', 'index')], + is_const=True) + ## node.h: ns3::Ptr ns3::Node::GetDevice(uint32_t index) const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'index')], + is_const=True) ## node.h: uint32_t ns3::Node::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) + ## node.h: uint32_t ns3::Node::GetNApplications() const [member function] + cls.add_method('GetNApplications', + 'uint32_t', + [], + is_const=True) + ## node.h: uint32_t ns3::Node::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_const=True) ## node.h: uint32_t ns3::Node::GetSystemId() const [member function] cls.add_method('GetSystemId', 'uint32_t', [], is_const=True) - ## node.h: uint32_t ns3::Node::AddDevice(ns3::Ptr device) [member function] - cls.add_method('AddDevice', - 'uint32_t', - [param('ns3::Ptr< ns3::NetDevice >', 'device')]) - ## node.h: ns3::Ptr ns3::Node::GetDevice(uint32_t index) const [member function] - cls.add_method('GetDevice', - 'ns3::Ptr< ns3::NetDevice >', - [param('uint32_t', 'index')], - is_const=True) - ## node.h: uint32_t ns3::Node::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', + ## node.h: static ns3::TypeId ns3::Node::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', [], - is_const=True) - ## node.h: uint32_t ns3::Node::AddApplication(ns3::Ptr application) [member function] - cls.add_method('AddApplication', - 'uint32_t', - [param('ns3::Ptr< ns3::Application >', 'application')]) - ## node.h: ns3::Ptr ns3::Node::GetApplication(uint32_t index) const [member function] - cls.add_method('GetApplication', - 'ns3::Ptr< ns3::Application >', - [param('uint32_t', 'index')], - is_const=True) - ## node.h: uint32_t ns3::Node::GetNApplications() const [member function] - cls.add_method('GetNApplications', - 'uint32_t', - [], - is_const=True) + is_static=True) ## node.h: void ns3::Node::RegisterProtocolHandler(ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler, uint16_t protocolType, ns3::Ptr device, bool promiscuous=false) [member function] cls.add_method('RegisterProtocolHandler', 'void', @@ -2957,11 +3324,6 @@ def register_Ns3Node_methods(root_module, cls): cls.add_method('UnregisterProtocolHandler', 'void', [param('ns3::Callback< void, 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 >', 'handler')]) - ## node.h: static bool ns3::Node::ChecksumEnabled() [member function] - cls.add_method('ChecksumEnabled', - 'bool', - [], - is_static=True) ## node.h: void ns3::Node::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -2977,11 +3339,6 @@ def register_Ns3Node_methods(root_module, cls): def register_Ns3PacketSocketFactory_methods(root_module, cls): ## packet-socket-factory.h: ns3::PacketSocketFactory::PacketSocketFactory(ns3::PacketSocketFactory const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketSocketFactory const &', 'arg0')]) - ## packet-socket-factory.h: static ns3::TypeId ns3::PacketSocketFactory::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## packet-socket-factory.h: ns3::PacketSocketFactory::PacketSocketFactory() [constructor] cls.add_constructor([]) ## packet-socket-factory.h: ns3::Ptr ns3::PacketSocketFactory::CreateSocket() [member function] @@ -2989,114 +3346,71 @@ def register_Ns3PacketSocketFactory_methods(root_module, cls): 'ns3::Ptr< ns3::Socket >', [], is_virtual=True) + ## packet-socket-factory.h: static ns3::TypeId ns3::PacketSocketFactory::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3SimpleChannel_methods(root_module, cls): ## simple-channel.h: ns3::SimpleChannel::SimpleChannel(ns3::SimpleChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::SimpleChannel const &', 'arg0')]) - ## simple-channel.h: static ns3::TypeId ns3::SimpleChannel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## simple-channel.h: ns3::SimpleChannel::SimpleChannel() [constructor] cls.add_constructor([]) - ## simple-channel.h: void ns3::SimpleChannel::Send(ns3::Ptr p, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from, ns3::Ptr sender) [member function] - cls.add_method('Send', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')]) ## simple-channel.h: void ns3::SimpleChannel::Add(ns3::Ptr device) [member function] cls.add_method('Add', 'void', [param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')]) - ## simple-channel.h: uint32_t ns3::SimpleChannel::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## simple-channel.h: ns3::Ptr ns3::SimpleChannel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, is_virtual=True) + ## simple-channel.h: uint32_t ns3::SimpleChannel::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## simple-channel.h: static ns3::TypeId ns3::SimpleChannel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## simple-channel.h: void ns3::SimpleChannel::Send(ns3::Ptr p, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from, ns3::Ptr sender) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')]) return def register_Ns3SimpleNetDevice_methods(root_module, cls): ## simple-net-device.h: ns3::SimpleNetDevice::SimpleNetDevice(ns3::SimpleNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::SimpleNetDevice const &', 'arg0')]) - ## simple-net-device.h: static ns3::TypeId ns3::SimpleNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## simple-net-device.h: ns3::SimpleNetDevice::SimpleNetDevice() [constructor] cls.add_constructor([]) - ## simple-net-device.h: void ns3::SimpleNetDevice::Receive(ns3::Ptr packet, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from) [member function] - cls.add_method('Receive', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')]) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetChannel(ns3::Ptr channel) [member function] - cls.add_method('SetChannel', - 'void', - [param('ns3::Ptr< ns3::SimpleChannel >', 'channel')]) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## simple-net-device.h: uint32_t ns3::SimpleNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## simple-net-device.h: ns3::Ptr ns3::SimpleNetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], - is_const=True, is_virtual=True) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) - ## simple-net-device.h: bool ns3::SimpleNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) - ## simple-net-device.h: uint16_t ns3::SimpleNetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', - [], - is_const=True, is_virtual=True) - ## simple-net-device.h: bool ns3::SimpleNetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## simple-net-device.h: bool ns3::SimpleNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) - ## simple-net-device.h: bool ns3::SimpleNetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', + ## simple-net-device.h: ns3::Ptr ns3::SimpleNetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: uint32_t ns3::SimpleNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: uint16_t ns3::SimpleNetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', [], is_const=True, is_virtual=True) ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] @@ -3104,16 +3418,55 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls): 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) - ## simple-net-device.h: bool ns3::SimpleNetDevice::IsPointToPoint() const [member function] - cls.add_method('IsPointToPoint', - 'bool', + ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv6Address', 'addr')], + is_const=True, is_virtual=True) + ## simple-net-device.h: ns3::Ptr ns3::SimpleNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) + ## simple-net-device.h: static ns3::TypeId ns3::SimpleNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## simple-net-device.h: bool ns3::SimpleNetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_const=True, is_virtual=True) + ## simple-net-device.h: bool ns3::SimpleNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: bool ns3::SimpleNetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: bool ns3::SimpleNetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: bool ns3::SimpleNetDevice::IsPointToPoint() const [member function] + cls.add_method('IsPointToPoint', + 'bool', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: bool ns3::SimpleNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', + 'bool', + [], + is_const=True, is_virtual=True) + ## simple-net-device.h: void ns3::SimpleNetDevice::Receive(ns3::Ptr packet, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from) [member function] + cls.add_method('Receive', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from')]) ## simple-net-device.h: bool ns3::SimpleNetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', @@ -3124,36 +3477,45 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## simple-net-device.h: ns3::Ptr ns3::SimpleNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetChannel(ns3::Ptr channel) [member function] + cls.add_method('SetChannel', + 'void', + [param('ns3::Ptr< ns3::SimpleChannel >', 'channel')]) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## simple-net-device.h: bool ns3::SimpleNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) ## simple-net-device.h: void ns3::SimpleNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## simple-net-device.h: bool ns3::SimpleNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) - ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv6Address', 'addr')], - is_const=True, is_virtual=True) ## simple-net-device.h: void ns3::SimpleNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## simple-net-device.h: bool ns3::SimpleNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', diff --git a/bindings/python/ns3_module_olsr.py b/bindings/python/ns3_module_olsr.py index a2c1ff949..980809452 100644 --- a/bindings/python/ns3_module_olsr.py +++ b/bindings/python/ns3_module_olsr.py @@ -102,14 +102,32 @@ def register_types_ns3_olsr(module): module.add_container('std::vector< ns3::olsr::MessageHeader::Hello::LinkMessage >', 'ns3::olsr::MessageHeader::Hello::LinkMessage', container_type='vector') module.add_container('std::vector< ns3::olsr::MessageHeader::Hna::Association >', 'ns3::olsr::MessageHeader::Hna::Association', container_type='vector') typehandlers.add_type_alias('std::vector< ns3::olsr::DuplicateTuple, std::allocator< ns3::olsr::DuplicateTuple > >', 'ns3::olsr::DuplicateSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::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::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::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&') def register_methods(root_module): register_Ns3OlsrState_methods(root_module, root_module['ns3::OlsrState']) @@ -137,15 +155,18 @@ def register_Ns3OlsrState_methods(root_module, cls): cls.add_constructor([param('ns3::OlsrState const &', 'arg0')]) ## olsr-state.h: ns3::OlsrState::OlsrState() [constructor] cls.add_constructor([]) - ## olsr-state.h: ns3::olsr::MprSelectorSet const & ns3::OlsrState::GetMprSelectors() const [member function] - cls.add_method('GetMprSelectors', - 'ns3::olsr::MprSelectorSet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::MprSelectorTuple * ns3::OlsrState::FindMprSelectorTuple(ns3::Ipv4Address const & mainAddr) [member function] - cls.add_method('FindMprSelectorTuple', - 'ns3::olsr::MprSelectorTuple *', - [param('ns3::Ipv4Address const &', 'mainAddr')]) + ## olsr-state.h: void ns3::OlsrState::EraseDuplicateTuple(ns3::olsr::DuplicateTuple const & tuple) [member function] + cls.add_method('EraseDuplicateTuple', + 'void', + [param('ns3::olsr::DuplicateTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::EraseIfaceAssocTuple(ns3::olsr::IfaceAssocTuple const & tuple) [member function] + cls.add_method('EraseIfaceAssocTuple', + 'void', + [param('ns3::olsr::IfaceAssocTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::EraseLinkTuple(ns3::olsr::LinkTuple const & tuple) [member function] + cls.add_method('EraseLinkTuple', + 'void', + [param('ns3::olsr::LinkTuple const &', 'tuple')]) ## olsr-state.h: void ns3::OlsrState::EraseMprSelectorTuple(ns3::olsr::MprSelectorTuple const & tuple) [member function] cls.add_method('EraseMprSelectorTuple', 'void', @@ -154,37 +175,6 @@ def register_Ns3OlsrState_methods(root_module, cls): cls.add_method('EraseMprSelectorTuples', 'void', [param('ns3::Ipv4Address const &', 'mainAddr')]) - ## olsr-state.h: void ns3::OlsrState::InsertMprSelectorTuple(ns3::olsr::MprSelectorTuple const & tuple) [member function] - cls.add_method('InsertMprSelectorTuple', - 'void', - [param('ns3::olsr::MprSelectorTuple const &', 'tuple')]) - ## olsr-state.h: std::string ns3::OlsrState::PrintMprSelectorSet() const [member function] - cls.add_method('PrintMprSelectorSet', - 'std::string', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::NeighborSet const & ns3::OlsrState::GetNeighbors() const [member function] - cls.add_method('GetNeighbors', - 'ns3::olsr::NeighborSet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::NeighborSet & ns3::OlsrState::GetNeighbors() [member function] - cls.add_method('GetNeighbors', - 'ns3::olsr::NeighborSet &', - []) - ## olsr-state.h: ns3::olsr::NeighborTuple * ns3::OlsrState::FindNeighborTuple(ns3::Ipv4Address const & mainAddr) [member function] - cls.add_method('FindNeighborTuple', - 'ns3::olsr::NeighborTuple *', - [param('ns3::Ipv4Address const &', 'mainAddr')]) - ## olsr-state.h: ns3::olsr::NeighborTuple const * ns3::OlsrState::FindSymNeighborTuple(ns3::Ipv4Address const & mainAddr) const [member function] - cls.add_method('FindSymNeighborTuple', - 'ns3::olsr::NeighborTuple const *', - [param('ns3::Ipv4Address const &', 'mainAddr')], - is_const=True) - ## olsr-state.h: ns3::olsr::NeighborTuple * ns3::OlsrState::FindNeighborTuple(ns3::Ipv4Address const & mainAddr, uint8_t willingness) [member function] - cls.add_method('FindNeighborTuple', - 'ns3::olsr::NeighborTuple *', - [param('ns3::Ipv4Address const &', 'mainAddr'), param('uint8_t', 'willingness')]) ## olsr-state.h: void ns3::OlsrState::EraseNeighborTuple(ns3::olsr::NeighborTuple const & neighborTuple) [member function] cls.add_method('EraseNeighborTuple', 'void', @@ -193,23 +183,14 @@ def register_Ns3OlsrState_methods(root_module, cls): cls.add_method('EraseNeighborTuple', 'void', [param('ns3::Ipv4Address const &', 'mainAddr')]) - ## olsr-state.h: void ns3::OlsrState::InsertNeighborTuple(ns3::olsr::NeighborTuple const & tuple) [member function] - cls.add_method('InsertNeighborTuple', + ## olsr-state.h: void ns3::OlsrState::EraseOlderTopologyTuples(ns3::Ipv4Address const & lastAddr, uint16_t ansn) [member function] + cls.add_method('EraseOlderTopologyTuples', 'void', - [param('ns3::olsr::NeighborTuple const &', 'tuple')]) - ## olsr-state.h: ns3::olsr::TwoHopNeighborSet const & ns3::OlsrState::GetTwoHopNeighbors() const [member function] - cls.add_method('GetTwoHopNeighbors', - 'ns3::olsr::TwoHopNeighborSet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::TwoHopNeighborSet & ns3::OlsrState::GetTwoHopNeighbors() [member function] - cls.add_method('GetTwoHopNeighbors', - 'ns3::olsr::TwoHopNeighborSet &', - []) - ## olsr-state.h: ns3::olsr::TwoHopNeighborTuple * ns3::OlsrState::FindTwoHopNeighborTuple(ns3::Ipv4Address const & neighbor, ns3::Ipv4Address const & twoHopNeighbor) [member function] - cls.add_method('FindTwoHopNeighborTuple', - 'ns3::olsr::TwoHopNeighborTuple *', - [param('ns3::Ipv4Address const &', 'neighbor'), param('ns3::Ipv4Address const &', 'twoHopNeighbor')]) + [param('ns3::Ipv4Address const &', 'lastAddr'), param('uint16_t', 'ansn')]) + ## olsr-state.h: void ns3::OlsrState::EraseTopologyTuple(ns3::olsr::TopologyTuple const & tuple) [member function] + cls.add_method('EraseTopologyTuple', + 'void', + [param('ns3::olsr::TopologyTuple const &', 'tuple')]) ## olsr-state.h: void ns3::OlsrState::EraseTwoHopNeighborTuple(ns3::olsr::TwoHopNeighborTuple const & tuple) [member function] cls.add_method('EraseTwoHopNeighborTuple', 'void', @@ -222,85 +203,10 @@ def register_Ns3OlsrState_methods(root_module, cls): cls.add_method('EraseTwoHopNeighborTuples', 'void', [param('ns3::Ipv4Address const &', 'neighbor'), param('ns3::Ipv4Address const &', 'twoHopNeighbor')]) - ## olsr-state.h: void ns3::OlsrState::InsertTwoHopNeighborTuple(ns3::olsr::TwoHopNeighborTuple const & tuple) [member function] - cls.add_method('InsertTwoHopNeighborTuple', - 'void', - [param('ns3::olsr::TwoHopNeighborTuple const &', 'tuple')]) - ## olsr-state.h: bool ns3::OlsrState::FindMprAddress(ns3::Ipv4Address const & address) [member function] - cls.add_method('FindMprAddress', - 'bool', - [param('ns3::Ipv4Address const &', 'address')]) - ## olsr-state.h: void ns3::OlsrState::SetMprSet(ns3::olsr::MprSet mprSet) [member function] - cls.add_method('SetMprSet', - 'void', - [param('ns3::olsr::MprSet', 'mprSet')]) ## olsr-state.h: ns3::olsr::DuplicateTuple * ns3::OlsrState::FindDuplicateTuple(ns3::Ipv4Address const & address, uint16_t sequenceNumber) [member function] cls.add_method('FindDuplicateTuple', 'ns3::olsr::DuplicateTuple *', [param('ns3::Ipv4Address const &', 'address'), param('uint16_t', 'sequenceNumber')]) - ## olsr-state.h: void ns3::OlsrState::EraseDuplicateTuple(ns3::olsr::DuplicateTuple const & tuple) [member function] - cls.add_method('EraseDuplicateTuple', - 'void', - [param('ns3::olsr::DuplicateTuple const &', 'tuple')]) - ## olsr-state.h: void ns3::OlsrState::InsertDuplicateTuple(ns3::olsr::DuplicateTuple const & tuple) [member function] - cls.add_method('InsertDuplicateTuple', - 'void', - [param('ns3::olsr::DuplicateTuple const &', 'tuple')]) - ## olsr-state.h: ns3::olsr::LinkSet const & ns3::OlsrState::GetLinks() const [member function] - cls.add_method('GetLinks', - 'ns3::olsr::LinkSet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::LinkTuple * ns3::OlsrState::FindLinkTuple(ns3::Ipv4Address const & ifaceAddr) [member function] - cls.add_method('FindLinkTuple', - 'ns3::olsr::LinkTuple *', - [param('ns3::Ipv4Address const &', 'ifaceAddr')]) - ## olsr-state.h: ns3::olsr::LinkTuple * ns3::OlsrState::FindSymLinkTuple(ns3::Ipv4Address const & ifaceAddr, ns3::Time time) [member function] - cls.add_method('FindSymLinkTuple', - 'ns3::olsr::LinkTuple *', - [param('ns3::Ipv4Address const &', 'ifaceAddr'), param('ns3::Time', 'time')]) - ## olsr-state.h: void ns3::OlsrState::EraseLinkTuple(ns3::olsr::LinkTuple const & tuple) [member function] - cls.add_method('EraseLinkTuple', - 'void', - [param('ns3::olsr::LinkTuple const &', 'tuple')]) - ## olsr-state.h: ns3::olsr::LinkTuple & ns3::OlsrState::InsertLinkTuple(ns3::olsr::LinkTuple const & tuple) [member function] - cls.add_method('InsertLinkTuple', - 'ns3::olsr::LinkTuple &', - [param('ns3::olsr::LinkTuple const &', 'tuple')]) - ## olsr-state.h: ns3::olsr::TopologySet const & ns3::OlsrState::GetTopologySet() const [member function] - cls.add_method('GetTopologySet', - 'ns3::olsr::TopologySet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::TopologyTuple * ns3::OlsrState::FindTopologyTuple(ns3::Ipv4Address const & destAddr, ns3::Ipv4Address const & lastAddr) [member function] - cls.add_method('FindTopologyTuple', - 'ns3::olsr::TopologyTuple *', - [param('ns3::Ipv4Address const &', 'destAddr'), param('ns3::Ipv4Address const &', 'lastAddr')]) - ## olsr-state.h: ns3::olsr::TopologyTuple * ns3::OlsrState::FindNewerTopologyTuple(ns3::Ipv4Address const & lastAddr, uint16_t ansn) [member function] - cls.add_method('FindNewerTopologyTuple', - 'ns3::olsr::TopologyTuple *', - [param('ns3::Ipv4Address const &', 'lastAddr'), param('uint16_t', 'ansn')]) - ## olsr-state.h: void ns3::OlsrState::EraseTopologyTuple(ns3::olsr::TopologyTuple const & tuple) [member function] - cls.add_method('EraseTopologyTuple', - 'void', - [param('ns3::olsr::TopologyTuple const &', 'tuple')]) - ## olsr-state.h: void ns3::OlsrState::EraseOlderTopologyTuples(ns3::Ipv4Address const & lastAddr, uint16_t ansn) [member function] - cls.add_method('EraseOlderTopologyTuples', - 'void', - [param('ns3::Ipv4Address const &', 'lastAddr'), param('uint16_t', 'ansn')]) - ## olsr-state.h: void ns3::OlsrState::InsertTopologyTuple(ns3::olsr::TopologyTuple const & tuple) [member function] - cls.add_method('InsertTopologyTuple', - 'void', - [param('ns3::olsr::TopologyTuple const &', 'tuple')]) - ## olsr-state.h: ns3::olsr::IfaceAssocSet const & ns3::OlsrState::GetIfaceAssocSet() const [member function] - cls.add_method('GetIfaceAssocSet', - 'ns3::olsr::IfaceAssocSet const &', - [], - is_const=True) - ## olsr-state.h: ns3::olsr::IfaceAssocSet & ns3::OlsrState::GetIfaceAssocSetMutable() [member function] - cls.add_method('GetIfaceAssocSetMutable', - 'ns3::olsr::IfaceAssocSet &', - []) ## olsr-state.h: ns3::olsr::IfaceAssocTuple * ns3::OlsrState::FindIfaceAssocTuple(ns3::Ipv4Address const & ifaceAddr) [member function] cls.add_method('FindIfaceAssocTuple', 'ns3::olsr::IfaceAssocTuple *', @@ -310,19 +216,131 @@ def register_Ns3OlsrState_methods(root_module, cls): 'ns3::olsr::IfaceAssocTuple const *', [param('ns3::Ipv4Address const &', 'ifaceAddr')], is_const=True) - ## olsr-state.h: void ns3::OlsrState::EraseIfaceAssocTuple(ns3::olsr::IfaceAssocTuple const & tuple) [member function] - cls.add_method('EraseIfaceAssocTuple', - 'void', - [param('ns3::olsr::IfaceAssocTuple const &', 'tuple')]) - ## olsr-state.h: void ns3::OlsrState::InsertIfaceAssocTuple(ns3::olsr::IfaceAssocTuple const & tuple) [member function] - cls.add_method('InsertIfaceAssocTuple', - 'void', - [param('ns3::olsr::IfaceAssocTuple const &', 'tuple')]) + ## olsr-state.h: ns3::olsr::LinkTuple * ns3::OlsrState::FindLinkTuple(ns3::Ipv4Address const & ifaceAddr) [member function] + cls.add_method('FindLinkTuple', + 'ns3::olsr::LinkTuple *', + [param('ns3::Ipv4Address const &', 'ifaceAddr')]) + ## olsr-state.h: bool ns3::OlsrState::FindMprAddress(ns3::Ipv4Address const & address) [member function] + cls.add_method('FindMprAddress', + 'bool', + [param('ns3::Ipv4Address const &', 'address')]) + ## olsr-state.h: ns3::olsr::MprSelectorTuple * ns3::OlsrState::FindMprSelectorTuple(ns3::Ipv4Address const & mainAddr) [member function] + cls.add_method('FindMprSelectorTuple', + 'ns3::olsr::MprSelectorTuple *', + [param('ns3::Ipv4Address const &', 'mainAddr')]) ## olsr-state.h: std::vector > ns3::OlsrState::FindNeighborInterfaces(ns3::Ipv4Address const & neighborMainAddr) const [member function] cls.add_method('FindNeighborInterfaces', 'std::vector< ns3::Ipv4Address >', [param('ns3::Ipv4Address const &', 'neighborMainAddr')], is_const=True) + ## olsr-state.h: ns3::olsr::NeighborTuple * ns3::OlsrState::FindNeighborTuple(ns3::Ipv4Address const & mainAddr) [member function] + cls.add_method('FindNeighborTuple', + 'ns3::olsr::NeighborTuple *', + [param('ns3::Ipv4Address const &', 'mainAddr')]) + ## olsr-state.h: ns3::olsr::NeighborTuple * ns3::OlsrState::FindNeighborTuple(ns3::Ipv4Address const & mainAddr, uint8_t willingness) [member function] + cls.add_method('FindNeighborTuple', + 'ns3::olsr::NeighborTuple *', + [param('ns3::Ipv4Address const &', 'mainAddr'), param('uint8_t', 'willingness')]) + ## olsr-state.h: ns3::olsr::TopologyTuple * ns3::OlsrState::FindNewerTopologyTuple(ns3::Ipv4Address const & lastAddr, uint16_t ansn) [member function] + cls.add_method('FindNewerTopologyTuple', + 'ns3::olsr::TopologyTuple *', + [param('ns3::Ipv4Address const &', 'lastAddr'), param('uint16_t', 'ansn')]) + ## olsr-state.h: ns3::olsr::LinkTuple * ns3::OlsrState::FindSymLinkTuple(ns3::Ipv4Address const & ifaceAddr, ns3::Time time) [member function] + cls.add_method('FindSymLinkTuple', + 'ns3::olsr::LinkTuple *', + [param('ns3::Ipv4Address const &', 'ifaceAddr'), param('ns3::Time', 'time')]) + ## olsr-state.h: ns3::olsr::NeighborTuple const * ns3::OlsrState::FindSymNeighborTuple(ns3::Ipv4Address const & mainAddr) const [member function] + cls.add_method('FindSymNeighborTuple', + 'ns3::olsr::NeighborTuple const *', + [param('ns3::Ipv4Address const &', 'mainAddr')], + is_const=True) + ## olsr-state.h: ns3::olsr::TopologyTuple * ns3::OlsrState::FindTopologyTuple(ns3::Ipv4Address const & destAddr, ns3::Ipv4Address const & lastAddr) [member function] + cls.add_method('FindTopologyTuple', + 'ns3::olsr::TopologyTuple *', + [param('ns3::Ipv4Address const &', 'destAddr'), param('ns3::Ipv4Address const &', 'lastAddr')]) + ## olsr-state.h: ns3::olsr::TwoHopNeighborTuple * ns3::OlsrState::FindTwoHopNeighborTuple(ns3::Ipv4Address const & neighbor, ns3::Ipv4Address const & twoHopNeighbor) [member function] + cls.add_method('FindTwoHopNeighborTuple', + 'ns3::olsr::TwoHopNeighborTuple *', + [param('ns3::Ipv4Address const &', 'neighbor'), param('ns3::Ipv4Address const &', 'twoHopNeighbor')]) + ## olsr-state.h: ns3::olsr::IfaceAssocSet const & ns3::OlsrState::GetIfaceAssocSet() const [member function] + cls.add_method('GetIfaceAssocSet', + 'ns3::olsr::IfaceAssocSet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::IfaceAssocSet & ns3::OlsrState::GetIfaceAssocSetMutable() [member function] + cls.add_method('GetIfaceAssocSetMutable', + 'ns3::olsr::IfaceAssocSet &', + []) + ## olsr-state.h: ns3::olsr::LinkSet const & ns3::OlsrState::GetLinks() const [member function] + cls.add_method('GetLinks', + 'ns3::olsr::LinkSet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::MprSelectorSet const & ns3::OlsrState::GetMprSelectors() const [member function] + cls.add_method('GetMprSelectors', + 'ns3::olsr::MprSelectorSet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::NeighborSet const & ns3::OlsrState::GetNeighbors() const [member function] + cls.add_method('GetNeighbors', + 'ns3::olsr::NeighborSet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::NeighborSet & ns3::OlsrState::GetNeighbors() [member function] + cls.add_method('GetNeighbors', + 'ns3::olsr::NeighborSet &', + []) + ## olsr-state.h: ns3::olsr::TopologySet const & ns3::OlsrState::GetTopologySet() const [member function] + cls.add_method('GetTopologySet', + 'ns3::olsr::TopologySet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::TwoHopNeighborSet const & ns3::OlsrState::GetTwoHopNeighbors() const [member function] + cls.add_method('GetTwoHopNeighbors', + 'ns3::olsr::TwoHopNeighborSet const &', + [], + is_const=True) + ## olsr-state.h: ns3::olsr::TwoHopNeighborSet & ns3::OlsrState::GetTwoHopNeighbors() [member function] + cls.add_method('GetTwoHopNeighbors', + 'ns3::olsr::TwoHopNeighborSet &', + []) + ## olsr-state.h: void ns3::OlsrState::InsertDuplicateTuple(ns3::olsr::DuplicateTuple const & tuple) [member function] + cls.add_method('InsertDuplicateTuple', + 'void', + [param('ns3::olsr::DuplicateTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::InsertIfaceAssocTuple(ns3::olsr::IfaceAssocTuple const & tuple) [member function] + cls.add_method('InsertIfaceAssocTuple', + 'void', + [param('ns3::olsr::IfaceAssocTuple const &', 'tuple')]) + ## olsr-state.h: ns3::olsr::LinkTuple & ns3::OlsrState::InsertLinkTuple(ns3::olsr::LinkTuple const & tuple) [member function] + cls.add_method('InsertLinkTuple', + 'ns3::olsr::LinkTuple &', + [param('ns3::olsr::LinkTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::InsertMprSelectorTuple(ns3::olsr::MprSelectorTuple const & tuple) [member function] + cls.add_method('InsertMprSelectorTuple', + 'void', + [param('ns3::olsr::MprSelectorTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::InsertNeighborTuple(ns3::olsr::NeighborTuple const & tuple) [member function] + cls.add_method('InsertNeighborTuple', + 'void', + [param('ns3::olsr::NeighborTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::InsertTopologyTuple(ns3::olsr::TopologyTuple const & tuple) [member function] + cls.add_method('InsertTopologyTuple', + 'void', + [param('ns3::olsr::TopologyTuple const &', 'tuple')]) + ## olsr-state.h: void ns3::OlsrState::InsertTwoHopNeighborTuple(ns3::olsr::TwoHopNeighborTuple const & tuple) [member function] + cls.add_method('InsertTwoHopNeighborTuple', + 'void', + [param('ns3::olsr::TwoHopNeighborTuple const &', 'tuple')]) + ## olsr-state.h: std::string ns3::OlsrState::PrintMprSelectorSet() const [member function] + cls.add_method('PrintMprSelectorSet', + 'std::string', + [], + is_const=True) + ## olsr-state.h: void ns3::OlsrState::SetMprSet(ns3::olsr::MprSet mprSet) [member function] + cls.add_method('SetMprSet', + 'void', + [param('ns3::olsr::MprSet', 'mprSet')]) return def register_Ns3OlsrDuplicateTuple_methods(root_module, cls): @@ -547,14 +565,14 @@ def register_Ns3OlsrMessageHeaderHello_methods(root_module, cls): return def register_Ns3OlsrMessageHeaderHelloLinkMessage_methods(root_module, cls): + ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::LinkMessage() [constructor] + cls.add_constructor([]) + ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::LinkMessage(ns3::olsr::MessageHeader::Hello::LinkMessage const & arg0) [copy constructor] + cls.add_constructor([param('ns3::olsr::MessageHeader::Hello::LinkMessage const &', 'arg0')]) ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::linkCode [variable] cls.add_instance_attribute('linkCode', 'uint8_t', is_const=False) ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::neighborInterfaceAddresses [variable] cls.add_instance_attribute('neighborInterfaceAddresses', 'std::vector< ns3::Ipv4Address >', is_const=False) - ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::LinkMessage(ns3::olsr::MessageHeader::Hello::LinkMessage const & arg0) [copy constructor] - cls.add_constructor([param('ns3::olsr::MessageHeader::Hello::LinkMessage const &', 'arg0')]) - ## olsr-header.h: ns3::olsr::MessageHeader::Hello::LinkMessage::LinkMessage() [constructor] - cls.add_constructor([]) return def register_Ns3OlsrMessageHeaderHna_methods(root_module, cls): @@ -586,14 +604,14 @@ def register_Ns3OlsrMessageHeaderHna_methods(root_module, cls): return def register_Ns3OlsrMessageHeaderHnaAssociation_methods(root_module, cls): + ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::Association() [constructor] + cls.add_constructor([]) + ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::Association(ns3::olsr::MessageHeader::Hna::Association const & arg0) [copy constructor] + cls.add_constructor([param('ns3::olsr::MessageHeader::Hna::Association const &', 'arg0')]) ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::address [variable] cls.add_instance_attribute('address', 'ns3::Ipv4Address', is_const=False) ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::mask [variable] cls.add_instance_attribute('mask', 'ns3::Ipv4Mask', is_const=False) - ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::Association(ns3::olsr::MessageHeader::Hna::Association const & arg0) [copy constructor] - cls.add_constructor([param('ns3::olsr::MessageHeader::Hna::Association const &', 'arg0')]) - ## olsr-header.h: ns3::olsr::MessageHeader::Hna::Association::Association() [constructor] - cls.add_constructor([]) return def register_Ns3OlsrMessageHeaderMid_methods(root_module, cls): @@ -740,72 +758,72 @@ def register_Ns3OlsrPacketHeader_methods(root_module, cls): def register_Ns3OlsrRoutingProtocol_methods(root_module, cls): ## olsr-routing-protocol.h: ns3::olsr::RoutingProtocol::RoutingProtocol(ns3::olsr::RoutingProtocol const & arg0) [copy constructor] cls.add_constructor([param('ns3::olsr::RoutingProtocol const &', 'arg0')]) + ## olsr-routing-protocol.h: ns3::olsr::RoutingProtocol::RoutingProtocol() [constructor] + cls.add_constructor([]) ## olsr-routing-protocol.h: static ns3::TypeId ns3::olsr::RoutingProtocol::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## olsr-routing-protocol.h: ns3::olsr::RoutingProtocol::RoutingProtocol() [constructor] - cls.add_constructor([]) ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::SetMainInterface(uint32_t interface) [member function] cls.add_method('SetMainInterface', 'void', [param('uint32_t', 'interface')]) - ## olsr-routing-protocol.h: ns3::Ptr ns3::olsr::RoutingProtocol::RouteOutput(ns3::Ptr 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) - ## olsr-routing-protocol.h: bool ns3::olsr::RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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) - ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceUp', + ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::DoDispose() [member function] + cls.add_method('DoDispose', 'void', - [param('uint32_t', 'interface')], - visibility='private', is_virtual=True) - ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceDown', - 'void', - [param('uint32_t', 'interface')], + [], visibility='private', is_virtual=True) ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::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) + ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + visibility='private', is_virtual=True) + ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + visibility='private', is_virtual=True) ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::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) + ## olsr-routing-protocol.h: bool ns3::olsr::RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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) + ## olsr-routing-protocol.h: ns3::Ptr ns3::olsr::RoutingProtocol::RouteOutput(ns3::Ptr 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) ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::SetIpv4(ns3::Ptr ipv4) [member function] cls.add_method('SetIpv4', 'void', [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], visibility='private', is_virtual=True) - ## olsr-routing-protocol.h: void ns3::olsr::RoutingProtocol::DoDispose() [member function] - cls.add_method('DoDispose', - 'void', - [], - visibility='private', is_virtual=True) return def register_Ns3OlsrRoutingTableEntry_methods(root_module, cls): - ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::destAddr [variable] - cls.add_instance_attribute('destAddr', 'ns3::Ipv4Address', is_const=False) - ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::nextAddr [variable] - cls.add_instance_attribute('nextAddr', 'ns3::Ipv4Address', is_const=False) - ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::interface [variable] - cls.add_instance_attribute('interface', 'uint32_t', is_const=False) - ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::distance [variable] - cls.add_instance_attribute('distance', 'uint32_t', is_const=False) ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::RoutingTableEntry(ns3::olsr::RoutingTableEntry const & arg0) [copy constructor] cls.add_constructor([param('ns3::olsr::RoutingTableEntry const &', 'arg0')]) ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::RoutingTableEntry() [constructor] cls.add_constructor([]) + ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::destAddr [variable] + cls.add_instance_attribute('destAddr', 'ns3::Ipv4Address', is_const=False) + ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::distance [variable] + cls.add_instance_attribute('distance', 'uint32_t', is_const=False) + ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::interface [variable] + cls.add_instance_attribute('interface', 'uint32_t', is_const=False) + ## olsr-routing-protocol.h: ns3::olsr::RoutingTableEntry::nextAddr [variable] + cls.add_instance_attribute('nextAddr', 'ns3::Ipv4Address', is_const=False) return def register_Ns3OlsrTopologyTuple_methods(root_module, cls): diff --git a/bindings/python/ns3_module_onoff.py b/bindings/python/ns3_module_onoff.py index 2701eb149..3afe4c317 100644 --- a/bindings/python/ns3_module_onoff.py +++ b/bindings/python/ns3_module_onoff.py @@ -63,13 +63,13 @@ def register_methods(root_module): def register_Ns3OnOffApplication_methods(root_module, cls): ## onoff-application.h: ns3::OnOffApplication::OnOffApplication(ns3::OnOffApplication const & arg0) [copy constructor] cls.add_constructor([param('ns3::OnOffApplication const &', 'arg0')]) + ## onoff-application.h: ns3::OnOffApplication::OnOffApplication() [constructor] + cls.add_constructor([]) ## onoff-application.h: static ns3::TypeId ns3::OnOffApplication::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## onoff-application.h: ns3::OnOffApplication::OnOffApplication() [constructor] - cls.add_constructor([]) ## onoff-application.h: void ns3::OnOffApplication::SetMaxBytes(uint32_t maxBytes) [member function] cls.add_method('SetMaxBytes', 'void', diff --git a/bindings/python/ns3_module_packet_sink.py b/bindings/python/ns3_module_packet_sink.py index 0f2935c9b..63087a766 100644 --- a/bindings/python/ns3_module_packet_sink.py +++ b/bindings/python/ns3_module_packet_sink.py @@ -63,13 +63,13 @@ def register_methods(root_module): def register_Ns3PacketSink_methods(root_module, cls): ## packet-sink.h: ns3::PacketSink::PacketSink(ns3::PacketSink const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketSink const &', 'arg0')]) + ## packet-sink.h: ns3::PacketSink::PacketSink() [constructor] + cls.add_constructor([]) ## packet-sink.h: static ns3::TypeId ns3::PacketSink::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## packet-sink.h: ns3::PacketSink::PacketSink() [constructor] - cls.add_constructor([]) ## packet-sink.h: void ns3::PacketSink::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_ping6.py b/bindings/python/ns3_module_ping6.py new file mode 100644 index 000000000..cf5bf3347 --- /dev/null +++ b/bindings/python/ns3_module_ping6.py @@ -0,0 +1,125 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## ping6.h: ns3::Ping6 [class] + module.add_class('Ping6', parent=root_module['ns3::Application']) + + ## 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 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_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3Ping6_methods(root_module, root_module['ns3::Ping6']) + return + +def register_Ns3Ping6_methods(root_module, cls): + ## ping6.h: ns3::Ping6::Ping6(ns3::Ping6 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ping6 const &', 'arg0')]) + ## ping6.h: ns3::Ping6::Ping6() [constructor] + cls.add_constructor([]) + ## ping6.h: static ns3::TypeId ns3::Ping6::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ping6.h: void ns3::Ping6::SetIfIndex(uint32_t ifIndex) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t', 'ifIndex')]) + ## ping6.h: void ns3::Ping6::SetLocal(ns3::Ipv6Address ipv6) [member function] + cls.add_method('SetLocal', + 'void', + [param('ns3::Ipv6Address', 'ipv6')]) + ## ping6.h: void ns3::Ping6::SetRemote(ns3::Ipv6Address ipv6) [member function] + cls.add_method('SetRemote', + 'void', + [param('ns3::Ipv6Address', 'ipv6')]) + ## ping6.h: void ns3::Ping6::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## ping6.h: void ns3::Ping6::StartApplication() [member function] + cls.add_method('StartApplication', + 'void', + [], + visibility='private', is_virtual=True) + ## ping6.h: void ns3::Ping6::StopApplication() [member function] + cls.add_method('StopApplication', + 'void', + [], + 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_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_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff --git a/bindings/python/ns3_module_point_to_point.py b/bindings/python/ns3_module_point_to_point.py index 38e96e166..3e48fc919 100644 --- a/bindings/python/ns3_module_point_to_point.py +++ b/bindings/python/ns3_module_point_to_point.py @@ -71,16 +71,26 @@ def register_Ns3PppHeader_methods(root_module, cls): cls.add_constructor([param('ns3::PppHeader const &', 'arg0')]) ## ppp-header.h: ns3::PppHeader::PppHeader() [constructor] cls.add_constructor([]) - ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## ppp-header.h: ns3::TypeId ns3::PppHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) + ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## ppp-header.h: void ns3::PppHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', @@ -91,36 +101,22 @@ def register_Ns3PppHeader_methods(root_module, cls): 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) - ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) return def register_Ns3PointToPointChannel_methods(root_module, cls): ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')]) - ## point-to-point-channel.h: static ns3::TypeId ns3::PointToPointChannel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel() [constructor] cls.add_constructor([]) ## point-to-point-channel.h: void ns3::PointToPointChannel::Attach(ns3::Ptr device) [member function] cls.add_method('Attach', 'void', [param('ns3::Ptr< ns3::PointToPointNetDevice >', 'device')]) - ## point-to-point-channel.h: bool ns3::PointToPointChannel::TransmitStart(ns3::Ptr p, ns3::Ptr src, ns3::Time txTime) [member function] - cls.add_method('TransmitStart', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ptr< ns3::PointToPointNetDevice >', 'src'), param('ns3::Time', 'txTime')]) + ## point-to-point-channel.h: ns3::Ptr ns3::PointToPointChannel::GetDevice(uint32_t i) const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) ## point-to-point-channel.h: uint32_t ns3::PointToPointChannel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', @@ -131,114 +127,54 @@ def register_Ns3PointToPointChannel_methods(root_module, cls): 'ns3::Ptr< ns3::PointToPointNetDevice >', [param('uint32_t', 'i')], is_const=True) - ## point-to-point-channel.h: ns3::Ptr ns3::PointToPointChannel::GetDevice(uint32_t i) const [member function] - cls.add_method('GetDevice', - 'ns3::Ptr< ns3::NetDevice >', - [param('uint32_t', 'i')], - is_const=True, is_virtual=True) + ## point-to-point-channel.h: static ns3::TypeId ns3::PointToPointChannel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## point-to-point-channel.h: bool ns3::PointToPointChannel::TransmitStart(ns3::Ptr p, ns3::Ptr src, ns3::Time txTime) [member function] + cls.add_method('TransmitStart', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ptr< ns3::PointToPointNetDevice >', 'src'), param('ns3::Time', 'txTime')]) return def register_Ns3PointToPointNetDevice_methods(root_module, cls): ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice(ns3::PointToPointNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::PointToPointNetDevice const &', 'arg0')]) - ## point-to-point-net-device.h: static ns3::TypeId ns3::PointToPointNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice() [constructor] cls.add_constructor([]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetDataRate(ns3::DataRate bps) [member function] - cls.add_method('SetDataRate', - 'void', - [param('ns3::DataRate', 'bps')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetInterframeGap(ns3::Time t) [member function] - cls.add_method('SetInterframeGap', - 'void', - [param('ns3::Time', 't')]) ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Attach(ns3::Ptr ch) [member function] cls.add_method('Attach', 'bool', [param('ns3::Ptr< ns3::PointToPointChannel >', 'ch')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetQueue(ns3::Ptr queue) [member function] - cls.add_method('SetQueue', - 'void', - [param('ns3::Ptr< ns3::Queue >', 'queue')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveErrorModel(ns3::Ptr em) [member function] - cls.add_method('SetReceiveErrorModel', - 'void', - [param('ns3::Ptr< ns3::ErrorModel >', 'em')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::Receive(ns3::Ptr p) [member function] - cls.add_method('Receive', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'p')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetFrameSize(uint16_t frameSize) [member function] - cls.add_method('SetFrameSize', - 'void', - [param('uint16_t', 'frameSize')]) - ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetFrameSize() const [member function] - cls.add_method('GetFrameSize', - 'uint16_t', - [], - is_const=True) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## point-to-point-net-device.h: uint32_t ns3::PointToPointNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## point-to-point-net-device.h: ns3::Ptr ns3::PointToPointNetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], - is_const=True, is_virtual=True) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) - ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', - [], - is_const=True, is_virtual=True) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', + ## point-to-point-net-device.h: ns3::Ptr ns3::PointToPointNetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetFrameSize() const [member function] + cls.add_method('GetFrameSize', + 'uint16_t', + [], + is_const=True) + ## point-to-point-net-device.h: uint32_t ns3::PointToPointNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', [], is_const=True, is_virtual=True) ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] @@ -246,16 +182,55 @@ def register_Ns3PointToPointNetDevice_methods(root_module, cls): 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function] - cls.add_method('IsPointToPoint', - 'bool', + ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv6Address', 'addr')], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: ns3::Ptr ns3::PointToPointNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) + ## point-to-point-net-device.h: static ns3::TypeId ns3::PointToPointNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_const=True, is_virtual=True) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function] + cls.add_method('IsPointToPoint', + 'bool', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', + 'bool', + [], + is_const=True, is_virtual=True) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::Receive(ns3::Ptr p) [member function] + cls.add_method('Receive', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p')]) ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', @@ -266,36 +241,61 @@ def register_Ns3PointToPointNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## point-to-point-net-device.h: ns3::Ptr ns3::PointToPointNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetDataRate(ns3::DataRate bps) [member function] + cls.add_method('SetDataRate', + 'void', + [param('ns3::DataRate', 'bps')]) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetFrameSize(uint16_t frameSize) [member function] + cls.add_method('SetFrameSize', + 'void', + [param('uint16_t', 'frameSize')]) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetInterframeGap(ns3::Time t) [member function] + cls.add_method('SetInterframeGap', + 'void', + [param('ns3::Time', 't')]) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) - ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv6Address', 'addr')], - is_const=True, is_virtual=True) ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetQueue(ns3::Ptr queue) [member function] + cls.add_method('SetQueue', + 'void', + [param('ns3::Ptr< ns3::Queue >', 'queue')]) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveErrorModel(ns3::Ptr em) [member function] + cls.add_method('SetReceiveErrorModel', + 'void', + [param('ns3::Ptr< ns3::ErrorModel >', 'em')]) ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', diff --git a/bindings/python/ns3_module_radvd.py b/bindings/python/ns3_module_radvd.py new file mode 100644 index 000000000..ec622d886 --- /dev/null +++ b/bindings/python/ns3_module_radvd.py @@ -0,0 +1,389 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## radvd-interface.h: ns3::RadvdInterface [class] + module.add_class('RadvdInterface', parent=root_module['ns3::RefCountBase']) + ## radvd-prefix.h: ns3::RadvdPrefix [class] + module.add_class('RadvdPrefix', parent=root_module['ns3::RefCountBase']) + ## radvd.h: ns3::Radvd [class] + module.add_class('Radvd', parent=root_module['ns3::Application']) + + ## 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 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_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3RadvdInterface_methods(root_module, root_module['ns3::RadvdInterface']) + register_Ns3RadvdPrefix_methods(root_module, root_module['ns3::RadvdPrefix']) + register_Ns3Radvd_methods(root_module, root_module['ns3::Radvd']) + return + +def register_Ns3RadvdInterface_methods(root_module, cls): + ## radvd-interface.h: ns3::RadvdInterface::RadvdInterface(ns3::RadvdInterface const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RadvdInterface const &', 'arg0')]) + ## radvd-interface.h: ns3::RadvdInterface::RadvdInterface(uint32_t interface) [constructor] + cls.add_constructor([param('uint32_t', 'interface')]) + ## radvd-interface.h: ns3::RadvdInterface::RadvdInterface(uint32_t interface, uint32_t maxRtrAdvInterval, uint32_t minRtrAdvInterval) [constructor] + cls.add_constructor([param('uint32_t', 'interface'), param('uint32_t', 'maxRtrAdvInterval'), param('uint32_t', 'minRtrAdvInterval')]) + ## radvd-interface.h: void ns3::RadvdInterface::AddPrefix(ns3::Ptr routerPrefix) [member function] + cls.add_method('AddPrefix', + 'void', + [param('ns3::Ptr< ns3::RadvdPrefix >', 'routerPrefix')]) + ## radvd-interface.h: uint8_t ns3::RadvdInterface::GetCurHopLimit() const [member function] + cls.add_method('GetCurHopLimit', + 'uint8_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetDefaultLifeTime() const [member function] + cls.add_method('GetDefaultLifeTime', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint8_t ns3::RadvdInterface::GetDefaultPreference() const [member function] + cls.add_method('GetDefaultPreference', + 'uint8_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetHomeAgentLifeTime() const [member function] + cls.add_method('GetHomeAgentLifeTime', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetHomeAgentPreference() const [member function] + cls.add_method('GetHomeAgentPreference', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetInterface() const [member function] + cls.add_method('GetInterface', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetLinkMtu() const [member function] + cls.add_method('GetLinkMtu', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetMaxRtrAdvInterval() const [member function] + cls.add_method('GetMaxRtrAdvInterval', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetMinDelayBetweenRAs() const [member function] + cls.add_method('GetMinDelayBetweenRAs', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetMinRtrAdvInterval() const [member function] + cls.add_method('GetMinRtrAdvInterval', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: std::list, std::allocator > > ns3::RadvdInterface::GetPrefixes() const [member function] + cls.add_method('GetPrefixes', + 'std::list< ns3::Ptr< ns3::RadvdPrefix > >', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetReachableTime() const [member function] + cls.add_method('GetReachableTime', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: uint32_t ns3::RadvdInterface::GetRetransTimer() const [member function] + cls.add_method('GetRetransTimer', + 'uint32_t', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsHomeAgentFlag() const [member function] + cls.add_method('IsHomeAgentFlag', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsHomeAgentInfo() const [member function] + cls.add_method('IsHomeAgentInfo', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsIntervalOpt() const [member function] + cls.add_method('IsIntervalOpt', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsManagedFlag() const [member function] + cls.add_method('IsManagedFlag', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsMobRtrSupportFlag() const [member function] + cls.add_method('IsMobRtrSupportFlag', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsOtherConfigFlag() const [member function] + cls.add_method('IsOtherConfigFlag', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsSendAdvert() const [member function] + cls.add_method('IsSendAdvert', + 'bool', + [], + is_const=True) + ## radvd-interface.h: bool ns3::RadvdInterface::IsSourceLLAddress() const [member function] + cls.add_method('IsSourceLLAddress', + 'bool', + [], + is_const=True) + ## radvd-interface.h: void ns3::RadvdInterface::SetCurHopLimit(uint8_t curHopLimit) [member function] + cls.add_method('SetCurHopLimit', + 'void', + [param('uint8_t', 'curHopLimit')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetDefaultLifeTime(uint32_t defaultLifeTime) [member function] + cls.add_method('SetDefaultLifeTime', + 'void', + [param('uint32_t', 'defaultLifeTime')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetDefaultPreference(uint8_t defaultPreference) [member function] + cls.add_method('SetDefaultPreference', + 'void', + [param('uint8_t', 'defaultPreference')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetHomeAgentFlag(bool homeAgentFlag) [member function] + cls.add_method('SetHomeAgentFlag', + 'void', + [param('bool', 'homeAgentFlag')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetHomeAgentInfo(bool homeAgentFlag) [member function] + cls.add_method('SetHomeAgentInfo', + 'void', + [param('bool', 'homeAgentFlag')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetHomeAgentLifeTime(uint32_t homeAgentLifeTime) [member function] + cls.add_method('SetHomeAgentLifeTime', + 'void', + [param('uint32_t', 'homeAgentLifeTime')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetHomeAgentPreference(uint32_t homeAgentPreference) [member function] + cls.add_method('SetHomeAgentPreference', + 'void', + [param('uint32_t', 'homeAgentPreference')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetIntervalOpt(bool intervalOpt) [member function] + cls.add_method('SetIntervalOpt', + 'void', + [param('bool', 'intervalOpt')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetLinkMtu(uint32_t linkMtu) [member function] + cls.add_method('SetLinkMtu', + 'void', + [param('uint32_t', 'linkMtu')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetManagedFlag(bool managedFlag) [member function] + cls.add_method('SetManagedFlag', + 'void', + [param('bool', 'managedFlag')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetMaxRtrAdvInterval(uint32_t maxRtrAdvInterval) [member function] + cls.add_method('SetMaxRtrAdvInterval', + 'void', + [param('uint32_t', 'maxRtrAdvInterval')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetMinDelayBetweenRAs(uint32_t minDelayBetweenRAs) [member function] + cls.add_method('SetMinDelayBetweenRAs', + 'void', + [param('uint32_t', 'minDelayBetweenRAs')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetMinRtrAdvInterval(uint32_t minRtrAdvInterval) [member function] + cls.add_method('SetMinRtrAdvInterval', + 'void', + [param('uint32_t', 'minRtrAdvInterval')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetMobRtrSupportFlag(bool mobRtrSupportFlag) [member function] + cls.add_method('SetMobRtrSupportFlag', + 'void', + [param('bool', 'mobRtrSupportFlag')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetOtherConfigFlag(bool otherConfigFlag) [member function] + cls.add_method('SetOtherConfigFlag', + 'void', + [param('bool', 'otherConfigFlag')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetReachableTime(uint32_t reachableTime) [member function] + cls.add_method('SetReachableTime', + 'void', + [param('uint32_t', 'reachableTime')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetRetransTimer(uint32_t retransTimer) [member function] + cls.add_method('SetRetransTimer', + 'void', + [param('uint32_t', 'retransTimer')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetSendAdvert(bool sendAdvert) [member function] + cls.add_method('SetSendAdvert', + 'void', + [param('bool', 'sendAdvert')]) + ## radvd-interface.h: void ns3::RadvdInterface::SetSourceLLAddress(bool sourceLLAddress) [member function] + cls.add_method('SetSourceLLAddress', + 'void', + [param('bool', 'sourceLLAddress')]) + return + +def register_Ns3RadvdPrefix_methods(root_module, cls): + ## radvd-prefix.h: ns3::RadvdPrefix::RadvdPrefix(ns3::RadvdPrefix const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RadvdPrefix const &', 'arg0')]) + ## radvd-prefix.h: ns3::RadvdPrefix::RadvdPrefix(ns3::Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime=604800, uint32_t validLifeTime=2592000, bool onLinkFlag=true, bool autonomousFlag=true, bool routerAddrFlag=false) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'network'), param('uint8_t', 'prefixLength'), param('uint32_t', 'preferredLifeTime', default_value='604800'), param('uint32_t', 'validLifeTime', default_value='2592000'), param('bool', 'onLinkFlag', default_value='true'), param('bool', 'autonomousFlag', default_value='true'), param('bool', 'routerAddrFlag', default_value='false')]) + ## radvd-prefix.h: ns3::Ipv6Address ns3::RadvdPrefix::GetNetwork() const [member function] + cls.add_method('GetNetwork', + 'ns3::Ipv6Address', + [], + is_const=True) + ## radvd-prefix.h: uint32_t ns3::RadvdPrefix::GetPreferredLifeTime() const [member function] + cls.add_method('GetPreferredLifeTime', + 'uint32_t', + [], + is_const=True) + ## radvd-prefix.h: uint8_t ns3::RadvdPrefix::GetPrefixLength() const [member function] + cls.add_method('GetPrefixLength', + 'uint8_t', + [], + is_const=True) + ## radvd-prefix.h: uint32_t ns3::RadvdPrefix::GetValidLifeTime() const [member function] + cls.add_method('GetValidLifeTime', + 'uint32_t', + [], + is_const=True) + ## radvd-prefix.h: bool ns3::RadvdPrefix::IsAutonomousFlag() const [member function] + cls.add_method('IsAutonomousFlag', + 'bool', + [], + is_const=True) + ## radvd-prefix.h: bool ns3::RadvdPrefix::IsOnLinkFlag() const [member function] + cls.add_method('IsOnLinkFlag', + 'bool', + [], + is_const=True) + ## radvd-prefix.h: bool ns3::RadvdPrefix::IsRouterAddrFlag() const [member function] + cls.add_method('IsRouterAddrFlag', + 'bool', + [], + is_const=True) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetAutonomousFlag(bool autonomousFlag) [member function] + cls.add_method('SetAutonomousFlag', + 'void', + [param('bool', 'autonomousFlag')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetNetwork(ns3::Ipv6Address network) [member function] + cls.add_method('SetNetwork', + 'void', + [param('ns3::Ipv6Address', 'network')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetOnLinkFlag(bool onLinkFlag) [member function] + cls.add_method('SetOnLinkFlag', + 'void', + [param('bool', 'onLinkFlag')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetPreferredLifeTime(uint32_t preferredLifeTime) [member function] + cls.add_method('SetPreferredLifeTime', + 'void', + [param('uint32_t', 'preferredLifeTime')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetPrefixLength(uint8_t prefixLength) [member function] + cls.add_method('SetPrefixLength', + 'void', + [param('uint8_t', 'prefixLength')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetRouterAddrFlag(bool routerAddrFlag) [member function] + cls.add_method('SetRouterAddrFlag', + 'void', + [param('bool', 'routerAddrFlag')]) + ## radvd-prefix.h: void ns3::RadvdPrefix::SetValidLifeTime(uint32_t validLifeTime) [member function] + cls.add_method('SetValidLifeTime', + 'void', + [param('uint32_t', 'validLifeTime')]) + return + +def register_Ns3Radvd_methods(root_module, cls): + ## radvd.h: ns3::Radvd::Radvd(ns3::Radvd const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Radvd const &', 'arg0')]) + ## radvd.h: ns3::Radvd::Radvd() [constructor] + cls.add_constructor([]) + ## radvd.h: void ns3::Radvd::AddConfiguration(ns3::Ptr routerInterface) [member function] + cls.add_method('AddConfiguration', + 'void', + [param('ns3::Ptr< ns3::RadvdInterface >', 'routerInterface')]) + ## radvd.h: static ns3::TypeId ns3::Radvd::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## radvd.h: ns3::Radvd::MAX_RA_DELAY_TIME [variable] + cls.add_static_attribute('MAX_RA_DELAY_TIME', 'uint32_t const', is_const=True) + ## radvd.h: void ns3::Radvd::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## radvd.h: void ns3::Radvd::StartApplication() [member function] + cls.add_method('StartApplication', + 'void', + [], + visibility='private', is_virtual=True) + ## radvd.h: void ns3::Radvd::StopApplication() [member function] + cls.add_method('StopApplication', + 'void', + [], + 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_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_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff --git a/bindings/python/ns3_module_simulator.py b/bindings/python/ns3_module_simulator.py index 6f9b8e369..5fdb9ce1a 100644 --- a/bindings/python/ns3_module_simulator.py +++ b/bindings/python/ns3_module_simulator.py @@ -62,9 +62,17 @@ def register_types(module): ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration] module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl']) typehandlers.add_type_alias('ns3::TimeUnit< 2 >', 'ns3::TimeSquare') + typehandlers.add_type_alias('ns3::TimeUnit< 2 >*', 'ns3::TimeSquare*') + typehandlers.add_type_alias('ns3::TimeUnit< 2 >&', 'ns3::TimeSquare&') typehandlers.add_type_alias('ns3::TimeUnit< - 1 >', 'ns3::TimeInvert') + typehandlers.add_type_alias('ns3::TimeUnit< - 1 >*', 'ns3::TimeInvert*') + typehandlers.add_type_alias('ns3::TimeUnit< - 1 >&', 'ns3::TimeInvert&') typehandlers.add_type_alias('ns3::TimeUnit< 0 >', 'ns3::Scalar') + typehandlers.add_type_alias('ns3::TimeUnit< 0 >*', 'ns3::Scalar*') + typehandlers.add_type_alias('ns3::TimeUnit< 0 >&', 'ns3::Scalar&') typehandlers.add_type_alias('ns3::TimeUnit< 1 >', 'ns3::Time') + typehandlers.add_type_alias('ns3::TimeUnit< 1 >*', 'ns3::Time*') + typehandlers.add_type_alias('ns3::TimeUnit< 1 >&', 'ns3::Time&') ## Register a nested module for the namespace Config @@ -192,6 +200,18 @@ def register_Ns3EventImpl_methods(root_module, cls): cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) ## event-impl.h: ns3::EventImpl::EventImpl() [constructor] cls.add_constructor([]) + ## event-impl.h: void ns3::EventImpl::Cancel() [member function] + cls.add_method('Cancel', + 'void', + []) + ## event-impl.h: void ns3::EventImpl::Invoke() [member function] + cls.add_method('Invoke', + 'void', + []) + ## event-impl.h: bool ns3::EventImpl::IsCancelled() [member function] + cls.add_method('IsCancelled', + 'bool', + []) ## event-impl.h: void ns3::EventImpl::Ref() const [member function] cls.add_method('Ref', 'void', @@ -202,18 +222,6 @@ def register_Ns3EventImpl_methods(root_module, cls): 'void', [], is_const=True) - ## event-impl.h: void ns3::EventImpl::Invoke() [member function] - cls.add_method('Invoke', - 'void', - []) - ## event-impl.h: void ns3::EventImpl::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## event-impl.h: bool ns3::EventImpl::IsCancelled() [member function] - cls.add_method('IsCancelled', - 'bool', - []) ## event-impl.h: void ns3::EventImpl::Notify() [member function] cls.add_method('Notify', 'void', @@ -224,48 +232,48 @@ def register_Ns3EventImpl_methods(root_module, cls): def register_Ns3HighPrecision_methods(root_module, cls): ## high-precision-128.h: ns3::HighPrecision::HighPrecision(ns3::HighPrecision const & arg0) [copy constructor] cls.add_constructor([param('ns3::HighPrecision const &', 'arg0')]) + ## high-precision-128.h: ns3::HighPrecision::HighPrecision(double value) [constructor] + cls.add_constructor([param('double', 'value')]) ## high-precision-128.h: ns3::HighPrecision::HighPrecision() [constructor] cls.add_constructor([]) ## high-precision-128.h: ns3::HighPrecision::HighPrecision(int64_t value, bool dummy) [constructor] cls.add_constructor([param('int64_t', 'value'), param('bool', 'dummy')]) - ## high-precision-128.h: ns3::HighPrecision::HighPrecision(double value) [constructor] - cls.add_constructor([param('double', 'value')]) - ## high-precision-128.h: static void ns3::HighPrecision::PrintStats() [member function] - cls.add_method('PrintStats', - 'void', - [], - is_static=True) - ## high-precision-128.h: int64_t ns3::HighPrecision::GetInteger() const [member function] - cls.add_method('GetInteger', - 'int64_t', - [], - is_const=True) - ## high-precision-128.h: double ns3::HighPrecision::GetDouble() const [member function] - cls.add_method('GetDouble', - 'double', - [], - is_const=True) ## high-precision-128.h: bool ns3::HighPrecision::Add(ns3::HighPrecision const & o) [member function] cls.add_method('Add', 'bool', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h: bool ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] - cls.add_method('Sub', - 'bool', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h: bool ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] - cls.add_method('Mul', - 'bool', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h: bool ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] - cls.add_method('Div', - 'bool', - [param('ns3::HighPrecision const &', 'o')]) ## high-precision-128.h: int ns3::HighPrecision::Compare(ns3::HighPrecision const & o) const [member function] cls.add_method('Compare', 'int', [param('ns3::HighPrecision const &', 'o')], is_const=True) + ## high-precision-128.h: bool ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] + cls.add_method('Div', + 'bool', + [param('ns3::HighPrecision const &', 'o')]) + ## high-precision-128.h: double ns3::HighPrecision::GetDouble() const [member function] + cls.add_method('GetDouble', + 'double', + [], + is_const=True) + ## high-precision-128.h: int64_t ns3::HighPrecision::GetInteger() const [member function] + cls.add_method('GetInteger', + 'int64_t', + [], + is_const=True) + ## high-precision-128.h: bool ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] + cls.add_method('Mul', + 'bool', + [param('ns3::HighPrecision const &', 'o')]) + ## high-precision-128.h: static void ns3::HighPrecision::PrintStats() [member function] + cls.add_method('PrintStats', + 'void', + [], + is_static=True) + ## high-precision-128.h: bool ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] + cls.add_method('Sub', + 'bool', + [param('ns3::HighPrecision const &', 'o')]) ## high-precision-128.h: static ns3::HighPrecision ns3::HighPrecision::Zero() [member function] cls.add_method('Zero', 'ns3::HighPrecision', @@ -276,26 +284,36 @@ def register_Ns3HighPrecision_methods(root_module, cls): def register_Ns3Simulator_methods(root_module, cls): ## simulator.h: ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor] cls.add_constructor([param('ns3::Simulator const &', 'arg0')]) - ## simulator.h: static void ns3::Simulator::SetImplementation(ns3::Ptr impl) [member function] - cls.add_method('SetImplementation', + ## simulator.h: static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function] + cls.add_method('Cancel', 'void', - [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')], + [param('ns3::EventId const &', 'id')], + is_static=True) + ## simulator.h: static void ns3::Simulator::Destroy() [member function] + cls.add_method('Destroy', + 'void', + [], + is_static=True) + ## simulator.h: static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function] + cls.add_method('GetDelayLeft', + 'ns3::Time', + [param('ns3::EventId const &', 'id')], is_static=True) ## simulator.h: static ns3::Ptr ns3::Simulator::GetImplementation() [member function] cls.add_method('GetImplementation', 'ns3::Ptr< ns3::SimulatorImpl >', [], is_static=True) - ## simulator.h: static void ns3::Simulator::SetScheduler(ns3::Ptr scheduler) [member function] - cls.add_method('SetScheduler', - 'void', - [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], - is_static=True) - ## simulator.h: static void ns3::Simulator::Destroy() [member function] - cls.add_method('Destroy', - 'void', + ## simulator.h: static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function] + cls.add_method('GetMaximumSimulationTime', + 'ns3::Time', [], is_static=True) + ## simulator.h: static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function] + cls.add_method('IsExpired', + 'bool', + [param('ns3::EventId const &', 'id')], + is_static=True) ## simulator.h: static bool ns3::Simulator::IsFinished() [member function] cls.add_method('IsFinished', 'bool', @@ -306,11 +324,31 @@ def register_Ns3Simulator_methods(root_module, cls): 'ns3::Time', [], is_static=True) + ## simulator.h: static ns3::Time ns3::Simulator::Now() [member function] + cls.add_method('Now', + 'ns3::Time', + [], + is_static=True) + ## simulator.h: static void ns3::Simulator::Remove(ns3::EventId const & id) [member function] + cls.add_method('Remove', + 'void', + [param('ns3::EventId const &', 'id')], + is_static=True) ## simulator.h: static void ns3::Simulator::RunOneEvent() [member function] cls.add_method('RunOneEvent', 'void', [], is_static=True) + ## simulator.h: static void ns3::Simulator::SetImplementation(ns3::Ptr impl) [member function] + cls.add_method('SetImplementation', + 'void', + [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')], + is_static=True) + ## simulator.h: static void ns3::Simulator::SetScheduler(ns3::Ptr scheduler) [member function] + cls.add_method('SetScheduler', + 'void', + [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], + is_static=True) ## simulator.h: static void ns3::Simulator::Stop() [member function] cls.add_method('Stop', 'void', @@ -321,36 +359,6 @@ def register_Ns3Simulator_methods(root_module, cls): 'void', [param('ns3::Time const &', 'time')], is_static=True) - ## simulator.h: static void ns3::Simulator::Remove(ns3::EventId const & id) [member function] - cls.add_method('Remove', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h: static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function] - cls.add_method('Cancel', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h: static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h: static ns3::Time ns3::Simulator::Now() [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_static=True) - ## simulator.h: static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function] - cls.add_method('GetDelayLeft', - 'ns3::Time', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h: static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function] - cls.add_method('GetMaximumSimulationTime', - 'ns3::Time', - [], - is_static=True) return def register_Ns3TimeInvert_methods(root_module, cls): @@ -397,9 +405,8 @@ def register_Ns3TimeInvert_methods(root_module, cls): return def register_Ns3Scalar_methods(root_module, cls): - cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Scalar'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], root_module['ns3::Scalar']) - cls.add_binary_numeric_operator('/', root_module['ns3::TimeInvert'], root_module['ns3::Scalar'], root_module['ns3::Time']) + cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Scalar'], param('ns3::TimeUnit< 1 > const &', 'right')) + cls.add_binary_numeric_operator('/', root_module['ns3::TimeInvert'], root_module['ns3::Scalar'], param('ns3::TimeUnit< 1 > const &', 'right')) ## nstime.h: ns3::TimeUnit<0>::TimeUnit(double scalar) [constructor] cls.add_constructor([param('double', 'scalar')]) ## nstime.h: ns3::TimeUnit<0>::TimeUnit() [constructor] @@ -451,14 +458,11 @@ def register_Ns3Scalar_methods(root_module, cls): def register_Ns3Time_methods(root_module, cls): cls.add_binary_comparison_operator('!=') - cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Scalar'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('*', root_module['ns3::TimeSquare'], root_module['ns3::Time'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], root_module['ns3::Scalar']) - cls.add_binary_numeric_operator('/', root_module['ns3::TimeInvert'], root_module['ns3::Scalar'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('/', root_module['ns3::Scalar'], root_module['ns3::Time'], root_module['ns3::Time']) - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::TimeSquare'], root_module['ns3::Time']) + cls.add_binary_numeric_operator('*', root_module['ns3::TimeSquare'], root_module['ns3::Time'], param('ns3::TimeUnit< 1 > const &', 'right')) + cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::TimeUnit< 1 > const &', 'right')) + cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::TimeUnit< 1 > const &', 'right')) + cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::TimeUnit< 0 > const &', 'right')) + cls.add_binary_numeric_operator('/', root_module['ns3::Scalar'], root_module['ns3::Time'], param('ns3::TimeUnit< 1 > const &', 'right')) cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('>') cls.add_output_stream_operator() @@ -550,7 +554,7 @@ def register_Ns3Time_methods(root_module, cls): return def register_Ns3TimeSquare_methods(root_module, cls): - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::TimeSquare'], root_module['ns3::Time']) + cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::TimeSquare'], param('ns3::TimeUnit< 1 > const &', 'right')) ## nstime.h: ns3::TimeUnit<2>::TimeUnit() [constructor] cls.add_constructor([]) ## nstime.h: ns3::TimeUnit<2>::TimeUnit(ns3::TimeUnit<2> const & o) [copy constructor] @@ -600,10 +604,10 @@ def register_Ns3Timer_methods(root_module, cls): cls.add_constructor([]) ## timer.h: ns3::Timer::Timer(ns3::Timer::DestroyPolicy destroyPolicy) [constructor] cls.add_constructor([param('ns3::Timer::DestroyPolicy', 'destroyPolicy')]) - ## timer.h: void ns3::Timer::SetDelay(ns3::Time const & delay) [member function] - cls.add_method('SetDelay', + ## timer.h: void ns3::Timer::Cancel() [member function] + cls.add_method('Cancel', 'void', - [param('ns3::Time const &', 'delay')]) + []) ## timer.h: ns3::Time ns3::Timer::GetDelay() const [member function] cls.add_method('GetDelay', 'ns3::Time', @@ -614,14 +618,11 @@ def register_Ns3Timer_methods(root_module, cls): 'ns3::Time', [], is_const=True) - ## timer.h: void ns3::Timer::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## timer.h: void ns3::Timer::Remove() [member function] - cls.add_method('Remove', - 'void', - []) + ## timer.h: ns3::Timer::State ns3::Timer::GetState() const [member function] + cls.add_method('GetState', + 'ns3::Timer::State', + [], + is_const=True) ## timer.h: bool ns3::Timer::IsExpired() const [member function] cls.add_method('IsExpired', 'bool', @@ -637,11 +638,14 @@ def register_Ns3Timer_methods(root_module, cls): 'bool', [], is_const=True) - ## timer.h: ns3::Timer::State ns3::Timer::GetState() const [member function] - cls.add_method('GetState', - 'ns3::Timer::State', - [], - is_const=True) + ## timer.h: void ns3::Timer::Remove() [member function] + cls.add_method('Remove', + 'void', + []) + ## timer.h: void ns3::Timer::Resume() [member function] + cls.add_method('Resume', + 'void', + []) ## timer.h: void ns3::Timer::Schedule() [member function] cls.add_method('Schedule', 'void', @@ -650,31 +654,31 @@ def register_Ns3Timer_methods(root_module, cls): cls.add_method('Schedule', 'void', [param('ns3::Time', 'delay')]) + ## timer.h: void ns3::Timer::SetDelay(ns3::Time const & delay) [member function] + cls.add_method('SetDelay', + 'void', + [param('ns3::Time const &', 'delay')]) ## timer.h: void ns3::Timer::Suspend() [member function] cls.add_method('Suspend', 'void', []) - ## timer.h: void ns3::Timer::Resume() [member function] - cls.add_method('Resume', - 'void', - []) return def register_Ns3TimerImpl_methods(root_module, cls): - ## timer-impl.h: ns3::TimerImpl::TimerImpl(ns3::TimerImpl const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimerImpl const &', 'arg0')]) ## timer-impl.h: ns3::TimerImpl::TimerImpl() [constructor] cls.add_constructor([]) - ## timer-impl.h: ns3::EventId ns3::TimerImpl::Schedule(ns3::Time const & delay) [member function] - cls.add_method('Schedule', - 'ns3::EventId', - [param('ns3::Time const &', 'delay')], - is_pure_virtual=True, is_virtual=True) + ## timer-impl.h: ns3::TimerImpl::TimerImpl(ns3::TimerImpl const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TimerImpl const &', 'arg0')]) ## timer-impl.h: void ns3::TimerImpl::Invoke() [member function] cls.add_method('Invoke', 'void', [], is_pure_virtual=True, is_virtual=True) + ## timer-impl.h: ns3::EventId ns3::TimerImpl::Schedule(ns3::Time const & delay) [member function] + cls.add_method('Schedule', + 'ns3::EventId', + [param('ns3::Time const &', 'delay')], + is_pure_virtual=True, is_virtual=True) return def register_Ns3Watchdog_methods(root_module, cls): @@ -689,10 +693,10 @@ def register_Ns3Watchdog_methods(root_module, cls): return def register_Ns3Scheduler_methods(root_module, cls): - ## scheduler.h: ns3::Scheduler::Scheduler(ns3::Scheduler const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Scheduler const &', 'arg0')]) ## scheduler.h: ns3::Scheduler::Scheduler() [constructor] cls.add_constructor([]) + ## scheduler.h: ns3::Scheduler::Scheduler(ns3::Scheduler const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Scheduler const &', 'arg0')]) ## scheduler.h: static ns3::TypeId ns3::Scheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', @@ -713,16 +717,16 @@ def register_Ns3Scheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## scheduler.h: ns3::Scheduler::Event ns3::Scheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_pure_virtual=True, is_virtual=True) ## scheduler.h: void ns3::Scheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_pure_virtual=True, is_virtual=True) + ## scheduler.h: ns3::Scheduler::Event ns3::Scheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_pure_virtual=True, is_virtual=True) return def register_Ns3SchedulerEvent_methods(root_module, cls): @@ -752,75 +756,20 @@ def register_Ns3SchedulerEventKey_methods(root_module, cls): return def register_Ns3SimulatorImpl_methods(root_module, cls): - ## simulator-impl.h: ns3::SimulatorImpl::SimulatorImpl(ns3::SimulatorImpl const & arg0) [copy constructor] - cls.add_constructor([param('ns3::SimulatorImpl const &', 'arg0')]) ## simulator-impl.h: ns3::SimulatorImpl::SimulatorImpl() [constructor] cls.add_constructor([]) - ## simulator-impl.h: void ns3::SimulatorImpl::Destroy() [member function] - cls.add_method('Destroy', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: bool ns3::SimulatorImpl::IsFinished() const [member function] - cls.add_method('IsFinished', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Next() const [member function] - cls.add_method('Next', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## simulator-impl.h: void ns3::SimulatorImpl::Stop() [member function] - cls.add_method('Stop', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] - cls.add_method('Schedule', - 'ns3::EventId', - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleNow', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleDestroy', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: void ns3::SimulatorImpl::Remove(ns3::EventId const & ev) [member function] - cls.add_method('Remove', - 'void', - [param('ns3::EventId const &', 'ev')], - is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: ns3::SimulatorImpl::SimulatorImpl(ns3::SimulatorImpl const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SimulatorImpl const &', 'arg0')]) ## simulator-impl.h: void ns3::SimulatorImpl::Cancel(ns3::EventId const & ev) [member function] cls.add_method('Cancel', 'void', [param('ns3::EventId const &', 'ev')], is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: bool ns3::SimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'ev')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## simulator-impl.h: void ns3::SimulatorImpl::Run() [member function] - cls.add_method('Run', + ## simulator-impl.h: void ns3::SimulatorImpl::Destroy() [member function] + cls.add_method('Destroy', 'void', [], is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: void ns3::SimulatorImpl::RunOneEvent() [member function] - cls.add_method('RunOneEvent', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Now() const [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::GetDelayLeft(ns3::EventId const & id) const [member function] cls.add_method('GetDelayLeft', 'ns3::Time', @@ -831,71 +780,126 @@ def register_Ns3SimulatorImpl_methods(root_module, cls): 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## simulator-impl.h: bool ns3::SimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] + cls.add_method('IsExpired', + 'bool', + [param('ns3::EventId const &', 'ev')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## simulator-impl.h: bool ns3::SimulatorImpl::IsFinished() const [member function] + cls.add_method('IsFinished', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Next() const [member function] + cls.add_method('Next', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## simulator-impl.h: ns3::Time ns3::SimulatorImpl::Now() const [member function] + cls.add_method('Now', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## simulator-impl.h: void ns3::SimulatorImpl::Remove(ns3::EventId const & ev) [member function] + cls.add_method('Remove', + 'void', + [param('ns3::EventId const &', 'ev')], + is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: void ns3::SimulatorImpl::Run() [member function] + cls.add_method('Run', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: void ns3::SimulatorImpl::RunOneEvent() [member function] + cls.add_method('RunOneEvent', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] + cls.add_method('Schedule', + 'ns3::EventId', + [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], + is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleDestroy', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], + is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: ns3::EventId ns3::SimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleNow', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], + is_pure_virtual=True, is_virtual=True) ## simulator-impl.h: void ns3::SimulatorImpl::SetScheduler(ns3::Ptr scheduler) [member function] cls.add_method('SetScheduler', 'void', [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], is_pure_virtual=True, is_virtual=True) + ## simulator-impl.h: void ns3::SimulatorImpl::Stop() [member function] + cls.add_method('Stop', + 'void', + [], + is_pure_virtual=True, is_virtual=True) return def register_Ns3Synchronizer_methods(root_module, cls): ## synchronizer.h: ns3::Synchronizer::Synchronizer(ns3::Synchronizer const & arg0) [copy constructor] cls.add_constructor([param('ns3::Synchronizer const &', 'arg0')]) - ## synchronizer.h: static ns3::TypeId ns3::Synchronizer::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## synchronizer.h: ns3::Synchronizer::Synchronizer() [constructor] cls.add_constructor([]) - ## synchronizer.h: bool ns3::Synchronizer::Realtime() [member function] - cls.add_method('Realtime', - 'bool', + ## synchronizer.h: uint64_t ns3::Synchronizer::EventEnd() [member function] + cls.add_method('EventEnd', + 'uint64_t', + []) + ## synchronizer.h: void ns3::Synchronizer::EventStart() [member function] + cls.add_method('EventStart', + 'void', []) ## synchronizer.h: uint64_t ns3::Synchronizer::GetCurrentRealtime() [member function] cls.add_method('GetCurrentRealtime', 'uint64_t', []) - ## synchronizer.h: void ns3::Synchronizer::SetOrigin(uint64_t ts) [member function] - cls.add_method('SetOrigin', - 'void', - [param('uint64_t', 'ts')]) - ## synchronizer.h: uint64_t ns3::Synchronizer::GetOrigin() [member function] - cls.add_method('GetOrigin', - 'uint64_t', - []) ## synchronizer.h: int64_t ns3::Synchronizer::GetDrift(uint64_t ts) [member function] cls.add_method('GetDrift', 'int64_t', [param('uint64_t', 'ts')]) - ## synchronizer.h: bool ns3::Synchronizer::Synchronize(uint64_t tsCurrent, uint64_t tsDelay) [member function] - cls.add_method('Synchronize', + ## synchronizer.h: uint64_t ns3::Synchronizer::GetOrigin() [member function] + cls.add_method('GetOrigin', + 'uint64_t', + []) + ## synchronizer.h: static ns3::TypeId ns3::Synchronizer::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## synchronizer.h: bool ns3::Synchronizer::Realtime() [member function] + cls.add_method('Realtime', 'bool', - [param('uint64_t', 'tsCurrent'), param('uint64_t', 'tsDelay')]) - ## synchronizer.h: void ns3::Synchronizer::Signal() [member function] - cls.add_method('Signal', - 'void', []) ## synchronizer.h: void ns3::Synchronizer::SetCondition(bool arg0) [member function] cls.add_method('SetCondition', 'void', [param('bool', 'arg0')]) - ## synchronizer.h: void ns3::Synchronizer::EventStart() [member function] - cls.add_method('EventStart', + ## synchronizer.h: void ns3::Synchronizer::SetOrigin(uint64_t ts) [member function] + cls.add_method('SetOrigin', + 'void', + [param('uint64_t', 'ts')]) + ## synchronizer.h: void ns3::Synchronizer::Signal() [member function] + cls.add_method('Signal', 'void', []) - ## synchronizer.h: uint64_t ns3::Synchronizer::EventEnd() [member function] - cls.add_method('EventEnd', - 'uint64_t', - []) - ## synchronizer.h: void ns3::Synchronizer::DoSetOrigin(uint64_t ns) [member function] - cls.add_method('DoSetOrigin', - 'void', - [param('uint64_t', 'ns')], - is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: bool ns3::Synchronizer::DoRealtime() [member function] - cls.add_method('DoRealtime', + ## synchronizer.h: bool ns3::Synchronizer::Synchronize(uint64_t tsCurrent, uint64_t tsDelay) [member function] + cls.add_method('Synchronize', 'bool', + [param('uint64_t', 'tsCurrent'), param('uint64_t', 'tsDelay')]) + ## synchronizer.h: uint64_t ns3::Synchronizer::DoEventEnd() [member function] + cls.add_method('DoEventEnd', + 'uint64_t', + [], + is_pure_virtual=True, visibility='protected', is_virtual=True) + ## synchronizer.h: void ns3::Synchronizer::DoEventStart() [member function] + cls.add_method('DoEventStart', + 'void', [], is_pure_virtual=True, visibility='protected', is_virtual=True) ## synchronizer.h: uint64_t ns3::Synchronizer::DoGetCurrentRealtime() [member function] @@ -903,14 +907,14 @@ def register_Ns3Synchronizer_methods(root_module, cls): 'uint64_t', [], is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: bool ns3::Synchronizer::DoSynchronize(uint64_t nsCurrent, uint64_t nsDelay) [member function] - cls.add_method('DoSynchronize', - 'bool', - [param('uint64_t', 'nsCurrent'), param('uint64_t', 'nsDelay')], + ## synchronizer.h: int64_t ns3::Synchronizer::DoGetDrift(uint64_t ns) [member function] + cls.add_method('DoGetDrift', + 'int64_t', + [param('uint64_t', 'ns')], is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: void ns3::Synchronizer::DoSignal() [member function] - cls.add_method('DoSignal', - 'void', + ## synchronizer.h: bool ns3::Synchronizer::DoRealtime() [member function] + cls.add_method('DoRealtime', + 'bool', [], is_pure_virtual=True, visibility='protected', is_virtual=True) ## synchronizer.h: void ns3::Synchronizer::DoSetCondition(bool arg0) [member function] @@ -918,77 +922,82 @@ def register_Ns3Synchronizer_methods(root_module, cls): 'void', [param('bool', 'arg0')], is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: int64_t ns3::Synchronizer::DoGetDrift(uint64_t ns) [member function] - cls.add_method('DoGetDrift', - 'int64_t', + ## synchronizer.h: void ns3::Synchronizer::DoSetOrigin(uint64_t ns) [member function] + cls.add_method('DoSetOrigin', + 'void', [param('uint64_t', 'ns')], is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: void ns3::Synchronizer::DoEventStart() [member function] - cls.add_method('DoEventStart', + ## synchronizer.h: void ns3::Synchronizer::DoSignal() [member function] + cls.add_method('DoSignal', 'void', [], is_pure_virtual=True, visibility='protected', is_virtual=True) - ## synchronizer.h: uint64_t ns3::Synchronizer::DoEventEnd() [member function] - cls.add_method('DoEventEnd', - 'uint64_t', - [], + ## synchronizer.h: bool ns3::Synchronizer::DoSynchronize(uint64_t nsCurrent, uint64_t nsDelay) [member function] + cls.add_method('DoSynchronize', + 'bool', + [param('uint64_t', 'nsCurrent'), param('uint64_t', 'nsDelay')], is_pure_virtual=True, visibility='protected', is_virtual=True) return def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h: ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) ## nstime.h: ns3::TimeChecker::TimeChecker() [constructor] cls.add_constructor([]) + ## nstime.h: ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) return def register_Ns3TimeValue_methods(root_module, cls): - ## nstime.h: ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) ## nstime.h: ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) + ## nstime.h: ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) ## nstime.h: ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor] cls.add_constructor([param('ns3::Time const &', 'value')]) - ## nstime.h: void ns3::TimeValue::Set(ns3::Time const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Time const &', 'value')]) - ## nstime.h: ns3::Time ns3::TimeValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Time', - [], - is_const=True) ## nstime.h: ns3::Ptr ns3::TimeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## nstime.h: std::string ns3::TimeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## nstime.h: bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## nstime.h: ns3::Time ns3::TimeValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Time', + [], + is_const=True) + ## nstime.h: std::string ns3::TimeValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## nstime.h: void ns3::TimeValue::Set(ns3::Time const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Time const &', 'value')]) return def register_Ns3WallClockSynchronizer_methods(root_module, cls): - ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::US_PER_NS [variable] - cls.add_static_attribute('US_PER_NS', 'uint64_t const', is_const=True) - ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::US_PER_SEC [variable] - cls.add_static_attribute('US_PER_SEC', 'uint64_t const', is_const=True) - ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::NS_PER_SEC [variable] - cls.add_static_attribute('NS_PER_SEC', 'uint64_t const', is_const=True) ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::WallClockSynchronizer(ns3::WallClockSynchronizer const & arg0) [copy constructor] cls.add_constructor([param('ns3::WallClockSynchronizer const &', 'arg0')]) ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::WallClockSynchronizer() [constructor] cls.add_constructor([]) - ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::DoRealtime() [member function] - cls.add_method('DoRealtime', - 'bool', + ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::NS_PER_SEC [variable] + cls.add_static_attribute('NS_PER_SEC', 'uint64_t const', is_const=True) + ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::US_PER_NS [variable] + cls.add_static_attribute('US_PER_NS', 'uint64_t const', is_const=True) + ## wall-clock-synchronizer.h: ns3::WallClockSynchronizer::US_PER_SEC [variable] + cls.add_static_attribute('US_PER_SEC', 'uint64_t const', is_const=True) + ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::DoEventEnd() [member function] + cls.add_method('DoEventEnd', + 'uint64_t', + [], + visibility='protected', is_virtual=True) + ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoEventStart() [member function] + cls.add_method('DoEventStart', + 'void', [], visibility='protected', is_virtual=True) ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::DoGetCurrentRealtime() [member function] @@ -996,24 +1005,14 @@ def register_Ns3WallClockSynchronizer_methods(root_module, cls): 'uint64_t', [], visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoSetOrigin(uint64_t ns) [member function] - cls.add_method('DoSetOrigin', - 'void', - [param('uint64_t', 'ns')], - visibility='protected', is_virtual=True) ## wall-clock-synchronizer.h: int64_t ns3::WallClockSynchronizer::DoGetDrift(uint64_t ns) [member function] cls.add_method('DoGetDrift', 'int64_t', [param('uint64_t', 'ns')], visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::DoSynchronize(uint64_t nsCurrent, uint64_t nsDelay) [member function] - cls.add_method('DoSynchronize', + ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::DoRealtime() [member function] + cls.add_method('DoRealtime', 'bool', - [param('uint64_t', 'nsCurrent'), param('uint64_t', 'nsDelay')], - visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoSignal() [member function] - cls.add_method('DoSignal', - 'void', [], visibility='protected', is_virtual=True) ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoSetCondition(bool cond) [member function] @@ -1021,38 +1020,33 @@ def register_Ns3WallClockSynchronizer_methods(root_module, cls): 'void', [param('bool', 'cond')], visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoEventStart() [member function] - cls.add_method('DoEventStart', + ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoSetOrigin(uint64_t ns) [member function] + cls.add_method('DoSetOrigin', + 'void', + [param('uint64_t', 'ns')], + visibility='protected', is_virtual=True) + ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::DoSignal() [member function] + cls.add_method('DoSignal', 'void', [], visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::DoEventEnd() [member function] - cls.add_method('DoEventEnd', - 'uint64_t', - [], + ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::DoSynchronize(uint64_t nsCurrent, uint64_t nsDelay) [member function] + cls.add_method('DoSynchronize', + 'bool', + [param('uint64_t', 'nsCurrent'), param('uint64_t', 'nsDelay')], visibility='protected', is_virtual=True) - ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::SpinWait(uint64_t arg0) [member function] - cls.add_method('SpinWait', - 'bool', - [param('uint64_t', 'arg0')], - visibility='protected') - ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::SleepWait(uint64_t arg0) [member function] - cls.add_method('SleepWait', - 'bool', - [param('uint64_t', 'arg0')], - visibility='protected') ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::DriftCorrect(uint64_t nsNow, uint64_t nsDelay) [member function] cls.add_method('DriftCorrect', 'uint64_t', [param('uint64_t', 'nsNow'), param('uint64_t', 'nsDelay')], visibility='protected') - ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::GetRealtime() [member function] - cls.add_method('GetRealtime', + ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::GetNormalizedRealtime() [member function] + cls.add_method('GetNormalizedRealtime', 'uint64_t', [], visibility='protected') - ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::GetNormalizedRealtime() [member function] - cls.add_method('GetNormalizedRealtime', + ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::GetRealtime() [member function] + cls.add_method('GetRealtime', 'uint64_t', [], visibility='protected') @@ -1061,28 +1055,38 @@ def register_Ns3WallClockSynchronizer_methods(root_module, cls): 'void', [param('int64_t', 'ns'), param('timeval *', 'tv')], visibility='protected') - ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::TimevalToNs(timeval * tv) [member function] - cls.add_method('TimevalToNs', - 'uint64_t', - [param('timeval *', 'tv')], + ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::SleepWait(uint64_t arg0) [member function] + cls.add_method('SleepWait', + 'bool', + [param('uint64_t', 'arg0')], + visibility='protected') + ## wall-clock-synchronizer.h: bool ns3::WallClockSynchronizer::SpinWait(uint64_t arg0) [member function] + cls.add_method('SpinWait', + 'bool', + [param('uint64_t', 'arg0')], visibility='protected') ## wall-clock-synchronizer.h: void ns3::WallClockSynchronizer::TimevalAdd(timeval * tv1, timeval * tv2, timeval * result) [member function] cls.add_method('TimevalAdd', 'void', [param('timeval *', 'tv1'), param('timeval *', 'tv2'), param('timeval *', 'result')], visibility='protected') + ## wall-clock-synchronizer.h: uint64_t ns3::WallClockSynchronizer::TimevalToNs(timeval * tv) [member function] + cls.add_method('TimevalToNs', + 'uint64_t', + [param('timeval *', 'tv')], + visibility='protected') return def register_Ns3CalendarScheduler_methods(root_module, cls): ## calendar-scheduler.h: ns3::CalendarScheduler::CalendarScheduler(ns3::CalendarScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::CalendarScheduler const &', 'arg0')]) + ## calendar-scheduler.h: ns3::CalendarScheduler::CalendarScheduler() [constructor] + cls.add_constructor([]) ## calendar-scheduler.h: static ns3::TypeId ns3::CalendarScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## calendar-scheduler.h: ns3::CalendarScheduler::CalendarScheduler() [constructor] - cls.add_constructor([]) ## calendar-scheduler.h: void ns3::CalendarScheduler::Insert(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Insert', 'void', @@ -1098,93 +1102,33 @@ def register_Ns3CalendarScheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_const=True, is_virtual=True) - ## calendar-scheduler.h: ns3::Scheduler::Event ns3::CalendarScheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_virtual=True) ## calendar-scheduler.h: void ns3::CalendarScheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_virtual=True) + ## calendar-scheduler.h: ns3::Scheduler::Event ns3::CalendarScheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_virtual=True) return def register_Ns3DefaultSimulatorImpl_methods(root_module, cls): ## default-simulator-impl.h: ns3::DefaultSimulatorImpl::DefaultSimulatorImpl(ns3::DefaultSimulatorImpl const & arg0) [copy constructor] cls.add_constructor([param('ns3::DefaultSimulatorImpl const &', 'arg0')]) - ## default-simulator-impl.h: static ns3::TypeId ns3::DefaultSimulatorImpl::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## default-simulator-impl.h: ns3::DefaultSimulatorImpl::DefaultSimulatorImpl() [constructor] cls.add_constructor([]) - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Destroy() [member function] - cls.add_method('Destroy', - 'void', - [], - is_virtual=True) - ## default-simulator-impl.h: bool ns3::DefaultSimulatorImpl::IsFinished() const [member function] - cls.add_method('IsFinished', - 'bool', - [], - is_const=True, is_virtual=True) - ## default-simulator-impl.h: ns3::Time ns3::DefaultSimulatorImpl::Next() const [member function] - cls.add_method('Next', - 'ns3::Time', - [], - is_const=True, is_virtual=True) - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Stop() [member function] - cls.add_method('Stop', - 'void', - [], - is_virtual=True) - ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] - cls.add_method('Schedule', - 'ns3::EventId', - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], - is_virtual=True) - ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleNow', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_virtual=True) - ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleDestroy', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_virtual=True) - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Remove(ns3::EventId const & ev) [member function] - cls.add_method('Remove', - 'void', - [param('ns3::EventId const &', 'ev')], - is_virtual=True) ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Cancel(ns3::EventId const & ev) [member function] cls.add_method('Cancel', 'void', [param('ns3::EventId const &', 'ev')], is_virtual=True) - ## default-simulator-impl.h: bool ns3::DefaultSimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'ev')], - is_const=True, is_virtual=True) - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Run() [member function] - cls.add_method('Run', + ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Destroy() [member function] + cls.add_method('Destroy', 'void', [], is_virtual=True) - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::RunOneEvent() [member function] - cls.add_method('RunOneEvent', - 'void', - [], - is_virtual=True) - ## default-simulator-impl.h: ns3::Time ns3::DefaultSimulatorImpl::Now() const [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_const=True, is_virtual=True) ## default-simulator-impl.h: ns3::Time ns3::DefaultSimulatorImpl::GetDelayLeft(ns3::EventId const & id) const [member function] cls.add_method('GetDelayLeft', 'ns3::Time', @@ -1195,23 +1139,83 @@ def register_Ns3DefaultSimulatorImpl_methods(root_module, cls): 'ns3::Time', [], is_const=True, is_virtual=True) + ## default-simulator-impl.h: static ns3::TypeId ns3::DefaultSimulatorImpl::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## default-simulator-impl.h: bool ns3::DefaultSimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] + cls.add_method('IsExpired', + 'bool', + [param('ns3::EventId const &', 'ev')], + is_const=True, is_virtual=True) + ## default-simulator-impl.h: bool ns3::DefaultSimulatorImpl::IsFinished() const [member function] + cls.add_method('IsFinished', + 'bool', + [], + is_const=True, is_virtual=True) + ## default-simulator-impl.h: ns3::Time ns3::DefaultSimulatorImpl::Next() const [member function] + cls.add_method('Next', + 'ns3::Time', + [], + is_const=True, is_virtual=True) + ## default-simulator-impl.h: ns3::Time ns3::DefaultSimulatorImpl::Now() const [member function] + cls.add_method('Now', + 'ns3::Time', + [], + is_const=True, is_virtual=True) + ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Remove(ns3::EventId const & ev) [member function] + cls.add_method('Remove', + 'void', + [param('ns3::EventId const &', 'ev')], + is_virtual=True) + ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Run() [member function] + cls.add_method('Run', + 'void', + [], + is_virtual=True) + ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::RunOneEvent() [member function] + cls.add_method('RunOneEvent', + 'void', + [], + is_virtual=True) + ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] + cls.add_method('Schedule', + 'ns3::EventId', + [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], + is_virtual=True) + ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleDestroy', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], + is_virtual=True) + ## default-simulator-impl.h: ns3::EventId ns3::DefaultSimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleNow', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], + is_virtual=True) ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::SetScheduler(ns3::Ptr scheduler) [member function] cls.add_method('SetScheduler', 'void', [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], is_virtual=True) + ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::Stop() [member function] + cls.add_method('Stop', + 'void', + [], + is_virtual=True) return def register_Ns3HeapScheduler_methods(root_module, cls): ## heap-scheduler.h: ns3::HeapScheduler::HeapScheduler(ns3::HeapScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::HeapScheduler const &', 'arg0')]) + ## heap-scheduler.h: ns3::HeapScheduler::HeapScheduler() [constructor] + cls.add_constructor([]) ## heap-scheduler.h: static ns3::TypeId ns3::HeapScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## heap-scheduler.h: ns3::HeapScheduler::HeapScheduler() [constructor] - cls.add_constructor([]) ## heap-scheduler.h: void ns3::HeapScheduler::Insert(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Insert', 'void', @@ -1227,28 +1231,28 @@ def register_Ns3HeapScheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_const=True, is_virtual=True) - ## heap-scheduler.h: ns3::Scheduler::Event ns3::HeapScheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_virtual=True) ## heap-scheduler.h: void ns3::HeapScheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_virtual=True) + ## heap-scheduler.h: ns3::Scheduler::Event ns3::HeapScheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_virtual=True) return def register_Ns3ListScheduler_methods(root_module, cls): ## list-scheduler.h: ns3::ListScheduler::ListScheduler(ns3::ListScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::ListScheduler const &', 'arg0')]) + ## list-scheduler.h: ns3::ListScheduler::ListScheduler() [constructor] + cls.add_constructor([]) ## list-scheduler.h: static ns3::TypeId ns3::ListScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## list-scheduler.h: ns3::ListScheduler::ListScheduler() [constructor] - cls.add_constructor([]) ## list-scheduler.h: void ns3::ListScheduler::Insert(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Insert', 'void', @@ -1264,28 +1268,28 @@ def register_Ns3ListScheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_const=True, is_virtual=True) - ## list-scheduler.h: ns3::Scheduler::Event ns3::ListScheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_virtual=True) ## list-scheduler.h: void ns3::ListScheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_virtual=True) + ## list-scheduler.h: ns3::Scheduler::Event ns3::ListScheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_virtual=True) return def register_Ns3MapScheduler_methods(root_module, cls): ## map-scheduler.h: ns3::MapScheduler::MapScheduler(ns3::MapScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::MapScheduler const &', 'arg0')]) + ## map-scheduler.h: ns3::MapScheduler::MapScheduler() [constructor] + cls.add_constructor([]) ## map-scheduler.h: static ns3::TypeId ns3::MapScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## map-scheduler.h: ns3::MapScheduler::MapScheduler() [constructor] - cls.add_constructor([]) ## map-scheduler.h: void ns3::MapScheduler::Insert(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Insert', 'void', @@ -1301,28 +1305,28 @@ def register_Ns3MapScheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_const=True, is_virtual=True) - ## map-scheduler.h: ns3::Scheduler::Event ns3::MapScheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_virtual=True) ## map-scheduler.h: void ns3::MapScheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_virtual=True) + ## map-scheduler.h: ns3::Scheduler::Event ns3::MapScheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_virtual=True) return def register_Ns3Ns2CalendarScheduler_methods(root_module, cls): ## ns2-calendar-scheduler.h: ns3::Ns2CalendarScheduler::Ns2CalendarScheduler(ns3::Ns2CalendarScheduler const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ns2CalendarScheduler const &', 'arg0')]) + ## ns2-calendar-scheduler.h: ns3::Ns2CalendarScheduler::Ns2CalendarScheduler() [constructor] + cls.add_constructor([]) ## ns2-calendar-scheduler.h: static ns3::TypeId ns3::Ns2CalendarScheduler::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## ns2-calendar-scheduler.h: ns3::Ns2CalendarScheduler::Ns2CalendarScheduler() [constructor] - cls.add_constructor([]) ## ns2-calendar-scheduler.h: void ns3::Ns2CalendarScheduler::Insert(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Insert', 'void', @@ -1338,33 +1342,63 @@ def register_Ns3Ns2CalendarScheduler_methods(root_module, cls): 'ns3::Scheduler::Event', [], is_const=True, is_virtual=True) - ## ns2-calendar-scheduler.h: ns3::Scheduler::Event ns3::Ns2CalendarScheduler::RemoveNext() [member function] - cls.add_method('RemoveNext', - 'ns3::Scheduler::Event', - [], - is_virtual=True) ## ns2-calendar-scheduler.h: void ns3::Ns2CalendarScheduler::Remove(ns3::Scheduler::Event const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::Scheduler::Event const &', 'ev')], is_virtual=True) + ## ns2-calendar-scheduler.h: ns3::Scheduler::Event ns3::Ns2CalendarScheduler::RemoveNext() [member function] + cls.add_method('RemoveNext', + 'ns3::Scheduler::Event', + [], + is_virtual=True) return def register_Ns3RealtimeSimulatorImpl_methods(root_module, cls): ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::RealtimeSimulatorImpl(ns3::RealtimeSimulatorImpl const & arg0) [copy constructor] cls.add_constructor([param('ns3::RealtimeSimulatorImpl const &', 'arg0')]) - ## realtime-simulator-impl.h: static ns3::TypeId ns3::RealtimeSimulatorImpl::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::RealtimeSimulatorImpl() [constructor] cls.add_constructor([]) + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Cancel(ns3::EventId const & ev) [member function] + cls.add_method('Cancel', + 'void', + [param('ns3::EventId const &', 'ev')], + is_virtual=True) ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Destroy() [member function] cls.add_method('Destroy', 'void', [], is_virtual=True) + ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetDelayLeft(ns3::EventId const & id) const [member function] + cls.add_method('GetDelayLeft', + 'ns3::Time', + [param('ns3::EventId const &', 'id')], + is_const=True, is_virtual=True) + ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetHardLimit() const [member function] + cls.add_method('GetHardLimit', + 'ns3::Time', + [], + is_const=True) + ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetMaximumSimulationTime() const [member function] + cls.add_method('GetMaximumSimulationTime', + 'ns3::Time', + [], + is_const=True, is_virtual=True) + ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode ns3::RealtimeSimulatorImpl::GetSynchronizationMode() const [member function] + cls.add_method('GetSynchronizationMode', + 'ns3::RealtimeSimulatorImpl::SynchronizationMode', + [], + is_const=True) + ## realtime-simulator-impl.h: static ns3::TypeId ns3::RealtimeSimulatorImpl::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## realtime-simulator-impl.h: bool ns3::RealtimeSimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] + cls.add_method('IsExpired', + 'bool', + [param('ns3::EventId const &', 'ev')], + is_const=True, is_virtual=True) ## realtime-simulator-impl.h: bool ns3::RealtimeSimulatorImpl::IsFinished() const [member function] cls.add_method('IsFinished', 'bool', @@ -1375,41 +1409,21 @@ def register_Ns3RealtimeSimulatorImpl_methods(root_module, cls): 'ns3::Time', [], is_const=True, is_virtual=True) - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Stop() [member function] - cls.add_method('Stop', - 'void', + ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::Now() const [member function] + cls.add_method('Now', + 'ns3::Time', [], - is_virtual=True) - ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] - cls.add_method('Schedule', - 'ns3::EventId', - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], - is_virtual=True) - ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleNow', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_virtual=True) - ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] - cls.add_method('ScheduleDestroy', - 'ns3::EventId', - [param('ns3::EventImpl *', 'event')], - is_virtual=True) + is_const=True, is_virtual=True) + ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::RealtimeNow() const [member function] + cls.add_method('RealtimeNow', + 'ns3::Time', + [], + is_const=True) ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Remove(ns3::EventId const & ev) [member function] cls.add_method('Remove', 'void', [param('ns3::EventId const &', 'ev')], is_virtual=True) - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Cancel(ns3::EventId const & ev) [member function] - cls.add_method('Cancel', - 'void', - [param('ns3::EventId const &', 'ev')], - is_virtual=True) - ## realtime-simulator-impl.h: bool ns3::RealtimeSimulatorImpl::IsExpired(ns3::EventId const & ev) const [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'ev')], - is_const=True, is_virtual=True) ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Run() [member function] cls.add_method('Run', 'void', @@ -1420,25 +1434,20 @@ def register_Ns3RealtimeSimulatorImpl_methods(root_module, cls): 'void', [], is_virtual=True) - ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::Now() const [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_const=True, is_virtual=True) - ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetDelayLeft(ns3::EventId const & id) const [member function] - cls.add_method('GetDelayLeft', - 'ns3::Time', - [param('ns3::EventId const &', 'id')], - is_const=True, is_virtual=True) - ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetMaximumSimulationTime() const [member function] - cls.add_method('GetMaximumSimulationTime', - 'ns3::Time', - [], - is_const=True, is_virtual=True) - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::SetScheduler(ns3::Ptr scheduler) [member function] - cls.add_method('SetScheduler', - 'void', - [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], + ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::Schedule(ns3::Time const & time, ns3::EventImpl * event) [member function] + cls.add_method('Schedule', + 'ns3::EventId', + [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')], + is_virtual=True) + ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::ScheduleDestroy(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleDestroy', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], + is_virtual=True) + ## realtime-simulator-impl.h: ns3::EventId ns3::RealtimeSimulatorImpl::ScheduleNow(ns3::EventImpl * event) [member function] + cls.add_method('ScheduleNow', + 'ns3::EventId', + [param('ns3::EventImpl *', 'event')], is_virtual=True) ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::ScheduleRealtime(ns3::Time const & time, ns3::EventImpl * event) [member function] cls.add_method('ScheduleRealtime', @@ -1448,29 +1457,24 @@ def register_Ns3RealtimeSimulatorImpl_methods(root_module, cls): cls.add_method('ScheduleRealtimeNow', 'void', [param('ns3::EventImpl *', 'event')]) - ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::RealtimeNow() const [member function] - cls.add_method('RealtimeNow', - 'ns3::Time', - [], - is_const=True) - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::SetSynchronizationMode(ns3::RealtimeSimulatorImpl::SynchronizationMode mode) [member function] - cls.add_method('SetSynchronizationMode', - 'void', - [param('ns3::RealtimeSimulatorImpl::SynchronizationMode', 'mode')]) - ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode ns3::RealtimeSimulatorImpl::GetSynchronizationMode() const [member function] - cls.add_method('GetSynchronizationMode', - 'ns3::RealtimeSimulatorImpl::SynchronizationMode', - [], - is_const=True) ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::SetHardLimit(ns3::Time limit) [member function] cls.add_method('SetHardLimit', 'void', [param('ns3::Time', 'limit')]) - ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::GetHardLimit() const [member function] - cls.add_method('GetHardLimit', - 'ns3::Time', + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::SetScheduler(ns3::Ptr scheduler) [member function] + cls.add_method('SetScheduler', + 'void', + [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], + is_virtual=True) + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::SetSynchronizationMode(ns3::RealtimeSimulatorImpl::SynchronizationMode mode) [member function] + cls.add_method('SetSynchronizationMode', + 'void', + [param('ns3::RealtimeSimulatorImpl::SynchronizationMode', 'mode')]) + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::Stop() [member function] + cls.add_method('Stop', + 'void', [], - is_const=True) + is_virtual=True) return def register_functions(root_module): diff --git a/bindings/python/ns3_module_static_routing.py b/bindings/python/ns3_module_static_routing.py index 673a2c4b8..a5dfb214b 100644 --- a/bindings/python/ns3_module_static_routing.py +++ b/bindings/python/ns3_module_static_routing.py @@ -7,8 +7,14 @@ def register_types(module): module.add_class('Ipv4MulticastRoutingTableEntry') ## ipv4-routing-table-entry.h: ns3::Ipv4RoutingTableEntry [class] module.add_class('Ipv4RoutingTableEntry') + ## ipv6-routing-table-entry.h: ns3::Ipv6MulticastRoutingTableEntry [class] + module.add_class('Ipv6MulticastRoutingTableEntry') + ## ipv6-routing-table-entry.h: ns3::Ipv6RoutingTableEntry [class] + module.add_class('Ipv6RoutingTableEntry') ## ipv4-static-routing.h: ns3::Ipv4StaticRouting [class] module.add_class('Ipv4StaticRouting', parent=root_module['ns3::Ipv4RoutingProtocol']) + ## ipv6-static-routing.h: ns3::Ipv6StaticRouting [class] + module.add_class('Ipv6StaticRouting', parent=root_module['ns3::Ipv6RoutingProtocol']) ## Register a nested module for the namespace Config @@ -63,7 +69,10 @@ def register_types_ns3_olsr(module): def register_methods(root_module): register_Ns3Ipv4MulticastRoutingTableEntry_methods(root_module, root_module['ns3::Ipv4MulticastRoutingTableEntry']) register_Ns3Ipv4RoutingTableEntry_methods(root_module, root_module['ns3::Ipv4RoutingTableEntry']) + register_Ns3Ipv6MulticastRoutingTableEntry_methods(root_module, root_module['ns3::Ipv6MulticastRoutingTableEntry']) + register_Ns3Ipv6RoutingTableEntry_methods(root_module, root_module['ns3::Ipv6RoutingTableEntry']) register_Ns3Ipv4StaticRouting_methods(root_module, root_module['ns3::Ipv4StaticRouting']) + register_Ns3Ipv6StaticRouting_methods(root_module, root_module['ns3::Ipv6StaticRouting']) return def register_Ns3Ipv4MulticastRoutingTableEntry_methods(root_module, cls): @@ -191,51 +200,150 @@ def register_Ns3Ipv4RoutingTableEntry_methods(root_module, cls): is_const=True) return +def register_Ns3Ipv6MulticastRoutingTableEntry_methods(root_module, cls): + cls.add_output_stream_operator() + ## ipv6-routing-table-entry.h: ns3::Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry() [constructor] + cls.add_constructor([]) + ## ipv6-routing-table-entry.h: ns3::Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry(ns3::Ipv6MulticastRoutingTableEntry const & route) [copy constructor] + cls.add_constructor([param('ns3::Ipv6MulticastRoutingTableEntry const &', 'route')]) + ## ipv6-routing-table-entry.h: ns3::Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry(ns3::Ipv6MulticastRoutingTableEntry const * route) [constructor] + cls.add_constructor([param('ns3::Ipv6MulticastRoutingTableEntry const *', 'route')]) + ## ipv6-routing-table-entry.h: static ns3::Ipv6MulticastRoutingTableEntry ns3::Ipv6MulticastRoutingTableEntry::CreateMulticastRoute(ns3::Ipv6Address origin, ns3::Ipv6Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function] + cls.add_method('CreateMulticastRoute', + 'ns3::Ipv6MulticastRoutingTableEntry', + [param('ns3::Ipv6Address', 'origin'), param('ns3::Ipv6Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')], + is_static=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6MulticastRoutingTableEntry::GetGroup() const [member function] + cls.add_method('GetGroup', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: uint32_t ns3::Ipv6MulticastRoutingTableEntry::GetInputInterface() const [member function] + cls.add_method('GetInputInterface', + 'uint32_t', + [], + is_const=True) + ## ipv6-routing-table-entry.h: uint32_t ns3::Ipv6MulticastRoutingTableEntry::GetNOutputInterfaces() const [member function] + cls.add_method('GetNOutputInterfaces', + 'uint32_t', + [], + is_const=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6MulticastRoutingTableEntry::GetOrigin() const [member function] + cls.add_method('GetOrigin', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: uint32_t ns3::Ipv6MulticastRoutingTableEntry::GetOutputInterface(uint32_t n) const [member function] + cls.add_method('GetOutputInterface', + 'uint32_t', + [param('uint32_t', 'n')], + is_const=True) + ## ipv6-routing-table-entry.h: std::vector > ns3::Ipv6MulticastRoutingTableEntry::GetOutputInterfaces() const [member function] + cls.add_method('GetOutputInterfaces', + 'std::vector< unsigned int >', + [], + is_const=True) + return + +def register_Ns3Ipv6RoutingTableEntry_methods(root_module, cls): + cls.add_output_stream_operator() + ## ipv6-routing-table-entry.h: ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry() [constructor] + cls.add_constructor([]) + ## ipv6-routing-table-entry.h: ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry(ns3::Ipv6RoutingTableEntry const & route) [copy constructor] + cls.add_constructor([param('ns3::Ipv6RoutingTableEntry const &', 'route')]) + ## ipv6-routing-table-entry.h: ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry(ns3::Ipv6RoutingTableEntry const * route) [constructor] + cls.add_constructor([param('ns3::Ipv6RoutingTableEntry const *', 'route')]) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateDefaultRoute(ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('CreateDefaultRoute', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')], + is_static=True) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateHostRouteTo(ns3::Ipv6Address dest, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address()) [member function] + cls.add_method('CreateHostRouteTo', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'dest'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address()')], + is_static=True) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateHostRouteTo(ns3::Ipv6Address dest, uint32_t interface) [member function] + cls.add_method('CreateHostRouteTo', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'dest'), param('uint32_t', 'interface')], + is_static=True) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('CreateNetworkRouteTo', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')], + is_static=True) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse) [member function] + cls.add_method('CreateNetworkRouteTo', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse')], + is_static=True) + ## ipv6-routing-table-entry.h: static ns3::Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, uint32_t interface) [member function] + cls.add_method('CreateNetworkRouteTo', + 'ns3::Ipv6RoutingTableEntry', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('uint32_t', 'interface')], + is_static=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6RoutingTableEntry::GetDest() const [member function] + cls.add_method('GetDest', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6RoutingTableEntry::GetDestNetwork() const [member function] + cls.add_method('GetDestNetwork', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Prefix ns3::Ipv6RoutingTableEntry::GetDestNetworkPrefix() const [member function] + cls.add_method('GetDestNetworkPrefix', + 'ns3::Ipv6Prefix', + [], + is_const=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6RoutingTableEntry::GetGateway() const [member function] + cls.add_method('GetGateway', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: uint32_t ns3::Ipv6RoutingTableEntry::GetInterface() const [member function] + cls.add_method('GetInterface', + 'uint32_t', + [], + is_const=True) + ## ipv6-routing-table-entry.h: ns3::Ipv6Address ns3::Ipv6RoutingTableEntry::GetPrefixToUse() const [member function] + cls.add_method('GetPrefixToUse', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-routing-table-entry.h: bool ns3::Ipv6RoutingTableEntry::IsDefault() const [member function] + cls.add_method('IsDefault', + 'bool', + [], + is_const=True) + ## ipv6-routing-table-entry.h: bool ns3::Ipv6RoutingTableEntry::IsGateway() const [member function] + cls.add_method('IsGateway', + 'bool', + [], + is_const=True) + ## ipv6-routing-table-entry.h: bool ns3::Ipv6RoutingTableEntry::IsHost() const [member function] + cls.add_method('IsHost', + 'bool', + [], + is_const=True) + ## ipv6-routing-table-entry.h: bool ns3::Ipv6RoutingTableEntry::IsNetwork() const [member function] + cls.add_method('IsNetwork', + 'bool', + [], + is_const=True) + ## ipv6-routing-table-entry.h: void ns3::Ipv6RoutingTableEntry::SetPrefixToUse(ns3::Ipv6Address prefix) [member function] + cls.add_method('SetPrefixToUse', + 'void', + [param('ns3::Ipv6Address', 'prefix')]) + return + def register_Ns3Ipv4StaticRouting_methods(root_module, cls): ## ipv4-static-routing.h: ns3::Ipv4StaticRouting::Ipv4StaticRouting(ns3::Ipv4StaticRouting const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4StaticRouting const &', 'arg0')]) - ## ipv4-static-routing.h: static ns3::TypeId ns3::Ipv4StaticRouting::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## ipv4-static-routing.h: ns3::Ipv4StaticRouting::Ipv4StaticRouting() [constructor] cls.add_constructor([]) - ## ipv4-static-routing.h: ns3::Ptr ns3::Ipv4StaticRouting::RouteOutput(ns3::Ptr 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')], - is_virtual=True) - ## ipv4-static-routing.h: bool ns3::Ipv4StaticRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], - is_virtual=True) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyInterfaceUp(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceUp', - 'void', - [param('uint32_t', 'interface')], - is_virtual=True) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyInterfaceDown(uint32_t interface) [member function] - cls.add_method('NotifyInterfaceDown', - 'void', - [param('uint32_t', 'interface')], - is_virtual=True) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyAddAddress', - 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], - is_virtual=True) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] - cls.add_method('NotifyRemoveAddress', - 'void', - [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], - is_virtual=True) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetIpv4(ns3::Ptr ipv4) [member function] - cls.add_method('SetIpv4', - 'void', - [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], - is_virtual=True) ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddHostRouteTo(ns3::Ipv4Address dest, ns3::Ipv4Address nextHop, uint32_t interface) [member function] cls.add_method('AddHostRouteTo', 'void', @@ -244,6 +352,10 @@ def register_Ns3Ipv4StaticRouting_methods(root_module, cls): cls.add_method('AddHostRouteTo', 'void', [param('ns3::Ipv4Address', 'dest'), param('uint32_t', 'interface')]) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')]) ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddNetworkRouteTo(ns3::Ipv4Address network, ns3::Ipv4Mask networkMask, ns3::Ipv4Address nextHop, uint32_t interface) [member function] cls.add_method('AddNetworkRouteTo', 'void', @@ -252,44 +364,53 @@ def register_Ns3Ipv4StaticRouting_methods(root_module, cls): cls.add_method('AddNetworkRouteTo', 'void', [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'networkMask'), param('uint32_t', 'interface')]) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function] - cls.add_method('SetDefaultRoute', - 'void', - [param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')]) - ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNRoutes() [member function] - cls.add_method('GetNRoutes', - 'uint32_t', - []) ## ipv4-static-routing.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRouting::GetDefaultRoute() [member function] cls.add_method('GetDefaultRoute', 'ns3::Ipv4RoutingTableEntry', []) - ## ipv4-static-routing.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRouting::GetRoute(uint32_t i) [member function] - cls.add_method('GetRoute', - 'ns3::Ipv4RoutingTableEntry', - [param('uint32_t', 'i')]) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::RemoveRoute(uint32_t i) [member function] - cls.add_method('RemoveRoute', - 'void', - [param('uint32_t', 'i')]) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::AddMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function] - cls.add_method('AddMulticastRoute', - 'void', - [param('ns3::Ipv4Address', 'origin'), param('ns3::Ipv4Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')]) - ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultMulticastRoute(uint32_t outputInterface) [member function] - cls.add_method('SetDefaultMulticastRoute', - 'void', - [param('uint32_t', 'outputInterface')]) - ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNMulticastRoutes() const [member function] - cls.add_method('GetNMulticastRoutes', - 'uint32_t', - [], - is_const=True) ## ipv4-static-routing.h: ns3::Ipv4MulticastRoutingTableEntry ns3::Ipv4StaticRouting::GetMulticastRoute(uint32_t i) const [member function] cls.add_method('GetMulticastRoute', 'ns3::Ipv4MulticastRoutingTableEntry', [param('uint32_t', 'i')], is_const=True) + ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNMulticastRoutes() const [member function] + cls.add_method('GetNMulticastRoutes', + 'uint32_t', + [], + is_const=True) + ## ipv4-static-routing.h: uint32_t ns3::Ipv4StaticRouting::GetNRoutes() [member function] + cls.add_method('GetNRoutes', + 'uint32_t', + []) + ## ipv4-static-routing.h: ns3::Ipv4RoutingTableEntry ns3::Ipv4StaticRouting::GetRoute(uint32_t i) [member function] + cls.add_method('GetRoute', + 'ns3::Ipv4RoutingTableEntry', + [param('uint32_t', 'i')]) + ## ipv4-static-routing.h: static ns3::TypeId ns3::Ipv4StaticRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) ## ipv4-static-routing.h: bool ns3::Ipv4StaticRouting::RemoveMulticastRoute(ns3::Ipv4Address origin, ns3::Ipv4Address group, uint32_t inputInterface) [member function] cls.add_method('RemoveMulticastRoute', 'bool', @@ -298,6 +419,33 @@ def register_Ns3Ipv4StaticRouting_methods(root_module, cls): cls.add_method('RemoveMulticastRoute', 'void', [param('uint32_t', 'index')]) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::RemoveRoute(uint32_t i) [member function] + cls.add_method('RemoveRoute', + 'void', + [param('uint32_t', 'i')]) + ## ipv4-static-routing.h: bool ns3::Ipv4StaticRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv4Header&,ns3::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')], + is_virtual=True) + ## ipv4-static-routing.h: ns3::Ptr ns3::Ipv4StaticRouting::RouteOutput(ns3::Ptr 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')], + is_virtual=True) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultMulticastRoute(uint32_t outputInterface) [member function] + cls.add_method('SetDefaultMulticastRoute', + 'void', + [param('uint32_t', 'outputInterface')]) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetDefaultRoute(ns3::Ipv4Address nextHop, uint32_t interface) [member function] + cls.add_method('SetDefaultRoute', + 'void', + [param('ns3::Ipv4Address', 'nextHop'), param('uint32_t', 'interface')]) + ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_virtual=True) ## ipv4-static-routing.h: void ns3::Ipv4StaticRouting::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -305,6 +453,146 @@ def register_Ns3Ipv4StaticRouting_methods(root_module, cls): visibility='protected', is_virtual=True) return +def register_Ns3Ipv6StaticRouting_methods(root_module, cls): + ## ipv6-static-routing.h: ns3::Ipv6StaticRouting::Ipv6StaticRouting(ns3::Ipv6StaticRouting const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6StaticRouting const &', 'arg0')]) + ## ipv6-static-routing.h: ns3::Ipv6StaticRouting::Ipv6StaticRouting() [constructor] + cls.add_constructor([]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddHostRouteTo(ns3::Ipv6Address dest, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address(((const char*)"::"))) [member function] + cls.add_method('AddHostRouteTo', + 'void', + [param('ns3::Ipv6Address', 'dest'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address(((const char*)"::"))')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddHostRouteTo(ns3::Ipv6Address dest, uint32_t interface) [member function] + cls.add_method('AddHostRouteTo', + 'void', + [param('ns3::Ipv6Address', 'dest'), param('uint32_t', 'interface')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddMulticastRoute(ns3::Ipv6Address origin, ns3::Ipv6Address group, uint32_t inputInterface, std::vector > outputInterfaces) [member function] + cls.add_method('AddMulticastRoute', + 'void', + [param('ns3::Ipv6Address', 'origin'), param('ns3::Ipv6Address', 'group'), param('uint32_t', 'inputInterface'), param('std::vector< unsigned int >', 'outputInterfaces')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('AddNetworkRouteTo', + 'void', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse) [member function] + cls.add_method('AddNetworkRouteTo', + 'void', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::AddNetworkRouteTo(ns3::Ipv6Address network, ns3::Ipv6Prefix networkPrefix, uint32_t interface) [member function] + cls.add_method('AddNetworkRouteTo', + 'void', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'networkPrefix'), param('uint32_t', 'interface')]) + ## ipv6-static-routing.h: ns3::Ipv6RoutingTableEntry ns3::Ipv6StaticRouting::GetDefaultRoute() [member function] + cls.add_method('GetDefaultRoute', + 'ns3::Ipv6RoutingTableEntry', + []) + ## ipv6-static-routing.h: ns3::Ipv6MulticastRoutingTableEntry ns3::Ipv6StaticRouting::GetMulticastRoute(uint32_t i) const [member function] + cls.add_method('GetMulticastRoute', + 'ns3::Ipv6MulticastRoutingTableEntry', + [param('uint32_t', 'i')], + is_const=True) + ## ipv6-static-routing.h: uint32_t ns3::Ipv6StaticRouting::GetNMulticastRoutes() const [member function] + cls.add_method('GetNMulticastRoutes', + 'uint32_t', + [], + is_const=True) + ## ipv6-static-routing.h: uint32_t ns3::Ipv6StaticRouting::GetNRoutes() [member function] + cls.add_method('GetNRoutes', + 'uint32_t', + []) + ## ipv6-static-routing.h: ns3::Ipv6RoutingTableEntry ns3::Ipv6StaticRouting::GetRoute(uint32_t i) [member function] + cls.add_method('GetRoute', + 'ns3::Ipv6RoutingTableEntry', + [param('uint32_t', 'i')]) + ## ipv6-static-routing.h: static ns3::TypeId ns3::Ipv6StaticRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-static-routing.h: bool ns3::Ipv6StaticRouting::HasNetworkDest(ns3::Ipv6Address dest, uint32_t interfaceIndex) [member function] + cls.add_method('HasNetworkDest', + 'bool', + [param('ns3::Ipv6Address', 'dest'), param('uint32_t', 'interfaceIndex')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyAddRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address::GetZero( )) [member function] + cls.add_method('NotifyAddRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address::GetZero( )')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv6InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6InterfaceAddress', 'address')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::NotifyRemoveRoute(ns3::Ipv6Address dst, ns3::Ipv6Prefix mask, ns3::Ipv6Address nextHop, uint32_t interface) [member function] + cls.add_method('NotifyRemoveRoute', + 'void', + [param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Prefix', 'mask'), param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::RemoveDefaultRoute() [member function] + cls.add_method('RemoveDefaultRoute', + 'void', + []) + ## ipv6-static-routing.h: bool ns3::Ipv6StaticRouting::RemoveMulticastRoute(ns3::Ipv6Address origin, ns3::Ipv6Address group, uint32_t inputInterface) [member function] + cls.add_method('RemoveMulticastRoute', + 'bool', + [param('ns3::Ipv6Address', 'origin'), param('ns3::Ipv6Address', 'group'), param('uint32_t', 'inputInterface')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::RemoveMulticastRoute(uint32_t i) [member function] + cls.add_method('RemoveMulticastRoute', + 'void', + [param('uint32_t', 'i')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::RemoveRoute(uint32_t i) [member function] + cls.add_method('RemoveRoute', + 'void', + [param('uint32_t', 'i')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::RemoveRoute(ns3::Ipv6Address network, ns3::Ipv6Prefix prefix, uint32_t ifIndex) [member function] + cls.add_method('RemoveRoute', + 'void', + [param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'prefix'), param('uint32_t', 'ifIndex')]) + ## ipv6-static-routing.h: bool ns3::Ipv6StaticRouting::RouteInput(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr idev, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_virtual=True) + ## ipv6-static-routing.h: ns3::Ptr ns3::Ipv6StaticRouting::RouteOutput(ns3::Ptr p, ns3::Ipv6Header const & header, uint32_t oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv6Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('uint32_t', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::SetDefaultMulticastRoute(uint32_t outputInterface) [member function] + cls.add_method('SetDefaultMulticastRoute', + 'void', + [param('uint32_t', 'outputInterface')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::SetDefaultRoute(ns3::Ipv6Address nextHop, uint32_t interface, ns3::Ipv6Address prefixToUse=ns3::Ipv6Address(((const char*)"::"))) [member function] + cls.add_method('SetDefaultRoute', + 'void', + [param('ns3::Ipv6Address', 'nextHop'), param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefixToUse', default_value='ns3::Ipv6Address(((const char*)"::"))')]) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::SetIpv6(ns3::Ptr ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ptr< ns3::Ipv6 >', 'ipv6')], + is_virtual=True) + ## ipv6-static-routing.h: void ns3::Ipv6StaticRouting::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) diff --git a/bindings/python/ns3_module_stats.py b/bindings/python/ns3_module_stats.py index 63b6d9709..c0e72cf13 100644 --- a/bindings/python/ns3_module_stats.py +++ b/bindings/python/ns3_module_stats.py @@ -26,7 +26,11 @@ def register_types(module): ## packet-data-calculators.h: ns3::PacketCounterCalculator [class] module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >']) typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList') + typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >*', 'ns3::DataCalculatorList*') + typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >&', 'ns3::DataCalculatorList&') typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >', 'ns3::MetadataList') + typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >*', 'ns3::MetadataList*') + typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >&', 'ns3::MetadataList&') ## Register a nested module for the namespace Config @@ -93,10 +97,10 @@ def register_methods(root_module): return def register_Ns3DataOutputCallback_methods(root_module, cls): - ## data-output-interface.h: ns3::DataOutputCallback::DataOutputCallback(ns3::DataOutputCallback const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DataOutputCallback const &', 'arg0')]) ## data-output-interface.h: ns3::DataOutputCallback::DataOutputCallback() [constructor] cls.add_constructor([]) + ## data-output-interface.h: ns3::DataOutputCallback::DataOutputCallback(ns3::DataOutputCallback const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DataOutputCallback const &', 'arg0')]) ## data-output-interface.h: void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, int val) [member function] cls.add_method('OutputSingleton', 'void', @@ -129,28 +133,33 @@ def register_Ns3DataCalculator_methods(root_module, cls): cls.add_constructor([param('ns3::DataCalculator const &', 'arg0')]) ## data-calculator.h: ns3::DataCalculator::DataCalculator() [constructor] cls.add_constructor([]) + ## data-calculator.h: void ns3::DataCalculator::Disable() [member function] + cls.add_method('Disable', + 'void', + []) + ## data-calculator.h: void ns3::DataCalculator::Enable() [member function] + cls.add_method('Enable', + 'void', + []) ## data-calculator.h: bool ns3::DataCalculator::GetEnabled() const [member function] cls.add_method('GetEnabled', 'bool', [], is_const=True) - ## data-calculator.h: void ns3::DataCalculator::Enable() [member function] - cls.add_method('Enable', - 'void', - []) - ## data-calculator.h: void ns3::DataCalculator::Disable() [member function] - cls.add_method('Disable', - 'void', - []) - ## data-calculator.h: void ns3::DataCalculator::SetKey(std::string const key) [member function] - cls.add_method('SetKey', - 'void', - [param('std::string const', 'key')]) ## data-calculator.h: std::string ns3::DataCalculator::GetKey() const [member function] cls.add_method('GetKey', 'std::string', [], is_const=True) + ## data-calculator.h: void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function] + cls.add_method('Output', + 'void', + [param('ns3::DataOutputCallback &', 'callback')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## data-calculator.h: void ns3::DataCalculator::SetKey(std::string const key) [member function] + cls.add_method('SetKey', + 'void', + [param('std::string const', 'key')]) ## data-calculator.h: void ns3::DataCalculator::Start(ns3::Time const & startTime) [member function] cls.add_method('Start', 'void', @@ -161,11 +170,6 @@ def register_Ns3DataCalculator_methods(root_module, cls): 'void', [param('ns3::Time const &', 'stopTime')], is_virtual=True) - ## data-calculator.h: void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function] - cls.add_method('Output', - 'void', - [param('ns3::DataOutputCallback &', 'callback')], - is_pure_virtual=True, is_const=True, is_virtual=True) ## data-calculator.h: void ns3::DataCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -178,17 +182,41 @@ def register_Ns3DataCollector_methods(root_module, cls): cls.add_constructor([param('ns3::DataCollector const &', 'arg0')]) ## data-collector.h: ns3::DataCollector::DataCollector() [constructor] cls.add_constructor([]) + ## data-collector.h: void ns3::DataCollector::AddDataCalculator(ns3::Ptr datac) [member function] + cls.add_method('AddDataCalculator', + 'void', + [param('ns3::Ptr< ns3::DataCalculator >', 'datac')]) + ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, std::string value) [member function] + cls.add_method('AddMetadata', + 'void', + [param('std::string', 'key'), param('std::string', 'value')]) + ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, double value) [member function] + cls.add_method('AddMetadata', + 'void', + [param('std::string', 'key'), param('double', 'value')]) + ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, uint32_t value) [member function] + cls.add_method('AddMetadata', + 'void', + [param('std::string', 'key'), param('uint32_t', 'value')]) + ## data-collector.h: std::_List_iterator > ns3::DataCollector::DataCalculatorBegin() [member function] + cls.add_method('DataCalculatorBegin', + 'std::_List_iterator< ns3::Ptr< ns3::DataCalculator > >', + []) + ## data-collector.h: std::_List_iterator > ns3::DataCollector::DataCalculatorEnd() [member function] + cls.add_method('DataCalculatorEnd', + 'std::_List_iterator< ns3::Ptr< ns3::DataCalculator > >', + []) ## data-collector.h: void ns3::DataCollector::DescribeRun(std::string experiment, std::string strategy, std::string input, std::string runID, std::string description="") [member function] cls.add_method('DescribeRun', 'void', [param('std::string', 'experiment'), param('std::string', 'strategy'), param('std::string', 'input'), param('std::string', 'runID'), param('std::string', 'description', default_value='""')]) - ## data-collector.h: std::string ns3::DataCollector::GetExperimentLabel() const [member function] - cls.add_method('GetExperimentLabel', + ## data-collector.h: std::string ns3::DataCollector::GetDescription() const [member function] + cls.add_method('GetDescription', 'std::string', [], is_const=True) - ## data-collector.h: std::string ns3::DataCollector::GetStrategyLabel() const [member function] - cls.add_method('GetStrategyLabel', + ## data-collector.h: std::string ns3::DataCollector::GetExperimentLabel() const [member function] + cls.add_method('GetExperimentLabel', 'std::string', [], is_const=True) @@ -202,23 +230,11 @@ def register_Ns3DataCollector_methods(root_module, cls): 'std::string', [], is_const=True) - ## data-collector.h: std::string ns3::DataCollector::GetDescription() const [member function] - cls.add_method('GetDescription', + ## data-collector.h: std::string ns3::DataCollector::GetStrategyLabel() const [member function] + cls.add_method('GetStrategyLabel', 'std::string', [], is_const=True) - ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, std::string value) [member function] - cls.add_method('AddMetadata', - 'void', - [param('std::string', 'key'), param('std::string', 'value')]) - ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, double value) [member function] - cls.add_method('AddMetadata', - 'void', - [param('std::string', 'key'), param('double', 'value')]) - ## data-collector.h: void ns3::DataCollector::AddMetadata(std::string key, uint32_t value) [member function] - cls.add_method('AddMetadata', - 'void', - [param('std::string', 'key'), param('uint32_t', 'value')]) ## data-collector.h: std::_List_iterator, std::allocator >, std::basic_string, std::allocator > > > ns3::DataCollector::MetadataBegin() [member function] cls.add_method('MetadataBegin', 'std::_List_iterator< std::pair< std::basic_string< char, std::char_traits< char >, std::allocator< char > >, std::basic_string< char, std::char_traits< char >, std::allocator< char > > > >', @@ -227,18 +243,6 @@ def register_Ns3DataCollector_methods(root_module, cls): cls.add_method('MetadataEnd', 'std::_List_iterator< std::pair< std::basic_string< char, std::char_traits< char >, std::allocator< char > >, std::basic_string< char, std::char_traits< char >, std::allocator< char > > > >', []) - ## data-collector.h: void ns3::DataCollector::AddDataCalculator(ns3::Ptr datac) [member function] - cls.add_method('AddDataCalculator', - 'void', - [param('ns3::Ptr< ns3::DataCalculator >', 'datac')]) - ## data-collector.h: std::_List_iterator > ns3::DataCollector::DataCalculatorBegin() [member function] - cls.add_method('DataCalculatorBegin', - 'std::_List_iterator< ns3::Ptr< ns3::DataCalculator > >', - []) - ## data-collector.h: std::_List_iterator > ns3::DataCollector::DataCalculatorEnd() [member function] - cls.add_method('DataCalculatorEnd', - 'std::_List_iterator< ns3::Ptr< ns3::DataCalculator > >', - []) ## data-collector.h: void ns3::DataCollector::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -251,6 +255,11 @@ def register_Ns3DataOutputInterface_methods(root_module, cls): cls.add_constructor([param('ns3::DataOutputInterface const &', 'arg0')]) ## data-output-interface.h: ns3::DataOutputInterface::DataOutputInterface() [constructor] cls.add_constructor([]) + ## data-output-interface.h: std::string ns3::DataOutputInterface::GetFilePrefix() const [member function] + cls.add_method('GetFilePrefix', + 'std::string', + [], + is_const=True) ## data-output-interface.h: void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function] cls.add_method('Output', 'void', @@ -260,11 +269,6 @@ def register_Ns3DataOutputInterface_methods(root_module, cls): cls.add_method('SetFilePrefix', 'void', [param('std::string const', 'prefix')]) - ## data-output-interface.h: std::string ns3::DataOutputInterface::GetFilePrefix() const [member function] - cls.add_method('GetFilePrefix', - 'std::string', - [], - is_const=True) ## data-output-interface.h: void ns3::DataOutputInterface::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -277,15 +281,15 @@ def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls) cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')]) ## basic-data-calculators.h: ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator() [constructor] cls.add_constructor([]) - ## basic-data-calculators.h: void ns3::MinMaxAvgTotalCalculator::Update(unsigned int const i) [member function] - cls.add_method('Update', - 'void', - [param('unsigned int const', 'i')]) ## basic-data-calculators.h: void ns3::MinMaxAvgTotalCalculator::Output(ns3::DataOutputCallback & callback) const [member function] cls.add_method('Output', 'void', [param('ns3::DataOutputCallback &', 'callback')], is_const=True, is_virtual=True) + ## basic-data-calculators.h: void ns3::MinMaxAvgTotalCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) ## basic-data-calculators.h: void ns3::MinMaxAvgTotalCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -315,14 +319,14 @@ def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls): cls.add_constructor([param('ns3::PacketSizeMinMaxAvgTotalCalculator const &', 'arg0')]) ## packet-data-calculators.h: ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator() [constructor] cls.add_constructor([]) - ## packet-data-calculators.h: void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] - cls.add_method('PacketUpdate', - 'void', - [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet-data-calculators.h: void ns3::PacketSizeMinMaxAvgTotalCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] cls.add_method('FrameUpdate', 'void', [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')]) + ## packet-data-calculators.h: void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet-data-calculators.h: void ns3::PacketSizeMinMaxAvgTotalCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -352,15 +356,15 @@ def register_Ns3TimeMinMaxAvgTotalCalculator_methods(root_module, cls): cls.add_constructor([param('ns3::TimeMinMaxAvgTotalCalculator const &', 'arg0')]) ## time-data-calculators.h: ns3::TimeMinMaxAvgTotalCalculator::TimeMinMaxAvgTotalCalculator() [constructor] cls.add_constructor([]) - ## time-data-calculators.h: void ns3::TimeMinMaxAvgTotalCalculator::Update(ns3::Time const i) [member function] - cls.add_method('Update', - 'void', - [param('ns3::Time const', 'i')]) ## time-data-calculators.h: void ns3::TimeMinMaxAvgTotalCalculator::Output(ns3::DataOutputCallback & callback) const [member function] cls.add_method('Output', 'void', [param('ns3::DataOutputCallback &', 'callback')], is_const=True, is_virtual=True) + ## time-data-calculators.h: void ns3::TimeMinMaxAvgTotalCalculator::Update(ns3::Time const i) [member function] + cls.add_method('Update', + 'void', + [param('ns3::Time const', 'i')]) ## time-data-calculators.h: void ns3::TimeMinMaxAvgTotalCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -373,14 +377,6 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls): cls.add_constructor([param('ns3::CounterCalculator< unsigned int > const &', 'arg0')]) ## basic-data-calculators.h: ns3::CounterCalculator::CounterCalculator() [constructor] cls.add_constructor([]) - ## basic-data-calculators.h: void ns3::CounterCalculator::Update() [member function] - cls.add_method('Update', - 'void', - []) - ## basic-data-calculators.h: void ns3::CounterCalculator::Update(unsigned int const i) [member function] - cls.add_method('Update', - 'void', - [param('unsigned int const', 'i')]) ## basic-data-calculators.h: unsigned int ns3::CounterCalculator::GetCount() const [member function] cls.add_method('GetCount', 'unsigned int', @@ -391,6 +387,14 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls): 'void', [param('ns3::DataOutputCallback &', 'callback')], is_const=True, is_virtual=True) + ## basic-data-calculators.h: void ns3::CounterCalculator::Update() [member function] + cls.add_method('Update', + 'void', + []) + ## basic-data-calculators.h: void ns3::CounterCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) ## basic-data-calculators.h: void ns3::CounterCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -403,14 +407,14 @@ def register_Ns3PacketCounterCalculator_methods(root_module, cls): cls.add_constructor([param('ns3::PacketCounterCalculator const &', 'arg0')]) ## packet-data-calculators.h: ns3::PacketCounterCalculator::PacketCounterCalculator() [constructor] cls.add_constructor([]) - ## packet-data-calculators.h: void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] - cls.add_method('PacketUpdate', - 'void', - [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet-data-calculators.h: void ns3::PacketCounterCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] cls.add_method('FrameUpdate', 'void', [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')]) + ## packet-data-calculators.h: void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet-data-calculators.h: void ns3::PacketCounterCalculator::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_tap_bridge.py b/bindings/python/ns3_module_tap_bridge.py index c3d2526aa..69cb7737f 100644 --- a/bindings/python/ns3_module_tap_bridge.py +++ b/bindings/python/ns3_module_tap_bridge.py @@ -65,45 +65,20 @@ def register_methods(root_module): def register_Ns3TapBridge_methods(root_module, cls): ## tap-bridge.h: ns3::TapBridge::TapBridge(ns3::TapBridge const & arg0) [copy constructor] cls.add_constructor([param('ns3::TapBridge const &', 'arg0')]) - ## tap-bridge.h: static ns3::TypeId ns3::TapBridge::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## tap-bridge.h: ns3::TapBridge::TapBridge() [constructor] cls.add_constructor([]) + ## tap-bridge.h: ns3::Address ns3::TapBridge::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Address', + [], + is_const=True, is_virtual=True) ## tap-bridge.h: ns3::Ptr ns3::TapBridge::GetBridgedNetDevice() [member function] cls.add_method('GetBridgedNetDevice', 'ns3::Ptr< ns3::NetDevice >', []) - ## tap-bridge.h: void ns3::TapBridge::SetBridgedNetDevice(ns3::Ptr bridgedDevice) [member function] - cls.add_method('SetBridgedNetDevice', - 'void', - [param('ns3::Ptr< ns3::NetDevice >', 'bridgedDevice')]) - ## tap-bridge.h: void ns3::TapBridge::Start(ns3::Time tStart) [member function] - cls.add_method('Start', - 'void', - [param('ns3::Time', 'tStart')]) - ## tap-bridge.h: void ns3::TapBridge::Stop(ns3::Time tStop) [member function] - cls.add_method('Stop', - 'void', - [param('ns3::Time', 'tStop')]) - ## tap-bridge.h: void ns3::TapBridge::SetMode(ns3::TapBridge::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::TapBridge::Mode', 'mode')]) - ## tap-bridge.h: ns3::TapBridge::Mode ns3::TapBridge::GetMode() [member function] - cls.add_method('GetMode', - 'ns3::TapBridge::Mode', - []) - ## tap-bridge.h: void ns3::TapBridge::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## tap-bridge.h: uint32_t ns3::TapBridge::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', + ## tap-bridge.h: ns3::Address ns3::TapBridge::GetBroadcast() const [member function] + cls.add_method('GetBroadcast', + 'ns3::Address', [], is_const=True, is_virtual=True) ## tap-bridge.h: ns3::Ptr ns3::TapBridge::GetChannel() const [member function] @@ -111,63 +86,67 @@ def register_Ns3TapBridge_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) - ## tap-bridge.h: void ns3::TapBridge::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) - ## tap-bridge.h: ns3::Address ns3::TapBridge::GetAddress() const [member function] - cls.add_method('GetAddress', - 'ns3::Address', + ## tap-bridge.h: uint32_t ns3::TapBridge::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', [], is_const=True, is_virtual=True) - ## tap-bridge.h: bool ns3::TapBridge::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) + ## tap-bridge.h: ns3::TapBridge::Mode ns3::TapBridge::GetMode() [member function] + cls.add_method('GetMode', + 'ns3::TapBridge::Mode', + []) ## tap-bridge.h: uint16_t ns3::TapBridge::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_const=True, is_virtual=True) - ## tap-bridge.h: bool ns3::TapBridge::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## tap-bridge.h: void ns3::TapBridge::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## tap-bridge.h: bool ns3::TapBridge::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) - ## tap-bridge.h: ns3::Address ns3::TapBridge::GetBroadcast() const [member function] - cls.add_method('GetBroadcast', - 'ns3::Address', - [], - is_const=True, is_virtual=True) - ## tap-bridge.h: bool ns3::TapBridge::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', - [], - is_const=True, is_virtual=True) ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) + ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv6Address addr) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv6Address', 'addr')], + is_const=True, is_virtual=True) + ## tap-bridge.h: ns3::Ptr ns3::TapBridge::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) + ## tap-bridge.h: static ns3::TypeId ns3::TapBridge::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## tap-bridge.h: bool ns3::TapBridge::IsBridge() const [member function] + cls.add_method('IsBridge', + 'bool', + [], + is_const=True, is_virtual=True) + ## tap-bridge.h: bool ns3::TapBridge::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## tap-bridge.h: bool ns3::TapBridge::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## tap-bridge.h: bool ns3::TapBridge::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) ## tap-bridge.h: bool ns3::TapBridge::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) - ## tap-bridge.h: bool ns3::TapBridge::IsBridge() const [member function] - cls.add_method('IsBridge', + ## tap-bridge.h: bool ns3::TapBridge::NeedsArp() const [member function] + cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) @@ -181,41 +160,67 @@ def register_Ns3TapBridge_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## tap-bridge.h: ns3::Ptr ns3::TapBridge::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## tap-bridge.h: void ns3::TapBridge::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## tap-bridge.h: void ns3::TapBridge::SetBridgedNetDevice(ns3::Ptr bridgedDevice) [member function] + cls.add_method('SetBridgedNetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'bridgedDevice')]) + ## tap-bridge.h: void ns3::TapBridge::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## tap-bridge.h: void ns3::TapBridge::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## tap-bridge.h: void ns3::TapBridge::SetMode(ns3::TapBridge::Mode mode) [member function] + cls.add_method('SetMode', + 'void', + [param('ns3::TapBridge::Mode', 'mode')]) + ## tap-bridge.h: bool ns3::TapBridge::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) ## tap-bridge.h: void ns3::TapBridge::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## tap-bridge.h: bool ns3::TapBridge::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## tap-bridge.h: void ns3::TapBridge::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## tap-bridge.h: void ns3::TapBridge::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## tap-bridge.h: void ns3::TapBridge::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## tap-bridge.h: void ns3::TapBridge::Start(ns3::Time tStart) [member function] + cls.add_method('Start', + 'void', + [param('ns3::Time', 'tStart')]) + ## tap-bridge.h: void ns3::TapBridge::Stop(ns3::Time tStop) [member function] + cls.add_method('Stop', + 'void', + [param('ns3::Time', 'tStop')]) ## tap-bridge.h: bool ns3::TapBridge::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) - ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv6Address addr) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv6Address', 'addr')], - is_const=True, is_virtual=True) + ## tap-bridge.h: bool ns3::TapBridge::DiscardFromBridgedDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & src) [member function] + cls.add_method('DiscardFromBridgedDevice', + 'bool', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src')], + visibility='protected') ## tap-bridge.h: void ns3::TapBridge::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -226,11 +231,6 @@ def register_Ns3TapBridge_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src'), param('ns3::Address const &', 'dst'), param('ns3::NetDevice::PacketType', 'packetType')], visibility='protected') - ## tap-bridge.h: bool ns3::TapBridge::DiscardFromBridgedDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & src) [member function] - cls.add_method('DiscardFromBridgedDevice', - 'bool', - [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src')], - visibility='protected') return def register_functions(root_module): diff --git a/bindings/python/ns3_module_udp_echo.py b/bindings/python/ns3_module_udp_echo.py index bba199157..d85d1a899 100644 --- a/bindings/python/ns3_module_udp_echo.py +++ b/bindings/python/ns3_module_udp_echo.py @@ -66,26 +66,22 @@ def register_methods(root_module): def register_Ns3UdpEchoClient_methods(root_module, cls): ## udp-echo-client.h: ns3::UdpEchoClient::UdpEchoClient(ns3::UdpEchoClient const & arg0) [copy constructor] cls.add_constructor([param('ns3::UdpEchoClient const &', 'arg0')]) - ## udp-echo-client.h: static ns3::TypeId ns3::UdpEchoClient::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## udp-echo-client.h: ns3::UdpEchoClient::UdpEchoClient() [constructor] cls.add_constructor([]) - ## udp-echo-client.h: void ns3::UdpEchoClient::SetRemote(ns3::Ipv4Address ip, uint16_t port) [member function] - cls.add_method('SetRemote', - 'void', - [param('ns3::Ipv4Address', 'ip'), param('uint16_t', 'port')]) - ## udp-echo-client.h: void ns3::UdpEchoClient::SetDataSize(uint32_t dataSize) [member function] - cls.add_method('SetDataSize', - 'void', - [param('uint32_t', 'dataSize')]) ## udp-echo-client.h: uint32_t ns3::UdpEchoClient::GetDataSize() const [member function] cls.add_method('GetDataSize', 'uint32_t', [], is_const=True) + ## udp-echo-client.h: static ns3::TypeId ns3::UdpEchoClient::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetDataSize(uint32_t dataSize) [member function] + cls.add_method('SetDataSize', + 'void', + [param('uint32_t', 'dataSize')]) ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(std::string fill) [member function] cls.add_method('SetFill', 'void', @@ -98,6 +94,10 @@ def register_Ns3UdpEchoClient_methods(root_module, cls): cls.add_method('SetFill', 'void', [param('uint8_t *', 'fill'), param('uint32_t', 'fillSize'), param('uint32_t', 'dataSize')]) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetRemote(ns3::Ipv4Address ip, uint16_t port) [member function] + cls.add_method('SetRemote', + 'void', + [param('ns3::Ipv4Address', 'ip'), param('uint16_t', 'port')]) ## udp-echo-client.h: void ns3::UdpEchoClient::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -118,13 +118,13 @@ def register_Ns3UdpEchoClient_methods(root_module, cls): def register_Ns3UdpEchoServer_methods(root_module, cls): ## udp-echo-server.h: ns3::UdpEchoServer::UdpEchoServer(ns3::UdpEchoServer const & arg0) [copy constructor] cls.add_constructor([param('ns3::UdpEchoServer const &', 'arg0')]) + ## udp-echo-server.h: ns3::UdpEchoServer::UdpEchoServer() [constructor] + cls.add_constructor([]) ## udp-echo-server.h: static ns3::TypeId ns3::UdpEchoServer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## udp-echo-server.h: ns3::UdpEchoServer::UdpEchoServer() [constructor] - cls.add_constructor([]) ## udp-echo-server.h: void ns3::UdpEchoServer::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_v4ping.py b/bindings/python/ns3_module_v4ping.py index 3305759f2..e80c90110 100644 --- a/bindings/python/ns3_module_v4ping.py +++ b/bindings/python/ns3_module_v4ping.py @@ -63,13 +63,18 @@ def register_methods(root_module): def register_Ns3V4Ping_methods(root_module, cls): ## v4ping.h: ns3::V4Ping::V4Ping(ns3::V4Ping const & arg0) [copy constructor] cls.add_constructor([param('ns3::V4Ping const &', 'arg0')]) + ## v4ping.h: ns3::V4Ping::V4Ping() [constructor] + cls.add_constructor([]) ## v4ping.h: static ns3::TypeId ns3::V4Ping::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## v4ping.h: ns3::V4Ping::V4Ping() [constructor] - cls.add_constructor([]) + ## v4ping.h: void ns3::V4Ping::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) ## v4ping.h: void ns3::V4Ping::StartApplication() [member function] cls.add_method('StartApplication', 'void', @@ -80,11 +85,6 @@ def register_Ns3V4Ping_methods(root_module, cls): 'void', [], visibility='private', is_virtual=True) - ## v4ping.h: void ns3::V4Ping::DoDispose() [member function] - cls.add_method('DoDispose', - 'void', - [], - visibility='private', is_virtual=True) return def register_functions(root_module): diff --git a/bindings/python/ns3_module_virtual_net_device.py b/bindings/python/ns3_module_virtual_net_device.py index 898170312..b635c1d37 100644 --- a/bindings/python/ns3_module_virtual_net_device.py +++ b/bindings/python/ns3_module_virtual_net_device.py @@ -63,91 +63,31 @@ def register_methods(root_module): def register_Ns3VirtualNetDevice_methods(root_module, cls): ## virtual-net-device.h: ns3::VirtualNetDevice::VirtualNetDevice(ns3::VirtualNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::VirtualNetDevice const &', 'arg0')]) - ## virtual-net-device.h: static ns3::TypeId ns3::VirtualNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## virtual-net-device.h: ns3::VirtualNetDevice::VirtualNetDevice() [constructor] cls.add_constructor([]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetSendCallback(ns3::Callback, ns3::Address const&, ns3::Address const&, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> transmitCb) [member function] - cls.add_method('SetSendCallback', - 'void', - [param('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::Address const &, ns3::Address const &, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'transmitCb')]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetNeedsArp(bool needsArp) [member function] - cls.add_method('SetNeedsArp', - 'void', - [param('bool', 'needsArp')]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetIsPointToPoint(bool isPointToPoint) [member function] - cls.add_method('SetIsPointToPoint', - 'void', - [param('bool', 'isPointToPoint')]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetSupportsSendFrom(bool supportsSendFrom) [member function] - cls.add_method('SetSupportsSendFrom', - 'void', - [param('bool', 'supportsSendFrom')]) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', - 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::Receive(ns3::Ptr packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function] - cls.add_method('Receive', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## virtual-net-device.h: uint32_t ns3::VirtualNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## virtual-net-device.h: ns3::Ptr ns3::VirtualNetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], - is_const=True, is_virtual=True) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) ## virtual-net-device.h: ns3::Address ns3::VirtualNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) - ## virtual-net-device.h: uint16_t ns3::VirtualNetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', - [], - is_const=True, is_virtual=True) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsLinkUp() const [member function] - cls.add_method('IsLinkUp', - 'bool', - [], - is_const=True, is_virtual=True) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) ## virtual-net-device.h: ns3::Address ns3::VirtualNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsMulticast() const [member function] - cls.add_method('IsMulticast', - 'bool', + ## virtual-net-device.h: ns3::Ptr ns3::VirtualNetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: uint32_t ns3::VirtualNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: uint16_t ns3::VirtualNetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', [], is_const=True, is_virtual=True) ## virtual-net-device.h: ns3::Address ns3::VirtualNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] @@ -160,11 +100,50 @@ def register_Ns3VirtualNetDevice_methods(root_module, cls): 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_const=True, is_virtual=True) + ## virtual-net-device.h: ns3::Ptr ns3::VirtualNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: static ns3::TypeId ns3::VirtualNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsBridge() const [member function] + cls.add_method('IsBridge', + 'bool', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsLinkUp() const [member function] + cls.add_method('IsLinkUp', + 'bool', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsMulticast() const [member function] + cls.add_method('IsMulticast', + 'bool', + [], + is_const=True, is_virtual=True) ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', + 'bool', + [], + is_const=True, is_virtual=True) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::Receive(ns3::Ptr packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function] + cls.add_method('Receive', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')]) ## virtual-net-device.h: bool ns3::VirtualNetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', @@ -175,41 +154,62 @@ def register_Ns3VirtualNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## virtual-net-device.h: ns3::Ptr ns3::VirtualNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetIsPointToPoint(bool isPointToPoint) [member function] + cls.add_method('SetIsPointToPoint', + 'void', + [param('bool', 'isPointToPoint')]) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## virtual-net-device.h: bool ns3::VirtualNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetNeedsArp(bool needsArp) [member function] + cls.add_method('SetNeedsArp', + 'void', + [param('bool', 'needsArp')]) ## virtual-net-device.h: void ns3::VirtualNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) ## virtual-net-device.h: void ns3::VirtualNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetSendCallback(ns3::Callback, ns3::Address const&, ns3::Address const&, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> transmitCb) [member function] + cls.add_method('SetSendCallback', + 'void', + [param('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::Address const &, ns3::Address const &, unsigned short, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'transmitCb')]) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetSupportsSendFrom(bool supportsSendFrom) [member function] + cls.add_method('SetSupportsSendFrom', + 'void', + [param('bool', 'supportsSendFrom')]) ## virtual-net-device.h: bool ns3::VirtualNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) - ## virtual-net-device.h: bool ns3::VirtualNetDevice::IsBridge() const [member function] - cls.add_method('IsBridge', - 'bool', - [], - is_const=True, is_virtual=True) ## virtual-net-device.h: void ns3::VirtualNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py index 211a8fe2f..9e3c360dd 100644 --- a/bindings/python/ns3_module_wifi.py +++ b/bindings/python/ns3_module_wifi.py @@ -176,8 +176,14 @@ def register_types(module): ## dca-txop.h: ns3::DcaTxop [class] module.add_class('DcaTxop', parent=root_module['ns3::Dcf']) typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >', 'ns3::MinstrelRate') + typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >*', 'ns3::MinstrelRate*') + typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >&', 'ns3::MinstrelRate&') typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >', 'ns3::SampleRate') + typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >*', 'ns3::SampleRate*') + typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >&', 'ns3::SampleRate&') typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >', 'ns3::Thresholds') + typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >*', 'ns3::Thresholds*') + typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >&', 'ns3::Thresholds&') ## Register a nested module for the namespace Config @@ -314,14 +320,15 @@ def register_Ns3CapabilityInformation_methods(root_module, cls): cls.add_constructor([param('ns3::CapabilityInformation const &', 'arg0')]) ## capability-information.h: ns3::CapabilityInformation::CapabilityInformation() [constructor] cls.add_constructor([]) - ## capability-information.h: void ns3::CapabilityInformation::SetEss() [member function] - cls.add_method('SetEss', - 'void', - []) - ## capability-information.h: void ns3::CapabilityInformation::SetIbss() [member function] - cls.add_method('SetIbss', - 'void', - []) + ## capability-information.h: ns3::Buffer::Iterator ns3::CapabilityInformation::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'ns3::Buffer::Iterator', + [param('ns3::Buffer::Iterator', 'start')]) + ## capability-information.h: uint32_t ns3::CapabilityInformation::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True) ## capability-information.h: bool ns3::CapabilityInformation::IsEss() const [member function] cls.add_method('IsEss', 'bool', @@ -332,20 +339,19 @@ def register_Ns3CapabilityInformation_methods(root_module, cls): 'bool', [], is_const=True) - ## capability-information.h: uint32_t ns3::CapabilityInformation::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) ## capability-information.h: ns3::Buffer::Iterator ns3::CapabilityInformation::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'ns3::Buffer::Iterator', [param('ns3::Buffer::Iterator', 'start')], is_const=True) - ## capability-information.h: ns3::Buffer::Iterator ns3::CapabilityInformation::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'ns3::Buffer::Iterator', - [param('ns3::Buffer::Iterator', 'start')]) + ## capability-information.h: void ns3::CapabilityInformation::SetEss() [member function] + cls.add_method('SetEss', + 'void', + []) + ## capability-information.h: void ns3::CapabilityInformation::SetIbss() [member function] + cls.add_method('SetIbss', + 'void', + []) return def register_Ns3DcfManager_methods(root_module, cls): @@ -353,53 +359,29 @@ def register_Ns3DcfManager_methods(root_module, cls): cls.add_constructor([param('ns3::DcfManager const &', 'arg0')]) ## dcf-manager.h: ns3::DcfManager::DcfManager() [constructor] cls.add_constructor([]) - ## dcf-manager.h: void ns3::DcfManager::SetupPhyListener(ns3::Ptr phy) [member function] - cls.add_method('SetupPhyListener', + ## dcf-manager.h: void ns3::DcfManager::Add(ns3::DcfState * dcf) [member function] + cls.add_method('Add', 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) - ## dcf-manager.h: void ns3::DcfManager::SetupLowListener(ns3::Ptr low) [member function] - cls.add_method('SetupLowListener', - 'void', - [param('ns3::Ptr< ns3::MacLow >', 'low')]) - ## dcf-manager.h: void ns3::DcfManager::SetSlot(ns3::Time slotTime) [member function] - cls.add_method('SetSlot', - 'void', - [param('ns3::Time', 'slotTime')]) - ## dcf-manager.h: void ns3::DcfManager::SetSifs(ns3::Time sifs) [member function] - cls.add_method('SetSifs', - 'void', - [param('ns3::Time', 'sifs')]) - ## dcf-manager.h: void ns3::DcfManager::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] - cls.add_method('SetEifsNoDifs', - 'void', - [param('ns3::Time', 'eifsNoDifs')]) + [param('ns3::DcfState *', 'dcf')]) ## dcf-manager.h: ns3::Time ns3::DcfManager::GetEifsNoDifs() const [member function] cls.add_method('GetEifsNoDifs', 'ns3::Time', [], is_const=True) - ## dcf-manager.h: void ns3::DcfManager::Add(ns3::DcfState * dcf) [member function] - cls.add_method('Add', + ## dcf-manager.h: void ns3::DcfManager::NotifyAckTimeoutResetNow() [member function] + cls.add_method('NotifyAckTimeoutResetNow', 'void', - [param('ns3::DcfState *', 'dcf')]) - ## dcf-manager.h: void ns3::DcfManager::RequestAccess(ns3::DcfState * state) [member function] - cls.add_method('RequestAccess', - 'void', - [param('ns3::DcfState *', 'state')]) - ## dcf-manager.h: void ns3::DcfManager::NotifyRxStartNow(ns3::Time duration) [member function] - cls.add_method('NotifyRxStartNow', + []) + ## dcf-manager.h: void ns3::DcfManager::NotifyAckTimeoutStartNow(ns3::Time duration) [member function] + cls.add_method('NotifyAckTimeoutStartNow', 'void', [param('ns3::Time', 'duration')]) - ## dcf-manager.h: void ns3::DcfManager::NotifyRxEndOkNow() [member function] - cls.add_method('NotifyRxEndOkNow', + ## dcf-manager.h: void ns3::DcfManager::NotifyCtsTimeoutResetNow() [member function] + cls.add_method('NotifyCtsTimeoutResetNow', 'void', []) - ## dcf-manager.h: void ns3::DcfManager::NotifyRxEndErrorNow() [member function] - cls.add_method('NotifyRxEndErrorNow', - 'void', - []) - ## dcf-manager.h: void ns3::DcfManager::NotifyTxStartNow(ns3::Time duration) [member function] - cls.add_method('NotifyTxStartNow', + ## dcf-manager.h: void ns3::DcfManager::NotifyCtsTimeoutStartNow(ns3::Time duration) [member function] + cls.add_method('NotifyCtsTimeoutStartNow', 'void', [param('ns3::Time', 'duration')]) ## dcf-manager.h: void ns3::DcfManager::NotifyMaybeCcaBusyStartNow(ns3::Time duration) [member function] @@ -414,22 +396,46 @@ def register_Ns3DcfManager_methods(root_module, cls): cls.add_method('NotifyNavStartNow', 'void', [param('ns3::Time', 'duration')]) - ## dcf-manager.h: void ns3::DcfManager::NotifyAckTimeoutStartNow(ns3::Time duration) [member function] - cls.add_method('NotifyAckTimeoutStartNow', - 'void', - [param('ns3::Time', 'duration')]) - ## dcf-manager.h: void ns3::DcfManager::NotifyAckTimeoutResetNow() [member function] - cls.add_method('NotifyAckTimeoutResetNow', + ## dcf-manager.h: void ns3::DcfManager::NotifyRxEndErrorNow() [member function] + cls.add_method('NotifyRxEndErrorNow', 'void', []) - ## dcf-manager.h: void ns3::DcfManager::NotifyCtsTimeoutStartNow(ns3::Time duration) [member function] - cls.add_method('NotifyCtsTimeoutStartNow', - 'void', - [param('ns3::Time', 'duration')]) - ## dcf-manager.h: void ns3::DcfManager::NotifyCtsTimeoutResetNow() [member function] - cls.add_method('NotifyCtsTimeoutResetNow', + ## dcf-manager.h: void ns3::DcfManager::NotifyRxEndOkNow() [member function] + cls.add_method('NotifyRxEndOkNow', 'void', []) + ## dcf-manager.h: void ns3::DcfManager::NotifyRxStartNow(ns3::Time duration) [member function] + cls.add_method('NotifyRxStartNow', + 'void', + [param('ns3::Time', 'duration')]) + ## dcf-manager.h: void ns3::DcfManager::NotifyTxStartNow(ns3::Time duration) [member function] + cls.add_method('NotifyTxStartNow', + 'void', + [param('ns3::Time', 'duration')]) + ## dcf-manager.h: void ns3::DcfManager::RequestAccess(ns3::DcfState * state) [member function] + cls.add_method('RequestAccess', + 'void', + [param('ns3::DcfState *', 'state')]) + ## dcf-manager.h: void ns3::DcfManager::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] + cls.add_method('SetEifsNoDifs', + 'void', + [param('ns3::Time', 'eifsNoDifs')]) + ## dcf-manager.h: void ns3::DcfManager::SetSifs(ns3::Time sifs) [member function] + cls.add_method('SetSifs', + 'void', + [param('ns3::Time', 'sifs')]) + ## dcf-manager.h: void ns3::DcfManager::SetSlot(ns3::Time slotTime) [member function] + cls.add_method('SetSlot', + 'void', + [param('ns3::Time', 'slotTime')]) + ## dcf-manager.h: void ns3::DcfManager::SetupLowListener(ns3::Ptr low) [member function] + cls.add_method('SetupLowListener', + 'void', + [param('ns3::Ptr< ns3::MacLow >', 'low')]) + ## dcf-manager.h: void ns3::DcfManager::SetupPhyListener(ns3::Ptr phy) [member function] + cls.add_method('SetupPhyListener', + 'void', + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) return def register_Ns3DcfState_methods(root_module, cls): @@ -437,25 +443,13 @@ def register_Ns3DcfState_methods(root_module, cls): cls.add_constructor([param('ns3::DcfState const &', 'arg0')]) ## dcf-manager.h: ns3::DcfState::DcfState() [constructor] cls.add_constructor([]) - ## dcf-manager.h: void ns3::DcfState::SetAifsn(uint32_t aifsn) [member function] - cls.add_method('SetAifsn', - 'void', - [param('uint32_t', 'aifsn')]) - ## dcf-manager.h: void ns3::DcfState::SetCwMin(uint32_t minCw) [member function] - cls.add_method('SetCwMin', - 'void', - [param('uint32_t', 'minCw')]) - ## dcf-manager.h: void ns3::DcfState::SetCwMax(uint32_t maxCw) [member function] - cls.add_method('SetCwMax', - 'void', - [param('uint32_t', 'maxCw')]) ## dcf-manager.h: uint32_t ns3::DcfState::GetAifsn() const [member function] cls.add_method('GetAifsn', 'uint32_t', [], is_const=True) - ## dcf-manager.h: uint32_t ns3::DcfState::GetCwMin() const [member function] - cls.add_method('GetCwMin', + ## dcf-manager.h: uint32_t ns3::DcfState::GetCw() const [member function] + cls.add_method('GetCw', 'uint32_t', [], is_const=True) @@ -464,20 +458,8 @@ def register_Ns3DcfState_methods(root_module, cls): 'uint32_t', [], is_const=True) - ## dcf-manager.h: void ns3::DcfState::ResetCw() [member function] - cls.add_method('ResetCw', - 'void', - []) - ## dcf-manager.h: void ns3::DcfState::UpdateFailedCw() [member function] - cls.add_method('UpdateFailedCw', - 'void', - []) - ## dcf-manager.h: void ns3::DcfState::StartBackoffNow(uint32_t nSlots) [member function] - cls.add_method('StartBackoffNow', - 'void', - [param('uint32_t', 'nSlots')]) - ## dcf-manager.h: uint32_t ns3::DcfState::GetCw() const [member function] - cls.add_method('GetCw', + ## dcf-manager.h: uint32_t ns3::DcfState::GetCwMin() const [member function] + cls.add_method('GetCwMin', 'uint32_t', [], is_const=True) @@ -486,18 +468,42 @@ def register_Ns3DcfState_methods(root_module, cls): 'bool', [], is_const=True) + ## dcf-manager.h: void ns3::DcfState::ResetCw() [member function] + cls.add_method('ResetCw', + 'void', + []) + ## dcf-manager.h: void ns3::DcfState::SetAifsn(uint32_t aifsn) [member function] + cls.add_method('SetAifsn', + 'void', + [param('uint32_t', 'aifsn')]) + ## dcf-manager.h: void ns3::DcfState::SetCwMax(uint32_t maxCw) [member function] + cls.add_method('SetCwMax', + 'void', + [param('uint32_t', 'maxCw')]) + ## dcf-manager.h: void ns3::DcfState::SetCwMin(uint32_t minCw) [member function] + cls.add_method('SetCwMin', + 'void', + [param('uint32_t', 'minCw')]) + ## dcf-manager.h: void ns3::DcfState::StartBackoffNow(uint32_t nSlots) [member function] + cls.add_method('StartBackoffNow', + 'void', + [param('uint32_t', 'nSlots')]) + ## dcf-manager.h: void ns3::DcfState::UpdateFailedCw() [member function] + cls.add_method('UpdateFailedCw', + 'void', + []) ## dcf-manager.h: void ns3::DcfState::DoNotifyAccessGranted() [member function] cls.add_method('DoNotifyAccessGranted', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) - ## dcf-manager.h: void ns3::DcfState::DoNotifyInternalCollision() [member function] - cls.add_method('DoNotifyInternalCollision', + ## dcf-manager.h: void ns3::DcfState::DoNotifyCollision() [member function] + cls.add_method('DoNotifyCollision', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) - ## dcf-manager.h: void ns3::DcfState::DoNotifyCollision() [member function] - cls.add_method('DoNotifyCollision', + ## dcf-manager.h: void ns3::DcfState::DoNotifyInternalCollision() [member function] + cls.add_method('DoNotifyInternalCollision', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) @@ -579,28 +585,13 @@ def register_Ns3MacLowDcfListener_methods(root_module, cls): cls.add_constructor([param('ns3::MacLowDcfListener const &', 'arg0')]) ## mac-low.h: ns3::MacLowDcfListener::MacLowDcfListener() [constructor] cls.add_constructor([]) - ## mac-low.h: void ns3::MacLowDcfListener::NavStart(ns3::Time duration) [member function] - cls.add_method('NavStart', - 'void', - [param('ns3::Time', 'duration')], - is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowDcfListener::NavReset(ns3::Time duration) [member function] - cls.add_method('NavReset', - 'void', - [param('ns3::Time', 'duration')], - is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowDcfListener::AckTimeoutStart(ns3::Time duration) [member function] - cls.add_method('AckTimeoutStart', - 'void', - [param('ns3::Time', 'duration')], - is_pure_virtual=True, is_virtual=True) ## mac-low.h: void ns3::MacLowDcfListener::AckTimeoutReset() [member function] cls.add_method('AckTimeoutReset', 'void', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowDcfListener::CtsTimeoutStart(ns3::Time duration) [member function] - cls.add_method('CtsTimeoutStart', + ## mac-low.h: void ns3::MacLowDcfListener::AckTimeoutStart(ns3::Time duration) [member function] + cls.add_method('AckTimeoutStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) @@ -609,6 +600,21 @@ def register_Ns3MacLowDcfListener_methods(root_module, cls): 'void', [], is_pure_virtual=True, is_virtual=True) + ## mac-low.h: void ns3::MacLowDcfListener::CtsTimeoutStart(ns3::Time duration) [member function] + cls.add_method('CtsTimeoutStart', + 'void', + [param('ns3::Time', 'duration')], + is_pure_virtual=True, is_virtual=True) + ## mac-low.h: void ns3::MacLowDcfListener::NavReset(ns3::Time duration) [member function] + cls.add_method('NavReset', + 'void', + [param('ns3::Time', 'duration')], + is_pure_virtual=True, is_virtual=True) + ## mac-low.h: void ns3::MacLowDcfListener::NavStart(ns3::Time duration) [member function] + cls.add_method('NavStart', + 'void', + [param('ns3::Time', 'duration')], + is_pure_virtual=True, is_virtual=True) return def register_Ns3MacLowTransmissionListener_methods(root_module, cls): @@ -616,13 +622,8 @@ def register_Ns3MacLowTransmissionListener_methods(root_module, cls): cls.add_constructor([param('ns3::MacLowTransmissionListener const &', 'arg0')]) ## mac-low.h: ns3::MacLowTransmissionListener::MacLowTransmissionListener() [constructor] cls.add_constructor([]) - ## mac-low.h: void ns3::MacLowTransmissionListener::GotCts(double snr, ns3::WifiMode txMode) [member function] - cls.add_method('GotCts', - 'void', - [param('double', 'snr'), param('ns3::WifiMode', 'txMode')], - is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowTransmissionListener::MissedCts() [member function] - cls.add_method('MissedCts', + ## mac-low.h: void ns3::MacLowTransmissionListener::Cancel() [member function] + cls.add_method('Cancel', 'void', [], is_pure_virtual=True, is_virtual=True) @@ -631,18 +632,23 @@ def register_Ns3MacLowTransmissionListener_methods(root_module, cls): 'void', [param('double', 'snr'), param('ns3::WifiMode', 'txMode')], is_pure_virtual=True, is_virtual=True) + ## mac-low.h: void ns3::MacLowTransmissionListener::GotCts(double snr, ns3::WifiMode txMode) [member function] + cls.add_method('GotCts', + 'void', + [param('double', 'snr'), param('ns3::WifiMode', 'txMode')], + is_pure_virtual=True, is_virtual=True) ## mac-low.h: void ns3::MacLowTransmissionListener::MissedAck() [member function] cls.add_method('MissedAck', 'void', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowTransmissionListener::StartNext() [member function] - cls.add_method('StartNext', + ## mac-low.h: void ns3::MacLowTransmissionListener::MissedCts() [member function] + cls.add_method('MissedCts', 'void', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h: void ns3::MacLowTransmissionListener::Cancel() [member function] - cls.add_method('Cancel', + ## mac-low.h: void ns3::MacLowTransmissionListener::StartNext() [member function] + cls.add_method('StartNext', 'void', [], is_pure_virtual=True, is_virtual=True) @@ -746,45 +752,45 @@ def register_Ns3MacRxMiddle_methods(root_module, cls): cls.add_constructor([param('ns3::MacRxMiddle const &', 'arg0')]) ## mac-rx-middle.h: ns3::MacRxMiddle::MacRxMiddle() [constructor] cls.add_constructor([]) - ## mac-rx-middle.h: void ns3::MacRxMiddle::SetForwardCallback(ns3::Callback, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] - cls.add_method('SetForwardCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## mac-rx-middle.h: void ns3::MacRxMiddle::Receive(ns3::Ptr packet, ns3::WifiMacHeader const * hdr) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr')]) + ## mac-rx-middle.h: void ns3::MacRxMiddle::SetForwardCallback(ns3::Callback, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] + cls.add_method('SetForwardCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) return def register_Ns3RateInfo_methods(root_module, cls): - ## minstrel-wifi-manager.h: ns3::RateInfo::perfectTxTime [variable] - cls.add_instance_attribute('perfectTxTime', 'ns3::Time', is_const=False) - ## minstrel-wifi-manager.h: ns3::RateInfo::retryCount [variable] - cls.add_instance_attribute('retryCount', 'uint32_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::RateInfo() [constructor] + cls.add_constructor([]) + ## minstrel-wifi-manager.h: ns3::RateInfo::RateInfo(ns3::RateInfo const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RateInfo const &', 'arg0')]) ## minstrel-wifi-manager.h: ns3::RateInfo::adjustedRetryCount [variable] cls.add_instance_attribute('adjustedRetryCount', 'uint32_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::attemptHist [variable] + cls.add_instance_attribute('attemptHist', 'uint64_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::ewmaProb [variable] + cls.add_instance_attribute('ewmaProb', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::numRateAttempt [variable] cls.add_instance_attribute('numRateAttempt', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::numRateSuccess [variable] cls.add_instance_attribute('numRateSuccess', 'uint32_t', is_const=False) - ## minstrel-wifi-manager.h: ns3::RateInfo::prob [variable] - cls.add_instance_attribute('prob', 'uint32_t', is_const=False) - ## minstrel-wifi-manager.h: ns3::RateInfo::ewmaProb [variable] - cls.add_instance_attribute('ewmaProb', 'uint32_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::perfectTxTime [variable] + cls.add_instance_attribute('perfectTxTime', 'ns3::Time', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::prevNumRateAttempt [variable] cls.add_instance_attribute('prevNumRateAttempt', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::prevNumRateSuccess [variable] cls.add_instance_attribute('prevNumRateSuccess', 'uint32_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::prob [variable] + cls.add_instance_attribute('prob', 'uint32_t', is_const=False) + ## minstrel-wifi-manager.h: ns3::RateInfo::retryCount [variable] + cls.add_instance_attribute('retryCount', 'uint32_t', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::successHist [variable] cls.add_instance_attribute('successHist', 'uint64_t', is_const=False) - ## minstrel-wifi-manager.h: ns3::RateInfo::attemptHist [variable] - cls.add_instance_attribute('attemptHist', 'uint64_t', is_const=False) ## minstrel-wifi-manager.h: ns3::RateInfo::throughput [variable] cls.add_instance_attribute('throughput', 'uint32_t', is_const=False) - ## minstrel-wifi-manager.h: ns3::RateInfo::RateInfo(ns3::RateInfo const & arg0) [copy constructor] - cls.add_constructor([param('ns3::RateInfo const &', 'arg0')]) - ## minstrel-wifi-manager.h: ns3::RateInfo::RateInfo() [constructor] - cls.add_constructor([]) return def register_Ns3Ssid_methods(root_module, cls): @@ -919,18 +925,18 @@ def register_Ns3SupportedRates_methods(root_module, cls): return def register_Ns3ThresholdsItem_methods(root_module, cls): - ## rraa-wifi-manager.h: ns3::ThresholdsItem::datarate [variable] - cls.add_instance_attribute('datarate', 'uint32_t', is_const=False) - ## rraa-wifi-manager.h: ns3::ThresholdsItem::pori [variable] - cls.add_instance_attribute('pori', 'double', is_const=False) - ## rraa-wifi-manager.h: ns3::ThresholdsItem::pmtl [variable] - cls.add_instance_attribute('pmtl', 'double', is_const=False) - ## rraa-wifi-manager.h: ns3::ThresholdsItem::ewnd [variable] - cls.add_instance_attribute('ewnd', 'uint32_t', is_const=False) - ## rraa-wifi-manager.h: ns3::ThresholdsItem::ThresholdsItem(ns3::ThresholdsItem const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ThresholdsItem const &', 'arg0')]) ## rraa-wifi-manager.h: ns3::ThresholdsItem::ThresholdsItem() [constructor] cls.add_constructor([]) + ## rraa-wifi-manager.h: ns3::ThresholdsItem::ThresholdsItem(ns3::ThresholdsItem const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ThresholdsItem const &', 'arg0')]) + ## rraa-wifi-manager.h: ns3::ThresholdsItem::datarate [variable] + cls.add_instance_attribute('datarate', 'uint32_t', is_const=False) + ## rraa-wifi-manager.h: ns3::ThresholdsItem::ewnd [variable] + cls.add_instance_attribute('ewnd', 'uint32_t', is_const=False) + ## rraa-wifi-manager.h: ns3::ThresholdsItem::pmtl [variable] + cls.add_instance_attribute('pmtl', 'double', is_const=False) + ## rraa-wifi-manager.h: ns3::ThresholdsItem::pori [variable] + cls.add_instance_attribute('pori', 'double', is_const=False) return def register_Ns3WifiMode_methods(root_module, cls): @@ -1007,11 +1013,6 @@ def register_Ns3WifiModeFactory_methods(root_module, cls): 'ns3::WifiMode', [param('std::string', 'uniqueName'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('uint32_t', 'phyRate'), param('ns3::WifiPhyStandard', 'standard')], is_static=True) - ## wifi-mode.h: static ns3::WifiMode ns3::WifiModeFactory::CreateQam(std::string uniqueName, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, uint32_t phyRate, uint8_t constellationSize, ns3::WifiPhyStandard standard) [member function] - cls.add_method('CreateQam', - 'ns3::WifiMode', - [param('std::string', 'uniqueName'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('uint32_t', 'phyRate'), param('uint8_t', 'constellationSize'), param('ns3::WifiPhyStandard', 'standard')], - is_static=True) ## wifi-mode.h: static ns3::WifiMode ns3::WifiModeFactory::CreateDbpsk(std::string uniqueName, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, uint32_t phyRate, ns3::WifiPhyStandard standard) [member function] cls.add_method('CreateDbpsk', 'ns3::WifiMode', @@ -1022,35 +1023,40 @@ def register_Ns3WifiModeFactory_methods(root_module, cls): 'ns3::WifiMode', [param('std::string', 'uniqueName'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('uint32_t', 'phyRate'), param('ns3::WifiPhyStandard', 'standard')], is_static=True) + ## wifi-mode.h: static ns3::WifiMode ns3::WifiModeFactory::CreateQam(std::string uniqueName, bool isMandatory, uint32_t bandwidth, uint32_t dataRate, uint32_t phyRate, uint8_t constellationSize, ns3::WifiPhyStandard standard) [member function] + cls.add_method('CreateQam', + 'ns3::WifiMode', + [param('std::string', 'uniqueName'), param('bool', 'isMandatory'), param('uint32_t', 'bandwidth'), param('uint32_t', 'dataRate'), param('uint32_t', 'phyRate'), param('uint8_t', 'constellationSize'), param('ns3::WifiPhyStandard', 'standard')], + is_static=True) return def register_Ns3WifiPhyListener_methods(root_module, cls): - ## wifi-phy.h: ns3::WifiPhyListener::WifiPhyListener(ns3::WifiPhyListener const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiPhyListener const &', 'arg0')]) ## wifi-phy.h: ns3::WifiPhyListener::WifiPhyListener() [constructor] cls.add_constructor([]) - ## wifi-phy.h: void ns3::WifiPhyListener::NotifyRxStart(ns3::Time duration) [member function] - cls.add_method('NotifyRxStart', + ## wifi-phy.h: ns3::WifiPhyListener::WifiPhyListener(ns3::WifiPhyListener const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiPhyListener const &', 'arg0')]) + ## wifi-phy.h: void ns3::WifiPhyListener::NotifyMaybeCcaBusyStart(ns3::Time duration) [member function] + cls.add_method('NotifyMaybeCcaBusyStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhyListener::NotifyRxEndOk() [member function] - cls.add_method('NotifyRxEndOk', - 'void', - [], - is_pure_virtual=True, is_virtual=True) ## wifi-phy.h: void ns3::WifiPhyListener::NotifyRxEndError() [member function] cls.add_method('NotifyRxEndError', 'void', [], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration) [member function] - cls.add_method('NotifyTxStart', + ## wifi-phy.h: void ns3::WifiPhyListener::NotifyRxEndOk() [member function] + cls.add_method('NotifyRxEndOk', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhyListener::NotifyRxStart(ns3::Time duration) [member function] + cls.add_method('NotifyRxStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhyListener::NotifyMaybeCcaBusyStart(ns3::Time duration) [member function] - cls.add_method('NotifyMaybeCcaBusyStart', + ## wifi-phy.h: void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration) [member function] + cls.add_method('NotifyTxStart', 'void', [param('ns3::Time', 'duration')], is_pure_virtual=True, is_virtual=True) @@ -1059,102 +1065,72 @@ def register_Ns3WifiPhyListener_methods(root_module, cls): def register_Ns3WifiRemoteStation_methods(root_module, cls): ## wifi-remote-station-manager.h: ns3::WifiRemoteStation::WifiRemoteStation(ns3::WifiRemoteStation const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStation const &', 'arg0')]) + ## wifi-remote-station-manager.h: ns3::WifiRemoteStation::WifiRemoteStation() [constructor] + cls.add_constructor([]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::AddSupportedMode(ns3::WifiMode mode) [member function] + cls.add_method('AddSupportedMode', + 'void', + [param('ns3::WifiMode', 'mode')]) + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetAckMode(ns3::WifiMode dataMode) [member function] + cls.add_method('GetAckMode', + 'ns3::WifiMode', + [param('ns3::WifiMode', 'dataMode')]) + ## wifi-remote-station-manager.h: ns3::Mac48Address ns3::WifiRemoteStation::GetAddress() [member function] + cls.add_method('GetAddress', + 'ns3::Mac48Address', + []) + ## wifi-remote-station-manager.h: double ns3::WifiRemoteStation::GetAvgSlrc() const [member function] + cls.add_method('GetAvgSlrc', + 'double', + [], + is_const=True) + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetCtsMode(ns3::WifiMode rtsMode) [member function] + cls.add_method('GetCtsMode', + 'ns3::WifiMode', + [param('ns3::WifiMode', 'rtsMode')]) + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetDataMode(ns3::Ptr packet, uint32_t fullPacketSize) [member function] + cls.add_method('GetDataMode', + 'ns3::WifiMode', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStation::GetFragmentOffset(ns3::Ptr packet, uint32_t fragmentNumber) [member function] + cls.add_method('GetFragmentOffset', + 'uint32_t', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], + is_virtual=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStation::GetFragmentSize(ns3::Ptr packet, uint32_t fragmentNumber) [member function] + cls.add_method('GetFragmentSize', + 'uint32_t', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], + is_virtual=True) + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetRtsMode(ns3::Ptr packet) [member function] + cls.add_method('GetRtsMode', + 'ns3::WifiMode', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-remote-station-manager.h: static ns3::TypeId ns3::WifiRemoteStation::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## wifi-remote-station-manager.h: ns3::WifiRemoteStation::WifiRemoteStation() [constructor] - cls.add_constructor([]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::AddSupportedMode(ns3::WifiMode mode) [member function] - cls.add_method('AddSupportedMode', - 'void', - [param('ns3::WifiMode', 'mode')]) - ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsBrandNew() const [member function] - cls.add_method('IsBrandNew', - 'bool', - [], - is_const=True) ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsAssociated() const [member function] cls.add_method('IsAssociated', 'bool', [], is_const=True) + ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsBrandNew() const [member function] + cls.add_method('IsBrandNew', + 'bool', + [], + is_const=True) + ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsLastFragment(ns3::Ptr packet, uint32_t fragmentNumber) [member function] + cls.add_method('IsLastFragment', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], + is_virtual=True) ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsWaitAssocTxOk() const [member function] cls.add_method('IsWaitAssocTxOk', 'bool', [], is_const=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordWaitAssocTxOk() [member function] - cls.add_method('RecordWaitAssocTxOk', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordGotAssocTxOk() [member function] - cls.add_method('RecordGotAssocTxOk', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordGotAssocTxFailed() [member function] - cls.add_method('RecordGotAssocTxFailed', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordDisassociated() [member function] - cls.add_method('RecordDisassociated', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::PrepareForQueue(ns3::Ptr packet, uint32_t fullPacketSize) [member function] - cls.add_method('PrepareForQueue', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetDataMode(ns3::Ptr packet, uint32_t fullPacketSize) [member function] - cls.add_method('GetDataMode', - 'ns3::WifiMode', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetRtsMode(ns3::Ptr packet) [member function] - cls.add_method('GetRtsMode', - 'ns3::WifiMode', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRtsFailed() [member function] - cls.add_method('ReportRtsFailed', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportDataFailed() [member function] - cls.add_method('ReportDataFailed', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRtsOk(double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] - cls.add_method('ReportRtsOk', - 'void', - [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('ReportDataOk', - 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportFinalRtsFailed() [member function] - cls.add_method('ReportFinalRtsFailed', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportFinalDataFailed() [member function] - cls.add_method('ReportFinalDataFailed', - 'void', - []) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('ReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')]) - ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::NeedRts(ns3::Ptr packet) [member function] - cls.add_method('NeedRts', - 'bool', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_virtual=True) - ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::NeedRtsRetransmission(ns3::Ptr packet) [member function] - cls.add_method('NeedRtsRetransmission', - 'bool', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_virtual=True) ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::NeedDataRetransmission(ns3::Ptr packet) [member function] cls.add_method('NeedDataRetransmission', 'bool', @@ -1165,34 +1141,72 @@ def register_Ns3WifiRemoteStation_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet const >', 'packet')], is_virtual=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStation::GetFragmentSize(ns3::Ptr packet, uint32_t fragmentNumber) [member function] - cls.add_method('GetFragmentSize', - 'uint32_t', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], - is_virtual=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStation::GetFragmentOffset(ns3::Ptr packet, uint32_t fragmentNumber) [member function] - cls.add_method('GetFragmentOffset', - 'uint32_t', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], - is_virtual=True) - ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::IsLastFragment(ns3::Ptr packet, uint32_t fragmentNumber) [member function] - cls.add_method('IsLastFragment', + ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::NeedRts(ns3::Ptr packet) [member function] + cls.add_method('NeedRts', 'bool', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fragmentNumber')], + [param('ns3::Ptr< ns3::Packet const >', 'packet')], is_virtual=True) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetCtsMode(ns3::WifiMode rtsMode) [member function] - cls.add_method('GetCtsMode', - 'ns3::WifiMode', - [param('ns3::WifiMode', 'rtsMode')]) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::GetAckMode(ns3::WifiMode dataMode) [member function] - cls.add_method('GetAckMode', - 'ns3::WifiMode', - [param('ns3::WifiMode', 'dataMode')]) - ## wifi-remote-station-manager.h: double ns3::WifiRemoteStation::GetAvgSlrc() const [member function] - cls.add_method('GetAvgSlrc', - 'double', - [], - is_const=True) + ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStation::NeedRtsRetransmission(ns3::Ptr packet) [member function] + cls.add_method('NeedRtsRetransmission', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_virtual=True) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::PrepareForQueue(ns3::Ptr packet, uint32_t fullPacketSize) [member function] + cls.add_method('PrepareForQueue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint32_t', 'fullPacketSize')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordDisassociated() [member function] + cls.add_method('RecordDisassociated', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordGotAssocTxFailed() [member function] + cls.add_method('RecordGotAssocTxFailed', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordGotAssocTxOk() [member function] + cls.add_method('RecordGotAssocTxOk', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::RecordWaitAssocTxOk() [member function] + cls.add_method('RecordWaitAssocTxOk', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportDataFailed() [member function] + cls.add_method('ReportDataFailed', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('ReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportFinalDataFailed() [member function] + cls.add_method('ReportFinalDataFailed', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportFinalRtsFailed() [member function] + cls.add_method('ReportFinalRtsFailed', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRtsFailed() [member function] + cls.add_method('ReportRtsFailed', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRtsOk(double ctsSnr, ns3::WifiMode ctsMode, double rtsSnr) [member function] + cls.add_method('ReportRtsOk', + 'void', + [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::ReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('ReportRxOk', + 'void', + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::SetAddress(ns3::Mac48Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Mac48Address', 'address')]) ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStation::GetNSupportedModes() const [member function] cls.add_method('GetNSupportedModes', 'uint32_t', @@ -1203,11 +1217,6 @@ def register_Ns3WifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [param('uint32_t', 'i')], is_const=True, visibility='protected') - ## wifi-remote-station-manager.h: ns3::Ptr ns3::WifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1218,13 +1227,28 @@ def register_Ns3WifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], is_pure_virtual=True, visibility='private', is_virtual=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], is_pure_virtual=True, visibility='private', is_virtual=True) @@ -1233,26 +1257,16 @@ def register_Ns3WifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', - 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - is_pure_virtual=True, visibility='private', is_virtual=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - is_pure_virtual=True, visibility='private', is_virtual=True) ## wifi-remote-station-manager.h: void ns3::WifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] cls.add_method('DoReportRxOk', 'void', [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], is_pure_virtual=True, visibility='private', is_virtual=True) + ## wifi-remote-station-manager.h: ns3::Ptr ns3::WifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) return def register_Ns3AmrrWifiRemoteStation_methods(root_module, cls): @@ -1260,18 +1274,28 @@ def register_Ns3AmrrWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::AmrrWifiRemoteStation const &', 'arg0')]) ## amrr-wifi-manager.h: ns3::AmrrWifiRemoteStation::AmrrWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::AmrrWifiManager >', 'stations')]) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1280,26 +1304,11 @@ def register_Ns3AmrrWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: void ns3::AmrrWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## amrr-wifi-manager.h: ns3::Ptr ns3::AmrrWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## amrr-wifi-manager.h: ns3::WifiMode ns3::AmrrWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1310,6 +1319,11 @@ def register_Ns3AmrrWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## amrr-wifi-manager.h: ns3::Ptr ns3::AmrrWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3ArfWifiRemoteStation_methods(root_module, cls): @@ -1317,18 +1331,28 @@ def register_Ns3ArfWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::ArfWifiRemoteStation const &', 'arg0')]) ## arf-wifi-manager.h: ns3::ArfWifiRemoteStation::ArfWifiRemoteStation(ns3::Ptr manager) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::ArfWifiManager >', 'manager')]) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1337,33 +1361,18 @@ def register_Ns3ArfWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## arf-wifi-manager.h: uint32_t ns3::ArfWifiRemoteStation::GetMinTimerTimeout() [member function] - cls.add_method('GetMinTimerTimeout', - 'uint32_t', - [], - visibility='protected') ## arf-wifi-manager.h: uint32_t ns3::ArfWifiRemoteStation::GetMinSuccessThreshold() [member function] cls.add_method('GetMinSuccessThreshold', 'uint32_t', [], visibility='protected') - ## arf-wifi-manager.h: uint32_t ns3::ArfWifiRemoteStation::GetTimerTimeout() [member function] - cls.add_method('GetTimerTimeout', + ## arf-wifi-manager.h: uint32_t ns3::ArfWifiRemoteStation::GetMinTimerTimeout() [member function] + cls.add_method('GetMinTimerTimeout', 'uint32_t', [], visibility='protected') @@ -1372,21 +1381,21 @@ def register_Ns3ArfWifiRemoteStation_methods(root_module, cls): 'uint32_t', [], visibility='protected') - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::SetTimerTimeout(uint32_t timerTimeout) [member function] - cls.add_method('SetTimerTimeout', - 'void', - [param('uint32_t', 'timerTimeout')], + ## arf-wifi-manager.h: uint32_t ns3::ArfWifiRemoteStation::GetTimerTimeout() [member function] + cls.add_method('GetTimerTimeout', + 'uint32_t', + [], visibility='protected') ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::SetSuccessThreshold(uint32_t successThreshold) [member function] cls.add_method('SetSuccessThreshold', 'void', [param('uint32_t', 'successThreshold')], visibility='protected') - ## arf-wifi-manager.h: ns3::Ptr ns3::ArfWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::SetTimerTimeout(uint32_t timerTimeout) [member function] + cls.add_method('SetTimerTimeout', + 'void', + [param('uint32_t', 'timerTimeout')], + visibility='protected') ## arf-wifi-manager.h: ns3::WifiMode ns3::ArfWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1397,13 +1406,18 @@ def register_Ns3ArfWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::ReportRecoveryFailure() [member function] - cls.add_method('ReportRecoveryFailure', + ## arf-wifi-manager.h: ns3::Ptr ns3::ArfWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::ReportFailure() [member function] + cls.add_method('ReportFailure', 'void', [], visibility='private', is_virtual=True) - ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::ReportFailure() [member function] - cls.add_method('ReportFailure', + ## arf-wifi-manager.h: void ns3::ArfWifiRemoteStation::ReportRecoveryFailure() [member function] + cls.add_method('ReportRecoveryFailure', 'void', [], visibility='private', is_virtual=True) @@ -1414,18 +1428,28 @@ def register_Ns3ConstantRateWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::ConstantRateWifiRemoteStation const &', 'arg0')]) ## constant-rate-wifi-manager.h: ns3::ConstantRateWifiRemoteStation::ConstantRateWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::ConstantRateWifiManager >', 'stations')]) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1434,26 +1458,11 @@ def register_Ns3ConstantRateWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: void ns3::ConstantRateWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## constant-rate-wifi-manager.h: ns3::Ptr ns3::ConstantRateWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## constant-rate-wifi-manager.h: ns3::WifiMode ns3::ConstantRateWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1464,6 +1473,11 @@ def register_Ns3ConstantRateWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## constant-rate-wifi-manager.h: ns3::Ptr ns3::ConstantRateWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3IdealWifiRemoteStation_methods(root_module, cls): @@ -1471,18 +1485,28 @@ def register_Ns3IdealWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::IdealWifiRemoteStation const &', 'arg0')]) ## ideal-wifi-manager.h: ns3::IdealWifiRemoteStation::IdealWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::IdealWifiManager >', 'stations')]) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1491,26 +1515,11 @@ def register_Ns3IdealWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## ideal-wifi-manager.h: ns3::Ptr ns3::IdealWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## ideal-wifi-manager.h: ns3::WifiMode ns3::IdealWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1521,6 +1530,11 @@ def register_Ns3IdealWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## ideal-wifi-manager.h: ns3::Ptr ns3::IdealWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3MgtAssocRequestHeader_methods(root_module, cls): @@ -1528,18 +1542,26 @@ def register_Ns3MgtAssocRequestHeader_methods(root_module, cls): cls.add_constructor([param('ns3::MgtAssocRequestHeader const &', 'arg0')]) ## mgt-headers.h: ns3::MgtAssocRequestHeader::MgtAssocRequestHeader() [constructor] cls.add_constructor([]) - ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetSsid(ns3::Ssid ssid) [member function] - cls.add_method('SetSsid', - 'void', - [param('ns3::Ssid', 'ssid')]) - ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] - cls.add_method('SetSupportedRates', - 'void', - [param('ns3::SupportedRates', 'rates')]) - ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetListenInterval(uint16_t interval) [member function] - cls.add_method('SetListenInterval', - 'void', - [param('uint16_t', 'interval')]) + ## mgt-headers.h: uint32_t ns3::MgtAssocRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## mgt-headers.h: ns3::TypeId ns3::MgtAssocRequestHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## mgt-headers.h: uint16_t ns3::MgtAssocRequestHeader::GetListenInterval() const [member function] + cls.add_method('GetListenInterval', + 'uint16_t', + [], + is_const=True) + ## mgt-headers.h: uint32_t ns3::MgtAssocRequestHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## mgt-headers.h: ns3::Ssid ns3::MgtAssocRequestHeader::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', @@ -1550,41 +1572,33 @@ def register_Ns3MgtAssocRequestHeader_methods(root_module, cls): 'ns3::SupportedRates', [], is_const=True) - ## mgt-headers.h: uint16_t ns3::MgtAssocRequestHeader::GetListenInterval() const [member function] - cls.add_method('GetListenInterval', - 'uint16_t', - [], - is_const=True) ## mgt-headers.h: static ns3::TypeId ns3::MgtAssocRequestHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## mgt-headers.h: ns3::TypeId ns3::MgtAssocRequestHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtAssocRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtAssocRequestHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtAssocRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtAssocRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetListenInterval(uint16_t interval) [member function] + cls.add_method('SetListenInterval', + 'void', + [param('uint16_t', 'interval')]) + ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetSsid(ns3::Ssid ssid) [member function] + cls.add_method('SetSsid', + 'void', + [param('ns3::Ssid', 'ssid')]) + ## mgt-headers.h: void ns3::MgtAssocRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] + cls.add_method('SetSupportedRates', + 'void', + [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MgtAssocResponseHeader_methods(root_module, cls): @@ -1592,6 +1606,21 @@ def register_Ns3MgtAssocResponseHeader_methods(root_module, cls): cls.add_constructor([param('ns3::MgtAssocResponseHeader const &', 'arg0')]) ## mgt-headers.h: ns3::MgtAssocResponseHeader::MgtAssocResponseHeader() [constructor] cls.add_constructor([]) + ## mgt-headers.h: uint32_t ns3::MgtAssocResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## mgt-headers.h: ns3::TypeId ns3::MgtAssocResponseHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## mgt-headers.h: uint32_t ns3::MgtAssocResponseHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## mgt-headers.h: ns3::StatusCode ns3::MgtAssocResponseHeader::GetStatusCode() [member function] cls.add_method('GetStatusCode', 'ns3::StatusCode', @@ -1600,59 +1629,51 @@ def register_Ns3MgtAssocResponseHeader_methods(root_module, cls): cls.add_method('GetSupportedRates', 'ns3::SupportedRates', []) - ## mgt-headers.h: void ns3::MgtAssocResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] - cls.add_method('SetSupportedRates', - 'void', - [param('ns3::SupportedRates', 'rates')]) - ## mgt-headers.h: void ns3::MgtAssocResponseHeader::SetStatusCode(ns3::StatusCode code) [member function] - cls.add_method('SetStatusCode', - 'void', - [param('ns3::StatusCode', 'code')]) ## mgt-headers.h: static ns3::TypeId ns3::MgtAssocResponseHeader::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## mgt-headers.h: ns3::TypeId ns3::MgtAssocResponseHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtAssocResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtAssocResponseHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtAssocResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtAssocResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + ## mgt-headers.h: void ns3::MgtAssocResponseHeader::SetStatusCode(ns3::StatusCode code) [member function] + cls.add_method('SetStatusCode', + 'void', + [param('ns3::StatusCode', 'code')]) + ## mgt-headers.h: void ns3::MgtAssocResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] + cls.add_method('SetSupportedRates', + 'void', + [param('ns3::SupportedRates', 'rates')]) + return + +def register_Ns3MgtProbeRequestHeader_methods(root_module, cls): + ## mgt-headers.h: ns3::MgtProbeRequestHeader::MgtProbeRequestHeader() [constructor] + cls.add_constructor([]) + ## mgt-headers.h: ns3::MgtProbeRequestHeader::MgtProbeRequestHeader(ns3::MgtProbeRequestHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MgtProbeRequestHeader const &', 'arg0')]) + ## mgt-headers.h: uint32_t ns3::MgtProbeRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) - return - -def register_Ns3MgtProbeRequestHeader_methods(root_module, cls): - ## mgt-headers.h: ns3::MgtProbeRequestHeader::MgtProbeRequestHeader(ns3::MgtProbeRequestHeader const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MgtProbeRequestHeader const &', 'arg0')]) - ## mgt-headers.h: ns3::MgtProbeRequestHeader::MgtProbeRequestHeader() [constructor] - cls.add_constructor([]) - ## mgt-headers.h: void ns3::MgtProbeRequestHeader::SetSsid(ns3::Ssid ssid) [member function] - cls.add_method('SetSsid', - 'void', - [param('ns3::Ssid', 'ssid')]) - ## mgt-headers.h: void ns3::MgtProbeRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] - cls.add_method('SetSupportedRates', - 'void', - [param('ns3::SupportedRates', 'rates')]) + ## mgt-headers.h: ns3::TypeId ns3::MgtProbeRequestHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## mgt-headers.h: uint32_t ns3::MgtProbeRequestHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## mgt-headers.h: ns3::Ssid ns3::MgtProbeRequestHeader::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', @@ -1668,31 +1689,24 @@ def register_Ns3MgtProbeRequestHeader_methods(root_module, cls): 'ns3::TypeId', [], is_static=True) - ## mgt-headers.h: ns3::TypeId ns3::MgtProbeRequestHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtProbeRequestHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtProbeRequestHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtProbeRequestHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtProbeRequestHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## mgt-headers.h: void ns3::MgtProbeRequestHeader::SetSsid(ns3::Ssid ssid) [member function] + cls.add_method('SetSsid', + 'void', + [param('ns3::Ssid', 'ssid')]) + ## mgt-headers.h: void ns3::MgtProbeRequestHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] + cls.add_method('SetSupportedRates', + 'void', + [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MgtProbeResponseHeader_methods(root_module, cls): @@ -1700,33 +1714,36 @@ def register_Ns3MgtProbeResponseHeader_methods(root_module, cls): cls.add_constructor([param('ns3::MgtProbeResponseHeader const &', 'arg0')]) ## mgt-headers.h: ns3::MgtProbeResponseHeader::MgtProbeResponseHeader() [constructor] cls.add_constructor([]) - ## mgt-headers.h: ns3::Ssid ns3::MgtProbeResponseHeader::GetSsid() const [member function] - cls.add_method('GetSsid', - 'ns3::Ssid', - [], - is_const=True) + ## mgt-headers.h: uint32_t ns3::MgtProbeResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) ## mgt-headers.h: uint64_t ns3::MgtProbeResponseHeader::GetBeaconIntervalUs() const [member function] cls.add_method('GetBeaconIntervalUs', 'uint64_t', [], is_const=True) + ## mgt-headers.h: ns3::TypeId ns3::MgtProbeResponseHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## mgt-headers.h: uint32_t ns3::MgtProbeResponseHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## mgt-headers.h: ns3::Ssid ns3::MgtProbeResponseHeader::GetSsid() const [member function] + cls.add_method('GetSsid', + 'ns3::Ssid', + [], + is_const=True) ## mgt-headers.h: ns3::SupportedRates ns3::MgtProbeResponseHeader::GetSupportedRates() const [member function] cls.add_method('GetSupportedRates', 'ns3::SupportedRates', [], is_const=True) - ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetSsid(ns3::Ssid ssid) [member function] - cls.add_method('SetSsid', - 'void', - [param('ns3::Ssid', 'ssid')]) - ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetBeaconIntervalUs(uint64_t us) [member function] - cls.add_method('SetBeaconIntervalUs', - 'void', - [param('uint64_t', 'us')]) - ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] - cls.add_method('SetSupportedRates', - 'void', - [param('ns3::SupportedRates', 'rates')]) ## mgt-headers.h: uint64_t ns3::MgtProbeResponseHeader::GetTimestamp() [member function] cls.add_method('GetTimestamp', 'uint64_t', @@ -1736,31 +1753,28 @@ def register_Ns3MgtProbeResponseHeader_methods(root_module, cls): 'ns3::TypeId', [], is_static=True) - ## mgt-headers.h: ns3::TypeId ns3::MgtProbeResponseHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtProbeResponseHeader::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtProbeResponseHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) ## mgt-headers.h: void ns3::MgtProbeResponseHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## mgt-headers.h: uint32_t ns3::MgtProbeResponseHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) + ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetBeaconIntervalUs(uint64_t us) [member function] + cls.add_method('SetBeaconIntervalUs', + 'void', + [param('uint64_t', 'us')]) + ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetSsid(ns3::Ssid ssid) [member function] + cls.add_method('SetSsid', + 'void', + [param('ns3::Ssid', 'ssid')]) + ## mgt-headers.h: void ns3::MgtProbeResponseHeader::SetSupportedRates(ns3::SupportedRates rates) [member function] + cls.add_method('SetSupportedRates', + 'void', + [param('ns3::SupportedRates', 'rates')]) return def register_Ns3MinstrelWifiRemoteStation_methods(root_module, cls): @@ -1768,18 +1782,28 @@ def register_Ns3MinstrelWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::MinstrelWifiRemoteStation const &', 'arg0')]) ## minstrel-wifi-manager.h: ns3::MinstrelWifiRemoteStation::MinstrelWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::MinstrelWifiManager >', 'stations')]) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1788,26 +1812,11 @@ def register_Ns3MinstrelWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## minstrel-wifi-manager.h: ns3::Ptr ns3::MinstrelWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## minstrel-wifi-manager.h: ns3::WifiMode ns3::MinstrelWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1818,6 +1827,11 @@ def register_Ns3MinstrelWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## minstrel-wifi-manager.h: ns3::Ptr ns3::MinstrelWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3OnoeWifiRemoteStation_methods(root_module, cls): @@ -1825,18 +1839,28 @@ def register_Ns3OnoeWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::OnoeWifiRemoteStation const &', 'arg0')]) ## onoe-wifi-manager.h: ns3::OnoeWifiRemoteStation::OnoeWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::OnoeWifiManager >', 'stations')]) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -1845,26 +1869,11 @@ def register_Ns3OnoeWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: void ns3::OnoeWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## onoe-wifi-manager.h: ns3::Ptr ns3::OnoeWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## onoe-wifi-manager.h: ns3::WifiMode ns3::OnoeWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -1875,23 +1884,28 @@ def register_Ns3OnoeWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## onoe-wifi-manager.h: ns3::Ptr ns3::OnoeWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3PropagationDelayModel_methods(root_module, cls): - ## propagation-delay-model.h: ns3::PropagationDelayModel::PropagationDelayModel(ns3::PropagationDelayModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PropagationDelayModel const &', 'arg0')]) ## propagation-delay-model.h: ns3::PropagationDelayModel::PropagationDelayModel() [constructor] cls.add_constructor([]) - ## propagation-delay-model.h: static ns3::TypeId ns3::PropagationDelayModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## propagation-delay-model.h: ns3::PropagationDelayModel::PropagationDelayModel(ns3::PropagationDelayModel const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PropagationDelayModel const &', 'arg0')]) ## propagation-delay-model.h: ns3::Time ns3::PropagationDelayModel::GetDelay(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## propagation-delay-model.h: static ns3::TypeId ns3::PropagationDelayModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3PropagationLossModel_methods(root_module, cls): @@ -1921,45 +1935,45 @@ def register_Ns3PropagationLossModel_methods(root_module, cls): def register_Ns3QosTag_methods(root_module, cls): ## qos-tag.h: ns3::QosTag::QosTag(ns3::QosTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::QosTag const &', 'arg0')]) - ## qos-tag.h: static ns3::TypeId ns3::QosTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## qos-tag.h: ns3::TypeId ns3::QosTag::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) ## qos-tag.h: ns3::QosTag::QosTag() [constructor] cls.add_constructor([]) ## qos-tag.h: ns3::QosTag::QosTag(uint8_t tid) [constructor] cls.add_constructor([param('uint8_t', 'tid')]) - ## qos-tag.h: void ns3::QosTag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_const=True, is_virtual=True) ## qos-tag.h: void ns3::QosTag::Deserialize(ns3::TagBuffer i) [member function] cls.add_method('Deserialize', 'void', [param('ns3::TagBuffer', 'i')], is_virtual=True) - ## qos-tag.h: uint32_t ns3::QosTag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## qos-tag.h: void ns3::QosTag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) ## qos-tag.h: uint8_t ns3::QosTag::Get() const [member function] cls.add_method('Get', 'uint8_t', [], is_const=True) + ## qos-tag.h: ns3::TypeId ns3::QosTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## qos-tag.h: uint32_t ns3::QosTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## qos-tag.h: static ns3::TypeId ns3::QosTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## qos-tag.h: void ns3::QosTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## qos-tag.h: void ns3::QosTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) ## qos-tag.h: void ns3::QosTag::Set(uint8_t tid) [member function] cls.add_method('Set', 'void', @@ -1969,11 +1983,6 @@ def register_Ns3QosTag_methods(root_module, cls): def register_Ns3RandomPropagationDelayModel_methods(root_module, cls): ## propagation-delay-model.h: ns3::RandomPropagationDelayModel::RandomPropagationDelayModel(ns3::RandomPropagationDelayModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::RandomPropagationDelayModel const &', 'arg0')]) - ## propagation-delay-model.h: static ns3::TypeId ns3::RandomPropagationDelayModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## propagation-delay-model.h: ns3::RandomPropagationDelayModel::RandomPropagationDelayModel() [constructor] cls.add_constructor([]) ## propagation-delay-model.h: ns3::Time ns3::RandomPropagationDelayModel::GetDelay(ns3::Ptr a, ns3::Ptr b) const [member function] @@ -1981,6 +1990,11 @@ def register_Ns3RandomPropagationDelayModel_methods(root_module, cls): 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, is_virtual=True) + ## propagation-delay-model.h: static ns3::TypeId ns3::RandomPropagationDelayModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3RandomPropagationLossModel_methods(root_module, cls): @@ -2008,18 +2022,28 @@ def register_Ns3RraaWifiRemoteStation_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet const >', 'packet')], is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] - cls.add_method('DoReportRxOk', - 'void', - [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], - visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportRtsFailed() [member function] - cls.add_method('DoReportRtsFailed', + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportDataFailed() [member function] + cls.add_method('DoReportDataFailed', 'void', [], visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportDataFailed() [member function] - cls.add_method('DoReportDataFailed', + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] + cls.add_method('DoReportDataOk', + 'void', + [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + visibility='protected', is_virtual=True) + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportFinalDataFailed() [member function] + cls.add_method('DoReportFinalDataFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportFinalRtsFailed() [member function] + cls.add_method('DoReportFinalRtsFailed', + 'void', + [], + visibility='protected', is_virtual=True) + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportRtsFailed() [member function] + cls.add_method('DoReportRtsFailed', 'void', [], visibility='protected', is_virtual=True) @@ -2028,26 +2052,11 @@ def register_Ns3RraaWifiRemoteStation_methods(root_module, cls): 'void', [param('double', 'ctsSnr'), param('ns3::WifiMode', 'ctsMode'), param('double', 'rtsSnr')], visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportDataOk(double ackSnr, ns3::WifiMode ackMode, double dataSnr) [member function] - cls.add_method('DoReportDataOk', + ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportRxOk(double rxSnr, ns3::WifiMode txMode) [member function] + cls.add_method('DoReportRxOk', 'void', - [param('double', 'ackSnr'), param('ns3::WifiMode', 'ackMode'), param('double', 'dataSnr')], + [param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode')], visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportFinalRtsFailed() [member function] - cls.add_method('DoReportFinalRtsFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: void ns3::RraaWifiRemoteStation::DoReportFinalDataFailed() [member function] - cls.add_method('DoReportFinalDataFailed', - 'void', - [], - visibility='protected', is_virtual=True) - ## rraa-wifi-manager.h: ns3::Ptr ns3::RraaWifiRemoteStation::GetManager() const [member function] - cls.add_method('GetManager', - 'ns3::Ptr< ns3::WifiRemoteStationManager >', - [], - is_const=True, visibility='private', is_virtual=True) ## rraa-wifi-manager.h: ns3::WifiMode ns3::RraaWifiRemoteStation::DoGetDataMode(uint32_t size) [member function] cls.add_method('DoGetDataMode', 'ns3::WifiMode', @@ -2058,46 +2067,51 @@ def register_Ns3RraaWifiRemoteStation_methods(root_module, cls): 'ns3::WifiMode', [], visibility='private', is_virtual=True) + ## rraa-wifi-manager.h: ns3::Ptr ns3::RraaWifiRemoteStation::GetManager() const [member function] + cls.add_method('GetManager', + 'ns3::Ptr< ns3::WifiRemoteStationManager >', + [], + is_const=True, visibility='private', is_virtual=True) return def register_Ns3SsidChecker_methods(root_module, cls): - ## ssid.h: ns3::SsidChecker::SsidChecker(ns3::SsidChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::SsidChecker const &', 'arg0')]) ## ssid.h: ns3::SsidChecker::SsidChecker() [constructor] cls.add_constructor([]) + ## ssid.h: ns3::SsidChecker::SsidChecker(ns3::SsidChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SsidChecker const &', 'arg0')]) return def register_Ns3SsidValue_methods(root_module, cls): - ## ssid.h: ns3::SsidValue::SsidValue(ns3::SsidValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::SsidValue const &', 'arg0')]) ## ssid.h: ns3::SsidValue::SsidValue() [constructor] cls.add_constructor([]) + ## ssid.h: ns3::SsidValue::SsidValue(ns3::SsidValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SsidValue const &', 'arg0')]) ## ssid.h: ns3::SsidValue::SsidValue(ns3::Ssid const & value) [constructor] cls.add_constructor([param('ns3::Ssid const &', 'value')]) - ## ssid.h: void ns3::SsidValue::Set(ns3::Ssid const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Ssid const &', 'value')]) - ## ssid.h: ns3::Ssid ns3::SsidValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Ssid', - [], - is_const=True) ## ssid.h: ns3::Ptr ns3::SsidValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## ssid.h: std::string ns3::SsidValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## ssid.h: bool ns3::SsidValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## ssid.h: ns3::Ssid ns3::SsidValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Ssid', + [], + is_const=True) + ## ssid.h: std::string ns3::SsidValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## ssid.h: void ns3::SsidValue::Set(ns3::Ssid const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Ssid const &', 'value')]) return def register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, cls): @@ -2116,49 +2130,64 @@ def register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, cls): return def register_Ns3WifiMac_methods(root_module, cls): - ## wifi-mac.h: ns3::WifiMac::WifiMac(ns3::WifiMac const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiMac const &', 'arg0')]) ## wifi-mac.h: ns3::WifiMac::WifiMac() [constructor] cls.add_constructor([]) - ## wifi-mac.h: static ns3::TypeId ns3::WifiMac::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', + ## wifi-mac.h: ns3::WifiMac::WifiMac(ns3::WifiMac const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiMac const &', 'arg0')]) + ## wifi-mac.h: void ns3::WifiMac::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] + cls.add_method('ConfigureStandard', + 'void', + [param('ns3::WifiPhyStandard', 'standard')]) + ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr 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_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr packet, ns3::Mac48Address to) [member function] + cls.add_method('Enqueue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], + is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: ns3::Time ns3::WifiMac::GetAckTimeout() const [member function] + cls.add_method('GetAckTimeout', + 'ns3::Time', [], - is_static=True) - ## wifi-mac.h: void ns3::WifiMac::SetSlot(ns3::Time slotTime) [member function] - cls.add_method('SetSlot', - 'void', - [param('ns3::Time', 'slotTime')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetSifs(ns3::Time sifs) [member function] - cls.add_method('SetSifs', - 'void', - [param('ns3::Time', 'sifs')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] - cls.add_method('SetEifsNoDifs', - 'void', - [param('ns3::Time', 'eifsNoDifs')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetPifs(ns3::Time pifs) [member function] - cls.add_method('SetPifs', - 'void', - [param('ns3::Time', 'pifs')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetCtsTimeout(ns3::Time ctsTimeout) [member function] - cls.add_method('SetCtsTimeout', - 'void', - [param('ns3::Time', 'ctsTimeout')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetAckTimeout(ns3::Time ackTimeout) [member function] - cls.add_method('SetAckTimeout', - 'void', - [param('ns3::Time', 'ackTimeout')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetMaxPropagationDelay(ns3::Time delay) [member function] - cls.add_method('SetMaxPropagationDelay', - 'void', - [param('ns3::Time', 'delay')]) + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: ns3::Mac48Address ns3::WifiMac::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Mac48Address', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: ns3::Mac48Address ns3::WifiMac::GetBssid() const [member function] + cls.add_method('GetBssid', + 'ns3::Mac48Address', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: ns3::Time ns3::WifiMac::GetCtsTimeout() const [member function] + cls.add_method('GetCtsTimeout', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: ns3::Time ns3::WifiMac::GetEifsNoDifs() const [member function] + cls.add_method('GetEifsNoDifs', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: uint32_t ns3::WifiMac::GetMaxMsduSize() const [member function] + cls.add_method('GetMaxMsduSize', + 'uint32_t', + [], + is_const=True) + ## wifi-mac.h: ns3::Time ns3::WifiMac::GetMaxPropagationDelay() const [member function] + cls.add_method('GetMaxPropagationDelay', + 'ns3::Time', + [], + is_const=True) + ## wifi-mac.h: ns3::Time ns3::WifiMac::GetMsduLifetime() const [member function] + cls.add_method('GetMsduLifetime', + 'ns3::Time', + [], + is_const=True) ## wifi-mac.h: ns3::Time ns3::WifiMac::GetPifs() const [member function] cls.add_method('GetPifs', 'ns3::Time', @@ -2174,76 +2203,95 @@ def register_Ns3WifiMac_methods(root_module, cls): 'ns3::Time', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-mac.h: ns3::Time ns3::WifiMac::GetEifsNoDifs() const [member function] - cls.add_method('GetEifsNoDifs', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-mac.h: ns3::Time ns3::WifiMac::GetCtsTimeout() const [member function] - cls.add_method('GetCtsTimeout', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-mac.h: ns3::Time ns3::WifiMac::GetAckTimeout() const [member function] - cls.add_method('GetAckTimeout', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-mac.h: ns3::Time ns3::WifiMac::GetMsduLifetime() const [member function] - cls.add_method('GetMsduLifetime', - 'ns3::Time', - [], - is_const=True) - ## wifi-mac.h: ns3::Time ns3::WifiMac::GetMaxPropagationDelay() const [member function] - cls.add_method('GetMaxPropagationDelay', - 'ns3::Time', - [], - is_const=True) - ## wifi-mac.h: uint32_t ns3::WifiMac::GetMaxMsduSize() const [member function] - cls.add_method('GetMaxMsduSize', - 'uint32_t', - [], - is_const=True) - ## wifi-mac.h: ns3::Mac48Address ns3::WifiMac::GetAddress() const [member function] - cls.add_method('GetAddress', - 'ns3::Mac48Address', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h: ns3::Ssid ns3::WifiMac::GetSsid() const [member function] cls.add_method('GetSsid', 'ns3::Ssid', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-mac.h: static ns3::TypeId ns3::WifiMac::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## wifi-mac.h: void ns3::WifiMac::NotifyPromiscRx(ns3::Ptr packet) [member function] + cls.add_method('NotifyPromiscRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-mac.h: void ns3::WifiMac::NotifyRx(ns3::Ptr packet) [member function] + cls.add_method('NotifyRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-mac.h: void ns3::WifiMac::NotifyRxDrop(ns3::Ptr packet) [member function] + cls.add_method('NotifyRxDrop', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-mac.h: void ns3::WifiMac::NotifyTx(ns3::Ptr packet) [member function] + cls.add_method('NotifyTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-mac.h: void ns3::WifiMac::NotifyTxDrop(ns3::Ptr packet) [member function] + cls.add_method('NotifyTxDrop', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-mac.h: void ns3::WifiMac::SetAckTimeout(ns3::Time ackTimeout) [member function] + cls.add_method('SetAckTimeout', + 'void', + [param('ns3::Time', 'ackTimeout')], + is_pure_virtual=True, is_virtual=True) ## wifi-mac.h: void ns3::WifiMac::SetAddress(ns3::Mac48Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Mac48Address', 'address')], is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetCtsTimeout(ns3::Time ctsTimeout) [member function] + cls.add_method('SetCtsTimeout', + 'void', + [param('ns3::Time', 'ctsTimeout')], + is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetEifsNoDifs(ns3::Time eifsNoDifs) [member function] + cls.add_method('SetEifsNoDifs', + 'void', + [param('ns3::Time', 'eifsNoDifs')], + is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetForwardUpCallback(ns3::Callback, 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_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetLinkDownCallback(ns3::Callback 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_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetLinkUpCallback(ns3::Callback 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_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetMaxPropagationDelay(ns3::Time delay) [member function] + cls.add_method('SetMaxPropagationDelay', + 'void', + [param('ns3::Time', 'delay')]) + ## wifi-mac.h: void ns3::WifiMac::SetPifs(ns3::Time pifs) [member function] + cls.add_method('SetPifs', + 'void', + [param('ns3::Time', 'pifs')], + is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetSifs(ns3::Time sifs) [member function] + cls.add_method('SetSifs', + 'void', + [param('ns3::Time', 'sifs')], + is_pure_virtual=True, is_virtual=True) + ## wifi-mac.h: void ns3::WifiMac::SetSlot(ns3::Time slotTime) [member function] + cls.add_method('SetSlot', + 'void', + [param('ns3::Time', 'slotTime')], + is_pure_virtual=True, is_virtual=True) ## wifi-mac.h: void ns3::WifiMac::SetSsid(ns3::Ssid ssid) [member function] cls.add_method('SetSsid', 'void', [param('ns3::Ssid', 'ssid')], is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: ns3::Mac48Address ns3::WifiMac::GetBssid() const [member function] - cls.add_method('GetBssid', - 'ns3::Mac48Address', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr 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_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::Enqueue(ns3::Ptr packet, ns3::Mac48Address to) [member function] - cls.add_method('Enqueue', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'to')], - is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: bool ns3::WifiMac::SupportsSendFrom() const [member function] - cls.add_method('SupportsSendFrom', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h: void ns3::WifiMac::SetWifiPhy(ns3::Ptr phy) [member function] cls.add_method('SetWifiPhy', 'void', @@ -2254,45 +2302,11 @@ def register_Ns3WifiMac_methods(root_module, cls): 'void', [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'stationManager')], is_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetForwardUpCallback(ns3::Callback, 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_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetLinkUpCallback(ns3::Callback 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_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::SetLinkDownCallback(ns3::Callback 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_pure_virtual=True, is_virtual=True) - ## wifi-mac.h: void ns3::WifiMac::NotifyTx(ns3::Ptr packet) [member function] - cls.add_method('NotifyTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-mac.h: void ns3::WifiMac::NotifyTxDrop(ns3::Ptr packet) [member function] - cls.add_method('NotifyTxDrop', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-mac.h: void ns3::WifiMac::NotifyRx(ns3::Ptr packet) [member function] - cls.add_method('NotifyRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-mac.h: void ns3::WifiMac::NotifyPromiscRx(ns3::Ptr packet) [member function] - cls.add_method('NotifyPromiscRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-mac.h: void ns3::WifiMac::NotifyRxDrop(ns3::Ptr packet) [member function] - cls.add_method('NotifyRxDrop', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-mac.h: void ns3::WifiMac::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] - cls.add_method('ConfigureStandard', - 'void', - [param('ns3::WifiPhyStandard', 'standard')]) + ## wifi-mac.h: bool ns3::WifiMac::SupportsSendFrom() const [member function] + cls.add_method('SupportsSendFrom', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-mac.h: void ns3::WifiMac::ConfigureDcf(ns3::Ptr dcf, uint32_t cwmin, uint32_t cwmax, ns3::AccessClass ac) [member function] cls.add_method('ConfigureDcf', 'void', @@ -2310,168 +2324,11 @@ def register_Ns3WifiMacHeader_methods(root_module, cls): cls.add_constructor([param('ns3::WifiMacHeader const &', 'arg0')]) ## wifi-mac-header.h: ns3::WifiMacHeader::WifiMacHeader() [constructor] cls.add_constructor([]) - ## wifi-mac-header.h: static ns3::TypeId ns3::WifiMacHeader::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## wifi-mac-header.h: ns3::TypeId ns3::WifiMacHeader::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## wifi-mac-header.h: void ns3::WifiMacHeader::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## wifi-mac-header.h: uint32_t ns3::WifiMacHeader::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## wifi-mac-header.h: void ns3::WifiMacHeader::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-mac-header.h: uint32_t ns3::WifiMacHeader::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAssocReq() [member function] - cls.add_method('SetAssocReq', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAssocResp() [member function] - cls.add_method('SetAssocResp', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetProbeReq() [member function] - cls.add_method('SetProbeReq', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetProbeResp() [member function] - cls.add_method('SetProbeResp', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetBeacon() [member function] - cls.add_method('SetBeacon', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetTypeData() [member function] - cls.add_method('SetTypeData', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAction() [member function] - cls.add_method('SetAction', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetMultihopAction() [member function] - cls.add_method('SetMultihopAction', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsFrom() [member function] - cls.add_method('SetDsFrom', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsNotFrom() [member function] - cls.add_method('SetDsNotFrom', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsTo() [member function] - cls.add_method('SetDsTo', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsNotTo() [member function] - cls.add_method('SetDsNotTo', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr1(ns3::Mac48Address address) [member function] - cls.add_method('SetAddr1', - 'void', - [param('ns3::Mac48Address', 'address')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr2(ns3::Mac48Address address) [member function] - cls.add_method('SetAddr2', - 'void', - [param('ns3::Mac48Address', 'address')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr3(ns3::Mac48Address address) [member function] - cls.add_method('SetAddr3', - 'void', - [param('ns3::Mac48Address', 'address')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr4(ns3::Mac48Address address) [member function] - cls.add_method('SetAddr4', - 'void', - [param('ns3::Mac48Address', 'address')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetType(ns3::WifiMacType type) [member function] - cls.add_method('SetType', - 'void', - [param('ns3::WifiMacType', 'type')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetRawDuration(uint16_t duration) [member function] - cls.add_method('SetRawDuration', - 'void', - [param('uint16_t', 'duration')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDuration(ns3::Time duration) [member function] - cls.add_method('SetDuration', - 'void', - [param('ns3::Time', 'duration')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetId(uint16_t id) [member function] - cls.add_method('SetId', - 'void', - [param('uint16_t', 'id')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetSequenceNumber(uint16_t seq) [member function] - cls.add_method('SetSequenceNumber', - 'void', - [param('uint16_t', 'seq')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetFragmentNumber(uint8_t frag) [member function] - cls.add_method('SetFragmentNumber', - 'void', - [param('uint8_t', 'frag')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetNoMoreFragments() [member function] - cls.add_method('SetNoMoreFragments', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetMoreFragments() [member function] - cls.add_method('SetMoreFragments', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetRetry() [member function] - cls.add_method('SetRetry', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetNoRetry() [member function] - cls.add_method('SetNoRetry', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosTid(uint8_t tid) [member function] - cls.add_method('SetQosTid', - 'void', - [param('uint8_t', 'tid')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosEosp() [member function] - cls.add_method('SetQosEosp', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosNoEosp() [member function] - cls.add_method('SetQosNoEosp', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosAckPolicy(ns3::WifiMacHeader::QosAckPolicy arg0) [member function] - cls.add_method('SetQosAckPolicy', - 'void', - [param('ns3::WifiMacHeader::QosAckPolicy', 'arg0')]) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosAmsdu() [member function] - cls.add_method('SetQosAmsdu', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosNoAmsdu() [member function] - cls.add_method('SetQosNoAmsdu', - 'void', - []) - ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosTxopLimit(uint8_t txop) [member function] - cls.add_method('SetQosTxopLimit', - 'void', - [param('uint8_t', 'txop')]) ## wifi-mac-header.h: ns3::Mac48Address ns3::WifiMacHeader::GetAddr1() const [member function] cls.add_method('GetAddr1', 'ns3::Mac48Address', @@ -2492,54 +2349,74 @@ def register_Ns3WifiMacHeader_methods(root_module, cls): 'ns3::Mac48Address', [], is_const=True) + ## wifi-mac-header.h: ns3::Time ns3::WifiMacHeader::GetDuration() const [member function] + cls.add_method('GetDuration', + 'ns3::Time', + [], + is_const=True) + ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetFragmentNumber() const [member function] + cls.add_method('GetFragmentNumber', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h: ns3::TypeId ns3::WifiMacHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## wifi-mac-header.h: ns3::WifiMacHeader::QosAckPolicy ns3::WifiMacHeader::GetQosAckPolicy() const [member function] + cls.add_method('GetQosAckPolicy', + 'ns3::WifiMacHeader::QosAckPolicy', + [], + is_const=True) + ## wifi-mac-header.h: uint8_t ns3::WifiMacHeader::GetQosTid() const [member function] + cls.add_method('GetQosTid', + 'uint8_t', + [], + is_const=True) + ## wifi-mac-header.h: uint8_t ns3::WifiMacHeader::GetQosTxopLimit() const [member function] + cls.add_method('GetQosTxopLimit', + 'uint8_t', + [], + is_const=True) + ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetRawDuration() const [member function] + cls.add_method('GetRawDuration', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetSequenceControl() const [member function] + cls.add_method('GetSequenceControl', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetSequenceNumber() const [member function] + cls.add_method('GetSequenceNumber', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h: uint32_t ns3::WifiMacHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## wifi-mac-header.h: uint32_t ns3::WifiMacHeader::GetSize() const [member function] + cls.add_method('GetSize', + 'uint32_t', + [], + is_const=True) ## wifi-mac-header.h: ns3::WifiMacType ns3::WifiMacHeader::GetType() const [member function] cls.add_method('GetType', 'ns3::WifiMacType', [], is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsFromDs() const [member function] - cls.add_method('IsFromDs', - 'bool', + ## wifi-mac-header.h: static ns3::TypeId ns3::WifiMacHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsToDs() const [member function] - cls.add_method('IsToDs', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsData() const [member function] - cls.add_method('IsData', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosData() const [member function] - cls.add_method('IsQosData', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCtl() const [member function] - cls.add_method('IsCtl', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMgt() const [member function] - cls.add_method('IsMgt', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCfpoll() const [member function] - cls.add_method('IsCfpoll', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsRts() const [member function] - cls.add_method('IsRts', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCts() const [member function] - cls.add_method('IsCts', - 'bool', + is_static=True) + ## wifi-mac-header.h: char const * ns3::WifiMacHeader::GetTypeString() const [member function] + cls.add_method('GetTypeString', + 'char const *', [], is_const=True) ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAck() const [member function] @@ -2547,6 +2424,11 @@ def register_Ns3WifiMacHeader_methods(root_module, cls): 'bool', [], is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAction() const [member function] + cls.add_method('IsAction', + 'bool', + [], + is_const=True) ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAssocReq() const [member function] cls.add_method('IsAssocReq', 'bool', @@ -2557,13 +2439,63 @@ def register_Ns3WifiMacHeader_methods(root_module, cls): 'bool', [], is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsReassocReq() const [member function] - cls.add_method('IsReassocReq', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAuthentication() const [member function] + cls.add_method('IsAuthentication', 'bool', [], is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsReassocResp() const [member function] - cls.add_method('IsReassocResp', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsBeacon() const [member function] + cls.add_method('IsBeacon', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCfpoll() const [member function] + cls.add_method('IsCfpoll', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCtl() const [member function] + cls.add_method('IsCtl', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsCts() const [member function] + cls.add_method('IsCts', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsData() const [member function] + cls.add_method('IsData', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsDeauthentication() const [member function] + cls.add_method('IsDeauthentication', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsDisassociation() const [member function] + cls.add_method('IsDisassociation', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsFromDs() const [member function] + cls.add_method('IsFromDs', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMgt() const [member function] + cls.add_method('IsMgt', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMoreFragments() const [member function] + cls.add_method('IsMoreFragments', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMultihopAction() const [member function] + cls.add_method('IsMultihopAction', 'bool', [], is_const=True) @@ -2577,181 +2509,433 @@ def register_Ns3WifiMacHeader_methods(root_module, cls): 'bool', [], is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsBeacon() const [member function] - cls.add_method('IsBeacon', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsDisassociation() const [member function] - cls.add_method('IsDisassociation', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAuthentication() const [member function] - cls.add_method('IsAuthentication', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsDeauthentication() const [member function] - cls.add_method('IsDeauthentication', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsAction() const [member function] - cls.add_method('IsAction', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMultihopAction() const [member function] - cls.add_method('IsMultihopAction', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetRawDuration() const [member function] - cls.add_method('GetRawDuration', - 'uint16_t', - [], - is_const=True) - ## wifi-mac-header.h: ns3::Time ns3::WifiMacHeader::GetDuration() const [member function] - cls.add_method('GetDuration', - 'ns3::Time', - [], - is_const=True) - ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetSequenceControl() const [member function] - cls.add_method('GetSequenceControl', - 'uint16_t', - [], - is_const=True) - ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetSequenceNumber() const [member function] - cls.add_method('GetSequenceNumber', - 'uint16_t', - [], - is_const=True) - ## wifi-mac-header.h: uint16_t ns3::WifiMacHeader::GetFragmentNumber() const [member function] - cls.add_method('GetFragmentNumber', - 'uint16_t', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsRetry() const [member function] - cls.add_method('IsRetry', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsMoreFragments() const [member function] - cls.add_method('IsMoreFragments', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosBlockAck() const [member function] - cls.add_method('IsQosBlockAck', - 'bool', - [], - is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosNoAck() const [member function] - cls.add_method('IsQosNoAck', - 'bool', - [], - is_const=True) ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosAck() const [member function] cls.add_method('IsQosAck', 'bool', [], is_const=True) - ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosEosp() const [member function] - cls.add_method('IsQosEosp', - 'bool', - [], - is_const=True) ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosAmsdu() const [member function] cls.add_method('IsQosAmsdu', 'bool', [], is_const=True) - ## wifi-mac-header.h: uint8_t ns3::WifiMacHeader::GetQosTid() const [member function] - cls.add_method('GetQosTid', - 'uint8_t', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosBlockAck() const [member function] + cls.add_method('IsQosBlockAck', + 'bool', [], is_const=True) - ## wifi-mac-header.h: ns3::WifiMacHeader::QosAckPolicy ns3::WifiMacHeader::GetQosAckPolicy() const [member function] - cls.add_method('GetQosAckPolicy', - 'ns3::WifiMacHeader::QosAckPolicy', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosData() const [member function] + cls.add_method('IsQosData', + 'bool', [], is_const=True) - ## wifi-mac-header.h: uint8_t ns3::WifiMacHeader::GetQosTxopLimit() const [member function] - cls.add_method('GetQosTxopLimit', - 'uint8_t', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosEosp() const [member function] + cls.add_method('IsQosEosp', + 'bool', [], is_const=True) - ## wifi-mac-header.h: uint32_t ns3::WifiMacHeader::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsQosNoAck() const [member function] + cls.add_method('IsQosNoAck', + 'bool', [], is_const=True) - ## wifi-mac-header.h: char const * ns3::WifiMacHeader::GetTypeString() const [member function] - cls.add_method('GetTypeString', - 'char const *', + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsReassocReq() const [member function] + cls.add_method('IsReassocReq', + 'bool', [], is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsReassocResp() const [member function] + cls.add_method('IsReassocResp', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsRetry() const [member function] + cls.add_method('IsRetry', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsRts() const [member function] + cls.add_method('IsRts', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: bool ns3::WifiMacHeader::IsToDs() const [member function] + cls.add_method('IsToDs', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h: void ns3::WifiMacHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## wifi-mac-header.h: void ns3::WifiMacHeader::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-mac-header.h: void ns3::WifiMacHeader::SetAction() [member function] + cls.add_method('SetAction', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr1(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr1', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr2(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr2', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr3(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr3', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAddr4(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr4', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAssocReq() [member function] + cls.add_method('SetAssocReq', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetAssocResp() [member function] + cls.add_method('SetAssocResp', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetBeacon() [member function] + cls.add_method('SetBeacon', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsFrom() [member function] + cls.add_method('SetDsFrom', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsNotFrom() [member function] + cls.add_method('SetDsNotFrom', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsNotTo() [member function] + cls.add_method('SetDsNotTo', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDsTo() [member function] + cls.add_method('SetDsTo', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetDuration(ns3::Time duration) [member function] + cls.add_method('SetDuration', + 'void', + [param('ns3::Time', 'duration')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetFragmentNumber(uint8_t frag) [member function] + cls.add_method('SetFragmentNumber', + 'void', + [param('uint8_t', 'frag')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetId(uint16_t id) [member function] + cls.add_method('SetId', + 'void', + [param('uint16_t', 'id')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetMoreFragments() [member function] + cls.add_method('SetMoreFragments', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetMultihopAction() [member function] + cls.add_method('SetMultihopAction', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetNoMoreFragments() [member function] + cls.add_method('SetNoMoreFragments', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetNoRetry() [member function] + cls.add_method('SetNoRetry', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetProbeReq() [member function] + cls.add_method('SetProbeReq', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetProbeResp() [member function] + cls.add_method('SetProbeResp', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosAckPolicy(ns3::WifiMacHeader::QosAckPolicy arg0) [member function] + cls.add_method('SetQosAckPolicy', + 'void', + [param('ns3::WifiMacHeader::QosAckPolicy', 'arg0')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosAmsdu() [member function] + cls.add_method('SetQosAmsdu', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosEosp() [member function] + cls.add_method('SetQosEosp', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosNoAmsdu() [member function] + cls.add_method('SetQosNoAmsdu', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosNoEosp() [member function] + cls.add_method('SetQosNoEosp', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosTid(uint8_t tid) [member function] + cls.add_method('SetQosTid', + 'void', + [param('uint8_t', 'tid')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetQosTxopLimit(uint8_t txop) [member function] + cls.add_method('SetQosTxopLimit', + 'void', + [param('uint8_t', 'txop')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetRawDuration(uint16_t duration) [member function] + cls.add_method('SetRawDuration', + 'void', + [param('uint16_t', 'duration')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetRetry() [member function] + cls.add_method('SetRetry', + 'void', + []) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetSequenceNumber(uint16_t seq) [member function] + cls.add_method('SetSequenceNumber', + 'void', + [param('uint16_t', 'seq')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetType(ns3::WifiMacType type) [member function] + cls.add_method('SetType', + 'void', + [param('ns3::WifiMacType', 'type')]) + ## wifi-mac-header.h: void ns3::WifiMacHeader::SetTypeData() [member function] + cls.add_method('SetTypeData', + 'void', + []) return def register_Ns3WifiModeChecker_methods(root_module, cls): - ## wifi-mode.h: ns3::WifiModeChecker::WifiModeChecker(ns3::WifiModeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiModeChecker const &', 'arg0')]) ## wifi-mode.h: ns3::WifiModeChecker::WifiModeChecker() [constructor] cls.add_constructor([]) + ## wifi-mode.h: ns3::WifiModeChecker::WifiModeChecker(ns3::WifiModeChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiModeChecker const &', 'arg0')]) return def register_Ns3WifiModeValue_methods(root_module, cls): - ## wifi-mode.h: ns3::WifiModeValue::WifiModeValue(ns3::WifiModeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiModeValue const &', 'arg0')]) ## wifi-mode.h: ns3::WifiModeValue::WifiModeValue() [constructor] cls.add_constructor([]) + ## wifi-mode.h: ns3::WifiModeValue::WifiModeValue(ns3::WifiModeValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiModeValue const &', 'arg0')]) ## wifi-mode.h: ns3::WifiModeValue::WifiModeValue(ns3::WifiMode const & value) [constructor] cls.add_constructor([param('ns3::WifiMode const &', 'value')]) - ## wifi-mode.h: void ns3::WifiModeValue::Set(ns3::WifiMode const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::WifiMode const &', 'value')]) - ## wifi-mode.h: ns3::WifiMode ns3::WifiModeValue::Get() const [member function] - cls.add_method('Get', - 'ns3::WifiMode', - [], - is_const=True) ## wifi-mode.h: ns3::Ptr ns3::WifiModeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) - ## wifi-mode.h: std::string ns3::WifiModeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) ## wifi-mode.h: bool ns3::WifiModeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) + ## wifi-mode.h: ns3::WifiMode ns3::WifiModeValue::Get() const [member function] + cls.add_method('Get', + 'ns3::WifiMode', + [], + is_const=True) + ## wifi-mode.h: std::string ns3::WifiModeValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## wifi-mode.h: void ns3::WifiModeValue::Set(ns3::WifiMode const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::WifiMode const &', 'value')]) return def register_Ns3WifiPhy_methods(root_module, cls): ## wifi-phy.h: ns3::WifiPhy::WifiPhy(ns3::WifiPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiPhy const &', 'arg0')]) - ## wifi-phy.h: static ns3::TypeId ns3::WifiPhy::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## wifi-phy.h: ns3::WifiPhy::WifiPhy() [constructor] cls.add_constructor([]) - ## wifi-phy.h: double ns3::WifiPhy::GetTxPowerStart() const [member function] - cls.add_method('GetTxPowerStart', + ## wifi-phy.h: double ns3::WifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] + cls.add_method('CalculateSnr', 'double', + [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] + cls.add_method('CalculateTxDuration', + 'ns3::Time', + [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] + cls.add_method('ConfigureStandard', + 'void', + [param('ns3::WifiPhyStandard', 'standard')], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get11mbb() [member function] + cls.add_method('Get11mbb', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mb10Mhz() [member function] + cls.add_method('Get12mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mb5Mhz() [member function] + cls.add_method('Get12mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mba() [member function] + cls.add_method('Get12mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get13_5mb5Mhz() [member function] + cls.add_method('Get13_5mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get18mb10Mhz() [member function] + cls.add_method('Get18mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get18mba() [member function] + cls.add_method('Get18mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get1_5mb5Mhz() [member function] + cls.add_method('Get1_5mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get1mbb() [member function] + cls.add_method('Get1mbb', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get24mb10Mhz() [member function] + cls.add_method('Get24mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get24mba() [member function] + cls.add_method('Get24mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get27mb10Mhz() [member function] + cls.add_method('Get27mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get2_25mb5Mhz() [member function] + cls.add_method('Get2_25mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get2mbb() [member function] + cls.add_method('Get2mbb', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get36mba() [member function] + cls.add_method('Get36mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get3mb10Mhz() [member function] + cls.add_method('Get3mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get3mb5Mhz() [member function] + cls.add_method('Get3mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get48mba() [member function] + cls.add_method('Get48mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get4_5mb10Mhz() [member function] + cls.add_method('Get4_5mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get4_5mb5Mhz() [member function] + cls.add_method('Get4_5mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get54mba() [member function] + cls.add_method('Get54mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get5_5mbb() [member function] + cls.add_method('Get5_5mbb', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mb10Mhz() [member function] + cls.add_method('Get6mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mb5Mhz() [member function] + cls.add_method('Get6mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mba() [member function] + cls.add_method('Get6mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mb10Mhz() [member function] + cls.add_method('Get9mb10Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mb5Mhz() [member function] + cls.add_method('Get9mb5Mhz', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mba() [member function] + cls.add_method('Get9mba', + 'ns3::WifiMode', + [], + is_static=True) + ## wifi-phy.h: ns3::Ptr ns3::WifiPhy::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::WifiChannel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: double ns3::WifiPhy::GetTxPowerEnd() const [member function] - cls.add_method('GetTxPowerEnd', - 'double', + ## wifi-phy.h: uint16_t ns3::WifiPhy::GetChannelNumber() const [member function] + cls.add_method('GetChannelNumber', + 'uint16_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetDelayUntilIdle() [member function] + cls.add_method('GetDelayUntilIdle', + 'ns3::Time', + [], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetLastRxStartTime() const [member function] + cls.add_method('GetLastRxStartTime', + 'ns3::Time', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: ns3::WifiMode ns3::WifiPhy::GetMode(uint32_t mode) const [member function] + cls.add_method('GetMode', + 'ns3::WifiMode', + [param('uint32_t', 'mode')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: uint32_t ns3::WifiPhy::GetNModes() const [member function] + cls.add_method('GetNModes', + 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## wifi-phy.h: uint32_t ns3::WifiPhy::GetNTxPower() const [member function] @@ -2759,25 +2943,30 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::SetReceiveOkCallback(ns3::Callback,double,ns3::WifiMode,ns3::WifiPreamble,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] - cls.add_method('SetReceiveOkCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetStateDuration() [member function] + cls.add_method('GetStateDuration', + 'ns3::Time', + [], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::SetReceiveErrorCallback(ns3::Callback,double,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] - cls.add_method('SetReceiveErrorCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::SendPacket(ns3::Ptr packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPowerLevel) [member function] - cls.add_method('SendPacket', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPowerLevel')], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] - cls.add_method('RegisterListener', - 'void', - [param('ns3::WifiPhyListener *', 'listener')], + ## wifi-phy.h: double ns3::WifiPhy::GetTxPowerEnd() const [member function] + cls.add_method('GetTxPowerEnd', + 'double', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: double ns3::WifiPhy::GetTxPowerStart() const [member function] + cls.add_method('GetTxPowerStart', + 'double', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## wifi-phy.h: static ns3::TypeId ns3::WifiPhy::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## wifi-phy.h: bool ns3::WifiPhy::IsStateBusy() [member function] + cls.add_method('IsStateBusy', + 'bool', + [], is_pure_virtual=True, is_virtual=True) ## wifi-phy.h: bool ns3::WifiPhy::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', @@ -2789,11 +2978,6 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'bool', [], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: bool ns3::WifiPhy::IsStateBusy() [member function] - cls.add_method('IsStateBusy', - 'bool', - [], - is_pure_virtual=True, is_virtual=True) ## wifi-phy.h: bool ns3::WifiPhy::IsStateSync() [member function] cls.add_method('IsStateSync', 'bool', @@ -2804,225 +2988,6 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'bool', [], is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetStateDuration() [member function] - cls.add_method('GetStateDuration', - 'ns3::Time', - [], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetDelayUntilIdle() [member function] - cls.add_method('GetDelayUntilIdle', - 'ns3::Time', - [], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: ns3::Time ns3::WifiPhy::GetLastRxStartTime() const [member function] - cls.add_method('GetLastRxStartTime', - 'ns3::Time', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: uint32_t ns3::WifiPhy::GetNModes() const [member function] - cls.add_method('GetNModes', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: ns3::WifiMode ns3::WifiPhy::GetMode(uint32_t mode) const [member function] - cls.add_method('GetMode', - 'ns3::WifiMode', - [param('uint32_t', 'mode')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: double ns3::WifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] - cls.add_method('CalculateSnr', - 'double', - [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::SetChannelNumber(uint16_t id) [member function] - cls.add_method('SetChannelNumber', - 'void', - [param('uint16_t', 'id')], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: uint16_t ns3::WifiPhy::GetChannelNumber() const [member function] - cls.add_method('GetChannelNumber', - 'uint16_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: void ns3::WifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] - cls.add_method('ConfigureStandard', - 'void', - [param('ns3::WifiPhyStandard', 'standard')], - is_pure_virtual=True, is_virtual=True) - ## wifi-phy.h: ns3::Ptr ns3::WifiPhy::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::WifiChannel >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mba() [member function] - cls.add_method('Get6mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mba() [member function] - cls.add_method('Get9mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mba() [member function] - cls.add_method('Get12mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get18mba() [member function] - cls.add_method('Get18mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get24mba() [member function] - cls.add_method('Get24mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get36mba() [member function] - cls.add_method('Get36mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get48mba() [member function] - cls.add_method('Get48mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get54mba() [member function] - cls.add_method('Get54mba', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get1mbb() [member function] - cls.add_method('Get1mbb', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get2mbb() [member function] - cls.add_method('Get2mbb', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get5_5mbb() [member function] - cls.add_method('Get5_5mbb', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get11mbb() [member function] - cls.add_method('Get11mbb', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get3mb10Mhz() [member function] - cls.add_method('Get3mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get4_5mb10Mhz() [member function] - cls.add_method('Get4_5mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mb10Mhz() [member function] - cls.add_method('Get6mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mb10Mhz() [member function] - cls.add_method('Get9mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mb10Mhz() [member function] - cls.add_method('Get12mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get18mb10Mhz() [member function] - cls.add_method('Get18mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get24mb10Mhz() [member function] - cls.add_method('Get24mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get27mb10Mhz() [member function] - cls.add_method('Get27mb10Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get1_5mb5Mhz() [member function] - cls.add_method('Get1_5mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get2_25mb5Mhz() [member function] - cls.add_method('Get2_25mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get3mb5Mhz() [member function] - cls.add_method('Get3mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get4_5mb5Mhz() [member function] - cls.add_method('Get4_5mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get6mb5Mhz() [member function] - cls.add_method('Get6mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get9mb5Mhz() [member function] - cls.add_method('Get9mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get12mb5Mhz() [member function] - cls.add_method('Get12mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: static ns3::WifiMode ns3::WifiPhy::Get13_5mb5Mhz() [member function] - cls.add_method('Get13_5mb5Mhz', - 'ns3::WifiMode', - [], - is_static=True) - ## wifi-phy.h: void ns3::WifiPhy::NotifyTxBegin(ns3::Ptr packet) [member function] - cls.add_method('NotifyTxBegin', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-phy.h: void ns3::WifiPhy::NotifyTxEnd(ns3::Ptr packet) [member function] - cls.add_method('NotifyTxEnd', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-phy.h: void ns3::WifiPhy::NotifyTxDrop(ns3::Ptr packet) [member function] - cls.add_method('NotifyTxDrop', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-phy.h: void ns3::WifiPhy::NotifyRxBegin(ns3::Ptr packet) [member function] - cls.add_method('NotifyRxBegin', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-phy.h: void ns3::WifiPhy::NotifyRxEnd(ns3::Ptr packet) [member function] - cls.add_method('NotifyRxEnd', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## wifi-phy.h: void ns3::WifiPhy::NotifyRxDrop(ns3::Ptr packet) [member function] - cls.add_method('NotifyRxDrop', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## wifi-phy.h: void ns3::WifiPhy::NotifyPromiscSniffRx(ns3::Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) [member function] cls.add_method('NotifyPromiscSniffRx', 'void', @@ -3031,82 +2996,66 @@ def register_Ns3WifiPhy_methods(root_module, cls): cls.add_method('NotifyPromiscSniffTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyRxBegin(ns3::Ptr packet) [member function] + cls.add_method('NotifyRxBegin', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyRxDrop(ns3::Ptr packet) [member function] + cls.add_method('NotifyRxDrop', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyRxEnd(ns3::Ptr packet) [member function] + cls.add_method('NotifyRxEnd', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyTxBegin(ns3::Ptr packet) [member function] + cls.add_method('NotifyTxBegin', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyTxDrop(ns3::Ptr packet) [member function] + cls.add_method('NotifyTxDrop', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::NotifyTxEnd(ns3::Ptr packet) [member function] + cls.add_method('NotifyTxEnd', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## wifi-phy.h: void ns3::WifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] + cls.add_method('RegisterListener', + 'void', + [param('ns3::WifiPhyListener *', 'listener')], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhy::SendPacket(ns3::Ptr packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPowerLevel) [member function] + cls.add_method('SendPacket', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPowerLevel')], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhy::SetChannelNumber(uint16_t id) [member function] + cls.add_method('SetChannelNumber', + 'void', + [param('uint16_t', 'id')], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhy::SetReceiveErrorCallback(ns3::Callback,double,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] + cls.add_method('SetReceiveErrorCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h: void ns3::WifiPhy::SetReceiveOkCallback(ns3::Callback,double,ns3::WifiMode,ns3::WifiPreamble,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] + cls.add_method('SetReceiveOkCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + is_pure_virtual=True, is_virtual=True) return def register_Ns3WifiRemoteStationManager_methods(root_module, cls): ## wifi-remote-station-manager.h: ns3::WifiRemoteStationManager::WifiRemoteStationManager(ns3::WifiRemoteStationManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiRemoteStationManager const &', 'arg0')]) - ## wifi-remote-station-manager.h: static ns3::TypeId ns3::WifiRemoteStationManager::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## wifi-remote-station-manager.h: ns3::WifiRemoteStationManager::WifiRemoteStationManager() [constructor] cls.add_constructor([]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetupPhy(ns3::Ptr phy) [member function] - cls.add_method('SetupPhy', - 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], - is_virtual=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetMaxSsrc() const [member function] - cls.add_method('GetMaxSsrc', - 'uint32_t', - [], - is_const=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetMaxSlrc() const [member function] - cls.add_method('GetMaxSlrc', - 'uint32_t', - [], - is_const=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetRtsCtsThreshold() const [member function] - cls.add_method('GetRtsCtsThreshold', - 'uint32_t', - [], - is_const=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetFragmentationThreshold() const [member function] - cls.add_method('GetFragmentationThreshold', - 'uint32_t', - [], - is_const=True) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetMaxSsrc(uint32_t maxSsrc) [member function] - cls.add_method('SetMaxSsrc', - 'void', - [param('uint32_t', 'maxSsrc')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetMaxSlrc(uint32_t maxSlrc) [member function] - cls.add_method('SetMaxSlrc', - 'void', - [param('uint32_t', 'maxSlrc')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetRtsCtsThreshold(uint32_t threshold) [member function] - cls.add_method('SetRtsCtsThreshold', - 'void', - [param('uint32_t', 'threshold')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetFragmentationThreshold(uint32_t threshold) [member function] - cls.add_method('SetFragmentationThreshold', - 'void', - [param('uint32_t', 'threshold')]) - ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::Reset() [member function] - cls.add_method('Reset', - 'void', - []) ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::AddBasicMode(ns3::WifiMode mode) [member function] cls.add_method('AddBasicMode', 'void', [param('ns3::WifiMode', 'mode')]) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStationManager::GetDefaultMode() const [member function] - cls.add_method('GetDefaultMode', - 'ns3::WifiMode', - [], - is_const=True) - ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetNBasicModes() const [member function] - cls.add_method('GetNBasicModes', - 'uint32_t', - [], - is_const=True) - ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStationManager::GetBasicMode(uint32_t i) const [member function] - cls.add_method('GetBasicMode', - 'ns3::WifiMode', - [param('uint32_t', 'i')], - is_const=True) ## wifi-remote-station-manager.h: __gnu_cxx::__normal_iterator > > ns3::WifiRemoteStationManager::BeginBasicModes() const [member function] cls.add_method('BeginBasicModes', '__gnu_cxx::__normal_iterator< ns3::WifiMode const *, std::vector< ns3::WifiMode > >', @@ -3117,9 +3066,34 @@ def register_Ns3WifiRemoteStationManager_methods(root_module, cls): '__gnu_cxx::__normal_iterator< ns3::WifiMode const *, std::vector< ns3::WifiMode > >', [], is_const=True) - ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStationManager::IsLowLatency() const [member function] - cls.add_method('IsLowLatency', - 'bool', + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStationManager::GetBasicMode(uint32_t i) const [member function] + cls.add_method('GetBasicMode', + 'ns3::WifiMode', + [param('uint32_t', 'i')], + is_const=True) + ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStationManager::GetDefaultMode() const [member function] + cls.add_method('GetDefaultMode', + 'ns3::WifiMode', + [], + is_const=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetFragmentationThreshold() const [member function] + cls.add_method('GetFragmentationThreshold', + 'uint32_t', + [], + is_const=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetMaxSlrc() const [member function] + cls.add_method('GetMaxSlrc', + 'uint32_t', + [], + is_const=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetMaxSsrc() const [member function] + cls.add_method('GetMaxSsrc', + 'uint32_t', + [], + is_const=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetNBasicModes() const [member function] + cls.add_method('GetNBasicModes', + 'uint32_t', [], is_const=True) ## wifi-remote-station-manager.h: ns3::WifiMode ns3::WifiRemoteStationManager::GetNonUnicastMode() const [member function] @@ -3127,6 +3101,21 @@ def register_Ns3WifiRemoteStationManager_methods(root_module, cls): 'ns3::WifiMode', [], is_const=True) + ## wifi-remote-station-manager.h: uint32_t ns3::WifiRemoteStationManager::GetRtsCtsThreshold() const [member function] + cls.add_method('GetRtsCtsThreshold', + 'uint32_t', + [], + is_const=True) + ## wifi-remote-station-manager.h: static ns3::TypeId ns3::WifiRemoteStationManager::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## wifi-remote-station-manager.h: bool ns3::WifiRemoteStationManager::IsLowLatency() const [member function] + cls.add_method('IsLowLatency', + 'bool', + [], + is_const=True) ## wifi-remote-station-manager.h: ns3::WifiRemoteStation * ns3::WifiRemoteStationManager::Lookup(ns3::Mac48Address address) [member function] cls.add_method('Lookup', 'ns3::WifiRemoteStation *', @@ -3135,6 +3124,31 @@ def register_Ns3WifiRemoteStationManager_methods(root_module, cls): cls.add_method('LookupNonUnicast', 'ns3::WifiRemoteStation *', []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetFragmentationThreshold(uint32_t threshold) [member function] + cls.add_method('SetFragmentationThreshold', + 'void', + [param('uint32_t', 'threshold')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetMaxSlrc(uint32_t maxSlrc) [member function] + cls.add_method('SetMaxSlrc', + 'void', + [param('uint32_t', 'maxSlrc')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetMaxSsrc(uint32_t maxSsrc) [member function] + cls.add_method('SetMaxSsrc', + 'void', + [param('uint32_t', 'maxSsrc')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetRtsCtsThreshold(uint32_t threshold) [member function] + cls.add_method('SetRtsCtsThreshold', + 'void', + [param('uint32_t', 'threshold')]) + ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::SetupPhy(ns3::Ptr phy) [member function] + cls.add_method('SetupPhy', + 'void', + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], + is_virtual=True) ## wifi-remote-station-manager.h: void ns3::WifiRemoteStationManager::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -3378,21 +3392,21 @@ def register_Ns3AarfWifiRemoteStation_methods(root_module, cls): cls.add_constructor([param('ns3::AarfWifiRemoteStation const &', 'arg0')]) ## aarf-wifi-manager.h: ns3::AarfWifiRemoteStation::AarfWifiRemoteStation(ns3::Ptr stations) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::AarfWifiManager >', 'stations')]) - ## aarf-wifi-manager.h: void ns3::AarfWifiRemoteStation::ReportRecoveryFailure() [member function] - cls.add_method('ReportRecoveryFailure', - 'void', - [], - visibility='private', is_virtual=True) - ## aarf-wifi-manager.h: void ns3::AarfWifiRemoteStation::ReportFailure() [member function] - cls.add_method('ReportFailure', - 'void', - [], - visibility='private', is_virtual=True) ## aarf-wifi-manager.h: ns3::Ptr ns3::AarfWifiRemoteStation::GetManager() const [member function] cls.add_method('GetManager', 'ns3::Ptr< ns3::WifiRemoteStationManager >', [], is_const=True, visibility='private', is_virtual=True) + ## aarf-wifi-manager.h: void ns3::AarfWifiRemoteStation::ReportFailure() [member function] + cls.add_method('ReportFailure', + 'void', + [], + visibility='private', is_virtual=True) + ## aarf-wifi-manager.h: void ns3::AarfWifiRemoteStation::ReportRecoveryFailure() [member function] + cls.add_method('ReportRecoveryFailure', + 'void', + [], + visibility='private', is_virtual=True) return def register_Ns3AdhocWifiMac_methods(root_module, cls): @@ -3543,13 +3557,13 @@ def register_Ns3AdhocWifiMac_methods(root_module, cls): def register_Ns3AmrrWifiManager_methods(root_module, cls): ## amrr-wifi-manager.h: ns3::AmrrWifiManager::AmrrWifiManager(ns3::AmrrWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::AmrrWifiManager const &', 'arg0')]) + ## amrr-wifi-manager.h: ns3::AmrrWifiManager::AmrrWifiManager() [constructor] + cls.add_constructor([]) ## amrr-wifi-manager.h: static ns3::TypeId ns3::AmrrWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## amrr-wifi-manager.h: ns3::AmrrWifiManager::AmrrWifiManager() [constructor] - cls.add_constructor([]) ## amrr-wifi-manager.h: ns3::WifiRemoteStation * ns3::AmrrWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -3562,75 +3576,75 @@ def register_Ns3AmsduSubframeHeader_methods(root_module, cls): cls.add_constructor([param('ns3::AmsduSubframeHeader const &', 'arg0')]) ## amsdu-subframe-header.h: ns3::AmsduSubframeHeader::AmsduSubframeHeader() [constructor] cls.add_constructor([]) - ## amsdu-subframe-header.h: static ns3::TypeId ns3::AmsduSubframeHeader::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', + ## amsdu-subframe-header.h: uint32_t ns3::AmsduSubframeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## amsdu-subframe-header.h: ns3::Mac48Address ns3::AmsduSubframeHeader::GetDestinationAddr() const [member function] + cls.add_method('GetDestinationAddr', + 'ns3::Mac48Address', [], - is_static=True) + is_const=True) ## amsdu-subframe-header.h: ns3::TypeId ns3::AmsduSubframeHeader::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) - ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) + ## amsdu-subframe-header.h: uint16_t ns3::AmsduSubframeHeader::GetLength() const [member function] + cls.add_method('GetLength', + 'uint16_t', + [], + is_const=True) ## amsdu-subframe-header.h: uint32_t ns3::AmsduSubframeHeader::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) + ## amsdu-subframe-header.h: ns3::Mac48Address ns3::AmsduSubframeHeader::GetSourceAddr() const [member function] + cls.add_method('GetSourceAddr', + 'ns3::Mac48Address', + [], + is_const=True) + ## amsdu-subframe-header.h: static ns3::TypeId ns3::AmsduSubframeHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) - ## amsdu-subframe-header.h: uint32_t ns3::AmsduSubframeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_virtual=True) ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::SetDestinationAddr(ns3::Mac48Address to) [member function] cls.add_method('SetDestinationAddr', 'void', [param('ns3::Mac48Address', 'to')]) - ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::SetSourceAddr(ns3::Mac48Address to) [member function] - cls.add_method('SetSourceAddr', - 'void', - [param('ns3::Mac48Address', 'to')]) ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::SetLength(uint16_t arg0) [member function] cls.add_method('SetLength', 'void', [param('uint16_t', 'arg0')]) - ## amsdu-subframe-header.h: ns3::Mac48Address ns3::AmsduSubframeHeader::GetDestinationAddr() const [member function] - cls.add_method('GetDestinationAddr', - 'ns3::Mac48Address', - [], - is_const=True) - ## amsdu-subframe-header.h: ns3::Mac48Address ns3::AmsduSubframeHeader::GetSourceAddr() const [member function] - cls.add_method('GetSourceAddr', - 'ns3::Mac48Address', - [], - is_const=True) - ## amsdu-subframe-header.h: uint16_t ns3::AmsduSubframeHeader::GetLength() const [member function] - cls.add_method('GetLength', - 'uint16_t', - [], - is_const=True) + ## amsdu-subframe-header.h: void ns3::AmsduSubframeHeader::SetSourceAddr(ns3::Mac48Address to) [member function] + cls.add_method('SetSourceAddr', + 'void', + [param('ns3::Mac48Address', 'to')]) return def register_Ns3ArfWifiManager_methods(root_module, cls): ## arf-wifi-manager.h: ns3::ArfWifiManager::ArfWifiManager(ns3::ArfWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ArfWifiManager const &', 'arg0')]) + ## arf-wifi-manager.h: ns3::ArfWifiManager::ArfWifiManager() [constructor] + cls.add_constructor([]) ## arf-wifi-manager.h: static ns3::TypeId ns3::ArfWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## arf-wifi-manager.h: ns3::ArfWifiManager::ArfWifiManager() [constructor] - cls.add_constructor([]) ## arf-wifi-manager.h: ns3::WifiRemoteStation * ns3::ArfWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -3641,23 +3655,23 @@ def register_Ns3ArfWifiManager_methods(root_module, cls): def register_Ns3ConstantRateWifiManager_methods(root_module, cls): ## constant-rate-wifi-manager.h: ns3::ConstantRateWifiManager::ConstantRateWifiManager(ns3::ConstantRateWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantRateWifiManager const &', 'arg0')]) - ## constant-rate-wifi-manager.h: static ns3::TypeId ns3::ConstantRateWifiManager::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## constant-rate-wifi-manager.h: ns3::ConstantRateWifiManager::ConstantRateWifiManager() [constructor] cls.add_constructor([]) - ## constant-rate-wifi-manager.h: ns3::WifiMode ns3::ConstantRateWifiManager::GetDataMode() const [member function] - cls.add_method('GetDataMode', - 'ns3::WifiMode', - [], - is_const=True) ## constant-rate-wifi-manager.h: ns3::WifiMode ns3::ConstantRateWifiManager::GetCtlMode() const [member function] cls.add_method('GetCtlMode', 'ns3::WifiMode', [], is_const=True) + ## constant-rate-wifi-manager.h: ns3::WifiMode ns3::ConstantRateWifiManager::GetDataMode() const [member function] + cls.add_method('GetDataMode', + 'ns3::WifiMode', + [], + is_const=True) + ## constant-rate-wifi-manager.h: static ns3::TypeId ns3::ConstantRateWifiManager::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## constant-rate-wifi-manager.h: ns3::WifiRemoteStation * ns3::ConstantRateWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -3668,11 +3682,6 @@ def register_Ns3ConstantRateWifiManager_methods(root_module, cls): def register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, cls): ## propagation-delay-model.h: ns3::ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel(ns3::ConstantSpeedPropagationDelayModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::ConstantSpeedPropagationDelayModel const &', 'arg0')]) - ## propagation-delay-model.h: static ns3::TypeId ns3::ConstantSpeedPropagationDelayModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## propagation-delay-model.h: ns3::ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel() [constructor] cls.add_constructor([]) ## propagation-delay-model.h: ns3::Time ns3::ConstantSpeedPropagationDelayModel::GetDelay(ns3::Ptr a, ns3::Ptr b) const [member function] @@ -3680,44 +3689,29 @@ def register_Ns3ConstantSpeedPropagationDelayModel_methods(root_module, cls): 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, is_virtual=True) - ## propagation-delay-model.h: void ns3::ConstantSpeedPropagationDelayModel::SetSpeed(double speed) [member function] - cls.add_method('SetSpeed', - 'void', - [param('double', 'speed')]) ## propagation-delay-model.h: double ns3::ConstantSpeedPropagationDelayModel::GetSpeed() const [member function] cls.add_method('GetSpeed', 'double', [], is_const=True) - return - -def register_Ns3Dcf_methods(root_module, cls): - ## dcf.h: ns3::Dcf::Dcf(ns3::Dcf const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Dcf const &', 'arg0')]) - ## dcf.h: ns3::Dcf::Dcf() [constructor] - cls.add_constructor([]) - ## dcf.h: static ns3::TypeId ns3::Dcf::GetTypeId() [member function] + ## propagation-delay-model.h: static ns3::TypeId ns3::ConstantSpeedPropagationDelayModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## dcf.h: void ns3::Dcf::SetMinCw(uint32_t minCw) [member function] - cls.add_method('SetMinCw', + ## propagation-delay-model.h: void ns3::ConstantSpeedPropagationDelayModel::SetSpeed(double speed) [member function] + cls.add_method('SetSpeed', 'void', - [param('uint32_t', 'minCw')], - is_pure_virtual=True, is_virtual=True) - ## dcf.h: void ns3::Dcf::SetMaxCw(uint32_t maxCw) [member function] - cls.add_method('SetMaxCw', - 'void', - [param('uint32_t', 'maxCw')], - is_pure_virtual=True, is_virtual=True) - ## dcf.h: void ns3::Dcf::SetAifsn(uint32_t aifsn) [member function] - cls.add_method('SetAifsn', - 'void', - [param('uint32_t', 'aifsn')], - is_pure_virtual=True, is_virtual=True) - ## dcf.h: uint32_t ns3::Dcf::GetMinCw() const [member function] - cls.add_method('GetMinCw', + [param('double', 'speed')]) + return + +def register_Ns3Dcf_methods(root_module, cls): + ## dcf.h: ns3::Dcf::Dcf() [constructor] + cls.add_constructor([]) + ## dcf.h: ns3::Dcf::Dcf(ns3::Dcf const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Dcf const &', 'arg0')]) + ## dcf.h: uint32_t ns3::Dcf::GetAifsn() const [member function] + cls.add_method('GetAifsn', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) @@ -3726,11 +3720,31 @@ def register_Ns3Dcf_methods(root_module, cls): 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) - ## dcf.h: uint32_t ns3::Dcf::GetAifsn() const [member function] - cls.add_method('GetAifsn', + ## dcf.h: uint32_t ns3::Dcf::GetMinCw() const [member function] + cls.add_method('GetMinCw', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## dcf.h: static ns3::TypeId ns3::Dcf::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## dcf.h: void ns3::Dcf::SetAifsn(uint32_t aifsn) [member function] + cls.add_method('SetAifsn', + 'void', + [param('uint32_t', 'aifsn')], + is_pure_virtual=True, is_virtual=True) + ## dcf.h: void ns3::Dcf::SetMaxCw(uint32_t maxCw) [member function] + cls.add_method('SetMaxCw', + 'void', + [param('uint32_t', 'maxCw')], + is_pure_virtual=True, is_virtual=True) + ## dcf.h: void ns3::Dcf::SetMinCw(uint32_t minCw) [member function] + cls.add_method('SetMinCw', + 'void', + [param('uint32_t', 'minCw')], + is_pure_virtual=True, is_virtual=True) return def register_Ns3EdcaTxopN_methods(root_module, cls): @@ -3933,15 +3947,10 @@ def register_Ns3EdcaTxopN_methods(root_module, cls): return def register_Ns3ErrorRateModel_methods(root_module, cls): - ## error-rate-model.h: ns3::ErrorRateModel::ErrorRateModel(ns3::ErrorRateModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ErrorRateModel const &', 'arg0')]) ## error-rate-model.h: ns3::ErrorRateModel::ErrorRateModel() [constructor] cls.add_constructor([]) - ## error-rate-model.h: static ns3::TypeId ns3::ErrorRateModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## error-rate-model.h: ns3::ErrorRateModel::ErrorRateModel(ns3::ErrorRateModel const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ErrorRateModel const &', 'arg0')]) ## error-rate-model.h: double ns3::ErrorRateModel::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', @@ -3952,6 +3961,11 @@ def register_Ns3ErrorRateModel_methods(root_module, cls): 'double', [param('ns3::WifiMode', 'mode'), param('double', 'snr'), param('uint32_t', 'nbits')], is_pure_virtual=True, is_const=True, is_virtual=True) + ## error-rate-model.h: static ns3::TypeId ns3::ErrorRateModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3FixedRssLossModel_methods(root_module, cls): @@ -4022,27 +4036,27 @@ def register_Ns3FriisPropagationLossModel_methods(root_module, cls): def register_Ns3IdealWifiManager_methods(root_module, cls): ## ideal-wifi-manager.h: ns3::IdealWifiManager::IdealWifiManager(ns3::IdealWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::IdealWifiManager const &', 'arg0')]) - ## ideal-wifi-manager.h: static ns3::TypeId ns3::IdealWifiManager::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## ideal-wifi-manager.h: ns3::IdealWifiManager::IdealWifiManager() [constructor] cls.add_constructor([]) - ## ideal-wifi-manager.h: void ns3::IdealWifiManager::SetupPhy(ns3::Ptr phy) [member function] - cls.add_method('SetupPhy', + ## ideal-wifi-manager.h: void ns3::IdealWifiManager::AddModeSnrThreshold(ns3::WifiMode mode, double ber) [member function] + cls.add_method('AddModeSnrThreshold', 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], - is_virtual=True) + [param('ns3::WifiMode', 'mode'), param('double', 'ber')]) ## ideal-wifi-manager.h: double ns3::IdealWifiManager::GetSnrThreshold(ns3::WifiMode mode) const [member function] cls.add_method('GetSnrThreshold', 'double', [param('ns3::WifiMode', 'mode')], is_const=True) - ## ideal-wifi-manager.h: void ns3::IdealWifiManager::AddModeSnrThreshold(ns3::WifiMode mode, double ber) [member function] - cls.add_method('AddModeSnrThreshold', + ## ideal-wifi-manager.h: static ns3::TypeId ns3::IdealWifiManager::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ideal-wifi-manager.h: void ns3::IdealWifiManager::SetupPhy(ns3::Ptr phy) [member function] + cls.add_method('SetupPhy', 'void', - [param('ns3::WifiMode', 'mode'), param('double', 'ber')]) + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], + is_virtual=True) ## ideal-wifi-manager.h: ns3::WifiRemoteStation * ns3::IdealWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -4051,31 +4065,31 @@ def register_Ns3IdealWifiManager_methods(root_module, cls): return def register_Ns3JakesPropagationLossModel_methods(root_module, cls): - ## jakes-propagation-loss-model.h: static ns3::TypeId ns3::JakesPropagationLossModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## jakes-propagation-loss-model.h: ns3::JakesPropagationLossModel::JakesPropagationLossModel() [constructor] cls.add_constructor([]) - ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNRays(uint8_t nRays) [member function] - cls.add_method('SetNRays', - 'void', - [param('uint8_t', 'nRays')]) - ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNOscillators(uint8_t nOscillators) [member function] - cls.add_method('SetNOscillators', - 'void', - [param('uint8_t', 'nOscillators')]) - ## jakes-propagation-loss-model.h: uint8_t ns3::JakesPropagationLossModel::GetNRays() const [member function] - cls.add_method('GetNRays', - 'uint8_t', - [], - is_const=True) ## jakes-propagation-loss-model.h: uint8_t ns3::JakesPropagationLossModel::GetNOscillators() const [member function] cls.add_method('GetNOscillators', 'uint8_t', [], is_const=True) + ## jakes-propagation-loss-model.h: uint8_t ns3::JakesPropagationLossModel::GetNRays() const [member function] + cls.add_method('GetNRays', + 'uint8_t', + [], + is_const=True) + ## jakes-propagation-loss-model.h: static ns3::TypeId ns3::JakesPropagationLossModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNOscillators(uint8_t nOscillators) [member function] + cls.add_method('SetNOscillators', + 'void', + [param('uint8_t', 'nOscillators')]) + ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNRays(uint8_t nRays) [member function] + cls.add_method('SetNRays', + 'void', + [param('uint8_t', 'nRays')]) ## jakes-propagation-loss-model.h: double ns3::JakesPropagationLossModel::DoCalcRxPower(double txPowerDbm, ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('DoCalcRxPower', 'double', @@ -4116,57 +4130,36 @@ def register_Ns3MacLow_methods(root_module, cls): cls.add_constructor([param('ns3::MacLow const &', 'arg0')]) ## mac-low.h: ns3::MacLow::MacLow() [constructor] cls.add_constructor([]) - ## mac-low.h: void ns3::MacLow::SetPhy(ns3::Ptr phy) [member function] - cls.add_method('SetPhy', - 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) - ## mac-low.h: void ns3::MacLow::SetWifiRemoteStationManager(ns3::Ptr manager) [member function] - cls.add_method('SetWifiRemoteStationManager', - 'void', - [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) - ## mac-low.h: void ns3::MacLow::SetAddress(ns3::Mac48Address ad) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Mac48Address', 'ad')]) - ## mac-low.h: void ns3::MacLow::SetAckTimeout(ns3::Time ackTimeout) [member function] - cls.add_method('SetAckTimeout', - 'void', - [param('ns3::Time', 'ackTimeout')]) - ## mac-low.h: void ns3::MacLow::SetCtsTimeout(ns3::Time ctsTimeout) [member function] - cls.add_method('SetCtsTimeout', - 'void', - [param('ns3::Time', 'ctsTimeout')]) - ## mac-low.h: void ns3::MacLow::SetSifs(ns3::Time sifs) [member function] - cls.add_method('SetSifs', - 'void', - [param('ns3::Time', 'sifs')]) - ## mac-low.h: void ns3::MacLow::SetSlotTime(ns3::Time slotTime) [member function] - cls.add_method('SetSlotTime', - 'void', - [param('ns3::Time', 'slotTime')]) - ## mac-low.h: void ns3::MacLow::SetPifs(ns3::Time pifs) [member function] - cls.add_method('SetPifs', - 'void', - [param('ns3::Time', 'pifs')]) - ## mac-low.h: void ns3::MacLow::SetBssid(ns3::Mac48Address ad) [member function] - cls.add_method('SetBssid', - 'void', - [param('ns3::Mac48Address', 'ad')]) - ## mac-low.h: ns3::Mac48Address ns3::MacLow::GetAddress() const [member function] - cls.add_method('GetAddress', - 'ns3::Mac48Address', - [], + ## mac-low.h: ns3::Time ns3::MacLow::CalculateTransmissionTime(ns3::Ptr packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters const & parameters) const [member function] + cls.add_method('CalculateTransmissionTime', + 'ns3::Time', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters const &', 'parameters')], is_const=True) ## mac-low.h: ns3::Time ns3::MacLow::GetAckTimeout() const [member function] cls.add_method('GetAckTimeout', 'ns3::Time', [], is_const=True) + ## mac-low.h: ns3::Mac48Address ns3::MacLow::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Mac48Address', + [], + is_const=True) + ## mac-low.h: ns3::Mac48Address ns3::MacLow::GetBssid() const [member function] + cls.add_method('GetBssid', + 'ns3::Mac48Address', + [], + is_const=True) ## mac-low.h: ns3::Time ns3::MacLow::GetCtsTimeout() const [member function] cls.add_method('GetCtsTimeout', 'ns3::Time', [], is_const=True) + ## mac-low.h: ns3::Time ns3::MacLow::GetPifs() const [member function] + cls.add_method('GetPifs', + 'ns3::Time', + [], + is_const=True) ## mac-low.h: ns3::Time ns3::MacLow::GetSifs() const [member function] cls.add_method('GetSifs', 'ns3::Time', @@ -4177,41 +4170,62 @@ def register_Ns3MacLow_methods(root_module, cls): 'ns3::Time', [], is_const=True) - ## mac-low.h: ns3::Time ns3::MacLow::GetPifs() const [member function] - cls.add_method('GetPifs', - 'ns3::Time', - [], - is_const=True) - ## mac-low.h: ns3::Mac48Address ns3::MacLow::GetBssid() const [member function] - cls.add_method('GetBssid', - 'ns3::Mac48Address', - [], - is_const=True) - ## mac-low.h: void ns3::MacLow::SetRxCallback(ns3::Callback, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] - cls.add_method('SetRxCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## mac-low.h: void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] - cls.add_method('RegisterDcfListener', - 'void', - [param('ns3::MacLowDcfListener *', 'listener')]) - ## mac-low.h: ns3::Time ns3::MacLow::CalculateTransmissionTime(ns3::Ptr packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters const & parameters) const [member function] - cls.add_method('CalculateTransmissionTime', - 'ns3::Time', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters const &', 'parameters')], - is_const=True) - ## mac-low.h: void ns3::MacLow::StartTransmission(ns3::Ptr packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters parameters, ns3::MacLowTransmissionListener * listener) [member function] - cls.add_method('StartTransmission', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')]) - ## mac-low.h: void ns3::MacLow::ReceiveOk(ns3::Ptr packet, double rxSnr, ns3::WifiMode txMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('ReceiveOk', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble')]) ## mac-low.h: void ns3::MacLow::ReceiveError(ns3::Ptr packet, double rxSnr) [member function] cls.add_method('ReceiveError', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'rxSnr')]) + ## mac-low.h: void ns3::MacLow::ReceiveOk(ns3::Ptr packet, double rxSnr, ns3::WifiMode txMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('ReceiveOk', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble')]) + ## mac-low.h: void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] + cls.add_method('RegisterDcfListener', + 'void', + [param('ns3::MacLowDcfListener *', 'listener')]) + ## mac-low.h: void ns3::MacLow::SetAckTimeout(ns3::Time ackTimeout) [member function] + cls.add_method('SetAckTimeout', + 'void', + [param('ns3::Time', 'ackTimeout')]) + ## mac-low.h: void ns3::MacLow::SetAddress(ns3::Mac48Address ad) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Mac48Address', 'ad')]) + ## mac-low.h: void ns3::MacLow::SetBssid(ns3::Mac48Address ad) [member function] + cls.add_method('SetBssid', + 'void', + [param('ns3::Mac48Address', 'ad')]) + ## mac-low.h: void ns3::MacLow::SetCtsTimeout(ns3::Time ctsTimeout) [member function] + cls.add_method('SetCtsTimeout', + 'void', + [param('ns3::Time', 'ctsTimeout')]) + ## mac-low.h: void ns3::MacLow::SetPhy(ns3::Ptr phy) [member function] + cls.add_method('SetPhy', + 'void', + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) + ## mac-low.h: void ns3::MacLow::SetPifs(ns3::Time pifs) [member function] + cls.add_method('SetPifs', + 'void', + [param('ns3::Time', 'pifs')]) + ## mac-low.h: void ns3::MacLow::SetRxCallback(ns3::Callback, ns3::WifiMacHeader const*, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] + cls.add_method('SetRxCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::WifiMacHeader const *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) + ## mac-low.h: void ns3::MacLow::SetSifs(ns3::Time sifs) [member function] + cls.add_method('SetSifs', + 'void', + [param('ns3::Time', 'sifs')]) + ## mac-low.h: void ns3::MacLow::SetSlotTime(ns3::Time slotTime) [member function] + cls.add_method('SetSlotTime', + 'void', + [param('ns3::Time', 'slotTime')]) + ## mac-low.h: void ns3::MacLow::SetWifiRemoteStationManager(ns3::Ptr manager) [member function] + cls.add_method('SetWifiRemoteStationManager', + 'void', + [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) + ## mac-low.h: void ns3::MacLow::StartTransmission(ns3::Ptr packet, ns3::WifiMacHeader const * hdr, ns3::MacLowTransmissionParameters parameters, ns3::MacLowTransmissionListener * listener) [member function] + cls.add_method('StartTransmission', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')]) ## mac-low.h: void ns3::MacLow::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -4220,36 +4234,36 @@ def register_Ns3MacLow_methods(root_module, cls): return def register_Ns3MgtBeaconHeader_methods(root_module, cls): - ## mgt-headers.h: ns3::MgtBeaconHeader::MgtBeaconHeader(ns3::MgtBeaconHeader const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MgtBeaconHeader const &', 'arg0')]) ## mgt-headers.h: ns3::MgtBeaconHeader::MgtBeaconHeader() [constructor] cls.add_constructor([]) + ## mgt-headers.h: ns3::MgtBeaconHeader::MgtBeaconHeader(ns3::MgtBeaconHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MgtBeaconHeader const &', 'arg0')]) return def register_Ns3MinstrelWifiManager_methods(root_module, cls): ## minstrel-wifi-manager.h: ns3::MinstrelWifiManager::MinstrelWifiManager(ns3::MinstrelWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::MinstrelWifiManager const &', 'arg0')]) - ## minstrel-wifi-manager.h: static ns3::TypeId ns3::MinstrelWifiManager::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## minstrel-wifi-manager.h: ns3::MinstrelWifiManager::MinstrelWifiManager() [constructor] cls.add_constructor([]) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiManager::SetupPhy(ns3::Ptr phy) [member function] - cls.add_method('SetupPhy', + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiManager::AddCalcTxTime(ns3::WifiMode mode, ns3::Time t) [member function] + cls.add_method('AddCalcTxTime', 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], - is_virtual=True) + [param('ns3::WifiMode', 'mode'), param('ns3::Time', 't')]) ## minstrel-wifi-manager.h: ns3::Time ns3::MinstrelWifiManager::GetCalcTxTime(ns3::WifiMode mode) const [member function] cls.add_method('GetCalcTxTime', 'ns3::Time', [param('ns3::WifiMode', 'mode')], is_const=True) - ## minstrel-wifi-manager.h: void ns3::MinstrelWifiManager::AddCalcTxTime(ns3::WifiMode mode, ns3::Time t) [member function] - cls.add_method('AddCalcTxTime', + ## minstrel-wifi-manager.h: static ns3::TypeId ns3::MinstrelWifiManager::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## minstrel-wifi-manager.h: void ns3::MinstrelWifiManager::SetupPhy(ns3::Ptr phy) [member function] + cls.add_method('SetupPhy', 'void', - [param('ns3::WifiMode', 'mode'), param('ns3::Time', 't')]) + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')], + is_virtual=True) ## minstrel-wifi-manager.h: ns3::WifiRemoteStation * ns3::MinstrelWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -4258,15 +4272,10 @@ def register_Ns3MinstrelWifiManager_methods(root_module, cls): return def register_Ns3MsduAggregator_methods(root_module, cls): - ## msdu-aggregator.h: ns3::MsduAggregator::MsduAggregator(ns3::MsduAggregator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MsduAggregator const &', 'arg0')]) ## msdu-aggregator.h: ns3::MsduAggregator::MsduAggregator() [constructor] cls.add_constructor([]) - ## msdu-aggregator.h: static ns3::TypeId ns3::MsduAggregator::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) + ## msdu-aggregator.h: ns3::MsduAggregator::MsduAggregator(ns3::MsduAggregator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MsduAggregator const &', 'arg0')]) ## msdu-aggregator.h: bool ns3::MsduAggregator::Aggregate(ns3::Ptr packet, ns3::Ptr aggregatedPacket, ns3::Mac48Address src, ns3::Mac48Address dest) [member function] cls.add_method('Aggregate', 'bool', @@ -4277,6 +4286,11 @@ def register_Ns3MsduAggregator_methods(root_module, cls): 'std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket')], is_static=True) + ## msdu-aggregator.h: static ns3::TypeId ns3::MsduAggregator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3NakagamiPropagationLossModel_methods(root_module, cls): @@ -4616,13 +4630,13 @@ def register_Ns3NqstaWifiMac_methods(root_module, cls): def register_Ns3OnoeWifiManager_methods(root_module, cls): ## onoe-wifi-manager.h: ns3::OnoeWifiManager::OnoeWifiManager(ns3::OnoeWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::OnoeWifiManager const &', 'arg0')]) + ## onoe-wifi-manager.h: ns3::OnoeWifiManager::OnoeWifiManager() [constructor] + cls.add_constructor([]) ## onoe-wifi-manager.h: static ns3::TypeId ns3::OnoeWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## onoe-wifi-manager.h: ns3::OnoeWifiManager::OnoeWifiManager() [constructor] - cls.add_constructor([]) ## onoe-wifi-manager.h: ns3::WifiRemoteStation * ns3::OnoeWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -5097,27 +5111,27 @@ def register_Ns3QstaWifiMac_methods(root_module, cls): def register_Ns3RraaWifiManager_methods(root_module, cls): ## rraa-wifi-manager.h: ns3::RraaWifiManager::RraaWifiManager(ns3::RraaWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::RraaWifiManager const &', 'arg0')]) - ## rraa-wifi-manager.h: static ns3::TypeId ns3::RraaWifiManager::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## rraa-wifi-manager.h: ns3::RraaWifiManager::RraaWifiManager() [constructor] cls.add_constructor([]) - ## rraa-wifi-manager.h: bool ns3::RraaWifiManager::OnlyBasic() [member function] - cls.add_method('OnlyBasic', - 'bool', - []) - ## rraa-wifi-manager.h: ns3::Time ns3::RraaWifiManager::GetTimeout() const [member function] - cls.add_method('GetTimeout', - 'ns3::Time', - [], - is_const=True) ## rraa-wifi-manager.h: ns3::ThresholdsItem ns3::RraaWifiManager::GetThresholds(ns3::WifiMode mode) const [member function] cls.add_method('GetThresholds', 'ns3::ThresholdsItem', [param('ns3::WifiMode', 'mode')], is_const=True) + ## rraa-wifi-manager.h: ns3::Time ns3::RraaWifiManager::GetTimeout() const [member function] + cls.add_method('GetTimeout', + 'ns3::Time', + [], + is_const=True) + ## rraa-wifi-manager.h: static ns3::TypeId ns3::RraaWifiManager::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## rraa-wifi-manager.h: bool ns3::RraaWifiManager::OnlyBasic() [member function] + cls.add_method('OnlyBasic', + 'bool', + []) ## rraa-wifi-manager.h: ns3::WifiRemoteStation * ns3::RraaWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', @@ -5126,10 +5140,10 @@ def register_Ns3RraaWifiManager_methods(root_module, cls): return def register_Ns3WifiChannel_methods(root_module, cls): - ## wifi-channel.h: ns3::WifiChannel::WifiChannel(ns3::WifiChannel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::WifiChannel const &', 'arg0')]) ## wifi-channel.h: ns3::WifiChannel::WifiChannel() [constructor] cls.add_constructor([]) + ## wifi-channel.h: ns3::WifiChannel::WifiChannel(ns3::WifiChannel const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiChannel const &', 'arg0')]) ## wifi-channel.h: static ns3::TypeId ns3::WifiChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', @@ -5140,30 +5154,53 @@ def register_Ns3WifiChannel_methods(root_module, cls): def register_Ns3WifiNetDevice_methods(root_module, cls): ## wifi-net-device.h: ns3::WifiNetDevice::WifiNetDevice(ns3::WifiNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::WifiNetDevice const &', 'arg0')]) - ## wifi-net-device.h: static ns3::TypeId ns3::WifiNetDevice::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## wifi-net-device.h: ns3::WifiNetDevice::WifiNetDevice() [constructor] cls.add_constructor([]) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetMac(ns3::Ptr mac) [member function] - cls.add_method('SetMac', - 'void', - [param('ns3::Ptr< ns3::WifiMac >', 'mac')]) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetPhy(ns3::Ptr phy) [member function] - cls.add_method('SetPhy', - 'void', - [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetRemoteStationManager(ns3::Ptr manager) [member function] - cls.add_method('SetRemoteStationManager', - 'void', - [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) + ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Address', + [], + is_const=True, is_virtual=True) + ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetBroadcast() const [member function] + cls.add_method('GetBroadcast', + 'ns3::Address', + [], + is_const=True, is_virtual=True) + ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::Channel >', + [], + is_const=True, is_virtual=True) + ## wifi-net-device.h: uint32_t ns3::WifiNetDevice::GetIfIndex() const [member function] + cls.add_method('GetIfIndex', + 'uint32_t', + [], + is_const=True, is_virtual=True) ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetMac() const [member function] cls.add_method('GetMac', 'ns3::Ptr< ns3::WifiMac >', [], is_const=True) + ## wifi-net-device.h: uint16_t ns3::WifiNetDevice::GetMtu() const [member function] + cls.add_method('GetMtu', + 'uint16_t', + [], + is_const=True, is_virtual=True) + ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv4Address', 'multicastGroup')], + is_const=True, is_virtual=True) + ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] + cls.add_method('GetMulticast', + 'ns3::Address', + [param('ns3::Ipv6Address', 'addr')], + is_const=True, is_virtual=True) + ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetPhy() const [member function] cls.add_method('GetPhy', 'ns3::Ptr< ns3::WifiPhy >', @@ -5174,39 +5211,19 @@ def register_Ns3WifiNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::WifiRemoteStationManager >', [], is_const=True) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetIfIndex(uint32_t const index) [member function] - cls.add_method('SetIfIndex', - 'void', - [param('uint32_t const', 'index')], - is_virtual=True) - ## wifi-net-device.h: uint32_t ns3::WifiNetDevice::GetIfIndex() const [member function] - cls.add_method('GetIfIndex', - 'uint32_t', + ## wifi-net-device.h: static ns3::TypeId ns3::WifiNetDevice::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::Channel >', - [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetAddress(ns3::Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'address')], - is_virtual=True) - ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetAddress() const [member function] - cls.add_method('GetAddress', - 'ns3::Address', - [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: bool ns3::WifiNetDevice::SetMtu(uint16_t const mtu) [member function] - cls.add_method('SetMtu', + is_static=True) + ## wifi-net-device.h: bool ns3::WifiNetDevice::IsBridge() const [member function] + cls.add_method('IsBridge', + 'bool', + [], + is_const=True, is_virtual=True) + ## wifi-net-device.h: bool ns3::WifiNetDevice::IsBroadcast() const [member function] + cls.add_method('IsBroadcast', 'bool', - [param('uint16_t const', 'mtu')], - is_virtual=True) - ## wifi-net-device.h: uint16_t ns3::WifiNetDevice::GetMtu() const [member function] - cls.add_method('GetMtu', - 'uint16_t', [], is_const=True, is_virtual=True) ## wifi-net-device.h: bool ns3::WifiNetDevice::IsLinkUp() const [member function] @@ -5214,38 +5231,18 @@ def register_Ns3WifiNetDevice_methods(root_module, cls): 'bool', [], is_const=True, is_virtual=True) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] - cls.add_method('SetLinkChangeCallback', - '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) - ## wifi-net-device.h: bool ns3::WifiNetDevice::IsBroadcast() const [member function] - cls.add_method('IsBroadcast', - 'bool', - [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetBroadcast() const [member function] - cls.add_method('GetBroadcast', - 'ns3::Address', - [], - is_const=True, is_virtual=True) ## wifi-net-device.h: bool ns3::WifiNetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True, is_virtual=True) - ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv4Address', 'multicastGroup')], - is_const=True, is_virtual=True) ## wifi-net-device.h: bool ns3::WifiNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) - ## wifi-net-device.h: bool ns3::WifiNetDevice::IsBridge() const [member function] - cls.add_method('IsBridge', + ## wifi-net-device.h: bool ns3::WifiNetDevice::NeedsArp() const [member function] + cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) @@ -5254,41 +5251,58 @@ def register_Ns3WifiNetDevice_methods(root_module, cls): 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) - ## wifi-net-device.h: ns3::Ptr ns3::WifiNetDevice::GetNode() const [member function] - cls.add_method('GetNode', - 'ns3::Ptr< ns3::Node >', - [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetNode(ns3::Ptr node) [member function] - cls.add_method('SetNode', - 'void', - [param('ns3::Ptr< ns3::Node >', 'node')], - is_virtual=True) - ## wifi-net-device.h: bool ns3::WifiNetDevice::NeedsArp() const [member function] - cls.add_method('NeedsArp', - 'bool', - [], - is_const=True, is_virtual=True) - ## wifi-net-device.h: void ns3::WifiNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) - ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] - cls.add_method('GetMulticast', - 'ns3::Address', - [param('ns3::Ipv6Address', 'addr')], - is_const=True, is_virtual=True) ## wifi-net-device.h: bool ns3::WifiNetDevice::SendFrom(ns3::Ptr 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) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetIfIndex(uint32_t const index) [member function] + cls.add_method('SetIfIndex', + 'void', + [param('uint32_t const', 'index')], + is_virtual=True) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetLinkChangeCallback(ns3::Callback callback) [member function] + cls.add_method('SetLinkChangeCallback', + '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) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetMac(ns3::Ptr mac) [member function] + cls.add_method('SetMac', + 'void', + [param('ns3::Ptr< ns3::WifiMac >', 'mac')]) + ## wifi-net-device.h: bool ns3::WifiNetDevice::SetMtu(uint16_t const mtu) [member function] + cls.add_method('SetMtu', + 'bool', + [param('uint16_t const', 'mtu')], + is_virtual=True) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_virtual=True) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetPhy(ns3::Ptr phy) [member function] + cls.add_method('SetPhy', + 'void', + [param('ns3::Ptr< ns3::WifiPhy >', 'phy')]) ## wifi-net-device.h: void ns3::WifiNetDevice::SetPromiscReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, 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) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetRemoteStationManager(ns3::Ptr manager) [member function] + cls.add_method('SetRemoteStationManager', + 'void', + [param('ns3::Ptr< ns3::WifiRemoteStationManager >', 'manager')]) ## wifi-net-device.h: bool ns3::WifiNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', @@ -5304,11 +5318,6 @@ def register_Ns3WifiNetDevice_methods(root_module, cls): def register_Ns3YansErrorRateModel_methods(root_module, cls): ## yans-error-rate-model.h: ns3::YansErrorRateModel::YansErrorRateModel(ns3::YansErrorRateModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansErrorRateModel const &', 'arg0')]) - ## yans-error-rate-model.h: static ns3::TypeId ns3::YansErrorRateModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## yans-error-rate-model.h: ns3::YansErrorRateModel::YansErrorRateModel() [constructor] cls.add_constructor([]) ## yans-error-rate-model.h: double ns3::YansErrorRateModel::GetChunkSuccessRate(ns3::WifiMode mode, double snr, uint32_t nbits) const [member function] @@ -5316,57 +5325,62 @@ def register_Ns3YansErrorRateModel_methods(root_module, cls): 'double', [param('ns3::WifiMode', 'mode'), param('double', 'snr'), param('uint32_t', 'nbits')], is_const=True, is_virtual=True) + ## yans-error-rate-model.h: static ns3::TypeId ns3::YansErrorRateModel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) return def register_Ns3YansWifiChannel_methods(root_module, cls): ## yans-wifi-channel.h: ns3::YansWifiChannel::YansWifiChannel(ns3::YansWifiChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::YansWifiChannel const &', 'arg0')]) - ## yans-wifi-channel.h: static ns3::TypeId ns3::YansWifiChannel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## yans-wifi-channel.h: ns3::YansWifiChannel::YansWifiChannel() [constructor] cls.add_constructor([]) - ## yans-wifi-channel.h: uint32_t ns3::YansWifiChannel::GetNDevices() const [member function] - cls.add_method('GetNDevices', - 'uint32_t', - [], - is_const=True, is_virtual=True) + ## yans-wifi-channel.h: void ns3::YansWifiChannel::Add(ns3::Ptr phy) [member function] + cls.add_method('Add', + 'void', + [param('ns3::Ptr< ns3::YansWifiPhy >', 'phy')]) ## yans-wifi-channel.h: ns3::Ptr ns3::YansWifiChannel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, is_virtual=True) - ## yans-wifi-channel.h: void ns3::YansWifiChannel::Add(ns3::Ptr phy) [member function] - cls.add_method('Add', - 'void', - [param('ns3::Ptr< ns3::YansWifiPhy >', 'phy')]) - ## yans-wifi-channel.h: void ns3::YansWifiChannel::SetPropagationLossModel(ns3::Ptr loss) [member function] - cls.add_method('SetPropagationLossModel', - 'void', - [param('ns3::Ptr< ns3::PropagationLossModel >', 'loss')]) - ## yans-wifi-channel.h: void ns3::YansWifiChannel::SetPropagationDelayModel(ns3::Ptr delay) [member function] - cls.add_method('SetPropagationDelayModel', - 'void', - [param('ns3::Ptr< ns3::PropagationDelayModel >', 'delay')]) + ## yans-wifi-channel.h: uint32_t ns3::YansWifiChannel::GetNDevices() const [member function] + cls.add_method('GetNDevices', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## yans-wifi-channel.h: static ns3::TypeId ns3::YansWifiChannel::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) ## yans-wifi-channel.h: void ns3::YansWifiChannel::Send(ns3::Ptr sender, ns3::Ptr packet, double txPowerDbm, ns3::WifiMode wifiMode, ns3::WifiPreamble preamble) const [member function] cls.add_method('Send', 'void', [param('ns3::Ptr< ns3::YansWifiPhy >', 'sender'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('double', 'txPowerDbm'), param('ns3::WifiMode', 'wifiMode'), param('ns3::WifiPreamble', 'preamble')], is_const=True) + ## yans-wifi-channel.h: void ns3::YansWifiChannel::SetPropagationDelayModel(ns3::Ptr delay) [member function] + cls.add_method('SetPropagationDelayModel', + 'void', + [param('ns3::Ptr< ns3::PropagationDelayModel >', 'delay')]) + ## yans-wifi-channel.h: void ns3::YansWifiChannel::SetPropagationLossModel(ns3::Ptr loss) [member function] + cls.add_method('SetPropagationLossModel', + 'void', + [param('ns3::Ptr< ns3::PropagationLossModel >', 'loss')]) return def register_Ns3AarfWifiManager_methods(root_module, cls): ## aarf-wifi-manager.h: ns3::AarfWifiManager::AarfWifiManager(ns3::AarfWifiManager const & arg0) [copy constructor] cls.add_constructor([param('ns3::AarfWifiManager const &', 'arg0')]) + ## aarf-wifi-manager.h: ns3::AarfWifiManager::AarfWifiManager() [constructor] + cls.add_constructor([]) ## aarf-wifi-manager.h: static ns3::TypeId ns3::AarfWifiManager::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## aarf-wifi-manager.h: ns3::AarfWifiManager::AarfWifiManager() [constructor] - cls.add_constructor([]) ## aarf-wifi-manager.h: ns3::WifiRemoteStation * ns3::AarfWifiManager::CreateStation() [member function] cls.add_method('CreateStation', 'ns3::WifiRemoteStation *', diff --git a/bindings/python/ns3modulegen_generated.py b/bindings/python/ns3modulegen_generated.py index e8fa1cdf1..93400d54f 100644 --- a/bindings/python/ns3modulegen_generated.py +++ b/bindings/python/ns3modulegen_generated.py @@ -35,6 +35,8 @@ import ns3_module_bridge import ns3_module_global_routing import ns3_module_udp_echo import ns3_module_olsr +import ns3_module_radvd +import ns3_module_ping6 import ns3_module_helper def module_init(): @@ -297,6 +299,28 @@ def register_types(module): ns3_module_olsr__local.register_types(module) root_module.end_section('ns3_module_olsr') + root_module.begin_section('ns3_module_radvd') + ns3_module_radvd.register_types(module) + + try: + import ns3_module_radvd__local + except ImportError: + pass + else: + 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) + + 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_helper') ns3_module_helper.register_types(module) @@ -309,6 +333,7 @@ def register_types(module): root_module.end_section('ns3_module_helper') 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::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') @@ -617,6 +642,28 @@ def register_methods(root_module): ns3_module_olsr__local.register_methods(root_module) root_module.end_section('ns3_module_olsr') + root_module.begin_section('ns3_module_radvd') + ns3_module_radvd.register_methods(root_module) + + try: + import ns3_module_radvd__local + except ImportError: + pass + else: + 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) + + 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_helper') ns3_module_helper.register_methods(root_module) @@ -885,6 +932,28 @@ def register_functions(root_module): ns3_module_olsr__local.register_functions(root_module) root_module.end_section('ns3_module_olsr') + root_module.begin_section('ns3_module_radvd') + ns3_module_radvd.register_functions(root_module) + + try: + import ns3_module_radvd__local + except ImportError: + pass + else: + 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) + + 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_helper') ns3_module_helper.register_functions(root_module) diff --git a/bindings/python/wscript b/bindings/python/wscript index aaad25af6..f6b50c1c6 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -15,7 +15,7 @@ import Build import Utils ## https://launchpad.net/pybindgen/ -REQUIRED_PYBINDGEN_VERSION = (0, 10, 0, 640) +REQUIRED_PYBINDGEN_VERSION = (0, 11, 0, 697) REQUIRED_PYGCCXML_VERSION = (0, 9, 5) @@ -181,6 +181,7 @@ prio_headers = { "propagation-delay-model.h", "propagation-loss-model.h", "net-device.h", + "ipv4-interface.h", ) } From 49a41d2925985a013c94903ea423fb1a1b4159ad Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Aug 2009 13:01:48 +0200 Subject: [PATCH 18/43] make sure python does not wrap copy constructor and assignment operator --- src/internet-stack/arp-l3-protocol.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internet-stack/arp-l3-protocol.h b/src/internet-stack/arp-l3-protocol.h index 7f0294e9f..7bdf7322e 100644 --- a/src/internet-stack/arp-l3-protocol.h +++ b/src/internet-stack/arp-l3-protocol.h @@ -84,6 +84,8 @@ protected: virtual void NotifyNewAggregate (); private: typedef std::list > CacheList; + ArpL3Protocol (const ArpL3Protocol &o); + ArpL3Protocol &operator = (const ArpL3Protocol &o); Ptr FindCache (Ptr device); void SendArpRequest (Ptrcache, Ipv4Address to); void SendArpReply (Ptr cache, Ipv4Address myIp, Ipv4Address toIp, Address toMac); From 06a961f80c96c7ca8676cb9d875ad9441d2e3019 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 31 Aug 2009 15:29:20 +0200 Subject: [PATCH 19/43] rescan --- bindings/python/ns3_module_core.py | 8 +- bindings/python/ns3_module_internet_stack.py | 34 +- bindings/python/ns3_module_olsr.py | 12 +- bindings/python/ns3_module_wifi.py | 312 +++++++++---------- 4 files changed, 182 insertions(+), 184 deletions(-) diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index 835e7c4d1..06d6e8014 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -2203,7 +2203,7 @@ def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): cls.add_constructor([param('ns3::BooleanValue const &', 'value')]) ## traced-value.h: ns3::TracedValue::TracedValue(ns3::EnumValue const & value) [constructor] cls.add_constructor([param('ns3::EnumValue const &', 'value')]) - ## traced-value.h: void ns3::TracedValue::Connect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] + ## traced-value.h: void ns3::TracedValue::Connect(ns3::CallbackBase const & cb, std::string path) [member function] cls.add_method('Connect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) @@ -2211,7 +2211,7 @@ def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): cls.add_method('ConnectWithoutContext', 'void', [param('ns3::CallbackBase const &', 'cb')]) - ## traced-value.h: void ns3::TracedValue::Disconnect(ns3::CallbackBase const & cb, std::basic_string,std::allocator > path) [member function] + ## traced-value.h: void ns3::TracedValue::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function] cls.add_method('Disconnect', 'void', [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')]) @@ -2383,7 +2383,7 @@ def register_functions(root_module): module.add_function('TypeNameGet', 'std::string', [], - template_parameters=['long']) + template_parameters=['long long']) ## type-name.h: extern std::string ns3::TypeNameGet() [free function] module.add_function('TypeNameGet', 'std::string', @@ -2403,7 +2403,7 @@ def register_functions(root_module): module.add_function('TypeNameGet', 'std::string', [], - template_parameters=['unsigned long']) + template_parameters=['unsigned long long']) ## type-name.h: extern std::string ns3::TypeNameGet() [free function] module.add_function('TypeNameGet', 'std::string', diff --git a/bindings/python/ns3_module_internet_stack.py b/bindings/python/ns3_module_internet_stack.py index df38c1743..1d25c3fe1 100644 --- a/bindings/python/ns3_module_internet_stack.py +++ b/bindings/python/ns3_module_internet_stack.py @@ -1638,33 +1638,31 @@ def register_Ns3ArpCacheEntry_methods(root_module, cls): return def register_Ns3ArpL3Protocol_methods(root_module, cls): - ## arp-l3-protocol.h: ns3::ArpL3Protocol::ArpL3Protocol(ns3::ArpL3Protocol const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ArpL3Protocol const &', 'arg0')]) - ## arp-l3-protocol.h: ns3::ArpL3Protocol::ArpL3Protocol() [constructor] - cls.add_constructor([]) - ## arp-l3-protocol.h: ns3::Ptr ns3::ArpL3Protocol::CreateCache(ns3::Ptr device, ns3::Ptr interface) [member function] - cls.add_method('CreateCache', - 'ns3::Ptr< ns3::ArpCache >', - [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')]) + ## arp-l3-protocol.h: ns3::ArpL3Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True) ## arp-l3-protocol.h: static ns3::TypeId ns3::ArpL3Protocol::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## arp-l3-protocol.h: bool ns3::ArpL3Protocol::Lookup(ns3::Ptr p, ns3::Ipv4Address destination, ns3::Ptr device, ns3::Ptr cache, ns3::Address * hardwareDestination) [member function] - cls.add_method('Lookup', - 'bool', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::ArpCache >', 'cache'), param('ns3::Address *', 'hardwareDestination')]) - ## arp-l3-protocol.h: void ns3::ArpL3Protocol::Receive(ns3::Ptr device, ns3::Ptr 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')]) + ## arp-l3-protocol.h: ns3::ArpL3Protocol::ArpL3Protocol() [constructor] + cls.add_constructor([]) ## arp-l3-protocol.h: void ns3::ArpL3Protocol::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')]) - ## arp-l3-protocol.h: ns3::ArpL3Protocol::PROT_NUMBER [variable] - cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True) + ## arp-l3-protocol.h: ns3::Ptr ns3::ArpL3Protocol::CreateCache(ns3::Ptr device, ns3::Ptr interface) [member function] + cls.add_method('CreateCache', + 'ns3::Ptr< ns3::ArpCache >', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')]) + ## arp-l3-protocol.h: void ns3::ArpL3Protocol::Receive(ns3::Ptr device, ns3::Ptr 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')]) + ## arp-l3-protocol.h: bool ns3::ArpL3Protocol::Lookup(ns3::Ptr p, ns3::Ipv4Address destination, ns3::Ptr device, ns3::Ptr cache, ns3::Address * hardwareDestination) [member function] + cls.add_method('Lookup', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::ArpCache >', 'cache'), param('ns3::Address *', 'hardwareDestination')]) ## arp-l3-protocol.h: void ns3::ArpL3Protocol::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_olsr.py b/bindings/python/ns3_module_olsr.py index 980809452..519176de4 100644 --- a/bindings/python/ns3_module_olsr.py +++ b/bindings/python/ns3_module_olsr.py @@ -104,27 +104,27 @@ def register_types_ns3_olsr(module): 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&') diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py index 9e3c360dd..021fcd66a 100644 --- a/bindings/python/ns3_module_wifi.py +++ b/bindings/python/ns3_module_wifi.py @@ -3162,25 +3162,31 @@ def register_Ns3WifiRemoteStationManager_methods(root_module, cls): return def register_Ns3YansWifiPhy_methods(root_module, cls): - ## yans-wifi-phy.h: static ns3::TypeId ns3::YansWifiPhy::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) ## yans-wifi-phy.h: ns3::YansWifiPhy::YansWifiPhy() [constructor] cls.add_constructor([]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetChannel(ns3::Ptr channel) [member function] - cls.add_method('SetChannel', + ## yans-wifi-phy.h: double ns3::YansWifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] + cls.add_method('CalculateSnr', + 'double', + [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], + is_const=True, is_virtual=True) + ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] + cls.add_method('CalculateTxDuration', + 'ns3::Time', + [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_const=True, is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] + cls.add_method('ConfigureStandard', 'void', - [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetChannelNumber(uint16_t id) [member function] - cls.add_method('SetChannelNumber', - 'void', - [param('uint16_t', 'id')], + [param('ns3::WifiPhyStandard', 'standard')], is_virtual=True) - ## yans-wifi-phy.h: uint16_t ns3::YansWifiPhy::GetChannelNumber() const [member function] - cls.add_method('GetChannelNumber', - 'uint16_t', + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetCcaMode1Threshold() const [member function] + cls.add_method('GetCcaMode1Threshold', + 'double', + [], + is_const=True) + ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetChannel() const [member function] + cls.add_method('GetChannel', + 'ns3::Ptr< ns3::WifiChannel >', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetChannelFrequencyMhz() const [member function] @@ -3188,67 +3194,19 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'double', [], is_const=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::StartReceivePacket(ns3::Ptr packet, double rxPowerDbm, ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] - cls.add_method('StartReceivePacket', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxPowerDbm'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetRxNoiseFigure(double noiseFigureDb) [member function] - cls.add_method('SetRxNoiseFigure', - 'void', - [param('double', 'noiseFigureDb')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxPowerStart(double start) [member function] - cls.add_method('SetTxPowerStart', - 'void', - [param('double', 'start')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxPowerEnd(double end) [member function] - cls.add_method('SetTxPowerEnd', - 'void', - [param('double', 'end')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetNTxPower(uint32_t n) [member function] - cls.add_method('SetNTxPower', - 'void', - [param('uint32_t', 'n')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxGain(double gain) [member function] - cls.add_method('SetTxGain', - 'void', - [param('double', 'gain')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetRxGain(double gain) [member function] - cls.add_method('SetRxGain', - 'void', - [param('double', 'gain')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetEdThreshold(double threshold) [member function] - cls.add_method('SetEdThreshold', - 'void', - [param('double', 'threshold')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetCcaMode1Threshold(double threshold) [member function] - cls.add_method('SetCcaMode1Threshold', - 'void', - [param('double', 'threshold')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetErrorRateModel(ns3::Ptr rate) [member function] - cls.add_method('SetErrorRateModel', - 'void', - [param('ns3::Ptr< ns3::ErrorRateModel >', 'rate')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetDevice(ns3::Ptr device) [member function] - cls.add_method('SetDevice', - 'void', - [param('ns3::Ptr< ns3::Object >', 'device')]) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetMobility(ns3::Ptr mobility) [member function] - cls.add_method('SetMobility', - 'void', - [param('ns3::Ptr< ns3::Object >', 'mobility')]) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetRxNoiseFigure() const [member function] - cls.add_method('GetRxNoiseFigure', - 'double', + ## yans-wifi-phy.h: uint16_t ns3::YansWifiPhy::GetChannelNumber() const [member function] + cls.add_method('GetChannelNumber', + 'uint16_t', [], - is_const=True) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxGain() const [member function] - cls.add_method('GetTxGain', - 'double', + is_const=True, is_virtual=True) + ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetDelayUntilIdle() [member function] + cls.add_method('GetDelayUntilIdle', + 'ns3::Time', [], - is_const=True) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetRxGain() const [member function] - cls.add_method('GetRxGain', - 'double', + is_virtual=True) + ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetDevice() const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::Object >', [], is_const=True) ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetEdThreshold() const [member function] @@ -3256,33 +3214,28 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'double', [], is_const=True) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetCcaMode1Threshold() const [member function] - cls.add_method('GetCcaMode1Threshold', - 'double', - [], - is_const=True) ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetErrorRateModel() const [member function] cls.add_method('GetErrorRateModel', 'ns3::Ptr< ns3::ErrorRateModel >', [], is_const=True) - ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetDevice() const [member function] - cls.add_method('GetDevice', - 'ns3::Ptr< ns3::Object >', + ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetLastRxStartTime() const [member function] + cls.add_method('GetLastRxStartTime', + 'ns3::Time', [], - is_const=True) + is_const=True, is_virtual=True) ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetMobility() [member function] cls.add_method('GetMobility', 'ns3::Ptr< ns3::Object >', []) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxPowerStart() const [member function] - cls.add_method('GetTxPowerStart', - 'double', - [], + ## yans-wifi-phy.h: ns3::WifiMode ns3::YansWifiPhy::GetMode(uint32_t mode) const [member function] + cls.add_method('GetMode', + 'ns3::WifiMode', + [param('uint32_t', 'mode')], is_const=True, is_virtual=True) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxPowerEnd() const [member function] - cls.add_method('GetTxPowerEnd', - 'double', + ## yans-wifi-phy.h: uint32_t ns3::YansWifiPhy::GetNModes() const [member function] + cls.add_method('GetNModes', + 'uint32_t', [], is_const=True, is_virtual=True) ## yans-wifi-phy.h: uint32_t ns3::YansWifiPhy::GetNTxPower() const [member function] @@ -3290,25 +3243,45 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'uint32_t', [], is_const=True, is_virtual=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetReceiveOkCallback(ns3::Callback,double,ns3::WifiMode,ns3::WifiPreamble,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] - cls.add_method('SetReceiveOkCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetRxGain() const [member function] + cls.add_method('GetRxGain', + 'double', + [], + is_const=True) + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetRxNoiseFigure() const [member function] + cls.add_method('GetRxNoiseFigure', + 'double', + [], + is_const=True) + ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetStateDuration() [member function] + cls.add_method('GetStateDuration', + 'ns3::Time', + [], is_virtual=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetReceiveErrorCallback(ns3::Callback,double,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] - cls.add_method('SetReceiveErrorCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], - is_virtual=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::SendPacket(ns3::Ptr packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPowerLevel) [member function] - cls.add_method('SendPacket', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPowerLevel')], - is_virtual=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] - cls.add_method('RegisterListener', - 'void', - [param('ns3::WifiPhyListener *', 'listener')], + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxGain() const [member function] + cls.add_method('GetTxGain', + 'double', + [], + is_const=True) + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxPowerEnd() const [member function] + cls.add_method('GetTxPowerEnd', + 'double', + [], + is_const=True, is_virtual=True) + ## yans-wifi-phy.h: double ns3::YansWifiPhy::GetTxPowerStart() const [member function] + cls.add_method('GetTxPowerStart', + 'double', + [], + is_const=True, is_virtual=True) + ## yans-wifi-phy.h: static ns3::TypeId ns3::YansWifiPhy::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## yans-wifi-phy.h: bool ns3::YansWifiPhy::IsStateBusy() [member function] + cls.add_method('IsStateBusy', + 'bool', + [], is_virtual=True) ## yans-wifi-phy.h: bool ns3::YansWifiPhy::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', @@ -3320,11 +3293,6 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'bool', [], is_virtual=True) - ## yans-wifi-phy.h: bool ns3::YansWifiPhy::IsStateBusy() [member function] - cls.add_method('IsStateBusy', - 'bool', - [], - is_virtual=True) ## yans-wifi-phy.h: bool ns3::YansWifiPhy::IsStateSync() [member function] cls.add_method('IsStateSync', 'bool', @@ -3335,51 +3303,83 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'bool', [], is_virtual=True) - ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetStateDuration() [member function] - cls.add_method('GetStateDuration', - 'ns3::Time', - [], - is_virtual=True) - ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetDelayUntilIdle() [member function] - cls.add_method('GetDelayUntilIdle', - 'ns3::Time', - [], - is_virtual=True) - ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::GetLastRxStartTime() const [member function] - cls.add_method('GetLastRxStartTime', - 'ns3::Time', - [], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: ns3::Time ns3::YansWifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: uint32_t ns3::YansWifiPhy::GetNModes() const [member function] - cls.add_method('GetNModes', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: ns3::WifiMode ns3::YansWifiPhy::GetMode(uint32_t mode) const [member function] - cls.add_method('GetMode', - 'ns3::WifiMode', - [param('uint32_t', 'mode')], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: double ns3::YansWifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] - cls.add_method('CalculateSnr', - 'double', - [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: ns3::Ptr ns3::YansWifiPhy::GetChannel() const [member function] - cls.add_method('GetChannel', - 'ns3::Ptr< ns3::WifiChannel >', - [], - is_const=True, is_virtual=True) - ## yans-wifi-phy.h: void ns3::YansWifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] - cls.add_method('ConfigureStandard', + ## yans-wifi-phy.h: void ns3::YansWifiPhy::RegisterListener(ns3::WifiPhyListener * listener) [member function] + cls.add_method('RegisterListener', 'void', - [param('ns3::WifiPhyStandard', 'standard')], + [param('ns3::WifiPhyListener *', 'listener')], is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SendPacket(ns3::Ptr packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, uint8_t txPowerLevel) [member function] + cls.add_method('SendPacket', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'txPowerLevel')], + is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetCcaMode1Threshold(double threshold) [member function] + cls.add_method('SetCcaMode1Threshold', + 'void', + [param('double', 'threshold')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetChannel(ns3::Ptr channel) [member function] + cls.add_method('SetChannel', + 'void', + [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetChannelNumber(uint16_t id) [member function] + cls.add_method('SetChannelNumber', + 'void', + [param('uint16_t', 'id')], + is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetDevice(ns3::Ptr device) [member function] + cls.add_method('SetDevice', + 'void', + [param('ns3::Ptr< ns3::Object >', 'device')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetEdThreshold(double threshold) [member function] + cls.add_method('SetEdThreshold', + 'void', + [param('double', 'threshold')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetErrorRateModel(ns3::Ptr rate) [member function] + cls.add_method('SetErrorRateModel', + 'void', + [param('ns3::Ptr< ns3::ErrorRateModel >', 'rate')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetMobility(ns3::Ptr mobility) [member function] + cls.add_method('SetMobility', + 'void', + [param('ns3::Ptr< ns3::Object >', 'mobility')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetNTxPower(uint32_t n) [member function] + cls.add_method('SetNTxPower', + 'void', + [param('uint32_t', 'n')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetReceiveErrorCallback(ns3::Callback,double,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] + cls.add_method('SetReceiveErrorCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetReceiveOkCallback(ns3::Callback,double,ns3::WifiMode,ns3::WifiPreamble,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> callback) [member function] + cls.add_method('SetReceiveOkCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], + is_virtual=True) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetRxGain(double gain) [member function] + cls.add_method('SetRxGain', + 'void', + [param('double', 'gain')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetRxNoiseFigure(double noiseFigureDb) [member function] + cls.add_method('SetRxNoiseFigure', + 'void', + [param('double', 'noiseFigureDb')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxGain(double gain) [member function] + cls.add_method('SetTxGain', + 'void', + [param('double', 'gain')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxPowerEnd(double end) [member function] + cls.add_method('SetTxPowerEnd', + 'void', + [param('double', 'end')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::SetTxPowerStart(double start) [member function] + cls.add_method('SetTxPowerStart', + 'void', + [param('double', 'start')]) + ## yans-wifi-phy.h: void ns3::YansWifiPhy::StartReceivePacket(ns3::Ptr packet, double rxPowerDbm, ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] + cls.add_method('StartReceivePacket', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxPowerDbm'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')]) ## yans-wifi-phy.h: void ns3::YansWifiPhy::DoDispose() [member function] cls.add_method('DoDispose', 'void', From 9248053941e8d5ea59d5e366ba1a38c3865b5857 Mon Sep 17 00:00:00 2001 From: Antti Makela Date: Mon, 31 Aug 2009 23:05:26 -0700 Subject: [PATCH 20/43] Allow injection of routes to Ipv4GlobalRouting --- CHANGES.html | 6 + examples/global-injection-slash32.cc | 158 ++++++++++++++ examples/wscript | 4 + .../global-route-manager-impl.cc | 202 +++++++++++++++++- .../global-route-manager-impl.h | 12 ++ .../global-routing/global-router-interface.cc | 116 +++++++++- .../global-routing/global-router-interface.h | 61 ++++++ .../global-routing/ipv4-global-routing.cc | 85 +++++++- .../global-routing/ipv4-global-routing.h | 20 +- 9 files changed, 653 insertions(+), 11 deletions(-) create mode 100644 examples/global-injection-slash32.cc diff --git a/CHANGES.html b/CHANGES.html index aca0ba64e..347f3f01d 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -52,6 +52,12 @@ us a note on ns-developers mailing list.

      New API: