This is the mail archive of the ecos-discuss@sourceware.org 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: synthetic ethernet


>>>>> "Sergei" == Sergei Gavrikov <sergei.gavrikov@gmail.com> writes:

    Sergei> On Fri, Nov 28, 2008 at 04:47:19PM +0100, Simon Kallweit wrote:
    >> Sergei Gavrikov wrote:
    >>> Simon Kallweit wrote:
    >>> 
    >>>> 0Failed to initialize /dev/net/tun, errno Operationa not
    >>>> permitted (1)
    >>>> 
    >>>> Running rawether using sudo, it actually seems to work. Now I
    >>>> don't quite see where the difference between the suid and
    >>>> sudo method is?!? But I guess I miss the obvious here ...
    >>>> 
    >>>> Any advice?
    >>>> 
    >>> 
    >>> Try tunctl. man tunctl.
    >>> 
    >> 
    >> Thanks, got it working. Might be worth to add a little note in
    >> the ecos documentation.

    Sergei> I would prefer to exclude setuid setup at all from install
    Sergei> rules. I install tools with prefix
    Sergei> --prefix=${HOME}/ecos/tools, and I hate to type sudo make
    Sergei> install; sudo chown -R ...

Do please remember that rawether is intended to work with real
ethernet devices as well, not just /dev/net/tun. In fact that is a lot
easier nowadays than it used to be: just plug in a cheap USB ethernet
device and you have an eth1 device for use by the synthetic target.
Further, using a real ethernet device makes the synthetic target
behave a lot more like a typical embedded target when it comes to
things like accessing a dhcp server.

AFAIK there is no easy way for rawether to access a real ethernet
device unless it is setuid root.

Second, I just tried /dev/net/tun on a Fedora 10 installation. There
is no tunctl utility, and rawether accessed the tun device without
problems. So presumably the problems you were experiencing are
specific to certain distributions. If anybody wants to add a paragraph
to the docs about using tunctl on particular distributions, feel free.

Bart

-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


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


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