Net::Pcap 0.12 review

Download
by rbytes.net on

Net::Pcap is an Interface to pcap(3) LBL packet capture library. SYNOPSIS use Net::Pcap; my $err = ''; my $dev

License: Perl Artistic License
File size: 75K
Developer: Sebastien Aperghis-Tramoni
0 stars award from rbytes.net

Net::Pcap is an Interface to pcap(3) LBL packet capture library.

SYNOPSIS

use Net::Pcap;

my $err = '';
my $dev = Net::Pcap::lookupdev($err); # find a device

# open the device for live listening
my $pcap = Net::Pcap::open_live($dev, 1024, 1, 0, $err);

# loop over next 10 packets
Net::Pcap::loop($pcap, 10, &process_packet, "just for the demo");

# close the device
Net::Pcap::close($pcap);

sub process_packet {
my($user_data, $header, $packet) = @_;
# do something ...
}

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."

Requirements:
Perl

Net::Pcap 0.12 keywords