On Jan 28, 2009, at 1:48 AM, Benoit wrote:
Okay so I should use something like this:
int ret=0;
Assigning 0 to ret isn't necessary, as you're setting it to the return
value of pcap_select_ms() immediately after assigning 0 to it.
if((ret =pcap_select_ms(ifhard->adhandle,ifhard->timeout)
Okay so I should use something like this:
int ret=0;
if((ret =pcap_select_ms(ifhard->adhandle,ifhard->timeout)<=0)) {
if((ret=pcap_next_ex(ifhard->adhandle, &(ifhard->header), (const
u_char**)(&p_pkt))> 0) {
...
}
}
return ret;
This let me be sure that if no packet are received the pcap_selec
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 time
On Tue, Jan 27, 2009 at 4:26 PM, Guy Harris 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
> - and, in the
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) som
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 "
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 timeo
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 th