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

Unified Diff: src/dsr/model/dsr-rsendbuff.cc

Issue 4823051: Dynamic Source Routing (DSR)
Patch Set: Added .rst file for feature discriptions, updated a little in route request process Created 12 years, 4 months 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
« no previous file with comments | « src/dsr/model/dsr-rsendbuff.h ('k') | src/dsr/test/dsr-test-suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/dsr/model/dsr-rsendbuff.cc
===================================================================
--- a/src/dsr/model/dsr-rsendbuff.cc
+++ b/src/dsr/model/dsr-rsendbuff.cc
@@ -40,6 +40,7 @@
namespace ns3 {
namespace dsr {
+
uint32_t
SendBuffer::GetSize ()
{
@@ -54,9 +55,11 @@
for (std::vector<SendBuffEntry>::const_iterator i = m_sendBuffer.begin (); i
!= m_sendBuffer.end (); ++i)
{
+ NS_LOG_INFO ("packet id " << i->GetPacket ()->GetUid () << " " << entry.GetPacket ()->GetUid ()
+ << " dst " << i->GetDestination () << " " << entry.GetDestination ());
+
if ((i->GetPacket ()->GetUid () == entry.GetPacket ()->GetUid ())
- && (i->GetDestination ()
- == entry.GetDestination ()))
+ && (i->GetDestination () == entry.GetDestination ()))
{
return false;
}
@@ -122,7 +125,6 @@
{
/*
* Make sure if the send buffer contains entry with certain dst
- * Used for test case
*/
for (std::vector<SendBuffEntry>::const_iterator i = m_sendBuffer.begin (); i
!= m_sendBuffer.end (); ++i)
@@ -136,22 +138,6 @@
return false;
}
-uint32_t
-SendBuffer::FindPacketsWithDst (Ipv4Address dst)
-{
- uint32_t count = 0;
- for (std::vector<SendBuffEntry>::const_iterator i = m_sendBuffer.begin (); i
- != m_sendBuffer.end (); ++i)
- {
- if (i->GetDestination () == dst)
- {
- NS_LOG_DEBUG ("Found the packet");
- count++;
- }
- }
- return count;
-}
-
struct IsExpired
{
bool
@@ -168,6 +154,7 @@
/*
* Purge the buffer to eliminate expired entries
*/
+ NS_LOG_DEBUG ("The send buffer size " << m_sendBuffer.size ());
IsExpired pred;
for (std::vector<SendBuffEntry>::iterator i = m_sendBuffer.begin (); i
!= m_sendBuffer.end (); ++i)
« no previous file with comments | « src/dsr/model/dsr-rsendbuff.h ('k') | src/dsr/test/dsr-test-suite.cc » ('j') | no next file with comments »

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