From 0bdb8d4f216cafb4fef03c9a1fc1f87508eed2d3 Mon Sep 17 00:00:00 2001 From: hjl Date: Sun, 11 Feb 2001 01:11:44 +0000 Subject: [PATCH] 2001-02-02 H.J. Lu * support/include/rpcmisc.h (rpc_init): Remove bufsize. * support/nfs/rpcmisc.c (makesock): Remove socksz and comment out SO_SNDBUF/SO_RCVBUF. (rpc_init): Remove bufsize and remove socksz in calls to makesock (). * utils/mountd/mountd.c (main): Remove bufsize in calls to rpc_init (). --- ChangeLog | 12 ++++++++++++ support/include/rpcmisc.h | 2 +- support/nfs/rpcmisc.c | 16 +++++++++------- utils/mountd/mountd.c | 6 +++--- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63b9020..2957b69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-02-02 H.J. Lu + + * support/include/rpcmisc.h (rpc_init): Remove bufsize. + + * support/nfs/rpcmisc.c (makesock): Remove socksz and comment + out SO_SNDBUF/SO_RCVBUF. + (rpc_init): Remove bufsize and remove socksz in calls to + makesock (). + + * utils/mountd/mountd.c (main): Remove bufsize in calls to + rpc_init (). + 2001-01-28 Chip Salzenberg * debian/changelog: Version 0.3-1. diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h index 06970cd..d999ab9 100644 --- a/support/include/rpcmisc.h +++ b/support/include/rpcmisc.h @@ -43,7 +43,7 @@ struct rpc_dtable { void rpc_init(char *name, int prog, int vers, void (*dispatch)(struct svc_req *, SVCXPRT *), - int defport, int bufsize); + int defport); void rpc_svcrun(void); void rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt, struct rpc_dtable *dtable, int nvers, diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index 4bb4ec8..64bc802 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -32,7 +32,7 @@ #include "nfslib.h" static void closedown(int sig); -static int makesock(int port, int proto, int socksz); +static int makesock(int port, int proto); #define _RPCSVC_CLOSEDOWN 120 int _rpcpmstart = 0; @@ -40,8 +40,7 @@ int _rpcfdtype = 0; int _rpcsvcdirty = 0; void -rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport, - int bufsiz) +rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport) { struct sockaddr_in saddr; SVCXPRT *transp; @@ -73,7 +72,7 @@ rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport, transp = last_transp; goto udp_transport; } - if ((sock = makesock(defport, IPPROTO_UDP, bufsiz)) < 0) { + if ((sock = makesock(defport, IPPROTO_UDP)) < 0) { xlog(L_FATAL, "%s: cannot make a UDP socket\n", name); } @@ -99,7 +98,7 @@ rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport, transp = last_transp; goto tcp_transport; } - if ((sock = makesock(defport, IPPROTO_TCP, bufsiz)) < 0) { + if ((sock = makesock(defport, IPPROTO_TCP)) < 0) { xlog(L_FATAL, "%s: cannot make a TCP socket\n", name); } @@ -145,10 +144,9 @@ int sig; (void) alarm(_RPCSVC_CLOSEDOWN); } -static int makesock(port, proto, socksz) +static int makesock(port, proto) int port; int proto; -int socksz; { struct sockaddr_in sin; int s; @@ -171,6 +169,9 @@ int socksz; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) xlog(L_ERROR, "setsockopt failed: %s\n", strerror(errno)); +#if 0 + /* I was told it didn't work with gigabit ethernet. + Don't bothet with it. H.J. */ #ifdef SO_SNDBUF { int sblen, rblen; @@ -182,6 +183,7 @@ int socksz; xlog(L_ERROR, "setsockopt failed: %s\n", strerror(errno)); } #endif /* SO_SNDBUF */ +#endif if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) { xlog(L_FATAL, "Could not bind name to socket: %s\n", diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 4df7083..8779afe 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -454,13 +454,13 @@ main(int argc, char **argv) if (nfs_version & 0x1) rpc_init("mountd", MOUNTPROG, MOUNTVERS, - mount_dispatch, port, 0); + mount_dispatch, port); if (nfs_version & (0x1 << 1)) rpc_init("mountd", MOUNTPROG, MOUNTVERS_POSIX, - mount_dispatch, port, 0); + mount_dispatch, port); if (nfs_version & (0x1 << 2)) rpc_init("mountd", MOUNTPROG, MOUNTVERS_NFSV3, - mount_dispatch, port, 0); + mount_dispatch, port); sa.sa_handler = killer; sigaction(SIGHUP, &sa, NULL); -- 2.39.2