1.1 --- a/src/internet-stack/ipv4-l3-protocol.cc Mon May 04 13:49:48 2009 +0100
1.2 +++ b/src/internet-stack/ipv4-l3-protocol.cc Mon May 04 15:49:26 2009 +0100
1.3 @@ -18,6 +18,8 @@
1.4 // Author: George F. Riley<riley@ece.gatech.edu>
1.5 //
1.6
1.7 +//#define NS_LOG_APPEND_CONTEXT if (GetObject<Node> ()) { std::clog << "[node " << GetObject<Node> ()->GetId () << "] "; }
1.8 +
1.9 #include "ns3/packet.h"
1.10 #include "ns3/log.h"
1.11 #include "ns3/callback.h"
1.12 @@ -242,7 +244,7 @@
1.13 rprotoIter != m_routingProtocols.end ();
1.14 rprotoIter++)
1.15 {
1.16 - NS_LOG_LOGIC ("Requesting route");
1.17 + NS_LOG_LOGIC ("Requesting route for IP header: " << ipHeader);
1.18 if ((*rprotoIter).second->RequestRoute (ifIndex, ipHeader, packet,
1.19 routeReply))
1.20 return;
1.21 @@ -276,6 +278,7 @@
1.22 //
1.23 // No route found
1.24 //
1.25 + NS_LOG_LOGIC ("No route found for IP header: " << ipHeader);
1.26 routeReply (false, Ipv4Route (), packet, ipHeader);
1.27 }
1.28
1.29 @@ -623,8 +626,13 @@
1.30 {
1.31 if (found)
1.32 {
1.33 + NS_LOG_LOGIC ("Route found for IP header: " << ipHeader << ": " << route);
1.34 m_sendOutgoingTrace (ipHeader, packet, route.GetInterface ());
1.35 }
1.36 + else
1.37 + {
1.38 + NS_LOG_LOGIC ("No route found for IP header: " << ipHeader);
1.39 + }
1.40 SendRealOut (found, route, packet, ipHeader);
1.41 }
1.42
1.43 @@ -636,8 +644,13 @@
1.44 {
1.45 if (found)
1.46 {
1.47 + NS_LOG_LOGIC ("Route found for IP header: " << ipHeader << ": " << route);
1.48 m_forwardTrace (ipHeader, packet, route.GetInterface ());
1.49 }
1.50 + else
1.51 + {
1.52 + NS_LOG_LOGIC ("No route found for IP header: " << ipHeader);
1.53 + }
1.54 SendRealOut (found, route, packet, ipHeader);
1.55 }
1.56