pcap: let netsniff-ng also record pkt timestamp source
commit684f8fbe8d8a95d53b5ac424e59663090e15c629
authorDaniel Borkmann <dborkman@redhat.com>
Fri, 10 May 2013 12:08:27 +0000 (10 14:08 +0200)
committerDaniel Borkmann <dborkman@redhat.com>
Fri, 10 May 2013 12:08:27 +0000 (10 14:08 +0200)
treea755487a88ea7adb371206d0017aa3b277382cab
parentaa7f761a7f3e140e873999bff45aa53d3b14a85c
pcap: let netsniff-ng also record pkt timestamp source

With commit [1] in the kernel, we can also store the timestamp
source in the pcap packet header for later analysis. We do this
by splitting the netsniff-ng's u32 ifindex into u16 tsource and
u16 ifindex. Older kernel do not support the timestamp source in
PF_PACKET, so it will stay 0 and is compatible with older
netsniff-ng binaries.

  [1] http://thread.gmane.org/gmane.linux.network/266878/

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
pcap_io.h