tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Reliability issues with BPF

Michael Richardson <> writes:

>>>>>> "Darren" == Darren Reed <> writes:
>     Darren> It seems like a relatively straight forward change:
>     Darren> - if pcap loop has been broken because of EINTR
>     Darren> and if pcap is working in blocking mode,
>     Darren> set non-blocking mode and attempt to read any
>     Darren> packets that are currently buffered.
> so, in blocking mode, on NetBSD, why doesn't the pcap_loop() start up
> each time thre is a packet received?  Is there a memory mapped shared
> ring-buffer involved? (If so, can't the not-yet-signaled packets be
> taken from the ring descriptors?)

My understanding from the last time I really dug into this was that
normally, read on bpf would return on the sooner of

  there is any data and a timeout (1s) has passed, or

  the buffer becomes full and bpf flips to the second buffer

But it seems not to work this way any more.

Attachment: pgpRiFtagM55X.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index