A tcpdump tutorial and primer
If you want to program with tcpdump check out its libary, pcap.http://www.tcpdump.org/pcap.htmlLately I have been playing with a Go interface to it, https://github.com/miekg/pcapGreat tool, and lots of fun.