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: Ethernet driver for linux synthetic target available


Bart Veer wrote:
> Actually, this is unfortunate. Another project I have been working on
> recently is generic I/O support for the synthetic target. This has now
> reached the point where I can do ethernet I/O, and I am looking at
> serial support next.

Interesting - I've been thinking about adding Ethernet support to the
synthetic target last week as well. I stopped when I noticed that
Nikolay was faster than me. ;-)

> With my approach, a synthetic target application spawns an auxiliary
> program ecosynth during startup.

Ah, now I know where the SIGIO handling in synth_intr.c is coming from.
:-)

> (There is actually a complication for ethernet, in that under Linux
> you cannot normally access raw ethernet devices or ethertap devices
> from user mode. I do not want the synthetic target application or
> ecosynth to run with root privileges, so there is actually another
> process rawether, installed suid root, which does the low-level
> I/O.)

TUN/TAP should be fine as a normal user as long as you have permission
to open /dev/net/tun. Of course, you don't want don't want to give
everybody permission to play with it on a multiuser machine, so my plan
was to have a suid helper that opens the device, configures the Linux
side of it (and implements a policy to make sure you don't get duplicate
IP addresses etc.) and then uses file descriptor passing to let the
synthetic target process do the actual data transfer.

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


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