This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: E7t and ethernet


On Thu, Oct 10, 2002 at 04:42:55PM +0200, Andrew Lunn wrote:

> >     err = cyg_io_lookup( "eth0", &handle );
> >     if (ENOERR == err)
> >     {
> >         printf("Found eth0.\n");
> >     }
>
> I've never seen any support for this. I don't think the ethernet
> device are supported in the filesystem. I could be wrong though...

[By "filesystem" do you mean the normal I/O device driver API?]

Way back when, raw Ethernet wasn't supported by the network
stack. So, I added hooks into an eCos Ethernet driver I wrote
that provided a second API so that a program could use normal
cyg_io_lookup/read/write/[get|set]_config to do raw Ethernet
stuff.

The driver also connected to the network stack via the nomal
ethernet driver API.  One of the things you set in
cyg_io_set_config was which protocol number you wanted to
handle using the cyg_io_read().

That part of the driver has never been released to the public,
and AFAIK, none of the other drivers in the CVS archive
implimented a similar scheme.  So, unless you know somebody who
used to work with me who took something they shouldn't have, I
doubt that cyg_io_lookup("eth0") is going to work. ;)

> Why do you want to do this? What are you trying to do?

Back when _I_ did it, it was so I could handle a proprietary
Ethernet protocol (sort of HDCL over Ethernet).

All this leads up to my question:

Q: Does the network stack now allow programs to do raw
   Ethernet? [Something similar to AF_PACKET,SOCK_RAW in
   Linux?] For example: 
    
     1) Send an arbitrary Ethernet frame.
     
     2) Create a socket that will return raw Ethernet frames
        received with a particular protocol number?

   This would need to coexist peacefully with the network stack
   so that normal TCP/IP stuff keeps working.

-- 
Grant Edwards
grante@visi.com

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]