Merge in changes from NetBSD's rpc library.
authorJ.T. Conklin <jtc@FreeBSD.org>
Tue, 14 Sep 1993 17:29:25 +0000 (17:29 +0000)
committerJ.T. Conklin <jtc@FreeBSD.org>
Tue, 14 Sep 1993 17:29:25 +0000 (17:29 +0000)
50 files changed:
lib/librpc/rpc/auth.h
lib/librpc/rpc/auth_none.c
lib/librpc/rpc/auth_unix.c
lib/librpc/rpc/auth_unix.h
lib/librpc/rpc/authunix_prot.c
lib/librpc/rpc/bindresvport.c
lib/librpc/rpc/clnt.h
lib/librpc/rpc/clnt_generic.c
lib/librpc/rpc/clnt_perror.c
lib/librpc/rpc/clnt_raw.c
lib/librpc/rpc/clnt_simple.c
lib/librpc/rpc/clnt_tcp.c
lib/librpc/rpc/clnt_udp.c
lib/librpc/rpc/get_myaddress.c
lib/librpc/rpc/getrpcent.c
lib/librpc/rpc/getrpcport.c
lib/librpc/rpc/pmap_clnt.c
lib/librpc/rpc/pmap_clnt.h
lib/librpc/rpc/pmap_getmaps.c
lib/librpc/rpc/pmap_getport.c
lib/librpc/rpc/pmap_prot.c
lib/librpc/rpc/pmap_prot.h
lib/librpc/rpc/pmap_prot2.c
lib/librpc/rpc/pmap_rmt.c
lib/librpc/rpc/pmap_rmt.h
lib/librpc/rpc/rpc.h
lib/librpc/rpc/rpc_callmsg.c
lib/librpc/rpc/rpc_commondata.c
lib/librpc/rpc/rpc_dtablesize.c
lib/librpc/rpc/rpc_msg.h
lib/librpc/rpc/rpc_prot.c
lib/librpc/rpc/svc.c
lib/librpc/rpc/svc.h
lib/librpc/rpc/svc_auth.c
lib/librpc/rpc/svc_auth.h
lib/librpc/rpc/svc_auth_unix.c
lib/librpc/rpc/svc_raw.c
lib/librpc/rpc/svc_run.c
lib/librpc/rpc/svc_simple.c
lib/librpc/rpc/svc_tcp.c
lib/librpc/rpc/svc_udp.c
lib/librpc/rpc/types.h
lib/librpc/rpc/xdr.c
lib/librpc/rpc/xdr.h
lib/librpc/rpc/xdr_array.c
lib/librpc/rpc/xdr_float.c
lib/librpc/rpc/xdr_mem.c
lib/librpc/rpc/xdr_rec.c
lib/librpc/rpc/xdr_reference.c
lib/librpc/rpc/xdr_stdio.c

index c94505d..e9131c4 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)auth.h  2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)auth.h 1.17 88/02/08 SMI
+ *     from: @(#)auth.h        2.3 88/08/07 4.0 RPCSRC
+ *     $Id: auth.h,v 1.3 1993/08/01 18:46:00 mycroft Exp $
  */
 
 /*
  */
 
 /*
@@ -38,6 +41,9 @@
  * "sessions".
  */
 
  * "sessions".
  */
 
+#ifndef _RPC_AUTH_H
+#define _RPC_AUTH_H
+#include <sys/cdefs.h>
 
 #define MAX_AUTH_BYTES 400
 #define MAXNETNAMELEN  255     /* maximum length of network user's name */
 
 #define MAX_AUTH_BYTES 400
 #define MAXNETNAMELEN  255     /* maximum length of network user's name */
@@ -74,7 +80,9 @@ union des_block {
        char c[8];
 };
 typedef union des_block des_block;
        char c[8];
 };
 typedef union des_block des_block;
-extern bool_t xdr_des_block();
+__BEGIN_DECLS
+extern bool_t xdr_des_block __P((XDR *, des_block *));
+__END_DECLS
 
 /*
  * Authentication info.  Opaque to client.
 
 /*
  * Authentication info.  Opaque to client.
@@ -154,13 +162,17 @@ extern struct opaque_auth _null_auth;
  *     int len;
  *     int *aup_gids;
  */
  *     int len;
  *     int *aup_gids;
  */
-extern AUTH *authunix_create();
-extern AUTH *authunix_create_default();        /* takes no parameters */
-extern AUTH *authnone_create();                /* takes no parameters */
+__BEGIN_DECLS
+extern AUTH *authunix_create           __P((char *, int, int, int, int *));
+extern AUTH *authunix_create_default   __P((void));
+extern AUTH *authnone_create           __P((void));
 extern AUTH *authdes_create();
 extern AUTH *authdes_create();
+__END_DECLS
 
 #define AUTH_NONE      0               /* no authentication */
 #define        AUTH_NULL       0               /* backward compatibility */
 #define        AUTH_UNIX       1               /* unix style (uid, gids) */
 #define        AUTH_SHORT      2               /* short hand unix style */
 #define AUTH_DES       3               /* des style (encrypted timestamps) */
 
 #define AUTH_NONE      0               /* no authentication */
 #define        AUTH_NULL       0               /* backward compatibility */
 #define        AUTH_UNIX       1               /* unix style (uid, gids) */
 #define        AUTH_SHORT      2               /* short hand unix style */
 #define AUTH_DES       3               /* des style (encrypted timestamps) */
+
+#endif /* !_RPC_AUTH_H */
index 630037f..b07bec5 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)auth_none.c     2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: auth_none.c,v 1.3 1993/08/26 00:53:10 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 87ff2b6..59156b7 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)auth_unix.c     2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: auth_unix.c,v 1.4 1993/08/26 00:53:11 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -44,6 +46,7 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
index 705741e..ed15ed8 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)auth_unix.h     2.2 88/07/29 4.0 RPCSRC; from 1.8 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)auth_unix.h 1.8 88/02/08 SMI
+ *     from: @(#)auth_unix.h   2.2 88/07/29 4.0 RPCSRC
+ *     $Id: auth_unix.h,v 1.3 1993/08/01 18:46:00 mycroft Exp $
  */
  */
-/*      @(#)auth_unix.h 1.5 86/07/16 SMI      */
 
 /*
  * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
 
 /*
  * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
  * for the credentials.
  */
 
  * for the credentials.
  */
 
+#ifndef _RPC_AUTH_UNIX_H
+#define _RPC_AUTH_UNIX_H
+#include <sys/cdefs.h>
+
 /* The machine name is part of a credential; it may not exceed 255 bytes */
 #define MAX_MACHINE_NAME 255
 
 /* The machine name is part of a credential; it may not exceed 255 bytes */
 #define MAX_MACHINE_NAME 255
 
@@ -60,7 +66,9 @@ struct authunix_parms {
        int     *aup_gids;
 };
 
        int     *aup_gids;
 };
 
-extern bool_t xdr_authunix_parms();
+__BEGIN_DECLS
+extern bool_t xdr_authunix_parms __P((XDR *, struct authunix_parms *));
+__END_DECLS
 
 /* 
  * If a response verifier has flavor AUTH_SHORT, 
 
 /* 
  * If a response verifier has flavor AUTH_SHORT, 
@@ -70,3 +78,5 @@ extern bool_t xdr_authunix_parms();
 struct short_hand_verf {
        struct opaque_auth new_cred;
 };
 struct short_hand_verf {
        struct opaque_auth new_cred;
 };
+
+#endif /* !_RPC_AUTH_UNIX_H */
index a60d99a..d25d6b1 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)authunix_prot.c 2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)authunix_prot.c     2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: authunix_prot.c,v 1.3 1993/08/26 00:53:13 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 63a68d3..f3093a8 100644 (file)
@@ -1,4 +1,3 @@
-static  char sccsid[] = "@(#)bindresvport.c    2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 SMI";
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * 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,6 +27,12 @@ static  char sccsid[] = "@(#)bindresvport.c  2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08
  * Mountain View, California  94043
  */
 
  * Mountain View, California  94043
  */
 
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)bindresvport.c 1.8 88/02/08 SMI";*/
+/*static char *sccsid = "from: @(#)bindresvport.c      2.2 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: bindresvport.c,v 1.3 1993/08/26 00:53:14 jtc Exp $";
+#endif
+
 /*
  * Copyright (c) 1987 by Sun Microsystems, Inc.
  */
 /*
  * Copyright (c) 1987 by Sun Microsystems, Inc.
  */
index 8c002a1..fef717c 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt.h  2.1 88/07/29 4.0 RPCSRC; from 1.31 88/02/08 SMI*/
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)clnt.h 1.31 88/02/08 SMI
+ *     from: @(#)clnt.h        2.1 88/07/29 4.0 RPCSRC
+ *     $Id: clnt.h,v 1.3 1993/08/01 18:45:58 mycroft Exp $
  */
 
 /*
  */
 
 /*
@@ -34,8 +37,9 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
-#ifndef _CLNT_
-#define _CLNT_
+#ifndef _RPC_CLNT_H_
+#define _RPC_CLNT_H_
+#include <sys/cdefs.h>
 
 /*
  * Rpc calls return an enum clnt_stat.  This should be looked at more,
 
 /*
  * Rpc calls return an enum clnt_stat.  This should be looked at more,
@@ -235,21 +239,23 @@ typedef struct {
  *     u_long prog;
  *     u_long vers;
  */
  *     u_long prog;
  *     u_long vers;
  */
-extern CLIENT *clntraw_create();
+__BEGIN_DECLS
+extern CLIENT *clntraw_create  __P((u_long, u_long));
+__END_DECLS
 
 
 /*
  * Generic client creation routine. Supported protocols are "udp" and "tcp"
 
 
 /*
  * Generic client creation routine. Supported protocols are "udp" and "tcp"
+ * 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(/*host, prog, vers, prot*/); /*
-       char *host;     -- hostname
-       u_long prog;    -- program number
-       u_long vers;    -- version number
-       char *prot;     -- protocol
-*/
-
-
+__BEGIN_DECLS
+extern CLIENT *clnt_create     __P((char *, u_long, u_long, char *));
+__END_DECLS
 
 
 /*
 
 
 /*
@@ -263,7 +269,15 @@ clnt_create(/*host, prog, vers, prot*/); /*
  *     u_int sendsz;
  *     u_int recvsz;
  */
  *     u_int sendsz;
  *     u_int recvsz;
  */
-extern CLIENT *clnttcp_create();
+__BEGIN_DECLS
+extern CLIENT *clnttcp_create  __P((struct sockaddr_in *,
+                                    u_long,
+                                    u_long,
+                                    int *,
+                                    u_int,
+                                    u_int));
+__END_DECLS
+
 
 /*
  * UDP based rpc.
 
 /*
  * UDP based rpc.
@@ -286,25 +300,46 @@ extern CLIENT *clnttcp_create();
  *     u_int sendsz;
  *     u_int recvsz;
  */
  *     u_int sendsz;
  *     u_int recvsz;
  */
-extern CLIENT *clntudp_create();
-extern CLIENT *clntudp_bufcreate();
+__BEGIN_DECLS
+extern CLIENT *clntudp_create  __P((struct sockaddr_in *,
+                                    u_long,
+                                    u_long,
+                                    struct timeval,
+                                    int *));
+extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *,
+                                    u_long,
+                                    u_long,
+                                    struct timeval,
+                                    int *,
+                                    u_int,
+                                    u_int));
+__END_DECLS
+
 
 /*
  * Print why creation failed
  */
 
 /*
  * Print why creation failed
  */
-void clnt_pcreateerror(/* char *msg */);       /* stderr */
-char *clnt_spcreateerror(/* char *msg */);     /* string */
+__BEGIN_DECLS
+extern void clnt_pcreateerror  __P((char *));                  /* stderr */
+extern char *clnt_spcreateerror        __P((char *));                  /* string */
+__END_DECLS
 
 /*
  * Like clnt_perror(), but is more verbose in its output
  */ 
 
 /*
  * Like clnt_perror(), but is more verbose in its output
  */ 
-void clnt_perrno(/* enum clnt_stat num */);    /* stderr */
+__BEGIN_DECLS
+extern void clnt_perrno                __P((enum clnt_stat));          /* stderr */
+extern char *clnt_sperrno      __P((enum clnt_stat));          /* string */
+__END_DECLS
 
 /*
  * Print an English error message, given the client error code
  */
 
 /*
  * 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 */
+__BEGIN_DECLS
+extern void clnt_perror                __P((CLIENT *, char *));        /* stderr */
+extern char *clnt_sperror      __P((CLIENT *, char *));        /* string */
+__END_DECLS
+
 
 /* 
  * If a creation fails, the following allows the user to figure out why.
 
 /* 
  * If a creation fails, the following allows the user to figure out why.
@@ -317,15 +352,7 @@ struct rpc_createerr {
 extern struct rpc_createerr rpc_createerr;
 
 
 extern struct rpc_createerr rpc_createerr;
 
 
-
-/*
- * Copy error message to buffer.
- */
-char *clnt_sperrno(/* enum clnt_stat num */);  /* string */
-
-
-
 #define UDPMSGSIZE     8800    /* rpc imposed limit on udp msg size */
 #define RPCSMALLMSGSIZE        400     /* a more reasonable packet size */
 
 #define UDPMSGSIZE     8800    /* rpc imposed limit on udp msg size */
 #define RPCSMALLMSGSIZE        400     /* a more reasonable packet size */
 
-#endif /*!_CLNT_*/
+#endif /* !_RPC_CLNT_H */
index e54e778..3689350 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_generic.c  2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";*/
+/*static char *sccsid = "from: @(#)clnt_generic.c      2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_generic.c,v 1.4 1993/08/26 00:53:15 jtc Exp $";
 #endif
 #endif
+
 /*
  * Copyright (C) 1987, Sun Microsystems, Inc.
  */
 /*
  * Copyright (C) 1987, Sun Microsystems, Inc.
  */
@@ -46,8 +49,8 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
 CLIENT *
 clnt_create(hostname, prog, vers, proto)
        char *hostname;
 CLIENT *
 clnt_create(hostname, prog, vers, proto)
        char *hostname;
-       unsigned prog;
-       unsigned vers;
+       u_long prog;
+       u_long vers;
        char *proto;
 {
        struct hostent *h;
        char *proto;
 {
        struct hostent *h;
index c618c5f..303923a 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_perror.c   2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)clnt_perror.c       2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_perror.c,v 1.4 1993/08/26 00:53:16 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -38,15 +40,14 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
  *
  */
 #include <stdio.h>
  *
  */
 #include <stdio.h>
-
+#include <string.h>
+#include <rpc/rpc.h>
 #include <rpc/types.h>
 #include <rpc/auth.h>
 #include <rpc/clnt.h>
 
 static char *auth_errmsg();
 
 #include <rpc/types.h>
 #include <rpc/auth.h>
 #include <rpc/clnt.h>
 
 static char *auth_errmsg();
 
-extern char *strcpy();
-
 static char *buf;
 
 static char *
 static char *buf;
 
 static char *
index 89059ae..bb042e2 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_raw.c      2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)clnt_raw.c  2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_raw.c,v 1.3 1993/08/26 00:53:17 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 043ce0a..baff372 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_simple.c   2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)clnt_simple.c       2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_simple.c,v 1.4 1993/08/26 00:53:19 jtc Exp $";
 #endif
 
 /* 
 #endif
 
 /* 
@@ -39,10 +41,11 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <netdb.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <strings.h>
 
 static struct callrpc_private {
        CLIENT  *client;
 
 static struct callrpc_private {
        CLIENT  *client;
index 2222bc6..602a372 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_tcp.c      2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)clnt_tcp.c  2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_tcp.c,v 1.3 1993/08/26 00:53:20 jtc Exp $";
 #endif
  
 /*
 #endif
  
 /*
index 815cbb4..9bbaa71 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)clnt_udp.c      2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)clnt_udp.c  2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: clnt_udp.c,v 1.3 1993/08/26 00:53:21 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 60b1227..4091914 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)get_myaddress.c     2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: get_myaddress.c,v 1.4 1993/08/26 00:53:22 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -39,6 +41,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <rpc/types.h>
  */
 
 #include <rpc/types.h>
