tcpdump mailing list archives

Re: Libpcap on VMWare


From: Dustin Spicuzza <dustin () virtualroadside com>
Date: Wed, 13 Jan 2010 00:36:14 -0500

Guy Harris wrote:
On Jan 12, 2010, at 7:05 PM, Dustin Spicuzza wrote:

Yes, that was what I meant. We never tried -1. We're running single
threaded with a select loop for pcap on two devices and some network
communications, so we figured on the off chance that -1 would never
return (which I'm sure it would), using a number would be easier.

I could imagine that, on Linux with memory-mapped capture, if packets arrive fast enough, pcap_dispatch() could run 
forever; unless I'm missing something, the packet-processing loop in pcap_read_linux_mmap() could continue forever as 
long as pcap_get_ring_frame() always returns a new packet and nobody calls pcap_break_loop(), and if packets arrive 
fast enough that, after processing a packet, there is at least one more packet in the ring buffer, 
pcap_get_ring_frame() could always return a new packet.-


I could imagine this also. And since we had to switch between different
things, thats why we decided to use a limit so it could do the switch.

Dustin

-- 
Innovation is just a problem away

Attachment: signature.asc
Description: OpenPGP digital signature


Current thread: