Forum Topic - tcpdump timestamp issue:
   
tcpdump timestamp issue  
Hi QNXers:  
 I enter a wired issue about tcpdump timestamp:  tcpdump timestamp is almost always larger than application timestamp 
when receive the package.
 Using below steps can reproduce the issue on QNX qemu virtual machine: 
 QNX: start a netcat server with shell: ./netcat -lp 8888 -e /bin/sh 
             then start  tcpdump:  tcpdump -tt -s0 -i vt0 port 8888 -X
 PC: nc to qnx:  nc 172.31.1.110 8888,  then enter  date +%s.%N  to get QNX timestamp

From the attached picture: 
   T1: 1723810894.254562  receive the date command packet, then tcp package passing to netcat server
   T2: 1723810893.643000000 netcat server receive date command, run the command get this timestamp  
Why T2 < T1?  this  is normal?  From qnx documents:  https://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.
neutrino.utilities/topic/t/tcpdump.html
       By default, all output lines are preceded by a timestamp. The timestamp is the current clock time, in the form hh
:mm:ss.frac and is as accurate as the kernel's clock. 
      The timestamp reflects the time io-pkt first saw the packet. 

Hope some guru can give some suggestions about this issue, thanks.

Version Info:
QNX SDP 7.1
tcpdump --version
tcpdump version 4.9.3
libpcap version 1.9.1
OpenSSL 1.1.1k  25 Mar 202
netcat:  https://sourceforge.net/projects/netcat/files/
Attachment: Image 2024-08-16_20-32.png 73.28 KB