blob: af0d668368bc56dba9c55ccf247ed4ad06d6157b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_NFS3_H
20#define _UAPI_LINUX_NFS3_H
21#define NFS3_PORT 2049
22#define NFS3_MAXDATA 32768
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define NFS3_MAXPATHLEN PATH_MAX
24#define NFS3_MAXNAMLEN NAME_MAX
25#define NFS3_MAXGROUPS 16
26#define NFS3_FHSIZE 64
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define NFS3_COOKIESIZE 4
28#define NFS3_CREATEVERFSIZE 8
29#define NFS3_COOKIEVERFSIZE 8
30#define NFS3_WRITEVERFSIZE 8
Tao Baod7db5942015-01-28 10:07:51 -080031#define NFS3_FIFO_DEV (- 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define NFS3MODE_FMT 0170000
33#define NFS3MODE_DIR 0040000
34#define NFS3MODE_CHR 0020000
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define NFS3MODE_BLK 0060000
36#define NFS3MODE_REG 0100000
37#define NFS3MODE_LNK 0120000
38#define NFS3MODE_SOCK 0140000
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define NFS3MODE_FIFO 0010000
40#define NFS3_ACCESS_READ 0x0001
41#define NFS3_ACCESS_LOOKUP 0x0002
42#define NFS3_ACCESS_MODIFY 0x0004
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define NFS3_ACCESS_EXTEND 0x0008
44#define NFS3_ACCESS_DELETE 0x0010
45#define NFS3_ACCESS_EXECUTE 0x0020
46#define NFS3_ACCESS_FULL 0x003f
Ben Cheng655a7c02013-10-16 16:09:24 -070047enum nfs3_createmode {
Tao Baod7db5942015-01-28 10:07:51 -080048 NFS3_CREATE_UNCHECKED = 0,
49 NFS3_CREATE_GUARDED = 1,
50 NFS3_CREATE_EXCLUSIVE = 2
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52#define NFS3_FSF_LINK 0x0001
53#define NFS3_FSF_SYMLINK 0x0002
54#define NFS3_FSF_HOMOGENEOUS 0x0008
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define NFS3_FSF_CANSETTIME 0x0010
56#define NFS3_FSF_DEFAULT 0x001B
57#define NFS3_FSF_BILLYBOY 0x0018
58#define NFS3_FSF_READONLY 0x0008
Ben Cheng655a7c02013-10-16 16:09:24 -070059enum nfs3_ftype {
Tao Baod7db5942015-01-28 10:07:51 -080060 NF3NON = 0,
61 NF3REG = 1,
62 NF3DIR = 2,
Tao Baod7db5942015-01-28 10:07:51 -080063 NF3BLK = 3,
64 NF3CHR = 4,
65 NF3LNK = 5,
66 NF3SOCK = 6,
Tao Baod7db5942015-01-28 10:07:51 -080067 NF3FIFO = 7,
68 NF3BAD = 8
Ben Cheng655a7c02013-10-16 16:09:24 -070069};
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070070enum nfs3_time_how {
71 DONT_CHANGE = 0,
72 SET_TO_SERVER_TIME = 1,
73 SET_TO_CLIENT_TIME = 2,
74};
Ben Cheng655a7c02013-10-16 16:09:24 -070075struct nfs3_fh {
Tao Baod7db5942015-01-28 10:07:51 -080076 unsigned short size;
77 unsigned char data[NFS3_FHSIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070078};
79#define NFS3_VERSION 3
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define NFS3PROC_NULL 0
81#define NFS3PROC_GETATTR 1
82#define NFS3PROC_SETATTR 2
83#define NFS3PROC_LOOKUP 3
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define NFS3PROC_ACCESS 4
85#define NFS3PROC_READLINK 5
86#define NFS3PROC_READ 6
87#define NFS3PROC_WRITE 7
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define NFS3PROC_CREATE 8
89#define NFS3PROC_MKDIR 9
90#define NFS3PROC_SYMLINK 10
91#define NFS3PROC_MKNOD 11
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define NFS3PROC_REMOVE 12
93#define NFS3PROC_RMDIR 13
94#define NFS3PROC_RENAME 14
95#define NFS3PROC_LINK 15
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define NFS3PROC_READDIR 16
97#define NFS3PROC_READDIRPLUS 17
98#define NFS3PROC_FSSTAT 18
99#define NFS3PROC_FSINFO 19
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#define NFS3PROC_PATHCONF 20
101#define NFS3PROC_COMMIT 21
102#define NFS_MNT3_VERSION 3
103#endif