implement the Node::ProtocolHandler support.

This commit is contained in:
Mathieu Lacage
2007-07-31 09:09:31 +02:00
parent 7af432c313
commit b4237e51dc
18 changed files with 174 additions and 524 deletions

View File

@@ -23,7 +23,7 @@
#include "ns3/net-device.h"
#include "ns3/node.h"
#include "ipv4-loopback-interface.h"
#include "ipv4-private.h"
#include "ipv4-l3-protocol.h"
namespace ns3 {
@@ -43,8 +43,8 @@ Ipv4LoopbackInterface::DoCreateTraceResolver (TraceContext const &context)
void
Ipv4LoopbackInterface::SendTo (Packet packet, Ipv4Address dest)
{
Ptr<Ipv4Private> ipv4 = m_node->QueryInterface<Ipv4Private> (Ipv4Private::iid);
ipv4->Receive (packet, GetDevice ());
Ptr<Ipv4L3Protocol> ipv4 = m_node->QueryInterface<Ipv4L3Protocol> (Ipv4L3Protocol::iid);
ipv4->Receive (packet, Ipv4L3Protocol::PROT_NUMBER, GetDevice ());
}
}//namespace ns3