Hello,
I have been trying to get a UDP packet sent out using Net::RawIP but am
having issues.
Here is a peice I code I have tried for testing:
my $a;
my $p;
my $f;
my $ipid = int rand 5000 + 100;
$a = new Net::RawIP;
$a->set({
ip => { saddr => '192.168.0.15',
daddr => '192.168.0.10',
id => $ipid,
frag_off => 0,
tos => 0,
protocol => 0x11
},
udp => { source => 1234,
dest => 80,
len => 9,
data=> chr(0)}
});
$a->send(0,1);
Now the packet is sent out but when I view it in ethereal under the
"User Datagram Protocol" section it is showing the source port,
destination port and len as all having a value of 0.
I have also tried providing the port numbers as HEX, as that is what I
had to do to get the protocol set to UDP.
Michael
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>