1
I noticed that in all tcp communications, in the tcp header option parts, tcp timestamp is always there is it mandatory or not? so if there is no tcp timestamp in a tcp packet, the tcp client or server will reject it?
besides, I don't find any source snippets for generating tcp timestamps can anyone provide some links or examples on how to generate tcp timestamps?
thanks!
thanks, are there any source snippets for generation of tcp timestamps? – user138126 – 2013-03-20T20:34:20.940
From what I'v seen on the internet, there are no specific units. It's a 4-byte field that you drop your time into. See http://www.networksorcery.com/enp/protocol/tcp/option008.htm and http://msdn.microsoft.com/en-us/library/aa923592.aspx. It looks like the RFC was careful not to specify a unit. You can use a 32-bit representation of your system clock for example.
– kmort – 2013-03-20T20:42:28.570you meant just use a random number? then how to increase the number for the next packet? – user138126 – 2013-03-20T21:42:24.233
You can use your system clock. I was just saying it doesn't specify if your LSB signifies seconds, nanoseconds, or microseconds or none of the above. That's up to you. – kmort – 2013-03-21T04:22:13.203