netsniff-ng: Restore tpacket v2 capturing
commit97e6f994785ce5f3f486f8eddb62df964119d121
authorTobias Klauser <tklauser@distanz.ch>
Mon, 26 May 2014 13:10:33 +0000 (26 15:10 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 14 Aug 2014 06:48:15 +0000 (14 08:48 +0200)
treed8452eb956ec0eb98b13c0a931dd5abce71c3400
parentfa32dcaddab2363cb01acc81bddf7dc3d42ab5b1
netsniff-ng: Restore tpacket v2 capturing

Some older systems (e.g. RHEL 6) don't have tpacket v3 available, but
only tpacket v2. However, since commit d8cdc6a ("ring: netsniff-ng:
migrate capture only to TPACKET_V3") we solely rely on tpacket v3 for
capturing packets.

This patch restores the possibility to capture using tpacket v2. For now
this is just a fallback if the configure script doesn't detect tpacket
v3 (and thus HAVE_TPACKET3 isn't set). Thus, on most modern systems this
shouldn't change anything and they will continue using tpacket v3.

For now this fix contains quite a bit of ugly #ifdefery which should be
cleaned up in the future.

Fixes #76

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
configure
dissector.h
netsniff-ng.c
pcap_io.h
ring.h
ring_rx.c
ring_rx.h