perl net::rawip help



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
.



Relevant Pages

  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.lang.c)
  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.unix.programmer)
  • abort at the end of data transfer
    ... data chunk is i.e 6. ... int init_client(int port, char *ip) { ... Protocol Info ... Stream Control Transmission Protocol, Src Port: 1031, Dst Port: ...
    (comp.unix.internals)
  • Re: Client certificate private key prompt
    ... Windows Server 2003 server without the Header manually added to the request. ... Frame 34 will be closing the connection. ... Protocol: TCP ... Transmission Control Protocol, Src Port: 2954, Dst Port: https, ...
    (microsoft.public.dotnet.framework)
  • Re: abort at the end of data transfer
    ... Internet Protocol, Src Addr: 192.168.1.119 ... Stream Control Transmission Protocol, Src Port: ... INIT chunk (Outbound streams: 1, ...
    (comp.arch.embedded)