in reply to Net::RawIP failing in some case

I am reading a wireshark dump file using Net::Pcap module,and I want to dump only the packets to the ethernet interface i tried using Net::RawIP module, I was caught up with this 'panic: sv_setpvn called with negative strlen at /usr/local/lib/perl/5.8.8/Net/RawIP.pm line 500.' error if i run the same code on a different machine

Is there any other module available to write the packets (frames) just to the local Ethernet interface(eth0), because I just want to simulate the exact scenario, my aim is not to send the packet to any external machine but to send only to the local Ethernet interface.

moreover that module must be free from this encoding issue, it has to process the packet as raw data while parsing the packet and preparing it to send to the Ethernet device.
because I didn't had success with the Net::RawIP::bset routine.

Any help is greatly appreciated.


Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re^2: Net::RawIP failing in some case
by Anonymous Monk on Apr 23, 2009 at 19:42 UTC
    Try adding "use bytes;" at the top of your script. http://perldoc.perl.org/bytes.html