Net::Pcap is a Perl binding to the LBL pcap(3) library. The README for libpcap
describes itself as "a system-independent interface for user-level packet
capture. libpcap provides a portable framework for low-level network
monitoring.  Applications include network statistics collection, security
monitoring, network debugging, etc."
