in reply to Net::Libdnet 0.01 does not work under Window 7

Net::Frame doesn't require Net::Libdnet for *all* of it's uses, just Net::Frame::Device.

Not sure what you're trying to do - if it's get Net::Libdnet working on Windows 7 x64 / Strawberry 5.18-, I can't help - I've tried unsuccessfully myself. If you're looking to do some packet creation / dissection (based on the Net::Frame mention), have a look at Perl Packet Crafter - an interactive shell for Net::Frame:

https://github.com/vinsworldcom/PPC
  • Comment on Re: Net::Libdnet 0.01 does not work under Window 7

Replies are listed 'Best First'.
Re^2: Net::Libdnet 0.01 does not work under Window 7
by perlusr193 (Novice) on Jan 16, 2016 at 23:04 UTC

    I really need Net::Frame::Device (Net::Frame). In my script, a following constuct cannot work with Net::Libdnet 0.01 :

    print "$^O\n"; my $oDevice = Net::Frame::Device->new(dev => '...');

    Error message with Net::Libdnet 0.01 under Win7:

    MSWin32 Net::Frame::Device: updateFromDev: unable to get dnet

    I need interfaces access in perl script with either Net::Frame::Device or Net::Packet. It's already clear that the interfaces concept (names and types of WiFi interfaces e.g.) is changed in Win7 compared to old WinXP. That is why Net::Libdnet 0.01 functions fine under WinXP, but cannot not work under Win7.

    I successfully used Net::Packet in WinXP and would like to migrate it to Win7. My central issue under Win7 is Libdnet and not really Net::Packet or Net::Frame. I know what is wrong with Net::Libdnet 0.01 under Win7, but this knowledge does not bring me to the needed solution. Aproved and straightforward howto's to solve the described Libdnet (Win7) problem are much appreciated.

      "I know what is wrong with Net::Libdnet 0.01 under Win7"

      If that's the case, either fix it, or test the advice of VinsWorldcom in Re: Net::Libdnet 0.01 does not work under Window 7, and see if that helps.

      The module you speak of seems to have had a history of test failures, so when someone gives you workable advice, why not test it instead of arguing?

      If it's a case of using another script within a script, there are options... system and backticks (see IO Operators in perlop).

      Again, I'll recommend PPC from my previous post. It accesses Windows interfaces using Net::Pcap and a custom module Win32::Interfaces which isn't on CPAN. Ive tried to emulate many of the accessor's from *nix only interface modules including Net::Libdnet, which I spent many a sleepless night and many conversations with the developer (Gomor, who is very responsive and helpful) trying to get working on Win7 x64 to no avail so just rolled my own (Win32::Interfaces) to work with the Net::Frame suite.

      https://github.com/vinsworldcom/PPC

        Can you please post a working snippet with Win32::Interfaces (PPC) instead of $oDevice = Net::Frame::Device->new(dev => '...') ? For my ready-made automatical scripts, it is not reasonable to use interactive mode with PPC. Whilst we cannot get the needed interfaces structures (hashes) via Net::Libdnet in Win7, we cannot normally use all the functionality of old Net::Packet and Net::Frame based scripts under Win7 (or newer). I had written some useful perl apps based on Net::Packet / Net::Frame under WinXP. Now, I am looking for a method to "repair" Net::Libdnet in Win7 in order to use these apps further, in current Windows. However, when your "wrapper module" for Net::Frame will be installable via CPAN, I would like to try it. Thank you!

      I know what is wrong with Net::Libdnet 0.01 under Win7, but this knowledge does not bring me to the needed solution. Aproved and straightforward howto's to solve the described Libdnet (Win7) problem are much appreciated.

      Can you tell me what is wrong with it under win7?

Re^2: Net::Libdnet 0.01 does not work under Window 7
by perlusr193 (Novice) on Jan 18, 2016 at 20:26 UTC
    Hi vin,

    first, thank you for your assistance regarding my PerlMonk question!
    I have "installed" and tried with your module W32::Interfaces. After some typos were corrected in the sample you kindly posted, that code can finally work on my Win7 PC (see output in my mail I have sent you).

    You wrote in the module's description:
    >> A better approach may be to use XS with GetAdaptersAddresses() and parse the
    >> IP_ADAPTER_ADDRESSES structure. Alas, that is proving difficult to do.

    With my sample get_adapters_info.pl attached in the mail, you can use IP Helper API and Windows Registry without need to base upon Windows system commands (without CLI interface currently used in your module interfaces.pm). I believe, it is an elegant solution you are looking for.

    Best regards,
    perlusr193 (a PerlMonk)