bug-hurd
[Top][All Lists]
Advanced

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

RPC port classes (was: [PATCH] Implement getsockopt (fd, SOL_SOCKET, SO_


From: olafBuddenhagen
Subject: RPC port classes (was: [PATCH] Implement getsockopt (fd, SOL_SOCKET, SO_TYPE, ...))
Date: Fri, 30 Jul 2010 04:53:47 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

On Sat, Jul 17, 2010 at 11:37:34AM +0200, Emilio Pozuelo Monfort wrote:
> On 15/07/10 20:46, Carl Fredrik Hammar wrote:

> > The first thing you should do in any RPC that is not a stub is:
> >   if (!user)
> >     return EOPNOTSUPP;
> 
> Done. I'm not sure when user would be NULL. Do you know it?

Every translator handles at least two classes of ports: the fsys control
ports; and the ports on which the translator offers it's actual
funcionality. (Usually the protid ports for node(s) served by the
translator -- but sockets are a bit special in this regard...)

If an RPC is valid only on a certain class of ports, only this port
class will be searched for matching port entries. (This is typically
done by the MIG stubs, according to what was specified as INTRAN in a
mutations.h file -- i.e. mig-mutate.h for pflocal.)

So if someone tries the RPC on a wrong port type, we get no entry -- and
tell the caller that this RPC is not valid on whatever wrong port type
was used.

-antrik-



reply via email to

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