[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: named ports <-> trivfs translator!

From: Marcus Brinkmann
Subject: Re: named ports <-> trivfs translator!
Date: Sun, 3 Jun 2001 20:27:29 +0200
User-agent: Mutt/1.3.18i

On Sat, Jun 02, 2001 at 06:43:37PM +0200, Johan Rydberg wrote:
> Hi!
> I'm thinking about implementing a small server.  What is
> the easiest way for a client to get the mach-port for the
> server?  

You can advertise your msg port to the proc server with the proc_setmsgport
RPC (send it to the port you get with getproc() from libc).  Then a client
can get the port with the proc_getmsgport RPC (requires the PID of the
server process).  This is a bit like the Mach nameserver, except you access
by PID rather than some name.

The canonical way to do it on the Hurd is to attach the server to some node
in the filesystem, that means, you write a translator which you attach with
settrans, or you write a program that installs itself as a translator
somewhere. libtrivfs helps a lot for that.  (For the latter, see how pfinet
installs the tunnel "device" in pfinet/tunnel.c (setup_tunnel_device).


`Rhubarb is no Egyptian god.' Debian
Marcus Brinkmann              GNU

reply via email to

[Prev in Thread] Current Thread [Next in Thread]