select() should work on BPF devices on Tiger; it's poll() and kqueues
that don't work.
This commit is contained in:
parent
d6fc76f341
commit
0f76cc6c77
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.86.2.7 2005-07-07 02:04:33 guy Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.86.2.8 2005-07-10 10:55:31 guy Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -997,9 +997,6 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
|
||||||
* there (and in sufficiently recent versions of OpenBSD
|
* there (and in sufficiently recent versions of OpenBSD
|
||||||
* "select()" and "poll()" should work correctly).
|
* "select()" and "poll()" should work correctly).
|
||||||
*
|
*
|
||||||
* In addition, in Mac OS X 10.4, "select()" and "poll()" don't
|
|
||||||
* work on *any* character devices, including BPF devices.
|
|
||||||
*
|
|
||||||
* XXX - what about AIX?
|
* XXX - what about AIX?
|
||||||
*/
|
*/
|
||||||
p->selectable_fd = p->fd; /* assume select() works until we know otherwise */
|
p->selectable_fd = p->fd; /* assume select() works until we know otherwise */
|
||||||
|
@ -1011,9 +1008,6 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
|
||||||
if (strncmp(osinfo.release, "4.3-", 4) == 0 ||
|
if (strncmp(osinfo.release, "4.3-", 4) == 0 ||
|
||||||
strncmp(osinfo.release, "4.4-", 4) == 0)
|
strncmp(osinfo.release, "4.4-", 4) == 0)
|
||||||
p->selectable_fd = -1;
|
p->selectable_fd = -1;
|
||||||
} else if (strcmp(osinfo.sysname, "Darwin") == 0) {
|
|
||||||
if (strncmp(osinfo.release, "8.", 2) == 0)
|
|
||||||
p->selectable_fd = -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue