Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Greetings:
I am looking for a way to put a raw packet on the network wire. I have built the IP header myself, and included all needed data in a scalar. Now, all I need is to send it out on the cable. Is there a way to do this in WinNT?
I’ve opened the socket, and attempted a write as below:
I get an “unknown error”
Thx for any help!my $temp=socket(SOCK,PF_INET,SOCK_RAW,0) or die('Can not open socket') +; printf "%d $@ $!\n",$temp; my $temp=syswrite(SOCK,$packed); #send the data printf "%d $@ $!\n",$temp; close SOCK;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Raw Sockets
by tadman (Prior) on Mar 19, 2002 at 17:35 UTC | |
Re: Raw Sockets
by RMGir (Prior) on Mar 19, 2002 at 17:28 UTC | |
by Rhose (Priest) on Mar 19, 2002 at 19:44 UTC | |
Re: Raw Sockets
by Erik Hensema (Sexton) on Mar 19, 2002 at 23:23 UTC | |
by mce (Curate) on Mar 20, 2002 at 12:15 UTC | |
by blogan (Monk) on Mar 20, 2002 at 14:25 UTC | |
Re: Raw Sockets
by Anonymous Monk on Mar 19, 2002 at 21:47 UTC |
Back to
Seekers of Perl Wisdom