From cd7311b76c8d9ade13869bcbc372b14da213767a Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Tue, 14 Oct 2014 08:15:46 -0700 Subject: [PATCH] remove deprecated code in internet module --- src/internet/helper/ipv6-address-helper.cc | 6 ---- src/internet/helper/ipv6-address-helper.h | 14 --------- .../helper/ipv6-interface-container.cc | 30 ------------------- .../helper/ipv6-interface-container.h | 8 ----- src/internet/model/global-route-manager.h | 2 -- src/internet/model/ipv4-route.cc | 11 ------- src/internet/model/ipv4-route.h | 7 ----- src/internet/model/ipv6-route.cc | 9 ------ src/internet/model/ipv6-route.h | 9 ------ 9 files changed, 96 deletions(-) diff --git a/src/internet/helper/ipv6-address-helper.cc b/src/internet/helper/ipv6-address-helper.cc index 3bb104da0..c2aa7793c 100644 --- a/src/internet/helper/ipv6-address-helper.cc +++ b/src/internet/helper/ipv6-address-helper.cc @@ -104,12 +104,6 @@ Ipv6Address Ipv6AddressHelper::NewAddress (void) return Ipv6AddressGenerator::NextAddress (Ipv6Prefix (64)); } -void Ipv6AddressHelper::NewNetwork (Ipv6Address network, Ipv6Prefix prefix) -{ - NS_LOG_FUNCTION (this << network << prefix); - SetBase (network, Ipv6Prefix (64)); -} - void Ipv6AddressHelper::NewNetwork (void) { NS_LOG_FUNCTION (this); diff --git a/src/internet/helper/ipv6-address-helper.h b/src/internet/helper/ipv6-address-helper.h index aca38b371..6b6481809 100644 --- a/src/internet/helper/ipv6-address-helper.h +++ b/src/internet/helper/ipv6-address-helper.h @@ -27,7 +27,6 @@ #include "ns3/ipv6-address.h" #include "ns3/net-device-container.h" #include "ipv6-interface-container.h" -#include "ns3/deprecated.h" namespace ns3 { @@ -106,19 +105,6 @@ public: void SetBase (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base = Ipv6Address ("::1")); - /** - * \brief Allocate a new network. - * - * This method will reset the network for future - * network IDs, and resets the interface ID to the previously used - * base. - * - * \param network The IPv6 network - * \param prefix The prefix - * \deprecated - */ - void NewNetwork (Ipv6Address network, Ipv6Prefix prefix) NS_DEPRECATED; - /** * \brief Allocate a new network. * diff --git a/src/internet/helper/ipv6-interface-container.cc b/src/internet/helper/ipv6-interface-container.cc index a29c4aea7..349d9b4a7 100644 --- a/src/internet/helper/ipv6-interface-container.cc +++ b/src/internet/helper/ipv6-interface-container.cc @@ -80,36 +80,6 @@ void Ipv6InterfaceContainer::Add (Ipv6InterfaceContainer& c) } } -void Ipv6InterfaceContainer::SetRouter (uint32_t i, bool router) -{ - // This function is deprecated and should be substituted by: - // SetForwarding (RouterInterfaceIndex, true); - // SetDefaultRouteInAllNodes (RouterInterfaceIndex); - - 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, 0).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::SetForwarding (uint32_t i, bool router) { Ptr ipv6 = m_interfaces[i].first; diff --git a/src/internet/helper/ipv6-interface-container.h b/src/internet/helper/ipv6-interface-container.h index 18b47d24d..7befd9dd2 100644 --- a/src/internet/helper/ipv6-interface-container.h +++ b/src/internet/helper/ipv6-interface-container.h @@ -29,7 +29,6 @@ #include "ns3/ipv6.h" #include "ns3/ipv6-address.h" -#include "ns3/deprecated.h" namespace ns3 { @@ -166,13 +165,6 @@ public: */ 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) NS_DEPRECATED; - /** * \brief Set the state of the stack (act as a router or as an host) for the specified index. * This automatically sets all the node's interfaces to the same forwarding state. diff --git a/src/internet/model/global-route-manager.h b/src/internet/model/global-route-manager.h index a6538228f..27c2aec88 100644 --- a/src/internet/model/global-route-manager.h +++ b/src/internet/model/global-route-manager.h @@ -22,8 +22,6 @@ #ifndef GLOBAL_ROUTE_MANAGER_H #define GLOBAL_ROUTE_MANAGER_H -#include "ns3/deprecated.h" - namespace ns3 { /** diff --git a/src/internet/model/ipv4-route.cc b/src/internet/model/ipv4-route.cc index 97efaf460..ab03377c3 100644 --- a/src/internet/model/ipv4-route.cc +++ b/src/internet/model/ipv4-route.cc @@ -161,17 +161,6 @@ Ipv4MulticastRoute::SetOutputTtl (uint32_t oif, uint32_t ttl) } } -uint32_t -Ipv4MulticastRoute::GetOutputTtl (uint32_t oif) -{ - NS_LOG_FUNCTION (this << oif); - // We keep this interface around for compatibility (for now) - std::map::const_iterator iter = m_ttls.find (oif); - if (iter == m_ttls.end ()) - return((uint32_t)MAX_TTL); - return(iter->second); -} - std::map Ipv4MulticastRoute::GetOutputTtlMap () const { diff --git a/src/internet/model/ipv4-route.h b/src/internet/model/ipv4-route.h index feaabdd1c..7c26028e9 100644 --- a/src/internet/model/ipv4-route.h +++ b/src/internet/model/ipv4-route.h @@ -25,7 +25,6 @@ #include "ns3/simple-ref-count.h" #include "ns3/ipv4-address.h" -#include "ns3/deprecated.h" namespace ns3 { @@ -149,12 +148,6 @@ public: * \param ttl time-to-live for this route */ void SetOutputTtl (uint32_t oif, uint32_t ttl); - /** - * \param oif outgoing interface - * \return TTL for this route - * \deprecated - */ - uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED; /** * \return map of output interface Ids and TTLs for this route diff --git a/src/internet/model/ipv6-route.cc b/src/internet/model/ipv6-route.cc index 0ed19ebfa..64e3209a6 100644 --- a/src/internet/model/ipv6-route.cc +++ b/src/internet/model/ipv6-route.cc @@ -137,15 +137,6 @@ void Ipv6MulticastRoute::SetOutputTtl (uint32_t oif, uint32_t ttl) } } -uint32_t Ipv6MulticastRoute::GetOutputTtl (uint32_t oif) -{ - // We keep this interface around for compatibility (for now) - std::map::const_iterator iter = m_ttls.find (oif); - if (iter == m_ttls.end ()) - return((uint32_t)MAX_TTL); - return(iter->second); -} - std::map Ipv6MulticastRoute::GetOutputTtlMap () const { return(m_ttls); diff --git a/src/internet/model/ipv6-route.h b/src/internet/model/ipv6-route.h index c16d8ffc7..e8587fb20 100644 --- a/src/internet/model/ipv6-route.h +++ b/src/internet/model/ipv6-route.h @@ -28,7 +28,6 @@ #include "ns3/simple-ref-count.h" #include "ns3/ipv6-address.h" -#include "ns3/deprecated.h" namespace ns3 { @@ -203,14 +202,6 @@ public: */ void SetOutputTtl (uint32_t oif, uint32_t ttl); - /** - * \brief Get output TTL for this route. - * \param oif outgoing interface - * \return TTL for this route - * \deprecated - */ - uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED; - /** * \return map of output interface Ids and TTLs for this route */