-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libpcap sniffing time penalty on Linux #472
Comments
checking out feab221 indeed "fixes" the problem, but packet ring support seems to |
Libpcap makes no guarantee, and has never made any guarantee, that packets will be delivered immediately, the instant that they arrive, unless you enable "immediate mode" by calling If you want immediate packet delivery, use immediate mode; if you want buffering, to deliver multiple packets per wakeup, don't use immediate mode and set the timeout appropriately. |
There's a man page, there's a recurring question, the only missing element is a FAQ page. Just an idea. :-D |
Thanks for the reply. Using pcap_set_immediate_mode() seems to work with packet-ring. |
For posterity, there is now a FAQ entry about this. |
Using newest libpcap on linux, I have a delay of ~0.3s before a packet is
returned via pcap_dispatch(). Kernel is 3.14 and the problem is only with packet-ring.
Disabling packet ring via configure has no such delay (verified by strace
using recvfrom()). The problem was once fixed in
feab221 (I think) but seemed to be reintroduced by V3 mmap handling code?
Anyone else experianced such time delays on certain kernel/pcap combinations?
The text was updated successfully, but these errors were encountered: