Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Net::RawIP question

by anonymized user 468275 (Curate)
on Aug 16, 2018 at 13:43 UTC ( [id://1220437]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Net::RawIP question
in thread Net::RawIP question

The documentation says:

ethset

is a method for set an ethernet parameters in the current object. The given parameters must look like parameters for the ethnew without a $device.

So for your manipulation, it expects the new header to be given in the ethset call as ip => { header keys and values }

update: you might also want to check whether your calls are returning a true value i.e.

$n->methodname(parms) or die "Net::RawIP->methodname failed";

One world, one people

Replies are listed 'Best First'.
Re^4: Net::RawIP question
by mark200 (Novice) on Aug 16, 2018 at 14:23 UTC
    thanks for information, this debug helps but i always get error at: Net::RawIP->ethnew failed
    #!/usr/bin/perl use Net::RawIP; $n = Net::RawIP->new({ ip => { saddr => '192.168.1.1', daddr => '192.168.1.2', }, tcp => { source => 139, dest => 139, psh => 1, syn => 1, }, }); $n->send; $n->ethnew("eth0") or die "Net::RawIP->ethnew failed"; # error here $n->ethset(source => 'my.target.lan', dest =>'my.target.lan'); $n->ethsend;
      I understand your frustration and I am thankful I didn't write this module, "there but for the grace of god go I", but you have to repeat the parameter
      ip => { saddr => '192.168.1.1', daddr => '192.168.1.2', }
      yet again for the ethset call as counter-intuitive as it might be.

      One world, one people

        I did not understand what you mean, it's hard for me to understand this lanuguage please speak simple english. if you can give example this will be helpful. thanks for helping.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220437]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-03-28 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found