diff --git a/src/mesh/model/mesh-point-device.cc b/src/mesh/model/mesh-point-device.cc index 74fafbdde..ed36968b8 100644 --- a/src/mesh/model/mesh-point-device.cc +++ b/src/mesh/model/mesh-point-device.cc @@ -110,6 +110,7 @@ MeshPointDevice::ReceiveFromDevice (Ptr incomingPort, PtrRemoveRoutingStuff (incomingPort->GetIfIndex (), src48, dst48, packet_copy, realProtocol)) { m_rxCallback (this, packet_copy, realProtocol, src); + NS_LOG_DEBUG ("Forwarding from " << src48 << " to " << dst48 << " at " << m_address); Forward (incomingPort, packet, protocol, src48, dst48); m_rxStats.broadcastData++; @@ -136,9 +137,15 @@ void MeshPointDevice::Forward (Ptr inport, Ptr packet, uint16_t protocol, const Mac48Address src, const Mac48Address dst) { + NS_LOG_FUNCTION (this << inport << packet << protocol << src << dst); // pass through routing protocol - m_routingProtocol->RequestRoute (inport->GetIfIndex (), src, dst, packet, protocol, MakeCallback ( + NS_LOG_DEBUG ("Forwarding from " << src << " to " << dst << " at " << m_address); + bool result = m_routingProtocol->RequestRoute (inport->GetIfIndex (), src, dst, packet, protocol, MakeCallback ( &MeshPointDevice::DoSend, this)); + if (result == false) + { + NS_LOG_DEBUG ("Request to forward packet " << packet << " to destination " << dst << " failed; dropping packet"); + } } void