--- a/src/internet-stack/ipv4-l3-protocol.cc Sun Oct 12 18:04:10 2008 +0100
+++ b/src/internet-stack/ipv4-l3-protocol.cc Wed Oct 15 09:49:39 2008 +0200
@@ -96,9 +96,9 @@
m_protocols.push_back (protocol);
}
Ptr<Ipv4L4Protocol>
-Ipv4L3Protocol::GetProtocol(int protocolNumber)
+Ipv4L3Protocol::GetProtocol(int protocolNumber) const
{
- for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
+ for (L4List_t::const_iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
{
if ((*i)->GetProtocolNumber () == protocolNumber)
{
--- a/src/internet-stack/ipv4-l3-protocol.h Sun Oct 12 18:04:10 2008 +0100
+++ b/src/internet-stack/ipv4-l3-protocol.h Wed Oct 15 09:49:39 2008 +0200
@@ -80,7 +80,7 @@
* to forward packets up the stack to the right protocol.
* It is also called from NodeImpl::GetUdp for example.
*/
- Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
+ Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber) const;
/**
* \param protocol protocol to remove from this demux.
*