handle.loop(COUNT, listener);
} catch (InterruptedException e) {
e.printStackTrace();
}
PcapStat ps = handle.getStats();
System.out.println("ps_recv: " + ps.getNumPacketsReceived());
System.out.println("ps_drop: " + ps.getNumPacketsDropped());
System.out.println("ps_ifdrop: " + ps.getNumPacketsDroppedByIf());
if (Platform.isWindows()) {
System.out.println("bs_capt: " + ps.getNumPacketsCaptured());
}
handle.close();
}