Net::SnoopLog

Net::SnoopLog is a Perl module used to read snoop network packet logs, from RFC1761 snoop ver 2.
Download

Net::SnoopLog Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Brendan Gregg
  • Publisher web site:
  • http://search.cpan.org/~bdgregg/Net-SnoopLog-0.12/SnoopLog.pm

Net::SnoopLog Tags


Net::SnoopLog Description

Net::SnoopLog is a Perl module used to read snoop network packet logs, from RFC1761 snoop ver 2. Net::SnoopLog is a Perl module used to read snoop network packet logs, from RFC1761 snoop ver 2.SYNOPSISuse Net::SnoopLog;$log = Net::SnoopLog->new(); $log->read("/tmp/out01");@Indexes = $log->indexes;foreach $index (@Indexes) { ($length_orig,$length_incl,$drops,$secs,$msecs) = $log->header($index); $data = $log->data($index); # your code here}METHODSnew () Constructor, return a SnoopLog object.read (FILENAME) Read the snoop file indicated into memory.indexes () Return an array of index numbers for the packets loaded from the snoop file. The indexes start at 0.maxindex () Return the number of the last index. More memory efficient than indexes(). Add 1 to get the packet count. The indexes start at 0.header (INDEX) Takes an integer index number and returns the packet header. This is: Length of original packet, Length actually included in the snoop log, Cumulative drops (since the snoop log began), Packet arrival time as seconds since Jan 1st 1970, Microsecondsdata (INDEX) Takes an integer index number and returns the raw packet data. (This is usually Ethernet/IP/TCP data).version () Returns a string containing the numeric snoop log version, which is expected to be "2".datalink () Returns a strings containing the numeric datalink type, see RFC 1761 for a table of these. (4 is Ethernet). Requirements: · Perl


Net::SnoopLog Related Software