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).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de
_______________________________________________
Help-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-hurd