diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1999-10-09 21:56:43 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1999-10-09 21:56:43 +0000 |
| commit | c1422e5b7cdb4400f934c91bcefa3a1a96d789fb (patch) | |
| tree | 7f8981b86c4ce4b5bb899f690eeb03d6645826a5 /sunrpc/rpc | |
| parent | a4a1492eb94de4f5c5ec84a5898e994fca5f317b (diff) | |
| download | glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.tar.xz glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.zip | |
Update.
Patch by khendricks@ivey.uwo.ca [libc/1382].
Diffstat (limited to 'sunrpc/rpc')
| -rw-r--r-- | sunrpc/rpc/auth.h | 61 | ||||
| -rw-r--r-- | sunrpc/rpc/auth_des.h | 17 | ||||
| -rw-r--r-- | sunrpc/rpc/auth_unix.h | 4 | ||||
| -rw-r--r-- | sunrpc/rpc/clnt.h | 82 | ||||
| -rw-r--r-- | sunrpc/rpc/des_crypt.h | 24 | ||||
| -rw-r--r-- | sunrpc/rpc/netdb.h | 26 | ||||
| -rw-r--r-- | sunrpc/rpc/pmap_clnt.h | 50 | ||||
| -rw-r--r-- | sunrpc/rpc/pmap_prot.h | 4 | ||||
| -rw-r--r-- | sunrpc/rpc/pmap_rmt.h | 5 | ||||
| -rw-r--r-- | sunrpc/rpc/rpc_msg.h | 10 | ||||
| -rw-r--r-- | sunrpc/rpc/svc.h | 78 | ||||
| -rw-r--r-- | sunrpc/rpc/svc_auth.h | 4 | ||||
| -rw-r--r-- | sunrpc/rpc/xdr.h | 136 |
13 files changed, 246 insertions, 255 deletions
diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h index e0e1e5f673..6612957667 100644 --- a/sunrpc/rpc/auth.h +++ b/sunrpc/rpc/auth.h @@ -77,7 +77,7 @@ union des_block { char c[8]; }; typedef union des_block des_block; -extern bool_t xdr_des_block __P ((XDR *__xdrs, des_block *__blkp)); +extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; /* * Authentication info. Opaque to client. @@ -97,12 +97,12 @@ struct AUTH { struct opaque_auth ah_verf; union des_block ah_key; struct auth_ops { - void (*ah_nextverf) __PMT ((AUTH *)); - int (*ah_marshal) __PMT ((AUTH *, XDR *)); /* nextverf & serialize */ - int (*ah_validate) __PMT ((AUTH *, struct opaque_auth *)); + void (*ah_nextverf) (AUTH *); + int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ + int (*ah_validate) (AUTH *, struct opaque_auth *); /* validate verifier */ - int (*ah_refresh) __PMT ((AUTH *)); /* refresh credentials */ - void (*ah_destroy) __PMT ((AUTH *)); /* destroy this structure */ + int (*ah_refresh) (AUTH *); /* refresh credentials */ + void (*ah_destroy) (AUTH *); /* destroy this structure */ } *ah_ops; caddr_t ah_private; }; @@ -158,16 +158,15 @@ extern struct opaque_auth _null_auth; * int len; * int *aup_gids; */ -extern AUTH *authunix_create __P ((char *__machname, __uid_t __uid, - __gid_t __gid, int __len, - __gid_t *__aup_gids)); -extern AUTH *authunix_create_default __P ((void)); -extern AUTH *authnone_create __P ((void)); -extern AUTH *authdes_create __P ((const char *__servername, u_int __window, - struct sockaddr *__syncaddr, - des_block *__ckey)); -extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, - struct sockaddr *, des_block *)); +extern AUTH *authunix_create (char *__machname, __uid_t __uid, __gid_t __gid, + int __len, __gid_t *__aup_gids) __THROW; +extern AUTH *authunix_create_default (void) __THROW; +extern AUTH *authnone_create (void) __THROW; +extern AUTH *authdes_create (const char *__servername, u_int __window, + struct sockaddr *__syncaddr, des_block *__ckey) + __THROW; +extern AUTH *authdes_pk_create (const char *, netobj *, u_int, + struct sockaddr *, des_block *) __THROW; #define AUTH_NONE 0 /* no authentication */ @@ -183,31 +182,31 @@ extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, * Netname manipulating functions * */ -extern int getnetname __P ((char *)); -extern int host2netname __P ((char *, __const char *, __const char *)); -extern int user2netname __P ((char *, __const uid_t, __const char *)); -extern int netname2user __P ((__const char *, uid_t *, gid_t *, int *, - gid_t *)); -extern int netname2host __P ((__const char *, char *, __const int)); +extern int getnetname (char *) __THROW; +extern int host2netname (char *, __const char *, __const char *) __THROW; +extern int user2netname (char *, __const uid_t, __const char *) __THROW; +extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *) + __THROW; +extern int netname2host (__const char *, char *, __const int) __THROW; /* * * These routines interface to the keyserv daemon * */ -extern int key_decryptsession __P ((char *, des_block *)); -extern int key_decryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_encryptsession __P ((char *, des_block *)); -extern int key_encryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_gendes __P ((des_block *)); -extern int key_setsecret __P ((char *)); -extern int key_secretkey_is_set __P ((void)); -extern int key_get_conv __P ((char *, des_block *)); +extern int key_decryptsession (char *, des_block *) __THROW; +extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_encryptsession (char *, des_block *) __THROW; +extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_gendes (des_block *) __THROW; +extern int key_setsecret (char *) __THROW; +extern int key_secretkey_is_set (void) __THROW; +extern int key_get_conv (char *, des_block *) __THROW; /* * XDR an opaque authentication struct. */ -extern bool_t xdr_opaque_auth __P ((XDR *, struct opaque_auth *)); +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_des.h b/sunrpc/rpc/auth_des.h index b94bafb67b..198b299e72 100644 --- a/sunrpc/rpc/auth_des.h +++ b/sunrpc/rpc/auth_des.h @@ -86,26 +86,25 @@ struct authdes_verf #define adv_nickname adv_int_u /* Map a des credential into a unix cred. */ -extern int authdes_getucred __P ((__const struct authdes_cred * __adc, - uid_t * __uid, gid_t * __gid, - short *__grouplen, gid_t * __groups)); +extern int authdes_getucred (__const struct authdes_cred * __adc, + uid_t * __uid, gid_t * __gid, + short *__grouplen, gid_t * __groups) __THROW; /* Get the public key for NAME and place it in KEY. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey __P ((__const char *__name, char *__key)); +extern int getpublickey (__const char *__name, char *__key) __THROW; /* Get the secret key for NAME and place it in KEY. PASSWD is used to decrypt the encrypted key stored in the database. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getsecretkey __P ((__const char *__name, char *__key, - __const char *__passwd)); +extern int getsecretkey (__const char *__name, char *__key, + __const char *__passwd) __THROW; -extern int rtime __P ((struct sockaddr_in *__addrp, - struct rpc_timeval *__timep, - struct rpc_timeval *__timeout)); +extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, + struct rpc_timeval *__timeout) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_unix.h b/sunrpc/rpc/auth_unix.h index ed3b9322cb..424661d9ce 100644 --- a/sunrpc/rpc/auth_unix.h +++ b/sunrpc/rpc/auth_unix.h @@ -72,8 +72,8 @@ struct authunix_parms __gid_t *aup_gids; }; -extern bool_t xdr_authunix_parms __P ((XDR *__xdrs, - struct authunix_parms *__p)); +extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) + __THROW; /* * If a response verifier has flavor AUTH_SHORT, diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h index b3852927a3..47bd0b5d78 100644 --- a/sunrpc/rpc/clnt.h +++ b/sunrpc/rpc/clnt.h @@ -133,17 +133,16 @@ typedef struct CLIENT CLIENT; struct CLIENT { AUTH *cl_auth; /* authenticator */ struct clnt_ops { - enum clnt_stat (*cl_call) __PMT ((CLIENT *, u_long, xdrproc_t, - caddr_t, xdrproc_t, - caddr_t, struct timeval)); + enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, + caddr_t, struct timeval); /* call remote procedure */ - void (*cl_abort) __PMT ((void)); /* abort a call */ - void (*cl_geterr) __PMT ((CLIENT *, struct rpc_err *)); + void (*cl_abort) (void); /* abort a call */ + void (*cl_geterr) (CLIENT *, struct rpc_err *); /* get specific error code */ - bool_t (*cl_freeres) __PMT ((CLIENT *, xdrproc_t, caddr_t)); + bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t); /* frees results */ - void (*cl_destroy) __PMT ((CLIENT *)); /* destroy this structure */ - bool_t (*cl_control) __PMT ((CLIENT *, int, char *)); + void (*cl_destroy) (CLIENT *); /* destroy this structure */ + bool_t (*cl_control) (CLIENT *, int, char *); /* the ioctl() of rpc */ } *cl_ops; caddr_t cl_private; /* private stuff */ @@ -278,8 +277,8 @@ struct CLIENT { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create __P ((__const u_long __prog, - __const u_long __vers)); +extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) + __THROW; /* @@ -292,8 +291,9 @@ extern CLIENT *clntraw_create __P ((__const u_long __prog, * u_ong vers; -- version number * char *prot; -- protocol */ -extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, - __const u_long __vers, __const char *__prot)); +extern CLIENT *clnt_create (__const char *__host, __const u_long __prog, + __const u_long __vers, __const char *__prot) + __THROW; /* @@ -307,10 +307,9 @@ extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, - u_long __prog, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, u_long __prog, + u_long __version, int *__sockp, u_int __sendsz, + u_int __recvsz) __THROW; /* * UDP based rpc. @@ -333,15 +332,13 @@ extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntudp_create __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp)); -extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program, + u_long __version, struct timeval __wait_resend, + int *__sockp) __THROW; +extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, + u_long __program, u_long __version, + struct timeval __wait_resend, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; /* @@ -355,35 +352,34 @@ extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntunix_create __P ((struct sockaddr_un *__raddr, - u_long __program, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, u_long __program, + u_long __version, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; -extern int callrpc __P ((__const char *__host, __const u_long __prognum, - __const u_long __versnum, __const u_long __procnum, - __const xdrproc_t __inproc, __const char *__in, - __const xdrproc_t __outproc, char *__out)); -extern int _rpc_dtablesize __P ((void)); +extern int callrpc (__const char *__host, __const u_long __prognum, + __const u_long __versnum, __const u_long __procnum, + __const xdrproc_t __inproc, __const char *__in, + __const xdrproc_t __outproc, char *__out) __THROW; +extern int _rpc_dtablesize (void) __THROW; /* * Print why creation failed */ -extern void clnt_pcreateerror __P ((__const char *__msg)); /* stderr */ -extern char *clnt_spcreateerror __P ((__const char *__msg)); /* string */ +extern void clnt_pcreateerror (__const char *__msg) __THROW; /* stderr */ +extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */ /* * Like clnt_perror(), but is more verbose in its output */ -extern void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */ +extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ /* * Print an English error message, given the client error code */ -extern void clnt_perror __P ((CLIENT *__clnt, __const char *__msg)); +extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW; /* stderr */ -extern char *clnt_sperror __P ((CLIENT *__clnt, __const char *__msg)); +extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW; /* string */ /* @@ -401,19 +397,19 @@ extern struct rpc_createerr rpc_createerr; /* * Copy error message to buffer. */ -extern char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */ +extern char *clnt_sperrno (enum clnt_stat __num) __THROW; /* string */ /* * get the port number on the host for the rpc program,version and proto */ -extern int getrpcport __P ((__const char * __host, u_long __prognum, - u_long __versnum, u_int proto)); +extern int getrpcport (__const char * __host, u_long __prognum, + u_long __versnum, u_int proto) __THROW; /* * get the local host's IP address without consulting * name service library functions */ -extern void get_myaddress __P ((struct sockaddr_in *)); +extern void get_myaddress (struct sockaddr_in *) __THROW; #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ #define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ diff --git a/sunrpc/rpc/des_crypt.h b/sunrpc/rpc/des_crypt.h index e20cc38243..6a65887d3b 100644 --- a/sunrpc/rpc/des_crypt.h +++ b/sunrpc/rpc/des_crypt.h @@ -11,23 +11,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 @@ -47,7 +47,7 @@ __BEGIN_DECLS #define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ +#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ #define DES_SW (1*DES_DEVMASK) /* Use software device */ @@ -77,20 +77,20 @@ __BEGIN_DECLS /* * Cipher Block Chaining mode */ -extern int cbc_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode, char *__ivec)); +extern int cbc_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode, char *__ivec) __THROW; /* * Electronic Code Book mode */ -extern int ecb_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode)); +extern int ecb_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode) __THROW; -/* +/* * Set des parity for a key. * DES parity is odd and in the low bit of each byte */ -extern void des_setparity __P ((char *__key)); +extern void des_setparity (char *__key) __THROW; __END_DECLS diff --git a/sunrpc/rpc/netdb.h b/sunrpc/rpc/netdb.h index 6b820c84d0..539d8c3263 100644 --- a/sunrpc/rpc/netdb.h +++ b/sunrpc/rpc/netdb.h @@ -50,23 +50,23 @@ struct rpcent int r_number; /* RPC program number. */ }; -extern void setrpcent __P ((int _stayopen)); -extern void endrpcent __P ((void)); -extern struct rpcent *getrpcbyname __P ((__const char *__name)); -extern struct rpcent *getrpcbynumber __P ((int __number)); -extern struct rpcent *getrpcent __P ((void)); +extern void setrpcent (int __stayopen) __THROW; +extern void endrpcent (void) __THROW; +extern struct rpcent *getrpcbyname (__const char *__name) __THROW; +extern struct rpcent *getrpcbynumber (int __number) __THROW; +extern struct rpcent *getrpcent (void) __THROW; #ifdef __USE_MISC -extern int getrpcbyname_r __P ((__const char *__name, - struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcbynumber_r __P ((int __number, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result)); +extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcent_r __P ((struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, + size_t __buflen, struct rpcent **__result) __THROW; #endif __END_DECLS diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h index d9800d4006..1b1c452915 100644 --- a/sunrpc/rpc/pmap_clnt.h +++ b/sunrpc/rpc/pmap_clnt.h @@ -45,8 +45,7 @@ __BEGIN_DECLS -typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, - struct sockaddr_in *raddr)); +typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr); /* * Usage: @@ -70,30 +69,29 @@ typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, * address if the responder to the broadcast. */ -extern bool_t pmap_set __P ((__const u_long __program, __const u_long __vers, - int __protocol, u_short __port)); -extern bool_t pmap_unset __P ((__const u_long __program, __const u_long __vers)); -extern struct pmaplist *pmap_getmaps __P ((struct sockaddr_in *__address)); -extern enum clnt_stat pmap_rmtcall __P ((struct sockaddr_in *__addr, - __const u_long __prog, - __const u_long __vers, - __const 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 ((__const u_long __prog, - __const u_long __vers, - __const 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, - __const u_long __program, - __const u_long __version, - u_int __protocol)); +extern bool_t pmap_set (__const u_long __program, __const u_long __vers, + int __protocol, u_short __port) __THROW; +extern bool_t pmap_unset (__const u_long __program, __const u_long __vers) + __THROW; +extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; +extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, + __const u_long __prog, + __const u_long __vers, + __const u_long __proc, + xdrproc_t __xdrargs, + caddr_t __argsp, xdrproc_t __xdrres, + caddr_t __resp, struct timeval __tout, + u_long *__port_ptr) __THROW; +extern enum clnt_stat clnt_broadcast (__const u_long __prog, + __const u_long __vers, + __const u_long __proc, xdrproc_t __xargs, + caddr_t __argsp, xdrproc_t __xresults, + caddr_t __resultsp, + resultproc_t __eachresult) __THROW; +extern u_short pmap_getport (struct sockaddr_in *__address, + __const u_long __program, + __const u_long __version, u_int __protocol) + __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_prot.h b/sunrpc/rpc/pmap_prot.h index 52185d319a..cd64e36de5 100644 --- a/sunrpc/rpc/pmap_prot.h +++ b/sunrpc/rpc/pmap_prot.h @@ -94,14 +94,14 @@ struct pmap { long unsigned pm_port; }; -extern bool_t xdr_pmap __P ((XDR *__xdrs, struct pmap *__regs)); +extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; struct pmaplist { struct pmap pml_map; struct pmaplist *pml_next; }; -extern bool_t xdr_pmaplist __P ((XDR *__xdrs, struct pmaplist **__rp)); +extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h index bb35ad63e1..7a38b5f5f7 100644 --- a/sunrpc/rpc/pmap_rmt.h +++ b/sunrpc/rpc/pmap_rmt.h @@ -51,7 +51,8 @@ struct rmtcallargs { xdrproc_t xdr_args; }; -extern bool_t xdr_rmtcall_args __P ((XDR *__xdrs, struct rmtcallargs *__crp)); +extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) + __THROW; |
