Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


nfs4.h
001: /*
002:  *  include/linux/nfs4.h
003:  *
004:  *  NFSv4 protocol definitions.
005:  *
006:  *  Copyright (c) 2002 The Regents of the University of Michigan.
007:  *  All rights reserved.
008:  *
009:  *  Kendrick Smith <kmsmith@umich.edu>
010:  *  Andy Adamson   <andros@umich.edu>
011:  */
012: 
013: #ifndef _LINUX_NFS4_H
014: #define _LINUX_NFS4_H
015: 
016: #include <linux/types.h>
017: 
018: #define NFS4_BITMAP_SIZE        2
019: #define NFS4_VERIFIER_SIZE      8
020: #define NFS4_STATEID_SEQID_SIZE 4
021: #define NFS4_STATEID_OTHER_SIZE 12
022: #define NFS4_STATEID_SIZE       (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
023: #define NFS4_FHSIZE             128
024: #define NFS4_MAXPATHLEN         PATH_MAX
025: #define NFS4_MAXNAMLEN          NAME_MAX
026: #define NFS4_OPAQUE_LIMIT       1024
027: #define NFS4_MAX_SESSIONID_LEN  16
028: 
029: #define NFS4_ACCESS_READ        0x0001
030: #define NFS4_ACCESS_LOOKUP      0x0002
031: #define NFS4_ACCESS_MODIFY      0x0004
032: #define NFS4_ACCESS_EXTEND      0x0008
033: #define NFS4_ACCESS_DELETE      0x0010
034: #define NFS4_ACCESS_EXECUTE     0x0020
035: 
036: #define NFS4_FH_PERSISTENT              0x0000
037: #define NFS4_FH_NOEXPIRE_WITH_OPEN      0x0001
038: #define NFS4_FH_VOLATILE_ANY            0x0002
039: #define NFS4_FH_VOL_MIGRATION           0x0004
040: #define NFS4_FH_VOL_RENAME              0x0008
041: 
042: #define NFS4_OPEN_RESULT_CONFIRM 0x0002
043: #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
044: 
045: #define NFS4_SHARE_ACCESS_MASK  0x000F
046: #define NFS4_SHARE_ACCESS_READ  0x0001
047: #define NFS4_SHARE_ACCESS_WRITE 0x0002
048: #define NFS4_SHARE_ACCESS_BOTH  0x0003
049: #define NFS4_SHARE_DENY_READ    0x0001
050: #define NFS4_SHARE_DENY_WRITE   0x0002
051: #define NFS4_SHARE_DENY_BOTH    0x0003
052: 
053: /* nfs41 */
054: #define NFS4_SHARE_WANT_MASK            0xFF00
055: #define NFS4_SHARE_WANT_NO_PREFERENCE   0x0000
056: #define NFS4_SHARE_WANT_READ_DELEG      0x0100
057: #define NFS4_SHARE_WANT_WRITE_DELEG     0x0200
058: #define NFS4_SHARE_WANT_ANY_DELEG       0x0300
059: #define NFS4_SHARE_WANT_NO_DELEG        0x0400
060: #define NFS4_SHARE_WANT_CANCEL          0x0500
061: 
062: #define NFS4_SHARE_WHEN_MASK            0xF0000
063: #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL        0x10000
064: #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED          0x20000
065: 
066: #define NFS4_CDFC4_FORE 0x1
067: #define NFS4_CDFC4_BACK 0x2
068: #define NFS4_CDFC4_BOTH 0x3
069: #define NFS4_CDFC4_FORE_OR_BOTH 0x3
070: #define NFS4_CDFC4_BACK_OR_BOTH 0x7
071: 
072: #define NFS4_SET_TO_SERVER_TIME 0
073: #define NFS4_SET_TO_CLIENT_TIME 1
074: 
075: #define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
076: #define NFS4_ACE_ACCESS_DENIED_ACE_TYPE  1
077: #define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE   2
078: #define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE   3
079: 
080: #define ACL4_SUPPORT_ALLOW_ACL 0x01
081: #define ACL4_SUPPORT_DENY_ACL  0x02
082: #define ACL4_SUPPORT_AUDIT_ACL 0x04
083: #define ACL4_SUPPORT_ALARM_ACL 0x08
084: 
085: #define NFS4_ACE_FILE_INHERIT_ACE             0x00000001
086: #define NFS4_ACE_DIRECTORY_INHERIT_ACE        0x00000002
087: #define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE     0x00000004
088: #define NFS4_ACE_INHERIT_ONLY_ACE             0x00000008
089: #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG   0x00000010
090: #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG       0x00000020
091: #define NFS4_ACE_IDENTIFIER_GROUP             0x00000040
092: 
093: #define NFS4_ACE_READ_DATA                    0x00000001
094: #define NFS4_ACE_LIST_DIRECTORY               0x00000001
095: #define NFS4_ACE_WRITE_DATA                   0x00000002
096: #define NFS4_ACE_ADD_FILE                     0x00000002
097: #define NFS4_ACE_APPEND_DATA                  0x00000004
098: #define NFS4_ACE_ADD_SUBDIRECTORY             0x00000004
099: #define NFS4_ACE_READ_NAMED_ATTRS             0x00000008
100: #define NFS4_ACE_WRITE_NAMED_ATTRS            0x00000010
101: #define NFS4_ACE_EXECUTE                      0x00000020
102: #define NFS4_ACE_DELETE_CHILD                 0x00000040
103: #define NFS4_ACE_READ_ATTRIBUTES              0x00000080
104: #define NFS4_ACE_WRITE_ATTRIBUTES             0x00000100
105: #define NFS4_ACE_DELETE                       0x00010000
106: #define NFS4_ACE_READ_ACL                     0x00020000
107: #define NFS4_ACE_WRITE_ACL                    0x00040000
108: #define NFS4_ACE_WRITE_OWNER                  0x00080000
109: #define NFS4_ACE_SYNCHRONIZE                  0x00100000
110: #define NFS4_ACE_GENERIC_READ                 0x00120081
111: #define NFS4_ACE_GENERIC_WRITE                0x00160106
112: #define NFS4_ACE_GENERIC_EXECUTE              0x001200A0
113: #define NFS4_ACE_MASK_ALL                     0x001F01FF
114: 
115: #define EXCHGID4_FLAG_SUPP_MOVED_REFER          0x00000001
116: #define EXCHGID4_FLAG_SUPP_MOVED_MIGR           0x00000002
117: #define EXCHGID4_FLAG_BIND_PRINC_STATEID        0x00000100
118: 
119: #define EXCHGID4_FLAG_USE_NON_PNFS              0x00010000
120: #define EXCHGID4_FLAG_USE_PNFS_MDS              0x00020000
121: #define EXCHGID4_FLAG_USE_PNFS_DS               0x00040000
122: #define EXCHGID4_FLAG_MASK_PNFS                 0x00070000
123: 
124: #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A       0x40000000
125: #define EXCHGID4_FLAG_CONFIRMED_R               0x80000000
126: /*
127:  * Since the validity of these bits depends on whether
128:  * they're set in the argument or response, have separate
129:  * invalid flag masks for arg (_A) and resp (_R).
130:  */
131: #define EXCHGID4_FLAG_MASK_A                    0x40070103
132: #define EXCHGID4_FLAG_MASK_R                    0x80070103
133: 
134: #define SEQ4_STATUS_CB_PATH_DOWN                0x00000001
135: #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING    0x00000002
136: #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED     0x00000004
137: #define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED   0x00000008
138: #define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED  0x00000010
139: #define SEQ4_STATUS_ADMIN_STATE_REVOKED         0x00000020
140: #define SEQ4_STATUS_RECALLABLE_STATE_REVOKED    0x00000040
141: #define SEQ4_STATUS_LEASE_MOVED                 0x00000080
142: #define SEQ4_STATUS_RESTART_RECLAIM_NEEDED      0x00000100
143: #define SEQ4_STATUS_CB_PATH_DOWN_SESSION        0x00000200
144: #define SEQ4_STATUS_BACKCHANNEL_FAULT           0x00000400
145: 
146: #define NFS4_SECINFO_STYLE4_CURRENT_FH  0
147: #define NFS4_SECINFO_STYLE4_PARENT      1
148: 
149: #define NFS4_MAX_UINT64 (~(u64)0)
150: 
151: /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations.
152:  * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly.
153:  */
154: #define NFS4_MAX_OPS   8
155: 
156: /* Our NFS4 client back channel server only wants the cb_sequene and the
157:  * actual operation per compound
158:  */
159: #define NFS4_MAX_BACK_CHANNEL_OPS 2
160: 
161: enum nfs4_acl_whotype {
162:         NFS4_ACL_WHO_NAMED = 0,
163:         NFS4_ACL_WHO_OWNER,
164:         NFS4_ACL_WHO_GROUP,
165:         NFS4_ACL_WHO_EVERYONE,
166: };
167: 
168: #endif
169: 
170: /*
171:  * Local variables:
172:  *  c-basic-offset: 8
173:  * End:
174:  */
175: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/