xref: /freebsd/lib/libc/rpc/rpc_svc_err.3 (revision 1db64f89363c97858961c4df0b7d02f3223723cf)
1.\" Copyright 1989 AT&T
2.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
3.\"	$NetBSD: rpc_svc_err.3,v 1.1 2000/06/02 23:11:14 fvdl Exp $
4.Dd May 3, 1993
5.Dt RPC_SVC_ERR 3
6.Os
7.Sh NAME
8.Nm rpc_svc_err ,
9.Nm svcerr_auth ,
10.Nm svcerr_decode ,
11.Nm svcerr_noproc ,
12.Nm svcerr_noprog ,
13.Nm svcerr_progvers ,
14.Nm svcerr_systemerr ,
15.Nm svcerr_weakauth
16.Nd library routines for server side remote procedure call errors
17.Sh LIBRARY
18.Lb libc
19.Sh SYNOPSIS
20.In rpc/rpc.h
21.Ft void
22.Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why"
23.Ft void
24.Fn svcerr_decode "SVCXPRT *xprt"
25.Ft void
26.Fn svcerr_noproc "SVCXPRT *xprt"
27.Ft void
28.Fn svcerr_noprog "SVCXPRT *xprt"
29.Ft void
30.Fn svcerr_progvers "SVCXPRT *xprt" "rpcvers_t low_vers" "rpcvers_t high_vers"
31.Ft void
32.Fn svcerr_systemerr "SVCXPRT *xprt"
33.Ft void
34.Fn svcerr_weakauth "SVCXPRT *xprt"
35.Sh DESCRIPTION
36These routines are part of the RPC
37library which allows C language programs to make procedure
38calls on other machines across the network.
39.Pp
40These routines can be called by the server side
41dispatch function if there is any error in the
42transaction with the client.
43.Sh Routines
44See
45.Xr rpc 3
46for the definition of the
47.Vt SVCXPRT
48data structure.
49.Bl -tag -width XXXXX
50.It Fn svcerr_auth
51Called by a service dispatch routine that refuses to perform
52a remote procedure call due to an authentication error.
53.It Fn svcerr_decode
54Called by a service dispatch routine that cannot successfully
55decode the remote arguments
56(see
57.Fn svc_getargs
58in
59.Xr rpc_svc_reg 3 ) .
60.It Fn svcerr_noproc
61Called by a service dispatch routine that does not implement
62the procedure number that the caller requests.
63.It Fn svcerr_noprog
64Called when the desired program is not registered with the
65RPC package.
66Service implementors usually do not need this routine.
67.It Fn svcerr_progvers
68Called when the desired version of a program is not registered with the
69RPC package.
70The
71.Fa low_vers
72argument
73is the lowest version number,
74and
75.Fa high_vers
76is the highest version number.
77Service implementors usually do not need this routine.
78.It Fn svcerr_systemerr
79Called by a service dispatch routine when it detects a system
80error not covered by any particular protocol.
81For example, if a service can no longer allocate storage,
82it may call this routine.
83.It Fn svcerr_weakauth
84Called by a service dispatch routine that refuses to perform
85a remote procedure call due to insufficient (but correct)
86authentication arguments.
87The routine calls
88.Fn svcerr_auth "xprt" "AUTH_TOOWEAK" .
89.El
90.Sh SEE ALSO
91.Xr rpc 3 ,
92.Xr rpc_svc_calls 3 ,
93.Xr rpc_svc_create 3 ,
94.Xr rpc_svc_reg 3
95