[ECOS] Ethernet driver for linux synthetic target available

Martin Buck martin.buck@ascom.ch
Fri Aug 9 01:21:00 GMT 2002


"Nikolay V. Pyatkov" wrote:
> > Or even better the generic TUN/TAP driver which obsoletes ethertap.

100% ACK. Yet another kernel module for functionality that already
exists is a bad idea. Especially because it'll probably stop compiling
in a few weeks when the Linux kernel hackers change one of their
internal kernel APIs again... :-(

> > I thought of converting that to ecos/synthetic but got confused by what
> > can or cannot be safely called from it (execve,blocking read,etc)
> 
> Yes, that was one of the reasons I did not use TUN.

The blocking problem might be tricky (well, you could always use
O_NONBLOCK but then you'd have to poll). How do you solve it with your
driver?

Another possibility would be aysnchronous IO and mapping the SIGIO from
Linux to an eCos interrupt. Interestingly, synth_intr.c already seems to
provide some kind of support for that, but it doesn't look like it's
fully implemented (it talks about an IO auxiliary that doesn't seem to
be implemented anywhere). Can anybody comment on that?

> Also it requires the
> character device to control its network interface. But the main reason is I
> need several ecos targets running simultaneously and talking to each other
> and the host.

So use one TUN/TAP per eCos target and enable IP forwarding on your
Linux box or attach the interfaces to the Linux bridge. No need to
reinvent the wheel. ;-)

Martin

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



More information about the Ecos-discuss mailing list