This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: "really raw" sockets
- From: Grant Edwards <grante at visi dot com>
- To: David Webster <dwebster at lanergy dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 26 Nov 2001 10:35:29 -0600
- Subject: Re: [ECOS] "really raw" sockets
- References: <000901c17672$6ace9f80$4103a8c0@LANERGY05>
On Mon, Nov 26, 2001 at 12:03:53PM -0000, David Webster wrote:
> I need to write some software to communicate with an Ethernet
> device using a protocol that's not TCP/IP based. The devices
> use their own 802.3 Ethernet Type.
I've done this with my Ethernet driver by having it impliment
the standard IO device API (cyg_io_lookup/read/write/...) in
addition to the API used by the TCP/IP stack. At the time I
did it, the raw packet interface was unsupported by the TCP/IP
stack, and I wanted my raw-mode to work even if the TCP/IP
stack wasn't installed.
I'm only interested in a single "custom" Ethernet proto number,
so I use cyg_io_set_config to select the proto number for
receive purposes, as well as optionally setting the MAC
address. Raw frames are then sent/received with
cyg_io_read/write calls.
--
Grant Edwards
grante@visi.com