aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs/nfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfs/nfs.h')
-rw-r--r--sys/fs/nfs/nfs.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h
index e2f26ff5ac4e..e47f0d130c08 100644
--- a/sys/fs/nfs/nfs.h
+++ b/sys/fs/nfs/nfs.h
@@ -252,6 +252,11 @@ struct nfsd_oidargs {
int nid_namelen; /* and its length */
};
+struct nfsuserd_args {
+ sa_family_t nuserd_family; /* Address family to use */
+ u_short nuserd_port; /* Port# */
+};
+
struct nfsd_clid {
int nclid_idlen; /* Length of client id */
u_char nclid_id[NFSV4_OPAQUELIMIT]; /* and name */
@@ -418,10 +423,14 @@ typedef struct {
(t)->bits[2] = (f)->bits[2]; \
} while (0)
-#define NFSSETSUPP_ATTRBIT(b) do { \
+#define NFSSETSUPP_ATTRBIT(b, n) do { \
(b)->bits[0] = NFSATTRBIT_SUPP0; \
- (b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY); \
- (b)->bits[2] = NFSATTRBIT_SUPP2; \
+ (b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY1); \
+ (b)->bits[2] = (NFSATTRBIT_SUPP2 | NFSATTRBIT_SUPPSETONLY2); \
+ if (((n)->nd_flag & ND_NFSV41) == 0) { \
+ (b)->bits[1] &= ~NFSATTRBIT_NFSV41_1; \
+ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \
+ } \
} while (0)
#define NFSISSET_ATTRBIT(b, p) ((b)->bits[(p) / 32] & (1 << ((p) % 32)))
@@ -440,16 +449,22 @@ typedef struct {
(b)->bits[2] &= ((a)->bits[2]); \
} while (0)
-#define NFSCLRNOTFILLABLE_ATTRBIT(b) do { \
+#define NFSCLRNOTFILLABLE_ATTRBIT(b, n) do { \
(b)->bits[0] &= NFSATTRBIT_SUPP0; \
(b)->bits[1] &= NFSATTRBIT_SUPP1; \
(b)->bits[2] &= NFSATTRBIT_SUPP2; \
+ if (((n)->nd_flag & ND_NFSV41) == 0) { \
+ (b)->bits[1] &= ~NFSATTRBIT_NFSV41_1; \
+ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \
+ } \
} while (0)
-#define NFSCLRNOTSETABLE_ATTRBIT(b) do { \
+#define NFSCLRNOTSETABLE_ATTRBIT(b, n) do { \
(b)->bits[0] &= NFSATTRBIT_SETABLE0; \
(b)->bits[1] &= NFSATTRBIT_SETABLE1; \
(b)->bits[2] &= NFSATTRBIT_SETABLE2; \
+ if (((n)->nd_flag & ND_NFSV41) == 0) \
+ (b)->bits[2] &= ~NFSATTRBIT_NFSV41_2; \
} while (0)
#define NFSNONZERO_ATTRBIT(b) ((b)->bits[0] || (b)->bits[1] || (b)->bits[2])