Timestamps for TCP packets?

Miles Kaufmann milesck at umich.edu
Fri Oct 2 10:20:58 CEST 2009


On Oct 2, 2009, at 12:03 AM, Thomas Johnson wrote:

> Is there any way to get kernel-level timestamps for TCP packets while
> still using the standard python sockets library for communication? I
> need to communicate over a TCP connection as easily as possible, but
> also record the timestamps of the incoming and outgoing timestamps at
> microsecond or nanosecond resolution.
>
> The sockets library is of course great for the communication, and I've
> seen some python libraries that do packet sniffing and record
> timestamps, but it's not clear that I can do both at the same time.

Have you tried it?  I don't know of any reason that using sockets and  
doing a packet capture would interfere with each other.  What are you  
trying to accomplish with the packet sniffing, though?

-Miles



More information about the Python-list mailing list