+#include <rpc/xdr.h>
 #include <rpc/pmap_prot.h>
 #include <sys/socket.h>
 #include <stdio.h>
 #include <rpc/pmap_prot.h>
 #include <sys/socket.h>
 #include <stdio.h>
index a69dc1f..5252f2a 100644 (file)
@@ -1,66 +1,75 @@
-/* @(#)getrpcent.c     2.2 88/07/29 4.0 RPCSRC */
-#if !defined(lint) && defined(SCCSIDS)
-static  char sccsid[] = "@(#)getrpcent.c 1.9 87/08/11  Copyr 1984 Sun Micro";
-#endif
-
 /*
  * 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
 /*
  * 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.
- * 
+ * program developed by the user or with the express written consent of
+ * Sun Microsystems, Inc.
+ *
  * 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 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 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.
  * 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.
  * 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
  */
 
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
 
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
+static char *rcsid = "$Id: getrpcent.c,v 1.7 1993/08/26 00:53:23 jtc Exp $";
+#endif
+
 /*
 /*
- * Copyright (c) 1985 by Sun Microsystems, Inc.
+ * Copyright (c) 1984 by Sun Microsystems, Inc.
  */
 
 #include <stdio.h>
 #include <sys/types.h>
  */
 
 #include <stdio.h>
 #include <sys/types.h>
+#include <string.h>
 #include <rpc/rpc.h>
 #include <rpc/rpc.h>
-#include <netdb.h>
-#include <sys/socket.h>
+#ifdef YP
+#include <rpcsvc/yp_prot.h>
+#include <rpcsvc/ypclnt.h>
+#endif
 
 /*
  * Internet version.
  */
 struct rpcdata {
        FILE    *rpcf;
 
 /*
  * Internet version.
  */
 struct rpcdata {
        FILE    *rpcf;
-       char    *current;
-       int     currentlen;
        int     stayopen;
 #define        MAXALIASES      35
        char    *rpc_aliases[MAXALIASES];
        struct  rpcent rpc;
        char    line[BUFSIZ+1];
        int     stayopen;
 #define        MAXALIASES      35
        char    *rpc_aliases[MAXALIASES];
        struct  rpcent rpc;
        char    line[BUFSIZ+1];
+#ifdef YP
        char    *domain;
        char    *domain;
-} *rpcdata, *_rpcdata();
+       char    *current;
+       int     currentlen;
+#endif
+} *rpcdata;
+
+#ifdef YP
+static int     __yp_nomap = 0;
+#endif /* YP */
 
 static struct rpcent *interpret();
 struct hostent *gethostent();
 char   *inet_ntoa();
 
 static struct rpcent *interpret();
 struct hostent *gethostent();
 char   *inet_ntoa();
-static char *index();
 
 static char RPCDB[] = "/etc/rpc";
 
 
 static char RPCDB[] = "/etc/rpc";
 
