Fix RCSID's

Fix gcc warnings.
Add missing prototypes
This commit is contained in:
christos 1997-07-13 20:13:02 +00:00
parent ee71b4ce7e
commit c63c52b238
34 changed files with 466 additions and 260 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: auth_none.c,v 1.3 1995/02/25 03:01:34 cgd Exp $ */
/* $NetBSD: auth_none.c,v 1.4 1997/07/13 20:13:02 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: auth_none.c,v 1.3 1995/02/25 03:01:34 cgd Exp $";
#if 0
static char *sccsid = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: auth_none.c,v 1.4 1997/07/13 20:13:02 christos Exp $");
#endif
#endif
/*
@ -52,11 +56,12 @@ static char *rcsid = "$NetBSD: auth_none.c,v 1.3 1995/02/25 03:01:34 cgd Exp $";
/*
* Authenticator operations routines
*/
static void authnone_verf();
static void authnone_destroy();
static bool_t authnone_marshal();
static bool_t authnone_validate();
static bool_t authnone_refresh();
static bool_t authnone_marshal __P((AUTH *, XDR *));
static void authnone_verf __P((AUTH *));
static bool_t authnone_validate __P((AUTH *, struct opaque_auth *));
static bool_t authnone_refresh __P((AUTH *));
static void authnone_destroy __P((AUTH *));
static struct auth_ops ops = {
authnone_verf,
@ -113,26 +118,35 @@ authnone_marshal(client, xdrs)
ap->marshalled_client, ap->mcnt));
}
/*ARGSUSED*/
static void
authnone_verf()
authnone_verf(client)
AUTH *client;
{
}
/*ARGSUSED*/
static bool_t
authnone_validate()
authnone_validate(client, auth)
AUTH *client;
struct opaque_auth *auth;
{
return (TRUE);
}
/*ARGSUSED*/
static bool_t
authnone_refresh()
authnone_refresh(client)
AUTH *client;
{
return (FALSE);
}
/*ARGSUSED*/
static void
authnone_destroy()
authnone_destroy(client)
AUTH *client;
{
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: authunix_prot.c,v 1.2 1995/02/25 03:01:36 cgd Exp $ */
/* $NetBSD: authunix_prot.c,v 1.3 1997/07/13 20:13:03 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: authunix_prot.c,v 1.2 1995/02/25 03:01:36 cgd Exp $";
#if 0
static char *sccsid = "@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)authunix_prot.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: authunix_prot.c,v 1.3 1997/07/13 20:13:03 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: bindresvport.c,v 1.6 1996/03/29 23:00:50 jtc Exp $ */
/* $NetBSD: bindresvport.c,v 1.7 1997/07/13 20:13:04 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: bindresvport.c,v 1.6 1996/03/29 23:00:50 jtc Exp $";
#if 0
static char *sccsid = "@(#)bindresvport.c 1.8 88/02/08 SMI";
static char *sccsid = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: bindresvport.c,v 1.7 1997/07/13 20:13:04 christos Exp $");
#endif
#endif
/*
@ -40,10 +44,12 @@ static char *rcsid = "$NetBSD: bindresvport.c,v 1.6 1996/03/29 23:00:50 jtc Exp
*/
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
/*
* Bind a socket to a privileged IP port

View File

@ -1,4 +1,4 @@
/* $NetBSD: clnt_generic.c,v 1.6 1995/06/03 22:37:21 mycroft Exp $ */
/* $NetBSD: clnt_generic.c,v 1.7 1997/07/13 20:13:04 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: clnt_generic.c,v 1.6 1995/06/03 22:37:21 mycroft Exp $";
#if 0
static char *sccsid = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
static char *sccsid = "@(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: clnt_generic.c,v 1.7 1997/07/13 20:13:04 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clnt_raw.c,v 1.3 1995/02/25 03:01:40 cgd Exp $ */
/* $NetBSD: clnt_raw.c,v 1.4 1997/07/13 20:13:06 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: clnt_raw.c,v 1.3 1995/02/25 03:01:40 cgd Exp $";
#if 0
static char *sccsid = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: clnt_raw.c,v 1.4 1997/07/13 20:13:06 christos Exp $");
#endif
#endif
/*
@ -46,6 +50,7 @@ static char *rcsid = "$NetBSD: clnt_raw.c,v 1.3 1995/02/25 03:01:40 cgd Exp $";
* any interference from the kernal.
*/
#include <stdio.h>
#include <stdlib.h>
#include <rpc/rpc.h>
@ -62,12 +67,15 @@ static struct clntraw_private {
u_int mcnt;
} *clntraw_private;
static enum clnt_stat clntraw_call();
static void clntraw_abort();
static void clntraw_geterr();
static bool_t clntraw_freeres();
static bool_t clntraw_control();
static void clntraw_destroy();
static enum clnt_stat clntraw_call __P((CLIENT *, u_long, xdrproc_t,
caddr_t, xdrproc_t, caddr_t, struct timeval));
static void clntraw_geterr __P((CLIENT *, struct rpc_err *));
static bool_t clntraw_freeres __P((CLIENT *, xdrproc_t, caddr_t));
static void clntraw_abort __P((CLIENT *));
static bool_t clntraw_control __P((CLIENT *, u_int, char *));
static void clntraw_destroy __P((CLIENT *));
static struct clnt_ops client_ops = {
clntraw_call,
@ -78,8 +86,6 @@ static struct clnt_ops client_ops = {
clntraw_control
};
void svc_getreq();
/*
* Create a client handle for memory based rpc.
*/
@ -201,8 +207,11 @@ call_again:
return (status);
}
/*ARGSUSED*/
static void
clntraw_geterr()
clntraw_geterr(cl, err)
CLIENT *cl;
struct rpc_err *err;
{
}
@ -226,18 +235,26 @@ clntraw_freeres(cl, xdr_res, res_ptr)
return ((*xdr_res)(xdrs, res_ptr));
}
/*ARGSUSED*/
static void
clntraw_abort()
clntraw_abort(cl)
CLIENT *cl;
{
}
/*ARGSUSED*/
static bool_t
clntraw_control()
clntraw_control(cl, ui, str)
CLIENT *cl;
u_int ui;
char *str;
{
return (FALSE);
}
/*ARGSUSED*/
static void
clntraw_destroy()
clntraw_destroy(cl)
CLIENT *cl;
{
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: clnt_simple.c,v 1.7 1997/01/23 14:02:16 mrg Exp $ */
/* $NetBSD: clnt_simple.c,v 1.8 1997/07/13 20:13:06 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: clnt_simple.c,v 1.7 1997/01/23 14:02:16 mrg Exp $";
#if 0
static char *sccsid = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: clnt_simple.c,v 1.8 1997/07/13 20:13:06 christos Exp $");
#endif
#endif
/*
@ -45,6 +49,7 @@ static char *rcsid = "$NetBSD: clnt_simple.c,v 1.7 1997/01/23 14:02:16 mrg Exp $
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
@ -59,6 +64,7 @@ static struct callrpc_private {
int
callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
int versnum, procnum;
xdrproc_t inproc, outproc;
char *in, *out;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: clnt_udp.c,v 1.6 1997/02/08 04:38:03 mycroft Exp $ */
/* $NetBSD: clnt_udp.c,v 1.7 1997/07/13 20:13:08 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: clnt_udp.c,v 1.6 1997/02/08 04:38:03 mycroft Exp $";
#if 0
static char *sccsid = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)clnt_udp.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: clnt_udp.c,v 1.7 1997/07/13 20:13:08 christos Exp $");
#endif
#endif
/*
@ -46,6 +50,7 @@ static char *rcsid = "$NetBSD: clnt_udp.c,v 1.6 1997/02/08 04:38:03 mycroft Exp
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@ -56,12 +61,13 @@ static char *rcsid = "$NetBSD: clnt_udp.c,v 1.6 1997/02/08 04:38:03 mycroft Exp
/*
* UDP bases client side rpc operations
*/
static enum clnt_stat clntudp_call();
static void clntudp_abort();
static void clntudp_geterr();
static bool_t clntudp_freeres();
static bool_t clntudp_control();
static void clntudp_destroy();
static enum clnt_stat clntudp_call __P((CLIENT *, u_long, xdrproc_t,
caddr_t, xdrproc_t, caddr_t, struct timeval));
static void clntudp_geterr __P((CLIENT *, struct rpc_err *));
static bool_t clntudp_freeres __P((CLIENT *, xdrproc_t, caddr_t));
static void clntudp_abort __P((CLIENT *));
static bool_t clntudp_control __P((CLIENT *, u_int, char *));
static void clntudp_destroy __P((CLIENT *));
static struct clnt_ops udp_ops = {
clntudp_call,
@ -118,7 +124,7 @@ clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
u_int recvsz;
{
CLIENT *cl;
register struct cu_data *cu;
register struct cu_data *cu = NULL;
struct timeval now;
struct rpc_msg call_msg;
@ -386,16 +392,17 @@ clntudp_freeres(cl, xdr_res, res_ptr)
return ((*xdr_res)(xdrs, res_ptr));
}
/*ARGSUSED*/
static void
clntudp_abort(/*h*/)
/*CLIENT *h;*/
clntudp_abort(cl)
CLIENT *cl;
{
}
static bool_t
clntudp_control(cl, request, info)
CLIENT *cl;
int request;
u_int request;
char *info;
{
register struct cu_data *cu = (struct cu_data *)cl->cl_private;

View File

@ -1,4 +1,4 @@
/* $NetBSD: get_myaddress.c,v 1.3 1996/01/04 20:05:04 pk Exp $ */
/* $NetBSD: get_myaddress.c,v 1.4 1997/07/13 20:13:09 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: get_myaddress.c,v 1.3 1996/01/04 20:05:04 pk Exp $";
#if 0
static char *sccsid = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: get_myaddress.c,v 1.4 1997/07/13 20:13:09 christos Exp $");
#endif
#endif
/*
@ -42,11 +46,11 @@ static char *rcsid = "$NetBSD: get_myaddress.c,v 1.3 1996/01/04 20:05:04 pk Exp
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <sys/socket.h>
#include <stdio.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <netinet/in.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: getrpcent.c,v 1.6 1997/03/13 19:47:42 mycroft Exp $ */
/* $NetBSD: getrpcent.c,v 1.7 1997/07/13 20:13:10 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -30,9 +30,13 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
static char *rcsid = "$NetBSD: getrpcent.c,v 1.6 1997/03/13 19:47:42 mycroft Exp $";
#if 0
static char *sccsid = "@(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";
#else
__RCSID("$NetBSD: getrpcent.c,v 1.7 1997/07/13 20:13:10 christos Exp $");
#endif
#endif
/*
@ -63,6 +67,8 @@ static struct rpcent *interpret __P((char *val, int len));
static char RPCDB[] = "/etc/rpc";
static struct rpcdata *_rpcdata __P((void));
static struct rpcdata *
_rpcdata()
{
@ -82,7 +88,7 @@ getrpcbynumber(number)
struct rpcent *rpc;
setrpcent(0);
while (rpc = getrpcent()) {
while ((rpc = getrpcent()) != NULL) {
if (rpc->r_number == number)
break;
}
@ -98,7 +104,7 @@ getrpcbyname(name)
char **rp;
setrpcent(0);
while (rpc = getrpcent()) {
while ((rpc = getrpcent()) != NULL) {
if (strcmp(rpc->r_name, name) == 0)
break;
for (rp = rpc->r_aliases; *rp != NULL; rp++) {
@ -141,8 +147,6 @@ endrpcent()
struct rpcent *
getrpcent()
{
struct rpcent *hp;
int reason;
register struct rpcdata *d = _rpcdata();
if (d == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: getrpcport.c,v 1.7 1996/12/20 20:23:22 cgd Exp $ */
/* $NetBSD: getrpcport.c,v 1.8 1997/07/13 20:13:11 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: getrpcport.c,v 1.7 1996/12/20 20:23:22 cgd Exp $";
#if 0
static char *sccsid = "@(#)getrpcport.c 1.3 87/08/11 SMI";
static char *sccsid = "@(#)getrpcport.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: getrpcport.c,v 1.8 1997/07/13 20:13:11 christos Exp $");
#endif
#endif
/*
@ -49,6 +53,7 @@ static char *rcsid = "$NetBSD: getrpcport.c,v 1.7 1996/12/20 20:23:22 cgd Exp $"
int
getrpcport(host, prognum, versnum, proto)
char *host;
int prognum, versnum, proto;
{
struct sockaddr_in addr;
struct hostent *hp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_clnt.c,v 1.3 1996/01/04 20:06:22 pk Exp $ */
/* $NetBSD: pmap_clnt.c,v 1.4 1997/07/13 20:13:12 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_clnt.c,v 1.3 1996/01/04 20:06:22 pk Exp $";
#if 0
static char *sccsid = "@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_clnt.c,v 1.4 1997/07/13 20:13:12 christos Exp $");
#endif
#endif
/*
@ -45,13 +49,11 @@ static char *rcsid = "$NetBSD: pmap_clnt.c,v 1.3 1996/01/04 20:06:22 pk Exp $";
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
#include <unistd.h>
static struct timeval timeout = { 5, 0 };
static struct timeval tottimeout = { 60, 0 };
void clnt_perror();
/*
* Set a mapping between program,version and port.
* Calls the pmap service remotely to do the mapping.

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_getmaps.c,v 1.3 1995/02/25 03:01:48 cgd Exp $ */
/* $NetBSD: pmap_getmaps.c,v 1.4 1997/07/13 20:13:13 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_getmaps.c,v 1.3 1995/02/25 03:01:48 cgd Exp $";
#if 0
static char *sccsid = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_getmaps.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_getmaps.c,v 1.4 1997/07/13 20:13:13 christos Exp $");
#endif
#endif
/*
@ -50,6 +54,7 @@ static char *rcsid = "$NetBSD: pmap_getmaps.c,v 1.3 1995/02/25 03:01:48 cgd Exp
#include <netdb.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#define NAMELEN 255

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_getport.c,v 1.2 1995/02/25 03:01:49 cgd Exp $ */
/* $NetBSD: pmap_getport.c,v 1.3 1997/07/13 20:13:14 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_getport.c,v 1.2 1995/02/25 03:01:49 cgd Exp $";
#if 0
static char *sccsid = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_getport.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_getport.c,v 1.3 1997/07/13 20:13:14 christos Exp $");
#endif
#endif
/*
@ -47,6 +51,7 @@ static char *rcsid = "$NetBSD: pmap_getport.c,v 1.2 1995/02/25 03:01:49 cgd Exp
#include <rpc/pmap_clnt.h>
#include <sys/socket.h>
#include <net/if.h>
#include <unistd.h>
static struct timeval timeout = { 5, 0 };
static struct timeval tottimeout = { 60, 0 };

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_prot.c,v 1.2 1995/02/25 03:01:49 cgd Exp $ */
/* $NetBSD: pmap_prot.c,v 1.3 1997/07/13 20:13:14 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_prot.c,v 1.2 1995/02/25 03:01:49 cgd Exp $";
#if 0
static char *sccsid = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_prot.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_prot.c,v 1.3 1997/07/13 20:13:14 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_prot2.c,v 1.2 1995/02/25 03:01:50 cgd Exp $ */
/* $NetBSD: pmap_prot2.c,v 1.3 1997/07/13 20:13:15 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_prot2.c,v 1.2 1995/02/25 03:01:50 cgd Exp $";
#if 0
static char *sccsid = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_prot2.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_prot2.c,v 1.3 1997/07/13 20:13:15 christos Exp $");
#endif
#endif
/*
@ -97,7 +101,7 @@ xdr_pmaplist(xdrs, rp)
*/
bool_t more_elements;
register int freeing = (xdrs->x_op == XDR_FREE);
register struct pmaplist **next;
register struct pmaplist **next = NULL; /* pacify gcc */
while (TRUE) {
more_elements = (bool_t)(*rp != NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_rmt.c,v 1.8 1997/02/08 04:38:03 mycroft Exp $ */
/* $NetBSD: pmap_rmt.c,v 1.9 1997/07/13 20:13:16 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: pmap_rmt.c,v 1.8 1997/02/08 04:38:03 mycroft Exp $";
#if 0
static char *sccsid = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)pmap_rmt.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: pmap_rmt.c,v 1.9 1997/07/13 20:13:16 christos Exp $");
#endif
#endif
/*
@ -54,13 +58,15 @@ static char *rcsid = "$NetBSD: pmap_rmt.c,v 1.8 1997/02/08 04:38:03 mycroft Exp
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#define MAX_BROADCAST_SIZE 1400
static struct timeval timeout = { 3, 0 };
static int getbroadcastnets __P((struct in_addr *, int, char *));
static struct timeval timeout = { 3, 0 };
/*
* pmapper remote-call-service interface.
@ -175,7 +181,7 @@ getbroadcastnets(addrs, sock, buf)
struct ifreq ifreq, *ifr;
struct sockaddr_in *sin;
char *cp, *cplim;
int n, i = 0;
int i = 0;
ifc.ifc_len = UDPMSGSIZE;
ifc.ifc_buf = buf;
@ -217,7 +223,7 @@ getbroadcastnets(addrs, sock, buf)
return (i);
}
typedef bool_t (*resultproc_t)();
typedef bool_t (*resultproc_t) __P((caddr_t, struct sockaddr_in *));
enum clnt_stat
clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
@ -390,4 +396,3 @@ done_broad:
AUTH_DESTROY(unix_auth);
return (stat);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_callmsg.c,v 1.5 1996/12/20 20:47:59 cgd Exp $ */
/* $NetBSD: rpc_callmsg.c,v 1.6 1997/07/13 20:13:17 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: rpc_callmsg.c,v 1.5 1996/12/20 20:47:59 cgd Exp $";
#if 0
static char *sccsid = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: rpc_callmsg.c,v 1.6 1997/07/13 20:13:17 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_commondata.c,v 1.4 1995/02/25 03:01:54 cgd Exp $ */
/* $NetBSD: rpc_commondata.c,v 1.5 1997/07/13 20:13:18 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,9 +29,13 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$NetBSD: rpc_commondata.c,v 1.4 1995/02/25 03:01:54 cgd Exp $";
#if 0
static char *sccsid = "@(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: rpc_commondata.c,v 1.5 1997/07/13 20:13:18 christos Exp $");
#endif
#endif
#include <rpc/rpc.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_dtablesize.c,v 1.8 1996/12/18 20:57:15 cgd Exp $ */
/* $NetBSD: rpc_dtablesize.c,v 1.9 1997/07/13 20:13:19 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,14 +29,20 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: rpc_dtablesize.c,v 1.8 1996/12/18 20:57:15 cgd Exp $";
#if 0
static char *sccsid = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
static char *sccsid = "@(#)rpc_dtablesize.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: rpc_dtablesize.c,v 1.9 1997/07/13 20:13:19 christos Exp $");
#endif
#endif
#include <unistd.h>
int _rpc_dtablesize __P((void)); /* XXX */
/*
* Cache the result of sysconf(_SC_OPEN_MAX), so we don't have to do an
* expensive system call every time.

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc.c,v 1.9 1996/05/17 00:32:22 jtc Exp $ */
/* $NetBSD: svc.c,v 1.10 1997/07/13 20:13:20 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc.c,v 1.9 1996/05/17 00:32:22 jtc Exp $";
#if 0
static char *sccsid = "@(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc.c 2.4 88/08/11 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc.c,v 1.10 1997/07/13 20:13:20 christos Exp $");
#endif
#endif
/*
@ -69,10 +73,11 @@ static struct svc_callout {
struct svc_callout *sc_next;
u_long sc_prog;
u_long sc_vers;
void (*sc_dispatch)();
void (*sc_dispatch) __P((struct svc_req *, SVCXPRT *));
} *svc_head;
static struct svc_callout *svc_find();
static struct svc_callout *svc_find __P((u_long, u_long,
struct svc_callout **));
/* *************** SVCXPRT related stuff **************** */
@ -130,7 +135,7 @@ svc_register(xprt, prog, vers, dispatch, protocol)
SVCXPRT *xprt;
u_long prog;
u_long vers;
void (*dispatch)();
void (*dispatch) __P((struct svc_req *, SVCXPRT *));
int protocol;
{
struct svc_callout *prev;
@ -390,7 +395,8 @@ svc_getreqset(readfds)
maskp = readfds->fds_bits;
for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) {
for (mask = *maskp++; bit = ffs(mask); mask ^= (1 << (bit - 1))) {
for (mask = *maskp++; (bit = ffs(mask)) != 0;
mask ^= (1 << (bit - 1))) {
/* sock has input waiting */
xprt = xports[sock + bit - 1];
if (xprt == NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_auth.c,v 1.2 1995/02/25 03:01:57 cgd Exp $ */
/* $NetBSD: svc_auth.c,v 1.3 1997/07/13 20:13:21 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_auth.c,v 1.2 1995/02/25 03:01:57 cgd Exp $";
#if 0
static char *sccsid = "@(#)svc_auth.c 1.19 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_auth.c,v 1.3 1997/07/13 20:13:21 christos Exp $");
#endif
#endif
/*
@ -59,16 +63,13 @@ static char *rcsid = "$NetBSD: svc_auth.c,v 1.2 1995/02/25 03:01:57 cgd Exp $";
*
*/
enum auth_stat _svcauth_null(); /* no authentication */
enum auth_stat _svcauth_unix(); /* unix style (uid, gids) */
enum auth_stat _svcauth_short(); /* short hand unix style */
static struct {
enum auth_stat (*authenticator)();
enum auth_stat (*authenticator) __P((struct svc_req *,
struct rpc_msg *));
} svcauthsw[] = {
_svcauth_null, /* AUTH_NULL */
_svcauth_unix, /* AUTH_UNIX */
_svcauth_short, /* AUTH_SHORT */
{ _svcauth_null }, /* AUTH_NULL */
{ _svcauth_unix }, /* AUTH_UNIX */
{ _svcauth_short } /* AUTH_SHORT */
};
#define AUTH_MAX 2 /* HIGHEST AUTH NUMBER */
@ -110,9 +111,9 @@ _authenticate(rqst, msg)
}
enum auth_stat
_svcauth_null(/*rqst, msg*/)
/*struct svc_req *rqst;
struct rpc_msg *msg;*/
_svcauth_null(rqst, msg)
struct svc_req *rqst;
struct rpc_msg *msg;
{
return (AUTH_OK);

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_auth_unix.c,v 1.4 1996/12/20 20:47:56 cgd Exp $ */
/* $NetBSD: svc_auth_unix.c,v 1.5 1997/07/13 20:13:22 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_auth_unix.c,v 1.4 1996/12/20 20:47:56 cgd Exp $";
#if 0
static char *sccsid = "@(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_auth_unix.c,v 1.5 1997/07/13 20:13:22 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_raw.c,v 1.3 1995/02/25 03:01:59 cgd Exp $ */
/* $NetBSD: svc_raw.c,v 1.4 1997/07/13 20:13:23 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_raw.c,v 1.3 1995/02/25 03:01:59 cgd Exp $";
#if 0
static char *sccsid = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_raw.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_raw.c,v 1.4 1997/07/13 20:13:23 christos Exp $");
#endif
#endif
/*
@ -58,12 +62,12 @@ static struct svcraw_private {
char verf_body[MAX_AUTH_BYTES];
} *svcraw_private;
static bool_t svcraw_recv();
static enum xprt_stat svcraw_stat();
static bool_t svcraw_getargs();
static bool_t svcraw_reply();
static bool_t svcraw_freeargs();
static void svcraw_destroy();
static enum xprt_stat svcraw_stat __P((SVCXPRT *));
static bool_t svcraw_recv __P((SVCXPRT *, struct rpc_msg *));
static bool_t svcraw_reply __P((SVCXPRT *, struct rpc_msg *));
static bool_t svcraw_getargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svcraw_freeargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static void svcraw_destroy __P((SVCXPRT *));
static struct xp_ops server_ops = {
svcraw_recv,
@ -92,8 +96,10 @@ svcraw_create()
return (&srp->server);
}
/*ARGSUSED*/
static enum xprt_stat
svcraw_stat()
svcraw_stat(xprt)
SVCXPRT *xprt;
{
return (XPRT_IDLE);
@ -165,7 +171,9 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
return ((*xdr_args)(xdrs, args_ptr));
}
/*ARGSUSED*/
static void
svcraw_destroy()
svcraw_destroy(xprt)
SVCXPRT *xprt;
{
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_run.c,v 1.7 1996/12/20 20:24:36 cgd Exp $ */
/* $NetBSD: svc_run.c,v 1.8 1997/07/13 20:13:24 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,16 +29,21 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_run.c,v 1.7 1996/12/20 20:24:36 cgd Exp $";
#if 0
static char *sccsid = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_run.c,v 1.8 1997/07/13 20:13:24 christos Exp $");
#endif
#endif
/*
* This is the rpc server side idle loop
* Wait for input, call server program.
*/
#include <stdio.h>
#include <rpc/rpc.h>
#include <sys/errno.h>
#include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_simple.c,v 1.5 1996/03/29 23:00:55 jtc Exp $ */
/* $NetBSD: svc_simple.c,v 1.6 1997/07/13 20:13:24 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_simple.c,v 1.5 1996/03/29 23:00:55 jtc Exp $";
#if 0
static char *sccsid = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_simple.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_simple.c,v 1.6 1997/07/13 20:13:24 christos Exp $");
#endif
#endif
/*
@ -46,29 +50,32 @@ static char *rcsid = "$NetBSD: svc_simple.c,v 1.5 1996/03/29 23:00:55 jtc Exp $"
#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
#include <sys/socket.h>
#include <netdb.h>
static struct proglst {
char *(*p_progname)();
char *(*p_progname) __P((char [UDPMSGSIZE]));
int p_prognum;
int p_procnum;
xdrproc_t p_inproc, p_outproc;
struct proglst *p_nxt;
} *proglst;
static void universal();
static SVCXPRT *transp;
struct proglst *pl;
static void universal __P((struct svc_req *, SVCXPRT *));
int
registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
char *(*progname)();
char *(*progname) __P((char [UDPMSGSIZE]));
xdrproc_t inproc, outproc;
{
if (procnum == NULLPROC) {
(void) fprintf(stderr,
"can't reassign procedure number %d\n", NULLPROC);
"can't reassign procedure number %ld\n", NULLPROC);
return (-1);
}
if (transp == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_tcp.c,v 1.10 1997/02/08 04:38:04 mycroft Exp $ */
/* $NetBSD: svc_tcp.c,v 1.11 1997/07/13 20:13:25 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_tcp.c,v 1.10 1997/02/08 04:38:04 mycroft Exp $";
#if 0
static char *sccsid = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_tcp.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_tcp.c,v 1.11 1997/07/13 20:13:25 christos Exp $");
#endif
#endif
/*
@ -59,12 +63,18 @@ static char *rcsid = "$NetBSD: svc_tcp.c,v 1.10 1997/02/08 04:38:04 mycroft Exp
/*
* Ops vector for TCP/IP based rpc service handle
*/
static bool_t svctcp_recv();
static enum xprt_stat svctcp_stat();
static bool_t svctcp_getargs();
static bool_t svctcp_reply();
static bool_t svctcp_freeargs();
static void svctcp_destroy();
static SVCXPRT *makefd_xprt __P((int, u_int, u_int));
static bool_t rendezvous_request __P((SVCXPRT *, struct rpc_msg *));
static enum xprt_stat rendezvous_stat __P((SVCXPRT *));
static void svctcp_destroy __P((SVCXPRT *));
static int readtcp __P((caddr_t, caddr_t, int));
static int writetcp __P((caddr_t, caddr_t, int));
static enum xprt_stat svctcp_stat __P((SVCXPRT *));
static bool_t svctcp_recv __P((SVCXPRT *, struct rpc_msg *));
static bool_t svctcp_getargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svctcp_freeargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svctcp_reply __P((SVCXPRT *, struct rpc_msg *));
static struct xp_ops svctcp_op = {
svctcp_recv,
@ -78,21 +88,16 @@ static struct xp_ops svctcp_op = {
/*
* Ops vector for TCP/IP rendezvous handler
*/
static bool_t rendezvous_request();
static enum xprt_stat rendezvous_stat();
static struct xp_ops svctcp_rendezvous_op = {
rendezvous_request,
rendezvous_stat,
(bool_t (*)())abort,
(bool_t (*)())abort,
(bool_t (*)())abort,
(bool_t (*) __P((SVCXPRT *, xdrproc_t, caddr_t))) abort,
(bool_t (*) __P((SVCXPRT *, struct rpc_msg *))) abort,
(bool_t (*) __P((SVCXPRT *, xdrproc_t, caddr_t))) abort,
svctcp_destroy
};
static int readtcp(), writetcp();
static SVCXPRT *makefd_xprt();
struct tcp_rendezvous { /* kept in xprt->xp_p1 */
u_int sendsize;
u_int recvsize;
@ -230,9 +235,11 @@ makefd_xprt(fd, sendsize, recvsize)
return (xprt);
}
/*ARGSUSED*/
static bool_t
rendezvous_request(xprt)
rendezvous_request(xprt, msg)
register SVCXPRT *xprt;
struct rpc_msg *msg;
{
int sock;
struct tcp_rendezvous *r;
@ -257,8 +264,10 @@ rendezvous_request(xprt)
return (FALSE); /* there is never an rpc msg to be processed */
}
/*ARGSUSED*/
static enum xprt_stat
rendezvous_stat()
rendezvous_stat(xprt)
register SVCXPRT *xprt;
{
return (XPRT_IDLE);
@ -292,11 +301,12 @@ svctcp_destroy(xprt)
* fatal for the connection.
*/
static int
readtcp(xprt, buf, len)
register SVCXPRT *xprt;
readtcp(xprtp, buf, len)
caddr_t xprtp;
caddr_t buf;
register int len;
{
register SVCXPRT *xprt = (SVCXPRT *) xprtp;
register int sock = xprt->xp_sock;
int milliseconds = 35 * 1000;
struct pollfd pollfd;
@ -332,11 +342,12 @@ fatal_err:
* Any error is fatal and the connection is closed.
*/
static int
writetcp(xprt, buf, len)
register SVCXPRT *xprt;
writetcp(xprtp, buf, len)
caddr_t xprtp;
caddr_t buf;
int len;
{
register SVCXPRT *xprt = (SVCXPRT *) xprtp;
register int i, cnt;
for (cnt = len; cnt > 0; cnt -= i, buf += i) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: svc_udp.c,v 1.7 1996/03/29 23:00:57 jtc Exp $ */
/* $NetBSD: svc_udp.c,v 1.8 1997/07/13 20:13:26 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: svc_udp.c,v 1.7 1996/03/29 23:00:57 jtc Exp $";
#if 0
static char *sccsid = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_udp.c 2.2 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: svc_udp.c,v 1.8 1997/07/13 20:13:26 christos Exp $");
#endif
#endif
/*
@ -46,6 +50,7 @@ static char *rcsid = "$NetBSD: svc_udp.c,v 1.7 1996/03/29 23:00:57 jtc Exp $";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
@ -54,12 +59,14 @@ static char *rcsid = "$NetBSD: svc_udp.c,v 1.7 1996/03/29 23:00:57 jtc Exp $";
#define rpc_buffer(xprt) ((xprt)->xp_p1)
#define MAX(a, b) ((a > b) ? a : b)
static bool_t svcudp_recv();
static bool_t svcudp_reply();
static enum xprt_stat svcudp_stat();
static bool_t svcudp_getargs();
static bool_t svcudp_freeargs();
static void svcudp_destroy();
static enum xprt_stat svcudp_stat __P((SVCXPRT *));
static bool_t svcudp_recv __P((SVCXPRT *, struct rpc_msg *));
static bool_t svcudp_reply __P((SVCXPRT *, struct rpc_msg *));
static bool_t svcudp_getargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svcudp_freeargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static void svcudp_destroy __P((SVCXPRT *));
static void cache_set __P((SVCXPRT *, u_long));
static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *));
static struct xp_ops svcudp_op = {
svcudp_recv,
@ -179,7 +186,6 @@ svcudp_recv(xprt, msg)
register int rlen;
char *reply;
u_long replylen;
static int cache_get();
again:
xprt->xp_addrlen = sizeof(struct sockaddr_in);
@ -213,7 +219,6 @@ svcudp_reply(xprt, msg)
register XDR *xdrs = &(su->su_xdrs);
register int slen;
register bool_t stat = FALSE;
static void cache_set();
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS(xdrs, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr.c,v 1.8 1995/04/29 05:26:38 cgd Exp $ */
/* $NetBSD: xdr.c,v 1.9 1997/07/13 20:13:28 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr.c,v 1.8 1995/04/29 05:26:38 cgd Exp $";
#if 0
static char *sccsid = "@(#)xdr.c 1.35 87/08/12";
static char *sccsid = "@(#)xdr.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr.c,v 1.9 1997/07/13 20:13:28 christos Exp $");
#endif
#endif
/*
@ -670,6 +674,8 @@ xdr_string(xdrs, cpp, maxsize)
case XDR_ENCODE:
size = strlen(sp);
break;
case XDR_DECODE:
break;
}
if (! xdr_u_int(xdrs, &size)) {
return (FALSE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_array.c,v 1.4 1995/04/14 20:30:16 jtc Exp $ */
/* $NetBSD: xdr_array.c,v 1.5 1997/07/13 20:13:29 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_array.c,v 1.4 1995/04/14 20:30:16 jtc Exp $";
#if 0
static char *sccsid = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_array.c,v 1.5 1997/07/13 20:13:29 christos Exp $");
#endif
#endif
/*
@ -104,6 +108,9 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
case XDR_FREE:
return (TRUE);
case XDR_ENCODE:
break;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_float.c,v 1.11 1997/03/29 21:04:08 thorpej Exp $ */
/* $NetBSD: xdr_float.c,v 1.12 1997/07/13 20:13:30 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_float.c,v 1.11 1997/03/29 21:04:08 thorpej Exp $";
#if 0
static char *sccsid = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_float.c,v 1.12 1997/07/13 20:13:30 christos Exp $");
#endif
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_mem.c,v 1.5 1996/12/20 20:47:53 cgd Exp $ */
/* $NetBSD: xdr_mem.c,v 1.6 1997/07/13 20:13:31 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_mem.c,v 1.5 1996/12/20 20:47:53 cgd Exp $";
#if 0
static char *sccsid = "@(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_mem.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_mem.c,v 1.6 1997/07/13 20:13:31 christos Exp $");
#endif
#endif
/*
@ -52,17 +56,19 @@ static char *rcsid = "$NetBSD: xdr_mem.c,v 1.5 1996/12/20 20:47:53 cgd Exp $";
#include <rpc/xdr.h>
#include <netinet/in.h>
static bool_t xdrmem_getlong_aligned();
static bool_t xdrmem_putlong_aligned();
static bool_t xdrmem_getlong_unaligned();
static bool_t xdrmem_putlong_unaligned();
static bool_t xdrmem_getbytes();
static bool_t xdrmem_putbytes();
static u_int xdrmem_getpos(); /* XXX w/64-bit pointers, u_int not enough! */
static bool_t xdrmem_setpos();
static int32_t *xdrmem_inline_aligned();
static int32_t *xdrmem_inline_unaligned();
static void xdrmem_destroy();
static void xdrmem_destroy __P((XDR *));
static bool_t xdrmem_getlong_aligned __P((XDR *, long *));
static bool_t xdrmem_putlong_aligned __P((XDR *, long *));
static bool_t xdrmem_getlong_unaligned __P((XDR *, long *));
static bool_t xdrmem_putlong_unaligned __P((XDR *, long *));
static bool_t xdrmem_getbytes __P((XDR *, caddr_t, u_int));
static bool_t xdrmem_putbytes __P((XDR *, caddr_t, u_int));
/* XXX: w/64-bit pointers, u_int not enough! */
static u_int xdrmem_getpos __P((XDR *));
static bool_t xdrmem_setpos __P((XDR *, u_int));
static int32_t *xdrmem_inline_aligned __P((XDR *, u_int));
static int32_t *xdrmem_inline_unaligned __P((XDR *, u_int));
static struct xdr_ops xdrmem_ops_aligned = {
xdrmem_getlong_aligned,
@ -105,9 +111,10 @@ xdrmem_create(xdrs, addr, size, op)
xdrs->x_handy = size;
}
/*ARGSUSED*/
static void
xdrmem_destroy(/*xdrs*/)
/*XDR *xdrs;*/
xdrmem_destroy(xdrs)
XDR *xdrs;
{
}
@ -223,7 +230,7 @@ xdrmem_setpos(xdrs, pos)
static int32_t *
xdrmem_inline_aligned(xdrs, len)
register XDR *xdrs;
int len;
u_int len;
{
int32_t *buf = 0;
@ -238,7 +245,7 @@ xdrmem_inline_aligned(xdrs, len)
static int32_t *
xdrmem_inline_unaligned(xdrs, len)
register XDR *xdrs;
int len;
u_int len;
{
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_rec.c,v 1.6 1996/12/20 20:25:12 cgd Exp $ */
/* $NetBSD: xdr_rec.c,v 1.7 1997/07/13 20:13:31 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -28,10 +28,15 @@
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_rec.c,v 1.6 1996/12/20 20:25:12 cgd Exp $";
#if 0
static char *sccsid = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_rec.c,v 1.7 1997/07/13 20:13:31 christos Exp $");
#endif
#endif
/*
@ -122,6 +127,7 @@ typedef struct rec_strm {
static u_int fix_buf_size __P((u_int));
static bool_t flush_out __P((RECSTREAM *, bool_t));
static bool_t fill_input_buf __P((RECSTREAM *));
static bool_t get_input_bytes __P((RECSTREAM *, caddr_t, int));
static bool_t set_input_fragment __P((RECSTREAM *));
static bool_t skip_input_bytes __P((RECSTREAM *, long));
@ -142,8 +148,10 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
register u_int sendsize;
register u_int recvsize;
caddr_t tcp_handle;
int (*readit)(); /* like read, but pass it a tcp_handle, not sock */
int (*writeit)(); /* like write, but pass it a tcp_handle, not sock */
/* like read, but pass it a tcp_handle, not sock */
int (*readit) __P((caddr_t, caddr_t, int));
/* like write, but pass it a tcp_handle, not sock */
int (*writeit) __P((caddr_t, caddr_t, int));
{
register RECSTREAM *rstrm =
(RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
@ -355,6 +363,9 @@ xdrrec_setpos(xdrs, pos)
return (TRUE);
}
break;
case XDR_FREE:
break;
}
return (FALSE);
}
@ -384,6 +395,9 @@ xdrrec_inline(xdrs, len)
rstrm->in_finger += len;
}
break;
case XDR_FREE:
break;
}
return (buf);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_reference.c,v 1.5 1995/04/14 20:30:18 jtc Exp $ */
/* $NetBSD: xdr_reference.c,v 1.6 1997/07/13 20:13:32 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_reference.c,v 1.5 1995/04/14 20:30:18 jtc Exp $";
#if 0
static char *sccsid = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
static char *sccsid = "@(#)xdr_reference.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_reference.c,v 1.6 1997/07/13 20:13:32 christos Exp $");
#endif
#endif
/*
@ -83,7 +87,10 @@ xdr_reference(xdrs, pp, size, proc)
}
memset(loc, 0, (int)size);
break;
}
case XDR_ENCODE:
break;
}
stat = (*proc)(xdrs, loc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_stdio.c,v 1.3 1995/02/25 03:02:09 cgd Exp $ */
/* $NetBSD: xdr_stdio.c,v 1.4 1997/07/13 20:13:33 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -29,10 +29,14 @@
* Mountain View, California 94043
*/
#include <sys/cdefs.h>
#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 = "$NetBSD: xdr_stdio.c,v 1.3 1995/02/25 03:02:09 cgd Exp $";
#if 0
static char *sccsid = "@(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_stdio.c,v 1.4 1997/07/13 20:13:33 christos Exp $");
#endif
#endif
/*
@ -49,14 +53,14 @@ static char *rcsid = "$NetBSD: xdr_stdio.c,v 1.3 1995/02/25 03:02:09 cgd Exp $";
#include <stdio.h>
#include <rpc/xdr.h>
static bool_t xdrstdio_getlong();
static bool_t xdrstdio_putlong();
static bool_t xdrstdio_getbytes();
static bool_t xdrstdio_putbytes();
static u_int xdrstdio_getpos();
static bool_t xdrstdio_setpos();
static int32_t *xdrstdio_inline();
static void xdrstdio_destroy();
static void xdrstdio_destroy __P((XDR *));
static bool_t xdrstdio_getlong __P((XDR *, long *));
static bool_t xdrstdio_putlong __P((XDR *, long *));
static bool_t xdrstdio_getbytes __P((XDR *, caddr_t, u_int));
static bool_t xdrstdio_putbytes __P((XDR *, caddr_t, u_int));
static u_int xdrstdio_getpos __P((XDR *));
static bool_t xdrstdio_setpos __P((XDR *, u_int));
static int32_t *xdrstdio_inline __P((XDR *, u_int));
/*
* Ops vector for stdio type XDR