in reply to problems with libdnet module

It will be much easier for people to help you with your problem if you posted more information, for example the output you get when trying to install the module. You can put <readmore> tags around such text, that way it won't be seen in Newest Nodes or other lists.

About the only helpful thing I can say with the information you have given so far is are you sure you have Ubuntu libdumbnet-dev package installed? That contains the libraries you'll need when compiling Net::Libdnet. Also, Net::Libdnet is rather ancient, and automatic CPAN tests show it fails to install on about half of all modern Linux variants, so maybe the module is broken (or broken for recent versions of Libdnet).

All dogma is stupid.

Replies are listed 'Best First'.
Re^2: problems with libdnet module
by WalkingZero (Sexton) on May 31, 2008 at 13:18 UTC
    Yes, I even tried reloading the libdumnet-dev package. I still get the above output. Is there a good alternative you can recommend to Net::Write::Layer2 for writing frames to the Wire if Net::Libdnet is truly broken? Thanks for your input so far.

    UPDATE: Okaaaay, I'm getting myself confused now. I went back and tried "install Net::Write::Layer2" again and it said it was up to date. When I check CPAN it does not list libdnet as a dependency...I wonder why it was trying to throw libdnet in there earlier. It looks like this is a moot point now though.

      Look at the error you get, specifically Libdnet.xs:35:18: error: dnet.h: No such file or directory. Looking at the contents of libdumbnet-dev (via "dpkg -L libdumbnet-dev") one can see that it does indeed not include dnet.h, but it _does_ include dumbnet.h. Replacing dnet.h with dumbnet.h in Libdnet.xs, and -ldnet with -ldumbnet in Makefile.PL makes the module successfully compile and pass tests on my machine (Kubuntu Gutsy Gibbon). Incidentally, there is a bug report on which shows someone else had the same issue. If these changes fix the compile for you then you could add this to the bug report to help others who may have the same problem

      All dogma is stupid.
        You, sir, are the kind of person that makes the Monastery a wonderful place. Not only did you assist me, but you also educated me a little bit, something I ALWAYS appreciate. Thank you very much

        Update: I sent off an email to rt-cpan about the issue/fix, and have of course given you full credit. Cheers mait ;)
        Installation under Ubuntu/Debian is documented here:

      I haven't used this, but Net::Pcap has a pcap_sendpacket function which could allow writing raw frames to an interface.

        I did not know that, thank you!