This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Ethernet driver for linux synthetic target available
"Nikolay V. Pyatkov" wrote:
> Well, the ecos part of the driver does not care about the nature of the linux
> character device interface. With a slight modification it could be used with
> tun, ecxept right now it can't control network device of the tun.
Your driver never seems to block which is different from a "normal" char
device like TUN/TAP, but opening with O_NONBLOCK should fix that
problem. (haven't tried it, though). But then, having a thread that has
to poll that device sounds more like a hack than a clean solution.
Bart's idea seems to scale better, but you've got the advantage that
you've already shown us some code ;-)
> I'll apreciate if anybody sends me a script to install several tun drivers on
> the same pc. I will modify the driver to work with that setup.
That's trivial - just open /dev/net/tun as often as you want. It will
automagically give you a new device every time.
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