Browse files

Fix documentation of return values.

Note that pcap_loop() can return 0 if you're reading from a savefile and
you hit the EOF.

Fix a typo while we're at it.
  • Loading branch information...
1 parent dcb8e17 commit 6f12c5d72b10b9e4ee1d1478e0ef598a8e040e98 @guyharris guyharris committed Jul 4, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 pcap_loop.3pcap
@@ -84,7 +84,7 @@ processed when reading a ``savefile''.
was 0 was undefined; different platforms and devices behaved
differently, so code that must work with older versions of libpcap
-should use \-1, nor 0, as the value of
+should use \-1, not 0, as the value of
.ft R
@@ -119,8 +119,9 @@ them.
.B pcap_loop()
returns 0 if
.I cnt
-is exhausted, \-1 if an error occurs, or \-2 if the loop terminated due
-to a call to
+is exhausted or if, when reading from a ``savefile'', no more packets
+are available. It returns \-1 if an error occurs or \-2 if the loop
+terminated due to a call to
.B pcap_breakloop()
before any packets were processed.
It does

0 comments on commit 6f12c5d

Please sign in to comment.