NAME | DESCRIPTION | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO
These routines are a part of the RPC library which allows the RPC servers to register themselves with rpcbind() [see rpcbind(1M) ], and associate the given program and version number with the dispatch function. When the RPC server receives an RPC request, the library invokes the dispatch routine with the appropriate arguments.
See rpc(3N) for the definition of the SVCXPRT data structure.
#include <rpc/rpc.h> |
Register program prognum , procedure procname , and version versnum with the RPC service package. If a request arrives for program prognum , version versnum , and procedure procnum , procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s). The arg parameter to procname is a pointer to the (decoded) procedure argument. inproc is the XDR function used to decode the parameters while outproc is the XDR function used to encode the results. Procedures are registered on all available transports of the class nettype . See rpc(3N) . This routine returns 0 if the registration succeeded, -1 otherwise.
If the server has the
PRIV_NET_MAC_READ
privilege, a multilevel mapping is created. If the mapping is being established to a transport that uses a privileged address, the server must have the
PRIV_NET_PRIVADDR
privilege.
Associates prognum and versnum with the service dispatch procedure, dispatch . If netconf is NULL , the service is not registered with the rpcbind service. For example, if a service has already been registered using some other means, such as inetd (see inetd(1M) ), it will not need to be registered again. If netconf is non-zero, then a mapping of the triple [ prognum , versnum , netconf => nc_netid] to xprt => xp_ltaddr is established with the local rpcbind service.
The svc_reg() routine returns 1 if it succeeds, and 0 otherwise.
If the server has the
PRIV_NET_MAC_READ
privilege, a multilevel mapping is created. If the mapping
is being established to a transport that uses a privileged address, the server must have the
PRIV_NET_PRIVADDR
privilege.
Remove from the rpcbind service, all mappings of the triple [ prognum , versnum , all-transports ] to network address and all mappings within the RPC service package of the double [ prognum , versnum ] to dispatch routines.
If the server has the
PRIV_NET_MAC_READ
privilege, a multilevel mapping is created. If the mapping being deleted is to a transport that uses a privileged address, the server must have the
PRIV_NET_PRIVADDR
privilege.
The
PRIV_NET_SETID
privilege is required in order for anyone other than the owner of a mapping to delete the mapping.
Registers the service authentication routine handler with the dispatch mechanism so that it can be invoked to authenticate RPC requests received with authentication type cred_flavor . This interface allows developers to add new authentication types to their RPC applications without needing to modify the libraries. Service implementors usually do not need this routine.
Typical service application would call svc_auth_reg() after registering the service and prior to calling svc_run() . When needed to process an RPC credential of type cred_flavor , the handler procedure will be called with two parameters ( struct svc_req * rqst , struct rpc_msg * msg ) and is expected to return a valid enum auth_stat value. There is no provision to change or delete an authentication handler once registered.
The svc_auth_reg() routine returns 0 if the registration is successful, 1 if cred_flavor already has an authentication handler registered for it, and -1 otherwise.
After RPC service transport handle xprt is created, it is registered with the RPC service package. This routine modifies the global variable svc_fdset (see rpc_svc_calls(3N) ). Service implementors usually do not need this routine.
Before an RPC service transport handle xprt is destroyed, it unregisters itself with the RPC service package. This routine modifies the global variable svc_fdset [see rpc_svc_calls(3N) ]. Service implementors usually do not need this routine.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | MT-Safe |
Most rpcbind services operate only on mappings that either match the sensitivity label of the server or are multilevel.
The
PRIV_NET_MAC_READ
privilege affects the operation of several
rpcbind
services. If the privilege is on when
rpc_reg()
or
rpc_svc()
is called, a multilevel mapping is created. To delete a multilevel
mapping,
svc_unreg()
must be called with the privilege on.
The
PRIV_NET_PRIVADDR
privilege is required for
rpc_reg()
,
rpc_svc()
, or
svc_unreg()
calls that create or delete mappings for a transport that uses a privileged address.
The
PRIV_NET_SETID
privilege is required by
svc_unreg()
in order for anyone other than the owner of a mapping to delete the mapping.
NAME | DESCRIPTION | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO