blob: 71ff8ac82161c2cd5de374a5ccc0dd576410d669 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_NFS3_H
8#define _UAPI_LINUX_NFS3_H
9#define NFS3_PORT 2049
10#define NFS3_MAXDATA 32768
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define NFS3_MAXPATHLEN PATH_MAX
12#define NFS3_MAXNAMLEN NAME_MAX
13#define NFS3_MAXGROUPS 16
14#define NFS3_FHSIZE 64
Ben Cheng655a7c02013-10-16 16:09:24 -070015#define NFS3_COOKIESIZE 4
16#define NFS3_CREATEVERFSIZE 8
17#define NFS3_COOKIEVERFSIZE 8
18#define NFS3_WRITEVERFSIZE 8
Tao Baod7db5942015-01-28 10:07:51 -080019#define NFS3_FIFO_DEV (- 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070020#define NFS3MODE_FMT 0170000
21#define NFS3MODE_DIR 0040000
22#define NFS3MODE_CHR 0020000
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define NFS3MODE_BLK 0060000
24#define NFS3MODE_REG 0100000
25#define NFS3MODE_LNK 0120000
26#define NFS3MODE_SOCK 0140000
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define NFS3MODE_FIFO 0010000
28#define NFS3_ACCESS_READ 0x0001
29#define NFS3_ACCESS_LOOKUP 0x0002
30#define NFS3_ACCESS_MODIFY 0x0004
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define NFS3_ACCESS_EXTEND 0x0008
32#define NFS3_ACCESS_DELETE 0x0010
33#define NFS3_ACCESS_EXECUTE 0x0020
34#define NFS3_ACCESS_FULL 0x003f
Ben Cheng655a7c02013-10-16 16:09:24 -070035enum nfs3_createmode {
Tao Baod7db5942015-01-28 10:07:51 -080036 NFS3_CREATE_UNCHECKED = 0,
37 NFS3_CREATE_GUARDED = 1,
38 NFS3_CREATE_EXCLUSIVE = 2
Ben Cheng655a7c02013-10-16 16:09:24 -070039};
40#define NFS3_FSF_LINK 0x0001
41#define NFS3_FSF_SYMLINK 0x0002
42#define NFS3_FSF_HOMOGENEOUS 0x0008
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define NFS3_FSF_CANSETTIME 0x0010
44#define NFS3_FSF_DEFAULT 0x001B
45#define NFS3_FSF_BILLYBOY 0x0018
46#define NFS3_FSF_READONLY 0x0008
Ben Cheng655a7c02013-10-16 16:09:24 -070047enum nfs3_ftype {
Tao Baod7db5942015-01-28 10:07:51 -080048 NF3NON = 0,
49 NF3REG = 1,
50 NF3DIR = 2,
Tao Baod7db5942015-01-28 10:07:51 -080051 NF3BLK = 3,
52 NF3CHR = 4,
53 NF3LNK = 5,
54 NF3SOCK = 6,
Tao Baod7db5942015-01-28 10:07:51 -080055 NF3FIFO = 7,
56 NF3BAD = 8
Ben Cheng655a7c02013-10-16 16:09:24 -070057};
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070058enum nfs3_time_how {
59 DONT_CHANGE = 0,
60 SET_TO_SERVER_TIME = 1,
61 SET_TO_CLIENT_TIME = 2,
62};
Ben Cheng655a7c02013-10-16 16:09:24 -070063struct nfs3_fh {
Tao Baod7db5942015-01-28 10:07:51 -080064 unsigned short size;
65 unsigned char data[NFS3_FHSIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
67#define NFS3_VERSION 3
Ben Cheng655a7c02013-10-16 16:09:24 -070068#define NFS3PROC_NULL 0
69#define NFS3PROC_GETATTR 1
70#define NFS3PROC_SETATTR 2
71#define NFS3PROC_LOOKUP 3
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define NFS3PROC_ACCESS 4
73#define NFS3PROC_READLINK 5
74#define NFS3PROC_READ 6
75#define NFS3PROC_WRITE 7
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define NFS3PROC_CREATE 8
77#define NFS3PROC_MKDIR 9
78#define NFS3PROC_SYMLINK 10
79#define NFS3PROC_MKNOD 11
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define NFS3PROC_REMOVE 12
81#define NFS3PROC_RMDIR 13
82#define NFS3PROC_RENAME 14
83#define NFS3PROC_LINK 15
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define NFS3PROC_READDIR 16
85#define NFS3PROC_READDIRPLUS 17
86#define NFS3PROC_FSSTAT 18
87#define NFS3PROC_FSINFO 19
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define NFS3PROC_PATHCONF 20
89#define NFS3PROC_COMMIT 21
90#define NFS_MNT3_VERSION 3
91#endif