X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Finclude%2Fnfs%2Fnfs.h;h=c939d78105b6599857d659b9ba99178e85c98aa4;hp=c7fc42cb8be55f6d1106d3449fed7d3b1f21477d;hb=6d5ac3fa75024be569b458f4d9b6ce05be47f601;hpb=05250b116ba3d9e488e52dfeeddbaab929fbd751 diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index c7fc42c..c939d78 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -1,6 +1,8 @@ #ifndef _NFS_NFS_H #define _NFS_NFS_H +#include + #include #include #include @@ -10,6 +12,16 @@ #define NFS3_FHSIZE 64 #define NFS_FHSIZE 32 +#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]; @@ -36,11 +48,22 @@ 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) &= ~NFSCTL_UDPBIT) +#define NFSCTL_TCPUNSET(_cltbits) ((_cltbits) &= ~NFSCTL_TCPBIT) + +#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << ((_v) - 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 */ struct nfsctl_svc {