+2001-02-02 H.J. Lu <hjl@lucon.org>
+
+ * 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 <chip@valinux.com>
* debian/changelog: Version 0.3-1.
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,
#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;
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;
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);
}
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);
}
(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;
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;
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",
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);