Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(205)

Unified Diff: src/applications/model/packet-sink.cc

Issue 5417048: IPv6 support for TCP/UDP in NS-3
Patch Set: Uninitialized variable Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/applications/model/packet-sink.cc
===================================================================
--- a/src/applications/model/packet-sink.cc
+++ b/src/applications/model/packet-sink.cc
@@ -21,6 +21,7 @@
#include "ns3/address-utils.h"
#include "ns3/log.h"
#include "ns3/inet-socket-address.h"
+#include "ns3/inet6-socket-address.h"
#include "ns3/node.h"
#include "ns3/socket.h"
#include "ns3/udp-socket.h"
@@ -173,6 +174,17 @@
//compiler warning in optimized builds
(void) address;
}
+ else if (Inet6SocketAddress::IsMatchingType (from))
+ {
+ m_totalRx += packet->GetSize ();
+ Inet6SocketAddress address = Inet6SocketAddress::ConvertFrom (from);
+ NS_LOG_INFO ("Received " << packet->GetSize () << " bytes from " <<
+ address.GetIpv6 () << " [" << address << "]"
+ << " total Rx " << m_totalRx);
+ //cast address to void , to suppress 'address' set but not used
+ //compiler warning in optimized builds
+ (void) address;
+ }
m_rxTrace (packet, from);
}
}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b