excamera, what I'm hacking on, daily.

jamesb@excamera.com


       
Thu, 10 Jul 2003

Debugging TCP
One obvious idea that had escaped me until this morning: things are a lot easier to debug if you watch events as they happen:

tcpdump -v -i xl0 'host 192.168.0.199'

I had the TCP checksum calculation wrong: the checksum includes the TCP pseudo-header. It's fiddly. But I'm now sending a single TCP reset packet correctly:

$ telnet 192.168.0.199 20000
Trying 192.168.0.199...
telnet: connect to address 192.168.0.199: Connection refused

*