remove deprecated code in internet module
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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> 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<Ipv6StaticRouting> 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> ipv6 = m_interfaces[i].first;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#ifndef GLOBAL_ROUTE_MANAGER_H
|
||||
#define GLOBAL_ROUTE_MANAGER_H
|
||||
|
||||
#include "ns3/deprecated.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<uint32_t, uint32_t>::const_iterator iter = m_ttls.find (oif);
|
||||
if (iter == m_ttls.end ())
|
||||
return((uint32_t)MAX_TTL);
|
||||
return(iter->second);
|
||||
}
|
||||
|
||||
std::map<uint32_t, uint32_t>
|
||||
Ipv4MulticastRoute::GetOutputTtlMap () const
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<uint32_t, uint32_t>::const_iterator iter = m_ttls.find (oif);
|
||||
if (iter == m_ttls.end ())
|
||||
return((uint32_t)MAX_TTL);
|
||||
return(iter->second);
|
||||
}
|
||||
|
||||
std::map<uint32_t, uint32_t> Ipv6MulticastRoute::GetOutputTtlMap () const
|
||||
{
|
||||
return(m_ttls);
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user