Subject: | Various bugs and fixes for 0.14 and 0.15_01 |
Date: | Fri, 1 Jun 2007 09:43:10 -0500 |
To: | <bug-Net-Pcap [...] rt.cpan.org> |
From: | "Mosemann, Russell" <Russell.Mosemann [...] cune.edu> |
1. In Pcap.pm "functions", "set_filter" should be "setfilter".
2. In Pcap.pm "functions", "stats" is missing.
3. The documentation in Pcap.pm for 0.15_01 incorrectly lists
Net::Pcap::get_selectable_fdfileno, which causes the actual function not
to be found. It should be changed to Net::Pcap::get_selectable_fd.
4. The documentation lists pcap_next_ex, but it is next_ex.
5. next_ex returns the header information, but it does not return the
packet information. That's because the following line in Pcap.xs is
wrong.
pkt_data = newSVpv(data, header->caplen);
pkt_data is not an SV. It is a reference to an SV. Even if pkt_data was
an SV, you still don't want to create a new SV. Change the existing SV.
The line above should be changed to
sv_setpvn(SvRV(pkt_data), data, header->caplen);
The line above dereferences pkt_data to get the SV, and then the
function changes the value of that SV.
--
Russell Mosemann, Ph.D.
Associate Professor of Computer Science