[tcpdump-workers] pcap_setdirection and mmap access

2009-11-18 Thread Dragos Ilie
Hi! Could somebody please confirm if pcap_setdirection() works with Linux memory-mapped access. My preliminary results indicate that it doesn't (libpcap appears to capture all packets irrespective of the direction). If my results are correct, is there a way to turn off mmap access through the libp

Re: [tcpdump-workers] pcap_read_linux_mmap is always blocking

2009-07-06 Thread Dragos Ilie
Guy Harris wrote: > > On Jul 6, 2009, at 9:39 AM, Dragos Ilie wrote: > >> I traced the issue to pcap-linux.c:pcap_read_linux_mmap(), which is the >> read handler selected when HAVE_PACKET_RING is defined. The handler >> calls poll() with a negative value, which means a

[tcpdump-workers] pcap_read_linux_mmap is always blocking

2009-07-06 Thread Dragos Ilie
I have an application that uses libpcap in non-blocking mode (pcap_setnonblock). The application reads one packet at a time using pcap_dispatch(). My understanding is that pcap_dispatch should return immediately when no packets are available. However, this is not happening. Instead, pcap_dispatch(