Check out pkgsrc/graphics/xplot, and $ tcpdump -r tracfile -S -tt | tcpdump2xplot $ xplot foo.xplot and read the README files in the sources. Without doing this, or reinventing it, you are unlikely to understand what TCP is doing. If you would like to put up a raw tcpdump (-w, capturing the entire connection), I will try to look at it.
Attachment:
pgpuTVnDcebqx.pgp
Description: PGP signature