mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-06-16 21:10:57 +08:00
Provide recv stats when reading from file
This commit is contained in:
parent
f2f765dca5
commit
82831cae2d
@ -839,6 +839,12 @@ static int read_pkt(pcapd_runtime_t *rt, pcapd_iface_t *iface, time_t now) {
|
||||
|
||||
printf("[%s:%d] %s (%u B) [%cX]\n", iface->name, iface->ifid, buf, phdr.len, is_tx ? 'T' : 'R');
|
||||
}
|
||||
|
||||
if(iface->is_file) {
|
||||
// libpcap does not provide stats for savefiles
|
||||
// https://www.tcpdump.org/manpages/pcap_stats.3pcap.html
|
||||
iface->stats.ps_recv++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user