From 9caeebf0e13752e51a128bfebdc673efa1023a09 Mon Sep 17 00:00:00 2001 From: Christopher Kosecki Date: Tue, 29 Apr 2014 20:35:34 +0200 Subject: [PATCH] Bug 1876 - enable OLSR HNA table access --- RELEASE_NOTES | 1 + src/olsr/bindings/modulegen__gcc_ILP32.py | 5 +++++ src/olsr/bindings/modulegen__gcc_LP64.py | 5 +++++ src/olsr/model/olsr-routing-protocol.cc | 6 ++++++ src/olsr/model/olsr-routing-protocol.h | 6 ++++++ 5 files changed, 23 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 963caf7f8..919e4b920 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -71,6 +71,7 @@ Bugs fixed - Bug 1870 - Remove unnecessary AsInt functions - Bug 1873 - Energy source checked to be aggregated to the node - Bug 1874 - Ipv4L3Protocol::ProcessFragment: addressCombination and idProto identifiers not properly computed +- Bug 1876 - enable OLSR HNA table access - Bug 1882 - int64x64 tests trigger valgrind bug - Bug 1883 - IPv6 don't consider the prefix and network when choosing output address - Bug 1887 - Point-to-point traces should contain PPP headers diff --git a/src/olsr/bindings/modulegen__gcc_ILP32.py b/src/olsr/bindings/modulegen__gcc_ILP32.py index b2c7639c8..e62c061c0 100644 --- a/src/olsr/bindings/modulegen__gcc_ILP32.py +++ b/src/olsr/bindings/modulegen__gcc_ILP32.py @@ -7036,6 +7036,11 @@ def register_Ns3OlsrRoutingProtocol_methods(root_module, cls): 'std::set< unsigned int >', [], is_const=True) + ## olsr-routing-protocol.h (module 'olsr'): ns3::Ptr ns3::olsr::RoutingProtocol::GetRoutingTableAssociation() const [member function] + cls.add_method('GetRoutingTableAssociation', + 'ns3::Ptr< ns3::Ipv4StaticRouting const >', + [], + is_const=True) ## olsr-routing-protocol.h (module 'olsr'): std::vector > ns3::olsr::RoutingProtocol::GetRoutingTableEntries() const [member function] cls.add_method('GetRoutingTableEntries', 'std::vector< ns3::olsr::RoutingTableEntry >', diff --git a/src/olsr/bindings/modulegen__gcc_LP64.py b/src/olsr/bindings/modulegen__gcc_LP64.py index b2c7639c8..e62c061c0 100644 --- a/src/olsr/bindings/modulegen__gcc_LP64.py +++ b/src/olsr/bindings/modulegen__gcc_LP64.py @@ -7036,6 +7036,11 @@ def register_Ns3OlsrRoutingProtocol_methods(root_module, cls): 'std::set< unsigned int >', [], is_const=True) + ## olsr-routing-protocol.h (module 'olsr'): ns3::Ptr ns3::olsr::RoutingProtocol::GetRoutingTableAssociation() const [member function] + cls.add_method('GetRoutingTableAssociation', + 'ns3::Ptr< ns3::Ipv4StaticRouting const >', + [], + is_const=True) ## olsr-routing-protocol.h (module 'olsr'): std::vector > ns3::olsr::RoutingProtocol::GetRoutingTableEntries() const [member function] cls.add_method('GetRoutingTableEntries', 'std::vector< ns3::olsr::RoutingTableEntry >', diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index 99835d5fd..1f128c06c 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -3356,6 +3356,12 @@ RoutingProtocol::Dump (void) #endif //NS3_LOG_ENABLE } +Ptr +RoutingProtocol::GetRoutingTableAssociation () const +{ + return m_hnaRoutingTable; +} + } // namespace olsr } // namespace ns3 diff --git a/src/olsr/model/olsr-routing-protocol.h b/src/olsr/model/olsr-routing-protocol.h index 97ba62bae..d057d40c8 100644 --- a/src/olsr/model/olsr-routing-protocol.h +++ b/src/olsr/model/olsr-routing-protocol.h @@ -131,6 +131,12 @@ public: /// Inject Associations from an Ipv4StaticRouting instance void SetRoutingTableAssociation (Ptr routingTable); + /** + * \brief Returns the internal HNA table + * \returns the internal HNA table + */ + Ptr GetRoutingTableAssociation () const; + protected: virtual void DoInitialize (void); private: