]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
2001-02-02 H.J. Lu <hjl@lucon.org>
authorhjl <hjl>
Sun, 11 Feb 2001 01:11:44 +0000 (01:11 +0000)
committerhjl <hjl>
Sun, 11 Feb 2001 01:11:44 +0000 (01:11 +0000)
* 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
support/include/rpcmisc.h
support/nfs/rpcmisc.c
utils/mountd/mountd.c

index 63b90203fbefafbae012899654f60a130bae4ff9..2957b699dce0202deb9099cbccc713be5cdad0fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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.
 2001-01-28  Chip Salzenberg  <chip@valinux.com>
 
        * debian/changelog: Version 0.3-1.
index 06970cde223a4e48d45802cbe3a20c730aa548b2..d999ab9346518d716e3d62e91f28613cb0a96d7a 100644 (file)
@@ -43,7 +43,7 @@ struct rpc_dtable {
 
 void           rpc_init(char *name, int prog, int vers,
                                void (*dispatch)(struct svc_req *, SVCXPRT *),
 
 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,
 void           rpc_svcrun(void);
 void           rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt,
                                struct rpc_dtable *dtable, int nvers,
index 4bb4ec8ce2963b12f4d1e1d6f62cf87fd7539b49..64bc802d96c5417945770d2d04a87942c3964aeb 100644 (file)
@@ -32,7 +32,7 @@
 #include "nfslib.h"
 
 static void    closedown(int sig);
 #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;
 
 #define _RPCSVC_CLOSEDOWN      120
 int    _rpcpmstart = 0;
@@ -40,8 +40,7 @@ int   _rpcfdtype = 0;
 int    _rpcsvcdirty = 0;
 
 void
 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;
 {
        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;
                        }
                                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);
                        }
                                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;
                        }
                                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);
                        }
                                xlog(L_FATAL, "%s: cannot make a TCP socket\n",
                                                name);
                        }
@@ -145,10 +144,9 @@ int sig;
        (void) alarm(_RPCSVC_CLOSEDOWN);
 }
 
        (void) alarm(_RPCSVC_CLOSEDOWN);
 }
 
-static int makesock(port, proto, socksz)
+static int makesock(port, proto)
 int port;
 int proto;
 int port;
 int proto;
-int socksz;
 {
        struct sockaddr_in sin;
        int     s;
 {
        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 (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;
 #ifdef SO_SNDBUF
        {
                int sblen, rblen;
@@ -182,6 +183,7 @@ int socksz;
                        xlog(L_ERROR, "setsockopt failed: %s\n", strerror(errno));
        }
 #endif                         /* SO_SNDBUF */
                        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 (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) {
                xlog(L_FATAL, "Could not bind name to socket: %s\n",
index 4df7083e1815efd11d99b026d1e88ae5082b220b..8779afed4a4fbb73ff59c3a3e1d6a93da15591be 100644 (file)
@@ -454,13 +454,13 @@ main(int argc, char **argv)
 
        if (nfs_version & 0x1)
                rpc_init("mountd", MOUNTPROG, MOUNTVERS,
 
        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,
        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,
        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);
 
        sa.sa_handler = killer;
        sigaction(SIGHUP, &sa, NULL);