freebsd-dev/lib/libc/rpc/rpc_svc_err.3
Alfred Perlstein 8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00

96 lines
2.7 KiB
Groff

.\" @(#)rpc_svc_err.3n 1.23 93/08/31 SMI; from SVr4
.\" Copyright 1989 AT&T
.\" @(#)rpc_svc_err 1.4 89/06/28 SMI;
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.\" $NetBSD: rpc_svc_err.3,v 1.1 2000/06/02 23:11:14 fvdl Exp $
.\" $FreeBSD$
.Dd May 3, 1993
.Dt RPC_SVC_ERR 3
.Os
.Sh NAME
.Nm rpc_svc_err ,
.Nm svcerr_auth ,
.Nm svcerr_decode ,
.Nm svcerr_noproc ,
.Nm svcerr_noprog ,
.Nm svcerr_progvers ,
.Nm svcerr_systemerr ,
.Nm svcerr_weakauth
.Nd library routines for server side remote procedure call errors
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.Fd #include <rpc/rpc.h>
.Ft void
.Fn svcerr_auth "const SVCXPRT1 *xprt" "const enum auth_stat why"
.Ft void
.Fn svcerr_decode "const SVCXPRT *xprt"
.Ft void
.Fn svcerr_noproc "const SVCXPRT *xprt"
.Ft void
.Fn svcerr_noprog "const SVCXPRT *xprt"
.Ft void
.Fn svcerr_progvers "const SVCXPRT *xprt" "rpcvers_t low_vers" "rpcvers_t high_vers"
.Ft void
.Fn svcerr_systemerr "const SVCXPRT *xprt"
.Ft void
.Fn svcerr_weakauth "const SVCXPRT *xprt"
.Sh DESCRIPTION
These routines are part of the RPC
library which allows C language programs to make procedure
calls on other machines across the network.
.Pp
These routines can be called by the server side
dispatch function if there is any error in the
transaction with the client.
.Sh Routines
See
.Xr rpc 3
for the definition of the
.Vt SVCXPRT
data structure.
.Bl -tag -width XXXXX
.It Fn svcerr_auth
Called by a service dispatch routine that refuses to perform
a remote procedure call due to an authentication error.
.It Fn svcerr_decode
Called by a service dispatch routine that cannot successfully
decode the remote parameters
(see
.Fn svc_getargs
in
.Xr rpc_svc_reg 3 ) .
.It Fn svcerr_noproc
Called by a service dispatch routine that does not implement
the procedure number that the caller requests.
.It Fn svcerr_noprog
Called when the desired program is not registered with the
RPC package.
Service implementors usually do not need this routine.
.It Fn svcerr_progvers
Called when the desired version of a program is not registered with the
RPC package.
.Fa low_vers
is the lowest version number,
and
.Fa high_vers
is the highest version number.
Service implementors usually do not need this routine.
.It Fn svcerr_systemerr
Called by a service dispatch routine when it detects a system
error not covered by any particular protocol.
For example, if a service can no longer allocate storage,
it may call this routine.
.It Fn svcerr_weakauth
Called by a service dispatch routine that refuses to perform
a remote procedure call due to insufficient (but correct)
authentication parameters.
The routine calls
.Fn svcerr_auth "xprt" "AUTH_TOOWEAK" .
.El
.Sh SEE ALSO
.Xr rpc 3 ,
.Xr rpc_svc_calls 3 ,
.Xr rpc_svc_create 3 ,
.Xr rpc_svc_reg 3