tcpdump mailing list archives

Re: select() regression in libpcap-devel?


From: Guy Harris <guy () alum mit edu>
Date: Wed, 24 Jun 2009 11:29:16 -0700


On Jun 23, 2009, at 7:34 PM, Mike Kershaw wrote:

I've noticed this a few times, and got reminded of it again recently...

It seems that libpcap-devel did something to the get_selectable_fd()
which causes tools that use it to go into a fast spin on select - the fd
is always 'hot', but there isn't always a packet.

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

 /* 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 is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: