the-tcpdump-group/libpcap — pull request #295 by darkjames (2013-05-01 23:09:33+00:00)
Title: Experimental support for TPACKET v3

Code based on sample code of minimal AF_PACKET TPACKET_V3 code
http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/Documentation/networking/packet_mmap.txt?id=4eb06148250f92e1e58bf069c309dac173e8b5f7

The most ugly part of patch is bp-pointer substraction:
callback(user, &pcaphdr, bp - (pcaphdr.caplen - tp_snaplen));

No benchmarks done, sorry.