Commit 5517884a authored by Robert Ricci's avatar Robert Ricci

Added a log message to catch gaps in packet sequence number - ie. we

didn't get one or more packets from libpcap. I have one trace on
PlanetLab that does this a lot, so it could be a sign of a problem -
like not checking libpcap freqeuently enough. A pcapper process
running at the same time did get the packets...
parent dc8215dd
......@@ -94,12 +94,26 @@ void PacketSensor::localSend(PacketInfo * packet)
"PacketSensor::localSend() new record: ss=%u,sl=%u,se=%u,tl=%u",
record.seqStart, sequenceLength, record.seqEnd,
record.totalLength);
globalSequence.seqEnd = record.seqEnd;
if (unacked.empty())
{
globalSequence.seqStart = record.seqStart;
globalSequence.seqEnd = record.seqEnd;
}
else
{
/*
* Sanity check - the new packet we're adding should start where the
* last one left off
*/
if (record.seqStart != (globalSequence.seqEnd + 1))
{
logWrite(EXCEPTION,"PacketSensor::localSend() may have missed a "
"packet - last seq seen: %d, new seq: %d (lost %d)",
globalSequence.seqEnd,record.seqStart,
record.seqStart - globalSequence.seqEnd);
}
globalSequence.seqEnd = record.seqEnd;
}
logWrite(SENSOR,
"PacketSensor::localSend(): global start = %u, global end = %u",
globalSequence.seqStart, globalSequence.seqEnd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment