]> The Tcpdump Group git mirrors - tcpdump/commit
Introduce --time-stamp-precision 377/head
authorMichal Sekletar <[email protected]>
Wed, 19 Mar 2014 13:14:25 +0000 (14:14 +0100)
committerMichal Sekletar <[email protected]>
Wed, 14 May 2014 12:18:40 +0000 (14:18 +0200)
commit52b27d11fc50ebc4f1fc54b53fd9437d62dd7f4a
tree1e95f1125270c58cbfb3fec0a5591301e7715f8b
parent86f3cae06d11516a3c22959a7b2b53bbaaa161d5
Introduce --time-stamp-precision

A while ago we introduced new API in libpcap which made possible to
request time stamps with higher precision (nanoseconds). This commit
aims to move things forward and implement missing bits. It introduces
new long option --time-stamp-precision. Note that there is no equivalent
short option.

When used for a live capture tcpdump will ask the kernel for time stamp
with desired precision and tcpdump will print fraction part of the time
stamp using respective format. We currently support only microsecond and
nanosecond precision. In the future we might support even more granular
time stamp precision, but we should be fine to support only
microseconds and nanoseconds for now. libpcap doesn't provide anything
else at the moment anyway.

When used in combination with -r/-w options then we obtain time stamps
appropriately scaled up or down from libpcap. Also note that distinct
magic number is used for savefiles containing nanosecond time stamps.
netdissect.h
tcpdump.1.in
tcpdump.c
util.c