On Tue, Jan 10, 2012 at 4:10 PM, Fernando Gont <[email protected]> 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. > > That said, it would be great to have select() return "writeable" with > similar semantics to those of the Sockets API, such that one knows when > it's "safe" to pcap_inject() packets...
It appears to me that it's always "safe", that write() on a bpf will never block, so I think I agree that it should always show itself to poll() as writable. Now, it may be that the packet will be thrown away if the output queue is backed up, but that's not the question that poll() asks generally, so that's fine. Philip Guenther
