Hi,

I'm trying to write a raw (SYN) packet with sendto. I've opened the socket 
with socket(AF_INET, SOCK_RAW, IPPROTO_RAW), the result is checked and it is 
unbound. A buffer and a sockaddr_in are formed then sent down the socket with 
sendto(sck,pBuffer,40,0,(struct sockaddr *)&sin,sizeof(sin)) and the packet 
captured using ethereal. While the packet does send, with the correct source 
and destination addresses, the buffer I pass is appended as data on the end 
of an IP packet with unknown protocol, rather than replacing the IP and TCP 
headers (i.e. appending the ethernet header) as I had hoped.

Has anyone seen this before? Is there a socket option I have missed? I've 
R'dTFM till I'm blue in the face, and all the examples I can find seem to be 
for Linux on big endian machines :(

Cheers,
Dave

PS. No, not a packet kiddie.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to