summaryrefslogtreecommitdiff
path: root/pcap-snf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-20 10:33:07 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-20 10:33:07 -0800
commit8b40ffd344971073013aabe3c9c4a2db47ca7b43 (patch)
treecd1709a569f6cb9a87490a39951b6808719801d5 /pcap-snf.c
parentcf7c3f5b17a33cff1e9ffd9b17377f857d017c7f (diff)
downloadlibpcap-8b40ffd344971073013aabe3c9c4a2db47ca7b43.tar.gz
Count only packets that were handed to the callback.
That's how other devices work.
Diffstat (limited to 'pcap-snf.c')
-rw-r--r--pcap-snf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-snf.c b/pcap-snf.c
index 2086c51a..c030cd09 100644
--- a/pcap-snf.c
+++ b/pcap-snf.c
@@ -182,8 +182,8 @@ snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
hdr.caplen = caplen;
hdr.len = req.length;
callback(user, &hdr, req.pkt_addr);
+ n++;
}
- n++;
/* After one successful packet is received, we won't block
* again for that timeout. */