diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-09-28 16:28:36 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-09-28 23:29:05 +0000 |
commit | 392c41ce3086979b2158550b9f669b04a0864424 (patch) | |
tree | 11044db03b1851334b932a91b8bfa365a530fee2 /cmake | |
parent | f6b9e7a79ea572efa20af73b45cc24aa7f4b0c21 (diff) | |
download | wireshark-392c41ce3086979b2158550b9f669b04a0864424.tar.gz wireshark-392c41ce3086979b2158550b9f669b04a0864424.tar.bz2 wireshark-392c41ce3086979b2158550b9f669b04a0864424.zip |
Add support for getting nanosecond time stamp resolution when capturing.
If we have pcap_set_tstamp_precision(), use it to request nanosecond
time stamp resolution *if* we're writing a pcap-ng file; any code that
reads those files and can't handle nanosecond time stamp resolution is
broken and needs to be fixed.
If we're writing a pcap file, don't ask for nanosecond resolution time
stamps, as that requires a different magic number for pcap files, and
not all code that reads pcap files can handle that. (Unlike pcap-ng,
where the ability to have non-microsecond time stamp resolution was
present from Day One, it's a relatively recent addition to pcap.) We
could add a command-line option/GUI option for that, like the option
recent versions of tcpdump have, if it matters.
Change-Id: I8fa464eb929feecb9a70be70712502c9f0cc5270
Reviewed-on: https://code.wireshark.org/review/4355
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPCAP.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/modules/FindPCAP.cmake b/cmake/modules/FindPCAP.cmake index 268b3e1a22..9e29881618 100644 --- a/cmake/modules/FindPCAP.cmake +++ b/cmake/modules/FindPCAP.cmake @@ -77,6 +77,7 @@ check_function_exists( "pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS ) check_function_exists( "pcap_set_datalink" HAVE_PCAP_SET_DATALINK ) check_function_exists( "bpf_image" HAVE_BPF_IMAGE ) check_function_exists( "pcap_setsampling" HAVE_PCAP_SETSAMPLING ) +check_function_exists( "pcap_set_tstamp_precision" HAVE_PCAP_SET_TSTAMP_PRECISION ) # Remote pcap checks check_function_exists( "pcap_open" HAVE_PCAP_OPEN ) check_function_exists( "pcap_findalldevs_ex" H_FINDALLDEVS_EX ) |