On 7 Jun 2012, at 13:32, Johnny Billquist <bqt at softjar.se> wrote:
Are you actually talking now about implementing a DECnet stack on a machine in user mode?
That is definitely not doable. You need atleast one part that talks raw ethernet, if you
want access to the local ethernet.
No. What we are trying to work out is if (as it seems to be) it is
possible to implement a functional DECnet stack without having to
directly alterbthe kernel code (as is currently required) because
doing so limits portability and compatibility due to ever-shifting
sands of Linux kernel development.
And that part needs to run as root. No way around that.
We established that, yes. That's where my idea of using pcap and
running the interface in promicuous mode came out of.
Normal user programs should of course not need to be running as root, nor much around in
the kernel, but there is nothing tricky about this. The DECnet stack is one process. Any
other program talking DECnet needs to talk to the DECnet stack. That can be done in a
number of ways. Unix sockets, TCP/IP sockets, shared memory, named pipes... Just pick
something.
So with the daemon running as root it is possible to access it from
'userland' without root access. Excellent.
The ugly part is that you'll need to write all the software to handle all the
protocols that sits on top of DECnet, such as a FAL listener, a FAL user client, CTERM
listener and client, NICE, PHONE, MAIL... The list goes on...
You'll probably want to write a library with all the DECnet library primitives so that
you have a nice API for the user level code to use. If you are lucky, the API in the
current implementation can be adapted to your new implementation, which will make it
possible to reuse a lot of code. I have not looked at how the current DECnet API looks
like in Linux.
That seems like a sound idea to me. If the code already exists there's
no point on duplicating the effort unless it's required.
Anyway, this is a different story than any potential problems with promiscuous mode...
As I explained, my thinking was to use promiscuous mode to created a
DECnet stack that wasn't kernel dependant. That's where Dave and I got
hung up on potential small issues.
All clear there now, we can move on!
And you still need to be root to play with ethernet.
Indeed.
--
Mark Benson
http://markbenson.org/blog
http://twitter.com/MDBenson