diff options
Diffstat (limited to 'pcap_next_ex.3pcap')
-rw-r--r-- | pcap_next_ex.3pcap | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/pcap_next_ex.3pcap b/pcap_next_ex.3pcap index d69e7283d826..f975ccfd0516 100644 --- a/pcap_next_ex.3pcap +++ b/pcap_next_ex.3pcap @@ -17,7 +17,7 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.TH PCAP_NEXT_EX 3PCAP "7 April 2014" +.TH PCAP_NEXT_EX 3PCAP "20 January 2017" .SH NAME pcap_next_ex, pcap_next \- read the next packet from a pcap_t .SH SYNOPSIS @@ -112,12 +112,11 @@ have some other data link type, such as for Ethernet. .SH RETURN VALUE .B pcap_next_ex() -returns 1 if the packet was read without problems, 0 -if packets are being read from a live capture and the timeout expired, -\-1 if an error occurred while reading the packet, and \-2 if -packets are being read from a ``savefile'' and there are no more -packets to read from the savefile. -If \-1 is returned, +returns 1 if the packet was read without problems, 0 if packets are +being read from a live capture and the packet buffer timeout expired, +\-1 if an error occurred while reading the packet, and \-2 if packets +are being read from a ``savefile'' and there are no more packets to read +from the savefile. If \-1 is returned, .B pcap_geterr() or .B pcap_perror() @@ -128,14 +127,14 @@ as an argument to fetch or display the error text. .B pcap_next() returns a pointer to the packet data on success, and returns .B NULL -if an error occurred, or if no packets were read from a live -capture (if, for example, they were discarded because they didn't pass -the packet filter, or if, on platforms that support a read timeout that -starts before any packets arrive, the timeout expires before any packets -arrive, or if the file descriptor for the capture device is in +if an error occurred, or if no packets were read from a live capture +(if, for example, they were discarded because they didn't pass the +packet filter, or if, on platforms that support a packet buffer timeout +that starts before any packets arrive, the timeout expires before any +packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no -more packets are available in a ``savefile.'' Unfortunately, there is -no way to determine whether an error occurred or not. +more packets are available in a ``savefile.'' Unfortunately, there is no +way to determine whether an error occurred or not. .SH SEE ALSO pcap(3PCAP), pcap_geterr(3PCAP), pcap_dispatch(3PCAP), pcap_datalink(3PCAP) |