diff options
-rw-r--r-- | ChangeLog | 31 | ||||
-rw-r--r-- | sunrpc/pmap_rmt.c | 1 | ||||
-rw-r--r-- | sunrpc/rpc/auth.h | 32 | ||||
-rw-r--r-- | sunrpc/rpc/auth_unix.h | 34 | ||||
-rw-r--r-- | sunrpc/rpc/clnt.h | 73 | ||||
-rw-r--r-- | sunrpc/rpc/netdb.h | 36 | ||||
-rw-r--r-- | sunrpc/rpc/pmap_clnt.h | 60 | ||||
-rw-r--r-- | sunrpc/rpc/pmap_prot.h | 32 | ||||
-rw-r--r-- | sunrpc/rpc/pmap_rmt.h | 26 | ||||
-rw-r--r-- | sunrpc/rpc/rpc_msg.h | 40 | ||||
-rw-r--r-- | sunrpc/rpc/svc.h | 76 | ||||
-rw-r--r-- | sunrpc/rpc/svc_auth.h | 25 | ||||
-rw-r--r-- | sunrpc/rpc/xdr.h | 107 |
13 files changed, 404 insertions, 169 deletions
diff --git a/ChangeLog b/ChangeLog index 504f399430..0073d08365 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,38 @@ +Fri Jul 26 15:24:25 1996 Ulrich Drepper <drepper@cygnus.com> + + * sunrpc/rpc/auth.h: Add protection against multiple inclusion + and change K&R prototypes to ANSI prototypes. + * sunrpc/rpc/auth_unix.h: Ditto. + * sunrpc/rpc/clnt.h: Ditto. + * sunrpc/rpc/pmap_clnt.h: Ditto. + * sunrpc/rpc/pmap_prot.h: Ditto. + * sunrpc/rpc/pmap_rmt.h: Ditto. + * sunrpc/rpc/rpc_msg.h: Ditto. + * sunrpc/rpc/svc.h: Ditto. + * sunrpc/rpc/svc_auth.h: Ditto. + * sunrpc/rpc/xdr.h: Ditto. + Fri Jul 26 20:39:42 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * ctype/test_ctype.c: Test EOF too. +Fri Jul 26 18:06:58 1996 Ulrich Drepper <drepper@cygnus.com> + + * sunrpc/rpc/auth.h: Add __BEGIN_DECLS and __END_DECLS. + * sunrpc/rpc/auth_unix.h: Likewise. + * sunrpc/rpc/clnt.h: Likewise. + * sunrpc/rpc/netdb.h: Likewise. + * sunrpc/rpc/pmap_clnt.h: Likewise. + * sunrpc/rpc/pmap_prot.h: Likewise. + * sunrpc/rpc/rpc_msg.h: Likewise. + * sunrpc/rpc/svc.h: Likewise. + * sunrpc/rpc/svc_auth.h: Likewise. + * sunrpc/rpc/xdr.h: Likewise. + + * sunrpc/rpc/pmap_clnt.h: Move definition of type `resultproc_t' + to here from... + * sunrpc/pmap_rmt.c: ...here. + Fri Jul 26 16:10:43 1996 Miles Bader <miles@gnu.ai.mit.edu> * login/pututline_r.c (pututline_r): Only call getutid_r if ID has a diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index 24ace162b2..a944f6ccb6 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -207,7 +207,6 @@ getbroadcastnets(addrs, sock, buf) return (i); } -typedef bool_t (*resultproc_t)(); enum clnt_stat clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h index 5f7c7f88b1..0e7e2a1e9e 100644 --- a/sunrpc/rpc/auth.h +++ b/sunrpc/rpc/auth.h @@ -6,23 +6,23 @@ * 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 @@ -38,6 +38,12 @@ * "sessions". */ +#ifndef _RPC_AUTH_H + +#define _RPC_AUTH_H 1 +#include <features.h> + +__BEGIN_DECLS #define MAX_AUTH_BYTES 400 #define MAXNETNAMELEN 255 /* maximum length of network user's name */ @@ -81,6 +87,10 @@ struct opaque_auth { u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ }; +#ifndef _RPC_AUTH_H + +#define _RPC_AUTH_H 1 +#include <features.h> /* * Auth handle, interface to client side authenticators. @@ -150,13 +160,19 @@ extern struct opaque_auth _null_auth; * int len; * int *aup_gids; */ -extern AUTH *authunix_create(); -extern AUTH *authunix_create_default(); /* takes no parameters */ -extern AUTH *authnone_create(); /* takes no parameters */ +extern AUTH *authunix_create __P ((char *__machname, int __uid, int __gid, + int __len, int *__aup_gids)); +extern AUTH *authunix_create_default __P ((void)); +extern AUTH *authnone_create __P ((void)); extern AUTH *authdes_create(); #define AUTH_NONE 0 /* no authentication */ #define AUTH_NULL 0 /* backward compatibility */ #define AUTH_UNIX 1 /* unix style (uid, gids) */ +#define AUTH_SYS 1 /* unix style (uid, gids) */ #define AUTH_SHORT 2 /* short hand unix style */ #define AUTH_DES 3 /* des style (encrypted timestamps) */ + +__END_DECLS + +#endif /* rpc/auth.h */ diff --git a/sunrpc/rpc/auth_unix.h b/sunrpc/rpc/auth_unix.h index 705741e139..19b891cc29 100644 --- a/sunrpc/rpc/auth_unix.h +++ b/sunrpc/rpc/auth_unix.h @@ -6,23 +6,23 @@ * 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 @@ -42,6 +42,19 @@ * for the credentials. */ +#ifndef _RPC_AUTH_UNIX_H + +#define _RPC_AUTH_UNIX_H 1 +#include <features.h> + +__BEGIN_DECLS + +#ifndef _RPC_AUTH_UNIX_H + +#define _RPC_AUTH_UNIX_H 1 +#include <features.h> + + /* The machine name is part of a credential; it may not exceed 255 bytes */ #define MAX_MACHINE_NAME 255 @@ -60,13 +73,18 @@ struct authunix_parms { int *aup_gids; }; -extern bool_t xdr_authunix_parms(); +extern bool_t xdr_authunix_parms __P ((XDR *__xdrs, + struct authunix_parms *__p)); -/* - * If a response verifier has flavor AUTH_SHORT, +/* + * If a response verifier has flavor AUTH_SHORT, * then the body of the response verifier encapsulates the following structure; * again it is serialized in the obvious fashion. */ struct short_hand_verf { struct opaque_auth new_cred; }; + +__END_DECLS + +#endif /* rpc/auth_unix.h */ diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h index 8c002a19fa..e9e67210c3 100644 --- a/sunrpc/rpc/clnt.h +++ b/sunrpc/rpc/clnt.h @@ -6,23 +6,23 @@ * 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 @@ -34,8 +34,12 @@ * Copyright (C) 1984, Sun Microsystems, Inc. */ -#ifndef _CLNT_ -#define _CLNT_ +#ifndef _RPC_CLNT_H + +#define _RPC_CLNT_H 1 +#include <features.h> + +__BEGIN_DECLS /* * Rpc calls return an enum clnt_stat. This should be looked at more, @@ -224,7 +228,7 @@ typedef struct { /* * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a + * implementations of client side rpc. They can return NULL if a * creation failure occurs. */ @@ -235,21 +239,20 @@ typedef struct { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create(); +extern CLIENT *clntraw_create __P ((u_long __prog, u_long __vers)); /* * Generic client creation routine. Supported protocols are "udp" and "tcp" + * CLIENT * + * clnt_create(host, prog, vers, prot) + * char *host; -- hostname + * u_int prog; -- program number + * u_int vers; -- version number + * char *prot; -- protocol */ -extern CLIENT * -clnt_create(/*host, prog, vers, prot*/); /* - char *host; -- hostname - u_long prog; -- program number - u_long vers; -- version number - char *prot; -- protocol -*/ - - +extern CLIENT *clnt_create __P ((char *__host, u_int __prog, u_int __vers, + char *__prot)); /* @@ -263,7 +266,10 @@ clnt_create(/*host, prog, vers, prot*/); /* * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clnttcp_create(); +extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, + u_long __prog, u_long __version, + int *__sockp, u_int __sendsz, + u_int __recvsz)); /* * UDP based rpc. @@ -286,27 +292,32 @@ extern CLIENT *clnttcp_create(); * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntudp_create(); -extern CLIENT *clntudp_bufcreate(); +extern CLIENT *clntudp_create __P ((struct sockaddr_in *__raddr, + u_long __program, u_long __version, + struct timeval __wait, int *__sockp)); +extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, + u_long __program, u_long __version, + struct timeval __wait, int *__sockp, + u_int __sendsz, u_int __recvsz)); /* * Print why creation failed */ -void clnt_pcreateerror(/* char *msg */); /* stderr */ -char *clnt_spcreateerror(/* char *msg */); /* string */ +void clnt_pcreateerror __P ((char *__msg)); /* stderr */ +char *clnt_spcreateerror __P ((char *__msg)); /* string */ /* * Like clnt_perror(), but is more verbose in its output - */ -void clnt_perrno(/* enum clnt_stat num */); /* stderr */ + */ +void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */ /* * Print an English error message, given the client error code */ -void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */ -char *clnt_sperror(/* CLIENT *clnt, char *msg */); /* string */ +void clnt_perror __P ((CLIENT *__clnt, char *__msg)); /* stderr */ +char *clnt_sperror __P ((CLIENT *__clnt, char *__msg)); /* string */ -/* +/* * If a creation fails, the following allows the user to figure out why. */ struct rpc_createerr { @@ -321,11 +332,13 @@ extern struct rpc_createerr rpc_createerr; /* * Copy error message to buffer. */ -char *clnt_sperrno(/* enum clnt_stat num */); /* string */ +char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */ #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ #define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ -#endif /*!_CLNT_*/ +__END_DECLS + +#endif /* rpc/clnt.h */ diff --git a/sunrpc/rpc/netdb.h b/sunrpc/rpc/netdb.h index 23413cf7ba..c4043b807d 100644 --- a/sunrpc/rpc/netdb.h +++ b/sunrpc/rpc/netdb.h @@ -6,11 +6,11 @@ * 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. @@ -18,11 +18,11 @@ * 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 @@ -34,8 +34,11 @@ In GNU this file is #include'd by <netdb.h>. */ #ifndef _RPC_NETDB_H -#define _RPC_NETDB_H -#include <sys/cdefs.h> + +#define _RPC_NETDB_H 1 +#include <features.h> + +__BEGIN_DECLS struct rpcent { char *r_name; /* name of server for this rpc program */ @@ -43,10 +46,21 @@ struct rpcent { int r_number; /* rpc program number */ }; -__BEGIN_DECLS -struct rpcent *getrpcbyname __P((const char *)); -struct rpcent *getrpcbynumber __P((int)); -struct rpcent *getrpcent __P((void)); -__END_DECLS +struct rpcent *getrpcbyname __P ((const char *__name)); +struct rpcent *getrpcbynumber __P ((int __number)); +struct rpcent *getrpcent __P ((void)); +#ifdef __USE_REENTRANT +struct rpcent *getrpcbyname_r __P ((const char *__name, + struct rpcent *__result, + char *__buffer, int __buflen)); +struct rpcent *getrpcbynumber_r __P ((int __number, + struct rpcent *__result, + char *__buffer, int __buflen)); +struct rpcent *getrpcent_r __P ((struct rpcent *__result, char *__buffer, + int __buflen)); #endif + +__END_DECLS + +#endif /* rpc/netdb.h */ diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h index d2ea2a88e9..95f0749f87 100644 --- a/sunrpc/rpc/pmap_clnt.h +++ b/sunrpc/rpc/pmap_clnt.h @@ -6,28 +6,33 @@ * 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 */ +#ifndef _RPC_PMAP_CLNT_H + +#define _RPC_PMAP_CLNT_H 1 +#include <features.h> + /* * pmap_clnt.h * Supplies C routines to get to portmap services. @@ -35,6 +40,15 @@ * Copyright (C) 1984, Sun Microsystems, Inc. */ +#ifndef _RPC_PMAP_CLNT_H + +#define _RPC_PMAP_CLNT_H 1 +#include <features.h> + +__BEGIN_DECLS + +typedef bool_t (*resultproc_t)(); + /* * Usage: * success = pmap_set(program, version, protocol, port); @@ -43,7 +57,7 @@ * head = pmap_getmaps(address); * clnt_stat = pmap_rmtcall(address, program, version, procedure, * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) + * (works for udp only.) * clnt_stat = clnt_broadcast(program, version, procedure, * xdrargs, argsp, xdrres, resp, eachresult) * (like pmap_rmtcall, except the call is broadcasted to all @@ -57,9 +71,31 @@ * address if the responder to the broadcast. */ -extern bool_t pmap_set(); -extern bool_t pmap_unset(); -extern struct pmaplist *pmap_getmaps(); -enum clnt_stat pmap_rmtcall(); -enum clnt_stat clnt_broadcast(); -extern u_short pmap_getport(); +extern bool_t pmap_set __P ((u_long __program, u_long __version, + int __protocol, u_short __port)); + +extern bool_t pmap_unset __P ((u_long __program, u_long __version)); + +extern struct pmaplist *pmap_getmaps __P ((struct sockaddr_in *__address)); + +extern enum clnt_stat pmap_rmtcall __P ((struct sockaddr_in *__addr, + u_long __prog, u_long __vers, + u_long __proc, xdrproc_t __xdrargs, + caddr_t __argsp, xdrproc_t __xdrres, + caddr_t __resp, struct timeval __tout, + u_long *__port_ptr)); + +extern enum clnt_stat clnt_broadcast __P ((u_long __prog, u_long __vers, + u_long __proc, xdrproc_t __xargs, + caddr_t __argsp, + xdrproc_t __xresults, + caddr_t __resultsp, + resultproc_t __eachresult)); + +extern u_short pmap_getport __P ((struct sockaddr_in *__address, + u_long __program, u_long __version, + u_int __protocol)); + +__END_DECLS + +#endif /* rpc/pmap_clnt.h */ diff --git a/sunrpc/rpc/pmap_prot.h b/sunrpc/rpc/pmap_prot.h index ccf7a77b41..227d1a0619 100644 --- a/sunrpc/rpc/pmap_prot.h +++ b/sunrpc/rpc/pmap_prot.h @@ -6,23 +6,23 @@ * 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 @@ -33,8 +33,18 @@ * Protocol for the local binder service, or pmap. * * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The following procedures are supported by the protocol: + */ + +#ifndef _RPC_PMAP_PROT_H + +#define _RPC_PMAP_PROT_H 1 +#include <features.h> + +#include <rpc/xdr.h> + +__BEGIN_DECLS + +/* The following procedures are supported by the protocol: * * PMAPPROC_NULL() returns () * takes nothing, returns nothing @@ -84,11 +94,15 @@ struct pmap { long unsigned pm_port; }; -extern bool_t xdr_pmap(); +extern bool_t xdr_pmap __P ((XDR *__xdrs, struct pmap *__regs)); struct pmaplist { struct pmap pml_map; struct pmaplist *pml_next; }; -extern bool_t xdr_pmaplist(); +extern bool_t xdr_pmaplist __P ((XDR *__xdrs, struct pmaplist **__rp)); + +__END_DECLS + +#endif /* rpc/pmap_prot.h */ diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h index ee68cebec2..15822ef642 100644 --- a/sunrpc/rpc/pmap_rmt.h +++ b/sunrpc/rpc/pmap_rmt.h @@ -6,23 +6,23 @@ * 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 @@ -35,13 +35,22 @@ * Copyright (C) 1986, Sun Microsystems, Inc. */ +#ifndef _RPC_PMAP_RMT_H + +#define _RPC_PMAP_RMT_H 1 +#include <features.h> + + struct rmtcallargs { u_long prog, vers, proc, arglen; caddr_t args_ptr; xdrproc_t xdr_args; }; -bool_t xdr_rmtcall_args(); +bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp)); + + +#endif /* rpc/pmap_rmt.h */ struct rmtcallres { u_long *port_ptr; @@ -50,4 +59,7 @@ struct rmtcallres { xdrproc_t xdr_results; }; -bool_t xdr_rmtcallres(); +bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp)); + + +#endif /* rpc/pmap_rmt.h */ diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h index b78872b6a8..533ec92068 100644 --- a/sunrpc/rpc/rpc_msg.h +++ b/sunrpc/rpc/rpc_msg.h @@ -6,23 +6,23 @@ * 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 @@ -36,9 +36,23 @@ * Copyright (C) 1984, Sun Microsystems, Inc. */ +#ifndef _RPC_RPC_MSG_H + +#define _RPC_RPC_MSG_H 1 +#include <features.h> + + +#ifndef _RPC_RPC_MSG_H + +#define _RPC_RPC_MSG_H 1 +#include <features.h> + + #define RPC_MSG_VERSION ((u_long) 2) #define RPC_SERVICE_PORT ((u_short) 2048) +__BEGIN_DECLS + /* * Bottom up definition of an rpc message. * NOTE: call and reply use the same overall stuct but @@ -160,7 +174,7 @@ struct rpc_msg { * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callmsg(); +extern bool_t xdr_callmsg __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); /* * XDR routine to pre-serialize the static part of a rpc message. @@ -168,7 +182,7 @@ extern bool_t xdr_callmsg(); * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callhdr(); +extern bool_t xdr_callhdr __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); /* * XDR routine to handle a rpc reply. @@ -176,7 +190,7 @@ extern bool_t xdr_callhdr(); * XDR *xdrs; * struct rpc_msg *rmsg; */ -extern bool_t xdr_replymsg(); +extern bool_t xdr_replymsg __P ((XDR *__xdrs, struct rpc_msg *__rmsg)); /* * Fills in the error part of a reply message. @@ -184,4 +198,12 @@ extern bool_t xdr_replymsg(); * struct rpc_msg *msg; * struct rpc_err *error; */ -extern void _seterr_reply(); +extern void _seterr_reply __P ((struct rpc_msg *__msg, + struct rpc_err *__error)); + +#endif /* rpc/rpc_msg.h */ + struct rpc_err *__error)); + +__END_DECLS + +#endif /* rpc/rpc_msg.h */ diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h index 4f4f546f11..081f9bc327 100644 --- a/sunrpc/rpc/svc.h +++ b/sunrpc/rpc/svc.h @@ -6,23 +6,23 @@ * 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 @@ -37,6 +37,8 @@ #ifndef __SVC_HEADER__ #define __SVC_HEADER__ +__BEGIN_DECLS + /* * This interface must manage two items concerning remote procedure calling: * @@ -151,9 +153,11 @@ struct svc_req { * u_long prog; * u_long vers; * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register + * int protocol; like TCP or UDP, zero means do not register */ -extern bool_t svc_register(); +extern bool_t svc_register __P ((SVCXPRT *__xprt, u_long __prog, + u_long __vers, void (*__dispatch) (), + int __protocol)); /* * Service un-registration @@ -162,7 +166,7 @@ extern bool_t svc_register(); * u_long prog; * u_long vers; */ -extern void svc_unregister(); +extern void svc_unregister __P ((u_long __prog, u_long __vers)); /* * Transport registration. @@ -170,7 +174,7 @@ extern void svc_unregister(); * xprt_register(xprt) * SVCXPRT *xprt; */ -extern void xprt_register(); +extern void xprt_register __P ((SVCXPRT *__xprt)); /* * Transport un-register @@ -178,7 +182,7 @@ extern void xprt_register(); * xprt_unregister(xprt) * SVCXPRT *xprt; */ -extern void xprt_unregister(); +extern void xprt_unregister __P ((SVCXPRT *__xprt)); @@ -186,7 +190,7 @@ extern void xprt_unregister(); /* * When the service routine is called, it must first check to see if it * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via + * and return. If so, it should deserialize its arguments via * SVC_GETARGS (defined above). If the deserialization does not work, * svcerr_decode should be called followed by a return. Successful * decoding of the arguments should be followed the execution of the @@ -197,7 +201,7 @@ extern void xprt_unregister(); * Note: do not confuse access-control failure with weak authentication! * * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. + * msg. This message is sent when svc_sendreply is called. * Therefore pure service implementations should always call * svc_sendreply even if the function logically returns void; use * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows @@ -209,15 +213,24 @@ extern void xprt_unregister(); * deadlock the caller and server processes! */ -extern bool_t svc_sendreply(); -extern void svcerr_decode(); -extern void svcerr_weakauth(); -extern void svcerr_noproc(); -extern void svcerr_progvers(); -extern void svcerr_auth(); -extern void svcerr_noprog(); -extern void svcerr_systemerr(); - +extern bool_t svc_sendreply __P ((SVCXPRT *xprt, xdrproc_t __xdr_results, + caddr_t __xdr_location)); + +extern void svcerr_decode __P ((SVCXPRT *__xprt)); + +extern void svcerr_weakauth __P ((SVCXPRT *__xprt)); + +extern void svcerr_noproc __P ((SVCXPRT *__xprt)); + +extern void svcerr_progvers __P ((SVCXPRT *__xprt, u_long __low_vers, + u_long __high_vers)); + +extern void svcerr_auth __P ((SVCXPRT *__xprt, enum auth_stat __why)); + +extern void svcerr_noprog __P ((SVCXPRT *__xprt)); + +extern void svcerr_systemerr __P ((SVCXPRT *__xprt)); + /* * Lowest level dispatching -OR- who owns this process anyway. * Somebody has to wait for incoming requests and then call the correct @@ -231,7 +244,7 @@ extern void svcerr_systemerr(); /* * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select + * dynamic; must be inspected before each call to select */ #ifdef FD_SETSIZE extern fd_set svc_fdset; @@ -246,9 +259,9 @@ extern int svc_fds; */ extern void rpctest_service(); -extern void svc_getreq(); -extern void svc_getreqset(); /* takes fdset instead of int */ -extern void svc_run(); /* never returns */ +extern void svc_getreq __P ((int __rdfds)); +extern void svc_getreqset __P ((fd_set *readfds)); +extern void svc_run __P ((void)) __attribute__ ((noreturn)); /* * Socket to use on svcxxx_create call to get default socket @@ -262,19 +275,22 @@ extern void svc_run(); /* never returns */ /* * Memory based rpc for testing and timing. */ -extern SVCXPRT *svcraw_create(); +extern SVCXPRT *svcraw_create __P ((void)); /* * Udp based rpc. */ -extern SVCXPRT *svcudp_create(); -extern SVCXPRT *svcudp_bufcreate(); +extern SVCXPRT *svcudp_create __P ((int __sock)); +extern SVCXPRT *svcudp_bufcreate __P ((int __sock, u_int __sendsz, + u_int __recvsz)); /* * Tcp based rpc. */ -extern SVCXPRT *svctcp_create(); +extern SVCXPRT *svctcp_create __P ((int __sock, u_int __sendsize, + u_int __recvsize)); +__END_DECLS -#endif !__SVC_HEADER__ +#endif /* !__SVC_HEADER__ */ diff --git a/sunrpc/rpc/svc_auth.h b/sunrpc/rpc/svc_auth.h index a36a01aba8..543ddb974d 100644 --- a/sunrpc/rpc/svc_auth.h +++ b/sunrpc/rpc/svc_auth.h @@ -6,23 +6,23 @@ * 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 @@ -31,12 +31,23 @@ /* * svc_auth.h, Service side of rpc authentication. - * + * * Copyright (C) 1984, Sun Microsystems, Inc. */ +#ifndef _RPC_SVC_AUTH_H + +#define _RPC_SVC_AUTH_H 1 +#include <features.h> + +__BEGIN_DECLS /* * Server side authenticator */ -extern enum auth_stat _authenticate(); +extern enum auth_stat _authenticate __P ((struct svc_req *__rqst, + struct rpc_msg *__msg)); + +__END_DECLS + +#endif /* rpc/svc_auth.h */ diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h index 0d9b5df7a2..9336279e46 100644 --- a/sunrpc/rpc/xdr.h +++ b/sunrpc/rpc/xdr.h @@ -6,23 +6,23 @@ * 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 @@ -36,7 +36,14 @@ */ #ifndef __XDR_HEADER__ + #define __XDR_HEADER__ +#include <features.h> + +/* We need FILE. */ +#include <stdio.h> + +__BEGIN_DECLS /* * XDR provides a conventional way for converting between C data @@ -221,50 +228,76 @@ struct xdr_discrim { /* * These are the "generic" xdr routines. */ -extern bool_t xdr_void(); -extern bool_t xdr_int(); -extern bool_t xdr_u_int(); -extern bool_t xdr_long(); -extern bool_t xdr_u_long(); -extern bool_t xdr_short(); -extern bool_t xdr_u_short(); -extern bool_t xdr_bool(); -extern bool_t xdr_enum(); -extern bool_t xdr_array(); -extern bool_t xdr_bytes(); -extern bool_t xdr_opaque(); -extern bool_t xdr_string(); -extern bool_t xdr_union(); -extern bool_t xdr_char(); -extern bool_t xdr_u_char(); -extern bool_t xdr_vector(); -extern bool_t xdr_float(); -extern bool_t xdr_double(); -extern bool_t xdr_reference(); -extern bool_t xdr_pointer(); -extern bool_t xdr_wrapstring(); +extern bool_t xdr_void (); +extern bool_t xdr_int __P ((XDR *__xdrs, int *__ip)); +extern bool_t xdr_u_int __P ((XDR *__xdrs, u_int *__up)); +extern bool_t xdr_long __P ((XDR *__xdrs, long *__lp)); +extern bool_t xdr_u_long __P ((XDR *__xdrs, u_long *__ulp)); +extern bool_t xdr_short __P ((XDR *__xdrs, short *__sp)); +extern bool_t xdr_u_short __P ((XDR *__xdrs, u_short *__usp)); +extern bool_t xdr_bool __P ((XDR *__xdrs, bool_t *__bp)); +extern bool_t xdr_enum __P ((XDR *__xdrs, enum_t *__ep)); +extern bool_t xdr_array __P ((XDR *_xdrs, caddr_t *__addrp, u_int *__sizep, + u_int __maxsize, u_int __elsize, + xdrproc_t __elproc)); +extern bool_t xdr_bytes __P ((XDR *__xdrs, char **__cpp, u_int *__sizep, + u_int __maxsize)); +extern bool_t xdr_opaque __P ((XDR *__xdrs, caddr_t __cp, u_int __cnt)); +extern bool_t xdr_string __P ((XDR *__xdrs, char **__cpp, u_int __maxsize)); +extern bool_t xdr_union __P ((XDR *__xdrs, enum_t *__dscmp, char *__unp, + struct xdr_discrim *__choices, + xdrproc_t dfault)); +extern bool_t xdr_char __P ((XDR *__xdrs, char *__cp)); +extern bool_t xdr_u_char __P ((XDR *__xdrs, u_char *__cp)); +extern bool_t xdr_vector __P ((XDR *__xdrs, char *__basep, u_int __nelem, + u_int __elemsize, xdrproc_t __xdr_elem)); +extern bool_t xdr_float __P ((XDR *__xdrs, float *__fp)); +extern bool_t xdr_double __P ((XDR *__xdrs, double *__dp)); +extern bool_t xdr_reference __P ((XDR *__xdrs, caddr_t *__pp, u_int __size, + xdrproc_t __proc)); +extern bool_t xdr_pointer __P ((XDR *__xdrs, char **__objpp, + u_int __obj_size, xdrproc_t __xdr_obj)); +extern bool_t xdr_wrapstring __P ((XDR *__xdrs, char **__cpp)); /* * Common opaque bytes objects used by many rpc protocols; * declared here due to commonality. */ -#define MAX_NETOBJ_SZ 1024 +#define MAX_NETOBJ_SZ 1024 struct netobj { u_int n_len; char *n_bytes; }; typedef struct netobj netobj; -extern bool_t xdr_netobj(); +extern bool_t xdr_netobj __P ((XDR *__xdrs, struct netobj *__np)); /* * These are the public routines for the various implementations of * xdr streams. */ -extern void xdrmem_create(); /* XDR using memory buffers */ -extern void xdrstdio_create(); /* XDR using stdio library */ -extern void xdrrec_create(); /* XDR pseudo records for tcp */ -extern bool_t xdrrec_endofrecord(); /* make end of xdr record */ -extern bool_t xdrrec_skiprecord(); /* move to beginning of next record */ -extern bool_t xdrrec_eof(); /* true if no more input */ - -#endif !__XDR_HEADER__ + +/* XDR using memory buffers */ +extern void xdrmem_create __P ((XDR *__xdrs, caddr_t __addr, u_int __size, + enum xdr_op __op)); + +/* XDR using stdio library */ +extern void xdrstdio_create __P ((XDR *__xdrs, FILE *__file, + enum xdr_op __op)); + +/* XDR pseudo records for tcp */ +extern void xdrrec_create __P ((XDR *__xdrs, u_int __sendsize, + u_int __recvsize, caddr_t __tcp_handle, + int (*__readit) (), int (*__writeit) ())); + +/* make end of xdr record */ +extern bool_t xdrrec_endofrecord __P ((XDR *__xdrs, bool_t __sendnow)); + +/* move to beginning of next record */ +extern bool_t xdrrec_skiprecord __P ((XDR *__xdrs)); + +/* true if no more input */ +extern bool_t xdrrec_eof __P ((XDR *__xdrs)); + +__END_DECLS + +#endif /* !__XDR_HEADER__ */ |