If libpcap used in threaded environment on FreeBSD, read() from bpf returns
with -1 and does not block ever. There is the possibility to poll()/select()
the file descriptor (pcap-int.h) to avoid this, but this is not portable way
because of different techniques used on different systems. What are the
standart way to avoid such a bug in threaded environment?

http://www.spelio.net.ru/soft/ipcad-2.2.tar.gz is written with polling
the bpf device and using pcap where bpf is not available.

What is the correct method? Maybe, library has to be modified to implement
poll() around the read() call, or this is the bug in FreeBSD threading
implementation?

-- 
Lev Walkin
[EMAIL PROTECTED]

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to