tcpdump mailing list archives

Re: select() regression in libpcap-devel?


From: Mike Kershaw <dragorn () nerv-un net>
Date: Wed, 24 Jun 2009 16:40:53 -0400

On Wed, Jun 24, 2009 at 11:29:16AM -0700, Guy Harris wrote:
On what OS is this?

If it's Linux, what happens if you edit pcap-linux.c to forcibly  
undefine HAVE_PACKET_RING after the

Yes, it's linux, sorry for not including that.


 /* check for memory mapped access avaibility. We assume every needed
  * struct is defined if the macro TPACKET_HDRLEN is defined, because it
  * uses many ring related structs and macros */
# ifdef TPACKET_HDRLEN
#  define HAVE_PACKET_RING
#  ifdef TPACKET2_HDRLEN
#   define HAVE_TPACKET2
#  else
#   define TPACKET_V1   0
#  endif /* TPACKET2_HDRLEN */
# endif /* TPACKET_HDRLEN */
#endif /* PF_PACKET */

stuff, recompile, and try with that version of libpcap?  (I.e., disable 
the memory-mapped access?)

This "fixes" it (or at least, it doesn't take 100% cpu with mmap
disabled, obviously gutting mmap functionality isn't the end goal).  Testing 
with tcpdump for sake of simplicity:

dragorn@drd1813 ~/src/libpcap $ tcpdump -V 
tcpdump version 4.1-PRE-CVS_2009_06_22
libpcap version 1.1-PRE-CVS

Kernel 2.6.30, I can check config details if they're relevant.

-m

-- 
Mike Kershaw/Dragorn <dragorn () kismetwireless net>
GPG Fingerprint: 3546 89DF 3C9D ED80 3381  A661 D7B2 8822 738B BDB1

Some people are like slinkies.  They're not actually good for anything,
but you can't help but smile when you see one tumbling down the stairs.

Attachment: _bin
Description:


Current thread: