Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Snow Leopard, libpcap, and non-blocking Options

0 views
Skip to first unread message

Chris McDonald

unread,
Nov 23, 2009, 2:46:02 AM11/23/09
to
I'm wondering is anyone else is experiencing differences between
SnowLeopard and Leopard's support for non-blocking reads via libpcap ?

Using the following code:

http://www.csse.uwa.edu.au/~chris/trypcap.c

when compiled with Snow Leopard and gcc 4.2.1, the call to
pcap_setnonblock() appears to have no effect - the frames are dispatched
in bursts of 100+ frames, taking a few seconds for each burst to arrive.

When compiled with Leopard and gcc 4.0.1, the frames arrive immediately,
one-at-a-time, as expected.

(I have also tried changing the non-blocking nature of pcap's file
descriptor, using fcntl(fd, F_SETFL, O_NONBLOCK); all calls succeeded,
but with no change to the symptoms).

Has there been a recent change to SL's non-blocking fcntl(), or to SL's
implementation of libpcap() ?

---
Any suggestions or pointers very welcome.

______________________________________________________________________________
Dr Chris McDonald E: ch...@csse.uwa.edu.au
Computer Science & Software Engineering W: http://www.csse.uwa.edu.au/~chris
The University of Western Australia, M002 T: +618 6488 2533
Crawley, Western Australia, 6009 F: +618 6488 1089

0 new messages