|
@@ -117,8 +117,10 @@ public class CountingMetric implements PacketSniffer {
|
|
System.out.println(unknownPackets+ "("+Math.round(unknownPackets*100.0/packets.size())+"%) of them were unknwon packets");
|
|
System.out.println(unknownPackets+ "("+Math.round(unknownPackets*100.0/packets.size())+"%) of them were unknwon packets");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- System.out.println("First packet was captured at "+minTime+" ms, and the last at "+maxTime+" ms.");
|
|
|
|
|
|
+ if(min<=max)
|
|
|
|
+ System.out.println("First packet was captured at "+minTime+" ms, and the last at "+maxTime+" ms.");
|
|
|
|
+ else
|
|
|
|
+ System.out.println("No packets were captured.");
|
|
//Print the number of packets per connection
|
|
//Print the number of packets per connection
|
|
for (Entry<SmartDevice, HashMap<SmartDevice, Integer>> e: connections.entrySet()) {
|
|
for (Entry<SmartDevice, HashMap<SmartDevice, Integer>> e: connections.entrySet()) {
|
|
String src = e.getKey() == null || e.getKey().getName()==null ? "null":e.getKey().getName();
|
|
String src = e.getKey() == null || e.getKey().getName()==null ? "null":e.getKey().getName();
|