Added dropped TTL field to stats

This commit is contained in:
Kirill Andreev
2009-06-01 14:06:11 +04:00
parent 3bfe1464a1
commit 24f016c79c
2 changed files with 6 additions and 1 deletions

View File

@@ -220,7 +220,10 @@ HwmpProtocol::RequestRoute (
return false;
}
if (tag.GetTtl () == 0)
{
m_stats.droppedTtl ++;
return false;
}
tag.DecrementTtl ();
}
if (destination == Mac48Address::GetBroadcast ())
@@ -945,6 +948,7 @@ void HwmpProtocol::Statistics::Print (std::ostream & os) const
"txUnicast=\"" << txUnicast << "\" "
"txBroadcast=\"" << txBroadcast << "\" "
"txBytes=\"" << txBytes / 1024 << "K\" "
"droppedTtl=\"" << droppedTtl << "\" "
"totalQueued=\"" << totalQueued << "\" "
"totalDropped=\"" << totalDropped << "\"/>\n";
}

View File

@@ -145,11 +145,12 @@ private:
uint16_t txUnicast;
uint16_t txBroadcast;
uint32_t txBytes;
uint16_t droppedTtl;
uint16_t totalQueued;
uint16_t totalDropped;
void Print (std::ostream & os) const;
Statistics () : txUnicast (0), txBroadcast (0), txBytes (0), totalQueued (0), totalDropped (0) {}
Statistics () : txUnicast (0), txBroadcast (0), txBytes (0), droppedTtl (0), totalQueued (0), totalDropped (0) {}
};
Statistics m_stats;
///\}