Remove Ipv4Interface::GetMtu ()

This commit is contained in:
Tom Henderson
2009-06-21 22:36:43 -07:00
parent 441cedb655
commit d7289c1901
4 changed files with 9 additions and 19 deletions

View File

@@ -79,6 +79,12 @@ fragmentation and reassembly.
<h2>Changes to existing API:</h2>
<ul>
<li><b>Ipv4Interface::GetMtu () deleted</b>
<p>The Ipv4Interface API is private to internet-stack module; this method
was just a pass-through to GetDevice ()->GetMtu ().
</p>
</li>
<li><b>CalcChecksum attribute changes</b>
<p>Four IPv4 CalcChecksum attributes (which enable the computation of
checksums that are disabled by default) have been collapsed into one global

View File

@@ -127,13 +127,6 @@ Ipv4Interface::GetMetric (void) const
return m_metric;
}
uint16_t
Ipv4Interface::GetMtu (void) const
{
NS_LOG_FUNCTION_NOARGS ();
return m_device->GetMtu ();
}
/**
* These are IP interface states and may be distinct from
* NetDevice states, such as found in real implementations

View File

@@ -80,15 +80,6 @@ public:
*/
uint16_t GetMetric (void) const;
/**
* This function a pass-through to NetDevice GetMtu, modulo
* the LLC/SNAP header i.e., ipv4MTU = NetDeviceMtu - LLCSNAPSIZE
* \returns the Maximum Transmission Unit associated to this interface.
*
* XXX deprecated? This is duplicate API to GetDevice ()->GetMtu ()
*/
uint16_t GetMtu (void) const;
/**
* These are IP interface states and may be distinct from
* NetDevice states, such as found in real implementations

View File

@@ -478,7 +478,7 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
Ptr<Ipv4Interface> outInterface = *ifaceIter;
Ptr<Packet> packetCopy = packet->Copy ();
NS_ASSERT (packetCopy->GetSize () <= outInterface->GetMtu ());
NS_ASSERT (packetCopy->GetSize () <= outInterface->GetDevice()->GetMtu ());
packetCopy->AddHeader (ipHeader);
m_txTrace (packetCopy, ifaceIndex);
outInterface->Send (packetCopy, destination);
@@ -608,7 +608,7 @@ Ipv4L3Protocol::SendRealOut (Ptr<Ipv4Route> route,
Ptr<Ipv4Interface> outInterface = GetInterface (interface);
NS_LOG_LOGIC ("Send via NetDevice ifIndex " << outDev->GetIfIndex () << " ipv4InterfaceIndex " << interface);
NS_ASSERT (packet->GetSize () <= outInterface->GetMtu ());
NS_ASSERT (packet->GetSize () <= outInterface->GetDevice ()->GetMtu ());
if (!route->GetGateway ().IsEqual (Ipv4Address ("0.0.0.0")))
{
if (outInterface->IsUp ())
@@ -810,7 +810,7 @@ Ipv4L3Protocol::GetMtu (uint32_t i) const
{
NS_LOG_FUNCTION (this << i);
Ptr<Ipv4Interface> interface = GetInterface (i);
return interface->GetMtu ();
return interface->GetDevice ()->GetMtu ();
}
bool