Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl Net::Pcap loop hang ??

0 views
Skip to first unread message

Michael Gale

unread,
Aug 17, 2005, 2:08:36 AM8/17/05
to beginners perl
Hello,

I have tracked down a problem in my perl script to the module Net::Pcap
I believe and the loop mod.

So using perl -MPCAN -e shell I tried to install Net:Pcap to see what
happens.

After the make, it runs a check and produces the following out put:

t/01-modules OK
t/02-lookup OK
t/03-openlive OK
t/04-loop .....

That is where it hangs idefinitly ... has any one seen this before ?

How do I trouble shoot or resolve this issue ?

I am running slackware 10.1 with kernel 2.4.26 ?

Thanks

Michael

John W. Krahn

unread,
Aug 17, 2005, 3:51:15 AM8/17/05
to Perl Beginners
Michael Gale wrote:
> Hello,

Hello,

I recently installed that module so yes I have seen that t/04-loop does
take a long time to complete. I found that by running a program that
sends and receives a lot of packets at the same time that the tests run
will speed up the whole process so I opened a separate xterm and ran
ping at the same time. Note that Net::Pcap defaults to 'eth0' so
pinging localhost won't do much. If you run in to a problem with the
t/07-stats test let me know, I think I can fix it. :-)

John
--
use Perl;
program
fulfillment

Michael Gale

unread,
Aug 17, 2005, 8:50:48 PM8/17/05
to beginners perl
Hey,

Thanks I discovered the same thing this morning, in the test directory
(/t) there is a README that stats the loop test waits for 10 packets to
be received to finish.

So by generating network traffic it finished.

My stats test did fail, for now I just ran a force install, but I am
open to suggestions.

Michael

John W. Krahn

unread,
Aug 17, 2005, 10:21:00 PM8/17/05
to Perl Beginners
Michael Gale wrote:
> Hey,

Hello,

> Thanks I discovered the same thing this morning, in the test
> directory (/t) there is a README that stats the loop test waits for 10
> packets to be received to finish.
>
> So by generating network traffic it finished.
>
> My stats test did fail, for now I just ran a force install, but I am
> open to suggestions.

It looks like the author is expecting the %stats hash to accumulate the
stats between test runs but on my system $stats{ ps_recv } always
contains 1 so I changed the line:

if ( $count != $stats{ ps_recv } ) {

To:

if ( 1 != $stats{ ps_recv } ) {

in the 07-stats.t file. HTH

0 new messages