2 * linux/inxlude/linux/nfsd/xdr.h
4 * XDR types for nfsd. This is mainly a typing exercise.
11 #include <linux/vfs.h>
12 #include <linux/nfs.h>
18 struct nfsd_sattrargs {
23 struct nfsd_diropargs {
29 struct nfsd_readargs {
33 struct kvec vec[RPCSVC_MAXPAGES];
37 struct nfsd_writeargs {
41 struct kvec vec[RPCSVC_MAXPAGES];
45 struct nfsd_createargs {
52 struct nfsd_renameargs {
61 struct nfsd_readlinkargs {
66 struct nfsd_linkargs {
73 struct nfsd_symlinkargs {
82 struct nfsd_readdirargs {
89 struct nfsd_attrstat {
94 struct nfsd_diropres {
99 struct nfsd_readlinkres {
103 struct nfsd_readres {
109 struct nfsd_readdirres {
112 struct readdir_cd common;
118 struct nfsd_statfsres {
119 struct kstatfs stats;
123 * Storage requirements for XDR arguments and results.
125 union nfsd_xdrstore {
126 struct nfsd_sattrargs sattr;
127 struct nfsd_diropargs dirop;
128 struct nfsd_readargs read;
129 struct nfsd_writeargs write;
130 struct nfsd_createargs create;
131 struct nfsd_renameargs rename;
132 struct nfsd_linkargs link;
133 struct nfsd_symlinkargs symlink;
134 struct nfsd_readdirargs readdir;
137 #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
140 int nfssvc_decode_void(struct svc_rqst *, u32 *, void *);
141 int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
142 int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *,
143 struct nfsd_sattrargs *);
144 int nfssvc_decode_diropargs(struct svc_rqst *, u32 *,
145 struct nfsd_diropargs *);
146 int nfssvc_decode_readargs(struct svc_rqst *, u32 *,
147 struct nfsd_readargs *);
148 int nfssvc_decode_writeargs(struct svc_rqst *, u32 *,
149 struct nfsd_writeargs *);
150 int nfssvc_decode_createargs(struct svc_rqst *, u32 *,
151 struct nfsd_createargs *);
152 int nfssvc_decode_renameargs(struct svc_rqst *, u32 *,
153 struct nfsd_renameargs *);
154 int nfssvc_decode_readlinkargs(struct svc_rqst *, u32 *,
155 struct nfsd_readlinkargs *);
156 int nfssvc_decode_linkargs(struct svc_rqst *, u32 *,
157 struct nfsd_linkargs *);
158 int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *,
159 struct nfsd_symlinkargs *);
160 int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *,
161 struct nfsd_readdirargs *);
162 int nfssvc_encode_void(struct svc_rqst *, u32 *, void *);
163 int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *);
164 int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *);
165 int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *);
166 int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *);
167 int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *);
168 int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *);
170 int nfssvc_encode_entry(struct readdir_cd *, const char *name,
171 int namlen, loff_t offset, ino_t ino, unsigned int);
173 int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
175 /* Helper functions for NFSv2 ACL code */
176 u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp);
177 u32 *nfs2svc_decode_fh(u32 *p, struct svc_fh *fhp);
179 #endif /* LINUX_NFSD_H */