aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_packet.h
diff options
context:
space:
mode:
authorScott McMillan <scott.a.mcmillan@intel.com>2010-06-02 08:53:56 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-02 08:53:56 -0400
commit614f60fa9d73a9e8fdff3df83381907fea7c5649 (patch)
treea1b7704393b7042242470db09d59944bca67ec51 /include/linux/if_packet.h
parent7dad171c39dc83bd267c4f98d8b02d38e0d65596 (diff)
packet_mmap: expose hw packet timestamps to network packet capture utilities
This patch adds a setting, PACKET_TIMESTAMP, to specify the packet timestamp source that is exported to capture utilities like tcpdump by packet_mmap. PACKET_TIMESTAMP accepts the same integer bit field as SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE and SOF_TIMESTAMPING_RAW_HARDWARE values are currently recognized by PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set. If PACKET_TIMESTAMP is not set, a software timestamp generated inside the networking stack is used (the behavior before this setting was added). Signed-off-by: Scott McMillan <scott.a.mcmillan@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_packet.h')
-rw-r--r--include/linux/if_packet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index 6ac23ef1801a..72bfa5a034dd 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -48,6 +48,7 @@ struct sockaddr_ll {
48#define PACKET_LOSS 14 48#define PACKET_LOSS 14
49#define PACKET_VNET_HDR 15 49#define PACKET_VNET_HDR 15
50#define PACKET_TX_TIMESTAMP 16 50#define PACKET_TX_TIMESTAMP 16
51#define PACKET_TIMESTAMP 17
51 52
52struct tpacket_stats { 53struct tpacket_stats {
53 unsigned int tp_packets; 54 unsigned int tp_packets;