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
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR