implement the Node::ProtocolHandler support.

This commit is contained in:
Mathieu Lacage committed 2007-07-31 09:09:31 +02:00
1 parent f699fa9bd8
commit c8e079f917
18 files changed
+174 -524

No files matched your search

+3 -3
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