Use ANSI C prototypes.
Eliminates gcc 4.9 warnings.
This commit is contained in:
parent
e033b0162b
commit
17c9022848
@ -61,8 +61,7 @@ extern int _rpc_dtablesize( void );
|
||||
static int saw_alarm = 0;
|
||||
|
||||
static void
|
||||
alarm_hndler(s)
|
||||
int s;
|
||||
alarm_hndler(int s)
|
||||
{
|
||||
saw_alarm = 1;
|
||||
return;
|
||||
@ -83,12 +82,7 @@ alarm_hndler(s)
|
||||
* Turn a 'universal address' into a struct sockaddr_in.
|
||||
* Bletch.
|
||||
*/
|
||||
static int uaddr_to_sockaddr(uaddr, sin)
|
||||
#ifdef foo
|
||||
endpoint *endpt;
|
||||
#endif
|
||||
char *uaddr;
|
||||
struct sockaddr_in *sin;
|
||||
static int uaddr_to_sockaddr(char *uaddr, struct sockaddr_in *sin)
|
||||
{
|
||||
unsigned char p_bytes[2];
|
||||
int i;
|
||||
@ -118,9 +112,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
|
||||
* Free the strings that were strduped into the eps structure.
|
||||
*/
|
||||
static void
|
||||
free_eps(eps, num)
|
||||
endpoint eps[];
|
||||
int num;
|
||||
free_eps(endpoint eps[], int num)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -142,14 +134,15 @@ free_eps(eps, num)
|
||||
* fact that gethostbyname() could do an NIS search. Ideally, the
|
||||
* NIS+ server will call __rpc_get_time_offset() with the nis_server
|
||||
* structure already populated.
|
||||
*
|
||||
* host - name of the time host
|
||||
* srv - nis_server struct to use.
|
||||
* eps[] - array of endpoints
|
||||
* maxep - max array size
|
||||
*/
|
||||
static nis_server *
|
||||
get_server(sin, host, srv, eps, maxep)
|
||||
struct sockaddr_in *sin;
|
||||
char *host; /* name of the time host */
|
||||
nis_server *srv; /* nis_server struct to use. */
|
||||
endpoint eps[]; /* array of endpoints */
|
||||
int maxep; /* max array size */
|
||||
get_server(struct sockaddr_in *sin, char *host, nis_server *srv,
|
||||
endpoint eps[], int maxep)
|
||||
{
|
||||
char hname[256];
|
||||
int num_ep = 0, i;
|
||||
@ -236,14 +229,16 @@ get_server(sin, host, srv, eps, maxep)
|
||||
* structure and to then contact the machine for the time.
|
||||
*
|
||||
* td = "server" - "client"
|
||||
*
|
||||
* td - Time difference
|
||||
* srv - NIS Server description
|
||||
* thost - if no server, this is the timehost
|
||||
* uaddr - known universal address
|
||||
* netid - known network identifier
|
||||
*/
|
||||
int
|
||||
__rpc_get_time_offset(td, srv, thost, uaddr, netid)
|
||||
struct timeval *td; /* Time difference */
|
||||
nis_server *srv; /* NIS Server description */
|
||||
char *thost; /* if no server, this is the timehost */
|
||||
char **uaddr; /* known universal address */
|
||||
struct sockaddr_in *netid; /* known network identifier */
|
||||
__rpc_get_time_offset(struct timeval *td, nis_server *srv, char *thost,
|
||||
char **uaddr, struct sockaddr_in *netid)
|
||||
{
|
||||
CLIENT *clnt; /* Client handle */
|
||||
endpoint *ep, /* useful endpoints */
|
||||
|
@ -153,15 +153,17 @@ struct cu_data {
|
||||
* If they are 0, use the transport default.
|
||||
*
|
||||
* If svcaddr is NULL, returns NULL.
|
||||
*
|
||||
* fd - open file descriptor
|
||||
* svcaddr - servers address
|
||||
* program - program number
|
||||
* version - version number
|
||||
* sendsz - buffer recv size
|
||||
* recvsz - buffer send size
|
||||
*/
|
||||
CLIENT *
|
||||
clnt_dg_create(fd, svcaddr, program, version, sendsz, recvsz)
|
||||
int fd; /* open file descriptor */
|
||||
const struct netbuf *svcaddr; /* servers address */
|
||||
rpcprog_t program; /* program number */
|
||||
rpcvers_t version; /* version number */
|
||||
u_int sendsz; /* buffer recv size */
|
||||
u_int recvsz; /* buffer send size */
|
||||
clnt_dg_create(int fd, const struct netbuf *svcaddr, rpcprog_t program,
|
||||
rpcvers_t version, u_int sendsz, u_int recvsz)
|
||||
{
|
||||
CLIENT *cl = NULL; /* client handle */
|
||||
struct cu_data *cu = NULL; /* private data */
|
||||
@ -301,15 +303,18 @@ clnt_dg_create(fd, svcaddr, program, version, sendsz, recvsz)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* cl - client handle
|
||||
* proc - procedure number
|
||||
* xargs - xdr routine for args
|
||||
* argsp - pointer to args
|
||||
* xresults - xdr routine for results
|
||||
* resultsp - pointer to results
|
||||
* utimeout - seconds to wait before giving up
|
||||
*/
|
||||
static enum clnt_stat
|
||||
clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
|
||||
CLIENT *cl; /* client handle */
|
||||
rpcproc_t proc; /* procedure number */
|
||||
xdrproc_t xargs; /* xdr routine for args */
|
||||
void *argsp; /* pointer to args */
|
||||
xdrproc_t xresults; /* xdr routine for results */
|
||||
void *resultsp; /* pointer to results */
|
||||
struct timeval utimeout; /* seconds to wait before giving up */
|
||||
clnt_dg_call(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, void *argsp,
|
||||
xdrproc_t xresults, void *resultsp, struct timeval utimeout)
|
||||
{
|
||||
struct cu_data *cu = (struct cu_data *)cl->cl_private;
|
||||
XDR *xdrs;
|
||||
@ -602,9 +607,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
|
||||
}
|
||||
|
||||
static void
|
||||
clnt_dg_geterr(cl, errp)
|
||||
CLIENT *cl;
|
||||
struct rpc_err *errp;
|
||||
clnt_dg_geterr(CLIENT *cl, struct rpc_err *errp)
|
||||
{
|
||||
struct cu_data *cu = (struct cu_data *)cl->cl_private;
|
||||
|
||||
@ -612,10 +615,7 @@ clnt_dg_geterr(cl, errp)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
clnt_dg_freeres(cl, xdr_res, res_ptr)
|
||||
CLIENT *cl;
|
||||
xdrproc_t xdr_res;
|
||||
void *res_ptr;
|
||||
clnt_dg_freeres(CLIENT *cl, xdrproc_t xdr_res, void *res_ptr)
|
||||
{
|
||||
struct cu_data *cu = (struct cu_data *)cl->cl_private;
|
||||
XDR *xdrs = &(cu->cu_outxdrs);
|
||||
@ -638,16 +638,12 @@ clnt_dg_freeres(cl, xdr_res, res_ptr)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
clnt_dg_abort(h)
|
||||
CLIENT *h;
|
||||
clnt_dg_abort(CLIENT *h)
|
||||
{
|
||||
}
|
||||
|
||||
static bool_t
|
||||
clnt_dg_control(cl, request, info)
|
||||
CLIENT *cl;
|
||||
u_int request;
|
||||
void *info;
|
||||
clnt_dg_control(CLIENT *cl, u_int request, void *info)
|
||||
{
|
||||
struct cu_data *cu = (struct cu_data *)cl->cl_private;
|
||||
struct netbuf *addr;
|
||||
@ -790,8 +786,7 @@ clnt_dg_control(cl, request, info)
|
||||
}
|
||||
|
||||
static void
|
||||
clnt_dg_destroy(cl)
|
||||
CLIENT *cl;
|
||||
clnt_dg_destroy(CLIENT *cl)
|
||||
{
|
||||
struct cu_data *cu = (struct cu_data *)cl->cl_private;
|
||||
int cu_fd = cu->cu_fd;
|
||||
@ -820,7 +815,7 @@ clnt_dg_destroy(cl)
|
||||
}
|
||||
|
||||
static struct clnt_ops *
|
||||
clnt_dg_ops()
|
||||
clnt_dg_ops(void)
|
||||
{
|
||||
static struct clnt_ops ops;
|
||||
sigset_t mask;
|
||||
@ -848,8 +843,7 @@ clnt_dg_ops()
|
||||
* Make sure that the time is not garbage. -1 value is allowed.
|
||||
*/
|
||||
static bool_t
|
||||
time_not_ok(t)
|
||||
struct timeval *t;
|
||||
time_not_ok(struct timeval *t)
|
||||
{
|
||||
return (t->tv_sec < -1 || t->tv_sec > 100000000 ||
|
||||
t->tv_usec < -1 || t->tv_usec > 1000000);
|
||||
|
@ -43,10 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "un-namespace.h"
|
||||
|
||||
int
|
||||
_des_crypt_call(buf, len, dparms)
|
||||
char *buf;
|
||||
int len;
|
||||
struct desparams *dparms;
|
||||
_des_crypt_call(char *buf, int len, struct desparams *dparms)
|
||||
{
|
||||
CLIENT *clnt;
|
||||
desresp *result_1;
|
||||
|
@ -70,12 +70,7 @@ extern int _des_crypt_call(char *, int, struct desparams *);
|
||||
* CBC mode encryption
|
||||
*/
|
||||
int
|
||||
cbc_crypt(key, buf, len, mode, ivec)
|
||||
char *key;
|
||||
char *buf;
|
||||
unsigned len;
|
||||
unsigned mode;
|
||||
char *ivec;
|
||||
cbc_crypt(char *key, char *buf, unsigned len, unsigned mode, char *ivec)
|
||||
{
|
||||
int err;
|
||||
struct desparams dp;
|
||||
@ -97,11 +92,7 @@ cbc_crypt(key, buf, len, mode, ivec)
|
||||
* ECB mode encryption
|
||||
*/
|
||||
int
|
||||
ecb_crypt(key, buf, len, mode)
|
||||
char *key;
|
||||
char *buf;
|
||||
unsigned len;
|
||||
unsigned mode;
|
||||
ecb_crypt(char *key, char *buf, unsigned len, unsigned mode)
|
||||
{
|
||||
struct desparams dp;
|
||||
|
||||
@ -120,12 +111,8 @@ ecb_crypt(key, buf, len, mode)
|
||||
* Common code to cbc_crypt() & ecb_crypt()
|
||||
*/
|
||||
static int
|
||||
common_crypt(key, buf, len, mode, desp)
|
||||
char *key;
|
||||
char *buf;
|
||||
unsigned len;
|
||||
unsigned mode;
|
||||
struct desparams *desp;
|
||||
common_crypt(char *key, char *buf, unsigned len, unsigned mode,
|
||||
struct desparams *desp)
|
||||
{
|
||||
int desdev;
|
||||
|
||||
|
@ -58,8 +58,7 @@ static char partab[128] = {
|
||||
* Add odd parity to low bit of 8 byte key
|
||||
*/
|
||||
void
|
||||
des_setparity(p)
|
||||
char *p;
|
||||
des_setparity(char *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -62,9 +62,7 @@ int (*__getpublickey_LOCAL)() = 0;
|
||||
* Get somebody's public key
|
||||
*/
|
||||
static int
|
||||
__getpublickey_real(netname, publickey)
|
||||
const char *netname;
|
||||
char *publickey;
|
||||
__getpublickey_real(const char *netname, char *publickey)
|
||||
{
|
||||
char lookup[3 * HEXKEYBYTES];
|
||||
char *p;
|
||||
@ -89,9 +87,7 @@ __getpublickey_real(netname, publickey)
|
||||
*/
|
||||
|
||||
int
|
||||
getpublicandprivatekey(key, ret)
|
||||
const char *key;
|
||||
char *ret;
|
||||
getpublicandprivatekey(const char *key, char *ret)
|
||||
{
|
||||
char buf[1024]; /* big enough */
|
||||
char *res;
|
||||
@ -166,9 +162,7 @@ getpublicandprivatekey(key, ret)
|
||||
}
|
||||
}
|
||||
|
||||
int getpublickey(netname, publickey)
|
||||
const char *netname;
|
||||
char *publickey;
|
||||
int getpublickey(const char *netname, char *publickey)
|
||||
{
|
||||
if (__getpublickey_LOCAL != NULL)
|
||||
return(__getpublickey_LOCAL(netname, publickey));
|
||||
|
@ -88,8 +88,7 @@ des_block *(*__key_gendes_LOCAL)() = 0;
|
||||
static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
|
||||
|
||||
int
|
||||
key_setsecret(secretkey)
|
||||
const char *secretkey;
|
||||
key_setsecret(const char *secretkey)
|
||||
{
|
||||
keystatus status;
|
||||
|
||||
@ -131,10 +130,7 @@ key_secretkey_is_set(void)
|
||||
}
|
||||
|
||||
int
|
||||
key_encryptsession_pk(remotename, remotekey, deskey)
|
||||
char *remotename;
|
||||
netobj *remotekey;
|
||||
des_block *deskey;
|
||||
key_encryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
|
||||
{
|
||||
cryptkeyarg2 arg;
|
||||
cryptkeyres res;
|
||||
@ -155,10 +151,7 @@ key_encryptsession_pk(remotename, remotekey, deskey)
|
||||
}
|
||||
|
||||
int
|
||||
key_decryptsession_pk(remotename, remotekey, deskey)
|
||||
char *remotename;
|
||||
netobj *remotekey;
|
||||
des_block *deskey;
|
||||
key_decryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
|
||||
{
|
||||
cryptkeyarg2 arg;
|
||||
cryptkeyres res;
|
||||
@ -179,9 +172,7 @@ key_decryptsession_pk(remotename, remotekey, deskey)
|
||||
}
|
||||
|
||||
int
|
||||
key_encryptsession(remotename, deskey)
|
||||
const char *remotename;
|
||||
des_block *deskey;
|
||||
key_encryptsession(const char *remotename, des_block *deskey)
|
||||
{
|
||||
cryptkeyarg arg;
|
||||
cryptkeyres res;
|
||||
@ -201,9 +192,7 @@ key_encryptsession(remotename, deskey)
|
||||
}
|
||||
|
||||
int
|
||||
key_decryptsession(remotename, deskey)
|
||||
const char *remotename;
|
||||
des_block *deskey;
|
||||
key_decryptsession(const char *remotename, des_block *deskey)
|
||||
{
|
||||
cryptkeyarg arg;
|
||||
cryptkeyres res;
|
||||
@ -223,8 +212,7 @@ key_decryptsession(remotename, deskey)
|
||||
}
|
||||
|
||||
int
|
||||
key_gendes(key)
|
||||
des_block *key;
|
||||
key_gendes(des_block *key)
|
||||
{
|
||||
if (!key_call((u_long)KEY_GEN, (xdrproc_t)xdr_void, NULL,
|
||||
(xdrproc_t)xdr_des_block, key)) {
|
||||
@ -234,8 +222,7 @@ key_gendes(key)
|
||||
}
|
||||
|
||||
int
|
||||
key_setnet(arg)
|
||||
struct key_netstarg *arg;
|
||||
key_setnet(struct key_netstarg *arg)
|
||||
{
|
||||
keystatus status;
|
||||
|
||||
@ -254,9 +241,7 @@ struct key_netstarg *arg;
|
||||
|
||||
|
||||
int
|
||||
key_get_conv(pkey, deskey)
|
||||
char *pkey;
|
||||
des_block *deskey;
|
||||
key_get_conv(char *pkey, des_block *deskey)
|
||||
{
|
||||
cryptkeyres res;
|
||||
|
||||
@ -305,8 +290,7 @@ key_call_init(void)
|
||||
* Keep the handle cached. This call may be made quite often.
|
||||
*/
|
||||
static CLIENT *
|
||||
getkeyserv_handle(vers)
|
||||
int vers;
|
||||
getkeyserv_handle(int vers)
|
||||
{
|
||||
void *localhandle;
|
||||
struct netconfig *nconf;
|
||||
@ -429,12 +413,8 @@ int vers;
|
||||
/* returns 0 on failure, 1 on success */
|
||||
|
||||
static int
|
||||
key_call(proc, xdr_arg, arg, xdr_rslt, rslt)
|
||||
u_long proc;
|
||||
xdrproc_t xdr_arg;
|
||||
void *arg;
|
||||
xdrproc_t xdr_rslt;
|
||||
void *rslt;
|
||||
key_call(u_long proc, xdrproc_t xdr_arg, void *arg, xdrproc_t xdr_rslt,
|
||||
void *rslt)
|
||||
{
|
||||
CLIENT *clnt;
|
||||
struct timeval wait_time;
|
||||
|
@ -88,14 +88,8 @@ static bool_t rpc_wrap_bcast(char *, struct netbuf *, struct netconfig *);
|
||||
* A common clnt create routine
|
||||
*/
|
||||
static CLIENT *
|
||||
clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp)
|
||||
struct sockaddr_in *raddr;
|
||||
rpcprog_t prog;
|
||||
rpcvers_t vers;
|
||||
int *sockp;
|
||||
u_int sendsz;
|
||||
u_int recvsz;
|
||||
char *tp;
|
||||
clnt_com_create(struct sockaddr_in *raddr, rpcprog_t prog, rpcvers_t vers, int *sockp,
|
||||
u_int sendsz, u_int recvsz, char *tp)
|
||||
{
|
||||
CLIENT *cl;
|
||||
int madefd = FALSE;
|
||||
@ -164,14 +158,8 @@ err: if (madefd == TRUE)
|
||||
}
|
||||
|
||||
CLIENT *
|
||||
clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
|
||||
struct sockaddr_in *raddr;
|
||||
u_long prog;
|
||||
u_long vers;
|
||||
struct timeval wait;
|
||||
int *sockp;
|
||||
u_int sendsz;
|
||||
u_int recvsz;
|
||||
clntudp_bufcreate(struct sockaddr_in *raddr, u_long prog, u_long vers,
|
||||
struct timeval wait, int *sockp, u_int sendsz, u_int recvsz)
|
||||
{
|
||||
CLIENT *cl;
|
||||
|
||||
@ -185,12 +173,8 @@ clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
|
||||
}
|
||||
|
||||
CLIENT *
|
||||
clntudp_create(raddr, program, version, wait, sockp)
|
||||
struct sockaddr_in *raddr;
|
||||
u_long program;
|
||||
u_long version;
|
||||
struct timeval wait;
|
||||
int *sockp;
|
||||
clntudp_create(struct sockaddr_in *raddr, u_long program, u_long version,
|
||||
struct timeval wait, int *sockp)
|
||||
{
|
||||
|
||||
return clntudp_bufcreate(raddr, program, version, wait, sockp,
|
||||
@ -198,13 +182,8 @@ clntudp_create(raddr, program, version, wait, sockp)
|
||||
}
|
||||
|
||||
CLIENT *
|
||||
clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
||||
struct sockaddr_in *raddr;
|
||||
u_long prog;
|
||||
u_long vers;
|
||||
int *sockp;
|
||||
u_int sendsz;
|
||||
u_int recvsz;
|
||||
clnttcp_create(struct sockaddr_in *raddr, u_long prog, u_long vers, int *sockp,
|
||||
u_int sendsz, u_int recvsz)
|
||||
{
|
||||
|
||||
return clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
||||
@ -212,9 +191,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
||||
}
|
||||
|
||||
CLIENT *
|
||||
clntraw_create(prog, vers)
|
||||
u_long prog;
|
||||
u_long vers;
|
||||
clntraw_create(u_long prog, u_long vers)
|
||||
{
|
||||
|
||||
return clnt_raw_create((rpcprog_t)prog, (rpcvers_t)vers);
|
||||
@ -224,11 +201,7 @@ clntraw_create(prog, vers)
|
||||
* A common server create routine
|
||||
*/
|
||||
static SVCXPRT *
|
||||
svc_com_create(fd, sendsize, recvsize, netid)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
char *netid;
|
||||
svc_com_create(int fd, u_int sendsize, u_int recvsize, char *netid)
|
||||
{
|
||||
struct netconfig *nconf;
|
||||
SVCXPRT *svc;
|
||||
@ -268,29 +241,21 @@ svc_com_create(fd, sendsize, recvsize, netid)
|
||||
}
|
||||
|
||||
SVCXPRT *
|
||||
svctcp_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svctcp_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
|
||||
return svc_com_create(fd, sendsize, recvsize, "tcp");
|
||||
}
|
||||
|
||||
SVCXPRT *
|
||||
svcudp_bufcreate(fd, sendsz, recvsz)
|
||||
int fd;
|
||||
u_int sendsz, recvsz;
|
||||
svcudp_bufcreate(int fd, u_int sendsz, u_int recvsz)
|
||||
{
|
||||
|
||||
return svc_com_create(fd, sendsz, recvsz, "udp");
|
||||
}
|
||||
|
||||
SVCXPRT *
|
||||
svcfd_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svcfd_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
|
||||
return svc_fd_create(fd, sendsize, recvsize);
|
||||
@ -298,8 +263,7 @@ svcfd_create(fd, sendsize, recvsize)
|
||||
|
||||
|
||||
SVCXPRT *
|
||||
svcudp_create(fd)
|
||||
int fd;
|
||||
svcudp_create(int fd)
|
||||
{
|
||||
|
||||
return svc_com_create(fd, UDPMSGSIZE, UDPMSGSIZE, "udp");
|
||||
@ -313,8 +277,7 @@ svcraw_create()
|
||||
}
|
||||
|
||||
int
|
||||
get_myaddress(addr)
|
||||
struct sockaddr_in *addr;
|
||||
get_myaddress(struct sockaddr_in *addr)
|
||||
{
|
||||
|
||||
memset((void *) addr, 0, sizeof(*addr));
|
||||
@ -328,11 +291,8 @@ get_myaddress(addr)
|
||||
* For connectionless "udp" transport. Obsoleted by rpc_call().
|
||||
*/
|
||||
int
|
||||
callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
|
||||
const char *host;
|
||||
int prognum, versnum, procnum;
|
||||
xdrproc_t inproc, outproc;
|
||||
void *in, *out;
|
||||
callrpc(const char *host, int prognum, int versnum, int procnum,
|
||||
xdrproc_t inproc, void *in, xdrproc_t outproc, void *out)
|
||||
{
|
||||
|
||||
return (int)rpc_call(host, (rpcprog_t)prognum, (rpcvers_t)versnum,
|
||||
@ -343,10 +303,9 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
|
||||
* For connectionless kind of transport. Obsoleted by rpc_reg()
|
||||
*/
|
||||
int
|
||||
registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
|
||||
int prognum, versnum, procnum;
|
||||
char *(*progname)(char [UDPMSGSIZE]);
|
||||
xdrproc_t inproc, outproc;
|
||||
registerrpc(int prognum, int versnum, int procnum,
|
||||
char *(*progname)(char [UDPMSGSIZE]),
|
||||
xdrproc_t inproc, xdrproc_t outproc)
|
||||
{
|
||||
|
||||
return rpc_reg((rpcprog_t)prognum, (rpcvers_t)versnum,
|
||||
@ -374,10 +333,12 @@ clnt_broadcast_key_init(void)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static bool_t
|
||||
rpc_wrap_bcast(resultp, addr, nconf)
|
||||
char *resultp; /* results of the call */
|
||||
struct netbuf *addr; /* address of the guy who responded */
|
||||
struct netconfig *nconf; /* Netconf of the transport */
|
||||
rpc_wrap_bcast(char *resultp, struct netbuf *addr, struct netconfig *nconf)
|
||||
/*
|
||||
* char *resultp; // results of the call
|
||||
* struct netbuf *addr; // address of the guy who responded
|
||||
* struct netconfig *nconf; // Netconf of the transport
|
||||
*/
|
||||
{
|
||||
resultproc_t clnt_broadcast_result;
|
||||
|
||||
@ -395,15 +356,18 @@ rpc_wrap_bcast(resultp, addr, nconf)
|
||||
* Broadcasts on UDP transport. Obsoleted by rpc_broadcast().
|
||||
*/
|
||||
enum clnt_stat
|
||||
clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
u_long prog; /* program number */
|
||||
u_long vers; /* version number */
|
||||
u_long proc; /* procedure number */
|
||||
xdrproc_t xargs; /* xdr routine for args */
|
||||
void *argsp; /* pointer to args */
|
||||
xdrproc_t xresults; /* xdr routine for results */
|
||||
void *resultsp; /* pointer to results */
|
||||
resultproc_t eachresult; /* call with each result obtained */
|
||||
clnt_broadcast(u_long prog, u_long vers, u_long proc, xdrproc_t xargs,
|
||||
void *argsp, xdrproc_t xresults, void *resultsp, resultproc_t eachresult)
|
||||
/*
|
||||
* u_long prog; // program number
|
||||
* u_long vers; // version number
|
||||
* u_long proc; // procedure number
|
||||
* xdrproc_t xargs; // xdr routine for args
|
||||
* void *argsp; // pointer to args
|
||||
* xdrproc_t xresults; // xdr routine for results
|
||||
* void *resultsp; // pointer to results
|
||||
* resultproc_t eachresult; // call with each result obtained
|
||||
*/
|
||||
{
|
||||
|
||||
if (thr_main())
|
||||
@ -422,11 +386,14 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
* authdes_seccreate().
|
||||
*/
|
||||
AUTH *
|
||||
authdes_create(servername, window, syncaddr, ckey)
|
||||
char *servername; /* network name of server */
|
||||
u_int window; /* time to live */
|
||||
struct sockaddr *syncaddr; /* optional hostaddr to sync with */
|
||||
des_block *ckey; /* optional conversation key to use */
|
||||
authdes_create(char *servername, u_int window, struct sockaddr *syncaddr,
|
||||
des_block *ckey)
|
||||
/*
|
||||
* char *servername; // network name of server
|
||||
* u_int window; // time to live
|
||||
* struct sockaddr *syncaddr; // optional hostaddr to sync with
|
||||
* des_block *ckey; // optional conversation key to use
|
||||
*/
|
||||
{
|
||||
AUTH *dummy;
|
||||
AUTH *nauth;
|
||||
@ -453,13 +420,8 @@ authdes_create(servername, window, syncaddr, ckey)
|
||||
* Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
|
||||
*/
|
||||
CLIENT *
|
||||
clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
||||
struct sockaddr_un *raddr;
|
||||
u_long prog;
|
||||
u_long vers;
|
||||
int *sockp;
|
||||
u_int sendsz;
|
||||
u_int recvsz;
|
||||
clntunix_create(struct sockaddr_un *raddr, u_long prog, u_long vers, int *sockp,
|
||||
u_int sendsz, u_int recvsz)
|
||||
{
|
||||
struct netbuf *svcaddr;
|
||||
CLIENT *cl;
|
||||
@ -504,11 +466,7 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
||||
* Obsoleted by svc_vc_create().
|
||||
*/
|
||||
SVCXPRT *
|
||||
svcunix_create(sock, sendsize, recvsize, path)
|
||||
int sock;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
char *path;
|
||||
svcunix_create(int sock, u_int sendsize, u_int recvsize, char *path)
|
||||
{
|
||||
struct netconfig *nconf;
|
||||
void *localhandle;
|
||||
@ -568,10 +526,7 @@ svcunix_create(sock, sendsize, recvsize, path)
|
||||
* descriptor as its first input. Obsoleted by svc_fd_create();
|
||||
*/
|
||||
SVCXPRT *
|
||||
svcunixfd_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svcunixfd_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
return (svc_fd_create(fd, sendsize, recvsize));
|
||||
}
|
||||
|
@ -109,9 +109,7 @@ static struct netbuf *got_entry(rpcb_entry_list_ptr, const struct netconfig *);
|
||||
* These are private routines that may not be provided in future releases.
|
||||
*/
|
||||
bool_t
|
||||
__rpc_control(request, info)
|
||||
int request;
|
||||
void *info;
|
||||
__rpc_control(int request, void *info)
|
||||
{
|
||||
switch (request) {
|
||||
case CLCR_GET_RPCB_TIMEOUT:
|
||||
@ -150,8 +148,7 @@ __rpc_control(request, info)
|
||||
*/
|
||||
|
||||
static struct address_cache *
|
||||
check_cache(host, netid)
|
||||
const char *host, *netid;
|
||||
check_cache(const char *host, const char *netid)
|
||||
{
|
||||
struct address_cache *cptr;
|
||||
|
||||
@ -171,8 +168,7 @@ check_cache(host, netid)
|
||||
}
|
||||
|
||||
static void
|
||||
delete_cache(addr)
|
||||
struct netbuf *addr;
|
||||
delete_cache(struct netbuf *addr)
|
||||
{
|
||||
struct address_cache *cptr, *prevptr = NULL;
|
||||
|
||||
@ -286,10 +282,7 @@ add_cache(host, netid, taddr, uaddr)
|
||||
* On error, returns NULL and free's everything.
|
||||
*/
|
||||
static CLIENT *
|
||||
getclnthandle(host, nconf, targaddr)
|
||||
const char *host;
|
||||
const struct netconfig *nconf;
|
||||
char **targaddr;
|
||||
getclnthandle(const char *host, const struct netconfig *nconf, char **targaddr)
|
||||
{
|
||||
CLIENT *client;
|
||||
struct netbuf *addr, taddr;
|
||||
@ -531,13 +524,13 @@ local_rpcb()
|
||||
/*
|
||||
* Set a mapping between program, version and address.
|
||||
* Calls the rpcbind service to do the mapping.
|
||||
*
|
||||
* nconf - Network structure of transport
|
||||
* address - Services netconfig address
|
||||
*/
|
||||
bool_t
|
||||
rpcb_set(program, version, nconf, address)
|
||||
rpcprog_t program;
|
||||
rpcvers_t version;
|
||||
const struct netconfig *nconf; /* Network structure of transport */
|
||||
const struct netbuf *address; /* Services netconfig address */
|
||||
rpcb_set(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf,
|
||||
const struct netbuf *address)
|
||||
{
|
||||
CLIENT *client;
|
||||
bool_t rslt = FALSE;
|
||||
@ -594,10 +587,7 @@ rpcb_set(program, version, nconf, address)
|
||||
* only for the given transport.
|
||||
*/
|
||||
bool_t
|
||||
rpcb_unset(program, version, nconf)
|
||||
rpcprog_t program;
|
||||
rpcvers_t version;
|
||||
const struct netconfig *nconf;
|
||||
rpcb_unset(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf)
|
||||
{
|
||||
CLIENT *client;
|
||||
bool_t rslt = FALSE;
|
||||
@ -634,9 +624,7 @@ rpcb_unset(program, version, nconf)
|
||||
* From the merged list, find the appropriate entry
|
||||
*/
|
||||
static struct netbuf *
|
||||
got_entry(relp, nconf)
|
||||
rpcb_entry_list_ptr relp;
|
||||
const struct netconfig *nconf;
|
||||
got_entry(rpcb_entry_list_ptr relp, const struct netconfig *nconf)
|
||||
{
|
||||
struct netbuf *na = NULL;
|
||||
rpcb_entry_list_ptr sp;
|
||||
@ -722,13 +710,9 @@ __rpcbind_is_up()
|
||||
* starts working properly. Also look under clnt_vc.c.
|
||||
*/
|
||||
struct netbuf *
|
||||
__rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
|
||||
rpcprog_t program;
|
||||
rpcvers_t version;
|
||||
const struct netconfig *nconf;
|
||||
const char *host;
|
||||
CLIENT **clpp;
|
||||
struct timeval *tp;
|
||||
__rpcb_findaddr_timed(rpcprog_t program, rpcvers_t version,
|
||||
const struct netconfig *nconf, const char *host,
|
||||
CLIENT **clpp, struct timeval *tp)
|
||||
{
|
||||
static bool_t check_rpcbind = TRUE;
|
||||
CLIENT *client = NULL;
|
||||
@ -1037,12 +1021,8 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
|
||||
* Assuming that the address is all properly allocated
|
||||
*/
|
||||
int
|
||||
rpcb_getaddr(program, version, nconf, address, host)
|
||||
rpcprog_t program;
|
||||
rpcvers_t version;
|
||||
const struct netconfig *nconf;
|
||||
struct netbuf *address;
|
||||
const char *host;
|
||||
rpcb_getaddr(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf,
|
||||
struct netbuf *address, const char *host)
|
||||
{
|
||||
struct netbuf *na;
|
||||
|
||||
@ -1073,9 +1053,7 @@ rpcb_getaddr(program, version, nconf, address, host)
|
||||
* It returns NULL on failure.
|
||||
*/
|
||||
rpcblist *
|
||||
rpcb_getmaps(nconf, host)
|
||||
const struct netconfig *nconf;
|
||||
const char *host;
|
||||
rpcb_getmaps(const struct netconfig *nconf, const char *host)
|
||||
{
|
||||
rpcblist_ptr head = NULL;
|
||||
CLIENT *client;
|
||||
@ -1206,9 +1184,7 @@ rpcb_rmtcall(nconf, host, prog, vers, proc, xdrargs, argsp,
|
||||
* Returns 1 if succeeds else 0.
|
||||
*/
|
||||
bool_t
|
||||
rpcb_gettime(host, timep)
|
||||
const char *host;
|
||||
time_t *timep;
|
||||
rpcb_gettime(const char *host, time_t *timep)
|
||||
{
|
||||
CLIENT *client = NULL;
|
||||
void *handle;
|
||||
@ -1267,9 +1243,7 @@ rpcb_gettime(host, timep)
|
||||
* really be called because local n2a libraries are always provided.
|
||||
*/
|
||||
char *
|
||||
rpcb_taddr2uaddr(nconf, taddr)
|
||||
struct netconfig *nconf;
|
||||
struct netbuf *taddr;
|
||||
rpcb_taddr2uaddr(struct netconfig *nconf, struct netbuf *taddr)
|
||||
{
|
||||
CLIENT *client;
|
||||
char *uaddr = NULL;
|
||||
@ -1301,9 +1275,7 @@ rpcb_taddr2uaddr(nconf, taddr)
|
||||
* really be called because local n2a libraries are always provided.
|
||||
*/
|
||||
struct netbuf *
|
||||
rpcb_uaddr2taddr(nconf, uaddr)
|
||||
struct netconfig *nconf;
|
||||
char *uaddr;
|
||||
rpcb_uaddr2taddr(struct netconfig *nconf, char *uaddr)
|
||||
{
|
||||
CLIENT *client;
|
||||
struct netbuf *taddr;
|
||||
|
@ -71,8 +71,7 @@ get_default_domain()
|
||||
* get rejected elsewhere in the NIS client package.
|
||||
*/
|
||||
int
|
||||
__rpc_get_default_domain(domain)
|
||||
char **domain;
|
||||
__rpc_get_default_domain(char **domain)
|
||||
{
|
||||
if ((*domain = get_default_domain()) != 0)
|
||||
return (0);
|
||||
|
@ -67,10 +67,8 @@ extern int _rpc_dtablesize( void );
|
||||
static void do_close( int );
|
||||
|
||||
int
|
||||
rtime(addrp, timep, timeout)
|
||||
struct sockaddr_in *addrp;
|
||||
struct timeval *timep;
|
||||
struct timeval *timeout;
|
||||
rtime(struct sockaddr_in *addrp, struct timeval *timep,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
int s;
|
||||
fd_set readfds;
|
||||
@ -148,8 +146,7 @@ rtime(addrp, timep, timeout)
|
||||
}
|
||||
|
||||
static void
|
||||
do_close(s)
|
||||
int s;
|
||||
do_close(int s)
|
||||
{
|
||||
int save;
|
||||
|
||||
|
@ -151,11 +151,7 @@ _authenticate(rqst, msg)
|
||||
* that don't need to inspect or modify the message body.
|
||||
*/
|
||||
static bool_t
|
||||
svcauth_null_wrap(auth, xdrs, xdr_func, xdr_ptr)
|
||||
SVCAUTH *auth;
|
||||
XDR *xdrs;
|
||||
xdrproc_t xdr_func;
|
||||
caddr_t xdr_ptr;
|
||||
svcauth_null_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
|
||||
{
|
||||
|
||||
return (xdr_func(xdrs, xdr_ptr));
|
||||
@ -168,9 +164,7 @@ struct svc_auth_ops svc_auth_null_ops = {
|
||||
|
||||
/*ARGSUSED*/
|
||||
enum auth_stat
|
||||
_svcauth_null(rqst, msg)
|
||||
struct svc_req *rqst;
|
||||
struct rpc_msg *msg;
|
||||
_svcauth_null(struct svc_req *rqst, struct rpc_msg *msg)
|
||||
{
|
||||
return (AUTH_OK);
|
||||
}
|
||||
@ -190,9 +184,8 @@ _svcauth_null(rqst, msg)
|
||||
*/
|
||||
|
||||
int
|
||||
svc_auth_reg(cred_flavor, handler)
|
||||
int cred_flavor;
|
||||
enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *);
|
||||
svc_auth_reg(int cred_flavor,
|
||||
enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *))
|
||||
{
|
||||
struct authsvc *asp;
|
||||
|
||||
|
@ -92,7 +92,7 @@ static short *authdes_lru/* [AUTHDES_CACHESZ] */;
|
||||
|
||||
static void cache_init(); /* initialize the cache */
|
||||
static short cache_spot(); /* find an entry in the cache */
|
||||
static void cache_ref(/*short sid*/); /* note that sid was ref'd */
|
||||
static void cache_ref(short sid); /* note that sid was ref'd */
|
||||
|
||||
static void invalidate(); /* invalidate entry in cache */
|
||||
|
||||
@ -109,9 +109,7 @@ static struct {
|
||||
* Service side authenticator for AUTH_DES
|
||||
*/
|
||||
enum auth_stat
|
||||
_svcauth_des(rqst, msg)
|
||||
struct svc_req *rqst;
|
||||
struct rpc_msg *msg;
|
||||
_svcauth_des(struct svc_req *rqst, struct rpc_msg *msg)
|
||||
{
|
||||
|
||||
long *ixdr;
|
||||
@ -387,8 +385,7 @@ cache_victim()
|
||||
* Note that sid was referenced
|
||||
*/
|
||||
static void
|
||||
cache_ref(sid)
|
||||
short sid;
|
||||
cache_ref(short sid)
|
||||
{
|
||||
int i;
|
||||
short curr;
|
||||
@ -410,10 +407,7 @@ cache_ref(sid)
|
||||
* return the spot in the cache.
|
||||
*/
|
||||
static short
|
||||
cache_spot(key, name, timestamp)
|
||||
des_block *key;
|
||||
char *name;
|
||||
struct timeval *timestamp;
|
||||
cache_spot(des_block *key, char *name, struct timeval *timestamp)
|
||||
{
|
||||
struct cache_entry *cp;
|
||||
int i;
|
||||
@ -461,12 +455,8 @@ struct bsdcred {
|
||||
* the credential.
|
||||
*/
|
||||
int
|
||||
authdes_getucred(adc, uid, gid, grouplen, groups)
|
||||
struct authdes_cred *adc;
|
||||
uid_t *uid;
|
||||
gid_t *gid;
|
||||
int *grouplen;
|
||||
gid_t *groups;
|
||||
authdes_getucred(struct authdes_cred *adc, uid_t *uid, gid_t *gid,
|
||||
int *grouplen, gid_t *groups)
|
||||
{
|
||||
unsigned sid;
|
||||
int i;
|
||||
@ -525,8 +515,7 @@ authdes_getucred(adc, uid, gid, grouplen, groups)
|
||||
}
|
||||
|
||||
static void
|
||||
invalidate(cred)
|
||||
char *cred;
|
||||
invalidate(char *cred)
|
||||
{
|
||||
if (cred == NULL) {
|
||||
return;
|
||||
|
@ -102,10 +102,7 @@ static const char svc_dg_err4[] = "cannot set IP_RECVDSTADDR";
|
||||
static const char __no_mem_str[] = "out of memory";
|
||||
|
||||
SVCXPRT *
|
||||
svc_dg_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svc_dg_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
SVCXPRT *xprt;
|
||||
struct svc_dg_data *su = NULL;
|
||||
@ -188,8 +185,7 @@ svc_dg_create(fd, sendsize, recvsize)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static enum xprt_stat
|
||||
svc_dg_stat(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_dg_stat(SVCXPRT *xprt)
|
||||
{
|
||||
return (XPRT_IDLE);
|
||||
}
|
||||
@ -250,9 +246,7 @@ svc_dg_recvfrom(int fd, char *buf, int buflen,
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_dg_recv(xprt, msg)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
svc_dg_recv(SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
{
|
||||
struct svc_dg_data *su = su_data(xprt);
|
||||
XDR *xdrs = &(su->su_xdrs);
|
||||
@ -335,9 +329,7 @@ svc_dg_sendto(int fd, char *buf, int buflen,
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_dg_reply(xprt, msg)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
svc_dg_reply(SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
{
|
||||
struct svc_dg_data *su = su_data(xprt);
|
||||
XDR *xdrs = &(su->su_xdrs);
|
||||
@ -378,10 +370,7 @@ svc_dg_reply(xprt, msg)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_dg_getargs(xprt, xdr_args, args_ptr)
|
||||
SVCXPRT *xprt;
|
||||
xdrproc_t xdr_args;
|
||||
void *args_ptr;
|
||||
svc_dg_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
|
||||
{
|
||||
struct svc_dg_data *su;
|
||||
|
||||
@ -392,10 +381,7 @@ svc_dg_getargs(xprt, xdr_args, args_ptr)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_dg_freeargs(xprt, xdr_args, args_ptr)
|
||||
SVCXPRT *xprt;
|
||||
xdrproc_t xdr_args;
|
||||
void *args_ptr;
|
||||
svc_dg_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
|
||||
{
|
||||
XDR *xdrs = &(su_data(xprt)->su_xdrs);
|
||||
|
||||
@ -404,8 +390,7 @@ svc_dg_freeargs(xprt, xdr_args, args_ptr)
|
||||
}
|
||||
|
||||
static void
|
||||
svc_dg_destroy(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_dg_destroy(SVCXPRT *xprt)
|
||||
{
|
||||
struct svc_dg_data *su = su_data(xprt);
|
||||
|
||||
@ -428,17 +413,13 @@ svc_dg_destroy(xprt)
|
||||
|
||||
static bool_t
|
||||
/*ARGSUSED*/
|
||||
svc_dg_control(xprt, rq, in)
|
||||
SVCXPRT *xprt;
|
||||
const u_int rq;
|
||||
void *in;
|
||||
svc_dg_control(SVCXPRT *xprt, const u_int rq, void *in)
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
svc_dg_ops(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_dg_ops(SVCXPRT *xprt)
|
||||
{
|
||||
static struct xp_ops ops;
|
||||
static struct xp_ops2 ops2;
|
||||
@ -536,9 +517,7 @@ static const char alloc_err[] = "could not allocate cache ";
|
||||
static const char enable_err[] = "cache already enabled";
|
||||
|
||||
int
|
||||
svc_dg_enablecache(transp, size)
|
||||
SVCXPRT *transp;
|
||||
u_int size;
|
||||
svc_dg_enablecache(SVCXPRT *transp, u_int size)
|
||||
{
|
||||
struct svc_dg_data *su = su_data(transp);
|
||||
struct cl_cache *uc;
|
||||
@ -593,9 +572,7 @@ static const char cache_set_err2[] = "victim alloc failed";
|
||||
static const char cache_set_err3[] = "could not allocate new rpc buffer";
|
||||
|
||||
static void
|
||||
cache_set(xprt, replylen)
|
||||
SVCXPRT *xprt;
|
||||
size_t replylen;
|
||||
cache_set(SVCXPRT *xprt, size_t replylen)
|
||||
{
|
||||
cache_ptr victim;
|
||||
cache_ptr *vicp;
|
||||
@ -683,11 +660,7 @@ cache_set(xprt, replylen)
|
||||
* return 1 if found, 0 if not found and set the stage for cache_set()
|
||||
*/
|
||||
static int
|
||||
cache_get(xprt, msg, replyp, replylenp)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
char **replyp;
|
||||
size_t *replylenp;
|
||||
cache_get(SVCXPRT *xprt, struct rpc_msg *msg, char **replyp, size_t *replylenp)
|
||||
{
|
||||
u_int loc;
|
||||
cache_ptr ent;
|
||||
|
@ -123,10 +123,7 @@ struct cf_conn { /* kept in xprt->xp_p1 for actual connection */
|
||||
* 0 => use the system default.
|
||||
*/
|
||||
SVCXPRT *
|
||||
svc_vc_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svc_vc_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
SVCXPRT *xprt = NULL;
|
||||
struct cf_rendezvous *r = NULL;
|
||||
@ -186,10 +183,7 @@ svc_vc_create(fd, sendsize, recvsize)
|
||||
* descriptor as its first input.
|
||||
*/
|
||||
SVCXPRT *
|
||||
svc_fd_create(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
svc_fd_create(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
struct sockaddr_storage ss;
|
||||
socklen_t slen;
|
||||
@ -243,10 +237,7 @@ svc_fd_create(fd, sendsize, recvsize)
|
||||
}
|
||||
|
||||
static SVCXPRT *
|
||||
makefd_xprt(fd, sendsize, recvsize)
|
||||
int fd;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
makefd_xprt(int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
SVCXPRT *xprt;
|
||||
struct cf_conn *cd;
|
||||
@ -285,9 +276,7 @@ makefd_xprt(fd, sendsize, recvsize)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static bool_t
|
||||
rendezvous_request(xprt, msg)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
rendezvous_request(SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
{
|
||||
int sock, flags;
|
||||
struct cf_rendezvous *r;
|
||||
@ -366,16 +355,14 @@ rendezvous_request(xprt, msg)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static enum xprt_stat
|
||||
rendezvous_stat(xprt)
|
||||
SVCXPRT *xprt;
|
||||
rendezvous_stat(SVCXPRT *xprt)
|
||||
{
|
||||
|
||||
return (XPRT_IDLE);
|
||||
}
|
||||
|
||||
static void
|
||||
svc_vc_destroy(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_vc_destroy(SVCXPRT *xprt)
|
||||
{
|
||||
assert(xprt != NULL);
|
||||
|
||||
@ -384,8 +371,7 @@ svc_vc_destroy(xprt)
|
||||
}
|
||||
|
||||
static void
|
||||
__svc_vc_dodestroy(xprt)
|
||||
SVCXPRT *xprt;
|
||||
__svc_vc_dodestroy(SVCXPRT *xprt)
|
||||
{
|
||||
struct cf_conn *cd;
|
||||
struct cf_rendezvous *r;
|
||||
@ -417,19 +403,13 @@ __svc_vc_dodestroy(xprt)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static bool_t
|
||||
svc_vc_control(xprt, rq, in)
|
||||
SVCXPRT *xprt;
|
||||
const u_int rq;
|
||||
void *in;
|
||||
svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in)
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_vc_rendezvous_control(xprt, rq, in)
|
||||
SVCXPRT *xprt;
|
||||
const u_int rq;
|
||||
void *in;
|
||||
svc_vc_rendezvous_control(SVCXPRT *xprt, const u_int rq, void *in)
|
||||
{
|
||||
struct cf_rendezvous *cfp;
|
||||
|
||||
@ -457,10 +437,7 @@ svc_vc_rendezvous_control(xprt, rq, in)
|
||||
* fatal for the connection.
|
||||
*/
|
||||
static int
|
||||
read_vc(xprtp, buf, len)
|
||||
void *xprtp;
|
||||
void *buf;
|
||||
int len;
|
||||
read_vc(void *xprtp, void *buf, int len)
|
||||
{
|
||||
SVCXPRT *xprt;
|
||||
int sock;
|
||||
@ -520,10 +497,7 @@ read_vc(xprtp, buf, len)
|
||||
* Any error is fatal and the connection is closed.
|
||||
*/
|
||||
static int
|
||||
write_vc(xprtp, buf, len)
|
||||
void *xprtp;
|
||||
void *buf;
|
||||
int len;
|
||||
write_vc(void *xprtp, void *buf, int len)
|
||||
{
|
||||
SVCXPRT *xprt;
|
||||
int i, cnt;
|
||||
@ -567,8 +541,7 @@ write_vc(xprtp, buf, len)
|
||||
}
|
||||
|
||||
static enum xprt_stat
|
||||
svc_vc_stat(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_vc_stat(SVCXPRT *xprt)
|
||||
{
|
||||
struct cf_conn *cd;
|
||||
|
||||
@ -584,9 +557,7 @@ svc_vc_stat(xprt)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_vc_recv(xprt, msg)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
svc_vc_recv(SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
{
|
||||
struct cf_conn *cd;
|
||||
XDR *xdrs;
|
||||
@ -614,10 +585,7 @@ svc_vc_recv(xprt, msg)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_vc_getargs(xprt, xdr_args, args_ptr)
|
||||
SVCXPRT *xprt;
|
||||
xdrproc_t xdr_args;
|
||||
void *args_ptr;
|
||||
svc_vc_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
|
||||
{
|
||||
struct cf_conn *cd;
|
||||
|
||||
@ -628,10 +596,7 @@ svc_vc_getargs(xprt, xdr_args, args_ptr)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_vc_freeargs(xprt, xdr_args, args_ptr)
|
||||
SVCXPRT *xprt;
|
||||
xdrproc_t xdr_args;
|
||||
void *args_ptr;
|
||||
svc_vc_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
|
||||
{
|
||||
XDR *xdrs;
|
||||
|
||||
@ -645,9 +610,7 @@ svc_vc_freeargs(xprt, xdr_args, args_ptr)
|
||||
}
|
||||
|
||||
static bool_t
|
||||
svc_vc_reply(xprt, msg)
|
||||
SVCXPRT *xprt;
|
||||
struct rpc_msg *msg;
|
||||
svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
{
|
||||
struct cf_conn *cd;
|
||||
XDR *xdrs;
|
||||
@ -689,8 +652,7 @@ svc_vc_reply(xprt, msg)
|
||||
}
|
||||
|
||||
static void
|
||||
svc_vc_ops(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_vc_ops(SVCXPRT *xprt)
|
||||
{
|
||||
static struct xp_ops ops;
|
||||
static struct xp_ops2 ops2;
|
||||
@ -713,8 +675,7 @@ svc_vc_ops(xprt)
|
||||
}
|
||||
|
||||
static void
|
||||
svc_vc_rendezvous_ops(xprt)
|
||||
SVCXPRT *xprt;
|
||||
svc_vc_rendezvous_ops(SVCXPRT *xprt)
|
||||
{
|
||||
static struct xp_ops ops;
|
||||
static struct xp_ops2 ops2;
|
||||
|
Loading…
Reference in New Issue
Block a user