nfs-utils 8 of 10 - added the command line arguments to rpc.nfsd
Subsystems (2)
PATCH 1/1 nfs-utils 8 of 10 - added the command line arguments to rpc.nfsd
These patches also added the command line arguments to rpc.nfsd:
-N or --no-nfs-version vers
This option can be used to request that rpc.nfsd does not offer certain versions of NFS. The current version of rpc.nfsd can support both NFS version 2,3 and the newer version 4.
-T or --no-tcp
Disable rpc.nfsd from accepting TCP connections from clients.
-U or --no-udp
Disable rpc.nfsd from accepting UDP connections from clients.
Signed-off-by Steve Dickson <[email protected]>
---------
support/include/nfs/nfs.h renamed from support/include/nfs/nfs.h.ctlbits +11 -0
@@ -10,6 +10,9 @@#define NFS3_FHSIZE 64#define NFS_FHSIZE 32 +#define NFSD_MINVERS 2 +#define NFSD_MAXVERS 4 +struct nfs_fh_len {int fh_size;u_int8_t fh_handle[NFS3_FHSIZE ];
@@ -40,7 +43,15 @@ struct nfs_fh_old {#define NFSCTL_LOCKD 0x10000#define LOCKDCTL_SVC NFSCTL_LOCKD +#define NFSCTL_VERUNSET (_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) +#define NFSCTL_UDPUNSET (_cltbits) ((_cltbits) &= ~(1 << (17 - 1))) +#define NFSCTL_TCPUNSET (_cltbits) ((_cltbits) &= ~(1 << (18 - 1))) + +#define NFSCTL_VERISSET (_cltbits, _v) ((_cltbits) & (1 << ((_v) - 1))) +#define NFSCTL_UDPISSET (_cltbits) ((_cltbits) & (1 << (17 - 1))) +#define NFSCTL_TCPISSET (_cltbits) ((_cltbits) & (1 << (18 - 1))) +#define NFSCTL_ALLBITS (~0)/* SVC */ struct nfsctl_svc {
support/include/nfslib.h renamed from support/include/nfslib.h.ctlbits +1 -1
@@ -118,7 +118,7 @@ int wildmat(char *text, char *pattern)* nfsd library functions. */ int nfsctl (int ,struct nfsctl_arg *,union nfsctl_res *); -int nfssvc (int port,int nrservs); +int nfssvc (int port,int nrservs,unsigned int versbits,unsigned int portbits);int nfsaddclient (struct nfsctl_client *clp);int nfsdelclient (struct nfsctl_client *clp);int nfsexport (struct nfsctl_export *exp);
support/nfs/nfssvc.c renamed from support/nfs/nfssvc.c.ctlbits +58 -1
73 lines not on this page · raw message
utils/nfsd/nfsd.c renamed from utils/nfsd/nfsd.c.ctlbits +59 -8
112 lines not on this page · raw message
utils/nfsd/nfsd.man renamed from utils/nfsd/nfsd.man.ctlbits +19 -2
@@ -6,7 +6,7 @@ .SH NAME rpc.nfsd \- NFS server process .SH SYNOPSIS -.BI "/usr/sbin/rpc.nfsd [-p " port "] " nproc +.BI "/usr/sbin/rpc.nfsd [" options "]" " "nproc .SH DESCRIPTION The .B rpc.nfsd
@@ -22,11 +22,28 @@ server provides an ancillary service nee by NFS clients. .SH OPTIONS .TP -.BI \-p " port" +.B \-p " or " \-\-port port specify a diferent port to listen on for NFS requests. By default, .B rpc.nfsd will listen on port 2049. .TP +.B \-N " or " \-\-no-nfs-version vers +This option can be used to request that +.B rpc.nfsd +does not offer certain versions of NFS. The current version of +.B rpc.nfsd +can support both NFS version 2,3 and the newer version 4. +.TP +.B \-T " or " \-\-no-tcp +Disable +.B rpc.nfsd +from accepting TCP connections from clients. +.TP +.B \-U " or " \-\-no-udp +Disable +.B rpc.nfsd +from accepting UDP connections from clients. +.TP .I nproc specify the number of NFS server threads. By default, just one thread is started. However, for optimum performance several threads