Subject: | stats() func broken |
The stats() func is broken pretty severely. The following perl program
prints something like:
0.14
recv: 135607104, drop: 135585800, ifdrop: 3082111115
Even if the capture given on the command line only has a few packets.
The numbers are different for different captures, but they're always
very large and very wrong.
######
#!/usr/bin/perl
use Net::Pcap;
$err;
$pcap = Net::Pcap::open_offline(shift, \$err) or die "$err\n";
%stat = ();
Net::Pcap::stats($pcap, \%stat) or die "$!";
print "$Net::Pcap::VERSION\n";
print "recv: $stat{ps_recv}, drop: $stat{ps_drop}, ifdrop:
$stat{ps_ifdrop}\n";