aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs2.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/nfs2.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/nfs2.h')
-rw-r--r--include/linux/nfs2.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/include/linux/nfs2.h b/include/linux/nfs2.h
new file mode 100644
index 000000000000..0ed9517138fc
--- /dev/null
+++ b/include/linux/nfs2.h
@@ -0,0 +1,74 @@
1/*
2 * NFS protocol definitions
3 *
4 * This file contains constants for Version 2 of the protocol.
5 */
6#ifndef _LINUX_NFS2_H
7#define _LINUX_NFS2_H
8
9#define NFS2_PORT 2049
10#define NFS2_MAXDATA 8192
11#define NFS2_MAXPATHLEN 1024
12#define NFS2_MAXNAMLEN 255
13#define NFS2_MAXGROUPS 16
14#define NFS2_FHSIZE 32
15#define NFS2_COOKIESIZE 4
16#define NFS2_FIFO_DEV (-1)
17#define NFS2MODE_FMT 0170000
18#define NFS2MODE_DIR 0040000
19#define NFS2MODE_CHR 0020000
20#define NFS2MODE_BLK 0060000
21#define NFS2MODE_REG 0100000
22#define NFS2MODE_LNK 0120000
23#define NFS2MODE_SOCK 0140000
24#define NFS2MODE_FIFO 0010000
25
26
27/* NFSv2 file types - beware, these are not the same in NFSv3 */
28enum nfs2_ftype {
29 NF2NON = 0,
30 NF2REG = 1,
31 NF2DIR = 2,
32 NF2BLK = 3,
33 NF2CHR = 4,
34 NF2LNK = 5,
35 NF2SOCK = 6,
36 NF2BAD = 7,
37 NF2FIFO = 8
38};
39
40struct nfs2_fh {
41 char data[NFS2_FHSIZE];
42};
43
44/*
45 * Procedure numbers for NFSv2
46 */
47#define NFS2_VERSION 2
48#define NFSPROC_NULL 0
49#define NFSPROC_GETATTR 1
50#define NFSPROC_SETATTR 2
51#define NFSPROC_ROOT 3
52#define NFSPROC_LOOKUP 4
53#define NFSPROC_READLINK 5
54#define NFSPROC_READ 6
55#define NFSPROC_WRITECACHE 7
56#define NFSPROC_WRITE 8
57#define NFSPROC_CREATE 9
58#define NFSPROC_REMOVE 10
59#define NFSPROC_RENAME 11
60#define NFSPROC_LINK 12
61#define NFSPROC_SYMLINK 13
62#define NFSPROC_MKDIR 14
63#define NFSPROC_RMDIR 15
64#define NFSPROC_READDIR 16
65#define NFSPROC_STATFS 17
66
67#define NFS_MNT_PROGRAM 100005
68#define NFS_MNT_VERSION 1
69#define MNTPROC_NULL 0
70#define MNTPROC_MNT 1
71#define MNTPROC_UMNT 3
72#define MNTPROC_UMNTALL 4
73
74#endif /* _LINUX_NFS2_H */