T
Ted Byers
I am using Activestate perl 5.10.0 on Windows XP.
I used ppm to install Net:cap and Net:capUtils, having already
installed WinPcap. That install seems to be OK, since WinDump gets
device information
Here is what it gives me:
K:\WinDump>WinDump -D
1.\Device\NPF_GenericDialupAdapter (Adapter for generic dialup and VPN
capture)
2.\Device\NPF_{4F9C5FE2-01EF-47B8-8B72-420927DB17A6} (D-Link WDA-1320
Wireless G Desktop Adapter)
3.\Device\NPF_{99D913FB-6354-4C53-9215-B70123099406} (Realtek
RTL8139/810x Family Fast Ethernet NIC.
But the following gives me nothing:
use Net:capUtils;
sub process_pkt #Packet processing routine.
{
print("Got a packet!\n");
}
Net:capUtils::loop(\&process_pkt,
SNAPLEN => 65535, #Size of data to get from
packet
PROMISC => 1,); #Promiscuous means look at
ALL packets
Yes, I copied this from a tutorial. But it terminates in seconds
without giving any output. My impression, from the tutorial, was that
it would run until I killed the process, and print "Got a packet!"
each time a packet was sent or received by my machine; but it finishes
so fast I don't even have time to switch to my browser to get the page
at www.google.ca (I even have that page open and try to just refresh
the page, in an effort to see what packets are sent and received, but
to no avail).
Is there a forum specific to network programming where I can find out
what is awry? Or is there someone here who knows these packages who
can advise on resolving this problem. The searches, using google, I
have done so far have proved fruitless.
Thanks
Ted
I used ppm to install Net:cap and Net:capUtils, having already
installed WinPcap. That install seems to be OK, since WinDump gets
device information
Here is what it gives me:
K:\WinDump>WinDump -D
1.\Device\NPF_GenericDialupAdapter (Adapter for generic dialup and VPN
capture)
2.\Device\NPF_{4F9C5FE2-01EF-47B8-8B72-420927DB17A6} (D-Link WDA-1320
Wireless G Desktop Adapter)
3.\Device\NPF_{99D913FB-6354-4C53-9215-B70123099406} (Realtek
RTL8139/810x Family Fast Ethernet NIC.
But the following gives me nothing:
use Net:capUtils;
sub process_pkt #Packet processing routine.
{
print("Got a packet!\n");
}
Net:capUtils::loop(\&process_pkt,
SNAPLEN => 65535, #Size of data to get from
packet
PROMISC => 1,); #Promiscuous means look at
ALL packets
Yes, I copied this from a tutorial. But it terminates in seconds
without giving any output. My impression, from the tutorial, was that
it would run until I killed the process, and print "Got a packet!"
each time a packet was sent or received by my machine; but it finishes
so fast I don't even have time to switch to my browser to get the page
at www.google.ca (I even have that page open and try to just refresh
the page, in an effort to see what packets are sent and received, but
to no avail).
Is there a forum specific to network programming where I can find out
what is awry? Or is there someone here who knows these packages who
can advise on resolving this problem. The searches, using google, I
have done so far have proved fruitless.
Thanks
Ted