Subject: Re: raw socket at link level
To: James Braswell <James.Braswell@quantum.com>
From: Todd Vierling <tv@pobox.com>
List: tech-net
Date: 03/09/1999 22:37:02
On Mon, 8 Mar 1999, James Braswell wrote:

: I am trying to write to a raw socket, providing the ether_header,

: 	if ( (sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)

: Does anyone see the problem(s)??

AF_INET/SOCK_RAW requires the IP header as first thing; ethernet headers are
attached internally and should not be supplied (read: cannot be supplied).

As a side-note, IP headers should be (read: must be) in host byte order and
will be swapped if necessary by the kernel.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)