• S
    packet_mmap: expose hw packet timestamps to network packet capture utilities · 614f60fa
    Scott McMillan 提交于
    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: NScott McMillan <scott.a.mcmillan@intel.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    614f60fa
af_packet.c 60.3 KB