diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/nfsd/xdr.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/nfsd/xdr.h')
-rw-r--r-- | include/linux/nfsd/xdr.h | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h new file mode 100644 index 000000000000..ecccef777dae --- /dev/null +++ b/include/linux/nfsd/xdr.h | |||
@@ -0,0 +1,172 @@ | |||
1 | /* | ||
2 | * linux/inxlude/linux/nfsd/xdr.h | ||
3 | * | ||
4 | * XDR types for nfsd. This is mainly a typing exercise. | ||
5 | */ | ||
6 | |||
7 | #ifndef LINUX_NFSD_H | ||
8 | #define LINUX_NFSD_H | ||
9 | |||
10 | #include <linux/fs.h> | ||
11 | #include <linux/vfs.h> | ||
12 | #include <linux/nfs.h> | ||
13 | |||
14 | struct nfsd_fhandle { | ||
15 | struct svc_fh fh; | ||
16 | }; | ||
17 | |||
18 | struct nfsd_sattrargs { | ||
19 | struct svc_fh fh; | ||
20 | struct iattr attrs; | ||
21 | }; | ||
22 | |||
23 | struct nfsd_diropargs { | ||
24 | struct svc_fh fh; | ||
25 | char * name; | ||
26 | int len; | ||
27 | }; | ||
28 | |||
29 | struct nfsd_readargs { | ||
30 | struct svc_fh fh; | ||
31 | __u32 offset; | ||
32 | __u32 count; | ||
33 | struct kvec vec[RPCSVC_MAXPAGES]; | ||
34 | int vlen; | ||
35 | }; | ||
36 | |||
37 | struct nfsd_writeargs { | ||
38 | svc_fh fh; | ||
39 | __u32 offset; | ||
40 | int len; | ||
41 | struct kvec vec[RPCSVC_MAXPAGES]; | ||
42 | int vlen; | ||
43 | }; | ||
44 | |||
45 | struct nfsd_createargs { | ||
46 | struct svc_fh fh; | ||
47 | char * name; | ||
48 | int len; | ||
49 | struct iattr attrs; | ||
50 | }; | ||
51 | |||
52 | struct nfsd_renameargs { | ||
53 | struct svc_fh ffh; | ||
54 | char * fname; | ||
55 | int flen; | ||
56 | struct svc_fh tfh; | ||
57 | char * tname; | ||
58 | int tlen; | ||
59 | }; | ||
60 | |||
61 | struct nfsd_readlinkargs { | ||
62 | struct svc_fh fh; | ||
63 | char * buffer; | ||
64 | }; | ||
65 | |||
66 | struct nfsd_linkargs { | ||
67 | struct svc_fh ffh; | ||
68 | struct svc_fh tfh; | ||
69 | char * tname; | ||
70 | int tlen; | ||
71 | }; | ||
72 | |||
73 | struct nfsd_symlinkargs { | ||
74 | struct svc_fh ffh; | ||
75 | char * fname; | ||
76 | int flen; | ||
77 | char * tname; | ||
78 | int tlen; | ||
79 | struct iattr attrs; | ||
80 | }; | ||
81 | |||
82 | struct nfsd_readdirargs { | ||
83 | struct svc_fh fh; | ||
84 | __u32 cookie; | ||
85 | __u32 count; | ||
86 | u32 * buffer; | ||
87 | }; | ||
88 | |||
89 | struct nfsd_attrstat { | ||
90 | struct svc_fh fh; | ||
91 | }; | ||
92 | |||
93 | struct nfsd_diropres { | ||
94 | struct svc_fh fh; | ||
95 | }; | ||
96 | |||
97 | struct nfsd_readlinkres { | ||
98 | int len; | ||
99 | }; | ||
100 | |||
101 | struct nfsd_readres { | ||
102 | struct svc_fh fh; | ||
103 | unsigned long count; | ||
104 | }; | ||
105 | |||
106 | struct nfsd_readdirres { | ||
107 | int count; | ||
108 | |||
109 | struct readdir_cd common; | ||
110 | u32 * buffer; | ||
111 | int buflen; | ||
112 | u32 * offset; | ||
113 | }; | ||
114 | |||
115 | struct nfsd_statfsres { | ||
116 | struct kstatfs stats; | ||
117 | }; | ||
118 | |||
119 | /* | ||
120 | * Storage requirements for XDR arguments and results. | ||
121 | */ | ||
122 | union nfsd_xdrstore { | ||
123 | struct nfsd_sattrargs sattr; | ||
124 | struct nfsd_diropargs dirop; | ||
125 | struct nfsd_readargs read; | ||
126 | struct nfsd_writeargs write; | ||
127 | struct nfsd_createargs create; | ||
128 | struct nfsd_renameargs rename; | ||
129 | struct nfsd_linkargs link; | ||
130 | struct nfsd_symlinkargs symlink; | ||
131 | struct nfsd_readdirargs readdir; | ||
132 | }; | ||
133 | |||
134 | #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore) | ||
135 | |||
136 | |||
137 | int nfssvc_decode_void(struct svc_rqst *, u32 *, void *); | ||
138 | int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); | ||
139 | int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *, | ||
140 | struct nfsd_sattrargs *); | ||
141 | int nfssvc_decode_diropargs(struct svc_rqst *, u32 *, | ||
142 | struct nfsd_diropargs *); | ||
143 | int nfssvc_decode_readargs(struct svc_rqst *, u32 *, | ||
144 | struct nfsd_readargs *); | ||
145 | int nfssvc_decode_writeargs(struct svc_rqst *, u32 *, | ||
146 | struct nfsd_writeargs *); | ||
147 | int nfssvc_decode_createargs(struct svc_rqst *, u32 *, | ||
148 | struct nfsd_createargs *); | ||
149 | int nfssvc_decode_renameargs(struct svc_rqst *, u32 *, | ||
150 | struct nfsd_renameargs *); | ||
151 | int nfssvc_decode_readlinkargs(struct svc_rqst *, u32 *, | ||
152 | struct nfsd_readlinkargs *); | ||
153 | int nfssvc_decode_linkargs(struct svc_rqst *, u32 *, | ||
154 | struct nfsd_linkargs *); | ||
155 | int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *, | ||
156 | struct nfsd_symlinkargs *); | ||
157 | int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *, | ||
158 | struct nfsd_readdirargs *); | ||
159 | int nfssvc_encode_void(struct svc_rqst *, u32 *, void *); | ||
160 | int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *); | ||
161 | int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *); | ||
162 | int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *); | ||
163 | int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *); | ||
164 | int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *); | ||
165 | int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *); | ||
166 | |||
167 | int nfssvc_encode_entry(struct readdir_cd *, const char *name, | ||
168 | int namlen, loff_t offset, ino_t ino, unsigned int); | ||
169 | |||
170 | int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); | ||
171 | |||
172 | #endif /* LINUX_NFSD_H */ | ||