[ECOS] Re: Interfacing directly to the low level ethernet driver, how??

Grant Edwards grante@visi.com
Thu Jun 28 15:34:00 GMT 2007


On 2007-06-28, Gary Thomas <gary@mlbassoc.com> wrote:

>>>> I'm about to develop a raw ethernet driver. After spending
>>>> quite a lot of time reading the forum and analyzing the code I
>>>> finally decide to implement a raw I/O API as suggested by
>>>> Grant Edwards here:
>>> 
>>>> http://www.cygwin.com/ml/ecos-discuss/2003-06/msg00017.html
>>> 
>>> What's the point of this?  Couldn't you solve your problem by
>>> using RAW sockets?

Yes, if RAW sockets were supported by eCos.

>>> The reason for asking is just to point out that your ethernet
>>> "wire" will be pretty useless except for whatever raw traffic
>>> you push across it.

No, the raw I/O API peacefully coexists with the normal network
stack API.  All network traffic that doesn't use the configured
proprietary Ethernet protocol number works the same as always.

>> Could you plase be more precise? I don't thing I got your
>> question, I thought that the version of FreeBSD on eCos didn't
>> implement RAW sockets. Or at least that's what I understood
>> from previous threads here. Am I wrong?
>
> Indeed, RAW sockets are not [currently] implemented.  My
> question was what do you need that RAW sockets cannot provide?
> I think it would be a *much* simpler task to get RAW sockets
> working within the existing stack than to write your own
> networking layer.

It's a pretty thin layer -- it just allows you to queue up
outbout packets with cyg_io_write() and read from a queue of
inboung packets (with a specified protocol type) using
cyg_io_read().

Using RAW sockets would be nice, but adding a little code to an
in-house driver is logistically easier than adding raw socket
support to an "off-the-shelf" network stack and then turning
around and doing it all again a couple years later when the
network stack changes.

-- 
Grant Edwards                   grante             Yow! Now that I have my
                                  at               "APPLE", I comprehend COST
                               visi.com            ACCOUNTING!!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list