]> The Tcpdump Group git mirrors - libpcap/commit
Try to use smaller mmapped buffers on Ethernet devices.
authorGuy Harris <gharris@ubu9-10.(none)>
Fri, 20 May 2011 17:54:30 +0000 (10:54 -0700)
committerGuy Harris <gharris@ubu9-10.(none)>
Fri, 20 May 2011 17:54:30 +0000 (10:54 -0700)
commit23830f19a30785e01b5bd08254a62d3563bf2126
tree57f646620bfbce7cfefbf26efdd151dab4cc48aa
parent4db97527425020fa7fabe4baa22fb81afc5a1c70
Try to use smaller mmapped buffers on Ethernet devices.

Unfortunately, setting the frame size for mmapped captures based only on
the snapshot length means we end up with very large frames with the
usual large "capture the entire packet" snapshot length, which means
very *few* frames as the frames in the mmapped buffer are fixed length,
and thus perhaps more packet drops.  It's hard to choose the right frame
size in the general case, but we try clamping it at MTU+18 for Ethernet,
at least.
pcap-linux.c