diff options
Diffstat (limited to 'lib/libc/rpc/svc_vc.c')
-rw-r--r-- | lib/libc/rpc/svc_vc.c | 77 |
1 files changed, 19 insertions, 58 deletions
diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c index 6ce99d3..912383d 100644 --- a/lib/libc/rpc/svc_vc.c +++ b/lib/libc/rpc/svc_vc.c @@ -123,12 +123,9 @@ 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; + SVCXPRT *xprt = NULL; struct cf_rendezvous *r = NULL; struct __rpc_sockinfo si; struct sockaddr_storage sslocal; @@ -186,10 +183,7 @@ cleanup_svc_vc_create: * 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 @@ freedata: } 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 @@ done: /*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; @@ -380,16 +369,14 @@ again: /*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); @@ -398,8 +385,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; @@ -429,19 +415,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; @@ -469,10 +449,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; @@ -532,10 +509,7 @@ fatal_err: * 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; @@ -579,8 +553,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; @@ -596,9 +569,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; @@ -626,10 +597,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; @@ -640,10 +608,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; @@ -657,9 +622,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; @@ -701,8 +664,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; @@ -725,8 +687,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; |