On 2012-06-07 14:22, Johnny Billquist wrote:
On 2012-06-07 12:37, Sampsa Laine wrote:
On 7 Jun 2012, at 11:29, Dave McGuire wrote:
Howabout starting it as a daemon (running as root) via the boot
scripts, and have non-root users's programs access it via a socket?
Cool idea - you could even have multiple hosts connect this way but
export one DECNET endpoint, i.e. run CTERM on Box A whilst FAL goes to
Box B, and MAIL to Box C :)
Are you trying to suggest something like NAT for DECnet?
I'm not sure how easy that would be to do in DECnet, as it works in some
different ways than IP that might cause problems doing this.
Reading through things a little more...
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. And that part needs to run as root. No way around
that.
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.
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.
Anyway, this is a different story than any potential problems with promiscuous mode...
And you still need to be root to play with ethernet.
Johnny