aboutsummaryrefslogtreecommitdiff
path: root/pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pcap.c b/pcap.c
index c27492b3..6a8ed23e 100644
--- a/pcap.c
+++ b/pcap.c
@@ -622,7 +622,9 @@ pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
* Return codes for pcap_offline_read() are:
* - 0: EOF
* - -1: error
- * - >1: OK
+ * - >0: OK - result is number of packets read, so
+ * it will be 1 in this case, as we've passed
+ * a maximum packet count of 1
* The first one ('0') conflicts with the return code of
* 0 from pcap_read() meaning "no packets arrived before
* the timeout expired", so we map it to -2 so you can
@@ -641,7 +643,9 @@ pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
* - 0: timeout
* - -1: error
* - -2: loop was broken out of with pcap_breakloop()
- * - >1: OK
+ * - >0: OK, result is number of packets captured, so
+ * it will be 1 in this case, as we've passed
+ * a maximum packet count of 1
* The first one ('0') conflicts with the return code of 0 from
* pcap_offline_read() meaning "end of file".
*/