title: tcp timestamp, record time required to return a reply
body: <p>I am trying to time ( seconds, ms, microseconds) a reply from a server , my client is sending a small packet to the server and the server is replying to the client.Now what I want is a way to insert a timestamp in the packet sent from the client to the server and the server appends its own timestamp to thet packet and returns it to the client. when the client receives that packet, it finds the difference between both times and returns this difference as the roundtrip time + server porocessing time.</p>
  
  <p>My problem is that I know there is a timestamp option with tcp sockets but there are no examples on the net for it.If anyone can guide me in the right direction that would be great.</p>
  
  <p>Thanks
  OS : ubuntu 11.10
  language : C
  socket : BSD</p>