]> The Tcpdump Group git mirrors - libpcap/commitdiff
Give N. Leiten credit for the poll() exceptional condition checks in
authorGuy Harris <[email protected]>
Tue, 13 Oct 2009 00:21:02 +0000 (17:21 -0700)
committerGuy Harris <[email protected]>
Tue, 13 Oct 2009 00:21:02 +0000 (17:21 -0700)
pcap-linux.c memory-mapped mode.

Always doing a poll() if there are no packets available allows us to
catch disappearing interfaces in memory-mapped mode, so remove the
caveats about Linux.

CREDITS
pcap_get_selectable_fd.3pcap

diff --git a/CREDITS b/CREDITS
index 1ed5b664a90a1853459ab4091036f7e82e9af757..326afa585a193379b76a2b82e72031e430a2fa14 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -84,6 +84,7 @@ Additional people who have contributed patches:
        Mike Kershaw                    <dragorn at kismetwireless dot net>
        Mike Wiacek                     <mike at iroot dot net>
        Monroe Williams                 <monroe at pobox dot com>
+       N. Leiten                       <nleiten at sourceforge dot net>
        Nicolas Dade                    <ndade at nsd dot dyndns dot org>
        Octavian Cerna                  <tavy at ylabs dot com>
        Olaf Kirch                      <okir at caldera dot de>
index 123671a04c818aa52193a6ece22571aadf41c8fd..61be3d32e8ab975052ae019aa59a559a710e5395 100644 (file)
@@ -110,35 +110,10 @@ but not kqueues, work on that descriptor in Mac OS X releases prior to
 .B poll()
 and kqueues work on that descriptor in Mac OS X 10.6 and later.
 .PP
-On Linux, if the network interface on which you're capturing disappears
-(e.g., if a USB interface is unplugged), select) will return an
-indication that the descriptor has data available to read.  If libpcap
-is not using memory-mapped mode to capture, the attempt to read the next
-packet will return an error; however, if it is using memory-mapped mode
-to capture, which it will do if the kernel includes support for
-memory-mapped mode, no packet or error will be returned if you have put
-the
-.B pcap_t
-into non-blocking mode.  You must use
-.B poll()
-in this case;
-.B poll()
-will return a
-.B POLLERR
-indication; a
-.BR recv (2),
-.BR recvfrom(2),
-or
-.BR recvmsg (2)
-on the descriptor will return \-1 and set
-.B errno
-to
-.B ENETDOWN.
-.PP
 .B pcap_get_selectable_fd()
 is not available on Windows.
 .SH RETURN VALUE
 A selectable file descriptor is returned if one exists; otherwise, \-1
 is returned.
 .SH SEE ALSO
-pcap(3PCAP), select(2), poll(2), recv(2)
+pcap(3PCAP), select(2), poll(2)