On Mon, 25 Nov 2002 [EMAIL PROTECTED] wrote:

> i'm using sockets with pf_packet
> at home on ethertaps and i can
> actually write() on the socket. here in school, with
> the (next) real thing, i can't.
> i've followed packet(7) instructions on bind()-ing,
> still nothing: i get EINVAL error. i looked at
> raw(7), and IPPROTO_RAW can not send (haven't tried it
> though).
>
> anybody can help me on this? or perhaps suggestions on
> another way i can send raw ip packets, using only 1
> socket for any protocol above ip.
>
        What are your raw sockets for? You dont normally use raw sockets
unless you are in the business of faking the contents of your packets for
the purpose of probing someone else's computer or creating your own
protocol. If that is the case, you can also use socket(2) with SOCK_RAW
type. The real problem actually comes from filling in the contents of the
packets. For example for tcp/ip you have to compute checksums, fill in the
payload and fill in the headers. You can find good examples in the source
code of nmap.
        If you just want two computers talk to each other over ip, use
tcp/ip or udp/ip. No need for raw sockets.

rowel

_
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