i've found my answers (i think) at the nmap source last night.
if i remember every detail, it is
socket(PF_PACKET,SOCK_DGRAM,htons(ETH_P_IP)
and then when sending change the sockaddr_in (i think)
from the header.

thanks

On Mon, 25 Nov 2002, fooler wrote:

> ----- Original Message ----- 
> From: "Rowel Atienza" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 25, 2002 5:25 PM
> Subject: Re: [plug] pf_packet
> 
> 
> > This will compile but this raw socket will not be of any use unless you
> > fill in the header, checksum and payload (if applicable). As I said,
> > creating raw socket is easy. The big problem is the content of the raw
> > socket. 
> 
> is it hard for you to create header, checksum and payload? 
> 
> > See nmap source code or the ping example in UNP by Stevens.
> 
> no need... an RFC 791 will already satisfy my needs...
> 
> fooler.
> _
> Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
> 
> Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
> 
> To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
>[EMAIL PROTECTED]
> 

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to