Re: select()ing on the underlying descriptor of a pcap_t

2012-01-11 Thread Claudio Jeker
On Tue, Jan 10, 2012 at 07:58:29PM -0800, Philip Guenther wrote: > On Tue, Jan 10, 2012 at 4:10 PM, Fernando Gont wrote: > ... > > However, in OpenBSD (and apparently NetBSD, too) the underlying > > descriptor for a pcap_t is never writeable. > > > > If anything, it'd seem that having select() alw

Re: select()ing on the underlying descriptor of a pcap_t

2012-01-10 Thread Philip Guenther
On Tue, Jan 10, 2012 at 4:10 PM, Fernando Gont wrote: ... > However, in OpenBSD (and apparently NetBSD, too) the underlying > descriptor for a pcap_t is never writeable. > > If anything, it'd seem that having select() always report that the > pcap_t descriptor is "writeable" is a better choice. >

select()ing on the underlying descriptor of a pcap_t

2012-01-10 Thread Fernando Gont
Hi, folks, I'm doing I/O multiplexing with a pcap descriptor (select()ing on the underlying descriptor, to avoid having my app block on libpcap calls). When it comes to checking for writeability, it turns out that in most OSes this is basically a noop (the descriptor is always readable). For exam