Steffen Ullrich > Net-Inspect-0.302 > Net::Inspect::L2::Pcap

Download:
Net-Inspect-0.302.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Net-Inspect-0.304

NAME ^

Net::Inspect::L2::Pcap - get packets from PCAP

SYNOPSIS ^

 # $pcap is Net::Pcap|linktype
 my $pc = Net::Inspect::L2::Pcap->new($pcap);
 $pc->attach( $rawip );
 pcap_loop($pcap,-1,sub {
   my (undef,$hdr,$data) = @_;
   return $pc->pktin($data,$hdr);
 },undef);

DESCRIPTION ^

Gets data from pcap via pktin method, extracts data and calls pktin hook once for each packet.

Usually pktin is called directly and Net::Inspect::L3::IP is used as upper flow.

Hooks provided:

pktin($pcapdata,\%pcaphdr)

Hooks called:

pktin($data,$time)
syntax highlighting: