]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/nfs/nfs.h
nfsd: Disble NFS 4.1 functionality by default
[nfs-utils.git] / support / include / nfs / nfs.h
index f0286b2ca07704a49c84502004333aefd8fceea5..c939d78105b6599857d659b9ba99178e85c98aa4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _NFS_NFS_H
 #define _NFS_NFS_H
 
+#include <config.h>
+
 #include <linux/posix_types.h>
 #include <sys/types.h>
 #include <netinet/in.h>
 #define NFSD_MINVERS 2
 #define NFSD_MAXVERS 4
 
+#define NFSD_MINMINORVERS4 1
+#ifdef  NFS41_SUPPORTED
+#define NFSD_MAXMINORVERS4 1
+#else
+#define NFSD_MAXMINORVERS4 0
+#endif
+
 struct nfs_fh_len {
        int             fh_size;
        u_int8_t        fh_handle[NFS3_FHSIZE];
@@ -39,18 +48,21 @@ struct nfs_fh_old {
 #define NFSCTL_GETFD           7       /* get an fh by path (used by mountd) */
 #define NFSCTL_GETFS           8       /* get an fh by path with max size (used by mountd) */
 
-/* Above this is for lockd. */
-#define NFSCTL_LOCKD           0x10000
-#define LOCKDCTL_SVC           NFSCTL_LOCKD
+#define NFSCTL_UDPBIT                (1 << (17 - 1))
+#define NFSCTL_TCPBIT                (1 << (18 - 1))
 
 #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_UDPUNSET(_cltbits)     ((_cltbits) &= ~NFSCTL_UDPBIT
+#define NFSCTL_TCPUNSET(_cltbits)     ((_cltbits) &= ~NFSCTL_TCPBIT
 
 #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_UDPISSET(_cltbits)     ((_cltbits) & NFSCTL_UDPBIT) 
+#define NFSCTL_TCPISSET(_cltbits)     ((_cltbits) & NFSCTL_TCPBIT) 
+
+#define NFSCTL_UDPSET(_cltbits)       ((_cltbits) |= NFSCTL_UDPBIT)
+#define NFSCTL_TCPSET(_cltbits)       ((_cltbits) |= NFSCTL_TCPBIT)
 
+#define NFSCTL_ANYPROTO(_cltbits)     ((_cltbits) & (NFSCTL_UDPBIT | NFSCTL_TCPBIT))
 #define NFSCTL_ALLBITS (~0)
 
 /* SVC */