in reply to Re^2: Network interface discovery
in thread Network interface discovery

You could try a newer version of Net::Pcap; the documentation on CPAN says this function is supported in 0.05.

Replies are listed 'Best First'.
Re^4: Network interface discovery
by moot (Chaplain) on Apr 24, 2005 at 01:12 UTC
    Interesting.. CPAN fed me the 0.04 version.

    Anyway, 0.05 is getting there, although the function only returns the network names, and Net::Pcap::lookupnet() returns the network, not the address.. e.g. for 127.0.0.1 it returns 127.0.0.0. So it's not quite what I needed, but thanks for the pointer. I'll keep digging..

      Ah, you're right. The version of findalldevs in libpcap actually returns the addresses of the interfaces, along with their names. Probably you could modify the Net::Pcap module to provide this information, or get at it using Inline::C.