The Kernel has some nice TCP statistics capabilities in tcp.h. For example, one can obtain the round trip time (RTT) of the previous TCP communication by readin
tcp.h