http://www.perlmonks.org?node_id=184779


in reply to Re: Net::Pcap does not work
in thread Net::Pcap does not work

Hi,
Thanx for the link to the tutorial
I had a brief look at it and will study it further.
But unfortunately, the loop method does
not work even after i started some heavy downloads, etc
Is there something wrong with my libpcap installation?
Does tcpdump use libpcap? cause my tcpdump works fine

--
arc_of_descent

Replies are listed 'Best First'.
Re: Re: Re: Net::Pcap does not work
by lhoward (Vicar) on Jul 24, 2002 at 12:20 UTC
    Yes, libpcap is underneath tcpdump as well as being the basis for Net::Pcap. Could it be that your interface is not in promiscuious mode? Newer versions of tcpdump do not put the interface into permiscuous mode by default, if this behavior is inherited from libpcap, you may have to manually put the interace into permiscuous mode. Also make sure you're explicitly telling Net::Pcap which interface you want it to listen to. Permissions can also be a problem with pcap, in many cases the program using it has to run with root permissions.
      Hi,

      Well... I have tried promiscous mode as well as
      manually specifying the interface(eth0 and lo)
      I have also done it using root permissions.
      I guess whats left now is to check my pcap library
      with a C program!
      Help!! :-)

      --
      arc_of_descent