diff options
author | Steve Dickson <SteveD@redhat.com> | 2006-06-26 15:23:19 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-06-26 15:23:19 +1000 |
commit | fde2ae7794047a698feeaf17963d690a1e660a80 (patch) | |
tree | 3fec36ef5414306769e9c0c9e0e7833636e30b87 /support/include | |
parent | 0523fd513c6baa8dbf45d1a7afea2044262aeb3d (diff) | |
download | nfs-utils-fde2ae7794047a698feeaf17963d690a1e660a80.tar.gz nfs-utils-fde2ae7794047a698feeaf17963d690a1e660a80.tar.xz nfs-utils-fde2ae7794047a698feeaf17963d690a1e660a80.zip |
Add support for suppressing different NFS versions.
e.g. -N 2
means that NFSv2 won't be supported, just v3 and v4 (if the kernel
supports them).
Diffstat (limited to 'support/include')
-rw-r--r-- | support/include/nfs/nfs.h | 7 | ||||
-rw-r--r-- | support/include/nfslib.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index c7fc42c..2cf6857 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -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,11 @@ struct nfs_fh_old { #define NFSCTL_LOCKD 0x10000 #define LOCKDCTL_SVC NFSCTL_LOCKD +#define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) + +#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << ((_v) - 1))) +#define NFSCTL_ALLBITS (~0) /* SVC */ struct nfsctl_svc { diff --git a/support/include/nfslib.h b/support/include/nfslib.h index 8c83262..50892e2 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -120,7 +120,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); int nfsaddclient(struct nfsctl_client *clp); int nfsdelclient(struct nfsctl_client *clp); int nfsexport(struct nfsctl_export *exp); |