Add time to UdpEchoClient and UdpEchoServer NS_LOG_INFO output.
--- a/src/applications/model/udp-echo-client.cc Mon Apr 02 06:57:07 2012 -0700
+++ b/src/applications/model/udp-echo-client.cc Tue Apr 03 18:59:41 2012 +0200
@@ -308,12 +308,12 @@
if (Ipv4Address::IsMatchingType (m_peerAddress))
{
- NS_LOG_INFO ("Client sent " << m_size << " bytes to " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s client sent " << m_size << " bytes to " <<
Ipv4Address::ConvertFrom (m_peerAddress) << " port " << m_peerPort);
}
else if (Ipv6Address::IsMatchingType (m_peerAddress))
{
- NS_LOG_INFO ("Client sent " << m_size << " bytes to " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s client sent " << m_size << " bytes to " <<
Ipv6Address::ConvertFrom (m_peerAddress) << " port " << m_peerPort);
}
@@ -333,13 +333,13 @@
{
if (InetSocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Client received " << packet->GetSize () << " bytes from " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s client received " << packet->GetSize () << " bytes from " <<
InetSocketAddress::ConvertFrom (from).GetIpv4 () << " port " <<
InetSocketAddress::ConvertFrom (from).GetPort ());
}
else if (Inet6SocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Client received " << packet->GetSize () << " bytes from " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s client received " << packet->GetSize () << " bytes from " <<
Inet6SocketAddress::ConvertFrom (from).GetIpv6 () << " port " <<
Inet6SocketAddress::ConvertFrom (from).GetPort ());
}
--- a/src/applications/model/udp-echo-server.cc Mon Apr 02 06:57:07 2012 -0700
+++ b/src/applications/model/udp-echo-server.cc Tue Apr 03 18:59:41 2012 +0200
@@ -147,13 +147,13 @@
{
if (InetSocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Server received " << packet->GetSize () << " bytes from " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server received " << packet->GetSize () << " bytes from " <<
InetSocketAddress::ConvertFrom (from).GetIpv4 () << " port " <<
InetSocketAddress::ConvertFrom (from).GetPort ());
}
else if (Inet6SocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Server received " << packet->GetSize () << " bytes from " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server received " << packet->GetSize () << " bytes from " <<
Inet6SocketAddress::ConvertFrom (from).GetIpv6 () << " port " <<
InetSocketAddress::ConvertFrom (from).GetPort ());
}
@@ -166,13 +166,13 @@
if (InetSocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Server sent " << packet->GetSize () << " bytes to " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server sent " << packet->GetSize () << " bytes to " <<
InetSocketAddress::ConvertFrom (from).GetIpv4 () << " port " <<
InetSocketAddress::ConvertFrom (from).GetPort ());
}
else if (Inet6SocketAddress::IsMatchingType (from))
{
- NS_LOG_INFO ("Server sent " << packet->GetSize () << " bytes to " <<
+ NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << "s server sent " << packet->GetSize () << " bytes to " <<
Inet6SocketAddress::ConvertFrom (from).GetIpv6 () << " port " <<
InetSocketAddress::ConvertFrom (from).GetPort ());
}