@@ -82,12 +91,36 @@ getrpcbynumber(number)
 {
        register struct rpcdata *d = _rpcdata();
        register struct rpcent *p;
 {
        register struct rpcdata *d = _rpcdata();
        register struct rpcent *p;
+#ifdef YP
        int reason;
        int reason;
-       char adrstr[16], *val = NULL;
-       int vallen;
+       char adrstr[16];
+#endif
 
        if (d == 0)
                return (0);
 
        if (d == 0)
                return (0);
+#ifdef YP
+        if (!__yp_nomap && _yp_check(&d->domain)) {
+                sprintf(adrstr, "%d", number);
+                reason = yp_match(d->domain, "rpc.bynumber", adrstr, strlen(adrstr),
+                                  &d->current, &d->currentlen);
+                switch(reason) {
+                case 0:
+                        break;
+                case YPERR_MAP:
+                        __yp_nomap = 1;
+                        goto no_yp;
+                        break;
+                default:
+                        return(0);
+                        break;
+                }
+                d->current[d->currentlen] = '\0';
+                p = interpret(d->current, d->currentlen);
+                (void) free(d->current);
+                return p;
+        }
+no_yp:
+#endif /* YP */
        setrpcent(0);
        while (p = getrpcent()) {
                if (p->r_number == number)
        setrpcent(0);
        while (p = getrpcent()) {
                if (p->r_number == number)
@@ -105,7 +138,7 @@ getrpcbyname(name)
        char **rp;
 
        setrpcent(0);
        char **rp;
 
        setrpcent(0);
-       while(rpc = getrpcent()) {
+       while (rpc = getrpcent()) {
                if (strcmp(rpc->r_name, name) == 0)
                        return (rpc);
                for (rp = rpc->r_aliases; *rp != NULL; rp++) {
                if (strcmp(rpc->r_name, name) == 0)
                        return (rpc);
                for (rp = rpc->r_aliases; *rp != NULL; rp++) {
@@ -117,6 +150,7 @@ getrpcbyname(name)
        return (NULL);
 }
 
        return (NULL);
 }
 
+void
 setrpcent(f)
        int f;
 {
 setrpcent(f)
        int f;
 {
@@ -124,26 +158,40 @@ setrpcent(f)
 
        if (d == 0)
                return;
 
        if (d == 0)
                return;
+#ifdef YP
+        if (!__yp_nomap && _yp_check(NULL)) {
+                if (d->current)
+                        free(d->current);
+                d->current = NULL;
+                d->currentlen = 0;
+                return;
+        }
+        __yp_nomap = 0;
+#endif /* YP */
        if (d->rpcf == NULL)
                d->rpcf = fopen(RPCDB, "r");
        else
                rewind(d->rpcf);
        if (d->rpcf == NULL)
                d->rpcf = fopen(RPCDB, "r");
        else
                rewind(d->rpcf);
-       if (d->current)
-               free(d->current);
-       d->current = NULL;
        d->stayopen |= f;
 }
 
        d->stayopen |= f;
 }
 
+void
 endrpcent()
 {
        register struct rpcdata *d = _rpcdata();
 
        if (d == 0)
                return;
 endrpcent()
 {
        register struct rpcdata *d = _rpcdata();
 
        if (d == 0)
                return;
-       if (d->current && !d->stayopen) {
-               free(d->current);
-               d->current = NULL;
-       }
+#ifdef YP
+        if (!__yp_nomap && _yp_check(NULL)) {
+               if (d->current && !d->stayopen)
+                        free(d->current);
+                d->current = NULL;
+                d->currentlen = 0;
+                return;
+        }
+        __yp_nomap = 0;
+#endif /* YP */
        if (d->rpcf && !d->stayopen) {
                fclose(d->rpcf);
                d->rpcf = NULL;
        if (d->rpcf && !d->stayopen) {
                fclose(d->rpcf);
                d->rpcf = NULL;
@@ -155,48 +203,74 @@ getrpcent()
 {
        struct rpcent *hp;
        int reason;
 {
        struct rpcent *hp;
        int reason;
+       register struct rpcdata *d = _rpcdata();
+#ifdef YP
        char *key = NULL, *val = NULL;
        int keylen, vallen;
        char *key = NULL, *val = NULL;
        int keylen, vallen;
-       register struct rpcdata *d = _rpcdata();
+#endif
 
        if (d == 0)
                return(NULL);
 
        if (d == 0)
                return(NULL);
+#ifdef YP
+        if (!__yp_nomap && _yp_check(&d->domain)) {
+                if (d->current == NULL && d->currentlen == 0) {
+                        reason = yp_first(d->domain, "rpc.bynumber",
+                                          &d->current, &d->currentlen,
+                                          &val, &vallen);
+                } else {
+                        reason = yp_next(d->domain, "rpc.bynumber",
+                                         d->current, d->currentlen,
+                                         &d->current, &d->currentlen,
+                                         &val, &vallen);
+                }
+                switch(reason) {
+                case 0:
+                        break;
+                case YPERR_MAP:
+                        __yp_nomap = 1;
+                        goto no_yp;
+                        break;
+                default:
+                        return(0);
+                        break;
+                }
+                val[vallen] = '\0';
+                hp = interpret(val, vallen);
+                (void) free(val);
+                return hp;
+        }
+no_yp:
+#endif /* YP */
        if (d->rpcf == NULL && (d->rpcf = fopen(RPCDB, "r")) == NULL)
                return (NULL);
        if (d->rpcf == NULL && (d->rpcf = fopen(RPCDB, "r")) == NULL)
                return (NULL);
-    if (fgets(d->line, BUFSIZ, d->rpcf) == NULL)
+        if (fgets(d->line, BUFSIZ, d->rpcf) == NULL)
                return (NULL);
                return (NULL);
-       return interpret(d->line, strlen(d->line));
+       return (interpret(d->line, strlen(d->line)));
 }
 
 static struct rpcent *
 interpret(val, len)
 }
 
 static struct rpcent *
 interpret(val, len)
+       char *val;
+       int len;
 {
        register struct rpcdata *d = _rpcdata();
        char *p;
        register char *cp, **q;
 
        if (d == 0)
 {
        register struct rpcdata *d = _rpcdata();
        char *p;
        register char *cp, **q;
 
        if (d == 0)
-               return;
-       strncpy(d->line, val, len);
+               return (0);
+       (void) strncpy(d->line, val, len);
        p = d->line;
        d->line[len] = '\n';
        if (*p == '#')
                return (getrpcent());
        p = d->line;
        d->line[len] = '\n';
        if (*p == '#')
                return (getrpcent());
-       cp = index(p, '#');
+       cp = strpbrk(p, "#\n");
        if (cp == NULL)
        if (cp == NULL)
-    {
-               cp = index(p, '\n');
-               if (cp == NULL)
-                       return (getrpcent());
-       }
+               return (getrpcent());
        *cp = '\0';
        *cp = '\0';
-       cp = index(p, ' ');
+       cp = strpbrk(p, " \t");
        if (cp == NULL)
        if (cp == NULL)
-    {
-               cp = index(p, '\t');
-               if (cp == NULL)
-                       return (getrpcent());
-       }
+               return (getrpcent());
        *cp++ = '\0';
        /* THIS STUFF IS INTERNET SPECIFIC */
        d->rpc.r_name = d->line;
        *cp++ = '\0';
        /* THIS STUFF IS INTERNET SPECIFIC */
        d->rpc.r_name = d->line;
@@ -204,15 +278,9 @@ interpret(val, len)
                cp++;
        d->rpc.r_number = atoi(cp);
        q = d->rpc.r_aliases = d->rpc_aliases;
                cp++;
        d->rpc.r_number = atoi(cp);
        q = d->rpc.r_aliases = d->rpc_aliases;
-       cp = index(p, ' ');
-       if (cp != NULL)
+       cp = strpbrk(cp, " \t");
+       if (cp != NULL) 
                *cp++ = '\0';
                *cp++ = '\0';
-       else
-    {
-               cp = index(p, '\t');
-               if (cp != NULL)
-                       *cp++ = '\0';
-       }
        while (cp && *cp) {
                if (*cp == ' ' || *cp == '\t') {
                        cp++;
        while (cp && *cp) {
                if (*cp == ' ' || *cp == '\t') {
                        cp++;
@@ -220,16 +288,11 @@ interpret(val, len)
                }
                if (q < &(d->rpc_aliases[MAXALIASES - 1]))
                        *q++ = cp;
                }
                if (q < &(d->rpc_aliases[MAXALIASES - 1]))
                        *q++ = cp;
-               cp = index(p, ' ');
+               cp = strpbrk(cp, " \t");
                if (cp != NULL)
                        *cp++ = '\0';
                if (cp != NULL)
                        *cp++ = '\0';
-               else
-           {
-                       cp = index(p, '\t');
-                       if (cp != NULL)
-                               *cp++ = '\0';
-               }
        }
        *q = NULL;
        return (&d->rpc);
 }
        }
        *q = NULL;
        return (&d->rpc);
 }
+
index 9b13bac..755c617 100644 (file)
@@ -1,7 +1,3 @@
-/* @(#)getrpcport.c    2.1 88/07/29 4.0 RPCSRC */
-#if !defined(lint) && defined(SCCSIDS)
-static  char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
-#endif
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -31,6 +27,12 @@ static  char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
  * Mountain View, California  94043
  */
 
  * Mountain View, California  94043
  */
 
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)getrpcport.c 1.3 87/08/11 SMI";*/
+/*static char *sccsid = "from: @(#)getrpcport.c        2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: getrpcport.c,v 1.3 1993/08/26 00:53:24 jtc Exp $";
+#endif
+
 /*
  * Copyright (c) 1985 by Sun Microsystems, Inc.
  */
 /*
  * Copyright (c) 1985 by Sun Microsystems, Inc.
  */
index 09220e7..de36b21 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_clnt.c     2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_clnt.c,v 1.3 1993/08/26 00:53:25 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index d2ea2a8..896412d 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_clnt.h     2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 
+ *     from: @(#)pmap_clnt.h   2.1 88/07/29 4.0 RPCSRC
+ *     $Id: pmap_clnt.h,v 1.3 1993/08/01 18:45:57 mycroft Exp $
  */
 
 /*
  */
 
 /*
  *             address if the responder to the broadcast.
  */
 
  *             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();
+#ifndef _RPC_PMAPCLNT_H
+#define _RPC_PMAPCLNT_H
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+extern bool_t          pmap_set        __P((u_long, u_long, int, int));
+extern bool_t          pmap_unset      __P((u_long, u_long));
+extern struct pmaplist *pmap_getmaps   __P((struct sockaddr_in *));
+extern enum clnt_stat  pmap_rmtcall    __P((struct sockaddr_in *,
+                                            u_long, u_long, u_long,
+                                            xdrproc_t, caddr_t,
+                                            xdrproc_t, caddr_t,
+                                            struct timeval, u_long *));
+extern enum clnt_stat  clnt_broadcast  __P((u_long, u_long, u_long,
+                                            xdrproc_t, char *,
+                                            xdrproc_t, char *,
+                                            bool_t (*)()));
+extern u_short         pmap_getport    __P((struct sockaddr_in *,
+                                            u_long, u_long, u_int));
+__END_DECLS
+
+#endif /* !_RPC_PMAPCLNT_H */
index e4a9c49..4c172e6 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_getmaps.c  2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_getmaps.c      2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_getmaps.c,v 1.3 1993/08/26 00:53:27 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 77b9cf7..c8b3d16 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_getport.c  2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_getport.c      2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_getport.c,v 1.3 1993/08/26 00:53:28 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 643c2ff..e38d35a 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_prot.c     2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_prot.c 2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_prot.c,v 1.3 1993/08/26 00:53:29 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index ccf7a77..5b84a4b 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_prot.h     2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)pmap_prot.h 1.14 88/02/08 SMI 
+ *     from: @(#)pmap_prot.h   2.1 88/07/29 4.0 RPCSRC
+ *     $Id: pmap_prot.h,v 1.3 1993/08/01 18:45:55 mycroft Exp $
  */
 
 /*
  */
 
 /*
  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  */
 
  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  */
 
+#ifndef _RPC_PMAPPROT_H
+#define _RPC_PMAPPROT_H
+#include <sys/cdefs.h>
+
 #define PMAPPORT               ((u_short)111)
 #define PMAPPROG               ((u_long)100000)
 #define PMAPVERS               ((u_long)2)
 #define PMAPPORT               ((u_short)111)
 #define PMAPPROG               ((u_long)100000)
 #define PMAPVERS               ((u_long)2)
@@ -84,11 +91,14 @@ struct pmap {
        long unsigned pm_port;
 };
 
        long unsigned pm_port;
 };
 
-extern bool_t xdr_pmap();
-
 struct pmaplist {
        struct pmap     pml_map;
        struct pmaplist *pml_next;
 };
 
 struct pmaplist {
        struct pmap     pml_map;
        struct pmaplist *pml_next;
 };
 
-extern bool_t xdr_pmaplist();
+__BEGIN_DECLS
+extern bool_t xdr_pmap         __P((XDR *, struct pmap *));
+extern bool_t xdr_pmaplist     __P((XDR *, struct pmaplist **));
+__END_DECLS
+
+#endif /* !_RPC_PMAPPROT_H */
index e2a8214..dcdce8e 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_prot2.c    2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_prot2.c        2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_prot2.c,v 1.3 1993/08/26 00:53:30 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 8945b2f..599dc8e 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_rmt.c      2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)pmap_rmt.c  2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: pmap_rmt.c,v 1.3 1993/08/26 00:53:32 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index ee68ceb..d377d29 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)pmap_rmt.h      2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)pmap_rmt.h 1.2 88/02/08 SMI 
+ *     from: @(#)pmap_rmt.h    2.1 88/07/29 4.0 RPCSRC
+ *     $Id: pmap_rmt.h,v 1.3 1993/08/01 18:45:59 mycroft Exp $
  */
 
 /*
  */
 
 /*
  * Copyright (C) 1986, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1986, Sun Microsystems, Inc.
  */
 
+#ifndef _RPC_PMAPRMT_H
+#define _RPC_PMAPRMT_H
+#include <sys/cdefs.h>
+
 struct rmtcallargs {
        u_long prog, vers, proc, arglen;
        caddr_t args_ptr;
        xdrproc_t xdr_args;
 };
 
 struct rmtcallargs {
        u_long prog, vers, proc, arglen;
        caddr_t args_ptr;
        xdrproc_t xdr_args;
 };
 
-bool_t xdr_rmtcall_args();
-
 struct rmtcallres {
        u_long *port_ptr;
        u_long resultslen;
 struct rmtcallres {
        u_long *port_ptr;
        u_long resultslen;
@@ -50,4 +55,9 @@ struct rmtcallres {
        xdrproc_t xdr_results;
 };
 
        xdrproc_t xdr_results;
 };
 
-bool_t xdr_rmtcallres();
+__BEGIN_DECLS
+extern bool_t xdr_rmtcall_args __P((XDR *, struct rmtcallargs *));
+extern bool_t xdr_rmtcallres   __P((XDR *, struct rmtcallres *));
+__END_DECLS
+
+#endif /* !_RPC_PMAPRMT_H */
index cd403b7..9efed35 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc.h   2.4 89/07/11 4.0 RPCSRC; from 1.9 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)rpc.h 1.9 88/02/08 SMI 
+ *     from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
+ *     $Id: rpc.h,v 1.3 1993/08/01 18:45:54 mycroft Exp $
  */
 
 /*
  */
 
 /*
@@ -34,8 +37,8 @@
  *
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
  *
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
-#ifndef __RPC_HEADER__
-#define __RPC_HEADER__
+#ifndef _RPC_RPC_H
+#define _RPC_RPC_H
 
 #include <rpc/types.h>         /* some typedefs */
 #include <netinet/in.h>
 
 #include <rpc/types.h>         /* some typedefs */
 #include <netinet/in.h>
@@ -75,6 +78,12 @@ struct rpcent {
       int     r_number;       /* rpc program number */
 };
 
       int     r_number;       /* rpc program number */
 };
 
-struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
+__BEGIN_DECLS
+extern struct rpcent *getrpcbyname     __P((char *));
+extern struct rpcent *getrpcbynumber   __P((int));
+extern struct rpcent *getrpcent                __P((void));
+extern void setrpcent __P((int));
+extern void endrpcent __P((void));
+__END_DECLS
 
 
-#endif /* ndef __RPC_HEADER__ */
+#endif /* !_RPC_RPC_H */
index d9d815a..509a32e 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc_callmsg.c   2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)rpc_callmsg.c       2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: rpc_callmsg.c,v 1.3 1993/08/26 00:53:33 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 75cead0..212b7f7 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc_commondata.c        2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)rpc_commondata.c    2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: rpc_commondata.c,v 1.3 1993/08/26 00:53:34 jtc Exp $";
+#endif
+
 #include <rpc/rpc.h>
 /*
  * This file should only contain common data (global data) that is exported
 #include <rpc/rpc.h>
 /*
  * This file should only contain common data (global data) that is exported
index a848817..982f2e3 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc_dtablesize.c        2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";*/
+/*static char *sccsid = "from: @(#)rpc_dtablesize.c    2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: rpc_dtablesize.c,v 1.3 1993/08/26 00:53:35 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index b78872b..9a789a1 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc_msg.h       2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)rpc_msg.h 1.7 86/07/16 SMI
+ *     from: @(#)rpc_msg.h     2.1 88/07/29 4.0 RPCSRC
+ *     $Id: rpc_msg.h,v 1.3 1993/08/01 18:45:53 mycroft Exp $
  */
  */
-/*      @(#)rpc_msg.h 1.7 86/07/16 SMI      */
 
 /*
  * rpc_msg.h
 
 /*
  * rpc_msg.h
@@ -36,6 +38,9 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#ifndef _RPC_RPCMSG_H
+#define _RPC_RPCMSG_H
+
 #define RPC_MSG_VERSION                ((u_long) 2)
 #define RPC_SERVICE_PORT       ((u_short) 2048)
 
 #define RPC_MSG_VERSION                ((u_long) 2)
 #define RPC_SERVICE_PORT       ((u_short) 2048)
 
@@ -153,14 +158,14 @@ struct rpc_msg {
 #define        acpted_rply     ru.RM_rmb.ru.RP_ar
 #define        rjcted_rply     ru.RM_rmb.ru.RP_dr
 
 #define        acpted_rply     ru.RM_rmb.ru.RP_ar
 #define        rjcted_rply     ru.RM_rmb.ru.RP_dr
 
-
+__BEGIN_DECLS
 /*
  * XDR routine to handle a rpc message.
  * xdr_callmsg(xdrs, cmsg)
  *     XDR *xdrs;
  *     struct rpc_msg *cmsg;
  */
 /*
  * XDR routine to handle a rpc message.
  * xdr_callmsg(xdrs, cmsg)
  *     XDR *xdrs;
  *     struct rpc_msg *cmsg;
  */
-extern bool_t  xdr_callmsg();
+extern bool_t  xdr_callmsg     __P((XDR *, struct rpc_msg *));
 
 /*
  * XDR routine to pre-serialize the static part of a rpc message.
 
 /*
  * XDR routine to pre-serialize the static part of a rpc message.
@@ -168,7 +173,7 @@ extern bool_t       xdr_callmsg();
  *     XDR *xdrs;
  *     struct rpc_msg *cmsg;
  */
  *     XDR *xdrs;
  *     struct rpc_msg *cmsg;
  */
-extern bool_t  xdr_callhdr();
+extern bool_t  xdr_callhdr     __P((XDR *, struct rpc_msg *));
 
 /*
  * XDR routine to handle a rpc reply.
 
 /*
  * XDR routine to handle a rpc reply.
@@ -176,7 +181,7 @@ extern bool_t       xdr_callhdr();
  *     XDR *xdrs;
  *     struct rpc_msg *rmsg;
  */
  *     XDR *xdrs;
  *     struct rpc_msg *rmsg;
  */
-extern bool_t  xdr_replymsg();
+extern bool_t  xdr_replymsg    __P((XDR *, struct rpc_msg *));
 
 /*
  * Fills in the error part of a reply message.
 
 /*
  * Fills in the error part of a reply message.
@@ -184,4 +189,7 @@ extern bool_t       xdr_replymsg();
  *     struct rpc_msg *msg;
  *     struct rpc_err *error;
  */
  *     struct rpc_msg *msg;
  *     struct rpc_err *error;
  */
-extern void    _seterr_reply();
+extern void    _seterr_reply   __P((struct rpc_msg *, struct rpc_err *));
+__END_DECLS
+
+#endif /* !_RPC_RPCMSG_H */
index 4b1319a..646d638 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)rpc_prot.c      2.3 88/08/07 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)rpc_prot.c  2.3 88/08/07 4.0 RPCSRC";*/
+static char *rcsid = "$Id: rpc_prot.c,v 1.3 1993/08/26 00:53:36 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 3327ee5..1a2cb79 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc.c   2.4 88/08/11 4.0 RPCSRC; from 1.44 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc.c 1.41 87/10/13 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint) 
+/*static char *sccsid = "from: @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc.c       2.4 88/08/11 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc.c,v 1.3 1993/08/26 00:53:37 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 3cb07ef..243d49c 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc.h   2.2 88/07/29 4.0 RPCSRC; from 1.20 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)svc.h 1.20 88/02/08 SMI 
+ *     from: @(#)svc.h 2.2 88/07/29 4.0 RPCSRC
+ *     $Id: svc.h,v 1.3 1993/08/01 18:45:52 mycroft Exp $
  */
 
 /*
  */
 
 /*
@@ -34,8 +37,9 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
-#ifndef __SVC_HEADER__
-#define __SVC_HEADER__
+#ifndef _RPC_SVC_H
+#define _RPC_SVC_H
+#include <sys/cdefs.h>
 
 /*
  * This interface must manage two items concerning remote procedure calling:
 
 /*
  * This interface must manage two items concerning remote procedure calling:
@@ -153,7 +157,9 @@ struct svc_req {
  *     void (*dispatch)();
  *     int protocol;  /* like TCP or UDP, zero means do not register 
  */
  *     void (*dispatch)();
  *     int protocol;  /* like TCP or UDP, zero means do not register 
  */
-extern bool_t  svc_register();
+__BEGIN_DECLS
+extern bool_t  svc_register __P((SVCXPRT *, u_long, u_long, void (*)(), int));
+__END_DECLS
 
 /*
  * Service un-registration
 
 /*
  * Service un-registration
@@ -162,7 +168,9 @@ extern bool_t       svc_register();
  *     u_long prog;
  *     u_long vers;
  */
  *     u_long prog;
  *     u_long vers;
  */
-extern void    svc_unregister();
+__BEGIN_DECLS
+extern void    svc_unregister __P((u_long, u_long));
+__END_DECLS
 
 /*
  * Transport registration.
 
 /*
  * Transport registration.
@@ -170,7 +178,9 @@ extern void svc_unregister();
  * xprt_register(xprt)
  *     SVCXPRT *xprt;
  */
  * xprt_register(xprt)
  *     SVCXPRT *xprt;
  */
-extern void    xprt_register();
+__BEGIN_DECLS
+extern void    xprt_register   __P((SVCXPRT *));
+__END_DECLS
 
 /*
  * Transport un-register
 
 /*
  * Transport un-register
@@ -178,7 +188,9 @@ extern void xprt_register();
  * xprt_unregister(xprt)
  *     SVCXPRT *xprt;
  */
  * xprt_unregister(xprt)
  *     SVCXPRT *xprt;
  */
-extern void    xprt_unregister();
+__BEGIN_DECLS
+extern void    xprt_unregister __P((SVCXPRT *));
+__END_DECLS
 
 
 
 
 
 
@@ -209,14 +221,16 @@ extern void       xprt_unregister();
  * deadlock the caller and server processes!
  */
 
  * 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();
+__BEGIN_DECLS
+extern bool_t  svc_sendreply   __P((SVCXPRT *, xdrproc_t, char *));
+extern void    svcerr_decode   __P((SVCXPRT *));
+extern void    svcerr_weakauth __P((SVCXPRT *));
+extern void    svcerr_noproc   __P((SVCXPRT *));
+extern void    svcerr_progvers __P((SVCXPRT *, u_long, u_long));
+extern void    svcerr_auth     __P((SVCXPRT *, enum auth_stat));
+extern void    svcerr_noprog   __P((SVCXPRT *));
+extern void    svcerr_systemerr __P((SVCXPRT *));
+__END_DECLS
     
 /*
  * Lowest level dispatching -OR- who owns this process anyway.
     
 /*
  * Lowest level dispatching -OR- who owns this process anyway.
@@ -246,9 +260,11 @@ extern int svc_fds;
  */
 extern void rpctest_service();
 
  */
 extern void rpctest_service();
 
-extern void    svc_getreq();
-extern void    svc_getreqset();        /* takes fdset instead of int */
-extern void    svc_run();       /* never returns */
+__BEGIN_DECLS
+extern void    svc_getreq      __P((int));
+extern void    svc_getreqset   __P((fd_set *));
+extern void    svc_run         __P((void));
+__END_DECLS
 
 /*
  * Socket to use on svcxxx_create call to get default socket
 
 /*
  * Socket to use on svcxxx_create call to get default socket
@@ -262,19 +278,25 @@ extern void       svc_run();       /* never returns */
 /*
  * Memory based rpc for testing and timing.
  */
 /*
  * Memory based rpc for testing and timing.
  */
-extern SVCXPRT *svcraw_create();
+__BEGIN_DECLS
+extern SVCXPRT *svcraw_create __P((void));
+__END_DECLS
+
 
 /*
  * Udp based rpc.
  */
 
 /*
  * Udp based rpc.
  */
-extern SVCXPRT *svcudp_create();
-extern SVCXPRT *svcudp_bufcreate();
+__BEGIN_DECLS
+extern SVCXPRT *svcudp_create __P((int));
+extern SVCXPRT *svcudp_bufcreate __P((int, u_int, u_int));
+__END_DECLS
+
 
 /*
  * Tcp based rpc.
  */
 
 /*
  * Tcp based rpc.
  */
-extern SVCXPRT *svctcp_create();
-
-
+__BEGIN_DECLS
+extern SVCXPRT *svctcp_create __P((int, u_int, u_int));
+__END_DECLS
 
 
-#endif !__SVC_HEADER__
+#endif /* !_RPC_SVC_H */
index ab7ab69..833dd9f 100644 (file)
@@ -1,6 +1,3 @@
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/11 Copyr 1984 Sun Micro";
-#endif
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -30,6 +27,12 @@ static char sccsid[] = "@(#)svc_auth.c       2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/
  * Mountain View, California  94043
  */
 
  * Mountain View, California  94043
  */
 
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_auth.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_auth.c  2.1 88/08/07 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_auth.c,v 1.3 1993/08/26 00:53:38 jtc Exp $";
+#endif
+
 /*
  * svc_auth_nodes.c, Server-side rpc authenticator interface,
  * *WITHOUT* DES authentication.
 /*
  * svc_auth_nodes.c, Server-side rpc authenticator interface,
  * *WITHOUT* DES authentication.
index a36a01a..485b18b 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_auth.h      2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)svc_auth.h 1.6 86/07/16 SMI
+ *     from: @(#)svc_auth.h    2.1 88/07/29 4.0 RPCSRC
+ *     $Id: svc_auth.h,v 1.3 1993/08/01 18:45:50 mycroft Exp $
  */
  */
-/*      @(#)svc_auth.h 1.6 86/07/16 SMI      */
 
 /*
  * svc_auth.h, Service side of rpc authentication.
 
 /*
  * svc_auth.h, Service side of rpc authentication.
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#ifndef _RPC_SVCAUTH_H
+#define _RPC_SVCAUTH_H
 
 /*
  * Server side authenticator
  */
 
 /*
  * Server side authenticator
  */
-extern enum auth_stat _authenticate();
+__BEGIN_DECLS
+extern enum auth_stat _authenticate __P((struct svc_req *, struct rpc_msg *));
+__END_DECLS
+
+#endif /* !_RPC_SVCAUTH_H */
index ea00b78..c2f7066 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC; from 1.28 88/02/08 SMI */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_auth_unix.c     2.3 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_auth_unix.c,v 1.3 1993/08/26 00:53:39 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 1170ece..62a4513 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_raw.c       2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_raw.c   2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_raw.c,v 1.3 1993/08/26 00:53:41 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index c1c3e04..160a307 100644 (file)
@@ -1,8 +1,3 @@
-/* @(#)svc_run.c       2.1 88/07/29 4.0 RPCSRC */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
-#endif
-
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -32,6 +27,12 @@ static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
  * Mountain View, California  94043
  */
 
  * Mountain View, California  94043
  */
 
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_run.c   2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_run.c,v 1.3 1993/08/26 00:53:42 jtc Exp $";
+#endif
+
 /*
  * This is the rpc server side idle loop
  * Wait for input, call server program.
 /*
  * This is the rpc server side idle loop
  * Wait for input, call server program.
index d6bcbd3..2558517 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_simple.c    2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_simple.c        2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_simple.c,v 1.3 1993/08/26 00:53:43 jtc Exp $";
 #endif
 
 /* 
 #endif
 
 /* 
index 587e0f0..df1c68c 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_tcp.c       2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_tcp.c   2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_tcp.c,v 1.3 1993/08/26 00:53:44 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 429b01b..826e638 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)svc_udp.c       2.2 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)svc_udp.c   2.2 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: svc_udp.c,v 1.4 1993/08/26 00:53:45 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -40,6 +42,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <errno.h>
 #include <rpc/rpc.h>
 #include <sys/socket.h>
 #include <errno.h>
index 06d22bf..af90e87 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)types.h 2.3 88/08/15 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)types.h 1.18 87/07/24 SMI
+ *     from: @(#)types.h       2.3 88/08/15 4.0 RPCSRC
+ *     $Id: types.h,v 1.5 1993/08/01 18:45:51 mycroft Exp $
  */
  */
-/*      @(#)types.h 1.18 87/07/24 SMI      */
 
 /*
  * Rpc additions to <sys/types.h>
  */
 
 /*
  * Rpc additions to <sys/types.h>
  */
-#ifndef __TYPES_RPC_HEADER__
-#define __TYPES_RPC_HEADER__
+#ifndef _RPC_TYPES_H
+#define _RPC_TYPES_H
 
 #define        bool_t  int
 #define        enum_t  int
 
 #define        bool_t  int
 #define        enum_t  int
-#define        FALSE   (0)
-#define        TRUE    (1)
 #define __dontcare__   -1
 #define __dontcare__   -1
+
+#ifndef FALSE
+#      define FALSE    (0)
+#endif
+#ifndef TRUE
+#      define TRUE     (1)
+#endif
 #ifndef NULL
 #ifndef NULL
-#      define NULL 0
+#      define NULL     0
 #endif
 
 #endif
 
-void *malloc();
 #define mem_alloc(bsize)       malloc(bsize)
 #define mem_free(ptr, bsize)   free(ptr)
 
 #define mem_alloc(bsize)       malloc(bsize)
 #define mem_free(ptr, bsize)   free(ptr)
 
@@ -54,10 +60,7 @@ void *malloc();
 #include <sys/time.h>
 
 #ifndef INADDR_LOOPBACK
 #include <sys/time.h>
 
 #ifndef INADDR_LOOPBACK
-#define       INADDR_LOOPBACK         (u_long)0x7F000001
-#endif
-#ifndef MAXHOSTNAMELEN
-#define        MAXHOSTNAMELEN  64
+#define        INADDR_LOOPBACK         (u_long)0x7F000001
 #endif
 
 #endif
 
-#endif /* ndef __TYPES_RPC_HEADER__ */
+#endif /* !_RPC_TYPES_H */
index 6c379c9..736e621 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr.c   2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)xdr.c 1.35 87/08/12";*/
+/*static char *sccsid = "from: @(#)xdr.c       2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr.c,v 1.3 1993/08/26 00:53:46 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 6cd3e6f..1a551f0 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr.h   2.2 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  * Sun Microsystems, Inc.
  * 2550 Garcia Avenue
  * Mountain View, California  94043
+ *
+ *     from: @(#)xdr.h 1.19 87/04/22 SMI
+ *     from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC
+ *     $Id: xdr.h,v 1.3 1993/08/01 18:45:49 mycroft Exp $
  */
  */
-/*      @(#)xdr.h 1.19 87/04/22 SMI      */
 
 /*
  * xdr.h, External Data Representation Serialization Routines.
 
 /*
  * xdr.h, External Data Representation Serialization Routines.
@@ -35,8 +37,9 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
-#ifndef __XDR_HEADER__
-#define __XDR_HEADER__
+#ifndef _RPC_XDR_H
+#define _RPC_XDR_H
+#include <sys/cdefs.h>
 
 /*
  * XDR provides a conventional way for converting between C data
 
 /*
  * XDR provides a conventional way for converting between C data
@@ -221,28 +224,31 @@ struct xdr_discrim {
 /*
  * These are the "generic" xdr routines.
  */
 /*
  * 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();
+__BEGIN_DECLS
+extern bool_t  xdr_void        __P((void));
+extern bool_t  xdr_int         __P((XDR *, int *));
+extern bool_t  xdr_u_int       __P((XDR *, u_int *));
+extern bool_t  xdr_long        __P((XDR *, long *));
+extern bool_t  xdr_u_long      __P((XDR *, u_long *));
+extern bool_t  xdr_short       __P((XDR *, short *));
+extern bool_t  xdr_u_short     __P((XDR *, u_short *));
+extern bool_t  xdr_bool        __P((XDR *, bool_t *));
+extern bool_t  xdr_enum        __P((XDR *, enum_t *));
+extern bool_t  xdr_array       __P((XDR *, char **, u_int *, u_int, u_int, xdrproc_t));
+extern bool_t  xdr_bytes       __P((XDR *, char **, u_int *, u_int));
+extern bool_t  xdr_opaque      __P((XDR *, caddr_t, u_int));
+extern bool_t  xdr_string      __P((XDR *, char **, u_int));
+extern bool_t  xdr_union       __P((XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t));
+extern bool_t  xdr_char        __P((XDR *, char *));
+extern bool_t  xdr_u_char      __P((XDR *, char *));
+extern bool_t  xdr_vector      __P((XDR *, char *, u_int, u_int, xdrproc_t));
+extern bool_t  xdr_float       __P((XDR *, float *));
+extern bool_t  xdr_double      __P((XDR *, double *));
+extern bool_t  xdr_reference   __P((XDR *, caddr_t *, u_int, xdrproc_t));
+extern bool_t  xdr_pointer     __P((XDR *, caddr_t *, u_int, xdrproc_t));
+extern bool_t  xdr_wrapstring  __P((XDR *, char **));
+extern void    xdr_free        __P((xdrproc_t, char *));
+__END_DECLS
 
 /*
  * Common opaque bytes objects used by many rpc protocols;
 
 /*
  * Common opaque bytes objects used by many rpc protocols;
@@ -260,11 +266,26 @@ extern bool_t   xdr_netobj();
  * These are the public routines for the various implementations of
  * xdr streams.
  */
  * 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 */
+__BEGIN_DECLS
+/* XDR using memory buffers */
+extern void   xdrmem_create    __P((XDR *, char *, u_int, enum xdr_op));
+
+#ifdef _STDIO_H_
+/* XDR using stdio library */
+extern void   xdrstdio_create  __P((XDR *, FILE *, enum xdr_op));
+#endif
+
+/* XDR pseudo records for tcp */
+extern void   xdrrec_create    __P((XDR *, u_int, u_int, char *, int (*)(), int (*)()));
+
+/* make end of xdr record */
+extern bool_t xdrrec_endofrecord __P((XDR *, int));
+
+/* move to beginning of next record */
+extern bool_t xdrrec_skiprecord        __P((XDR *));
+
+/* true if no more input */
+extern bool_t xdrrec_eof       __P((XDR *));
+__END_DECLS
 
 
-#endif !__XDR_HEADER__
+#endif /* !_RPC_XDR_H */
index 7c2831c..0e90d8f 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_array.c     2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_array.c,v 1.4 1993/08/26 00:53:47 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -41,7 +43,7 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
-
+#include <stdlib.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
index 4b5b697..71dc311 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_float.c     2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_float.c,v 1.6 1993/08/26 00:53:49 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -42,15 +44,20 @@ static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
-
+#include <sys/types.h>
+#include <sys/param.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
 /*
  * NB: Not portable.
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
 /*
  * NB: Not portable.
- * This routine works on Suns (Sky / 68000's) and Vaxen.
+ * This routine works on Suns (Sky / 68000's), i386's, MIPS, NS32k and Vaxen.
  */
 
  */
 
+#if defined(mc68000)||defined(sparc)||defined(i386)||defined(mips)||defined(ns32000)
+#define IEEEFP
+#endif
+
 #ifdef vax
 
 /* What IEEE single precision floating point looks like on a Vax */
 #ifdef vax
 
 /* What IEEE single precision floating point looks like on a Vax */
@@ -87,7 +94,7 @@ xdr_float(xdrs, fp)
        register XDR *xdrs;
        register float *fp;
 {
        register XDR *xdrs;
        register float *fp;
 {
-#if !defined(mc68000) && !defined(sparc)
+#ifndef IEEEFP
        struct ieee_single is;
        struct vax_single vs, *vsp;
        struct sgl_limits *lim;
        struct ieee_single is;
        struct vax_single vs, *vsp;
        struct sgl_limits *lim;
@@ -96,7 +103,7 @@ xdr_float(xdrs, fp)
        switch (xdrs->x_op) {
 
        case XDR_ENCODE:
        switch (xdrs->x_op) {
 
        case XDR_ENCODE:
-#if defined(mc68000) || defined(sparc)
+#ifdef IEEEFP 
                return (XDR_PUTLONG(xdrs, (long *)fp));
 #else
                vs = *((struct vax_single *)fp);
                return (XDR_PUTLONG(xdrs, (long *)fp));
 #else
                vs = *((struct vax_single *)fp);
@@ -118,7 +125,7 @@ xdr_float(xdrs, fp)
 #endif
 
        case XDR_DECODE:
 #endif
 
        case XDR_DECODE:
-#if defined(mc68000) || defined(sparc)
+#ifdef IEEEFP
                return (XDR_GETLONG(xdrs, (long *)fp));
 #else
                vsp = (struct vax_single *)fp;
                return (XDR_GETLONG(xdrs, (long *)fp));
 #else
                vsp = (struct vax_single *)fp;
@@ -148,7 +155,7 @@ xdr_float(xdrs, fp)
 }
 
 /*
 }
 
 /*
- * This routine works on Suns (Sky / 68000's) and Vaxen.
+ * This routine works on Suns (Sky / 68000's), i386's, MIPS and Vaxen.
  */
 
 #ifdef vax
  */
 
 #ifdef vax
@@ -193,7 +200,7 @@ xdr_double(xdrs, dp)
        double *dp;
 {
        register long *lp;
        double *dp;
 {
        register long *lp;
-#if !defined(mc68000) && !defined(sparc)
+#ifndef IEEEFP
        struct  ieee_double id;
        struct  vax_double vd;
        register struct dbl_limits *lim;
        struct  ieee_double id;
        struct  vax_double vd;
        register struct dbl_limits *lim;
@@ -203,8 +210,13 @@ xdr_double(xdrs, dp)
        switch (xdrs->x_op) {
 
        case XDR_ENCODE:
        switch (xdrs->x_op) {
 
        case XDR_ENCODE:
-#if defined(mc68000) || defined(sparc)
+#ifdef IEEEFP
                lp = (long *)dp;
                lp = (long *)dp;
+#if BYTE_ORDER == BIG_ENDIAN
+               return (XDR_PUTLONG(xdrs, lp++) && XDR_PUTLONG(xdrs, lp));
+#else
+               return (XDR_PUTLONG(xdrs, lp+1) && XDR_PUTLONG(xdrs, lp));
+#endif
 #else
                vd = *((struct vax_double *)dp);
                for (i = 0, lim = dbl_limits;
 #else
                vd = *((struct vax_double *)dp);
                for (i = 0, lim = dbl_limits;
@@ -227,13 +239,17 @@ xdr_double(xdrs, dp)
        shipit:
                id.sign = vd.sign;
                lp = (long *)&id;
        shipit:
                id.sign = vd.sign;
                lp = (long *)&id;
-#endif
                return (XDR_PUTLONG(xdrs, lp++) && XDR_PUTLONG(xdrs, lp));
                return (XDR_PUTLONG(xdrs, lp++) && XDR_PUTLONG(xdrs, lp));
+#endif
 
        case XDR_DECODE:
 
        case XDR_DECODE:
-#if defined(mc68000) || defined(sparc)
+#ifdef IEEEFP
                lp = (long *)dp;
                lp = (long *)dp;
+#if BYTE_ORDER == BIG_ENDIAN
                return (XDR_GETLONG(xdrs, lp++) && XDR_GETLONG(xdrs, lp));
                return (XDR_GETLONG(xdrs, lp++) && XDR_GETLONG(xdrs, lp));
+#else
+               return (XDR_GETLONG(xdrs, lp+1) && XDR_GETLONG(xdrs, lp));
+#endif
 #else
                lp = (long *)&id;
                if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp))
 #else
                lp = (long *)&id;
                if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp))
index 558d369..9c8376a 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_mem.c       2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)xdr_mem.c   2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_mem.c,v 1.3 1993/08/26 00:53:50 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 9269f12..057c6cc 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_rec.c       2.2 88/08/01 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
+#if defined(LIBC_SCCS) && !defined(lint) 
+/*static char *sccsid = "from: @(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)xdr_rec.c   2.2 88/08/01 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_rec.c,v 1.4 1993/08/26 00:53:51 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -49,6 +50,7 @@ static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <netinet/in.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <netinet/in.h>
index 32d91d9..b787194 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_reference.c 2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
+
+#if defined(LIBC_SCCS) && !defined(lint) 
+/*static char *sccsid = "from: @(#)xdr_reference.c 1.11 87/08/11 SMI";*/
+/*static char *sccsid = "from: @(#)xdr_reference.c     2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_reference.c,v 1.3 1993/08/26 00:53:53 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*
index 694774f..6bdebe7 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)xdr_stdio.c     2.1 88/07/29 4.0 RPCSRC */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";*/
+/*static char *sccsid = "from: @(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC";*/
+static char *rcsid = "$Id: xdr_stdio.c,v 1.3 1993/08/26 00:53:54 jtc Exp $";
 #endif
 
 /*
 #endif
 
 /*