|
@@ -112,7 +112,6 @@ void pcap_processor::collect_statistics() {
|
|
|
if (file_exists(filePath)) {
|
|
|
std::cout << "Loading pcap..." << std::endl;
|
|
|
FileSniffer sniffer(filePath);
|
|
|
-
|
|
|
FileSniffer snifferOverview(filePath);
|
|
|
|
|
|
SnifferIterator i = sniffer.begin();
|
|
@@ -124,13 +123,12 @@ void pcap_processor::collect_statistics() {
|
|
|
int timeIntervalCounter = 1;
|
|
|
int timeIntervalsNum = 100;
|
|
|
std::chrono::microseconds intervalStartTimestamp = stats.getTimestampFirstPacket();
|
|
|
- std::chrono::microseconds firstTimestamp = stats.getTimestampFirstPacket();
|
|
|
-
|
|
|
+ std::chrono::microseconds firstTimestamp = stats.getTimestampFirstPacket();
|
|
|
+
|
|
|
+
|
|
|
SnifferIterator lastpkt;
|
|
|
for (SnifferIterator j = snifferOverview.begin(); j != snifferOverview.end(); snifferIteratorIncrement(j)) {lastpkt = j;}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
std::chrono::microseconds lastTimestamp = lastpkt->timestamp();
|
|
|
std::chrono::microseconds captureDuration = lastTimestamp - firstTimestamp;
|
|
|
if(captureDuration.count()<=0){
|