UPDATE: This works for Net::Pcap 0.16 on MSWin32. If using Net::Pcap 0.17, see Re^5: Net::Pcap installation help (and not with the library)
There are bugs in the Net::Pcap code that have not been patched that affect Windows installations. You can see this by looking at the bug report here https://rt.cpan.org/Public/Bug/Display.html?id=53292. Our own Corion fixed it and provided patches.
I've gotten Net::Pcap to build successfully on Windows XP / Strawberry 5.10, 5.12, 5.14 and also Windows 7 x64 / Strawberry 5.14, 5.16. I've used the following process:
References
https://rt.cpan.org/Public/Bug/Display.html?id=53292--Net::Pcap
patch -p1 < FILENAME.patch
NOTE: May have to 'unix2dos' the patch files if they don't work!
--WinPcap
tmp\Net-Pcap-0.16\.. tmp\WpdPack\..
dir WpdPack\lib\x64\*.a
pexports \Windows\system32\wpcap.dll > wpcap.def dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libwpcap.a --input-def wpcap.def pexports \Windows\system32\Packet.dll > Packet.def dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpacket.a --input-def Packet.def move libwpcap.a WpdPack\lib\x64 move libpacket.a WpdPack\lib\x64
perl Makefile.PL INC=-IC:/Users/VinsWorldcom/tmp/WpdPack/Include "LI +BS=-LC:/Users/VinsWorldcom/tmp/WpdPack/Lib/x64 -lwpcap" dmake dmake test
Test by creating test.pl:
use Net::Pcap qw(:functions); @devs = pcap_findalldevs(\%devinfo, \$err); for my $dev (@devs) { print "$dev : $devinfo{$dev}\n" }
Run:
perl -Mblib test.pl
If successful output of adapters, install with:
dmake install
In reply to Re: Net::Pcap installation help (and not with the library)
by VinsWorldcom
in thread Net::Pcap installation help (and not with the library)
by binarygrrl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |