nfs4.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*
  2. * include/linux/nfs4.h
  3. *
  4. * NFSv4 protocol definitions.
  5. *
  6. * Copyright (c) 2002 The Regents of the University of Michigan.
  7. * All rights reserved.
  8. *
  9. * Kendrick Smith <kmsmith@umich.edu>
  10. * Andy Adamson <andros@umich.edu>
  11. */
  12. #ifndef _UAPI_LINUX_NFS4_H
  13. #define _UAPI_LINUX_NFS4_H
  14. #include <linux/types.h>
  15. #define NFS4_BITMAP_SIZE 3
  16. #define NFS4_VERIFIER_SIZE 8
  17. #define NFS4_STATEID_SEQID_SIZE 4
  18. #define NFS4_STATEID_OTHER_SIZE 12
  19. #define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
  20. #define NFS4_FHSIZE 128
  21. #define NFS4_MAXPATHLEN PATH_MAX
  22. #define NFS4_MAXNAMLEN NAME_MAX
  23. #define NFS4_OPAQUE_LIMIT 1024
  24. #define NFS4_MAX_SESSIONID_LEN 16
  25. #define NFS4_ACCESS_READ 0x0001
  26. #define NFS4_ACCESS_LOOKUP 0x0002
  27. #define NFS4_ACCESS_MODIFY 0x0004
  28. #define NFS4_ACCESS_EXTEND 0x0008
  29. #define NFS4_ACCESS_DELETE 0x0010
  30. #define NFS4_ACCESS_EXECUTE 0x0020
  31. #define NFS4_FH_PERSISTENT 0x0000
  32. #define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001
  33. #define NFS4_FH_VOLATILE_ANY 0x0002
  34. #define NFS4_FH_VOL_MIGRATION 0x0004
  35. #define NFS4_FH_VOL_RENAME 0x0008
  36. #define NFS4_OPEN_RESULT_CONFIRM 0x0002
  37. #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
  38. #define NFS4_SHARE_ACCESS_MASK 0x000F
  39. #define NFS4_SHARE_ACCESS_READ 0x0001
  40. #define NFS4_SHARE_ACCESS_WRITE 0x0002
  41. #define NFS4_SHARE_ACCESS_BOTH 0x0003
  42. #define NFS4_SHARE_DENY_READ 0x0001
  43. #define NFS4_SHARE_DENY_WRITE 0x0002
  44. #define NFS4_SHARE_DENY_BOTH 0x0003
  45. /* nfs41 */
  46. #define NFS4_SHARE_WANT_MASK 0xFF00
  47. #define NFS4_SHARE_WANT_NO_PREFERENCE 0x0000
  48. #define NFS4_SHARE_WANT_READ_DELEG 0x0100
  49. #define NFS4_SHARE_WANT_WRITE_DELEG 0x0200
  50. #define NFS4_SHARE_WANT_ANY_DELEG 0x0300
  51. #define NFS4_SHARE_WANT_NO_DELEG 0x0400
  52. #define NFS4_SHARE_WANT_CANCEL 0x0500
  53. #define NFS4_SHARE_WHEN_MASK 0xF0000
  54. #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000
  55. #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000
  56. #define NFS4_CDFC4_FORE 0x1
  57. #define NFS4_CDFC4_BACK 0x2
  58. #define NFS4_CDFC4_BOTH 0x3
  59. #define NFS4_CDFC4_FORE_OR_BOTH 0x3
  60. #define NFS4_CDFC4_BACK_OR_BOTH 0x7
  61. #define NFS4_CDFS4_FORE 0x1
  62. #define NFS4_CDFS4_BACK 0x2
  63. #define NFS4_CDFS4_BOTH 0x3
  64. #define NFS4_SET_TO_SERVER_TIME 0
  65. #define NFS4_SET_TO_CLIENT_TIME 1
  66. #define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
  67. #define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1
  68. #define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2
  69. #define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3
  70. #define ACL4_SUPPORT_ALLOW_ACL 0x01
  71. #define ACL4_SUPPORT_DENY_ACL 0x02
  72. #define ACL4_SUPPORT_AUDIT_ACL 0x04
  73. #define ACL4_SUPPORT_ALARM_ACL 0x08
  74. #define NFS4_ACL_AUTO_INHERIT 0x00000001
  75. #define NFS4_ACL_PROTECTED 0x00000002
  76. #define NFS4_ACL_DEFAULTED 0x00000004
  77. #define NFS4_ACE_FILE_INHERIT_ACE 0x00000001
  78. #define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002
  79. #define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004
  80. #define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008
  81. #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
  82. #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
  83. #define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
  84. #define NFS4_ACE_INHERITED_ACE 0x00000080
  85. #define NFS4_ACE_READ_DATA 0x00000001
  86. #define NFS4_ACE_LIST_DIRECTORY 0x00000001
  87. #define NFS4_ACE_WRITE_DATA 0x00000002
  88. #define NFS4_ACE_ADD_FILE 0x00000002
  89. #define NFS4_ACE_APPEND_DATA 0x00000004
  90. #define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004
  91. #define NFS4_ACE_READ_NAMED_ATTRS 0x00000008
  92. #define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010
  93. #define NFS4_ACE_EXECUTE 0x00000020
  94. #define NFS4_ACE_DELETE_CHILD 0x00000040
  95. #define NFS4_ACE_READ_ATTRIBUTES 0x00000080
  96. #define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100
  97. #define NFS4_ACE_WRITE_RETENTION 0x00000200
  98. #define NFS4_ACE_WRITE_RETENTION_HOLD 0x00000400
  99. #define NFS4_ACE_DELETE 0x00010000
  100. #define NFS4_ACE_READ_ACL 0x00020000
  101. #define NFS4_ACE_WRITE_ACL 0x00040000
  102. #define NFS4_ACE_WRITE_OWNER 0x00080000
  103. #define NFS4_ACE_SYNCHRONIZE 0x00100000
  104. #define NFS4_ACE_GENERIC_READ 0x00120081
  105. #define NFS4_ACE_GENERIC_WRITE 0x00160106
  106. #define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
  107. #define NFS4_ACE_MASK_ALL 0x001F01FF
  108. #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001
  109. #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002
  110. #define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100
  111. #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000
  112. #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000
  113. #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000
  114. #define EXCHGID4_FLAG_MASK_PNFS 0x00070000
  115. #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000
  116. #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000
  117. /*
  118. * Since the validity of these bits depends on whether
  119. * they're set in the argument or response, have separate
  120. * invalid flag masks for arg (_A) and resp (_R).
  121. */
  122. #define EXCHGID4_FLAG_MASK_A 0x40070103
  123. #define EXCHGID4_FLAG_MASK_R 0x80070103
  124. #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001
  125. #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002
  126. #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004
  127. #define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008
  128. #define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010
  129. #define SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020
  130. #define SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040
  131. #define SEQ4_STATUS_LEASE_MOVED 0x00000080
  132. #define SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100
  133. #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200
  134. #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400
  135. #define NFS4_SECINFO_STYLE4_CURRENT_FH 0
  136. #define NFS4_SECINFO_STYLE4_PARENT 1
  137. #define NFS4_MAX_UINT64 (~(__u64)0)
  138. /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations.
  139. * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly.
  140. */
  141. #define NFS4_MAX_OPS 8
  142. /* Our NFS4 client back channel server only wants the cb_sequene and the
  143. * actual operation per compound
  144. */
  145. #define NFS4_MAX_BACK_CHANNEL_OPS 2
  146. #endif /* _UAPI_LINUX_NFS4_H */
  147. /*
  148. * Local variables:
  149. * c-basic-offset: 8
  150. * End:
  151. */