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: RAW Ethernet I/O


On Sun, Jun 01, 2003 at 11:40:36PM -0400, Rick Davis wrote:
> I am working on a project that will be receiving IP packets via an RS-422
> serial link. The packets will then be transmitted over Ethernet. I would
> like to use the Raw Packet interface but it doesn't look like eCos fully
> supports the raw packet interface line Linux does. I need to be able to keep
> the received source MAC address when transmitting the data over Ethernet as
> well as change the source MAC address to some predefined value or the value
> of the receiver. I also don't need the IP stack because the entire packet is
> good to go as is and needs no massaging by the IP stack. I have done this on
> Linux but I am a newbie to eCos and was wondering how I can attach to the
> Ethernet driver directly or is there another way. Eventually the project
> will go bi-directional and will also need to be able to receive RAW Ethernet
> for transmission over RS-422 serial.

If you don't need the IP stack, you could leave it out. This then
leaves free the interface the stack uses.

Probably the simplest code to understand is the interface the lwip stacks
uses. Have a look at 

packages/io/eth/current/src/lwip/eth_drv.c

You need to write something similar so you can send/receive packets.

Alternatively, you could add in the BPF code to the stack. Anthony
Massa's says this is possible. If you do do this, please let us
know. It would be nice to make this part of the main sources.

      Andrew

        

-- 
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]