summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/librpc')
-rw-r--r--cpukit/librpc/Makefile.am19
-rw-r--r--cpukit/librpc/include/rpc/clnt_stat.h83
-rw-r--r--cpukit/librpc/include/rpc/rpc.h30
-rw-r--r--cpukit/librpc/include/rpc/rpcent.h69
4 files changed, 173 insertions, 28 deletions
diff --git a/cpukit/librpc/Makefile.am b/cpukit/librpc/Makefile.am
index e48621fb8a..ace3e5d1e0 100644
--- a/cpukit/librpc/Makefile.am
+++ b/cpukit/librpc/Makefile.am
@@ -11,11 +11,12 @@ CLEANFILES =
if LIBRPC
include_rpcdir = $(includedir)/rpc
include_rpc_HEADERS = include/rpc/auth.h include/rpc/auth_des.h \
- include/rpc/auth_unix.h include/rpc/clnt.h include/rpc/des.h \
- include/rpc/des_crypt.h include/rpc/pmap_clnt.h include/rpc/pmap_prot.h \
- include/rpc/pmap_rmt.h include/rpc/rpc.h include/rpc/rpc_com.h \
- include/rpc/rpc_msg.h include/rpc/svc.h include/rpc/svc_auth.h \
- include/rpc/types.h include/rpc/xdr.h
+ include/rpc/auth_unix.h include/rpc/clnt.h include/rpc/clnt_stat.h \
+ include/rpc/des.h include/rpc/des_crypt.h include/rpc/pmap_clnt.h \
+ include/rpc/pmap_prot.h include/rpc/pmap_rmt.h include/rpc/rpc.h \
+ include/rpc/rpc_com.h include/rpc/rpc_msg.h include/rpc/rpcent.h \
+ include/rpc/svc.h include/rpc/svc_auth.h include/rpc/types.h \
+ include/rpc/xdr.h
man_MANS =
@@ -116,6 +117,10 @@ $(PROJECT_INCLUDE)/rpc/clnt.h: include/rpc/clnt.h $(PROJECT_INCLUDE)/rpc/$(dirst
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/clnt.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/clnt.h
+$(PROJECT_INCLUDE)/rpc/clnt_stat.h: include/rpc/clnt_stat.h $(PROJECT_INCLUDE)/rpc/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/clnt_stat.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/clnt_stat.h
+
$(PROJECT_INCLUDE)/rpc/des.h: include/rpc/des.h $(PROJECT_INCLUDE)/rpc/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/des.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/des.h
@@ -148,6 +153,10 @@ $(PROJECT_INCLUDE)/rpc/rpc_msg.h: include/rpc/rpc_msg.h $(PROJECT_INCLUDE)/rpc/$
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/rpc_msg.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/rpc_msg.h
+$(PROJECT_INCLUDE)/rpc/rpcent.h: include/rpc/rpcent.h $(PROJECT_INCLUDE)/rpc/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/rpcent.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/rpcent.h
+
$(PROJECT_INCLUDE)/rpc/svc.h: include/rpc/svc.h $(PROJECT_INCLUDE)/rpc/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rpc/svc.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rpc/svc.h
diff --git a/cpukit/librpc/include/rpc/clnt_stat.h b/cpukit/librpc/include/rpc/clnt_stat.h
new file mode 100644
index 0000000000..397bdbc596
--- /dev/null
+++ b/cpukit/librpc/include/rpc/clnt_stat.h
@@ -0,0 +1,83 @@
+/* $FreeBSD: src/include/rpc/clnt_stat.h,v 1.2 2001/03/20 08:20:50 alfred Exp $ */
+/*
+ * Copyright (c) 1986 - 1991, 1994, 1996, 1997 by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+/*
+ * clnt_stat.h - Client side remote procedure call enum
+ *
+ */
+
+#ifndef _RPC_CLNT_STAT_H
+#define _RPC_CLNT_STAT_H
+
+/* #pragma ident "@(#)clnt_stat.h 1.2 97/04/28 SMI" */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum clnt_stat {
+ RPC_SUCCESS = 0, /* call succeeded */
+ /*
+ * local errors
+ */
+ RPC_CANTENCODEARGS = 1, /* can't encode arguments */
+ RPC_CANTDECODERES = 2, /* can't decode results */
+ RPC_CANTSEND = 3, /* failure in sending call */
+ RPC_CANTRECV = 4,
+ /* failure in receiving result */
+ RPC_TIMEDOUT = 5, /* call timed out */
+ RPC_INTR = 18, /* call interrupted */
+ RPC_UDERROR = 23, /* recv got uderr indication */
+ /*
+ * remote errors
+ */
+ RPC_VERSMISMATCH = 6, /* rpc versions not compatible */
+ RPC_AUTHERROR = 7, /* authentication error */
+ RPC_PROGUNAVAIL = 8, /* program not available */
+ RPC_PROGVERSMISMATCH = 9, /* program version mismatched */
+ RPC_PROCUNAVAIL = 10, /* procedure unavailable */
+ RPC_CANTDECODEARGS = 11, /* decode arguments error */
+ RPC_SYSTEMERROR = 12, /* generic "other problem" */
+
+ /*
+ * rpc_call & clnt_create errors
+ */
+ RPC_UNKNOWNHOST = 13, /* unknown host name */
+ RPC_UNKNOWNPROTO = 17, /* unknown protocol */
+ RPC_UNKNOWNADDR = 19, /* Remote address unknown */
+ RPC_NOBROADCAST = 21, /* Broadcasting not supported */
+
+ /*
+ * rpcbind errors
+ */
+ RPC_RPCBFAILURE = 14, /* the pmapper failed in its call */
+#define RPC_PMAPFAILURE RPC_RPCBFAILURE
+ RPC_PROGNOTREGISTERED = 15, /* remote program is not registered */
+ RPC_N2AXLATEFAILURE = 22,
+ /* Name to address translation failed */
+ /*
+ * Misc error in the TLI library
+ */
+ RPC_TLIERROR = 20,
+ /*
+ * unspecified error
+ */
+ RPC_FAILED = 16,
+ /*
+ * asynchronous errors
+ */
+ RPC_INPROGRESS = 24,
+ RPC_STALERACHANDLE = 25,
+ RPC_CANTCONNECT = 26, /* couldn't make connection (cots) */
+ RPC_XPRTFAILED = 27, /* received discon from remote (cots) */
+ RPC_CANTCREATESTREAM = 28 /* can't push rpc module (cots) */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_RPC_CLNT_STAT_H */
diff --git a/cpukit/librpc/include/rpc/rpc.h b/cpukit/librpc/include/rpc/rpc.h
index 5be4d2a9c9..f74082ff7d 100644
--- a/cpukit/librpc/include/rpc/rpc.h
+++ b/cpukit/librpc/include/rpc/rpc.h
@@ -1,3 +1,5 @@
+/* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */
+
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -28,7 +30,7 @@
*
* from: @(#)rpc.h 1.9 88/02/08 SMI
* from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/rpc.h,v 1.12 2000/01/26 09:02:40 shin Exp $
+ * $FreeBSD: src/include/rpc/rpc.h,v 1.17 2002/03/23 17:24:55 imp Exp $
*/
/*
@@ -65,30 +67,12 @@
#include <rpc/svc.h> /* service manager and multiplexer */
#include <rpc/svc_auth.h> /* service side authenticator */
-/*
- * COMMENT OUT THE NEXT INCLUDE (or add to the #ifndef) IF RUNNING ON
- * A VERSION OF UNIX THAT USES SUN'S NFS SOURCE. These systems will
- * already have the structures defined by <rpc/netdb.h> included in <netdb.h>.
- */
-/* routines for parsing /etc/rpc */
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
+#include <rpc/rpcent.h>
__BEGIN_DECLS
-extern struct rpcent *getrpcbyname __P((char *));
-extern struct rpcent *getrpcbynumber __P((int));
-extern struct rpcent *getrpcent __P((void));
-extern int getrpcport __P((char *host, int prognum, int versnum, int proto));
-extern void setrpcent __P((int));
-extern void endrpcent __P((void));
-
-extern int bindresvport __P((int, struct sockaddr_in *));
-extern int bindresvport_sa __P((int, struct sockaddr *));
-extern int get_myaddress __P((struct sockaddr_in *));
+extern int get_myaddress(struct sockaddr_in *);
+extern int bindresvport(int, struct sockaddr_in *);
+extern int bindresvport_sa(int, struct sockaddr *);
__END_DECLS
int rtems_rpc_task_init (void);
diff --git a/cpukit/librpc/include/rpc/rpcent.h b/cpukit/librpc/include/rpc/rpcent.h
new file mode 100644
index 0000000000..dbc8b0e5f9
--- /dev/null
+++ b/cpukit/librpc/include/rpc/rpcent.h
@@ -0,0 +1,69 @@
+/* $NetBSD: rpcent.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */
+/* $FreeBSD: src/include/rpc/rpcent.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
+
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+/*
+ * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
+ */
+
+/*
+ * rpcent.h,
+ * For converting rpc program numbers to names etc.
+ *
+ */
+
+#ifndef _RPC_RPCENT_H
+#define _RPC_RPCENT_H
+
+/* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */
+/* @(#)rpcent.h 1.1 88/12/06 SMI */
+
+
+struct rpcent {
+ char *r_name; /* name of server for this rpc program */
+ char **r_aliases; /* alias list */
+ int r_number; /* rpc program number */
+};
+
+__BEGIN_DECLS
+extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
+ char *, int);
+extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
+extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
+
+/* Old interfaces that return a pointer to a static area; MT-unsafe */
+extern struct rpcent *getrpcbyname(char *);
+extern struct rpcent *getrpcbynumber(int);
+extern struct rpcent *getrpcent(void);
+extern void setrpcent(int);
+extern void endrpcent(void);
+__END_DECLS
+
+#endif /* !_RPC_CENT_H */