2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * $Id: clnt_sperrno.c,v 5.2.2.1 1992/02/09 15:08:40 jsp beta $
46 * Early RPC seems to be missing these..
47 * Extracted from the RPC 3.9 sources as indicated
50 /* @(#)clnt_perror.c 1.1 87/11/04 3.9 RPCSRC */
52 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
53 * unrestricted use provided that this legend is included on all tape
54 * media and as a part of the software program in whole or part. Users
55 * may copy or modify Sun RPC without charge, but are not authorized
56 * to license or distribute it to anyone else except as part of a product or
57 * program developed by the user.
59 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
60 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
61 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
63 * Sun RPC is provided with no support and without any obligation on the
64 * part of Sun Microsystems, Inc. to assist in its use, correction,
65 * modification or enhancement.
67 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
68 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
69 * OR ANY PART THEREOF.
71 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
72 * or profits or other special, indirect and consequential damages, even if
73 * Sun has been advised of the possibility of such damages.
75 * Sun Microsystems, Inc.
77 * Mountain View, California 94043
82 #endif /* HAVE_CONFIG_H */
88 enum clnt_stat status;
92 static struct rpc_errtab rpc_errlist[] =
97 "RPC: Can't encode arguments"},
99 "RPC: Can't decode result"},
101 "RPC: Unable to send"},
103 "RPC: Unable to receive"},
107 "RPC: Incompatible versions of RPC"},
109 "RPC: Authentication error"},
111 "RPC: Program unavailable"},
112 {RPC_PROGVERSMISMATCH,
113 "RPC: Program/version mismatch"},
115 "RPC: Procedure unavailable"},
117 "RPC: Server can't decode arguments"},
119 "RPC: Remote system error"},
121 "RPC: Unknown host"},
122 /* { RPC_UNKNOWNPROTO,
123 * "RPC: Unknown protocol" }, */
125 "RPC: Port mapper failure"},
126 {RPC_PROGNOTREGISTERED,
127 "RPC: Program not registered"},
129 "RPC: Failed (unspecified error)"}
134 * This interface for use by clntrpc
137 clnt_sperrno(enum clnt_stat stat)
141 for (i = 0; i < sizeof(rpc_errlist) / sizeof(struct rpc_errtab); i++) {
142 if (rpc_errlist[i].status == stat) {
143 return (rpc_errlist[i].message);
146 return ("RPC: (unknown error code)");