[tcpdump-workers] Compatibility Libpcap/Winpcap and timout of pcap_next_ex().

2009-01-27 Thread Benoit
Hello, I've start a simple protocol to communicate with FPGA using only MAC layer. This software should run under linux and windows, however i've a problem with the timeout of pcap_next_ex() function under linux. With winpcap when a packet is not coming the pcap_next_ex() return 0 but in linux

Re: [tcpdump-workers] Compatibility Libpcap/Winpcap and timout of pcap_next_ex().

2009-01-27 Thread Guy Harris
On Jan 27, 2009, at 9:17 AM, Benoit wrote: I've start a simple protocol to communicate with FPGA using only MAC layer. This software should run under linux and windows, however i've a problem with the timeout of pcap_next_ex() function under linux. There is no guarantee that, with a

Re: [tcpdump-workers] Compatibility Libpcap/Winpcap and timout of

2009-01-27 Thread Matthew Luckie
If you want a timeout, so you don't wait forever for a packet to arrived, I'd suggest using select() or poll() on UN*X systems (other than *BSD and Mac OS X, where select() and poll() might not work correctly on BPF devices - and, in the case of Mac OS X, where poll() doesn't work *at all* on

Re: [tcpdump-workers] Compatibility Libpcap/Winpcap and timout of

2009-01-27 Thread Guy Harris
On Jan 27, 2009, at 4:43 PM, Matthew Luckie wrote: I think the problems with select on BPF devices on FreeBSD have been solved for a long time. Certainly on all currently supported versions of FreeBSD. I think it's fixed on sufficiently recent versions of all of the *BSDs, but 1)

Re: [tcpdump-workers] Compatibility Libpcap/Winpcap and timout of

2009-01-27 Thread Aaron Turner
On Tue, Jan 27, 2009 at 4:26 PM, Guy Harris g...@alum.mit.edu wrote: If you want a timeout, so you don't wait forever for a packet to arrived, I'd suggest using select() or poll() on UN*X systems (other than *BSD and Mac OS X, where select() and poll() might not work correctly on BPF devices

Re: [tcpdump-workers] Compatibility Libpcap/Winpcap and timout of

2009-01-27 Thread Guy Harris
On Jan 27, 2009, at 5:14 PM, Aaron Turner wrote: What is the solution on *BSD/OS X where you want a timeout If you want a timeout, in the sense of something that means that you'll *never* block forever waiting for packets to arrive, then: if you *only* care about platforms where the