Home | History | Annotate | Download | only in linux
      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 (at) umich.edu>
     10  *  Andy Adamson   <andros (at) umich.edu>
     11  */
     12 
     13 #ifndef _LINUX_NFS4_H
     14 #define _LINUX_NFS4_H
     15 
     16 #include <linux/types.h>
     17 
     18 #define NFS4_BITMAP_SIZE	2
     19 #define NFS4_VERIFIER_SIZE	8
     20 #define NFS4_STATEID_SIZE	16
     21 #define NFS4_FHSIZE		128
     22 #define NFS4_MAXPATHLEN		PATH_MAX
     23 #define NFS4_MAXNAMLEN		NAME_MAX
     24 
     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 
     32 #define NFS4_FH_PERSISTENT		0x0000
     33 #define NFS4_FH_NOEXPIRE_WITH_OPEN	0x0001
     34 #define NFS4_FH_VOLATILE_ANY		0x0002
     35 #define NFS4_FH_VOL_MIGRATION		0x0004
     36 #define NFS4_FH_VOL_RENAME		0x0008
     37 
     38 #define NFS4_OPEN_RESULT_CONFIRM 0x0002
     39 #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
     40 
     41 #define NFS4_SHARE_ACCESS_READ	0x0001
     42 #define NFS4_SHARE_ACCESS_WRITE	0x0002
     43 #define NFS4_SHARE_ACCESS_BOTH	0x0003
     44 #define NFS4_SHARE_DENY_READ	0x0001
     45 #define NFS4_SHARE_DENY_WRITE	0x0002
     46 #define NFS4_SHARE_DENY_BOTH	0x0003
     47 
     48 #define NFS4_SET_TO_SERVER_TIME	0
     49 #define NFS4_SET_TO_CLIENT_TIME	1
     50 
     51 #define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
     52 #define NFS4_ACE_ACCESS_DENIED_ACE_TYPE  1
     53 #define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE   2
     54 #define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE   3
     55 
     56 #define ACL4_SUPPORT_ALLOW_ACL 0x01
     57 #define ACL4_SUPPORT_DENY_ACL  0x02
     58 #define ACL4_SUPPORT_AUDIT_ACL 0x04
     59 #define ACL4_SUPPORT_ALARM_ACL 0x08
     60 
     61 #define NFS4_ACE_FILE_INHERIT_ACE             0x00000001
     62 #define NFS4_ACE_DIRECTORY_INHERIT_ACE        0x00000002
     63 #define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE     0x00000004
     64 #define NFS4_ACE_INHERIT_ONLY_ACE             0x00000008
     65 #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG   0x00000010
     66 #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG       0x00000020
     67 #define NFS4_ACE_IDENTIFIER_GROUP             0x00000040
     68 #define NFS4_ACE_OWNER                        0x00000080
     69 #define NFS4_ACE_GROUP                        0x00000100
     70 #define NFS4_ACE_EVERYONE                     0x00000200
     71 
     72 #define NFS4_ACE_READ_DATA                    0x00000001
     73 #define NFS4_ACE_LIST_DIRECTORY               0x00000001
     74 #define NFS4_ACE_WRITE_DATA                   0x00000002
     75 #define NFS4_ACE_ADD_FILE                     0x00000002
     76 #define NFS4_ACE_APPEND_DATA                  0x00000004
     77 #define NFS4_ACE_ADD_SUBDIRECTORY             0x00000004
     78 #define NFS4_ACE_READ_NAMED_ATTRS             0x00000008
     79 #define NFS4_ACE_WRITE_NAMED_ATTRS            0x00000010
     80 #define NFS4_ACE_EXECUTE                      0x00000020
     81 #define NFS4_ACE_DELETE_CHILD                 0x00000040
     82 #define NFS4_ACE_READ_ATTRIBUTES              0x00000080
     83 #define NFS4_ACE_WRITE_ATTRIBUTES             0x00000100
     84 #define NFS4_ACE_DELETE                       0x00010000
     85 #define NFS4_ACE_READ_ACL                     0x00020000
     86 #define NFS4_ACE_WRITE_ACL                    0x00040000
     87 #define NFS4_ACE_WRITE_OWNER                  0x00080000
     88 #define NFS4_ACE_SYNCHRONIZE                  0x00100000
     89 #define NFS4_ACE_GENERIC_READ                 0x00120081
     90 #define NFS4_ACE_GENERIC_WRITE                0x00160106
     91 #define NFS4_ACE_GENERIC_EXECUTE              0x001200A0
     92 #define NFS4_ACE_MASK_ALL                     0x001F01FF
     93 
     94 enum nfs4_acl_whotype {
     95 	NFS4_ACL_WHO_NAMED = 0,
     96 	NFS4_ACL_WHO_OWNER,
     97 	NFS4_ACL_WHO_GROUP,
     98 	NFS4_ACL_WHO_EVERYONE,
     99 };
    100 
    101 #endif
    102 
    103 /*
    104  * Local variables:
    105  *  c-basic-offset: 8
    106  * End:
    107  */
    108