tcpdump is a tool for network monitoring and data acquisition, supporting promiscuous mode, ethernet, SLIP, PPP and loopback. Captured packets can be analyzed on-the-fly or dumped to file.