tcpdump
tcpdump is free Unix-based software that runs under the Unix/Linux command line. Some of the useful resources for it are:
- The tcpdump website: http://www.tcpdump.org/
- The Windows version of tcpdump (Windump): http://www.winpcap.org/windump/default.htm
- A friendly tutorial: http://danielmiessler.com/study/tcpdump/
- The official man page: http://www.tcpdump.org/tcpdump_man.html
Wireshark can open tcpdump files, so when you capture packets with tcpdump, you can later open it with Wireshark or any other graphical tool.